[Libreoffice-commits] .: Branch 'libreoffice-3-3' - sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Tue Nov 30 10:56:29 PST 2010
sc/source/ui/docshell/docfunc.cxx | 4 +---
sc/source/ui/inc/cellmergeoption.hxx | 1 +
sc/source/ui/view/cellmergeoption.cxx | 13 +++++++++++++
3 files changed, 15 insertions(+), 3 deletions(-)
New commits:
commit 6683ad4daa97331d1ce06136421cd8ec56190b24
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Tue Nov 30 13:55:00 2010 -0500
Don't forget to store sheet index of merged cell range to be re-merged.
This fixes fdo#31805.
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index be84aa5..abe1c58 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 86e2416..01fa0eb 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 ff5220e..2352f07 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),
More information about the Libreoffice-commits
mailing list