diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-06 12:19:57 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-04-11 08:26:01 +0200 |
commit | e5dd156a44625865684b5dfa90a95108259deb50 (patch) | |
tree | bb0da749c95d7fb1929f2c7d8757a53e73720807 /chart2/source/controller/dialogs | |
parent | 4cbcec9ed4c51277b00c155a5fa097880c0dee4b (diff) |
loplugin:constantparam
Change-Id: Ie690088d7a7d568703afd22f544628fc8012a7e1
Diffstat (limited to 'chart2/source/controller/dialogs')
-rw-r--r-- | chart2/source/controller/dialogs/DialogModel.cxx | 8 | ||||
-rw-r--r-- | chart2/source/controller/dialogs/DialogModel.hxx | 3 | ||||
-rw-r--r-- | chart2/source/controller/dialogs/dlg_CreationWizard.cxx | 26 |
3 files changed, 8 insertions, 29 deletions
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx index a6d8dcffd589..4cb14c46dd0a 100644 --- a/chart2/source/controller/dialogs/DialogModel.cxx +++ b/chart2/source/controller/dialogs/DialogModel.cxx @@ -737,8 +737,7 @@ void DialogModel::setData( xInterpreter->interpretDataSource( xDataSource, rArguments, comphelper::containerToSequence( aSeriesToReUse )), - aSeriesToReUse, - true /* bSetStyles */); + aSeriesToReUse); ThreeDHelper::setScheme( xDiagram, e3DScheme ); } @@ -784,8 +783,7 @@ sal_Int32 DialogModel::GetRoleIndexForSorting( const OUString & rInternalRoleStr void DialogModel::applyInterpretedData( const InterpretedData & rNewData, - const ::std::vector< Reference< XDataSeries > > & rSeriesToReUse, - bool bSetStyles ) + const ::std::vector< Reference< XDataSeries > > & rSeriesToReUse ) { if( ! m_xChartDocument.is()) return; @@ -795,7 +793,7 @@ void DialogModel::applyInterpretedData( if( xDiagram.is()) { // styles - if( bSetStyles && m_xTemplate.is() ) + if( m_xTemplate.is() ) { sal_Int32 nGroup = 0; sal_Int32 nSeriesCounter = 0; diff --git a/chart2/source/controller/dialogs/DialogModel.hxx b/chart2/source/controller/dialogs/DialogModel.hxx index 45980a14936f..a863b614779d 100644 --- a/chart2/source/controller/dialogs/DialogModel.hxx +++ b/chart2/source/controller/dialogs/DialogModel.hxx @@ -164,8 +164,7 @@ private: private: void applyInterpretedData( const css::chart2::InterpretedData & rNewData, - const ::std::vector< css::uno::Reference< css::chart2::XDataSeries > > & rSeriesToReUse, - bool bSetStyles ); + const ::std::vector< css::uno::Reference< css::chart2::XDataSeries > > & rSeriesToReUse ); sal_Int32 countSeries() const; diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx index 6915191b81aa..63e9a710f5c7 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx @@ -45,23 +45,14 @@ using namespace ::com::sun::star; #define STATE_OBJECTS 3 #define STATE_LAST STATE_OBJECTS -namespace -{ - const sal_Int32 nPageCount = 4; -} - CreationWizard::CreationWizard( vcl::Window* pParent, const uno::Reference< frame::XModel >& xChartModel - , const uno::Reference< uno::XComponentContext >& xContext - , sal_Int32 nOnePageOnlyIndex ) + , const uno::Reference< uno::XComponentContext >& xContext ) : svt::RoadmapWizard( pParent, - (nOnePageOnlyIndex >= 0 && nOnePageOnlyIndex < nPageCount) - ? WizardButtonFlags::HELP | WizardButtonFlags::CANCEL | WizardButtonFlags::FINISH - : WizardButtonFlags::HELP | WizardButtonFlags::CANCEL | WizardButtonFlags::PREVIOUS | WizardButtonFlags::NEXT | WizardButtonFlags::FINISH + WizardButtonFlags::HELP | WizardButtonFlags::CANCEL | WizardButtonFlags::PREVIOUS | WizardButtonFlags::NEXT | WizardButtonFlags::FINISH ) , m_xChartModel(xChartModel,uno::UNO_QUERY) , m_xCC( xContext ) , m_bIsClosable(true) - , m_nOnePageOnlyIndex(nOnePageOnlyIndex) , m_pTemplateProvider(nullptr) , m_nFirstState(STATE_FIRST) , m_nLastState(STATE_LAST) @@ -71,13 +62,7 @@ CreationWizard::CreationWizard( vcl::Window* pParent, const uno::Reference< fram m_pDialogModel.reset( new DialogModel( m_xChartModel, m_xCC )); defaultButton( WizardButtonFlags::FINISH ); - if( m_nOnePageOnlyIndex < 0 || m_nOnePageOnlyIndex >= nPageCount ) - { - m_nOnePageOnlyIndex = -1; - this->setTitleBase(SCH_RESSTR(STR_DLG_CHART_WIZARD)); - } - else - this->setTitleBase(OUString()); + this->setTitleBase(SCH_RESSTR(STR_DLG_CHART_WIZARD)); declarePath( PATH_FULL , STATE_CHARTTYPE @@ -109,15 +94,12 @@ CreationWizard::CreationWizard( vcl::Window* pParent, const uno::Reference< fram VclPtr<TabPage> CreationWizard::createPage(WizardState nState) { VclPtr<svt::OWizardPage> pRet; - if(m_nOnePageOnlyIndex!=-1 && m_nOnePageOnlyIndex!=nState) - return pRet; - bool bDoLiveUpdate = m_nOnePageOnlyIndex == -1; switch( nState ) { case STATE_CHARTTYPE: { m_aTimerTriggeredControllerLock.startTimer(); - VclPtrInstance<ChartTypeTabPage> pChartTypeTabPage(this,m_xChartModel,bDoLiveUpdate); + VclPtrInstance<ChartTypeTabPage> pChartTypeTabPage(this,m_xChartModel,true/*bDoLiveUpdate*/); pRet = pChartTypeTabPage; m_pTemplateProvider = pChartTypeTabPage; if (m_pDialogModel) |