summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-11-30 12:40:17 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2022-11-30 16:21:02 +0100
commit925f9a9111eb8c856869e9b2b9eeb220ab21430d (patch)
tree9d064b34a2688d56ba94706668a8e7dfc015e595 /sd
parent85b9961c93446e7088d3be97b5977f1deaa16daf (diff)
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 <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/uiimpress.cxx14
1 files 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<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
- uno::Reference<container::XIndexAccess> xDraws = xDrawPagesSupplier->getDrawPages();
- CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xDraws->getCount());
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xDrawPage->getCount());
typeString(pImpressDocument, u"°");
- uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
- uno::UNO_QUERY);
uno::Reference<text::XTextRange> 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<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
- uno::Reference<container::XIndexAccess> xDraws = xDrawPagesSupplier->getDrawPages();
-
- int getShapes = xDraws->getCount();
- CPPUNIT_ASSERT_EQUAL(1, getShapes);
-
uno::Reference<drawing::XDrawPage> 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<beans::XPropertySet> XPropSet(xDrawPage->getByIndex(i), uno::UNO_QUERY);