summaryrefslogtreecommitdiff
path: root/sw/qa/uibase/shells
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-02-23 13:53:47 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2023-02-23 16:02:34 +0000
commit9937d7cdde7de5ec7588c79f92a7508a3893c31e (patch)
treea756d35d6388b31fbd2e431e35ff582372c575a2 /sw/qa/uibase/shells
parentcacd5a0cd263dbf072d5ad36dc651ad1e7df5826 (diff)
SwModelTestBase: add selectShape helper
See discussion in https://gerrit.libreoffice.org/c/core/+/147506 Change-Id: If3f3b471d5053dbc1bf34383e64e9672d026aaae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147515 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw/qa/uibase/shells')
-rw-r--r--sw/qa/uibase/shells/shells.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/sw/qa/uibase/shells/shells.cxx b/sw/qa/uibase/shells/shells.cxx
index dc1b0e2cee75..8f67e6821da3 100644
--- a/sw/qa/uibase/shells/shells.cxx
+++ b/sw/qa/uibase/shells/shells.cxx
@@ -68,10 +68,7 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, testTdf130179)
CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
SwView* pView = pDoc->GetDocShell()->GetView();
- pView->GetViewFrame().GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
- // Make sure SwTextShell is replaced with SwDrawShell right now, not after 120 ms, as set in the
- // SwView ctor.
- pView->StopShellTimer();
+ selectShape(1);
std::unique_ptr<SfxPoolItem> pItem;
pView->GetViewFrame().GetBindings().QueryState(FN_POSTIT, pItem);
@@ -99,8 +96,7 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, testShapeTextAlignment)
// Start shape text edit.
SwView* pView = pDoc->GetDocShell()->GetView();
// Select the shape.
- pView->GetViewFrame().GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
- pView->StopShellTimer();
+ selectShape(1);
// Start the actual text edit.
SdrPage* pPage = pWrtShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pPage->GetObjCount());