diff options
Diffstat (limited to 'sd/qa')
-rw-r--r-- | sd/qa/unit/tiledrendering/tiledrendering.cxx | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index 2fe192f66de9..3f374b0fa051 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -2114,8 +2114,9 @@ void SdTiledRenderingTest::testTdf115873() ScopedVclPtrInstance<SdNavigatorWin> pNavigator(nullptr, &rBindings); pNavigator->InitTreeLB(pXImpressDocument->GetDoc()); pNavigator->Show(); - VclPtr<SdPageObjsTLB> pObjects = pNavigator->GetObjects(); - pObjects->Select(pObjects->GetEntry(0)); + SdPageObjsTLV& rObjects = pNavigator->GetObjects(); + rObjects.SelectEntry("Slide 1"); + rObjects.Select(); sd::ViewShell* pSdViewShell = pXImpressDocument->GetDocShell()->GetViewShell(); SdrView* pSdrView = pSdViewShell->GetView(); pSdrView->UnmarkAllObj(pSdrView->GetSdrPageView()); @@ -2126,13 +2127,11 @@ void SdTiledRenderingTest::testTdf115873() CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), rMarkList.GetMarkCount()); // Single-click with the mouse. - short nHeight = pObjects->GetEntryHeight(); - // Position of the center of the 2nd entry (first is the slide, second is - // the shape). - Point aPoint(pObjects->GetOutputWidthPixel() / 2, nHeight * 1.5); - MouseEvent aMouseEvent(aPoint, /*nClicks=*/1, MouseEventModifiers::NONE, MOUSE_LEFT); - pObjects->MouseButtonDown(aMouseEvent); - pObjects->MouseButtonUp(aMouseEvent); + MouseEvent aMouseEvent(Point(0, 0), /*nClicks=*/1, MouseEventModifiers::NONE, MOUSE_LEFT); + rObjects.MousePressHdl(aMouseEvent); + rObjects.SelectEntry("Rectangle"); + rObjects.Select(); + rObjects.MouseReleaseHdl(aMouseEvent); Scheduler::ProcessEventsToIdle(); // This failed, single-click did not result in a shape selection (only // double-click did). @@ -2148,10 +2147,10 @@ void SdTiledRenderingTest::testTdf115873Group() SfxBindings& rBindings = pViewShell->GetViewFrame()->GetBindings(); ScopedVclPtrInstance<SdNavigatorWin> pNavigator(nullptr, &rBindings); pNavigator->InitTreeLB(pXImpressDocument->GetDoc()); - VclPtr<SdPageObjsTLB> pObjects = pNavigator->GetObjects(); + SdPageObjsTLV& rObjects = pNavigator->GetObjects(); // This failed, Fill() and IsEqualToDoc() were out of sync for group // shapes. - CPPUNIT_ASSERT(pObjects->IsEqualToDoc(pXImpressDocument->GetDoc())); + CPPUNIT_ASSERT(rObjects.IsEqualToDoc(pXImpressDocument->GetDoc())); } void SdTiledRenderingTest::testCutSelectionChange() |