[Libreoffice-commits] core.git: include/svx svx/source
Daniel
danielfaleirosilva at gmail.com
Mon May 21 13:51:54 UTC 2018
include/svx/sdr/table/tablecontroller.hxx | 1 +
svx/source/table/tablecontroller.cxx | 12 +++++++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
New commits:
commit 7c5f1caa775e6a3d178c7dae7171d3fca2874635
Author: Daniel <danielfaleirosilva at gmail.com>
Date: Thu May 17 10:23:24 2018 -0300
tdf#117581 impress: fix selection overlay after moving table
Change-Id: Ie5afa4fbddf86c6692a7ed68af9ef990c2f9f487
Reviewed-on: https://gerrit.libreoffice.org/54493
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/include/svx/sdr/table/tablecontroller.hxx b/include/svx/sdr/table/tablecontroller.hxx
index 3a8ec322aaeb..130d57a6da3e 100644
--- a/include/svx/sdr/table/tablecontroller.hxx
+++ b/include/svx/sdr/table/tablecontroller.hxx
@@ -177,6 +177,7 @@ private:
CellPos maCursorFirstPos;
CellPos maCursorLastPos;
bool mbCellSelectionMode;
+ bool mbHasJustMerged;
CellPos maMouseDownPos;
bool mbLeftButtonDown;
std::unique_ptr<sdr::overlay::OverlayObjectList> mpSelectionOverlay;
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index 3568fa743fd7..3241f2c7d304 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -172,6 +172,7 @@ SvxTableController::SvxTableController(
SdrView& rView,
const SdrTableObj& rObj)
: mbCellSelectionMode(false)
+ ,mbHasJustMerged(false)
,mbLeftButtonDown(false)
,mpSelectionOverlay(nullptr)
,mrView(rView)
@@ -1820,6 +1821,8 @@ void SvxTableController::MergeRange( sal_Int32 nFirstCol, sal_Int32 nFirstRow, s
}
xRange->merge();
+ mbHasJustMerged = true;
+ setSelectedCells( maCursorFirstPos, maCursorFirstPos );
if( bUndo )
rModel.EndUndo();
@@ -2144,6 +2147,11 @@ void SvxTableController::onTableModified()
void SvxTableController::updateSelectionOverlay()
{
+ // There is no need to update selection overlay after merging cells
+ // since the selection overlay should remain the same
+ if ( mbHasJustMerged )
+ return;
+
destroySelectionOverlay();
if( mbCellSelectionMode )
{
@@ -2792,9 +2800,11 @@ IMPL_LINK_NOARG(SvxTableController, UpdateHdl, void*, void)
if( aStart != maCursorFirstPos || aEnd != maCursorLastPos )
{
setSelectedCells( aStart, aEnd );
- updateSelectionOverlay();
}
}
+
+ updateSelectionOverlay();
+ mbHasJustMerged = false;
}
namespace
More information about the Libreoffice-commits
mailing list