[Libreoffice-commits] core.git: sw/qa

Miklos Vajna vmiklos at collabora.co.uk
Thu Jun 5 09:23:45 PDT 2014


 sw/qa/extras/ooxmlimport/ooxmlimport.cxx |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 60272bb37d52b02f4b424d1f9e6adbb935fefc75
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Jun 5 17:32:42 2014 +0200

    CppunitTest_sw_ooxmlimport: remaining textbox porting
    
    These are the remaining changes: with these, if we import "drawingML
    shape with text in DOCX" as "shape with textbox", no testcase in this
    suite fails.
    
    Change-Id: Ic39cc204e3cfb662f14db1810f7138df0829eb27

diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 0d7b6b7..c7995f0 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1635,15 +1635,13 @@ DECLARE_OOXMLIMPORT_TEST(lineRotation, "line-rotation.docx")
 
 DECLARE_OOXMLIMPORT_TEST(textboxWpsOnly, "textbox-wps-only.docx")
 {
-    uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
-    uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
-    uno::Reference<text::XTextRange> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+    uno::Reference<text::XTextRange> xFrame(getShape(1), uno::UNO_QUERY);
     CPPUNIT_ASSERT_EQUAL(OUString("Hello world!"), xFrame->getString());
     // Position wasn't horizontally centered.
     CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::CENTER, getProperty<sal_Int16>(xFrame, "HoriOrient"));
 
     // Position was the default (hori center, vert top) for the textbox.
-    xFrame.set(xIndexAccess->getByIndex(1), uno::UNO_QUERY);
+    xFrame.set(getShape(2), uno::UNO_QUERY);
     CPPUNIT_ASSERT_EQUAL(sal_Int32(2173), getProperty<sal_Int32>(xFrame, "HoriOrientPosition"));
     CPPUNIT_ASSERT_EQUAL(sal_Int32(2805), getProperty<sal_Int32>(xFrame, "VertOrientPosition"));
 }


More information about the Libreoffice-commits mailing list