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 /include | |
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 'include')
-rw-r--r-- | include/svx/sdr/table/tablecontroller.hxx | 4 | ||||
-rw-r--r-- | include/svx/svdotable.hxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/svx/sdr/table/tablecontroller.hxx b/include/svx/sdr/table/tablecontroller.hxx index eecc60d75a8b..8ac275295314 100644 --- a/include/svx/sdr/table/tablecontroller.hxx +++ b/include/svx/sdr/table/tablecontroller.hxx @@ -75,8 +75,8 @@ public: SVX_DLLPRIVATE void onFormatTable(const SfxRequest& rReq); SVX_DLLPRIVATE void MergeMarkedCells(); SVX_DLLPRIVATE void SplitMarkedCells(const SfxRequest& rReq); - SVX_DLLPRIVATE void DistributeColumns( const bool bOptimize ); - SVX_DLLPRIVATE void DistributeRows( const bool bOptimize ); + SVX_DLLPRIVATE void DistributeColumns( const bool bOptimize, const bool bMinimize ); + SVX_DLLPRIVATE void DistributeRows( const bool bOptimize, const bool bMinimize ); SVX_DLLPRIVATE void SetVertical( sal_uInt16 nSId ); SVX_DLLPRIVATE static rtl::Reference< sdr::SelectionController > create( diff --git a/include/svx/svdotable.hxx b/include/svx/svdotable.hxx index ff0f9e77c334..10d6e27f6545 100644 --- a/include/svx/svdotable.hxx +++ b/include/svx/svdotable.hxx @@ -113,8 +113,8 @@ public: void CropTableModelToSelection(const CellPos& rStart, const CellPos& rEnd); // Table stuff - void DistributeColumns( sal_Int32 nFirstColumn, sal_Int32 nLastColumn, const bool bOptimize ); - void DistributeRows( sal_Int32 nFirstRow, sal_Int32 nLastRow, const bool bOptimize ); + void DistributeColumns( sal_Int32 nFirstColumn, sal_Int32 nLastColumn, const bool bOptimize, const bool bMinimize ); + void DistributeRows( sal_Int32 nFirstRow, sal_Int32 nLastRow, const bool bOptimize, const bool bMinimize ); css::uno::Reference< css::table::XTable > getTable() const; |