Class Preprocessors

java.lang.Object
pro.verron.officestamper.preset.Preprocessors

public class Preprocessors extends Object
A helper class that provides pre-processing functionality for WordprocessingMLPackage documents.
  • Method Details

    • mergeSimilarRuns

      public static PreProcessor mergeSimilarRuns()
      Returns a PreProcessor object that merges same style runs that are next to each other in a WordprocessingMLPackage document.
      Returns:
      a PreProcessor object that merges similar runs.
    • removeLanguageProof

      public static PreProcessor removeLanguageProof()
      Returns a PreProcessor object that removes all ProofErr elements from the WordprocessingMLPackage document.
      Returns:
      a PreProcessor object that removes ProofErr elements.
    • removeLanguageInfo

      public static PreProcessor removeLanguageInfo()
      Returns a PreProcessor object that removes all language informations such as grammatical and orthographics markers in a WordprocessingMLPackage document.
      Returns:
      a PreProcessor object that removes language markers.
    • removeMalformedComments

      public static PreProcessor removeMalformedComments()
      Returns a PreProcessor object that removes comments information that is not conforming to the expected patterns.
      Returns:
      a PreProcessor object that removes malformed comments markers.
    • preparePlaceholders

      public static PreProcessor preparePlaceholders(String opening, String element)
      Returns a PreProcessor object that prepares inline placeholders introduced by the given opening delimiter. The matching closing brace is found by brace balancing, so expressions may nest braces freely (for instance a SpEL inline list or map).
      Parameters:
      opening - the literal opening delimiter of a placeholder, for instance ${ or #{. It must end with an opening brace.
      element - the name of the smart tag type to wrap matching placeholders with.
      Returns:
      a PreProcessor object that prepares inline placeholders.
      See Also:
    • prepareCommentProcessor

      public static PreProcessor prepareCommentProcessor()
      Returns a PreProcessor object that prepares comment processors for use with the stamper.
      Returns:
      a PreProcessor object that prepares comment processors.