summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-10-01 18:25:47 +0200
committerMichael Stahl <mstahl@redhat.com>2014-10-01 18:28:24 +0200
commit610544eda1f1add0ba9b184fe7c2bed56f050fc1 (patch)
treed6d5addcdc4fee903dcd3b1a34fad70d1968c231 /chart2
parente3061a1976a8ebf8e021939f568e52ee736d66d7 (diff)
chart2: fix the testDataLabelBordersDOCX on Mac
This test failed on Mac because it depends on the layout being finished, since for SwXTextEmbeddedObjects the corresponding SwVirtFlyDrawObj are inserted in the draw page not on import, but in layout. Change-Id: I731b9b92838252ff50135f97343357992bc1933f
Diffstat (limited to 'chart2')
-rw-r--r--chart2/qa/extras/charttest.hxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/chart2/qa/extras/charttest.hxx b/chart2/qa/extras/charttest.hxx
index a76a76c1153c..ad2cd5579c77 100644
--- a/chart2/qa/extras/charttest.hxx
+++ b/chart2/qa/extras/charttest.hxx
@@ -49,6 +49,7 @@
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
#include <com/sun/star/chart/XChartDocument.hpp>
+#include <com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
#include <com/sun/star/util/NumberFormat.hpp>
@@ -458,13 +459,14 @@ uno::Reference<chart::XChartDocument> ChartTest::getChartDocFromDrawImpress(
uno::Reference<chart::XChartDocument> ChartTest::getChartDocFromWriter( sal_Int32 nShape )
{
- Reference<drawing::XDrawPageSupplier> xPageSupp(mxComponent, uno::UNO_QUERY);
- CPPUNIT_ASSERT(xPageSupp.is());
-
- Reference<drawing::XDrawPage> xPage = xPageSupp->getDrawPage();
- CPPUNIT_ASSERT(xPage.is());
-
- Reference<beans::XPropertySet> xShapeProps(xPage->getByIndex(nShape), uno::UNO_QUERY);
+ // DO NOT use XDrawPageSupplier since SwVirtFlyDrawObj are not created
+ // during import, only in layout!
+ Reference<text::XTextEmbeddedObjectsSupplier> xEOS(mxComponent, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xEOS.is());
+ Reference<container::XIndexAccess> xEmbeddeds(xEOS->getEmbeddedObjects(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xEmbeddeds.is());
+
+ Reference<beans::XPropertySet> xShapeProps(xEmbeddeds->getByIndex(nShape), uno::UNO_QUERY);
CPPUNIT_ASSERT(xShapeProps.is());
Reference<frame::XModel> xDocModel;