22#include <rtl/ustring.hxx>
37#define MIN_NO_CODES_PER_PROGRESS_UPDATE 100
58 nGlobalPercent = nGlobalRange ?
59 nVal * 100 / nGlobalRange : 0;
63 static void CreateInterpretProgress(
ScDocument* pDoc,
66 static void DeleteInterpretProgress();
69 const OUString& rText,
78 void SetState( sal_uInt64 nVal, sal_uInt64 nNewRange = 0 )
83 nGlobalRange = nNewRange;
84 CalcGlobalPercent( nVal );
85 pProgress->SetState( nVal, nNewRange );
92 CalcGlobalPercent( nGlobalRange - nVal );
93 pProgress->SetState( nGlobalRange - nVal );
98 if ( nGlobalRange && (nVal * 100 /
99 nGlobalRange) > nGlobalPercent )
105 ((nGlobalRange - nVal) * 100 /
106 nGlobalRange) > nGlobalPercent )
107 SetStateCountDown( nVal );
112 return pProgress->GetState();
static sal_uInt64 nGlobalRange
static sal_uInt64 nGlobalPercent
ScProgress(const ScProgress &)=delete
sal_uInt64 GetState() const
static ScDocument * pInterpretDoc
ScProgress & operator=(const ScProgress &)=delete
void SetStateCountDownOnPercent(sal_uInt64 nVal)
static SfxProgress * pGlobalProgress
void SetState(sal_uInt64 nVal, sal_uInt64 nNewRange=0)
std::unique_ptr< SfxProgress > pProgress
static bool bIdleWasEnabled
void SetStateCountDown(sal_uInt64 nVal)
static void CalcGlobalPercent(sal_uInt64 nVal)
void SetStateOnPercent(sal_uInt64 nVal)
static sal_uInt64 nInterpretProgress
static ScProgress * GetInterpretProgress()
static ScProgress * pInterpretProgress