summaryrefslogtreecommitdiff
path: root/sw/qa/uibase/uiview/uiview.cxx
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2024-10-25 12:23:36 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2024-10-30 00:30:44 +0100
commit42ca17dd19a5a03c6c26c9b5e524cbb3499ffced (patch)
tree3e6a3f2783621de6cfd50c17d3900fdf89750a6f /sw/qa/uibase/uiview/uiview.cxx
parent4604ca7581a81d84eea1dcd517b9fe04b0371d82 (diff)
SwModelTestBase: add getSwTextDoc and use it everywhere
Change-Id: I09f132a9c79f0aa4c3f4d3ca5f2fed233d0dcb06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175641 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw/qa/uibase/uiview/uiview.cxx')
-rw-r--r--sw/qa/uibase/uiview/uiview.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/sw/qa/uibase/uiview/uiview.cxx b/sw/qa/uibase/uiview/uiview.cxx
index 331795649a0f..d6c7a2c15125 100644
--- a/sw/qa/uibase/uiview/uiview.cxx
+++ b/sw/qa/uibase/uiview/uiview.cxx
@@ -119,8 +119,7 @@ CPPUNIT_TEST_FIXTURE(SwUibaseUiviewTest, testKeepRatio)
createSwDoc("keep-ratio.fodt");
// Then make sure we read the custom value:
- auto pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
- SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
const SwViewOption* pViewOption = pWrtShell->GetViewOptions();
comphelper::ScopeGuard g([pWrtShell, pViewOption] {
SwViewOption aViewOption(*pViewOption);