summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-09-05 22:01:41 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-09-06 23:53:43 +0200
commit5b47818367290640421f835bdd038bc35c6b0781 (patch)
tree62c41a82c50a3b41d2f576d80c66bec19323510c /sc/source
parent450b31a056a8fb277a7b5f1e6827bb85b4c1f9fd (diff)
merge area does not need to be increased if a shadow is attached
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/attarray.cxx15
-rw-r--r--sc/source/core/data/column.cxx4
-rw-r--r--sc/source/core/data/documen9.cxx2
-rw-r--r--sc/source/core/data/document.cxx12
-rw-r--r--sc/source/core/data/table2.cxx4
-rw-r--r--sc/source/ui/docshell/docfunc.cxx10
-rw-r--r--sc/source/ui/undo/undoblk.cxx2
-rw-r--r--sc/source/ui/view/printfun.cxx2
-rw-r--r--sc/source/ui/view/viewdata.cxx2
-rw-r--r--sc/source/ui/view/viewfun3.cxx2
10 files changed, 21 insertions, 34 deletions
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 4296beb707a0..d2a75b126b5a 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -1352,7 +1352,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,
- sal_Bool bRefresh, sal_Bool bAttrs )
+ sal_Bool bRefresh )
{
const ScPatternAttr* pPattern;
const ScMergeAttr* pItem;
@@ -1379,19 +1379,6 @@ sal_Bool ScAttrArray::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRo
rPaintRow = nMergeEndRow;
bFound = sal_True;
- if (bAttrs)
- {
- const SvxShadowItem* pShadow =
- (const SvxShadowItem*) &pPattern->GetItem( ATTR_SHADOW );
- SvxShadowLocation eLoc = pShadow->GetLocation();
- if ( eLoc == SVX_SHADOW_TOPRIGHT || eLoc == SVX_SHADOW_BOTTOMRIGHT )
- if ( nMergeEndCol+1 > rPaintCol && nMergeEndCol < MAXCOL )
- rPaintCol = nMergeEndCol+1;
- if ( eLoc == SVX_SHADOW_BOTTOMLEFT || eLoc == SVX_SHADOW_BOTTOMRIGHT )
- if ( nMergeEndRow+1 > rPaintRow && nMergeEndRow < MAXROW )
- rPaintRow = nMergeEndRow+1;
- }
-
if (bRefresh)
{
if ( nMergeEndCol > nThisCol )
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 680861723040..055dec55b628 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -280,9 +280,9 @@ bool ScColumn::HasAttribSelection( const ScMarkData& rMark, sal_uInt16 nMask ) c
bool ScColumn::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
SCCOL& rPaintCol, SCROW& rPaintRow,
- bool bRefresh, bool bAttrs )
+ bool bRefresh )
{
- return pAttrArray->ExtendMerge( nThisCol, nStartRow, nEndRow, rPaintCol, rPaintRow, bRefresh, bAttrs );
+ return pAttrArray->ExtendMerge( nThisCol, nStartRow, nEndRow, rPaintCol, rPaintRow, bRefresh );
}
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index 86bc7677f762..f7561608e50d 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -513,7 +513,7 @@ sal_Bool ScDocument::IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
SCROW nTmpRow = nEndRow;
pThis->ExtendMerge( 0,nStartRow, nExtendCol,nTmpRow, nTab,
- false, sal_True ); // kein Refresh, incl. Attrs
+ false ); // kein Refresh, incl. Attrs
OutputDevice* pDev = pThis->GetPrinter();
pDev->SetMapMode( MAP_PIXEL ); // wichtig fuer GetNeededSize
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index dcb95021d48c..5522ac169e67 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -4977,7 +4977,7 @@ sal_Bool ScDocument::ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow,
sal_Bool ScDocument::ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow,
SCCOL& rEndCol, SCROW& rEndRow,
- const ScMarkData& rMark, sal_Bool bRefresh, sal_Bool bAttrs )
+ const ScMarkData& rMark, sal_Bool bRefresh )
{
// use all selected sheets from rMark
@@ -4992,7 +4992,7 @@ sal_Bool ScDocument::ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow,
{
SCCOL nThisEndCol = nOldEndCol;
SCROW nThisEndRow = nOldEndRow;
- if ( ExtendMerge( nStartCol, nStartRow, nThisEndCol, nThisEndRow, *itr, bRefresh, bAttrs ) )
+ if ( ExtendMerge( nStartCol, nStartRow, nThisEndCol, nThisEndRow, *itr, bRefresh ) )
bFound = true;
if ( nThisEndCol > rEndCol )
rEndCol = nThisEndCol;
@@ -5006,13 +5006,13 @@ sal_Bool ScDocument::ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow,
sal_Bool ScDocument::ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
SCCOL& rEndCol, SCROW& rEndRow,
- SCTAB nTab, sal_Bool bRefresh, sal_Bool bAttrs )
+ SCTAB nTab, sal_Bool bRefresh )
{
bool bFound = false;
if ( ValidColRow(nStartCol,nStartRow) && ValidColRow(rEndCol,rEndRow) && ValidTab(nTab) )
{
if (nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
- bFound = maTabs[nTab]->ExtendMerge( nStartCol, nStartRow, rEndCol, rEndRow, bRefresh, bAttrs );
+ bFound = maTabs[nTab]->ExtendMerge( nStartCol, nStartRow, rEndCol, rEndRow, bRefresh );
if (bRefresh)
RefreshAutoFilter( nStartCol, nStartRow, rEndCol, rEndRow, nTab );
@@ -5026,7 +5026,7 @@ sal_Bool ScDocument::ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
}
-sal_Bool ScDocument::ExtendMerge( ScRange& rRange, sal_Bool bRefresh, sal_Bool bAttrs )
+sal_Bool ScDocument::ExtendMerge( ScRange& rRange, sal_Bool bRefresh )
{
bool bFound = false;
SCTAB nStartTab = rRange.aStart.Tab();
@@ -5041,7 +5041,7 @@ sal_Bool ScDocument::ExtendMerge( ScRange& rRange, sal_Bool bRefresh, sal_Bool b
SCROW nExtendRow = rRange.aEnd.Row();
if (ExtendMerge( rRange.aStart.Col(), rRange.aStart.Row(),
nExtendCol, nExtendRow,
- nTab, bRefresh, bAttrs ) )
+ nTab, bRefresh ) )
{
bFound = true;
if (nExtendCol > nEndCol) nEndCol = nExtendCol;
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 812b07f4ccce..6b1835970f14 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -1397,7 +1397,7 @@ bool ScTable::HasAttribSelection( const ScMarkData& rMark, sal_uInt16 nMask ) co
bool ScTable::ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
SCCOL& rEndCol, SCROW& rEndRow,
- bool bRefresh, bool bAttrs )
+ bool bRefresh )
{
if (!(ValidCol(nStartCol) && ValidCol(rEndCol)))
{
@@ -1408,7 +1408,7 @@ bool ScTable::ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
SCCOL nOldEndX = rEndCol;
SCROW nOldEndY = rEndRow;
for (SCCOL i=nStartCol; i<=nOldEndX; i++)
- bFound |= aCol[i].ExtendMerge( i, nStartRow, nOldEndY, rEndCol, rEndRow, bRefresh, bAttrs );
+ bFound |= aCol[i].ExtendMerge( i, nStartRow, nOldEndY, rEndCol, rEndRow, bRefresh );
return bFound;
}
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 7d2774b47942..7410da8f224e 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -1537,7 +1537,7 @@ sal_Bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMa
{
ScRange aRange( nTestCol, nTestRow1, i );
pDoc->ExtendOverlapped(aRange);
- pDoc->ExtendMerge(aRange, sal_True, sal_True);
+ pDoc->ExtendMerge(aRange, sal_True);
if( nTestRow1 < nTestRow2 && nNewFlags == SC_MF_HOR )
{
@@ -1545,7 +1545,7 @@ sal_Bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMa
{
ScRange aTestRange( nTestCol, nTestRow, i );
pDoc->ExtendOverlapped( aTestRange );
- pDoc->ExtendMerge( aTestRange, sal_True, sal_True);
+ pDoc->ExtendMerge( aTestRange, sal_True);
ScRange aMergeRange( aTestRange.aStart.Col(),aTestRange.aStart.Row(), i );
if( !aExtendRange.In( aMergeRange ) )
{
@@ -1940,7 +1940,7 @@ sal_Bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMa
{
ScRange aRange( nTestCol, nTestRow1, i );
pDoc->ExtendOverlapped( aRange );
- pDoc->ExtendMerge( aRange, sal_True, sal_True );
+ pDoc->ExtendMerge( aRange, sal_True );
if( nTestRow1 < nTestRow2 && nNewFlags == SC_MF_HOR )
{
@@ -1948,7 +1948,7 @@ sal_Bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMa
{
ScRange aTestRange( nTestCol, nTestRow, i );
pDoc->ExtendOverlapped( aTestRange );
- pDoc->ExtendMerge( aTestRange, sal_True, sal_True);
+ pDoc->ExtendMerge( aTestRange, sal_True );
ScRange aMergeRange( aTestRange.aStart.Col(),aTestRange.aStart.Row(), i );
if( !aExtendRange.In( aMergeRange ) )
{
@@ -4446,7 +4446,7 @@ bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, sal_Bool bRecord
aExtended.aEnd.Col(), aExtended.aEnd.Row(), nTab,
SC_MF_HOR | SC_MF_VER );
- pDoc->ExtendMerge( aRefresh, sal_True, false );
+ pDoc->ExtendMerge( aRefresh, sal_True );
if ( !AdjustRowHeight( aExtended ) )
rDocShell.PostPaint( aExtended, PAINT_GRID );
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 6625dc08be77..79496b01ddd3 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -2136,7 +2136,7 @@ void ScUndoRemoveMerge::Redo()
maOption.mnEndCol, maOption.mnEndRow, nTab,
SC_MF_HOR | SC_MF_VER );
- pDoc->ExtendMerge(aRange, true, false);
+ pDoc->ExtendMerge(aRange, true);
// Paint
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index a1ee4dfb457f..43d6a5d481b2 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -757,7 +757,7 @@ sal_Bool ScPrintFunc::AdjustPrintArea( sal_Bool bNew )
}
pDoc->ExtendMerge( nStartCol,nStartRow, nEndCol,nEndRow, nPrintTab,
- false, sal_True ); // kein Refresh, incl. Attrs
+ false ); // kein Refresh, incl. Attrs
if ( bChangeCol )
{
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 37830ee3bf84..10b9e4160de5 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -1831,7 +1831,7 @@ sal_Bool ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWh
pDoc->RemoveFlagsTab( 0,0, MAXCOL,MAXROW, nTabNo, SC_MF_HOR | SC_MF_VER );
SCCOL nEndCol = MAXCOL;
SCROW nEndRow = MAXROW;
- pDoc->ExtendMerge( 0,0, nEndCol,nEndRow, nTabNo, sal_True, false );
+ pDoc->ExtendMerge( 0,0, nEndCol,nEndRow, nTabNo, sal_True );
if (pDocShell)
pDocShell->PostPaint( ScRange(0,0,nTabNo,MAXCOL,MAXROW,nTabNo), PAINT_GRID );
}
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index a3c1ab317eb9..bc418f7b6352 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -1270,7 +1270,7 @@ sal_Bool ScViewFunc::PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc,
{
ScRange aRange(nCol, nRow1, nStartTab);
pDoc->ExtendOverlapped(aRange);
- pDoc->ExtendMerge(aRange, sal_True, sal_True);
+ pDoc->ExtendMerge(aRange, sal_True);
rDocFunc.UnmergeCells(aRange, bRecord, sal_True);
}
}