summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docsh3.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2011-09-09 22:14:37 -0400
committerKohei Yoshida <kohei.yoshida@suse.com>2011-09-12 13:22:05 -0400
commit1920e46282dc096153304d75e2a684d23a3b962c (patch)
treea4a5e4d9d5ba6a3847f8efa286ea7df9459a2120 /sc/source/ui/docshell/docsh3.cxx
parentf1f4c877304cf3cd040d5402481a9ff6c73a0ab9 (diff)
Swapped the 8-param and 3-param variants of PostPaint().
Diffstat (limited to 'sc/source/ui/docshell/docsh3.cxx')
-rw-r--r--sc/source/ui/docshell/docsh3.cxx55
1 files changed, 29 insertions, 26 deletions
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index 9034e39114ab..fc9ab4a948ba 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -114,10 +114,20 @@ void ScDocShell::PostPaint( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, sal_uInt16 nPart,
sal_uInt16 nExtFlags )
{
- if (!ValidCol(nStartCol)) nStartCol = MAXCOL;
- if (!ValidRow(nStartRow)) nStartRow = MAXROW;
- if (!ValidCol(nEndCol)) nEndCol = MAXCOL;
- if (!ValidRow(nEndRow)) nEndRow = MAXROW;
+ ScRange aRange(nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab);
+ PostPaint(aRange, nPart, nExtFlags);
+}
+
+void ScDocShell::PostPaint( const ScRange& rRange, sal_uInt16 nPart, sal_uInt16 nExtFlags )
+{
+ SCCOL nCol1 = rRange.aStart.Col(), nCol2 = rRange.aEnd.Col();
+ SCROW nRow1 = rRange.aStart.Row(), nRow2 = rRange.aEnd.Row();
+ SCTAB nTab1 = rRange.aStart.Tab(), nTab2 = rRange.aEnd.Tab();
+
+ if (!ValidCol(nCol1)) nCol1 = MAXCOL;
+ if (!ValidRow(nRow1)) nRow1 = MAXROW;
+ if (!ValidCol(nCol2)) nCol2 = MAXCOL;
+ if (!ValidRow(nRow2)) nRow2 = MAXROW;
if ( pPaintLockData )
{
@@ -127,8 +137,8 @@ void ScDocShell::PostPaint( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
if ( nLockPart )
{
//! nExtFlags ???
- pPaintLockData->AddRange( ScRange( nStartCol, nStartRow, nStartTab,
- nEndCol, nEndRow, nEndTab ), nLockPart );
+ pPaintLockData->AddRange( ScRange( nCol1, nRow1, nTab1,
+ nCol2, nRow2, nTab2 ), nLockPart );
}
nPart &= PAINT_EXTRAS; // for broadcasting
@@ -140,17 +150,17 @@ void ScDocShell::PostPaint( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
if (nExtFlags & SC_PF_LINES) // Platz fuer Linien beruecksichtigen
{
//! Abfrage auf versteckte Spalten/Zeilen!
- if (nStartCol>0) --nStartCol;
- if (nEndCol<MAXCOL) ++nEndCol;
- if (nStartRow>0) --nStartRow;
- if (nEndRow<MAXROW) ++nEndRow;
+ if (nCol1>0) --nCol1;
+ if (nCol2<MAXCOL) ++nCol2;
+ if (nRow1>0) --nRow1;
+ if (nRow2<MAXROW) ++nRow2;
}
// um zusammengefasste erweitern
if (nExtFlags & SC_PF_TESTMERGE)
- aDocument.ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nStartTab );
+ aDocument.ExtendMerge( nCol1, nRow1, nCol2, nRow2, nTab1 );
- if ( nStartCol != 0 || nEndCol != MAXCOL )
+ if ( nCol1 != 0 || nCol2 != MAXCOL )
{
// Extend to whole rows if SC_PF_WHOLEROWS is set, or rotated or non-left
// aligned cells are contained (see UpdatePaintExt).
@@ -158,26 +168,19 @@ void ScDocShell::PostPaint( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
// support of right-aligned text.
if ( ( nExtFlags & SC_PF_WHOLEROWS ) ||
- aDocument.HasAttrib( nStartCol,nStartRow,nStartTab,
- MAXCOL,nEndRow,nEndTab, HASATTR_ROTATE | HASATTR_RIGHTORCENTER ) )
+ aDocument.HasAttrib( nCol1,nRow1,nTab1,
+ MAXCOL,nRow2,nTab2, HASATTR_ROTATE | HASATTR_RIGHTORCENTER ) )
{
- nStartCol = 0;
- nEndCol = MAXCOL;
+ nCol1 = 0;
+ nCol2 = MAXCOL;
}
}
- Broadcast( ScPaintHint( ScRange( nStartCol, nStartRow, nStartTab,
- nEndCol, nEndRow, nEndTab ), nPart ) );
+ Broadcast( ScPaintHint( ScRange( nCol1, nRow1, nTab1,
+ nCol2, nRow2, nTab2 ), nPart ) );
if ( nPart & PAINT_GRID )
- aDocument.ResetChanged( ScRange(nStartCol,nStartRow,nStartTab,nEndCol,nEndRow,nEndTab) );
-}
-
-void ScDocShell::PostPaint( const ScRange& rRange, sal_uInt16 nPart, sal_uInt16 nExtFlags )
-{
- PostPaint( rRange.aStart.Col(), rRange.aStart.Row(), rRange.aStart.Tab(),
- rRange.aEnd.Col(), rRange.aEnd.Row(), rRange.aEnd.Tab(),
- nPart, nExtFlags );
+ aDocument.ResetChanged( ScRange(nCol1,nRow1,nTab1,nCol2,nRow2,nTab2) );
}
void ScDocShell::PostPaintGridAll()