summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2011-09-09 22:08:28 -0400
committerKohei Yoshida <kohei.yoshida@suse.com>2011-09-12 13:22:05 -0400
commitf1f4c877304cf3cd040d5402481a9ff6c73a0ab9 (patch)
tree0b3e17644f051731347c84c689f6c2be1799927a
parentcb0f9de5bce9622bd98582a6f69ceb10a93402c4 (diff)
Some attempts to remove the 8-param variant of PostPaint().
But there are way too many codes calling that one. Maybe someday...
-rw-r--r--sc/source/ui/docshell/arealink.cxx5
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx24
-rw-r--r--sc/source/ui/docshell/dbdocimp.cxx2
-rw-r--r--sc/source/ui/docshell/docfunc.cxx4
-rw-r--r--sc/source/ui/miscdlgs/crnrdlg.cxx2
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx2
-rw-r--r--sc/source/ui/unoobj/confuno.cxx2
-rw-r--r--sc/source/ui/unoobj/defltuno.cxx2
-rw-r--r--sc/source/ui/view/dbfunc.cxx8
-rw-r--r--sc/source/ui/view/dbfunc3.cxx9
-rw-r--r--sc/source/ui/view/viewfun3.cxx25
11 files changed, 46 insertions, 39 deletions
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index 9928ea783eb9..1fe0b9887c69 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -473,8 +473,9 @@ sal_Bool ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
nPaintEndY = MAXROW;
if ( !pImpl->m_pDocSh->AdjustRowHeight( aDestPos.Row(), nPaintEndY, nDestTab ) )
- pImpl->m_pDocSh->PostPaint( aDestPos.Col(),aDestPos.Row(),nDestTab,
- nPaintEndX,nPaintEndY,nDestTab, PAINT_GRID );
+ pImpl->m_pDocSh->PostPaint(
+ ScRange(aDestPos.Col(), aDestPos.Row(), nDestTab, nPaintEndX, nPaintEndY, nDestTab),
+ PAINT_GRID);
aModificator.SetDocumentModified();
}
else
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 5cc9e778574d..6bf85b573937 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -419,8 +419,8 @@ bool ScDBDocFunc::RepeatDB( const ::rtl::OUString& rDBName, bool bRecord, bool b
pOld, pNew ) );
}
- rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab,
- PAINT_GRID | PAINT_LEFT | PAINT_TOP | PAINT_SIZE );
+ rDocShell.PostPaint(ScRange(0, 0, nTab, MAXCOL, MAXROW, nTab),
+ PAINT_GRID | PAINT_LEFT | PAINT_TOP | PAINT_SIZE);
bDone = sal_True;
}
else if (!bApi) // "Keine Operationen auszufuehren"
@@ -654,7 +654,7 @@ sal_Bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
if ( nEndY < aOldDest.aEnd.Row() )
nEndY = aOldDest.aEnd.Row();
}
- rDocShell.PostPaint( nStartX, nStartY, nTab, nEndX, nEndY, nTab, nPaint );
+ rDocShell.PostPaint(ScRange(nStartX, nStartY, nTab, nEndX, nEndY, nTab), nPaint);
}
// AdjustRowHeight( aLocalParam.nRow1, aLocalParam.nRow2, bPaint );
@@ -991,12 +991,14 @@ sal_Bool ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
}
if (bDoSize)
nEndY = MAXROW;
- rDocShell.PostPaint( aLocalParam.nCol1, aLocalParam.nRow1, nDestTab,
- nEndX, nEndY, nDestTab, PAINT_GRID );
+ rDocShell.PostPaint(
+ ScRange(aLocalParam.nCol1, aLocalParam.nRow1, nDestTab, nEndX, nEndY, nDestTab),
+ PAINT_GRID);
}
else
- rDocShell.PostPaint( 0, rQueryParam.nRow1, nTab, MAXCOL, MAXROW, nTab,
- PAINT_GRID | PAINT_LEFT );
+ rDocShell.PostPaint(
+ ScRange(0, rQueryParam.nRow1, nTab, MAXCOL, MAXROW, nTab),
+ PAINT_GRID | PAINT_LEFT);
aModificator.SetDocumentModified();
return sal_True;
@@ -1159,8 +1161,8 @@ sal_Bool ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
pDBData->SetArea( nTab, aNewParam.nCol1,aNewParam.nRow1, aNewParam.nCol2,aNewParam.nRow2 );
pDoc->CompileDBFormula();
- rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab,
- PAINT_GRID | PAINT_LEFT | PAINT_TOP | PAINT_SIZE );
+ rDocShell.PostPaint(ScRange(0, 0, nTab, MAXCOL,MAXROW,nTab),
+ PAINT_GRID | PAINT_LEFT | PAINT_TOP | PAINT_SIZE);
aModificator.SetDocumentModified();
bRet = bSuccess;
@@ -1259,9 +1261,7 @@ sal_Bool ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pN
pDoc->GetDPCollection()->FreeTable( pOldObj ); // object is deleted here
rDocShell.PostPaintGridAll(); //! only necessary parts
- rDocShell.PostPaint( aRange.aStart.Col(), aRange.aStart.Row(), nTab,
- aRange.aEnd.Col(), aRange.aEnd.Row(), nTab,
- PAINT_GRID );
+ rDocShell.PostPaint(aRange, PAINT_GRID);
bDone = sal_True;
}
else if ( pNewObj )
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index 88a1a54abb72..1dc6c1ce43ac 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -682,7 +682,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
}
pDoc->SetDirty();
- rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID );
+ rDocShell.PostPaint(ScRange(0, 0, nTab, MAXCOL, MAXROW, nTab), PAINT_GRID);
aModificator.SetDocumentModified();
ScDBRangeRefreshedHint aHint( rParam );
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index dbb567ff455f..6dad099859a0 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -178,8 +178,8 @@ sal_Bool ScDocFunc::AdjustRowHeight( const ScRange& rRange, sal_Bool bPaint )
aProv.GetPPTX(), aProv.GetPPTY(), aOne, aOne, false );
if ( bPaint && bChanged )
- rDocShell.PostPaint( 0, nStartRow, nTab, MAXCOL, MAXROW, nTab,
- PAINT_GRID | PAINT_LEFT );
+ rDocShell.PostPaint(ScRange(0, nStartRow, nTab, MAXCOL, MAXROW, nTab),
+ PAINT_GRID | PAINT_LEFT);
return bChanged;
}
diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx
index 49fbe93e017f..ebe2bb1e5bea 100644
--- a/sc/source/ui/miscdlgs/crnrdlg.cxx
+++ b/sc/source/ui/miscdlgs/crnrdlg.cxx
@@ -720,7 +720,7 @@ IMPL_LINK( ScColRowNameRangesDlg, OkBtnHdl, void *, EMPTYARG )
// geaenderte Datenbereiche muessen sich auswirken
pDoc->CompileColRowNameFormula();
ScDocShell* pDocShell = pViewData->GetDocShell();
- pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID );
+ pDocShell->PostPaint(ScRange(0, 0, 0, MAXCOL, MAXROW, MAXTAB), PAINT_GRID);
pDocShell->SetDocumentModified();
Close();
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 294d42693f57..52587e58abec 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -7196,7 +7196,7 @@ void SAL_CALL ScTableSheetObj::removeAllManualPageBreaks() throw(uno::RuntimeExc
//? UpdatePageBreakData( sal_True );
pDocSh->SetDocumentModified();
- pDocSh->PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID );
+ pDocSh->PostPaint(ScRange(0, 0, nTab, MAXCOL, MAXROW, nTab), PAINT_GRID);
}
}
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index fc05a9a4401e..c8f0bf226af7 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -320,7 +320,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
if ( !pDocShell->AdjustRowHeight( 0, MAXROW, nTab ) )
- pDocShell->PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID );
+ pDocShell->PostPaint(ScRange(0, 0, nTab, MAXCOL, MAXROW, nTab), PAINT_GRID);
pDocShell->SetDocumentModified();
}
}
diff --git a/sc/source/ui/unoobj/defltuno.cxx b/sc/source/ui/unoobj/defltuno.cxx
index 71193ff7f2fe..916d958f4641 100644
--- a/sc/source/ui/unoobj/defltuno.cxx
+++ b/sc/source/ui/unoobj/defltuno.cxx
@@ -120,7 +120,7 @@ void ScDocDefaultsObj::ItemsChanged()
{
//! if not in XML import, adjust row heights
- pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID );
+ pDocShell->PostPaint(ScRange(0, 0, 0, MAXCOL, MAXROW, MAXTAB), PAINT_GRID);
}
}
diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx
index c1b5502977ef..23ac9a9d9a00 100644
--- a/sc/source/ui/view/dbfunc.cxx
+++ b/sc/source/ui/view/dbfunc.cxx
@@ -243,7 +243,7 @@ void ScDBFunc::NotifyCloseDbNameDlg( const ScDBCollection& rNewColl, const std::
pDoc->SetDBCollection( new ScDBCollection( rNewColl ) );
pDoc->CompileDBFormula( false ); // CompileFormulaString
pOldColl = NULL;
- pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID );
+ pDocShell->PostPaint(ScRange(0, 0, 0, MAXCOL, MAXROW, MAXTAB), PAINT_GRID);
aModificator.SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
@@ -442,8 +442,8 @@ void ScDBFunc::ToggleAutoFilter()
GetAttr( nCol, nRow, nTab, ATTR_MERGE_FLAG ))->GetValue();
pDoc->ApplyAttr( nCol, nRow, nTab, ScMergeFlagAttr( nFlag | SC_MF_AUTO ) );
}
- pDocSh->PostPaint( aParam.nCol1, nRow, nTab, aParam.nCol2, nRow, nTab,
- PAINT_GRID );
+ pDocSh->PostPaint(ScRange(aParam.nCol1, nRow, nTab, aParam.nCol2, nRow, nTab),
+ PAINT_GRID);
bPaint = sal_True;
}
else
@@ -495,7 +495,7 @@ void ScDBFunc::HideAutoFilter()
pDBData->SetAutoFilter(false);
- pDocSh->PostPaint( nCol1,nRow1,nTab, nCol2,nRow1,nTab, PAINT_GRID );
+ pDocSh->PostPaint(ScRange(nCol1, nRow1, nTab, nCol2, nRow1, nTab), PAINT_GRID );
aModificator.SetDocumentModified();
SfxBindings& rBindings = GetViewData()->GetBindings();
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 0788988ce97c..9bacc3960866 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -560,8 +560,8 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, sal_Bool bRecord,
aNewParam.nCol2,aNewParam.nRow2,nTab ) );
MarkDataChanged();
- pDocSh->PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab,
- PAINT_GRID | PAINT_LEFT | PAINT_TOP | PAINT_SIZE );
+ pDocSh->PostPaint(ScRange(0, 0, nTab, MAXCOL, MAXROW, nTab),
+ PAINT_GRID | PAINT_LEFT | PAINT_TOP | PAINT_SIZE);
aModificator.SetDocumentModified();
@@ -2324,8 +2324,9 @@ void ScDBFunc::RepeatDB( sal_Bool bRecord )
pOld, pNew ) );
}
- GetViewData()->GetDocShell()->PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab,
- PAINT_GRID | PAINT_LEFT | PAINT_TOP | PAINT_SIZE );
+ GetViewData()->GetDocShell()->PostPaint(
+ ScRange(0, 0, nTab, MAXCOL, MAXROW, nTab),
+ PAINT_GRID | PAINT_LEFT | PAINT_TOP | PAINT_SIZE);
}
else // "Keine Operationen auszufuehren"
ErrorMessage(STR_MSSG_REPEATDB_0);
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index b914a2a7f98b..80019d2f6c24 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -1436,9 +1436,11 @@ bool ScViewFunc::PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc,
if (bCutMode)
if (pDoc->RefreshAutoFilter( nClipStartX,nClipStartY, nClipStartX+nClipSizeX,
nClipStartY+nClipSizeY, nStartTab ))
- pDocSh->PostPaint( nClipStartX,nClipStartY,nStartTab,
- nClipStartX+nClipSizeX,nClipStartY,nStartTab,
- PAINT_GRID );
+ {
+ pDocSh->PostPaint(
+ ScRange(nClipStartX, nClipStartY, nStartTab, nClipStartX+nClipSizeX, nClipStartY, nStartTab),
+ PAINT_GRID );
+ }
ShowCursor(); // Cursor aendert sich !
@@ -1508,8 +1510,9 @@ bool ScViewFunc::PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc,
nPaint |= PAINT_LEFT;
nUndoEndRow = MAXROW; // nur zum Zeichnen !
}
- pDocSh->PostPaint( nStartCol, nStartRow, nStartTab,
- nUndoEndCol, nUndoEndRow, nEndTab, nPaint, nExtFlags );
+ pDocSh->PostPaint(
+ ScRange(nStartCol, nStartRow, nStartTab, nUndoEndCol, nUndoEndRow, nEndTab),
+ nPaint, nExtFlags);
// AdjustBlockHeight has already been called above
aModificator.SetDocumentModified();
@@ -1653,9 +1656,10 @@ bool ScViewFunc::PasteMultiRangesFromClip(
true, false, false, true);
}
- pDocSh->PostPaint(
- aMarkedRange.aStart.Col(), aMarkedRange.aStart.Row(), nTab1,
- aMarkedRange.aEnd.Col(), aMarkedRange.aEnd.Row(), nTab1, PAINT_GRID);
+ ScRange aTmp = aMarkedRange;
+ aTmp.aStart.SetTab(nTab1);
+ aTmp.aEnd.SetTab(nTab1);
+ pDocSh->PostPaint(aTmp, PAINT_GRID);
if (pDoc->IsUndoEnabled())
{
@@ -2082,8 +2086,9 @@ void ScViewFunc::DataFormPutData( SCROW nCurrentRow ,
nUndoEndRow = MAXROW; // nur zum Zeichnen !
}
- pDocSh->PostPaint( nStartCol, nCurrentRow, nStartTab,
- nUndoEndCol, nUndoEndRow, nEndTab, nPaint, nExtFlags );
+ pDocSh->PostPaint(
+ ScRange(nStartCol, nCurrentRow, nStartTab, nUndoEndCol, nUndoEndRow, nEndTab),
+ nPaint, nExtFlags);
pDocSh->UpdateOle(GetViewData());
}
}