diff options
author | Justin Luth <justin_luth@sil.org> | 2018-09-06 12:17:47 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2018-09-21 16:48:13 +0200 |
commit | 73859a1c00d443714a1e5f2a1a8d16fe46877944 (patch) | |
tree | 20ec8312fef2cd36910989883cee6fd0e3b068da /sd/sdi | |
parent | f74b888244fcefa7c03fa25db4d42c839ebbf642 (diff) |
tdf#117721 draw ui: add .uno::SetOptimalColumnWidth
Optimize column width: Adjusts the width of the
selected columns to fit the 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.
The implementation and results are different from how Writer
does it, but tables themselves are also very different in Draw.
So I don't think it needs to be handled identically.
Writer's implementation is really "minimalColumnWidth" anyway.
Change-Id: Ia10cfa9822d7eef3c4909a82c21535aa6668b143
Reviewed-on: https://gerrit.libreoffice.org/60078
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sd/sdi')
-rw-r--r-- | sd/sdi/sdraw.sdi | 17 | ||||
-rw-r--r-- | sd/sdi/tables.sdi | 6 |
2 files changed, 23 insertions, 0 deletions
diff --git a/sd/sdi/sdraw.sdi b/sd/sdi/sdraw.sdi index 98d36b3985e2..234410d48937 100644 --- a/sd/sdi/sdraw.sdi +++ b/sd/sdi/sdraw.sdi @@ -4073,6 +4073,23 @@ SfxBoolItem DisplayMasterObjects SID_DISPLAY_MASTER_OBJECTS GroupId = SfxGroupId::View; ] +SfxVoidItem SetOptimalColumnWidth SID_TABLE_OPTIMAL_COLUMN_WIDTH +() +[ + AutoUpdate = FALSE, + FastCall = TRUE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + + AccelConfig = TRUE, + MenuConfig = TRUE, + ToolBoxConfig = TRUE, + GroupId = SfxGroupId::Table; +] + SfxVoidItem DistributeColumns SID_TABLE_DISTRIBUTE_COLUMNS () [ diff --git a/sd/sdi/tables.sdi b/sd/sdi/tables.sdi index ba9488841933..2df3198ba75d 100644 --- a/sd/sdi/tables.sdi +++ b/sd/sdi/tables.sdi @@ -144,6 +144,12 @@ shell TableObjectBar StateMethod = GetState; ] + SID_TABLE_OPTIMAL_COLUMN_WIDTH + [ + ExecMethod = Execute; + StateMethod = GetState; + ] + SID_TABLE_DISTRIBUTE_COLUMNS [ ExecMethod = Execute; |