Skip to content

Commit

Permalink
Adhere to constants naming and declaration conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-sexenian authored Feb 5, 2025
1 parent df6acb3 commit 7770155
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions java/src/main/java/com/genexus/reports/PDFReportPDFBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class PDFReportPDFBox extends GXReportPDFCommons{
private final float DEFAULT_PDFBOX_LEADING = 1.2f;
private Set<String> supportedHTMLTags = new HashSet<>();
private PDPageContentStream currentPageContentStream;
private final String pagesPlaceHolder = "{{pages}}";
private final static String PAGES_PLACEHOLDER = "{{pages}}";

static {
log = org.apache.logging.log4j.LogManager.getLogger(PDFReportPDFBox.class);
Expand Down Expand Up @@ -855,7 +855,7 @@ else if (barcodeType != null) {
}

// Handle {{Pages}}
if (sTxt.trim().equalsIgnoreCase(pagesPlaceHolder)) {
if (sTxt.trim().equalsIgnoreCase(PAGES_PLACEHOLDER)) {
if (!templateCreated) {
templateFont = baseFont;
templateFontSize = fontSize;
Expand All @@ -864,7 +864,7 @@ else if (barcodeType != null) {
templateY = this.pageSize.getUpperRightY() - bottomAux - topMargin - bottomMargin;
templateCreated = true;
}
sTxt = pagesPlaceHolder;
sTxt = PAGES_PLACEHOLDER;
}

float textBlockWidth = rightAux - leftAux;
Expand Down Expand Up @@ -1276,7 +1276,7 @@ private void replaceTemplatePages() throws IOException {
PDFTextStripper stripper = new PDFTextStripper() {
@Override
protected void writeString(String text, List<TextPosition> textPositions) throws IOException {
String placeholder = pagesPlaceHolder;
String placeholder = PAGES_PLACEHOLDER;
int index = text.indexOf(placeholder);
while (index != -1 && index + placeholder.length() <= textPositions.size()) {
float minX = Float.MAX_VALUE;
Expand Down Expand Up @@ -1484,4 +1484,4 @@ public void GxEndPage() {
}
}

}
}

0 comments on commit 7770155

Please sign in to comment.