summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-11-30 13:55:00 -0500
committerKohei Yoshida <kyoshida@novell.com>2010-11-30 13:55:00 -0500
commit182bd344859d1658b806749f9c97e40bea531ef6 (patch)
treed84e0cad99c92592ee2621187a494746e1db9d2f /sc
parentbb4c10eb0c7a620edf49970bd85e749aa2268700 (diff)
Don't forget to store sheet index of merged cell range to be re-merged.
This fixes fdo#31805.
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/docshell/docfunc.cxx4
-rw-r--r--sc/source/ui/inc/cellmergeoption.hxx1
-rw-r--r--sc/source/ui/view/cellmergeoption.cxx13
3 files changed, 15 insertions, 3 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index a962c72913b9..5a6d55e8f60f 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -2200,9 +2200,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
if( !pDoc->HasAttrib( aRange, HASATTR_OVERLAPPED | HASATTR_MERGED ) )
{
- ScCellMergeOption aMergeOption(
- aRange.aStart.Col(), aRange.aStart.Row(),
- aRange.aEnd.Col(), aRange.aEnd.Row() );
+ ScCellMergeOption aMergeOption(aRange);
MergeCells( aMergeOption, FALSE, TRUE, TRUE );
}
qDecreaseRange.pop_back();
diff --git a/sc/source/ui/inc/cellmergeoption.hxx b/sc/source/ui/inc/cellmergeoption.hxx
index 86e24167e9f1..01fa0eb273b6 100644
--- a/sc/source/ui/inc/cellmergeoption.hxx
+++ b/sc/source/ui/inc/cellmergeoption.hxx
@@ -48,6 +48,7 @@ struct ScCellMergeOption
bool mbCenter;
explicit ScCellMergeOption();
+ explicit ScCellMergeOption(const ScRange& rRange);
explicit ScCellMergeOption(SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow,
bool bCenter = false);
diff --git a/sc/source/ui/view/cellmergeoption.cxx b/sc/source/ui/view/cellmergeoption.cxx
index ff5220ec907e..2352f0740ece 100644
--- a/sc/source/ui/view/cellmergeoption.cxx
+++ b/sc/source/ui/view/cellmergeoption.cxx
@@ -41,6 +41,19 @@ ScCellMergeOption::ScCellMergeOption() :
{
}
+ScCellMergeOption::ScCellMergeOption(const ScRange& rRange) :
+ mnStartCol(rRange.aStart.Col()),
+ mnStartRow(rRange.aStart.Row()),
+ mnEndCol(rRange.aEnd.Col()),
+ mnEndRow(rRange.aEnd.Row()),
+ mbCenter(false)
+{
+ SCTAB nTab1 = rRange.aStart.Tab();
+ SCTAB nTab2 = rRange.aEnd.Tab();
+ for (SCTAB i = nTab1; i <= nTab2; ++i)
+ maTabs.insert(i);
+}
+
ScCellMergeOption::ScCellMergeOption(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool bCenter) :
mnStartCol(nStartCol),
mnStartRow(nStartRow),