diff options
author | Andras Timar <andras.timar@collabora.com> | 2015-03-30 21:37:47 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-03-30 21:15:57 +0000 |
commit | af686aa8694903bde5952656cd69993c8c8393d7 (patch) | |
tree | 97f5dc08d8a766f5fdc15e7aac7cb9db73ae5bb7 /sd/qa | |
parent | 420acb533e60807cb64fd1898cabd27c4c8df063 (diff) |
bnc#902652 OOXML: fix import of insets when shape and/or shape text is rotated
5ac575ee3e109 did not get it right, the vert attribute (i.e. the
rotation of text) is relevant, not the rotation of the shape. In
that case both text and shape rotation were 270 degrees. I checked
that the bugdoc of bnc#773048 looked good after this.
Change-Id: I6e0401cd138a82040df82d7da1a47311db7771e4
Reviewed-on: https://gerrit.libreoffice.org/15076
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sd/qa')
-rw-r--r-- | sd/qa/unit/data/n902652.pptx | bin | 0 -> 39315 bytes | |||
-rw-r--r-- | sd/qa/unit/data/xml/n902652_0.xml | 309 | ||||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 1 |
3 files changed, 310 insertions, 0 deletions
diff --git a/sd/qa/unit/data/n902652.pptx b/sd/qa/unit/data/n902652.pptx Binary files differnew file mode 100644 index 000000000000..87266001bd37 --- /dev/null +++ b/sd/qa/unit/data/n902652.pptx diff --git a/sd/qa/unit/data/xml/n902652_0.xml b/sd/qa/unit/data/xml/n902652_0.xml new file mode 100644 index 000000000000..de8ed91092ba --- /dev/null +++ b/sd/qa/unit/data/xml/n902652_0.xml @@ -0,0 +1,309 @@ +<?xml version="1.0"?> +<XShapes> + <XShape positionX="899" positionY="9525" sizeX="9000" sizeY="4800" type="com.sun.star.drawing.CustomShape" name="Rounded Rectangle 3" text=" LibreOffice" fontHeight="18.000000" fontColor="ffffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" textVerticalAdjust="TOP" textLeftDistance="3000" textRightDistance="500" textUpperDistance="300" textLowerDistance="3000" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="9bbb59" fillTransparence="0" fillTransparenceGradientName=""> + <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> + <FillGradient style="LINEAR" startColor="3465a4" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> + <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/> + <FillBitmap width="32" height="32"/> + <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/> + <LineStart/> + <LineEnd/> + <Transformation> + <Line1 column1="0.000000" column2="4801.000000" column3="899.000000"/> + <Line2 column1="-9001.000000" column2="0.000000" column3="9525.000000"/> + <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> + </Transformation> + <CustomShapeGeometry> + <PropertyValue name="AdjustmentValues"> + <AdjustmentValues> + <EnhancedCustomShapeAdjustmentValue value="16667" propertyState="DIRECT_VALUE"/> + </AdjustmentValues> + </PropertyValue> + <PropertyValue name="Equations" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="Handles" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="IsPostRotateAngle" value="true" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="MirroredX" value="false" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="MirroredY" value="false" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="Path"> + <Path> + <PropertyValue name="Coordinates"> + <Coordinates> + <EnhancedCustomShapeParameterPair> + <First value="0" type="0"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="12" type="1"/> + <Second value="13" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="3" type="1"/> + <Second value="0" type="0"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="14" type="1"/> + <Second value="15" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="11" type="1"/> + <Second value="4" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="16" type="1"/> + <Second value="17" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="10" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="18" type="1"/> + <Second value="19" type="1"/> + </EnhancedCustomShapeParameterPair> + </Coordinates> + </PropertyValue> + <PropertyValue name="Segments"> + <Segments> + <EnhancedCustomShapeSegment command="1" count="1"/> + <EnhancedCustomShapeSegment command="17" count="1"/> + <EnhancedCustomShapeSegment command="2" count="1"/> + <EnhancedCustomShapeSegment command="17" count="1"/> + <EnhancedCustomShapeSegment command="2" count="1"/> + <EnhancedCustomShapeSegment command="17" count="1"/> + <EnhancedCustomShapeSegment command="2" count="1"/> + <EnhancedCustomShapeSegment command="17" count="1"/> + <EnhancedCustomShapeSegment command="4" count="0"/> + <EnhancedCustomShapeSegment command="5" count="0"/> + </Segments> + </PropertyValue> + <PropertyValue name="TextFrames" handle="0" propertyState="DIRECT_VALUE"/> + </Path> + </PropertyValue> + <PropertyValue name="TextPreRotateAngle" value="0" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="Type" value="ooxml-roundRect" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="ViewBox"> + <ViewBox x="0" y="0" width="0" height="0"/> + </PropertyValue> + </CustomShapeGeometry> + </XShape> + <XShape positionX="15800" positionY="7848" sizeX="9000" sizeY="4800" type="com.sun.star.drawing.CustomShape" name="Rounded Rectangle 4" text=" LibreOffice" fontHeight="18.000000" fontColor="ffffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" textVerticalAdjust="TOP" textLeftDistance="1000" textRightDistance="0" textUpperDistance="3000" textLowerDistance="300" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="9bbb59" fillTransparence="0" fillTransparenceGradientName=""> + <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> + <FillGradient style="LINEAR" startColor="3465a4" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> + <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/> + <FillBitmap width="32" height="32"/> + <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/> + <LineStart/> + <LineEnd/> + <Transformation> + <Line1 column1="-9001.000000" column2="-0.000000" column3="15800.000000"/> + <Line2 column1="0.000000" column2="-4801.000000" column3="7848.000000"/> + <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> + </Transformation> + <CustomShapeGeometry> + <PropertyValue name="AdjustmentValues"> + <AdjustmentValues> + <EnhancedCustomShapeAdjustmentValue value="16667" propertyState="DIRECT_VALUE"/> + </AdjustmentValues> + </PropertyValue> + <PropertyValue name="Equations" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="Handles" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="IsPostRotateAngle" value="true" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="MirroredX" value="false" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="MirroredY" value="false" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="Path"> + <Path> + <PropertyValue name="Coordinates"> + <Coordinates> + <EnhancedCustomShapeParameterPair> + <First value="0" type="0"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="12" type="1"/> + <Second value="13" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="3" type="1"/> + <Second value="0" type="0"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="14" type="1"/> + <Second value="15" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="11" type="1"/> + <Second value="4" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="16" type="1"/> + <Second value="17" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="10" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="18" type="1"/> + <Second value="19" type="1"/> + </EnhancedCustomShapeParameterPair> + </Coordinates> + </PropertyValue> + <PropertyValue name="Segments"> + <Segments> + <EnhancedCustomShapeSegment command="1" count="1"/> + <EnhancedCustomShapeSegment command="17" count="1"/> + <EnhancedCustomShapeSegment command="2" count="1"/> + <EnhancedCustomShapeSegment command="17" count="1"/> + <EnhancedCustomShapeSegment command="2" count="1"/> + <EnhancedCustomShapeSegment command="17" count="1"/> + <EnhancedCustomShapeSegment command="2" count="1"/> + <EnhancedCustomShapeSegment command="17" count="1"/> + <EnhancedCustomShapeSegment command="4" count="0"/> + <EnhancedCustomShapeSegment command="5" count="0"/> + </Segments> + </PropertyValue> + <PropertyValue name="TextFrames" handle="0" propertyState="DIRECT_VALUE"/> + </Path> + </PropertyValue> + <PropertyValue name="TextPreRotateAngle" value="-90" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="Type" value="ooxml-roundRect" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="ViewBox"> + <ViewBox x="0" y="0" width="0" height="0"/> + </PropertyValue> + </CustomShapeGeometry> + </XShape> + <XShape positionX="16224" positionY="14365" sizeX="9000" sizeY="4800" type="com.sun.star.drawing.CustomShape" name="Rounded Rectangle 5" text=" LibreOffice" fontHeight="18.000000" fontColor="ffffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="1000" textUpperDistance="900" textLowerDistance="3000" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="9bbb59" fillTransparence="0" fillTransparenceGradientName=""> + <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> + <FillGradient style="LINEAR" startColor="3465a4" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> + <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/> + <FillBitmap width="32" height="32"/> + <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/> + <LineStart/> + <LineEnd/> + <Transformation> + <Line1 column1="-9001.000000" column2="-0.000000" column3="16224.000000"/> + <Line2 column1="0.000000" column2="-4801.000000" column3="14365.000000"/> + <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> + </Transformation> + <CustomShapeGeometry> + <PropertyValue name="AdjustmentValues"> + <AdjustmentValues> + <EnhancedCustomShapeAdjustmentValue value="16667" propertyState="DIRECT_VALUE"/> + </AdjustmentValues> + </PropertyValue> + <PropertyValue name="Equations" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="Handles" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="IsPostRotateAngle" value="true" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="MirroredX" value="false" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="MirroredY" value="false" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="Path"> + <Path> + <PropertyValue name="Coordinates"> + <Coordinates> + <EnhancedCustomShapeParameterPair> + <First value="0" type="0"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="12" type="1"/> + <Second value="13" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="3" type="1"/> + <Second value="0" type="0"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="14" type="1"/> + <Second value="15" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="11" type="1"/> + <Second value="4" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="16" type="1"/> + <Second value="17" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="10" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="18" type="1"/> + <Second value="19" type="1"/> + </EnhancedCustomShapeParameterPair> + </Coordinates> + </PropertyValue> + <PropertyValue name="Segments"> + <Segments> + <EnhancedCustomShapeSegment command="1" count="1"/> + <EnhancedCustomShapeSegment command="17" count="1"/> + <EnhancedCustomShapeSegment command="2" count="1"/> + <EnhancedCustomShapeSegment command="17" count="1"/> + <EnhancedCustomShapeSegment command="2" count="1"/> + <EnhancedCustomShapeSegment command="17" count="1"/> + <EnhancedCustomShapeSegment command="2" count="1"/> + <EnhancedCustomShapeSegment command="17" count="1"/> + <EnhancedCustomShapeSegment command="4" count="0"/> + <EnhancedCustomShapeSegment command="5" count="0"/> + </Segments> + </PropertyValue> + <PropertyValue name="TextFrames" handle="0" propertyState="DIRECT_VALUE"/> + </Path> + </PropertyValue> + <PropertyValue name="TextPreRotateAngle" value="-270" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="Type" value="ooxml-roundRect" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="ViewBox"> + <ViewBox x="0" y="0" width="0" height="0"/> + </PropertyValue> + </CustomShapeGeometry> + </XShape> +</XShapes> diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index cdfdd30da9a3..fb8264ea6e5c 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -179,6 +179,7 @@ void SdImportTest::testDocumentLayout() { "n762695.pptx", "xml/n762695_", PPTX, -1 }, { "n593612.pptx", "xml/n593612_", PPTX, -1 }, { "fdo71434.pptx", "xml/fdo71434_", PPTX, -1 }, + { "n902652.pptx", "xml/n902652_", PPTX, -1 }, // { "pptx/n828390.pptx", "pptx/xml/n828390_", PPTX, PPTX }, // Example }; |