summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-03-18 11:26:41 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-03-18 11:52:28 +0100
commit8c52b5dd1c6457131b2c2c6b85222400fce3f246 (patch)
treef0d79df3bcaf2d533fca43912f2388839423e486 /sw
parentd145f49ba8cdf4a9c2e6b28f0f4468a95fc3575b (diff)
oox: fix DOCX strict import of SmartArt
Change-Id: Ied8283e17ec4379f218dc60912e1c41ca28a8ac9
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlimport/data/strict-smartart.docxbin0 -> 18661 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx11
2 files changed, 9 insertions, 2 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/strict-smartart.docx b/sw/qa/extras/ooxmlimport/data/strict-smartart.docx
new file mode 100644
index 000000000000..bab7c16bcea1
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/strict-smartart.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 535ebf8665db..1492cd9aaa62 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -70,13 +70,13 @@ public:
virtual void preTest(const char* filename) SAL_OVERRIDE
{
- if (OString(filename) == "smartart.docx")
+ if (OString(filename) == "smartart.docx" || OString(filename) == "strict-smartart.docx")
SvtFilterOptions::Get().SetSmartArt2Shape(true);
}
virtual void postTest(const char* filename) SAL_OVERRIDE
{
- if (OString(filename) == "smartart.docx")
+ if (OString(filename) == "smartart.docx" || OString(filename) == "strict-smartart.docx")
SvtFilterOptions::Get().SetSmartArt2Shape(false);
}
};
@@ -1969,6 +1969,13 @@ DECLARE_OOXMLIMPORT_TEST(testStrictLockedcanvas, "strict-lockedcanvas.docx")
getShape(1);
}
+DECLARE_OOXMLIMPORT_TEST(testSmartartStrict, "strict-smartart.docx")
+{
+ uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY);
+ // This was 0, SmartArt was visually missing.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6), xGroup->getCount()); // 3 ellipses + 3 arrows
+}
+
DECLARE_OOXMLIMPORT_TEST(testI124106, "i124106.docx")
{
// This was 2.