[Libreoffice-commits] core.git: sw/qa
Miklos Vajna
vmiklos at collabora.co.uk
Thu Jun 12 01:07:40 PDT 2014
sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
New commits:
commit 25526046e7edad50924e93dffe7dbc9f9c99a5fd
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Jun 12 09:55:22 2014 +0200
CppunitTest_sw_ooxmlexport: port testFloatingTablePosition to textboxes
Change-Id: I200520a28335fb62cecb91175fc6cefc2cfb51ec
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 900c865..27752df 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -2661,11 +2661,23 @@ DECLARE_OOXMLEXPORT_TEST(testFloatingTablePosition, "floating-table-position.doc
// Position of text frame was wrong, because some conversion was missing.
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);
- // This was 3295.
- CPPUNIT_ASSERT_EQUAL(sal_Int32(5964), getProperty<sal_Int32>(xFrame, "HoriOrientPosition"));
- // This was 4611.
- CPPUNIT_ASSERT_EQUAL(sal_Int32(8133), getProperty<sal_Int32>(xFrame, "VertOrientPosition"));
+ if (xIndexAccess->getCount())
+ {
+ // TODO TextBox: remove this when TextBox is enabled by default
+ uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ // This was 3295.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5964), getProperty<sal_Int32>(xFrame, "HoriOrientPosition"));
+ // This was 4611.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(8133), getProperty<sal_Int32>(xFrame, "VertOrientPosition"));
+ }
+ else
+ {
+ uno::Reference<beans::XPropertySet> xShape(getShape(1), uno::UNO_QUERY);
+ // This was 3295.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5964), getProperty<sal_Int32>(xShape, "HoriOrientPosition"));
+ // This was 4611.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(8133), getProperty<sal_Int32>(xShape, "VertOrientPosition"));
+ }
}
DECLARE_OOXMLEXPORT_TEST(testAbi11739, "abi11739.docx")
More information about the Libreoffice-commits
mailing list