sw/source/uibase/shells/drwbassh.cxx |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 26b492e47bb0688b3c996698a7e1bd0c544c24c1
Author:     Attila Bakos (NISZ) <bakos.attilakar...@nisz.hu>
AuthorDate: Tue Nov 3 15:05:00 2020 +0100
Commit:     Gabor Kelemen <kelemen.gab...@nisz.hu>
CommitDate: Tue Apr 20 17:38:09 2021 +0200

    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 <nem...@numbertext.org>
    Reviewed-by: László Németh <nem...@numbertext.org>
    (cherry picked from commit 3347d71b23595919e167bd49932675e77cbbdbbb)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106449
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    (cherry picked from commit 7c21121f7caa8667d86fc1946ef2a337c5b15da9)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114290
    Tested-by: Gabor Kelemen <kelemen.gab...@nisz.hu>
    Reviewed-by: Gabor Kelemen <kelemen.gab...@nisz.hu>

diff --git a/sw/source/uibase/shells/drwbassh.cxx 
b/sw/source/uibase/shells/drwbassh.cxx
index c707b803736b..f502061d7a0d 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();
                     }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to