diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-07-31 15:25:18 +0300 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-08-02 11:50:53 +0200 |
commit | 77419fecba82acde2e169dbfc49ff559213b886f (patch) | |
tree | cc3602eee5d16d7ad273133843bdb91a949d0276 /svx/source | |
parent | dcc385e559aea744cecaca96d8b0d17a788381aa (diff) |
tdf#119015: don't call TableModel::optimize in CellCursor::merge()
Better do that explicitly in the SvxTableController::MergeRange, so
that the UI-driven operation still optimizes the table, but import
code gets the initial column count, and not throw trying to access
the deleted column.
Change-Id: Ib4b4d716935ec2036ccb839c36f1be5b0cb878d5
Reviewed-on: https://gerrit.libreoffice.org/58359
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/58371
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/table/cellcursor.cxx | 1 | ||||
-rw-r--r-- | svx/source/table/tablecontroller.cxx | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/svx/source/table/cellcursor.cxx b/svx/source/table/cellcursor.cxx index db68fdb61ab4..2b12292d42cc 100644 --- a/svx/source/table/cellcursor.cxx +++ b/svx/source/table/cellcursor.cxx @@ -251,7 +251,6 @@ void SAL_CALL CellCursor::merge( ) try { mxTable->merge( aStart.mnCol, aStart.mnRow, aEnd.mnCol - aStart.mnCol + 1, aEnd.mnRow - aStart.mnRow + 1 ); - mxTable->optimize(); mxTable->setModified(true); } catch( Exception& ) diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index 6649ba4df9b4..2135362e429c 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -1807,6 +1807,7 @@ void SvxTableController::MergeRange( sal_Int32 nFirstCol, sal_Int32 nFirstRow, s } xRange->merge(); + mxTable->optimize(); if( bUndo ) mpModel->EndUndo(); |