Kaydet (Commit) 610544ed authored tarafından Michael Stahl's avatar Michael Stahl

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
üst e3061a19
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment