Kaydet (Commit) 64340f4c authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Now I can pass range list to PostPaint() when appropriate.

üst a6d2e1ef
...@@ -492,15 +492,20 @@ ScRange ScRangeList::Combine() const ...@@ -492,15 +492,20 @@ ScRange ScRangeList::Combine() const
{ {
const ScRange& r = **itr; const ScRange& r = **itr;
SCROW nRow1 = r.aStart.Row(), nRow2 = r.aEnd.Row(); 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) if (aRet.aStart.Row() > nRow1)
aRet.aStart.SetRow(nRow1); aRet.aStart.SetRow(nRow1);
if (aRet.aStart.Col() > nCol1) if (aRet.aStart.Col() > nCol1)
aRet.aStart.SetCol(nCol1); aRet.aStart.SetCol(nCol1);
if (aRet.aStart.Tab() > nTab1)
aRet.aStart.SetTab(nTab1);
if (aRet.aEnd.Row() < nRow2) if (aRet.aEnd.Row() < nRow2)
aRet.aEnd.SetRow(nRow2); aRet.aEnd.SetRow(nRow2);
if (aRet.aEnd.Col() < nCol2) if (aRet.aEnd.Col() < nCol2)
aRet.aEnd.SetCol(nCol2); aRet.aEnd.SetCol(nCol2);
if (aRet.aEnd.Tab() < nTab2)
aRet.aEnd.SetTab(nTab2);
} }
return aRet; return aRet;
} }
......
...@@ -1093,7 +1093,7 @@ void ScUndoPaste::DoChange(bool bUndo) ...@@ -1093,7 +1093,7 @@ void ScUndoPaste::DoChange(bool bUndo)
if ( !bUndo ) // draw redo after updating row heights if ( !bUndo ) // draw redo after updating row heights
RedoSdrUndoAction(mpDrawUndo); RedoSdrUndoAction(mpDrawUndo);
pDocShell->PostPaint(aDrawRanges.Combine(), nPaint, nExtFlags); pDocShell->PostPaint(aDrawRanges, nPaint, nExtFlags);
pDocShell->PostDataChanged(); pDocShell->PostDataChanged();
if (pViewShell) if (pViewShell)
......
...@@ -1819,10 +1819,7 @@ bool ScViewFunc::PasteFromClipToMultiRanges( ...@@ -1819,10 +1819,7 @@ bool ScViewFunc::PasteFromClipToMultiRanges(
// Refresh the range that includes all pasted ranges. We only need to // Refresh the range that includes all pasted ranges. We only need to
// refresh the current sheet. // refresh the current sheet.
ScRange aWholeRange = aRanges.Combine(); pDocSh->PostPaint(aRanges, PAINT_GRID);
aWholeRange.aStart.SetTab(rViewData.GetTabNo());
aWholeRange.aEnd.SetTab(rViewData.GetTabNo());
pDocSh->PostPaint(aWholeRange, PAINT_GRID);
if (pDoc->IsUndoEnabled()) if (pDoc->IsUndoEnabled())
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment