From 883d20c5eb68893c73ab2fd5d3bfee528d0a02d1 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Wed, 11 Apr 2012 09:28:54 +0200 Subject: move ScProgress outside of ScTable::Fill --- sc/source/ui/undo/undoblk3.cxx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'sc/source/ui/undo') diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx index 3286614bb530..78ea86b28b7a 100644 --- a/sc/source/ui/undo/undoblk3.cxx +++ b/sc/source/ui/undo/undoblk3.cxx @@ -60,6 +60,7 @@ #include "paramisc.hxx" #include "postit.hxx" #include "docuno.hxx" +#include "progress.hxx" // STATIC DATA --------------------------------------------------------------- @@ -714,11 +715,20 @@ void ScUndoAutoFill::Redo() SCTAB nTab = aSource.aStart.Tab(); pDoc->SetValue( nValX, nValY, nTab, fStartValue ); } + sal_uLong nProgCount; + if (eFillDir == FILL_TO_BOTTOM || eFillDir == FILL_TO_TOP) + nProgCount = aSource.aEnd.Col() - aSource.aStart.Col() + 1; + else + nProgCount = aSource.aEnd.Row() - aSource.aStart.Row() + 1; + nProgCount *= nCount; + ScProgress aProgress( pDoc->GetDocumentShell(), + ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount ); + pDoc->Fill( aSource.aStart.Col(), aSource.aStart.Row(), - aSource.aEnd.Col(), aSource.aEnd.Row(), - aMarkData, nCount, - eFillDir, eFillCmd, eFillDateCmd, - fStepValue, fMaxValue ); + aSource.aEnd.Col(), aSource.aEnd.Row(), &aProgress, + aMarkData, nCount, + eFillDir, eFillCmd, eFillDateCmd, + fStepValue, fMaxValue ); SetChangeTrack(); -- cgit