summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells/drawsh.cxx
diff options
context:
space:
mode:
authorAttila Bakos (NISZ) <bakos.attilakaroly@nisz.hu>2021-09-01 16:38:07 +0200
committerLászló Németh <nemeth@numbertext.org>2021-09-16 12:56:10 +0200
commitba5156abace2e41ec4d21397c0875f7e1efd2beb (patch)
treed09d5116f32263c385d34156fd0841f51105c099 /sw/source/uibase/shells/drawsh.cxx
parente58e828d4877f9068e4a69c52ac9c7fe6e65d032 (diff)
tdf#143574 tdf#144271 sw: textboxes in group shapes - part 2
Sync textboxes with group shapes, adding textboxes to group shapes, copying textboxes with group shapes, grouping/ungrouping group shapes with textboxes, removing textboxes from group shapes. This patch fixes a memory leak (tdf#144271) introduced by commit 504d78acb866495fd954fcd6db22ea68f174a5ab "tdf#143574 sw: textboxes in group shapes - part 1". Note: AS_CHAR anchoring is far not the best for group shapes and import/export is still missing. Change-Id: I7dc3b8d36c4a04f792ae4742fe4a45af9227a17e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121449 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/source/uibase/shells/drawsh.cxx')
-rw-r--r--sw/source/uibase/shells/drawsh.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx
index beb197c87fa9..52a3b0d02beb 100644
--- a/sw/source/uibase/shells/drawsh.cxx
+++ b/sw/source/uibase/shells/drawsh.cxx
@@ -498,7 +498,7 @@ void SwDrawShell::GetState(SfxItemSet& rSet)
{
SwFrameFormat* pFrameFormat = ::FindFrameFormat(pObj);
// Allow creating a TextBox only in case this is a draw format without a TextBox so far.
- if (pFrameFormat && pFrameFormat->Which() == RES_DRAWFRMFMT && !SwTextBoxHelper::isTextBox(pFrameFormat, RES_DRAWFRMFMT))
+ if (pFrameFormat && pFrameFormat->Which() == RES_DRAWFRMFMT && !SwTextBoxHelper::isTextBox(pFrameFormat, RES_DRAWFRMFMT, pObj))
{
if (SdrObjCustomShape* pCustomShape = dynamic_cast<SdrObjCustomShape*>( pObj) )
{
@@ -521,7 +521,7 @@ void SwDrawShell::GetState(SfxItemSet& rSet)
{
SwFrameFormat* pFrameFormat = ::FindFrameFormat(pObj);
// Allow removing a TextBox only in case it has one.
- if (pFrameFormat && SwTextBoxHelper::isTextBox(pFrameFormat, RES_DRAWFRMFMT))
+ if (pFrameFormat && SwTextBoxHelper::isTextBox(pFrameFormat, RES_DRAWFRMFMT, pObj))
bDisable = false;
}