From 925f9a9111eb8c856869e9b2b9eeb220ab21430d Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Wed, 30 Nov 2022 12:40:17 +0100 Subject: CppunitTest_sd_uiimpress: fix asserts we want to check the number of shapes, not the number of pages Change-Id: If83a9be71bc796ae0cb5fe005780a78428ade9f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143485 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sd/qa/unit/uiimpress.cxx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx index 32ea8642e2ed..13f072cf2488 100644 --- a/sd/qa/unit/uiimpress.cxx +++ b/sd/qa/unit/uiimpress.cxx @@ -861,13 +861,12 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf38669) Scheduler::ProcessEventsToIdle(); uno::Reference xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); - uno::Reference xDraws = xDrawPagesSupplier->getDrawPages(); - CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xDraws->getCount()); + uno::Reference xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), + uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xDrawPage->getCount()); typeString(pImpressDocument, u"°"); - uno::Reference xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), - uno::UNO_QUERY); uno::Reference xShape(xDrawPage->getByIndex(2), uno::UNO_QUERY); // Without the fix in place, this test would have failed with: // - Expected: ° @@ -912,14 +911,11 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf123841) Scheduler::ProcessEventsToIdle(); uno::Reference xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); - uno::Reference xDraws = xDrawPagesSupplier->getDrawPages(); - - int getShapes = xDraws->getCount(); - CPPUNIT_ASSERT_EQUAL(1, getShapes); - uno::Reference xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xDrawPage->getCount()); + for (int i = 0; i < 3; i++) { uno::Reference XPropSet(xDrawPage->getByIndex(i), uno::UNO_QUERY); -- cgit v1.2.3