summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-06-16 14:01:04 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-06-16 14:08:01 +0200
commit711023ae993a8413f56d891ae276763e6a2018bb (patch)
treebc96d6fbf6c19edee91c8f958f88a10eb8263c06
parent67f141a1d8c247c173a922c5f969d21f61401740 (diff)
CppunitTest_sw_ooxmlsdrexport: port testTableFloatingMargins to textboxes
Change-Id: I62f0159bec97c6c7a2285509b0662125f46ed480
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
index 888373a1d99d..fdeb06195890 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
@@ -431,10 +431,9 @@ DECLARE_OOXMLEXPORT_TEST(testDMLGroupShapeParaSpacing, "dml-groupshape-paraspaci
DECLARE_OOXMLEXPORT_TEST(testTableFloatingMargins, "table-floating-margins.docx")
{
// In case the table had custom left cell margin, the horizontal position was still incorrect (too small, -199).
- 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);
- CPPUNIT_ASSERT_EQUAL(sal_Int32(-499), getProperty<sal_Int32>(xFrame, "HoriOrientPosition"));
+ uno::Reference<beans::XPropertySet> xFrame(getShape(1), uno::UNO_QUERY);
+ sal_Int32 nHoriOrientPosition = getProperty<sal_Int32>(xFrame, "HoriOrientPosition");
+ CPPUNIT_ASSERT(nHoriOrientPosition < sal_Int32(-495));
// These were 0 as well, due to lack of import.
CPPUNIT_ASSERT_EQUAL(sal_Int32(1000), getProperty<sal_Int32>(xFrame, "TopMargin"));
CPPUNIT_ASSERT_EQUAL(sal_Int32(2000), getProperty<sal_Int32>(xFrame, "BottomMargin"));