diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-06-22 08:53:02 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-06-22 12:10:05 +0200 |
commit | 6632bc699b1b57b2e5d8c0bd647aca16dcdcf31e (patch) | |
tree | 9ecab6ec41a53eb9e7c04b56afcd39a00350b3c6 | |
parent | a6d269ed9478b20f611912bf9711c2683e7bc924 (diff) |
cid#1486241 'Constant' variable guards dead code
Change-Id: Ia90e8ad537fccdf38ed0bf0e9f963033c69ec202
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117612
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | vcl/inc/wizdlg.hxx | 12 | ||||
-rw-r--r-- | vcl/source/control/wizardmachine.cxx | 27 |
2 files changed, 0 insertions, 39 deletions
diff --git a/vcl/inc/wizdlg.hxx b/vcl/inc/wizdlg.hxx index 997a63c06dd7..13a46c27b069 100644 --- a/vcl/inc/wizdlg.hxx +++ b/vcl/inc/wizdlg.hxx @@ -159,18 +159,6 @@ namespace vcl /// will be called when a new page is about to be displayed void enterState(WizardTypes::WizardState _nState); - /** will be called when the current state is about to be left for the given reason - - The base implementation in this class will simply call <member>OWizardPage::commitPage</member> - for the current page, and return whatever this call returns. - - @param _eReason - The reason why the state is to be left. - @return - <TRUE/> if and only if the page is allowed to be left - */ - static bool prepareLeaveCurrentState( WizardTypes::CommitPageReason eReason ); - /** determine the next state to travel from the given one This method ensures that traveling happens along the active path. diff --git a/vcl/source/control/wizardmachine.cxx b/vcl/source/control/wizardmachine.cxx index 06868e832568..f084804657ff 100644 --- a/vcl/source/control/wizardmachine.cxx +++ b/vcl/source/control/wizardmachine.cxx @@ -672,26 +672,11 @@ namespace vcl if ( isTravelingSuspended() ) return; RoadmapWizardTravelSuspension aTravelGuard( *this ); - if (!prepareLeaveCurrentState(WizardTypes::eFinish)) - { - return; - } Finish( RET_OK ); } - bool RoadmapWizard::prepareLeaveCurrentState( WizardTypes::CommitPageReason _eReason ) - { - IWizardPageController* pController = nullptr; - ENSURE_OR_RETURN( pController != nullptr, "RoadmapWizard::prepareLeaveCurrentState: no controller for the current page!", true ); - return pController->commitPage( _eReason ); - } - bool RoadmapWizard::skipBackwardUntil( WizardTypes::WizardState _nTargetState ) { - // allowed to leave the current page? - if (!prepareLeaveCurrentState(WizardTypes::eTravelBackward)) - return false; - // don't travel directly on m_xWizardImpl->aStateHistory, in case something goes wrong std::stack< WizardTypes::WizardState > aTravelVirtually = m_xWizardImpl->aStateHistory; std::stack< WizardTypes::WizardState > aOldStateHistory = m_xWizardImpl->aStateHistory; @@ -716,10 +701,6 @@ namespace vcl { WizardTypes::WizardState nCurrentState = getCurrentState(); - // allowed to leave the current page? - if ( !prepareLeaveCurrentState( nCurrentState < _nTargetState ? WizardTypes::eTravelForward : WizardTypes::eTravelBackward ) ) - return false; - // don't travel directly on m_xWizardImpl->aStateHistory, in case something goes wrong std::stack< WizardTypes::WizardState > aTravelVirtually = m_xWizardImpl->aStateHistory; std::stack< WizardTypes::WizardState > aOldStateHistory = m_xWizardImpl->aStateHistory; @@ -753,10 +734,6 @@ namespace vcl void RoadmapWizard::travelNext() { - // allowed to leave the current page? - if ( !prepareLeaveCurrentState( WizardTypes::eTravelForward ) ) - return; - // determine the next state to travel to WizardTypes::WizardState nCurrentState = getCurrentState(); WizardTypes::WizardState nNextState = determineNextState(nCurrentState); @@ -776,10 +753,6 @@ namespace vcl { DBG_ASSERT(!m_xWizardImpl->aStateHistory.empty(), "RoadmapWizard::travelPrevious: have no previous page!"); - // allowed to leave the current page? - if ( !prepareLeaveCurrentState( WizardTypes::eTravelBackward ) ) - return; - // the next state to switch to WizardTypes::WizardState nPreviousState = m_xWizardImpl->aStateHistory.top(); |