From adc042f95d3dbd65b778260025d59283146916e5 Mon Sep 17 00:00:00 2001 From: Tünde Tóth Date: Tue, 13 Sep 2022 10:29:03 +0200 Subject: tdf#124333 PPTX import: fix Z-order of embedded OLE objects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Choose mc:Choice in a:graphicData element if the selected p:oleObj element has a shape id to avoid of shape duplication which created also bad layout/overlapping because of the different Z-order of the duplicated shape. Change-Id: Idecff4903c2d637bc82353f13352cac72413cec1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140041 Tested-by: László Németh Reviewed-by: László Németh --- oox/qa/unit/vml.cxx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'oox/qa') diff --git a/oox/qa/unit/vml.cxx b/oox/qa/unit/vml.cxx index 9dcaaef83cc4..61730c744220 100644 --- a/oox/qa/unit/vml.cxx +++ b/oox/qa/unit/vml.cxx @@ -192,18 +192,13 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, testGraphicStroke) uno::Reference xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY); - uno::Reference xShape; - for (sal_Int32 i = 0; i < xDrawPage->getCount(); ++i) - { - uno::Reference xInfo(xDrawPage->getByIndex(i), uno::UNO_QUERY); - if (!xInfo->supportsService("com.sun.star.drawing.GraphicObjectShape")) - { - continue; - } + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xDrawPage->getCount()); + uno::Reference xShape; + uno::Reference xInfo(xDrawPage->getByIndex(0), uno::UNO_QUERY); + if (xInfo->supportsService("com.sun.star.drawing.OLE2Shape")) xShape.set(xInfo, uno::UNO_QUERY); - break; - } + CPPUNIT_ASSERT(xShape.is()); drawing::LineStyle eLineStyle{}; -- cgit