[Libreoffice-commits] core.git: sw/source
Attila Bakos (NISZ) (via logerrit)
logerrit at kemper.freedesktop.org
Tue Nov 24 10:32:18 UTC 2020
sw/source/uibase/shells/drwbassh.cxx | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
New commits:
commit 3347d71b23595919e167bd49932675e77cbbdbbb
Author: Attila Bakos (NISZ) <bakos.attilakaroly at nisz.hu>
AuthorDate: Tue Nov 3 15:05:00 2020 +0100
Commit: László Németh <nemeth at numbertext.org>
CommitDate: Tue Nov 24 11:31:40 2020 +0100
tdf#137546 sw: fix text position at textbox alignment
Follow-up of commit 06fd06597796d9e92117602245f3968c93707708
(tdf#124430 Writer Editing: Fix textbox aligning).
Testing:
1. Insert a shape. Choose menu item "Add Text Box" of
its local menu, and write a short text in it.
2. Choose menu item "Align->Right" of the local menu of
the shape. The textbox is aligned to the right margin
and before the fix, text position had changed slightly
within the shape. (Only moving the textbox fixed it.)
Change-Id: I758e0f65c8b51e09ac15a96e19819cb3ad3beacb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105253
Tested-by: László Németh <nemeth at numbertext.org>
Reviewed-by: László Németh <nemeth at numbertext.org>
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx
index 65f95858a480..f901f32cc15d 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -443,7 +443,8 @@ void SwDrawBaseShell::Execute(SfxRequest const &rReq)
if ( bAlignPossible )
{
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
- if ( rMarkList.GetMarkCount() == 1 )
+ if (rMarkList.GetMarkCount() == 1
+ && !SwTextBoxHelper::hasTextFrame(rMarkList.GetMark(0)->GetMarkedSdrObj()))
{
sal_Int16 nHorizOrient = -1, nVertOrient = -1;
@@ -479,8 +480,6 @@ 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();
}
@@ -492,8 +491,6 @@ 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();
}
More information about the Libreoffice-commits
mailing list