summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-06-27 18:41:11 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-06-27 18:41:11 +0200
commit694afdbaecfab1f98279fafd1483f3c2734ce788 (patch)
treef63c8ba2176de5c4a5ba1bf561d11241e569ac09 /sc/inc
parentbf64e7d61596170ee9f9823d96a91fd3fbff91a8 (diff)
SfxProgress::SetState always returns true
Change-Id: Ib606b0391f814ea9ff4383397a40a8a692563fa3
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/globstr.hrc1
-rw-r--r--sc/inc/progress.hxx28
2 files changed, 8 insertions, 21 deletions
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index df4369f21838..4d8c80c3c00f 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -140,7 +140,6 @@
#define STR_UNKNOWN_FILTER 94
#define STR_DATABASE_NOTFOUND 95
-#define STR_DATABASE_ABORTED 96
#define STR_UNDO_PRINTRANGES 97
diff --git a/sc/inc/progress.hxx b/sc/inc/progress.hxx
index 8d1f9c59ae72..249a4e9cff05 100644
--- a/sc/inc/progress.hxx
+++ b/sc/inc/progress.hxx
@@ -42,7 +42,6 @@ private:
static SfxProgress* pGlobalProgress;
static sal_uLong nGlobalRange;
static sal_uLong nGlobalPercent;
- static bool bGlobalNoUserBreak;
static ScProgress* pInterpretProgress;
static ScProgress* pOldInterpretProgress;
static sal_uLong nInterpretProgress;
@@ -63,7 +62,6 @@ private:
}
public:
- static bool IsUserBreak() { return !bGlobalNoUserBreak; }
static void CreateInterpretProgress( ScDocument* pDoc,
bool bWait = true );
static ScProgress* GetInterpretProgress() { return pInterpretProgress; }
@@ -80,47 +78,37 @@ public:
ScProgress();
#endif
- bool SetStateText( sal_uLong nVal, const OUString &rVal )
+ void SetStateText( sal_uLong nVal, const OUString &rVal )
{
if ( pProgress )
{
CalcGlobalPercent( nVal );
- if ( !pProgress->SetStateText( nVal, rVal ) )
- bGlobalNoUserBreak = false;
- return bGlobalNoUserBreak;
+ pProgress->SetStateText( nVal, rVal );
}
- return true;
}
- bool SetState( sal_uLong nVal, sal_uLong nNewRange = 0 )
+ void SetState( sal_uLong nVal, sal_uLong nNewRange = 0 )
{
if ( pProgress )
{
if ( nNewRange )
nGlobalRange = nNewRange;
CalcGlobalPercent( nVal );
- if ( !pProgress->SetState( nVal, nNewRange ) )
- bGlobalNoUserBreak = false;
- return bGlobalNoUserBreak;
+ pProgress->SetState( nVal, nNewRange );
}
- return true;
}
- bool SetStateCountDown( sal_uLong nVal )
+ void SetStateCountDown( sal_uLong nVal )
{
if ( pProgress )
{
CalcGlobalPercent( nGlobalRange - nVal );
- if ( !pProgress->SetState( nGlobalRange - nVal ) )
- bGlobalNoUserBreak = false;
- return bGlobalNoUserBreak;
+ pProgress->SetState( nGlobalRange - nVal );
}
- return true;
}
- bool SetStateOnPercent( sal_uLong nVal )
+ void SetStateOnPercent( sal_uLong nVal )
{ /// only if percentage increased
if ( nGlobalRange && (nVal * 100 /
nGlobalRange) > nGlobalPercent )
- return SetState( nVal );
- return true;
+ SetState( nVal );
}
void SetStateCountDownOnPercent( sal_uLong nVal )
{ /// only if percentage increased