diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-09-06 21:31:00 +0200 |
---|---|---|
committer | Eike Rathke <erack@erack.de> | 2011-09-07 17:54:56 +0200 |
commit | 577bf305f26f70cb3ef9dee9f0063f8bbbb3e51b (patch) | |
tree | 7a6bec945ecf3902fdaac1f6af1fe5517bf1b27e | |
parent | 3eea3945e2457667a4e16d93bd2dec4ffaa88011 (diff) |
don't extend the merged area by one for shadows
Signed-off-by: Eike Rathke <erack@erack.de>
-rw-r--r-- | sc/inc/attarray.hxx | 2 | ||||
-rw-r--r-- | sc/inc/column.hxx | 2 | ||||
-rw-r--r-- | sc/inc/document.hxx | 6 | ||||
-rw-r--r-- | sc/inc/table.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/attarray.cxx | 15 | ||||
-rw-r--r-- | sc/source/core/data/column.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/documen9.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/document.cxx | 12 | ||||
-rw-r--r-- | sc/source/core/data/table2.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 10 | ||||
-rw-r--r-- | sc/source/ui/undo/undoblk.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/printfun.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/viewdata.cxx | 2 | ||||
-rw-r--r-- | 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 dcf58aaac..678fb702f 100644 --- a/sc/inc/attarray.hxx +++ b/sc/inc/attarray.hxx @@ -161,7 +161,7 @@ public: bool HasAttrib( 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 dcd7b648d..d4a60af48 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -156,7 +156,7 @@ public: bool HasAttribSelection( const ScMarkData& rMark, sal_uInt16 nMask ) const; bool ExtendMerge( 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 4c7202b05..1f17f4f1b 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -811,11 +811,11 @@ public: sal_Bool ExtendMergeSel( 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 36bd13874..7b47cd06d 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -516,7 +516,7 @@ public: bool HasAttribSelection( const ScMarkData& rMark, sal_uInt16 nMask ) const; bool ExtendMerge( 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 67410939f..5366845d3 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, - sal_Bool bRefresh, sal_Bool bAttrs ) + sal_Bool bRefresh ) { const ScPatternAttr* pPattern; const ScMergeAttr* pItem; @@ -1376,19 +1376,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 471c0dcd1..5fecb2df7 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 3d58b877a..2dc90d666 100644 --- a/sc/source/core/data/documen9.cxx +++ b/sc/source/core/data/documen9.cxx @@ -512,7 +512,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 6668b748c..fa8031154 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -4677,7 +4677,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 @@ -4690,7 +4690,7 @@ sal_Bool ScDocument::ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow, { SCCOL nThisEndCol = nOldEndCol; SCROW nThisEndRow = nOldEndRow; - if ( ExtendMerge( nStartCol, nStartRow, nThisEndCol, nThisEndRow, nTab, bRefresh, bAttrs ) ) + if ( ExtendMerge( nStartCol, nStartRow, nThisEndCol, nThisEndRow, nTab, bRefresh ) ) bFound = sal_True; if ( nThisEndCol > rEndCol ) rEndCol = nThisEndCol; @@ -4704,13 +4704,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 ) { sal_Bool bFound = false; if ( ValidColRow(nStartCol,nStartRow) && ValidColRow(rEndCol,rEndRow) && ValidTab(nTab) ) { if (pTab[nTab]) - bFound = pTab[nTab]->ExtendMerge( nStartCol, nStartRow, rEndCol, rEndRow, bRefresh, bAttrs ); + bFound = pTab[nTab]->ExtendMerge( nStartCol, nStartRow, rEndCol, rEndRow, bRefresh ); if (bRefresh) RefreshAutoFilter( nStartCol, nStartRow, rEndCol, rEndRow, nTab ); @@ -4724,7 +4724,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 ) { sal_Bool bFound = false; SCTAB nStartTab = rRange.aStart.Tab(); @@ -4739,7 +4739,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 = sal_True; if (nExtendCol > nEndCol) nEndCol = nExtendCol; diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 37b9e7550..7d7d554a1 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -1389,7 +1389,7 @@ bool ScTable::HasAttribSelection( const ScMarkData& rMark, sal_uInt16 nMask ) co bool ScTable::ExtendMerge( SCCOL nStartCol, SCROW nStartRow, SCCOL& rEndCol, SCROW& rEndRow, - sal_Bool bRefresh, sal_Bool bAttrs ) + sal_Bool bRefresh ) { if (!(ValidCol(nStartCol) && ValidCol(rEndCol))) { @@ -1400,7 +1400,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 89d99b938..24e451711 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -1536,7 +1536,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 ) { @@ -1544,7 +1544,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 ) ) { @@ -1946,7 +1946,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 ) { @@ -1954,7 +1954,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 ) ) { @@ -4458,7 +4458,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 71dded2b6..17588d5a5 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -2131,7 +2131,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 7fd44dcb8..0943ff172 100644 --- a/sc/source/ui/view/printfun.cxx +++ b/sc/source/ui/view/printfun.cxx @@ -779,7 +779,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 c3e4d0c15..96ccccb26 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -1820,7 +1820,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 222571a9a..f0aa3b5e4 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -1424,7 +1424,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); } } |