summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/viewfun2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/viewfun2.cxx')
-rw-r--r--sc/source/ui/view/viewfun2.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 273b2904a6c0..3e400987892e 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -1063,9 +1063,15 @@ bool ScViewFunc::MergeCells( bool bApi, bool& rDoContents, bool bRecord, bool bC
SCTAB i = *itr;
aMergeOption.maTabs.insert(i);
- if (!rDoc.IsBlockEmpty(i, nStartCol, nStartRow+1, nStartCol, nEndRow) ||
- !rDoc.IsBlockEmpty(i, nStartCol+1, nStartRow, nEndCol, nEndRow))
- bAskDialog = true;
+ if ( nEndRow == nStartRow )
+ {
+ if (!rDoc.IsBlockEmpty(i, nStartCol+1, nStartRow, nEndCol, nEndRow))
+ bAskDialog = true;
+ }
+ else
+ if (!rDoc.IsBlockEmpty(i, nStartCol, nStartRow+1, nStartCol, nEndRow) ||
+ !rDoc.IsBlockEmpty(i, nStartCol+1, nStartRow, nEndCol, nEndRow))
+ bAskDialog = true;
}
bool bOk = true;