summaryrefslogtreecommitdiff
path: root/sd/uiconfig/sdraw
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2018-10-06 12:48:49 +0300
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-10-11 09:52:27 +0200
commit79bc165b6c906aa4f9efa6f4cdebb2f8a5f405b1 (patch)
treee70d722c77b7deed79f64e0805558be029800f90 /sd/uiconfig/sdraw
parent048b8e45813f6a19a4ff56e1d676fe9450325cd2 (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/uiconfig/sdraw')
-rw-r--r--sd/uiconfig/sdraw/popupmenu/table.xml2
-rw-r--r--sd/uiconfig/sdraw/popupmenu/tabletext.xml2
-rw-r--r--sd/uiconfig/sdraw/toolbar/optimizetablebar.xml6
3 files changed, 8 insertions, 2 deletions
diff --git a/sd/uiconfig/sdraw/popupmenu/table.xml b/sd/uiconfig/sdraw/popupmenu/table.xml
index e3de5d204262..56504277284c 100644
--- a/sd/uiconfig/sdraw/popupmenu/table.xml
+++ b/sd/uiconfig/sdraw/popupmenu/table.xml
@@ -32,6 +32,7 @@
</menu:menu>
<menu:menu menu:id=".uno:RowMenu">
<menu:menupopup>
+ <menu:menuitem menu:id=".uno:SetMinimalRowHeight"/>
<menu:menuitem menu:id=".uno:SetOptimalRowHeight"/>
<menu:menuitem menu:id=".uno:DistributeRows"/>
<menu:menuseparator/>
@@ -43,6 +44,7 @@
</menu:menu>
<menu:menu menu:id=".uno:ColumnMenu">
<menu:menupopup>
+ <menu:menuitem menu:id=".uno:SetMinimalColumnWidth"/>
<menu:menuitem menu:id=".uno:SetOptimalColumnWidth"/>
<menu:menuitem menu:id=".uno:DistributeColumns"/>
<menu:menuseparator/>
diff --git a/sd/uiconfig/sdraw/popupmenu/tabletext.xml b/sd/uiconfig/sdraw/popupmenu/tabletext.xml
index 9ae33c9fe055..482ad92396a0 100644
--- a/sd/uiconfig/sdraw/popupmenu/tabletext.xml
+++ b/sd/uiconfig/sdraw/popupmenu/tabletext.xml
@@ -33,6 +33,7 @@
</menu:menu>
<menu:menu menu:id=".uno:RowMenu">
<menu:menupopup>
+ <menu:menuitem menu:id=".uno:SetMinimalRowHeight"/>
<menu:menuitem menu:id=".uno:SetOptimalRowHeight"/>
<menu:menuitem menu:id=".uno:DistributeRows"/>
<menu:menuseparator/>
@@ -43,6 +44,7 @@
</menu:menu>
<menu:menu menu:id=".uno:ColumnMenu">
<menu:menupopup>
+ <menu:menuitem menu:id=".uno:SetMinimalColumnWidth"/>
<menu:menuitem menu:id=".uno:SetOptimalColumnWidth"/>
<menu:menuitem menu:id=".uno:DistributeColumns"/>
<menu:menuseparator/>
diff --git a/sd/uiconfig/sdraw/toolbar/optimizetablebar.xml b/sd/uiconfig/sdraw/toolbar/optimizetablebar.xml
index 62fa53214a7c..e4653187b503 100644
--- a/sd/uiconfig/sdraw/toolbar/optimizetablebar.xml
+++ b/sd/uiconfig/sdraw/toolbar/optimizetablebar.xml
@@ -18,8 +18,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <toolbar:toolbaritem xlink:href=".uno:SetMinimalColumnWidth"/>
+ <toolbar:toolbaritem xlink:href=".uno:SetMinimalRowHeight"/>
+ <toolbar:toolbaritem xlink:href=".uno:SetOptimalColumnWidth"/>
+ <toolbar:toolbaritem xlink:href=".uno:SetOptimalRowHeight"/>
<toolbar:toolbaritem xlink:href=".uno:DistributeColumns"/>
<toolbar:toolbaritem xlink:href=".uno:DistributeRows"/>
- <toolbar:toolbaritem xlink:href=".uno:SetOptimalRowHeight"/>
- <toolbar:toolbaritem xlink:href=".uno:SetOptimalColumnWidth"/>
</toolbar:toolbar>