diff options
-rw-r--r-- | oox/source/drawingml/customshapeproperties.cxx | 2 | ||||
-rwxr-xr-x | sd/qa/unit/data/pptx/tdf128684.pptx | bin | 0 -> 58086 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 30 |
3 files changed, 32 insertions, 0 deletions
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 1b1f6513ab22..3f6d58b07e9f 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -234,6 +234,8 @@ void CustomShapeProperties::pushToPropSet( aPropertyMap.setProperty( PROP_Type, OUString( "ooxml-non-primitive" )); aPropertyMap.setProperty( PROP_MirroredX, mbMirroredX ); aPropertyMap.setProperty( PROP_MirroredY, mbMirroredY ); + if( mnTextRotateAngle ) + aPropertyMap.setProperty( PROP_TextPreRotateAngle, mnTextRotateAngle ); // Note 1: If Equations are defined - they are processed using internal div by 360 coordinates // while if they are not, standard ooxml coordinates are used. // This size specifically affects scaling. diff --git a/sd/qa/unit/data/pptx/tdf128684.pptx b/sd/qa/unit/data/pptx/tdf128684.pptx Binary files differnew file mode 100755 index 000000000000..80a5f30568d3 --- /dev/null +++ b/sd/qa/unit/data/pptx/tdf128684.pptx diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 0de7cf85963e..b38d5e51d0c9 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -186,6 +186,7 @@ public: void testTdf77747(); void testTdf116266(); void testTdf126324(); + void testTdf128684(); bool checkPattern(sd::DrawDocShellRef const & rDocRef, int nShapeNumber, std::vector<sal_uInt8>& rExpected); void testPatternImport(); @@ -282,6 +283,7 @@ public: CPPUNIT_TEST(testTdf120028); CPPUNIT_TEST(testTdf120028b); CPPUNIT_TEST(testCropToShape); + CPPUNIT_TEST(testTdf128684); CPPUNIT_TEST_SUITE_END(); }; @@ -2692,6 +2694,34 @@ void SdImportTest::testCropToShape() CPPUNIT_ASSERT_EQUAL(css::drawing::BitmapMode_STRETCH, bitmapmode); } + +void SdImportTest::testTdf128684() +{ + sd::DrawDocShellRef xDocShRef + = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf128684.pptx"), PPTX); + uno::Reference<drawing::XDrawPagesSupplier> xDoc(xDocShRef->GetDoc()->getUnoModel(), + uno::UNO_QUERY); + CPPUNIT_ASSERT(xDoc.is()); + uno::Reference<drawing::XDrawPage> xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xPage.is()); + uno::Reference<beans::XPropertySet> xShape(getShape(0, xPage)); + CPPUNIT_ASSERT(xShape.is()); + uno::Any aAny = xShape->getPropertyValue("CustomShapeGeometry"); + CPPUNIT_ASSERT(aAny.hasValue()); + uno::Sequence<beans::PropertyValue> aProps; + CPPUNIT_ASSERT(aAny >>= aProps); + sal_Int32 nRotateAngle = 0; + for(int i=0;i<aProps.getLength();++i) + { + const beans::PropertyValue& rProp = aProps[i]; + if(rProp.Name == "TextPreRotateAngle") + { + rProp.Value >>= nRotateAngle; + } + } + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(-90), nRotateAngle); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest); CPPUNIT_PLUGIN_IMPLEMENT(); |