From 42ca17dd19a5a03c6c26c9b5e524cbb3499ffced Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Fri, 25 Oct 2024 12:23:36 +0200 Subject: 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 --- sw/qa/uibase/uiview/uiview.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sw/qa/uibase/uiview/uiview.cxx') 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(mxComponent.get()); - SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell(); + SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell(); const SwViewOption* pViewOption = pWrtShell->GetViewOptions(); comphelper::ScopeGuard g([pWrtShell, pViewOption] { SwViewOption aViewOption(*pViewOption); -- cgit