tdf#124430 Writer Editing: Fix textbox aligning
Before, when align function was used the textboxes
(shape+frame) went apart, now the textframe follows
the shape.
Co-authored-by: Attila Bánhegyi (NISZ)
Change-Id: I4d69a2f7f4e5ef50d17bb0871c501d6e0026d0e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99048
Reviewed-by: Attila Bakos <bakos.attilakaroly@nisz.hu>
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: Jenkins
Tested-by: László Németh <nemeth@numbertext.org>
(cherry picked from commit 06fd06597796d9e92117602245f3968c93707708)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102769
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx
index bccbe31..c707b80 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -53,6 +53,7 @@
#include <com/sun/star/text/RelOrientation.hpp>
#include <IDocumentDrawModelAccess.hxx>
#include <fmtfollowtextflow.hxx>
#include <textboxhelper.hxx>
using namespace ::com::sun::star;
@@ -478,6 +479,8 @@ void SwDrawBaseShell::Execute(SfxRequest const &rReq)
SwFormatHoriOrient aHOrient(pFrameFormat->GetFormatAttr(RES_HORI_ORIENT));
aHOrient.SetHoriOrient( nHorizOrient );
pFrameFormat->SetFormatAttr(aHOrient);
if (auto pTxFrm = SwTextBoxHelper::getOtherTextBoxFormat(pFrameFormat, RES_DRAWFRMFMT))
pTxFrm->SetFormatAttr(aHOrient);
pSh->EndAction();
}
@@ -489,6 +492,8 @@ void SwDrawBaseShell::Execute(SfxRequest const &rReq)
SwFormatVertOrient aVOrient(pFrameFormat->GetFormatAttr(RES_VERT_ORIENT));
aVOrient.SetVertOrient( nVertOrient );
pFrameFormat->SetFormatAttr(aVOrient);
if (auto pTxFrm = SwTextBoxHelper::getOtherTextBoxFormat(pFrameFormat, RES_DRAWFRMFMT))
pTxFrm->SetFormatAttr(aVOrient);
pSh->EndAction();
}