summaryrefslogtreecommitdiff
path: root/sw/qa/core/text/text.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-01-14 17:53:03 +0600
committerMike Kaganski <mike.kaganski@collabora.com>2024-01-14 14:44:22 +0100
commitb5c81b6c36dcd539d3104e7902373d96b3e025f6 (patch)
tree18ca538eda98f6701b96130e8a7b4dc8c25da6e4 /sw/qa/core/text/text.cxx
parent563f7077f1dbce31ff95ee8d2e8d17b629693db1 (diff)
Let SwAnchoredObject::GetFrameFormat return pointer, and drop HasFrameFormat
In commit 19062c98da5b2e9edc7a99068fa06a83c7578826, it was important to check if objects have frame format before using GetFrameFormat. Thic change makes it simpler amd more obvious. Also, it allows to avoid two calls to GetUserCall, by obtaining the pointer once and checking it. Change-Id: I980fcba9e369e107f3d062e8cab0a34e02384290 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162044 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/qa/core/text/text.cxx')
-rw-r--r--sw/qa/core/text/text.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx
index 666e6d29f250..d61492d43d61 100644
--- a/sw/qa/core/text/text.cxx
+++ b/sw/qa/core/text/text.cxx
@@ -767,7 +767,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testAsCharImageDocModelFromViewPoint)
const SwSortedObjs& rSortedObjs = *pTextFrame->GetDrawObjs();
const SwAnchoredObject* pAnchoredObject = rSortedObjs[0];
// The content points to the start node, the next node is the graphic node.
- SwNodeIndex aGraphicNode = *pAnchoredObject->GetFrameFormat().GetContent().GetContentIdx();
+ SwNodeIndex aGraphicNode = *pAnchoredObject->GetFrameFormat()->GetContent().GetContentIdx();
++aGraphicNode;
tools::Rectangle aFlyFrame = pAnchoredObject->GetDrawObj()->GetLastBoundRect();
Point aDocPos = aFlyFrame.Center();