diff options
author | Justin Luth <justin_luth@sil.org> | 2018-09-22 10:15:32 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2018-10-12 05:52:21 +0200 |
commit | ab18c17d70e1dcf5cf9db38256d35e6af479373e (patch) | |
tree | 9019211501ca5788dfbd008ba8840bc350b440d4 /sw/source/uibase/shells/tabsh.cxx | |
parent | 144da6d5079bcd435e6637cb5cf95305f3ec1306 (diff) |
tdf#64242 sw optimal column width, not minimize
Optimize column width: Adjusts the width of the
selected columns to fit the entire column's content,
without changing the width of the table.
Any leftover space is distributed proportionately,
with thin columns growing slightly,
and wide columns growing much wider.
Change-Id: I9b8436814fc103d52fdd5ce3d88c6442dbb72d50
Reviewed-on: https://gerrit.libreoffice.org/60905
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw/source/uibase/shells/tabsh.cxx')
-rw-r--r-- | sw/source/uibase/shells/tabsh.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index a849013d9dbb..336f46d3a7d0 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -770,13 +770,15 @@ void SwTableShell::Execute(SfxRequest &rReq) case FN_TABLE_BALANCE_CELLS: { bool bBalance = (FN_TABLE_BALANCE_CELLS == nSlot); + const bool bNoShrink = FN_TABLE_ADJUST_CELLS == nSlot; + const bool bSelectedWidth = SID_TABLE_MINIMAL_COLUMN_WIDTH == nSlot; if ( rSh.IsAdjustCellWidthAllowed(bBalance) ) { { // remove actions to make a valid table selection UnoActionRemoveContext aRemoveContext(rSh.GetDoc()); } - rSh.AdjustCellWidth(bBalance); + rSh.AdjustCellWidth(bBalance, bNoShrink, !bSelectedWidth); } bCallDone = true; break; |