summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2015-03-30 21:37:47 +0200
committerAndras Timar <andras.timar@collabora.com>2015-04-04 10:49:28 +0200
commit93eedfb73f239d8f360a8bcd89a6a706ceddd036 (patch)
tree9945b0d60d51353737c235b63971a4930684565c /sd
parent797984df3c857219a2568e1ecca1201533c21131 (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. Reviewed-on: https://gerrit.libreoffice.org/15076 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit af686aa8694903bde5952656cd69993c8c8393d7) Conflicts: sd/qa/unit/import-tests.cxx Change-Id: I6e0401cd138a82040df82d7da1a47311db7771e4 Reviewed-on: https://gerrit.libreoffice.org/15085 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/n902652.pptxbin0 -> 39315 bytes
-rw-r--r--sd/qa/unit/data/xml/n902652_0.xml309
-rw-r--r--sd/qa/unit/import-tests.cxx1
3 files changed, 310 insertions, 0 deletions
diff --git a/sd/qa/unit/data/n902652.pptx b/sd/qa/unit/data/n902652.pptx
new file mode 100644
index 000000000000..87266001bd37
--- /dev/null
+++ b/sd/qa/unit/data/n902652.pptx
Binary files differ
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 4ff2da3e014d..c5fc418d09cf 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -191,6 +191,7 @@ void SdFiltersTest::testDocumentLayout()
{ "n762695.pptx", "xml/n762695_", -1 },
{ "n593612.pptx", "xml/n593612_", -1 },
{ "fdo71434.pptx", "xml/fdo71434_", -1 },
+ { "n902652.pptx", "xml/n902652_", -1 },
// { "pptx/n828390.pptx", "pptx/xml/n828390_", PPTX }, // Example
};