[Libreoffice-commits] .: sd/qa

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Aug 21 07:37:10 PDT 2012


 sd/qa/unit/data/pptx/fdo47434-all.pptx      |binary
 sd/qa/unit/data/pptx/xml/fdo47434_page0.xml |  139 ++++++++++++++++++++++++++++
 sd/qa/unit/regression-test.cxx              |   10 ++
 3 files changed, 149 insertions(+)

New commits:
commit affa362c8dcd8e9eada5dbf6967cd278565abf4e
Author: Korrawit Pruegsanusak <detective.conan.1412 at gmail.com>
Date:   Tue Aug 21 20:08:40 2012 +0530

    fdo#47434 testcase
    
    Change-Id: Ib69fa1fff94b7a3403a45fb948ff9e7b1ebc4f0f

diff --git a/sd/qa/unit/data/pptx/fdo47434-all.pptx b/sd/qa/unit/data/pptx/fdo47434-all.pptx
new file mode 100644
index 0000000..1ecb8a9
Binary files /dev/null and b/sd/qa/unit/data/pptx/fdo47434-all.pptx differ
diff --git a/sd/qa/unit/data/pptx/xml/fdo47434_page0.xml b/sd/qa/unit/data/pptx/xml/fdo47434_page0.xml
new file mode 100644
index 0000000..281441e
--- /dev/null
+++ b/sd/qa/unit/data/pptx/xml/fdo47434_page0.xml
@@ -0,0 +1,139 @@
+<?xml version="1.0"?>
+<XShapes>
+ <XShape positionX="5358" positionY="4366" sizeX="5555" sizeY="1" type="com.sun.star.drawing.CustomShape" name="Straight Arrow Connector 4" textAutoGrowHeight="false" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" textVerticalAdjust="TOP" textLeftDistance="250" textRightDistance="250" textUpperDistance="125" textLowerDistance="125" 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="NONE" fillColor="13625333" fillTransparence="0" fillTransparenceGradientName="">
+  <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+  <FillGradient style="LINEAR" startColor="8421504" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+  <FillHatch style="SINGLE" color="8421504" distance="20" angle="0"/>
+  <FillBitmap width="32" height="32"/>
+  <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+  <LineStart/>
+  <LineEnd>
+   <pointSequence>
+    <point positionX="225" positionY="0" polygonFlags="NORMAL"/>
+    <point positionX="450" positionY="409" polygonFlags="NORMAL"/>
+    <point positionX="382" positionY="450" polygonFlags="NORMAL"/>
+    <point positionX="225" positionY="162" polygonFlags="NORMAL"/>
+    <point positionX="67" positionY="450" polygonFlags="NORMAL"/>
+    <point positionX="0" positionY="409" polygonFlags="NORMAL"/>
+    <point positionX="225" positionY="0" polygonFlags="NORMAL"/>
+   </pointSequence>
+  </LineEnd>
+  <Transformation>
+   <Line1 column1="5556.000000" column2="0.000000" column3="5358.000000"/>
+   <Line2 column1="0.000000" column2="2.000000" column3="4366.000000"/>
+   <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+  </Transformation>
+  <CustomShapeGeometry>
+   <PropertyValue name="IsPostRotateAngle" handle="0" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="MirroredX" handle="0" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="MirroredY" handle="0" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="TextPreRotateAngle" handle="0" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="Type" handle="0" value="mso-spt32" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="AdjustmentValues" handle="0" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="ViewBox" handle="0" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="Path" handle="0" propertyState="DIRECT_VALUE"/>
+  </CustomShapeGeometry>
+ </XShape>
+ <XShape positionX="5356" positionY="5159" sizeX="5555" sizeY="1" type="com.sun.star.drawing.CustomShape" name="Straight Arrow Connector 5" textAutoGrowHeight="false" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" textVerticalAdjust="TOP" textLeftDistance="250" textRightDistance="250" textUpperDistance="125" textLowerDistance="125" 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="NONE" fillColor="13625333" fillTransparence="0" fillTransparenceGradientName="">
+  <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+  <FillGradient style="LINEAR" startColor="8421504" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+  <FillHatch style="SINGLE" color="8421504" distance="20" angle="0"/>
+  <FillBitmap width="32" height="32"/>
+  <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+  <LineStart/>
+  <LineEnd>
+   <pointSequence>
+    <point positionX="225" positionY="0" polygonFlags="NORMAL"/>
+    <point positionX="450" positionY="409" polygonFlags="NORMAL"/>
+    <point positionX="382" positionY="450" polygonFlags="NORMAL"/>
+    <point positionX="225" positionY="162" polygonFlags="NORMAL"/>
+    <point positionX="67" positionY="450" polygonFlags="NORMAL"/>
+    <point positionX="0" positionY="409" polygonFlags="NORMAL"/>
+    <point positionX="225" positionY="0" polygonFlags="NORMAL"/>
+   </pointSequence>
+  </LineEnd>
+  <Transformation>
+   <Line1 column1="5556.000000" column2="0.000000" column3="5356.000000"/>
+   <Line2 column1="0.000000" column2="2.000000" column3="5159.000000"/>
+   <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+  </Transformation>
+  <CustomShapeGeometry>
+   <PropertyValue name="IsPostRotateAngle" handle="0" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="MirroredX" handle="0" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="MirroredY" handle="0" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="TextPreRotateAngle" handle="0" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="Type" handle="0" value="mso-spt32" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="AdjustmentValues" handle="0" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="ViewBox" handle="0" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="Path" handle="0" propertyState="DIRECT_VALUE"/>
+  </CustomShapeGeometry>
+ </XShape>
+ <XShape positionX="14486" positionY="4366" sizeX="5555" sizeY="1" type="com.sun.star.drawing.CustomShape" name="Straight Arrow Connector 6" textAutoGrowHeight="false" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" textVerticalAdjust="TOP" textLeftDistance="250" textRightDistance="250" textUpperDistance="125" textLowerDistance="125" 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="NONE" fillColor="13625333" fillTransparence="0" fillTransparenceGradientName="">
+  <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+  <FillGradient style="LINEAR" startColor="8421504" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+  <FillHatch style="SINGLE" color="8421504" distance="20" angle="0"/>
+  <FillBitmap width="32" height="32"/>
+  <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+  <LineStart/>
+  <LineEnd>
+   <pointSequence>
+    <point positionX="225" positionY="0" polygonFlags="NORMAL"/>
+    <point positionX="450" positionY="409" polygonFlags="NORMAL"/>
+    <point positionX="382" positionY="450" polygonFlags="NORMAL"/>
+    <point positionX="225" positionY="162" polygonFlags="NORMAL"/>
+    <point positionX="67" positionY="450" polygonFlags="NORMAL"/>
+    <point positionX="0" positionY="409" polygonFlags="NORMAL"/>
+    <point positionX="225" positionY="0" polygonFlags="NORMAL"/>
+   </pointSequence>
+  </LineEnd>
+  <Transformation>
+   <Line1 column1="5556.000000" column2="0.000000" column3="14486.000000"/>
+   <Line2 column1="0.000000" column2="2.000000" column3="4366.000000"/>
+   <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+  </Transformation>
+  <CustomShapeGeometry>
+   <PropertyValue name="IsPostRotateAngle" handle="0" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="MirroredX" handle="0" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="MirroredY" handle="0" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="TextPreRotateAngle" handle="0" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="Type" handle="0" value="mso-spt32" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="AdjustmentValues" handle="0" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="ViewBox" handle="0" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="Path" handle="0" propertyState="DIRECT_VALUE"/>
+  </CustomShapeGeometry>
+ </XShape>
+ <XShape positionX="14484" positionY="5159" sizeX="5555" sizeY="1" type="com.sun.star.drawing.CustomShape" name="Straight Arrow Connector 8" textAutoGrowHeight="false" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" textVerticalAdjust="TOP" textLeftDistance="250" textRightDistance="250" textUpperDistance="125" textLowerDistance="125" 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="NONE" fillColor="13625333" fillTransparence="0" fillTransparenceGradientName="">
+  <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+  <FillGradient style="LINEAR" startColor="8421504" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+  <FillHatch style="SINGLE" color="8421504" distance="20" angle="0"/>
+  <FillBitmap width="32" height="32"/>
+  <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+  <LineStart/>
+  <LineEnd>
+   <pointSequence>
+    <point positionX="225" positionY="0" polygonFlags="NORMAL"/>
+    <point positionX="450" positionY="409" polygonFlags="NORMAL"/>
+    <point positionX="382" positionY="450" polygonFlags="NORMAL"/>
+    <point positionX="225" positionY="162" polygonFlags="NORMAL"/>
+    <point positionX="67" positionY="450" polygonFlags="NORMAL"/>
+    <point positionX="0" positionY="409" polygonFlags="NORMAL"/>
+    <point positionX="225" positionY="0" polygonFlags="NORMAL"/>
+   </pointSequence>
+  </LineEnd>
+  <Transformation>
+   <Line1 column1="5556.000000" column2="0.000000" column3="14484.000000"/>
+   <Line2 column1="0.000000" column2="2.000000" column3="5159.000000"/>
+   <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+  </Transformation>
+  <CustomShapeGeometry>
+   <PropertyValue name="IsPostRotateAngle" handle="0" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="MirroredX" handle="0" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="MirroredY" handle="0" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="TextPreRotateAngle" handle="0" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="Type" handle="0" value="mso-spt32" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="AdjustmentValues" handle="0" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="ViewBox" handle="0" propertyState="DIRECT_VALUE"/>
+   <PropertyValue name="Path" handle="0" propertyState="DIRECT_VALUE"/>
+  </CustomShapeGeometry>
+ </XShape>
+</XShapes>
diff --git a/sd/qa/unit/regression-test.cxx b/sd/qa/unit/regression-test.cxx
index 342d6a8..6d6488c 100644
--- a/sd/qa/unit/regression-test.cxx
+++ b/sd/qa/unit/regression-test.cxx
@@ -84,10 +84,12 @@ public:
 
     void test();
     void testN759180();
+    void testFdo47434();
 
     CPPUNIT_TEST_SUITE(SdFiltersTest);
     CPPUNIT_TEST(test);
     CPPUNIT_TEST(testN759180);
+    CPPUNIT_TEST(testFdo47434);
     CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -197,6 +199,14 @@ void SdFiltersTest::testN759180()
     }
 }
 
+void SdFiltersTest::testFdo47434()
+{
+    // The problem was the arrow that has cy < 180 and flipH = 0 is rendered incorrectly.
+    // Its height should be 1, not negative.
+    ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/fdo47434-all.pptx"));
+    testStuff(xDocShRef, rtl::OUStringToOString(getPathFromSrc("/sd/qa/unit/data/pptx/xml/fdo47434_page"), RTL_TEXTENCODING_UTF8));
+}
+
 void SdFiltersTest::testStuff(::sd::DrawDocShellRef xDocShRef, const rtl::OString& fileNameBase)
 {
     CPPUNIT_ASSERT_MESSAGE( "failed to load", xDocShRef.Is() );


More information about the Libreoffice-commits mailing list