diff options
author | Justin Luth <justin_luth@sil.org> | 2018-10-06 12:48:49 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-10-11 09:52:27 +0200 |
commit | 79bc165b6c906aa4f9efa6f4cdebb2f8a5f405b1 (patch) | |
tree | e70d722c77b7deed79f64e0805558be029800f90 /sd/sdi | |
parent | 048b8e45813f6a19a4ff56e1d676fe9450325cd2 (diff) |
tdf#117721 draw ui: add .uno::SetMinimal[RowHeight|ColumnWidth]
Minimize column width: Adjusts the width of the selected columns
to fit the selected content. The table can shrink if necessary,
but will not grow.
(Previously no way to minimize columns. Since
minimizing really can mess up merged cells, enhance my
new calcPreferredColumnWidth function.)
Minimize row height: Adjusts the height of the selected rows
to fit the content, causing the table to shrink.
(The new optimize action functioned as minimize. So this change
tweaks optimize so that it does not reduce the table size. A
followup commit will make it distribute based on largest
minimized row (still without reducing table size), and change
distributed rows to work the way the document states - based
on the largest row.
Change-Id: I807a9cc9e9441a1215539e817b87158afe5a0604
Reviewed-on: https://gerrit.libreoffice.org/61472
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sd/sdi')
-rw-r--r-- | sd/sdi/sdraw.sdi | 34 | ||||
-rw-r--r-- | sd/sdi/tables.sdi | 12 |
2 files changed, 46 insertions, 0 deletions
diff --git a/sd/sdi/sdraw.sdi b/sd/sdi/sdraw.sdi index eac465540ac0..7a7c53bb5bed 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 SetMinimalColumnWidth SID_TABLE_MINIMAL_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 SetOptimalColumnWidth SID_TABLE_OPTIMAL_COLUMN_WIDTH () [ @@ -4107,6 +4124,23 @@ SfxVoidItem DistributeColumns SID_TABLE_DISTRIBUTE_COLUMNS GroupId = SfxGroupId::Table; ] +SfxVoidItem SetMinimalRowHeight SID_TABLE_MINIMAL_ROW_HEIGHT +() +[ + AutoUpdate = FALSE, + FastCall = TRUE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + + AccelConfig = TRUE, + MenuConfig = TRUE, + ToolBoxConfig = TRUE, + GroupId = SfxGroupId::Table; +] + SfxVoidItem SetOptimalRowHeight SID_TABLE_OPTIMAL_ROW_HEIGHT () [ diff --git a/sd/sdi/tables.sdi b/sd/sdi/tables.sdi index 7450666134f5..360548b8276d 100644 --- a/sd/sdi/tables.sdi +++ b/sd/sdi/tables.sdi @@ -144,6 +144,12 @@ shell TableObjectBar StateMethod = GetState; ] + SID_TABLE_MINIMAL_COLUMN_WIDTH + [ + ExecMethod = Execute; + StateMethod = GetState; + ] + SID_TABLE_OPTIMAL_COLUMN_WIDTH [ ExecMethod = Execute; @@ -156,6 +162,12 @@ shell TableObjectBar StateMethod = GetState; ] + SID_TABLE_MINIMAL_ROW_HEIGHT + [ + ExecMethod = Execute; + StateMethod = GetState; + ] + SID_TABLE_OPTIMAL_ROW_HEIGHT [ ExecMethod = Execute; |