diff options
author | Attila Bakos (NISZ) <bakos.attilakaroly@nisz.hu> | 2022-05-11 09:12:12 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2022-05-19 11:18:33 +0200 |
commit | 5648363e8f70cd95b00db62f91effb7eb1385ac9 (patch) | |
tree | df9b3f18cba99a3087eb4adbe94d3f7667f6fd49 /sw/source/core | |
parent | 1c25d22bfa072eb78da8930a3877f37a70ff707b (diff) |
tdf#148720 sw DOCX: fix jumbled group textbox regression
Left-aligned group shape was synced to the textbox, resulting
jumbled positions after DOCX export/import. To fix it,
set horizontal orientation of the textbox back to NONE.
Regression from commit 2951cbdf3a6e2b62461665546b47e1d253fcb834
"tdf#143574 OOXML export/import of textboxes in group shapes".
Change-Id: I02ee79862344f3495846091e3eef27c24d8ef162
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134149
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/source/core')
-rw-r--r-- | sw/source/core/doc/textboxhelper.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx index 676f31fd4022..68d42b7e91f7 100644 --- a/sw/source/core/doc/textboxhelper.cxx +++ b/sw/source/core/doc/textboxhelper.cxx @@ -1344,6 +1344,8 @@ bool SwTextBoxHelper::doTextBoxPositioning(SwFrameFormat* pShape, SdrObject* pOb // Set the textbox position at the X-axis: SwFormatHoriOrient aNewHOri(pFormat->GetHoriOrient()); + if (bIsGroupObj && aNewHOri.GetHoriOrient() != text::HoriOrientation::NONE) + aNewHOri.SetHoriOrient(text::HoriOrientation::NONE); aNewHOri.SetPos(aRect.Left() + nLeftSpace + (bIsGroupObj ? pObj->GetRelativePos().getX() : 0)); SwFormatVertOrient aNewVOri(pFormat->GetVertOrient()); @@ -1424,6 +1426,9 @@ bool SwTextBoxHelper::doTextBoxPositioning(SwFrameFormat* pShape, SdrObject* pOb // Set the same position as the (child) shape has SwFormatHoriOrient aNewHOri(pShape->GetHoriOrient()); + if (bIsGroupObj && aNewHOri.GetHoriOrient() != text::HoriOrientation::NONE) + aNewHOri.SetHoriOrient(text::HoriOrientation::NONE); + aNewHOri.SetPos( (bIsGroupObj && pObj ? pObj->GetRelativePos().getX() : aNewHOri.GetPos()) + aRect.Left()); |