Package org.apache.poi.ooxml.util
Class POIXMLUnits
- java.lang.Object
-
- org.apache.poi.ooxml.util.POIXMLUnits
-
public class POIXMLUnits extends Object
-
-
Constructor Summary
Constructors Constructor Description POIXMLUnits()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longparseLength(org.openxmlformats.schemas.drawingml.x2006.main.STCoordinate coordUnion)The standard states that ST_Coordinate is read and written as either a length followed by a unit, or EMUs with no unit present.static longparseLength(org.openxmlformats.schemas.drawingml.x2006.main.STCoordinate32 coordUnion)The standard states that ST_Coordinate32 is read and written as either a length followed by a unit, or EMUs with no unit present.static longparseLength(org.openxmlformats.schemas.drawingml.x2006.main.STTextPoint coordUnion)The standard states that ST_TextPoint is read and written as a length followed by a unit or as hundredths of a point with no unit present.static longparseLength(org.openxmlformats.schemas.officeDocument.x2006.sharedTypes.STTwipsMeasure coordUnion)If no unit is specified, a twips-measure is a twentieth of a pointstatic longparseLength(org.openxmlformats.schemas.wordprocessingml.x2006.main.STHpsMeasure coordUnion)If no unit is specified, a hps-measure is a half of a pointstatic longparseLength(org.openxmlformats.schemas.wordprocessingml.x2006.main.STMeasurementOrPercent coordUnion)If no unit is specified, DXA (twentieth of a point) is assumedstatic longparseLength(org.openxmlformats.schemas.wordprocessingml.x2006.main.STSignedHpsMeasure coordUnion)If no unit is specified, a hps-measure is a half of a pointstatic longparseLength(org.openxmlformats.schemas.wordprocessingml.x2006.main.STSignedTwipsMeasure coordUnion)If no unit is specified, a twips-measure is a twentieth of a pointstatic booleanparseOnOff(org.openxmlformats.schemas.officeDocument.x2006.sharedTypes.STOnOff onOff)static booleanparseOnOff(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTOnOff onOff)static intparsePercent(org.openxmlformats.schemas.drawingml.x2006.chart.STDepthPercent pctUnion)static intparsePercent(org.openxmlformats.schemas.drawingml.x2006.chart.STGapAmount pctUnion)static intparsePercent(org.openxmlformats.schemas.drawingml.x2006.chart.STHoleSize pctUnion)static intparsePercent(org.openxmlformats.schemas.drawingml.x2006.chart.STHPercent pctUnion)static intparsePercent(org.openxmlformats.schemas.drawingml.x2006.chart.STOverlap pctUnion)static intparsePercent(org.openxmlformats.schemas.drawingml.x2006.main.STPercentage pctUnion)Office will read percentages formatted with a trailing percent sign or formatted as 1000th of a percent without a trailing percent signstatic intparsePercent(org.openxmlformats.schemas.drawingml.x2006.main.STPositiveFixedPercentage pctUnion)Office will read percentages formatted with a trailing percent sign or formatted as 1000th of a percent without a trailing percent signstatic intparsePercent(org.openxmlformats.schemas.drawingml.x2006.main.STPositivePercentage pctUnion)Office will read percentages formatted with a trailing percent sign or formatted as 1000th of a percent without a trailing percent signstatic intparsePercent(org.openxmlformats.schemas.drawingml.x2006.main.STTextBulletSizePercent pctUnion)Specifies the percentage of the text size that this bullet should be.static intparsePercent(org.openxmlformats.schemas.drawingml.x2006.main.STTextFontScalePercentOrPercentString pctUnion)Office will read percentages formatted with a trailing percent sign or formatted as 1000th of a percent without a trailing percent signstatic intparsePercent(org.openxmlformats.schemas.drawingml.x2006.main.STTextSpacingPercentOrPercentString pctUnion)Office will read percentages formatted with a trailing percent sign or formatted as 1000th of a percent without a trailing percent signstatic intparsePercent(org.openxmlformats.schemas.wordprocessingml.x2006.main.STDecimalNumberOrPercent pctUnion)This type seems to be interpreted as percent value when the trailing percent sign is missing.static intparsePercent(org.openxmlformats.schemas.wordprocessingml.x2006.main.STTextScale pctUnion)This type seems to be interpreted as percent value when the trailing percent sign is missing.
-
-
-
Method Detail
-
parsePercent
public static int parsePercent(org.openxmlformats.schemas.drawingml.x2006.main.STPositivePercentage pctUnion)
Office will read percentages formatted with a trailing percent sign or formatted as 1000th of a percent without a trailing percent sign- Returns:
- the percent scaled by 1000, so 100% = 100000
-
parsePercent
public static int parsePercent(org.openxmlformats.schemas.drawingml.x2006.main.STPositiveFixedPercentage pctUnion)
Office will read percentages formatted with a trailing percent sign or formatted as 1000th of a percent without a trailing percent sign- Returns:
- the percent scaled by 1000, so 100% = 100000
-
parsePercent
public static int parsePercent(org.openxmlformats.schemas.drawingml.x2006.main.STPercentage pctUnion)
Office will read percentages formatted with a trailing percent sign or formatted as 1000th of a percent without a trailing percent sign- Returns:
- the percent scaled by 1000, so 100% = 100000
-
parsePercent
public static int parsePercent(org.openxmlformats.schemas.drawingml.x2006.main.STTextBulletSizePercent pctUnion)
Specifies the percentage of the text size that this bullet should be. It is specified here in terms of 100% being equal to 100000 and 1% being specified in increments of 1000. This attribute should not be lower than 25%, or 25000, and not be higher than 400%, or 400000.- Returns:
- the percent scaled by 1000, so 100% = 100000
-
parsePercent
public static int parsePercent(org.openxmlformats.schemas.drawingml.x2006.main.STTextSpacingPercentOrPercentString pctUnion)
Office will read percentages formatted with a trailing percent sign or formatted as 1000th of a percent without a trailing percent sign- Returns:
- the percent scaled by 1000, so 100% = 100000
-
parsePercent
public static int parsePercent(org.openxmlformats.schemas.drawingml.x2006.main.STTextFontScalePercentOrPercentString pctUnion)
Office will read percentages formatted with a trailing percent sign or formatted as 1000th of a percent without a trailing percent sign- Returns:
- the percent scaled by 1000, so 100% = 100000
-
parsePercent
public static int parsePercent(org.openxmlformats.schemas.wordprocessingml.x2006.main.STDecimalNumberOrPercent pctUnion)
This type seems to be interpreted as percent value when the trailing percent sign is missing.sample snippet from settings.xml
<w:zoom w:percent="50" />- Returns:
- the percent scaled by 1000, so 100% = 100000
-
parsePercent
public static int parsePercent(org.openxmlformats.schemas.wordprocessingml.x2006.main.STTextScale pctUnion)
This type seems to be interpreted as percent value when the trailing percent sign is missing.sample snippet from settings.xml
<w:textscale w:w="50" />- Returns:
- the percent scaled by 1000, so 100% = 100000
-
parsePercent
public static int parsePercent(org.openxmlformats.schemas.drawingml.x2006.chart.STGapAmount pctUnion)
-
parsePercent
public static int parsePercent(org.openxmlformats.schemas.drawingml.x2006.chart.STOverlap pctUnion)
-
parsePercent
public static int parsePercent(org.openxmlformats.schemas.drawingml.x2006.chart.STDepthPercent pctUnion)
-
parsePercent
public static int parsePercent(org.openxmlformats.schemas.drawingml.x2006.chart.STHPercent pctUnion)
-
parsePercent
public static int parsePercent(org.openxmlformats.schemas.drawingml.x2006.chart.STHoleSize pctUnion)
-
parseLength
public static long parseLength(org.openxmlformats.schemas.drawingml.x2006.main.STCoordinate32 coordUnion)
The standard states that ST_Coordinate32 is read and written as either a length followed by a unit, or EMUs with no unit present.- Returns:
- length in EMUs
-
parseLength
public static long parseLength(org.openxmlformats.schemas.drawingml.x2006.main.STCoordinate coordUnion)
The standard states that ST_Coordinate is read and written as either a length followed by a unit, or EMUs with no unit present.- Returns:
- length in EMUs
-
parseLength
public static long parseLength(org.openxmlformats.schemas.drawingml.x2006.main.STTextPoint coordUnion)
The standard states that ST_TextPoint is read and written as a length followed by a unit or as hundredths of a point with no unit present.- Returns:
- length in EMUs
-
parseLength
public static long parseLength(org.openxmlformats.schemas.officeDocument.x2006.sharedTypes.STTwipsMeasure coordUnion)
If no unit is specified, a twips-measure is a twentieth of a point- Returns:
- length in EMUs
-
parseLength
public static long parseLength(org.openxmlformats.schemas.wordprocessingml.x2006.main.STSignedTwipsMeasure coordUnion)
If no unit is specified, a twips-measure is a twentieth of a point- Returns:
- length in EMUs
-
parseLength
public static long parseLength(org.openxmlformats.schemas.wordprocessingml.x2006.main.STHpsMeasure coordUnion)
If no unit is specified, a hps-measure is a half of a point- Returns:
- length in EMUs
-
parseLength
public static long parseLength(org.openxmlformats.schemas.wordprocessingml.x2006.main.STSignedHpsMeasure coordUnion)
If no unit is specified, a hps-measure is a half of a point- Returns:
- length in EMUs
-
parseLength
public static long parseLength(org.openxmlformats.schemas.wordprocessingml.x2006.main.STMeasurementOrPercent coordUnion)
If no unit is specified, DXA (twentieth of a point) is assumed- Returns:
- length in EMUs
-
parseOnOff
public static boolean parseOnOff(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTOnOff onOff)
-
parseOnOff
public static boolean parseOnOff(org.openxmlformats.schemas.officeDocument.x2006.sharedTypes.STOnOff onOff)
-
-