sw/source/core/layout/flycnt.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
New commits: commit 182d2a47a2b4ed0affdc828a534c1659cc2e926d Author: Attila Bakos (NISZ) <bakos.attilakar...@nisz.hu> AuthorDate: Tue May 17 15:28:59 2022 +0200 Commit: László Németh <nem...@numbertext.org> CommitDate: Fri May 27 09:38:03 2022 +0200 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 <nem...@numbertext.org> Reviewed-by: László Németh <nem...@numbertext.org> 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#