summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/inc/swmodeltestbase.hxx4
-rwxr-xr-xsw/qa/extras/ooxmlimport/data/mce-wpg.docxbin0 -> 17404 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx9
3 files changed, 12 insertions, 1 deletions
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx
index 57d40c6cb101..0a5418ad84b7 100644
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
@@ -351,9 +351,11 @@ protected:
return xParagraph;
}
- uno::Reference<text::XTextRange> getParagraphOfText(int number, uno::Reference<text::XText> xText) const
+ uno::Reference<text::XTextRange> getParagraphOfText(int number, uno::Reference<text::XText> xText, OUString content = OUString()) const
{
uno::Reference<text::XTextRange> const xParagraph(getParagraphOrTable(number, xText), uno::UNO_QUERY_THROW);
+ if (!content.isEmpty())
+ CPPUNIT_ASSERT_EQUAL(content, xParagraph->getString());
return xParagraph;
}
diff --git a/sw/qa/extras/ooxmlimport/data/mce-wpg.docx b/sw/qa/extras/ooxmlimport/data/mce-wpg.docx
new file mode 100755
index 000000000000..bd0d84681317
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/mce-wpg.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 6d9837eaee47..bd7b1800cad0 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1574,6 +1574,15 @@ DECLARE_OOXMLIMPORT_TEST(textboxWpgOnly, "textbox-wpg-only.docx")
CPPUNIT_ASSERT_EQUAL(sal_Int32(100), getProperty<sal_Int32>(getRun(getParagraphOfText(1, xText), 1), "CharEscapementHeight"));
}
+DECLARE_OOXMLIMPORT_TEST(testMceWpg, "mce-wpg.docx")
+{
+ // Make sure that we read the primary branch, if wpg is requested as a feature.
+ uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = uno::Reference<text::XTextRange>(xGroup->getByIndex(0), uno::UNO_QUERY)->getText();
+ // This was VML1.
+ getParagraphOfText(1, xText, "DML1");
+}
+
DECLARE_OOXMLIMPORT_TEST(testFdo70457, "fdo70457.docx")
{
// The document contains a rotated bitmap