diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2010-11-30 13:55:00 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2010-11-30 13:55:00 -0500 |
commit | 6683ad4daa97331d1ce06136421cd8ec56190b24 (patch) | |
tree | c98da2a4720006ef06ad12fcffaaf566bbbbecd8 | |
parent | 04608abcf80b8182509a9fc8b5f0d8088c47e045 (diff) |
Don't forget to store sheet index of merged cell range to be re-merged.
This fixes fdo#31805.
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/inc/cellmergeoption.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/view/cellmergeoption.cxx | 13 |
3 files changed, 15 insertions, 3 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index be84aa5dd..abe1c586d 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 86e24167e..01fa0eb27 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 ff5220ec9..2352f0740 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), |