Skip to content

Commit

Permalink
Refactor variable naming in ParagraphResolverDocumentWalker
Browse files Browse the repository at this point in the history
Renamed the 'document' variable to 'docxPart' for clarity and consistency. This change ensures variable names accurately reflect their content and purpose within the ParagraphResolverDocumentWalker class.
  • Loading branch information
caring-coder committed Sep 20, 2024
1 parent a753a43 commit d5fb9f7
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ private static class Paragraphs {
private static class ParagraphResolverDocumentWalker
extends BaseDocumentWalker {
private final Object expressionContext;
private final DocxPart document;
private final DocxPart docxPart;
private final ParagraphPlaceholderReplacer placeholderReplacer;

/**
Expand All @@ -723,24 +723,23 @@ private static class ParagraphResolverDocumentWalker
* @param replacer The placeholderReplacer to use for resolving
*/
public ParagraphResolverDocumentWalker(
DocxPart document,
DocxPart docxPart,
Tr rowClone,
Object expressionContext,
ParagraphPlaceholderReplacer replacer
) {
super(new DocxPart(document.document(), document.part(), rowClone));
this.expressionContext = expressionContext;
this.document = document;
this.docxPart = docxPart;
this.placeholderReplacer = replacer;
}

/**
* {@inheritDoc}
*/
@Override protected void onParagraph(P paragraph) {
placeholderReplacer.resolveExpressionsForParagraph(document, new StandardParagraph(paragraph),
expressionContext
);
var standardParagraph = new StandardParagraph(paragraph);
placeholderReplacer.resolveExpressionsForParagraph(docxPart, standardParagraph, expressionContext);
}
}

Expand Down

0 comments on commit d5fb9f7

Please sign in to comment.