summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/ooxmlimport/ooxmlimport.cxx')
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx25
1 files changed, 23 insertions, 2 deletions
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 44876b907c0b..c4bc13ab6fbf 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -73,13 +73,13 @@ public:
virtual void preTest(const char* filename) SAL_OVERRIDE
{
- if (OString(filename) == "smartart.docx" || OString(filename) == "strict-smartart.docx")
+ if (OString(filename) == "smartart.docx" || OString(filename) == "strict-smartart.docx" || OString(filename) == "fdo87488.docx")
SvtFilterOptions::Get().SetSmartArt2Shape(true);
}
virtual void postTest(const char* filename) SAL_OVERRIDE
{
- if (OString(filename) == "smartart.docx" || OString(filename) == "strict-smartart.docx")
+ if (OString(filename) == "smartart.docx" || OString(filename) == "strict-smartart.docx" || OString(filename) == "fdo87488.docx")
SvtFilterOptions::Get().SetSmartArt2Shape(false);
}
};
@@ -2408,6 +2408,27 @@ DECLARE_OOXMLIMPORT_TEST(testUnbalancedColumns, "unbalanced-columns.docx")
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xTextSections->getByIndex(2), "DontBalanceTextColumns"));
}
+DECLARE_OOXMLIMPORT_TEST(testFdo87488, "fdo87488.docx")
+{
+ // The shape on the right (index 0, CustomShape within a
+ // GroupShape) is rotated 90 degrees clockwise and contains text
+ // rotated 90 degrees anticlockwise. Must be read with SmartArt
+ // enabled in preTest above, otherwise it gets converted to a
+ // StarView MetaFile.
+ uno::Reference<container::XIndexAccess> group(getShape(1), uno::UNO_QUERY);
+ {
+ uno::Reference<text::XTextRange> text(group->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("text2"), text->getString());
+ }
+ {
+ uno::Reference<beans::XPropertySet> props(group->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(props->getPropertyValue("RotateAngle"),
+ uno::makeAny(270 * 100));
+ comphelper::SequenceAsHashMap geom(props->getPropertyValue("CustomShapeGeometry"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(90), geom["TextPreRotateAngle"].get<sal_Int32>());
+ }
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();