Class MxlSerializerUtil


  • public class MxlSerializerUtil
    extends Object
    Utils for mxl serializer
    • Method Detail

      • getMxlPrefix

        public static String getMxlPrefix()
        get mxl document prefix of current version
        Returns:
        mxl document prefix
      • getMxlPrefixSize

        public static int getMxlPrefixSize()
        Get mxl document prefix size
        Returns:
        mxl document prefix size
      • getFullMxlPrefixSize

        public static int getFullMxlPrefixSize()
        Get mxl document prefix size
        Returns:
        mxl document prefix size
      • getCurrentMxlPrefix

        public static String getCurrentMxlPrefix()
        get mxl document prefix of current version
        Returns:
      • MulDiv

        public static int MulDiv​(int a,
                                 int b,
                                 int c)
        Multiply and divide
        Parameters:
        a -
        b -
        c -
        Returns:
      • bytesToInt

        public static int bytesToInt​(byte[] b)
        Convert byte array to int
        Parameters:
        b -
        Returns:
      • readIntFromFile

        public static int readIntFromFile​(IFileEx file)
        Read int from file
        Parameters:
        file -
        Returns:
      • readStringFromFile

        public static String readStringFromFile​(IFileEx file)
        Read string from file.
        Parameters:
        file - IFileEx
        Returns:
        result string
      • isFlagSet

        public static boolean isFlagSet​(long mask,
                                        int key)
        Is flags set in mask
        Parameters:
        mask -
        key -
        Returns:
      • compareVersions

        public static int compareVersions​(int[] left,
                                          int[] right)
        Compare document versions
        Parameters:
        left -
        right -
        Returns:
      • isVersionCorrect

        public static boolean isVersionCorrect​(int[] version)
        Check if mxl version is correct
        Parameters:
        version -
        Returns:
      • deleteBit

        public static long deleteBit​(long value,
                                     int bitNum)
        Delete bit bitNum from value
        Parameters:
        value -
        bitNum -
        Returns:
      • convert29to30

        public static long convert29to30​(long mask)
        Convert format mask
        Parameters:
        mask -
      • getPattern

        public static Pattern getPattern​(int patternIndex)
        Get pattern by index
        Parameters:
        patternIndex -
        Returns:
      • getMxlPattern

        public static int getMxlPattern​(Pattern pattern)
        Get mxl pattern
        Parameters:
        pattern -
        Returns:
      • getCellLineStyle

        public static CellLineStyle getCellLineStyle​(int index)
        Get cell line style
        Parameters:
        index -
        Returns:
      • getMxlCellLineStyle

        public static int getMxlCellLineStyle​(CellLineStyle style)
        Get mxl cell line style
        Parameters:
        style -
        Returns:
      • getDrawingLineStyle

        public static DrawingLineStyle getDrawingLineStyle​(int index)
        Get drawing line style
        Parameters:
        index -
        Returns:
      • getMxlDrawingLineStyle

        public static int getMxlDrawingLineStyle​(DrawingLineStyle style)
        Get mxl drawing line style
        Parameters:
        style -
        Returns:
      • getMxlLineStyle

        public static int getMxlLineStyle​(SpreadsheetLine line)
        Get line style
        Parameters:
        line -
        Returns:
      • getPictureSizeMode

        public static PictureSize getPictureSizeMode​(int value)
        Get picture size mode
        Parameters:
        value -
        Returns:
      • getMxlPicturesizeMode

        public static int getMxlPicturesizeMode​(PictureSize size)
        Get mxl picture size mode
        Parameters:
        size -
        Returns:
      • getMxlTextPosition

        public static int getMxlTextPosition​(CellTextPosition position)
        Get value of mxl text position relative to picture
        Parameters:
        position - - CellTextPosition
        Returns:
        value of mxl text position relative to picture
      • getCellTextPosition

        public static CellTextPosition getCellTextPosition​(int value)
        Get text position relative to picture
        Parameters:
        value - - mxl text position relative to picture
        Returns:
        text position relative to picture
      • getFractionsFromString

        public static DateFractions getFractionsFromString​(String string)
        Get date fractions from string
        Parameters:
        string -
        Returns:
      • getPageOrientation

        public static PageOrientation getPageOrientation​(int val)
        Get page orientation
        Parameters:
        val -
        Returns:
      • getMxlPageOrientation

        public static int getMxlPageOrientation​(PageOrientation orientation)
        Get mxl page orientation
        Parameters:
        orientation -
        Returns:
      • getPrintAccuracy

        public static PrintAccuracy getPrintAccuracy​(int val)
        Get print accuracy
        Parameters:
        val -
        Returns:
      • getMxlPrintAccuracy

        public static int getMxlPrintAccuracy​(PrintAccuracy accuracy)
        Get mxl print accuracy
        Parameters:
        accuracy -
        Returns:
      • getDuplexPrintingType

        public static DuplexPrintingType getDuplexPrintingType​(int val)
        Get duplex printing type
        Parameters:
        val -
        Returns:
      • getMxlDuplexPrintingType

        public static int getMxlDuplexPrintingType​(DuplexPrintingType type)
        Get mxl duplex printing type
        Parameters:
        type -
        Returns:
      • getPagePlacementAlternation

        public static PagePlacementAlternation getPagePlacementAlternation​(int val)
        Get page placement
        Parameters:
        val -
        Returns:
      • getMxlPagePlacementAlternation

        public static int getMxlPagePlacementAlternation​(PagePlacementAlternation alt)
        Get mxl page placement
        Parameters:
        alt -
        Returns:
      • getTextPlacement

        public static TextPlacement getTextPlacement​(int val)
        Get text placement
        Parameters:
        val -
        Returns:
      • getMxlTextPlacement

        public static int getMxlTextPlacement​(TextPlacement placement)
        Get mxl text placement
        Parameters:
        placement -
        Returns:
      • getDetailUse

        public static DetailUse getDetailUse​(int val)
        Get detail use
        Parameters:
        val -
        Returns:
      • getMxlDetailUse

        public static int getMxlDetailUse​(DetailUse detailUse)
        Get mxl detail use
        Parameters:
        detailUse -
        Returns:
      • getSizeChangeMode

        public static SizeChangeMode getSizeChangeMode​(int val)
        Get size change mode
        Parameters:
        val -
        Returns:
      • getMxlSizeChangeMode

        public static int getMxlSizeChangeMode​(SizeChangeMode mode)
        Get mxl size change mode
        Parameters:
        mode -
        Returns:
      • getGroupHeaderPlacement

        public static GroupHeaderPlacement getGroupHeaderPlacement​(int val)
        Get groups header placement
        Parameters:
        val -
        Returns:
      • getMxlGroupHeaderPlacement

        public static int getMxlGroupHeaderPlacement​(GroupHeaderPlacement placement)
        Get mxl group placement
        Parameters:
        placement -
        Returns:
      • getLineOffset

        public static int getLineOffset​(SpreadsheetLine line)
        Get line gap
        Parameters:
        line -
        Returns:
      • getMxlLineClass

        public static UUID getMxlLineClass​(SpreadsheetLine line)
        Get line class id
        Parameters:
        line -
        Returns:
      • getLineWidth

        public static int getLineWidth​(SpreadsheetLine line)
        Get line width
        Parameters:
        line -
        Returns:
      • getMxlHorizontalAlign

        public static int getMxlHorizontalAlign​(HorizontalAlignment align)
        Get mxl horizontal align
        Parameters:
        align -
        Returns:
      • getMxlVerticalAlign

        public static int getMxlVerticalAlign​(VerticalAlignment align)
        Get mxl vertical align
        Parameters:
        align -
        Returns:
      • getMxlNamedItemType

        public static int getMxlNamedItemType​(NamedItem item)
        Get mxl named item type
        Parameters:
        item -
        Returns:
      • getMxlNamedItemSubtype

        public static int getMxlNamedItemSubtype​(NamedItem item)
        Get mxl named item subtype
        Parameters:
        item -
        Returns:
      • getFillType

        public static FillType getFillType​(int val)
        Get fill type
        Parameters:
        val -
        Returns:
      • getMxlFillType

        public static int getMxlFillType​(FillType fillType)
        Get mxl fill type
        Parameters:
        fillType -
        Returns:
      • getDimensionAttributePlacementType

        public static DimensionAttributePlacementType getDimensionAttributePlacementType​(int index)
        Get dimension attribute placement type
        Parameters:
        index -
        Returns:
      • getDimensionPlacementType

        public static DimensionPlacementType getDimensionPlacementType​(int index)
        Get dimension placement type
        Parameters:
        index -
        Returns:
      • getStandardAppearance

        public static StandardAppearance getStandardAppearance​(int index)
        Get standard appearance
        Parameters:
        index -
        Returns:
      • getPivotTableLinesShowType

        public static PivotTableLinesShowType getPivotTableLinesShowType​(int index)
        Get pivot table lines show type
        Parameters:
        index -
        Returns: