summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-09-18 10:45:51 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-09-18 15:32:46 +0200
commitd33338939cb46612d73e6406474006e6ae24fe58 (patch)
tree4a029450effe37c02e386d2036148443ffab20dc /sw
parent4d34a538f1b05d994a3105f559b553af606cb89f (diff)
result of pDest->FindRealSdrObject() is already available
Change-Id: If743c9cdcaaa75fac281b8c50d3e37bfa5ecf0c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122296 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/DocumentLayoutManager.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/doc/DocumentLayoutManager.cxx b/sw/source/core/doc/DocumentLayoutManager.cxx
index cb1ec6d98d27..17b5fb1e6923 100644
--- a/sw/source/core/doc/DocumentLayoutManager.cxx
+++ b/sw/source/core/doc/DocumentLayoutManager.cxx
@@ -509,11 +509,11 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat(
// Link FLY and DRAW formats, so it becomes a text box
SdrObject* pNewObj = pDest->FindRealSdrObject();
- if (bIsGroupObj && pDest->FindRealSdrObject()
- && pDest->FindRealSdrObject()->getChildrenOfSdrObject()
- && (pDest->FindRealSdrObject()->getChildrenOfSdrObject()->GetObjCount() > it)
- && pDest->FindRealSdrObject()->getChildrenOfSdrObject()->GetObj(it))
- pNewObj = pDest->FindRealSdrObject()->getChildrenOfSdrObject()->GetObj(it);
+ if (bIsGroupObj && pNewObj
+ && pNewObj->getChildrenOfSdrObject()
+ && (pNewObj->getChildrenOfSdrObject()->GetObjCount() > it)
+ && pNewObj->getChildrenOfSdrObject()->GetObj(it))
+ pNewObj = pNewObj->getChildrenOfSdrObject()->GetObj(it);
pTextBoxNd->AddTextBox(pNewObj, pDestTextBox);
pDestTextBox->SetOtherTextBoxFormat(pTextBoxNd);
}