-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Step3 #498
Merged
Merged
Step3 #498
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reorder the initialization of the context map and object list property to ensure `FLAT_STRING` is set before `OBJECT_LIST_PROP`. This reorganization improves readability and follows standard initialization practices.
Refactor the constructor and methods to include and utilize the P object. Add methods to retrieve paragraph content and parent objects. Deprecated getP() method to signal future removal.
Added a toString method to StandardComment to provide a clear and formatted string representation of the comment's ID, content, and the number of children. This will improve debugging and logging by making it easier to inspect the state of StandardComment objects.
Refactored the `applySectionBreakToParagraph` method to use `WmlFactory::newPPr` instead of a lambda function. This improves code readability and consistency by leveraging the utility class.
Refactor methods to use Optional and enhance section break detection. Replaced null checks with Optional to improve code readability and robustness. Also added additional logging for better traceability of actions.
Refactored RunUtil to use WmlFactory methods for creating runs and text elements, reducing code duplication and improving maintainability. Removed the Context object factory and associated create methods.
Consolidate imports, remove redundant stream mapping, and replace RunUtil with WmlFactory. These changes streamline the code and improve readability, making it more maintainable.
Introduced the CommentProcessors class to encapsulate comment processor management. Refactored CommentProcessorRegistry and related classes to use the new CommentProcessors, simplifying the code and improving maintainability.
…ut of CommentProcessorFactory.java DisplayIfProcessor, RepeatProcessor, RepeatDocPartProcessor, ParagraphRepeatProcessor, and ReplaceWithProcessor. These processors allow for dynamic content manipulation within documents, including conditionally displaying elements, repeating sections based on data, replacing content, and working with document parts.
Standardized the method for creating text runs by replacing RunUtil.create with the newRun method. This ensures consistency across the codebase and leverages the utilities provided by WmlFactory.
Revised the comment extraction logic to streamline and improve code readability. Introduced `extractContent` method to handle `CommentsPart` safely, and replaced the manual collection loop with stream operations to set comments more concisely.
Streamlined the code by removing unused imports and exceptions. Refactored `CommentUtil` class for better clarity and efficiency, particularly in handling comments retrieval and extraction.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduce the CommentProcessors
Introduce the WmlFactory
Extract preset Processors into their own packages