vcl/inc/wizdlg.hxx | 2 +- vcl/source/app/salvtables.cxx | 2 +- vcl/source/control/roadmapwizard.cxx | 32 +++++--------------------------- 3 files changed, 7 insertions(+), 29 deletions(-)
New commits: commit b45aea3beec03ec72a93f5692bcfc32ea093f62d Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Mon May 19 10:28:38 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Mon May 19 23:30:21 2025 +0200 vcl: Drop always true RoadmapWizard::ShowPage ret val The method was always returning `true`, so drop the return value altogether, and the code paths in callers that would have handled a `false` return value. Change-Id: Icf37513da2bceb5df7e062f39498335139179e95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185511 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/vcl/inc/wizdlg.hxx b/vcl/inc/wizdlg.hxx index 442d75ed01f0..fda45e0818b3 100644 --- a/vcl/inc/wizdlg.hxx +++ b/vcl/inc/wizdlg.hxx @@ -169,7 +169,7 @@ namespace vcl virtual void queue_resize(StateChangedType eReason = StateChangedType::Layout) override; - bool ShowPage( sal_uInt16 nLevel ); + void ShowPage(sal_uInt16 nLevel); void Finish( tools::Long nResult = 0 ); sal_uInt16 GetCurLevel() const { return mnCurLevel; } diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 6ef981e16125..150a446dfade 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -2113,7 +2113,7 @@ void SalInstanceAssistant::set_current_page(int nPage) m_xWizard->SetPageSizePixel(aFinalSize); } - (void)m_xWizard->ShowPage(m_aIds[nPage]); + m_xWizard->ShowPage(m_aIds[nPage]); enable_notify_events(); } diff --git a/vcl/source/control/roadmapwizard.cxx b/vcl/source/control/roadmapwizard.cxx index 3bcc0765afa9..f67980111c59 100644 --- a/vcl/source/control/roadmapwizard.cxx +++ b/vcl/source/control/roadmapwizard.cxx @@ -582,7 +582,7 @@ namespace vcl SetPage( i_nState, pNewPage ); } - bool RoadmapWizard::ShowPage( sal_uInt16 nLevel ) + void RoadmapWizard::ShowPage(sal_uInt16 nLevel) { mnCurLevel = nLevel; GetOrCreatePage(mnCurLevel); @@ -592,7 +592,6 @@ namespace vcl m_xRoadmapImpl->pRoadmap->SelectRoadmapItemByID(getCurrentState()); ImplShowTabPage( ImplGetPage( mnCurLevel ) ); - return true; } void RoadmapWizard::Finish( tools::Long nResult ) @@ -735,7 +734,6 @@ namespace vcl { // 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; WizardTypes::WizardState nCurrentRollbackState = getCurrentState(); while ( nCurrentRollbackState != _nTargetState ) @@ -745,11 +743,7 @@ namespace vcl aTravelVirtually.pop(); } m_xWizardImpl->aStateHistory = std::move(aTravelVirtually); - if ( !ShowPage( _nTargetState ) ) - { - m_xWizardImpl->aStateHistory = std::move(aOldStateHistory); - return false; - } + ShowPage(_nTargetState); return true; } @@ -759,7 +753,6 @@ namespace vcl // 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; while ( nCurrentState != _nTargetState ) { WizardTypes::WizardState nNextState = determineNextState( nCurrentState ); @@ -777,14 +770,7 @@ namespace vcl } m_xWizardImpl->aStateHistory = std::move(aTravelVirtually); // show the target page - if ( !ShowPage( nCurrentState ) ) - { - // argh! prepareLeaveCurrentPage succeeded, determineNextState succeeded, - // but ShowPage doesn't? Somebody behaves very strange here... - OSL_FAIL( "RoadmapWizard::skipUntil: very unpolite..." ); - m_xWizardImpl->aStateHistory = std::move(aOldStateHistory); - return false; - } + ShowPage(nCurrentState); return true; } @@ -799,10 +785,7 @@ namespace vcl // the state history is used by the enterState method // all fine m_xWizardImpl->aStateHistory.push(nCurrentState); - if (!ShowPage(nNextState)) - { - m_xWizardImpl->aStateHistory.pop(); - } + ShowPage(nNextState); } void RoadmapWizard::travelPrevious() @@ -815,12 +798,7 @@ namespace vcl // the state history is used by the enterState method m_xWizardImpl->aStateHistory.pop(); // show this page - if (!ShowPage(nPreviousState)) - { - m_xWizardImpl->aStateHistory.push(nPreviousState); - } - - // all fine + ShowPage(nPreviousState); } void RoadmapWizard::removePageFromHistory( WizardTypes::WizardState nToRemove )