Class DocFormatter

java.lang.Object
io.jmix.reports.yarg.formatters.impl.AbstractFormatter
io.jmix.reports.yarg.formatters.impl.DocFormatter
All Implemented Interfaces:
ReportFormatter

public class DocFormatter extends AbstractFormatter
Document formatter for '.doc' and '.odt' file types
  • Field Details

    • log

      protected static final org.slf4j.Logger log
    • SEARCH_REGULAR_EXPRESSION

      protected static final String SEARCH_REGULAR_EXPRESSION
      See Also:
    • PDF_OUTPUT_FILE

      protected static final String PDF_OUTPUT_FILE
      See Also:
    • MS_WORD_OUTPUT_FILE

      protected static final String MS_WORD_OUTPUT_FILE
      See Also:
    • xComponent

      protected com.sun.star.lang.XComponent xComponent
    • officeComponent

      protected OfficeComponent officeComponent
    • officeIntegration

      protected OfficeIntegrationAPI officeIntegration
    • clipboardLock

      protected static final Object clipboardLock
  • Constructor Details

  • Method Details

    • renderDocument

      public void renderDocument()
      Description copied from interface: ReportFormatter
      Creates document and serializes it to predefined stream (or something like this)
    • doCreateDocumentWithRetries

      protected void doCreateDocumentWithRetries(OutputStream outputStream, Exception lastException, int currentAttempt)
    • doCreateDocument

      protected void doCreateDocument(OutputStream outputStream) throws NoFreePortsException
      Throws:
      NoFreePortsException
    • loadDocument

      protected void loadDocument(OfficeResourceProvider ooResourceProvider) throws com.sun.star.lang.IllegalArgumentException, com.sun.star.io.IOException
      Throws:
      com.sun.star.lang.IllegalArgumentException
      com.sun.star.io.IOException
    • saveAndClose

      protected void saveAndClose(OfficeResourceProvider ooResourceProvider, com.sun.star.lang.XComponent xComponent, ReportOutputType outputType, OutputStream outputStream) throws com.sun.star.io.IOException
      Throws:
      com.sun.star.io.IOException
    • fillTables

      protected void fillTables(com.sun.star.frame.XDispatchHelper xDispatchHelper) throws com.sun.star.uno.Exception
      Throws:
      com.sun.star.uno.Exception
    • fillTable

      protected void fillTable(String name, BandData parentBand, TableManager tableManager, com.sun.star.frame.XDispatchHelper xDispatchHelper, int numberOfRowWithAliases) throws com.sun.star.uno.Exception
      Throws:
      com.sun.star.uno.Exception
    • fillRow

      protected void fillRow(BandData band, TableManager tableManager, int row) throws com.sun.star.lang.IndexOutOfBoundsException, com.sun.star.container.NoSuchElementException, com.sun.star.lang.WrappedTargetException
      Throws:
      com.sun.star.lang.IndexOutOfBoundsException
      com.sun.star.container.NoSuchElementException
      com.sun.star.lang.WrappedTargetException
    • fillCell

      protected void fillCell(BandData band, com.sun.star.table.XCell xCell) throws com.sun.star.container.NoSuchElementException, com.sun.star.lang.WrappedTargetException
      Throws:
      com.sun.star.container.NoSuchElementException
      com.sun.star.lang.WrappedTargetException
    • replaceAllAliasesInDocument

      protected void replaceAllAliasesInDocument()
      Replaces all aliases ${bandname.paramname} in document text.
      Throws:
      ReportingException - If there is not appropriate band or alias is bad
    • insertValue

      protected void insertValue(com.sun.star.text.XText text, com.sun.star.text.XTextRange textRange, BandData band, String parameterName)
    • formatCellText

      protected String formatCellText(String cellText)
    • clearClipboard

      protected static void clearClipboard()