diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-07-31 15:25:18 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-07-31 17:58:00 +0200 |
commit | d6f73641ff10286339562075e11c7cbb8e3d2b74 (patch) | |
tree | 1f8822c39dd97c7415fd2be1b8ee57d9c8bda69c /svx/source | |
parent | 52a13e485f6b16eb8be5168897b24931f7a291de (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>
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 d77dbb3ffc59..bdd7156ef669 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 0b4378b7091c..b9c4e8dd23bb 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -1821,6 +1821,7 @@ void SvxTableController::MergeRange( sal_Int32 nFirstCol, sal_Int32 nFirstRow, s } xRange->merge(); + mxTable->optimize(); mbHasJustMerged = true; setSelectedCells( maCursorFirstPos, maCursorFirstPos ); |