diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-09-09 23:34:08 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-09-12 13:22:06 -0400 |
commit | 64340f4c2b7aa25a9f9e98ad2668df13660c08d1 (patch) | |
tree | 51b6dbcaa2abc48916ec35048c65c26316e8d8a8 /sc/source | |
parent | a6d2e1ef128b375a76997f6fcc9b9c29a9dedc24 (diff) |
Now I can pass range list to PostPaint() when appropriate.
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/tool/rangelst.cxx | 7 | ||||
-rw-r--r-- | sc/source/ui/undo/undoblk.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun3.cxx | 5 |
3 files changed, 8 insertions, 6 deletions
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx index 9a6ded06d249..e02dd111573b 100644 --- a/sc/source/core/tool/rangelst.cxx +++ b/sc/source/core/tool/rangelst.cxx @@ -492,15 +492,20 @@ ScRange ScRangeList::Combine() const { const ScRange& r = **itr; SCROW nRow1 = r.aStart.Row(), nRow2 = r.aEnd.Row(); - SCROW nCol1 = r.aStart.Col(), nCol2 = r.aEnd.Col(); + SCCOL nCol1 = r.aStart.Col(), nCol2 = r.aEnd.Col(); + SCTAB nTab1 = r.aStart.Tab(), nTab2 = r.aEnd.Tab(); if (aRet.aStart.Row() > nRow1) aRet.aStart.SetRow(nRow1); if (aRet.aStart.Col() > nCol1) aRet.aStart.SetCol(nCol1); + if (aRet.aStart.Tab() > nTab1) + aRet.aStart.SetTab(nTab1); if (aRet.aEnd.Row() < nRow2) aRet.aEnd.SetRow(nRow2); if (aRet.aEnd.Col() < nCol2) aRet.aEnd.SetCol(nCol2); + if (aRet.aEnd.Tab() < nTab2) + aRet.aEnd.SetTab(nTab2); } return aRet; } diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index e5c6151310d5..32e223fcafbb 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -1093,7 +1093,7 @@ void ScUndoPaste::DoChange(bool bUndo) if ( !bUndo ) // draw redo after updating row heights RedoSdrUndoAction(mpDrawUndo); - pDocShell->PostPaint(aDrawRanges.Combine(), nPaint, nExtFlags); + pDocShell->PostPaint(aDrawRanges, nPaint, nExtFlags); pDocShell->PostDataChanged(); if (pViewShell) diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 80019d2f6c24..2d0e78e9c134 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -1819,10 +1819,7 @@ bool ScViewFunc::PasteFromClipToMultiRanges( // Refresh the range that includes all pasted ranges. We only need to // refresh the current sheet. - ScRange aWholeRange = aRanges.Combine(); - aWholeRange.aStart.SetTab(rViewData.GetTabNo()); - aWholeRange.aEnd.SetTab(rViewData.GetTabNo()); - pDocSh->PostPaint(aWholeRange, PAINT_GRID); + pDocSh->PostPaint(aRanges, PAINT_GRID); if (pDoc->IsUndoEnabled()) { |