sw/source/core/table/swtable.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 9712e25425e22b59afce82f26a14a48ebb37cd38
Author:     Justin Luth <justin.l...@collabora.com>
AuthorDate: Sat Jul 18 11:45:52 2020 +0300
Commit:     Justin Luth <justin_l...@sil.org>
CommitDate: Sat Jul 18 13:00:01 2020 +0200

    tdf#120026 sw: keep table centered when resizing
    
    The table was throwing away the centered value,
    and setting orientation LEFT_AND_WIDTH during a resize.
    
    No UI testing examples found of setting table properties,
    and test_resize_table_with_keyboard_tdf53460
    hardly seemed like it was testing resizing AFAICS.
    
    Change-Id: I23340d7908cdf17ae3ff9dac60079f59c609f567
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98991
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <justin_l...@sil.org>

diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index d995524615c6..69dbe1f9bfe1 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -868,7 +868,8 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const 
SwTabCols &rOld,
             // This is done by preserving the exact positions that have been
             // set by the user.
             SwFormatHoriOrient aOri( pFormat->GetHoriOrient() );
-            if(text::HoriOrientation::NONE != aOri.GetHoriOrient())
+            if( text::HoriOrientation::NONE != aOri.GetHoriOrient() &&
+                text::HoriOrientation::CENTER != aOri.GetHoriOrient() )
             {
                 const bool bLeftDist = rNew.GetLeft() != nShLeft;
                 const bool bRightDist = rNew.GetRight() + nShRight != 
rNew.GetRightMax();
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to