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 | |
parent | 4cbcec9ed4c51277b00c155a5fa097880c0dee4b (diff) |
loplugin:constantparam
Change-Id: Ie690088d7a7d568703afd22f544628fc8012a7e1
Diffstat (limited to 'chart2')
-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 | ||||
-rw-r--r-- | chart2/source/controller/inc/dlg_CreationWizard.hxx | 6 | ||||
-rw-r--r-- | chart2/source/inc/LifeTime.hxx | 3 | ||||
-rw-r--r-- | chart2/source/model/inc/BaseCoordinateSystem.hxx | 3 | ||||
-rw-r--r-- | chart2/source/model/main/BaseCoordinateSystem.cxx | 5 | ||||
-rw-r--r-- | chart2/source/model/main/CartesianCoordinateSystem.cxx | 2 | ||||
-rw-r--r-- | chart2/source/model/main/PolarCoordinateSystem.cxx | 2 | ||||
-rw-r--r-- | chart2/source/model/template/PieChartType.cxx | 5 | ||||
-rw-r--r-- | chart2/source/model/template/PieChartType.hxx | 3 | ||||
-rw-r--r-- | chart2/source/tools/LifeTime.cxx | 8 |
12 files changed, 19 insertions, 55 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) diff --git a/chart2/source/controller/inc/dlg_CreationWizard.hxx b/chart2/source/controller/inc/dlg_CreationWizard.hxx index 18b2904b91e2..eb2ed7373590 100644 --- a/chart2/source/controller/inc/dlg_CreationWizard.hxx +++ b/chart2/source/controller/inc/dlg_CreationWizard.hxx @@ -42,10 +42,7 @@ class CreationWizard : public svt::RoadmapWizard, public TabPageNotifiable public: CreationWizard( vcl::Window* pParent, const css::uno::Reference< css::frame::XModel >& xChartModel - , const css::uno::Reference< css::uno::XComponentContext >& xContext - // if nOnePageOnlyIndex is an index of an exsisting page starting with 0 - // then only this page is displayed without next/previous and roadmap - , sal_Int32 nOnePageOnlyIndex=-1 ); + , const css::uno::Reference< css::uno::XComponentContext >& xContext ); CreationWizard() = delete; @@ -68,7 +65,6 @@ private: css::uno::Reference< css::chart2::XChartDocument > m_xChartModel; css::uno::Reference< css::uno::XComponentContext> m_xCC; bool m_bIsClosable; - sal_Int32 m_nOnePageOnlyIndex;//if nOnePageOnlyIndex is an index of an exsisting page starting with 0, then only this page is displayed without next/previous and roadmap ChartTypeTemplateProvider* m_pTemplateProvider; std::unique_ptr<DialogModel> m_pDialogModel; diff --git a/chart2/source/inc/LifeTime.hxx b/chart2/source/inc/LifeTime.hxx index 3bb12a864edc..6552d2abbc86 100644 --- a/chart2/source/inc/LifeTime.hxx +++ b/chart2/source/inc/LifeTime.hxx @@ -39,7 +39,7 @@ friend class LifeTimeGuard; protected: mutable ::osl::Mutex m_aAccessMutex; public: - LifeTimeManager( css::lang::XComponent* pComponent, bool bLongLastingCallsCancelable = false ); + LifeTimeManager( css::lang::XComponent* pComponent ); virtual ~LifeTimeManager(); bool impl_isDisposed( bool bAssert=true ); @@ -66,7 +66,6 @@ protected: bool volatile m_bDisposed; bool volatile m_bInDispose; - bool m_bLongLastingCallsCancelable; ::osl::Condition m_aNoLongLastingCallCountCondition; sal_Int32 volatile m_nLongLastingCallCount; }; diff --git a/chart2/source/model/inc/BaseCoordinateSystem.hxx b/chart2/source/model/inc/BaseCoordinateSystem.hxx index f71c4e4b2c26..da9a04c128d2 100644 --- a/chart2/source/model/inc/BaseCoordinateSystem.hxx +++ b/chart2/source/model/inc/BaseCoordinateSystem.hxx @@ -56,8 +56,7 @@ class BaseCoordinateSystem : public: BaseCoordinateSystem( const css::uno::Reference< css::uno::XComponentContext > & xContext, - sal_Int32 nDimensionCount = 2, - bool bSwapXAndYAxis = false ); + sal_Int32 nDimensionCount = 2 ); explicit BaseCoordinateSystem( const BaseCoordinateSystem & rSource ); virtual ~BaseCoordinateSystem(); diff --git a/chart2/source/model/main/BaseCoordinateSystem.cxx b/chart2/source/model/main/BaseCoordinateSystem.cxx index 07c42d7cfa01..cbd9f7d44261 100644 --- a/chart2/source/model/main/BaseCoordinateSystem.cxx +++ b/chart2/source/model/main/BaseCoordinateSystem.cxx @@ -124,8 +124,7 @@ namespace chart BaseCoordinateSystem::BaseCoordinateSystem( const Reference< uno::XComponentContext > & xContext, - sal_Int32 nDimensionCount /* = 2 */, - bool bSwapXAndYAxis /* = sal_False */ ) : + sal_Int32 nDimensionCount /* = 2 */ ) : ::property::OPropertySet( m_aMutex ), m_xContext( xContext ), m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder()), @@ -159,7 +158,7 @@ BaseCoordinateSystem::BaseCoordinateSystem( for( sal_Int32 i = 0; i < m_nDimensionCount; ++i ) m_aOrigin[ i ] = uno::makeAny( double( 0.0 ) ); - setFastPropertyValue_NoBroadcast( PROP_COORDINATESYSTEM_SWAPXANDYAXIS, uno::makeAny( bSwapXAndYAxis )); + setFastPropertyValue_NoBroadcast( PROP_COORDINATESYSTEM_SWAPXANDYAXIS, uno::makeAny( false )); } // explicit diff --git a/chart2/source/model/main/CartesianCoordinateSystem.cxx b/chart2/source/model/main/CartesianCoordinateSystem.cxx index 3e49456885ad..44dd8f4482a6 100644 --- a/chart2/source/model/main/CartesianCoordinateSystem.cxx +++ b/chart2/source/model/main/CartesianCoordinateSystem.cxx @@ -48,7 +48,7 @@ namespace chart CartesianCoordinateSystem::CartesianCoordinateSystem( const uno::Reference< uno::XComponentContext > & xContext, sal_Int32 nDimensionCount /* = 2 */ ) : - BaseCoordinateSystem( xContext, nDimensionCount, false/*bSwapXAndYAxis*/ ) + BaseCoordinateSystem( xContext, nDimensionCount ) {} CartesianCoordinateSystem::CartesianCoordinateSystem( diff --git a/chart2/source/model/main/PolarCoordinateSystem.cxx b/chart2/source/model/main/PolarCoordinateSystem.cxx index 525f3fec8d0a..c702dfab169d 100644 --- a/chart2/source/model/main/PolarCoordinateSystem.cxx +++ b/chart2/source/model/main/PolarCoordinateSystem.cxx @@ -48,7 +48,7 @@ namespace chart PolarCoordinateSystem::PolarCoordinateSystem( const uno::Reference< uno::XComponentContext > & xContext, sal_Int32 nDimensionCount /* = 2 */ ) : - BaseCoordinateSystem( xContext, nDimensionCount, false/*bSwapXAndYAxis*/ ) + BaseCoordinateSystem( xContext, nDimensionCount ) {} PolarCoordinateSystem::PolarCoordinateSystem( diff --git a/chart2/source/model/template/PieChartType.cxx b/chart2/source/model/template/PieChartType.cxx index f6c2975986a5..643adedf4e3c 100644 --- a/chart2/source/model/template/PieChartType.cxx +++ b/chart2/source/model/template/PieChartType.cxx @@ -128,12 +128,9 @@ namespace chart { PieChartType::PieChartType( - const uno::Reference< uno::XComponentContext > & xContext, - bool bUseRings /* = sal_False */) : + const uno::Reference< uno::XComponentContext > & xContext) : ChartType( xContext ) { - if( bUseRings ) - setFastPropertyValue_NoBroadcast( PROP_PIECHARTTYPE_USE_RINGS, uno::makeAny( bUseRings )); } PieChartType::PieChartType( const PieChartType & rOther ) : diff --git a/chart2/source/model/template/PieChartType.hxx b/chart2/source/model/template/PieChartType.hxx index c0685469875a..7d200ece5226 100644 --- a/chart2/source/model/template/PieChartType.hxx +++ b/chart2/source/model/template/PieChartType.hxx @@ -28,8 +28,7 @@ class PieChartType : public ChartType { public: PieChartType( - css::uno::Reference< css::uno::XComponentContext > const & xContext, - bool bUseRings = false ); + css::uno::Reference< css::uno::XComponentContext > const & xContext ); virtual ~PieChartType(); virtual OUString SAL_CALL diff --git a/chart2/source/tools/LifeTime.cxx b/chart2/source/tools/LifeTime.cxx index a802287b0550..219b71cbc2f8 100644 --- a/chart2/source/tools/LifeTime.cxx +++ b/chart2/source/tools/LifeTime.cxx @@ -29,10 +29,9 @@ using namespace ::com::sun::star; namespace apphelper { -LifeTimeManager::LifeTimeManager( lang::XComponent* pComponent, bool bLongLastingCallsCancelable ) +LifeTimeManager::LifeTimeManager( lang::XComponent* pComponent ) : m_aListenerContainer( m_aAccessMutex ) , m_pComponent(pComponent) - , m_bLongLastingCallsCancelable(bLongLastingCallsCancelable) { impl_init(); } @@ -163,7 +162,7 @@ bool LifeTimeManager::dispose() CloseableLifeTimeManager::CloseableLifeTimeManager( css::util::XCloseable* pCloseable , css::lang::XComponent* pComponent ) - : LifeTimeManager( pComponent, false/*bLongLastingCallsCancelable*/ ) + : LifeTimeManager( pComponent ) , m_pCloseable(pCloseable) { impl_init(); @@ -276,9 +275,6 @@ bool CloseableLifeTimeManager::g_close_isNeedToCancelLongLastingCalls( bool bDel if( !m_nLongLastingCallCount ) return false; - if(m_bLongLastingCallsCancelable) - return true; - impl_setOwnership( bDeliverOwnership, true ); m_bInTryClose = false; |