diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-05-29 14:03:00 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-05-30 08:44:27 +0200 |
commit | 2d362fab91fb70fbe7026c1e96452fe06fa5736e (patch) | |
tree | dfe0bff75d8f9f59d6a2f8f35b9d6414c69f113b /sd/qa | |
parent | b1da1ef5766d1910b29d98b62a842ccfd7bacf08 (diff) |
GetMarkedObjectByIndex -> GetMarkedObjectList().GetMark()->GetMarkedSdrObj()
In order to reduce number of calls to GetMarkedObjectList() later on
Change-Id: I57ab7d2d8edd98da5175bd1066dfab0fa2cc888e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168220
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd/qa')
-rw-r--r-- | sd/qa/unit/misc-tests.cxx | 6 | ||||
-rw-r--r-- | sd/qa/unit/tiledrendering/tiledrendering.cxx | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx index 69cd0205dc4d..d038e2e8880e 100644 --- a/sd/qa/unit/misc-tests.cxx +++ b/sd/qa/unit/misc-tests.cxx @@ -795,7 +795,8 @@ void SdMiscTest::testTdf130988() pView->MarkNextObj(); pView->ConvertMarkedObjTo3D(false, basegfx::B2DPoint(8000.0, -3000.0), basegfx::B2DPoint(3000.0, -8000.0)); - E3dScene* pObj = dynamic_cast<E3dScene*>(pView->GetMarkedObjectByIndex(0)); + E3dScene* pObj + = dynamic_cast<E3dScene*>(pView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj()); CPPUNIT_ASSERT(pObj); // Error was, that the created 3D object had a wrong path. Instead examining @@ -820,7 +821,8 @@ void SdMiscTest::testTdf131033() pView->MarkNextObj(); pView->ConvertMarkedObjTo3D(false, basegfx::B2DPoint(11000.0, -5000.0), basegfx::B2DPoint(11000.0, -9000.0)); - E3dScene* pObj = dynamic_cast<E3dScene*>(pView->GetMarkedObjectByIndex(0)); + E3dScene* pObj + = dynamic_cast<E3dScene*>(pView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj()); CPPUNIT_ASSERT(pObj); // Error was, that the 2D representation of the scene did not contain the default 20° diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index c013df072c17..0c7d5e87d1cd 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -1428,7 +1428,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, testTdf118354) Scheduler::ProcessEventsToIdle(); SdrView* pView = pViewShell->GetView(); - auto pMarkedObj = dynamic_cast<sdr::table::SdrTableObj*>(pView->GetMarkedObjectByIndex(0)); + auto pMarkedObj = dynamic_cast<sdr::table::SdrTableObj*>(pView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj()); CPPUNIT_ASSERT_EQUAL(pMarkedObj, pTableObject); } |