Package com._1c.g5.v8.dt.moxel.util
Class MxlSerializerUtil
- java.lang.Object
- 
- com._1c.g5.v8.dt.moxel.util.MxlSerializerUtil
 
- 
 public class MxlSerializerUtil extends Object Utils for mxl serializer
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static intbytesToInt(byte[] b)Convert byte array to intstatic intcompareVersions(Integer[] left, Integer[] right)Compare document versionsstatic longconvert29to30(long mask)Convert format maskstatic longdeleteBit(long value, int bitNum)Delete bit bitNum from valuestatic CellLineStylegetCellLineStyle(int index)Get cell line stylestatic CellTextPositiongetCellTextPosition(int value)Get text position relative to picturestatic StringgetCurrentMxlPrefix()get mxl document prefix of current versionstatic DetailUsegetDetailUse(int val)Get detail usestatic DimensionAttributePlacementTypegetDimensionAttributePlacementType(int index)Get dimension attribute placement typestatic DimensionPlacementTypegetDimensionPlacementType(int index)Get dimension placement typestatic DrawingLineStylegetDrawingLineStyle(int index)Get drawing line stylestatic DuplexPrintingTypegetDuplexPrintingType(int val)Get duplex printing typestatic ExtensionAlgorithmgetExtensionAlgorithm(int val)ReturnsExtensionAlgorithmvalue of the extension algorithm by its integer value.static FillTypegetFillType(int val)Get fill typestatic DateFractionsgetFractionsFromString(String string)Get date fractions from stringstatic intgetFullMxlPrefixSize()Get mxl document prefix sizestatic GroupHeaderPlacementgetGroupHeaderPlacement(int val)Get groups header placementstatic intgetLineOffset(SpreadsheetLine line)Get line gapstatic intgetLineWidth(SpreadsheetLine line)Get line widthstatic intgetMxlCellLineStyle(CellLineStyle style)Get mxl cell line stylestatic intgetMxlDetailUse(DetailUse detailUse)Get mxl detail usestatic intgetMxlDrawingLineStyle(DrawingLineStyle style)Get mxl drawing line stylestatic intgetMxlDuplexPrintingType(DuplexPrintingType type)Get mxl duplex printing typestatic intgetMxlExtensionAlgorithm(ExtensionAlgorithm extensionAlgorithm)Returns integer value of the extension algorithm ofSpreadsheetDocumentby its enum value.static intgetMxlFillType(FillType fillType)Get mxl fill typestatic intgetMxlGroupHeaderPlacement(GroupHeaderPlacement placement)Get mxl group placementstatic intgetMxlHorizontalAlign(HorizontalAlignment align)Get mxl horizontal alignstatic UUIDgetMxlLineClass(SpreadsheetLine line)Get line class idstatic intgetMxlLineStyle(SpreadsheetLine line)Get line stylestatic intgetMxlNamedItemSubtype(NamedItem item)Get mxl named item subtypestatic intgetMxlNamedItemType(NamedItem item)Get mxl named item typestatic intgetMxlPageOrientation(PageOrientation orientation)Get mxl page orientationstatic intgetMxlPagePlacementAlternation(PagePlacementAlternation alt)Get mxl page placementstatic intgetMxlPattern(Pattern pattern)Get mxl patternstatic intgetMxlPicturesizeMode(PictureSize size)Get mxl picture size modestatic StringgetMxlPrefix()get mxl document prefix of current versionstatic intgetMxlPrefixSize()Get mxl document prefix sizestatic intgetMxlPrintAccuracy(PrintAccuracy accuracy)Get mxl print accuracystatic intgetMxlSavedPicturesDensity(SpreadsheetDocumentSavedPicturesDensity savedPicturesDensity)Returns integer value of the saved pictures density ofSpreadsheetDocumentby its enum value.static intgetMxlSizeChangeMode(SizeChangeMode mode)Get mxl size change modestatic intgetMxlStepDirection(SpreadsheetDocumentStepDirectionType direction)Get mxl step directionstatic intgetMxlTextDirection(SpreadsheetDocumentTextDirectionType direction)Returns integer value of the text direction ofSpreadsheetDocumentby its enum value.static intgetMxlTextPlacement(TextPlacement placement)Get mxl text placementstatic intgetMxlTextPosition(CellTextPosition position)Get value of mxl text position relative to picturestatic intgetMxlVerticalAlign(VerticalAlignment align)Get mxl vertical alignstatic PageOrientationgetPageOrientation(int val)Get page orientationstatic PagePlacementAlternationgetPagePlacementAlternation(int val)Get page placementstatic PatterngetPattern(int patternIndex)Get pattern by indexstatic PictureSizegetPictureSizeMode(int value)Get picture size modestatic PivotTableLinesShowTypegetPivotTableLinesShowType(int index)Get pivot table lines show typestatic PrintAccuracygetPrintAccuracy(int val)Get print accuracystatic SpreadsheetDocumentSavedPicturesDensitygetSavedPicturesDensity(int val)ReturnsSpreadsheetDocumentSavedPicturesDensityvalue of the saved pictures density by its integer value.static SizeChangeModegetSizeChangeMode(int val)Get size change modestatic StandardAppearancegetStandardAppearance(int index)Get standard appearancestatic SpreadsheetDocumentStepDirectionTypegetStepDirection(int val)Get step directionstatic SpreadsheetDocumentTextDirectionTypegetTextDirection(int val)ReturnsSpreadsheetDocumentTextDirectionTypevalue of the text direction by its integer value.static TextPlacementgetTextPlacement(int val)Get text placementstatic booleanisFlagSet(long mask, int key)Is flags set in maskstatic booleanisVersionCorrect(Integer[] version)Check if mxl version is correctstatic intMulDiv(int a, int b, int c)Multiply and dividestatic intreadIntFromFile(IFileEx file)Read int from filestatic StringreadStringFromFile(IFileEx file)Read string from file.
 
- 
- 
- 
Method Detail- 
getMxlPrefixpublic static String getMxlPrefix() get mxl document prefix of current version- Returns:
- mxl document prefix
 
 - 
getMxlPrefixSizepublic static int getMxlPrefixSize() Get mxl document prefix size- Returns:
- mxl document prefix size
 
 - 
getFullMxlPrefixSizepublic static int getFullMxlPrefixSize() Get mxl document prefix size- Returns:
- mxl document prefix size
 
 - 
getCurrentMxlPrefixpublic static String getCurrentMxlPrefix() get mxl document prefix of current version- Returns:
 
 - 
MulDivpublic static int MulDiv(int a, int b, int c)Multiply and divide- Parameters:
- a-
- b-
- c-
- Returns:
 
 - 
bytesToIntpublic static int bytesToInt(byte[] b) Convert byte array to int- Parameters:
- b-
- Returns:
 
 - 
readIntFromFilepublic static int readIntFromFile(IFileEx file) Read int from file- Parameters:
- file-
- Returns:
 
 - 
readStringFromFilepublic static String readStringFromFile(IFileEx file) Read string from file.- Parameters:
- file-- IFileEx
- Returns:
- result string
 
 - 
isFlagSetpublic static boolean isFlagSet(long mask, int key)Is flags set in mask- Parameters:
- mask-
- key-
- Returns:
 
 - 
compareVersionspublic static int compareVersions(Integer[] left, Integer[] right) Compare document versions- Parameters:
- left-
- right-
- Returns:
 
 - 
isVersionCorrectpublic static boolean isVersionCorrect(Integer[] version) Check if mxl version is correct- Parameters:
- version-
- Returns:
 
 - 
deleteBitpublic static long deleteBit(long value, int bitNum)Delete bit bitNum from value- Parameters:
- value-
- bitNum-
- Returns:
 
 - 
convert29to30public static long convert29to30(long mask) Convert format mask- Parameters:
- mask-
 
 - 
getPatternpublic static Pattern getPattern(int patternIndex) Get pattern by index- Parameters:
- patternIndex-
- Returns:
 
 - 
getMxlPatternpublic static int getMxlPattern(Pattern pattern) Get mxl pattern- Parameters:
- pattern-
- Returns:
 
 - 
getCellLineStylepublic static CellLineStyle getCellLineStyle(int index) Get cell line style- Parameters:
- index-
- Returns:
 
 - 
getMxlCellLineStylepublic static int getMxlCellLineStyle(CellLineStyle style) Get mxl cell line style- Parameters:
- style-
- Returns:
 
 - 
getDrawingLineStylepublic static DrawingLineStyle getDrawingLineStyle(int index) Get drawing line style- Parameters:
- index-
- Returns:
 
 - 
getMxlDrawingLineStylepublic static int getMxlDrawingLineStyle(DrawingLineStyle style) Get mxl drawing line style- Parameters:
- style-
- Returns:
 
 - 
getMxlLineStylepublic static int getMxlLineStyle(SpreadsheetLine line) Get line style- Parameters:
- line-
- Returns:
 
 - 
getPictureSizeModepublic static PictureSize getPictureSizeMode(int value) Get picture size mode- Parameters:
- value-
- Returns:
 
 - 
getMxlPicturesizeModepublic static int getMxlPicturesizeMode(PictureSize size) Get mxl picture size mode- Parameters:
- size-
- Returns:
 
 - 
getMxlTextPositionpublic 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
 
 - 
getCellTextPositionpublic 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
 
 - 
getFractionsFromStringpublic static DateFractions getFractionsFromString(String string) Get date fractions from string- Parameters:
- string-
- Returns:
 
 - 
getPageOrientationpublic static PageOrientation getPageOrientation(int val) Get page orientation- Parameters:
- val-
- Returns:
 
 - 
getMxlPageOrientationpublic static int getMxlPageOrientation(PageOrientation orientation) Get mxl page orientation- Parameters:
- orientation-
- Returns:
 
 - 
getPrintAccuracypublic static PrintAccuracy getPrintAccuracy(int val) Get print accuracy- Parameters:
- val-
- Returns:
 
 - 
getMxlPrintAccuracypublic static int getMxlPrintAccuracy(PrintAccuracy accuracy) Get mxl print accuracy- Parameters:
- accuracy-
- Returns:
 
 - 
getDuplexPrintingTypepublic static DuplexPrintingType getDuplexPrintingType(int val) Get duplex printing type- Parameters:
- val-
- Returns:
 
 - 
getMxlDuplexPrintingTypepublic static int getMxlDuplexPrintingType(DuplexPrintingType type) Get mxl duplex printing type- Parameters:
- type-
- Returns:
 
 - 
getPagePlacementAlternationpublic static PagePlacementAlternation getPagePlacementAlternation(int val) Get page placement- Parameters:
- val-
- Returns:
 
 - 
getMxlPagePlacementAlternationpublic static int getMxlPagePlacementAlternation(PagePlacementAlternation alt) Get mxl page placement- Parameters:
- alt-
- Returns:
 
 - 
getStepDirectionpublic static SpreadsheetDocumentStepDirectionType getStepDirection(int val) Get step direction- Parameters:
- val-
- Returns:
 
 - 
getMxlStepDirectionpublic static int getMxlStepDirection(SpreadsheetDocumentStepDirectionType direction) Get mxl step direction- Parameters:
- direction-
- Returns:
 
 - 
getTextDirectionpublic static SpreadsheetDocumentTextDirectionType getTextDirection(int val) ReturnsSpreadsheetDocumentTextDirectionTypevalue of the text direction by its integer value.- Parameters:
- val- Int value of the text direction of- SpreadsheetDocument, either 0 or 1.
- Returns:
- SpreadsheetDocumentTextDirectionTypevalue of the text direction of- SpreadsheetDocument, either LEFT_TO_RIGHT(0) or RIGHT_TO_LEFT(1), never- null.
 
 - 
getSavedPicturesDensitypublic static SpreadsheetDocumentSavedPicturesDensity getSavedPicturesDensity(int val) ReturnsSpreadsheetDocumentSavedPicturesDensityvalue of the saved pictures density by its integer value.- Parameters:
- val- Int value of the saved pictures density of- SpreadsheetDocument- 0, 1, 2 ,3.
- Returns:
- SpreadsheetDocumentSavedPicturesDensityvalue of the saved pictures density of- SpreadsheetDocument- Original(0), High(1), Medium(2), Low(3), never- null.
 
 - 
getMxlTextDirectionpublic static int getMxlTextDirection(SpreadsheetDocumentTextDirectionType direction) Returns integer value of the text direction ofSpreadsheetDocumentby its enum value.- Parameters:
- direction-- SpreadsheetDocumentTextDirectionTypevalue of the text direction of- SpreadsheetDocument, either LEFT_TO_RIGHT(0) or RIGHT_TO_LEFT(1), cannot be- null.
- Returns:
- Int value of the text direction of SpreadsheetDocument, either 0 or 1.
 
 - 
getMxlSavedPicturesDensitypublic static int getMxlSavedPicturesDensity(SpreadsheetDocumentSavedPicturesDensity savedPicturesDensity) Returns integer value of the saved pictures density ofSpreadsheetDocumentby its enum value.- Parameters:
- direction-- SpreadsheetDocumentSavedPicturesDensityvalue of the saved pictures of- SpreadsheetDocument- Original(0), High(1), Medium(2), Low(3), cannot be- null.
- Returns:
- Int value of the saved pictures of SpreadsheetDocument- 0, 1, 2, 3
 
 - 
getMxlExtensionAlgorithmpublic static int getMxlExtensionAlgorithm(ExtensionAlgorithm extensionAlgorithm) Returns integer value of the extension algorithm ofSpreadsheetDocumentby its enum value.- Parameters:
- extensionAlgorithm-- ExtensionAlgorithmvalue of the text direction of- SpreadsheetDocument, either Replace(0) or Merge(1), cannot be- null.
- Returns:
- Int value of the extension algorithm of SpreadsheetDocument, either 0 or 1.
 
 - 
getExtensionAlgorithmpublic static ExtensionAlgorithm getExtensionAlgorithm(int val) ReturnsExtensionAlgorithmvalue of the extension algorithm by its integer value.- Parameters:
- val- Int value of the extension algorithm of- SpreadsheetDocument, either 0 or 1.
- Returns:
- ExtensionAlgorithmvalue of the extension algorithm of- SpreadsheetDocument, either Replace(0) or Merge(1), never- null.
 
 - 
getTextPlacementpublic static TextPlacement getTextPlacement(int val) Get text placement- Parameters:
- val-
- Returns:
 
 - 
getMxlTextPlacementpublic static int getMxlTextPlacement(TextPlacement placement) Get mxl text placement- Parameters:
- placement-
- Returns:
 
 - 
getDetailUsepublic static DetailUse getDetailUse(int val) Get detail use- Parameters:
- val-
- Returns:
 
 - 
getMxlDetailUsepublic static int getMxlDetailUse(DetailUse detailUse) Get mxl detail use- Parameters:
- detailUse-
- Returns:
 
 - 
getSizeChangeModepublic static SizeChangeMode getSizeChangeMode(int val) Get size change mode- Parameters:
- val-
- Returns:
 
 - 
getMxlSizeChangeModepublic static int getMxlSizeChangeMode(SizeChangeMode mode) Get mxl size change mode- Parameters:
- mode-
- Returns:
 
 - 
getGroupHeaderPlacementpublic static GroupHeaderPlacement getGroupHeaderPlacement(int val) Get groups header placement- Parameters:
- val-
- Returns:
 
 - 
getMxlGroupHeaderPlacementpublic static int getMxlGroupHeaderPlacement(GroupHeaderPlacement placement) Get mxl group placement- Parameters:
- placement-
- Returns:
 
 - 
getLineOffsetpublic static int getLineOffset(SpreadsheetLine line) Get line gap- Parameters:
- line-
- Returns:
 
 - 
getMxlLineClasspublic static UUID getMxlLineClass(SpreadsheetLine line) Get line class id- Parameters:
- line-
- Returns:
 
 - 
getLineWidthpublic static int getLineWidth(SpreadsheetLine line) Get line width- Parameters:
- line-
- Returns:
 
 - 
getMxlHorizontalAlignpublic static int getMxlHorizontalAlign(HorizontalAlignment align) Get mxl horizontal align- Parameters:
- align-
- Returns:
 
 - 
getMxlVerticalAlignpublic static int getMxlVerticalAlign(VerticalAlignment align) Get mxl vertical align- Parameters:
- align-
- Returns:
 
 - 
getMxlNamedItemTypepublic static int getMxlNamedItemType(NamedItem item) Get mxl named item type- Parameters:
- item-
- Returns:
 
 - 
getMxlNamedItemSubtypepublic static int getMxlNamedItemSubtype(NamedItem item) Get mxl named item subtype- Parameters:
- item-
- Returns:
 
 - 
getFillTypepublic static FillType getFillType(int val) Get fill type- Parameters:
- val-
- Returns:
 
 - 
getMxlFillTypepublic static int getMxlFillType(FillType fillType) Get mxl fill type- Parameters:
- fillType-
- Returns:
 
 - 
getDimensionAttributePlacementTypepublic static DimensionAttributePlacementType getDimensionAttributePlacementType(int index) Get dimension attribute placement type- Parameters:
- index-
- Returns:
 
 - 
getDimensionPlacementTypepublic static DimensionPlacementType getDimensionPlacementType(int index) Get dimension placement type- Parameters:
- index-
- Returns:
 
 - 
getStandardAppearancepublic static StandardAppearance getStandardAppearance(int index) Get standard appearance- Parameters:
- index-
- Returns:
 
 - 
getPivotTableLinesShowTypepublic static PivotTableLinesShowType getPivotTableLinesShowType(int index) Get pivot table lines show type- Parameters:
- index-
- Returns:
 
 
- 
 
-