summaryrefslogtreecommitdiff
path: root/sw/qa/uibase
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2023-04-15 20:51:52 +0200
committerBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2023-04-24 21:59:04 +0200
commit09cdcb5f37bb4e42da7b28db6e757b9f2affed14 (patch)
treeb1c67335c7da4ab7cc1da63f3a6d4a8ef72656f9 /sw/qa/uibase
parenteebd13c97ecef1e39aa054701a6e6618227d7ae0 (diff)
introduce sw::SpzFrameFormat ...
- ... as a base class of frame formats allowed into the spz frame format container - with a private ctor and friends SwDrawFrameFormat and SwFlyFrameFormat so only these two classes derive from it - with that, switch over the SpzFrameFormats to only ever allow these types into the container - in followups, likely quite a bit of stronger typing can be introduced. - ultimately, it would be nice to have each SwDrawFrameFormats and SwFlyFrameFormats in their own strongly typed container in the end. Change-Id: Ic30efc1220aded701533c9ca5003d2aaf8bbdaec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150452 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw/qa/uibase')
-rw-r--r--sw/qa/uibase/docvw/docvw.cxx4
-rw-r--r--sw/qa/uibase/uno/uno.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/sw/qa/uibase/docvw/docvw.cxx b/sw/qa/uibase/docvw/docvw.cxx
index 677a5abd2a54..280a0459109e 100644
--- a/sw/qa/uibase/docvw/docvw.cxx
+++ b/sw/qa/uibase/docvw/docvw.cxx
@@ -48,7 +48,7 @@ CPPUNIT_TEST_FIXTURE(Test, testShiftClickOnImage)
pWrtShell->SttEndDoc(/*bStt=*/false);
// When shift-clicking on that fly frame:
- SwFrameFormats& rSpzFormats = *pDoc->GetSpzFrameFormats();
+ auto& rSpzFormats = *pDoc->GetSpzFrameFormats();
auto pFrameFormat = dynamic_cast<SwFlyFrameFormat*>(rSpzFormats[0]);
CPPUNIT_ASSERT(pFrameFormat);
SwFlyFrame* pFlyFrame = pFrameFormat->GetFrame();
@@ -163,7 +163,7 @@ CPPUNIT_TEST_FIXTURE(Test, testShiftDoubleClickOnImage)
xRegistration->registerDispatchProviderInterceptor(pInterceptor);
// When shift-double-clicking on that fly frame:
- SwFrameFormats& rSpzFormats = *pDoc->GetSpzFrameFormats();
+ auto& rSpzFormats = *pDoc->GetSpzFrameFormats();
auto pFrameFormat = dynamic_cast<SwFlyFrameFormat*>(rSpzFormats[0]);
CPPUNIT_ASSERT(pFrameFormat);
SwFlyFrame* pFlyFrame = pFrameFormat->GetFrame();
diff --git a/sw/qa/uibase/uno/uno.cxx b/sw/qa/uibase/uno/uno.cxx
index b9f03d42d5ee..6ad35e07466a 100644
--- a/sw/qa/uibase/uno/uno.cxx
+++ b/sw/qa/uibase/uno/uno.cxx
@@ -149,8 +149,8 @@ CPPUNIT_TEST_FIXTURE(SwUibaseUnoTest, testCreateTextRangeByPixelPositionGraphic)
= xController->createTextRangeByPixelPosition(aPoint);
// Then make sure that the anchor of the image is returned:
- const SwFrameFormats& rFormats = *pDoc->GetSpzFrameFormats();
- const SwFrameFormat* pFormat = rFormats[0];
+ const auto& rFormats = *pDoc->GetSpzFrameFormats();
+ const auto pFormat = rFormats[0];
SwPosition aAnchorPos(*pFormat->GetAnchor().GetContentAnchor());
auto pTextRange = dynamic_cast<SwXTextRange*>(xTextRange.get());
SwPaM aPaM(pDoc->GetNodes());