diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 900c8659d959..27752df4a0e8 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 xTextFramesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY); - uno::Reference xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY); - // This was 3295. - CPPUNIT_ASSERT_EQUAL(sal_Int32(5964), getProperty(xFrame, "HoriOrientPosition")); - // This was 4611. - CPPUNIT_ASSERT_EQUAL(sal_Int32(8133), getProperty(xFrame, "VertOrientPosition")); + if (xIndexAccess->getCount()) + { + // TODO TextBox: remove this when TextBox is enabled by default + uno::Reference xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY); + // This was 3295. + CPPUNIT_ASSERT_EQUAL(sal_Int32(5964), getProperty(xFrame, "HoriOrientPosition")); + // This was 4611. + CPPUNIT_ASSERT_EQUAL(sal_Int32(8133), getProperty(xFrame, "VertOrientPosition")); + } + else + { + uno::Reference xShape(getShape(1), uno::UNO_QUERY); + // This was 3295. + CPPUNIT_ASSERT_EQUAL(sal_Int32(5964), getProperty(xShape, "HoriOrientPosition")); + // This was 4611. + CPPUNIT_ASSERT_EQUAL(sal_Int32(8133), getProperty(xShape, "VertOrientPosition")); + } } DECLARE_OOXMLEXPORT_TEST(testAbi11739, "abi11739.docx")