summaryrefslogtreecommitdiff
path: root/vcl/source/control
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-06-17 09:49:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-06-19 14:08:50 +0200
commite3077168072452fb8f1c0a8afb2992877cb96d1c (patch)
tree785da5126ddb052250ee3747fa221c746cc62e82 /vcl/source/control
parente48dd86341fff8a010f514bbcd818468f3a92815 (diff)
loplugin:finalclasses
improve the plugin to detect more cases. I only apply the new final changes to classes in /include here. Which reveals that RoadmapWizard::getPageController( TabPage* _pCurrentPage ) will always return nullptr Also needed to sprinkle some SAL_DLLPUBLIC_TEMPLATE around to workaround Visual Studio linking problems. Change-Id: Iadb7d46a9e0e73dabce562375ca013c0fea6690c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117365 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/control')
-rw-r--r--vcl/source/control/roadmapwizard.cxx19
-rw-r--r--vcl/source/control/wizardmachine.cxx8
2 files changed, 3 insertions, 24 deletions
diff --git a/vcl/source/control/roadmapwizard.cxx b/vcl/source/control/roadmapwizard.cxx
index 1b24e39cc4fc..8b7116e75282 100644
--- a/vcl/source/control/roadmapwizard.cxx
+++ b/vcl/source/control/roadmapwizard.cxx
@@ -324,7 +324,7 @@ namespace vcl
TabPage* pCurrentPage = GetPage( getCurrentState() );
if ( pCurrentPage )
{
- const IWizardPageController* pController = getPageController( GetPage( getCurrentState() ) );
+ const IWizardPageController* pController = nullptr;
OSL_ENSURE( pController != nullptr, "RoadmapWizard::implUpdateRoadmap: no controller for the current page!" );
bCurrentPageCanAdvance = !pController || pController->canAdvance();
}
@@ -717,23 +717,8 @@ namespace vcl
return bResult;
}
- void RoadmapWizard::enterState(WizardTypes::WizardState nState)
+ void RoadmapWizard::enterState(WizardTypes::WizardState /*nState*/)
{
- // tell the page
- IWizardPageController* pController = getPageController( GetPage( nState ) );
- if (pController)
- {
- pController->initializePage();
-
- if ( isAutomaticNextButtonStateEnabled() )
- enableButtons( WizardButtonFlags::NEXT, canAdvance() );
-
- enableButtons( WizardButtonFlags::PREVIOUS, !m_xWizardImpl->aStateHistory.empty() );
-
- // set the new title - it depends on the current page (i.e. state)
- implUpdateTitle();
- }
-
// synchronize the roadmap
implUpdateRoadmap( );
m_xRoadmapImpl->pRoadmap->SelectRoadmapItemByID( getCurrentState() );
diff --git a/vcl/source/control/wizardmachine.cxx b/vcl/source/control/wizardmachine.cxx
index 59554f275663..c83bcf929afd 100644
--- a/vcl/source/control/wizardmachine.cxx
+++ b/vcl/source/control/wizardmachine.cxx
@@ -681,7 +681,7 @@ namespace vcl
bool RoadmapWizard::prepareLeaveCurrentState( WizardTypes::CommitPageReason _eReason )
{
- IWizardPageController* pController = getPageController( GetPage( getCurrentState() ) );
+ IWizardPageController* pController = nullptr;
ENSURE_OR_RETURN( pController != nullptr, "RoadmapWizard::prepareLeaveCurrentState: no controller for the current page!", true );
return pController->commitPage( _eReason );
}
@@ -835,12 +835,6 @@ namespace vcl
travelNext();
}
- IWizardPageController* RoadmapWizard::getPageController( TabPage* _pCurrentPage )
- {
- IWizardPageController* pController = dynamic_cast< IWizardPageController* >( _pCurrentPage );
- return pController;
- }
-
bool RoadmapWizard::isTravelingSuspended() const
{
return m_xWizardImpl->m_bTravelingSuspended;