diff options
author | Justin Luth <justin.luth@collabora.com> | 2020-07-18 11:45:52 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2020-07-18 13:00:01 +0200 |
commit | 9712e25425e22b59afce82f26a14a48ebb37cd38 (patch) | |
tree | 81a7979e001032899ee50d95ba8fdf9da8edb609 | |
parent | 785f742b64a433d59f7bf80e2bd649659ae10f54 (diff) |
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_luth@sil.org>
-rw-r--r-- | sw/source/core/table/swtable.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
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(); |