[Libreoffice-commits] core.git: vcl/inc vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jun 22 10:10:46 UTC 2021
vcl/inc/wizdlg.hxx | 12 ------------
vcl/source/control/wizardmachine.cxx | 27 ---------------------------
2 files changed, 39 deletions(-)
New commits:
commit 6632bc699b1b57b2e5d8c0bd647aca16dcdcf31e
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jun 22 08:53:02 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Jun 22 12:10:05 2021 +0200
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 at redhat.com>
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();
More information about the Libreoffice-commits
mailing list