summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Bakos (NISZ) <bakos.attilakaroly@nisz.hu>2022-05-17 15:28:59 +0200
committerLászló Németh <nemeth@numbertext.org>2022-05-27 09:38:03 +0200
commit182d2a47a2b4ed0affdc828a534c1659cc2e926d (patch)
tree840bf3167e3d10b841e7dd9f36c4a780e7ccc5c8
parentc9d018df610b7bd7d5794231b2ccb0d8090573a6 (diff)
tdf#148365 sw: fix freezing with FrameIsAutomaticHeight
Lock layout update temporarily during setting horizontal and after that, vertical orientations of textboxes with FrameIsAutomaticHeight to avoid freezing SwObjectFormatter, and depending on the platform, freezing Writer completely. Regression from commit 3b0a0e70cb67fc2e1f9999d2e8cbb9cfcd8c670e "Related tdf#66039 DOCX import: fix Z-order of group shapes". Change-Id: Ib106182b9f0d3d74ebdc3e746345380c8b685fdf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134480 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
-rw-r--r--sw/source/core/layout/flycnt.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index cf6aa1f41029..f7611392d345 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -548,8 +548,14 @@ void SwFlyAtContentFrame::MakeAll(vcl::RenderContext* pRenderContext)
aHOri.SetPos(aHOri.GetPos() + aTextRectangle.Left());
aVOri.SetPos(aVOri.GetPos() + aTextRectangle.Top());
// save the new position for the shape
- GetFormat()->SetFormatAttr(aHOri);
- GetFormat()->SetFormatAttr(aVOri);
+ auto pFormat = GetFormat();
+ const bool bLocked = pFormat->IsModifyLocked();
+ if (!bLocked)
+ pFormat->LockModify();
+ pFormat->SetFormatAttr(aHOri);
+ pFormat->SetFormatAttr(aVOri);
+ if (!bLocked)
+ pFormat->UnlockModify();
}
if ( bOsz || bConsiderWrapInfluenceDueToOverlapPrevCol ||
// #i40444#