Hello,
this patch removes some code that resulted in strange behavior with merged
areas and shadows. The code extended the merged area by one column/row which
resulted in strange behavior with undo/redo. It seems that the code was an
old hack for the ui part that is no longer needed.
Regards,
Markus
From 9957ff62a8caec17f033cdfbed3a96d3232a31e1 Mon Sep 17 00:00:00 2001
From: Markus Mohrhard markus.mohrh...@googlemail.com
Date: Tue, 6 Sep 2011 21:31:00 +0200
Subject: [PATCH] don't extend the merged area by one for shadows
---
sc/inc/attarray.hxx |2 +-
sc/inc/column.hxx |2 +-
sc/inc/document.hxx |6 +++---
sc/inc/table.hxx |2 +-
sc/source/core/data/attarray.cxx | 15 +--
sc/source/core/data/column.cxx|4 ++--
sc/source/core/data/documen9.cxx |2 +-
sc/source/core/data/document.cxx | 12 ++--
sc/source/core/data/table2.cxx|4 ++--
sc/source/ui/docshell/docfunc.cxx | 10 +-
sc/source/ui/undo/undoblk.cxx |2 +-
sc/source/ui/view/printfun.cxx|2 +-
sc/source/ui/view/viewdata.cxx|2 +-
sc/source/ui/view/viewfun3.cxx|2 +-
14 files changed, 27 insertions(+), 40 deletions(-)
diff --git a/sc/inc/attarray.hxx b/sc/inc/attarray.hxx
index dcf58aa..678fb70 100644
--- a/sc/inc/attarray.hxx
+++ b/sc/inc/attarray.hxx
@@ -161,7 +161,7 @@ public:
boolHasAttrib( SCROW nRow1, SCROW nRow2, sal_uInt16 nMask ) const;
sal_Bool ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
SCCOL rPaintCol, SCROW rPaintRow,
-sal_Bool bRefresh, sal_Bool bAttrs );
+sal_Bool bRefresh );
sal_Bool RemoveAreaMerge( SCROW nStartRow, SCROW nEndRow );
void FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBoolRowSegments rUsedRows, bool bReset );
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index dcd7b64..d4a60af 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -156,7 +156,7 @@ public:
boolHasAttribSelection( const ScMarkData rMark, sal_uInt16 nMask ) const;
boolExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
SCCOL rPaintCol, SCROW rPaintRow,
-bool bRefresh, bool bAttrs );
+bool bRefresh );
bool IsEmptyVisData(bool bNotes) const; // without Broadcaster
bool IsEmptyData() const;
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 4c7202b..1f17f4f 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -811,11 +811,11 @@ public:
sal_BoolExtendMergeSel( SCCOL nStartCol, SCROW nStartRow,
SCCOL rEndCol, SCROW rEndRow, const ScMarkData rMark,
-sal_Bool bRefresh = false, sal_Bool bAttrs = false );
+sal_Bool bRefresh = false );
sal_Bool ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
SCCOL rEndCol, SCROW rEndRow, SCTAB nTab,
-sal_Bool bRefresh = false, sal_Bool bAttrs = false );
-sal_Bool ExtendMerge( ScRange rRange, sal_Bool bRefresh = false, sal_Bool bAttrs = false );
+sal_Bool bRefresh = false );
+sal_Bool ExtendMerge( ScRange rRange, sal_Bool bRefresh = false );
sal_Bool ExtendTotalMerge( ScRange rRange );
SC_DLLPUBLIC sal_Bool ExtendOverlapped( SCCOL rStartCol, SCROW rStartRow,
SCCOL nEndCol, SCROW nEndRow, SCTAB nTab );
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 36bd138..7b47cd0 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -516,7 +516,7 @@ public:
boolHasAttribSelection( const ScMarkData rMark, sal_uInt16 nMask ) const;
boolExtendMerge( SCCOL nStartCol, SCROW nStartRow,
SCCOL rEndCol, SCROW rEndRow,
-sal_Bool bRefresh, sal_Bool bAttrs );
+sal_Bool bRefresh );
const SfxPoolItem* GetAttr( SCCOL nCol, SCROW nRow, sal_uInt16 nWhich ) const;
const ScPatternAttr* GetPattern( SCCOL nCol, SCROW nRow ) const;
const ScPatternAttr*GetMostUsedPattern( SCCOL nCol, SCROW nStartRow, SCROW nEndRow ) const;
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 6741093..5366845 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -1349,7 +1349,7 @@ bool ScAttrArray::HasAttrib( SCROW nRow1, SCROW nRow2, sal_uInt16 nMask ) const
// Area around any given summaries expand and adapt any MergeFlag (bRefresh)
sal_Bool ScAttrArray::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
SCCOL rPaintCol, SCROW rPaintRow,