diff options
author | Dennis Francis <dennisfrancis.in@gmail.com> | 2016-10-07 12:15:33 +0530 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-11-11 14:33:00 +0000 |
commit | efecee353f55640dd5cdf1a0f5d3f4e562ed5e43 (patch) | |
tree | 6b04ffe1ca3be0bf516751d97906c9241b1e4134 | |
parent | fa194e7dfc971fe3c90cdfdbf9ded3955d107202 (diff) |
tdf#101299 : do not show merge cells context menu for the trivial case
Change-Id: I4e5726009ac5ef60ffa74f3bbbe01683c3658e95
Reviewed-on: https://gerrit.libreoffice.org/29583
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r-- | sc/source/ui/view/viewfun2.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 76d600a14828..ee8f6f7e854a 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -1011,8 +1011,11 @@ bool ScViewFunc::TestMergeCells() // pre-test (for menu) const ScMarkData& rMark = GetViewData().GetMarkData(); if ( rMark.IsMarked() || rMark.IsMultiMarked() ) { - ScRange aDummy; - return GetViewData().GetSimpleArea( aDummy) == SC_MARK_SIMPLE; + ScRange aRange; + bool bMergable = ( GetViewData().GetSimpleArea( aRange ) == SC_MARK_SIMPLE ); + bMergable = bMergable && ( aRange.aStart.Col() != aRange.aEnd.Col() || + aRange.aStart.Row() != aRange.aEnd.Row() ); + return bMergable; } else return false; |