Skip to content

Commit

Permalink
feat: Support Baseline view
Browse files Browse the repository at this point in the history
Refs: #305
  • Loading branch information
grigoriev committed Dec 9, 2024
1 parent 1153a1d commit ddd2f84
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ String getCssContent(
String css = pdfStyles
+ (exportParams.getHeadersColor() != null ?
" h1, h2, h3, h4, h5, h6, .content .title {" +
" color: " + exportParams.getHeadersColor() + ";" +
" }"
" color: " + exportParams.getHeadersColor() + ";" +
" }"
: "")
+ listStyles;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ private ModifiedDocumentRenderer(@NotNull InternalReadOnlyTransaction transactio
if (lazyLoadParams != null) {
this.renderingContext.setDocumentLazyLoad(lazyLoadParams.isDocumentLazyLoad());
this.renderingContext.setCurrentDocumentRevision(lazyLoadParams.getCurrentDocumentRevision());
this.renderingContext.setDocumentLazyLoadHeadOrBaseline(lazyLoadParams.isHeadOrBaseline());
}

FieldRichTextRenderer renderer = null;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package ch.sbb.polarion.extension.pdf_exporter.util.velocity;

import ch.sbb.polarion.extension.generic.util.ObjectUtils;
import ch.sbb.polarion.extension.pdf_exporter.rest.model.DocumentData;
import com.polarion.alm.projects.model.IUniqueObject;
import com.polarion.alm.shared.api.transaction.ReadOnlyTransaction;
Expand All @@ -20,14 +21,13 @@
import org.jetbrains.annotations.NotNull;

import java.io.StringWriter;
import java.util.Objects;

public class VelocityEvaluator {

private static final Logger log = Logger.getLogger(VelocityEvaluator.class);

public @NotNull String evaluateVelocityExpressions(@NotNull DocumentData<? extends IUniqueObject> documentData, @NotNull String template) {
return Objects.requireNonNull(TransactionalExecutor.executeSafelyInReadOnlyTransaction(transaction -> {
return ObjectUtils.requireNotNull(TransactionalExecutor.executeSafelyInReadOnlyTransaction(transaction -> {
VelocityContext velocityContext = createVelocityContext(transaction, documentData);
StringWriter writer = new StringWriter();
VelocityEngine velocityEngine = new VelocityFactory().engine();
Expand Down

0 comments on commit ddd2f84

Please sign in to comment.