diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-16 09:13:14 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-16 10:15:36 +0200 |
commit | 27dadc070ec2c2a602d3c5b3494dd0bdc15c785f (patch) | |
tree | 79d9acfb57f8431b0ab224d9d2c6a5d2c840c540 /sfx2/source/bastyp | |
parent | 20a872d21602409cda873bb1f4830d50be3b6f8b (diff) |
loplugin:singlevalfields in sfx2
pParent in SfxDispatch_Impl was always nullptr, which led to a bunch of
dead code
similarly with pParent in SfxWorkWindow
Change-Id: I964a43fe094409ab4b6d1eda7225af997092e81c
Reviewed-on: https://gerrit.libreoffice.org/61811
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/bastyp')
-rw-r--r-- | sfx2/source/bastyp/progress.cxx | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx index 91f24110e3c9..0659564edf16 100644 --- a/sfx2/source/bastyp/progress.cxx +++ b/sfx2/source/bastyp/progress.cxx @@ -53,7 +53,6 @@ struct SfxProgress_Impl OUString aText, aStateText; sal_uIntPtr nMax; clock_t nCreate; - bool bLocked; bool bWaitMode; bool bRunning; @@ -63,37 +62,11 @@ struct SfxProgress_Impl SfxViewFrame* pView; explicit SfxProgress_Impl(); - void Enable_Impl(); - }; - -void SfxProgress_Impl::Enable_Impl() -{ - SfxObjectShell* pDoc = xObjSh.get(); - SfxViewFrame *pFrame = SfxViewFrame::GetFirst(pDoc); - while ( pFrame ) - { - pFrame->Enable(true/*bEnable*/); - pFrame->GetDispatcher()->Lock( false ); - pFrame = SfxViewFrame::GetNext(*pFrame, pDoc); - } - - if ( pView ) - { - pView->Enable( true/*bEnable*/ ); - pView->GetDispatcher()->Lock( false ); - } - - if ( !pDoc ) - SfxGetpApp()->GetAppDispatcher_Impl()->Lock( false ); -} - - SfxProgress_Impl::SfxProgress_Impl() : nMax(0) , nCreate(0) - , bLocked(false) , bWaitMode(false) , bRunning(false) , pActiveProgress(nullptr) @@ -136,7 +109,6 @@ SfxProgress::SfxProgress pImpl->xObjSh = pObjSh; pImpl->aText = rText; pImpl->nMax = nRange; - pImpl->bLocked = false; pImpl->bWaitMode = bWait; pImpl->nCreate = Get10ThSec(); SAL_INFO( @@ -196,8 +168,6 @@ void SfxProgress::Stop() pImpl->xObjSh->SetProgress_Impl(nullptr); else SfxGetpApp()->SetProgress_Impl(nullptr); - if ( pImpl->bLocked ) - pImpl->Enable_Impl(); } void SfxProgress::SetStateText @@ -371,18 +341,6 @@ void SfxProgress::Suspend() } -void SfxProgress::UnLock() -{ - if( pImpl->pActiveProgress ) return; - if ( !pImpl->bLocked ) - return; - - SAL_INFO("sfx.bastyp", "SfxProgress: unlocked"); - pImpl->bLocked = false; - pImpl->Enable_Impl(); -} - - void SfxProgress::Reschedule() /* [Description] @@ -392,16 +350,6 @@ void SfxProgress::Reschedule() { SFX_STACK(SfxProgress::Reschedule); - - if( pImpl->pActiveProgress ) return; - SfxApplication* pApp = SfxGetpApp(); - if ( pImpl->bLocked && 0 == pApp->Get_Impl()->nRescheduleLocks ) - { - SfxAppData_Impl *pAppData = pApp->Get_Impl(); - ++pAppData->nInReschedule; - Application::Reschedule(); - --pAppData->nInReschedule; - } } |