diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-02-19 13:22:19 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-02-26 17:24:59 +0100 |
commit | 42f281c56e0c06327fa382c0984ecf2e8c21e414 (patch) | |
tree | e6b7a627d8d2ed88b43cf4d624efd47da6f3b36d /sd/qa | |
parent | 96513a30a8c5782444ffb5691bbed13bd61114d9 (diff) |
weld impress navigator
complicated by the effort to keep the non-standard behaviour of
commit f3c68cdf8f6a0273c62b493552f78af0138a44e8
Date: Wed Feb 21 17:27:53 2018 +0100
tdf#115873 sd navigator: allow selecting but not focusing on objects
and the self-dnd code
Change-Id: I29c224739463d1d44690f30ed29db3fe2b16b4a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89045
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
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() |