summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2017-04-10 16:47:58 +0300
committerJustin Luth <justin_luth@sil.org>2017-04-11 06:39:39 +0200
commit56fd725b9d5ac2a990715d30cd477b01c34781db (patch)
treeb9d614a117962f205bd192ee068668cc210c2755 /sw
parent98ebfb6a8638a76e96ffe7ada2485b3d13ed1fb9 (diff)
restore missing ooxmlimport unit test: n757890.docx
This test was lost while round-trippable tests were moved into ooxmlexport8. commit 086550313260d9fa45b91dc705b21bb9b51ce0b8 This test doesn't round-trip because it checks for a frame, and frames are turned into something else during export. Change-Id: If0e9776a83b0ee98c56039b4cd43b674198779e7 Reviewed-on: https://gerrit.libreoffice.org/36388 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index f8c5ec9feecf..027c00a8b1cf 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -283,6 +283,26 @@ DECLARE_OOXMLIMPORT_TEST(testN751017, "n751017.docx")
CPPUNIT_ASSERT(bFoundGet);
}
+DECLARE_OOXMLIMPORT_TEST(testN757890, "n757890.docx")
+{
+ // The w:pStyle token affected the text outside the textbox.
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(), uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
+ uno::Reference<beans::XPropertySet> xPara(xParaEnum->nextElement(), uno::UNO_QUERY);
+ OUString aValue;
+ xPara->getPropertyValue("ParaStyleName") >>= aValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"), aValue);
+
+ // This wan't centered
+ uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ sal_Int16 nValue;
+ xFrame->getPropertyValue("HoriOrient") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::CENTER, nValue);
+}
+
DECLARE_OOXMLIMPORT_TEST(testN751077, "n751077.docx")
{
/*