summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx9
-rw-r--r--sc/source/ui/docshell/dbdocimp.cxx8
-rw-r--r--sc/source/ui/docshell/docfunc.cxx41
-rw-r--r--sc/source/ui/undo/undoblk3.cxx18
4 files changed, 64 insertions, 12 deletions
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index f935ef977246..0e25ee0d38f0 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -61,6 +61,7 @@
#include "hints.hxx"
#include "queryentry.hxx"
#include "markdata.hxx"
+#include "progress.hxx"
#include <set>
@@ -886,8 +887,14 @@ sal_Bool ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
ScMarkData aMark;
aMark.SelectOneTable(nDestTab);
SCROW nFStartY = aLocalParam.nRow1 + ( aLocalParam.bHasHeader ? 1 : 0 );
+
+ sal_uLong nProgCount = nFormulaCols;
+ nProgCount *= aLocalParam.nRow2 - nFStartY;
+ ScProgress aProgress( pDoc->GetDocumentShell(),
+ ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount );
+
pDoc->Fill( aLocalParam.nCol2+1, nFStartY,
- aLocalParam.nCol2+nFormulaCols, nFStartY, aMark,
+ aLocalParam.nCol2+nFormulaCols, nFStartY, &aProgress, aMark,
aLocalParam.nRow2 - nFStartY,
FILL_TO_BOTTOM, FILL_SIMPLE );
}
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index 39b2b80f7799..92f6b4599ef7 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -597,8 +597,14 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
// fill formulas
ScMarkData aMark;
aMark.SelectOneTable(nTab);
+
+ sal_uLong nProgCount = nFormulaCols;
+ nProgCount *= nEndRow-rParam.nRow1-1;
+ ScProgress aProgress( pDoc->GetDocumentShell(),
+ ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount );
+
pDoc->Fill( nEndCol+1, rParam.nRow1+1, nEndCol+nFormulaCols, rParam.nRow1+1,
- aMark, nEndRow-rParam.nRow1-1, FILL_TO_BOTTOM, FILL_SIMPLE );
+ &aProgress, aMark, nEndRow-rParam.nRow1-1, FILL_TO_BOTTOM, FILL_SIMPLE );
}
// if new range is smaller, clear old contents
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 973968d21bb6..379887f45f9b 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -100,6 +100,7 @@
#include "clipparam.hxx"
#include "externalrefmgr.hxx"
#include "undorangename.hxx"
+#include "progress.hxx"
#include <memory>
#include <basic/basmgr.hxx>
@@ -4078,9 +4079,18 @@ bool ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
pDoc->CopyToDocument( aCopyRange, IDF_AUTOFILL, false, pUndoDoc, &aMark );
}
+ sal_uLong nProgCount;
+ if (eDir == FILL_TO_BOTTOM || eDir == FILL_TO_TOP)
+ nProgCount = aSourceArea.aEnd.Col() - aSourceArea.aStart.Col() + 1;
+ else
+ nProgCount = aSourceArea.aEnd.Row() - aSourceArea.aStart.Row() + 1;
+ nProgCount *= nCount;
+ ScProgress aProgress( pDoc->GetDocumentShell(),
+ ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount );
+
pDoc->Fill( aSourceArea.aStart.Col(), aSourceArea.aStart.Row(),
- aSourceArea.aEnd.Col(), aSourceArea.aEnd.Row(), aMark,
- nCount, eDir, FILL_SIMPLE );
+ aSourceArea.aEnd.Col(), aSourceArea.aEnd.Row(), &aProgress,
+ aMark, nCount, eDir, FILL_SIMPLE );
AdjustRowHeight(aRange);
if ( bRecord ) // Draw-Undo erst jetzt verfuegbar
@@ -4194,9 +4204,19 @@ sal_Bool ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMar
SCTAB nTab = aDestArea.aStart.Tab();
pDoc->SetValue( nValX, nValY, nTab, fStart );
}
+
+ sal_uLong nProgCount;
+ if (eDir == FILL_TO_BOTTOM || eDir == FILL_TO_TOP)
+ nProgCount = aSourceArea.aEnd.Col() - aSourceArea.aStart.Col() + 1;
+ else
+ nProgCount = aSourceArea.aEnd.Row() - aSourceArea.aStart.Row() + 1;
+ nProgCount *= nCount;
+ ScProgress aProgress( pDoc->GetDocumentShell(),
+ ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount );
+
pDoc->Fill( aSourceArea.aStart.Col(), aSourceArea.aStart.Row(),
- aSourceArea.aEnd.Col(), aSourceArea.aEnd.Row(), aMark,
- nCount, eDir, eCmd, eDateCmd, fStep, fMax );
+ aSourceArea.aEnd.Col(), aSourceArea.aEnd.Row(), &aProgress,
+ aMark, nCount, eDir, eCmd, eDateCmd, fStep, fMax );
AdjustRowHeight(rRange);
rDocShell.PostPaintGridAll();
@@ -4325,9 +4345,18 @@ sal_Bool ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillD
IDF_AUTOFILL, false, pUndoDoc, &aMark );
}
+ sal_uLong nProgCount;
+ if (eDir == FILL_TO_BOTTOM || eDir == FILL_TO_TOP)
+ nProgCount = aSourceArea.aEnd.Col() - aSourceArea.aStart.Col() + 1;
+ else
+ nProgCount = aSourceArea.aEnd.Row() - aSourceArea.aStart.Row() + 1;
+ nProgCount *= nCount;
+ ScProgress aProgress( pDoc->GetDocumentShell(),
+ ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount );
+
pDoc->Fill( aSourceArea.aStart.Col(), aSourceArea.aStart.Row(),
- aSourceArea.aEnd.Col(), aSourceArea.aEnd.Row(), aMark,
- nCount, eDir, eCmd, eDateCmd, fStep, fMax );
+ aSourceArea.aEnd.Col(), aSourceArea.aEnd.Row(), &aProgress,
+ aMark, nCount, eDir, eCmd, eDateCmd, fStep, fMax );
AdjustRowHeight(aDestArea);
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();