diff options
author | Noel Grandin <noel@peralex.com> | 2014-03-17 09:11:45 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-03-17 13:30:50 +0200 |
commit | 236d6cd67e5024ecbe9baccc8f1db597bea4bfa9 (patch) | |
tree | 7e86af6300c5692150621cddcca2a7bb6ae7ef09 | |
parent | 6319265b13321d6bfb527c7bd5b910d4dce4f203 (diff) |
chart2: prefer passing OUString by reference
Change-Id: I685b1dc3d7c735bc70be29252f55c082546f3cb1
21 files changed, 77 insertions, 74 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index 3189a227a77f..5a57ea44bbb8 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -277,7 +277,7 @@ void checkCommonTrendline( CPPUNIT_ASSERT_EQUAL(aExpectedR2, aShowCorrelationCoefficient); } -void checkNameAndType(Reference<XPropertySet> xProperties, OUString aExpectedName, OUString aExpectedServiceName) +void checkNameAndType(Reference<XPropertySet> xProperties, const OUString& aExpectedName, const OUString& aExpectedServiceName) { Reference< lang::XServiceName > xServiceName( xProperties, UNO_QUERY ); CPPUNIT_ASSERT(xServiceName.is()); @@ -291,7 +291,7 @@ void checkNameAndType(Reference<XPropertySet> xProperties, OUString aExpectedNam } void checkLinearTrendline( - Reference<chart2::XRegressionCurve> xCurve, OUString aExpectedName, + Reference<chart2::XRegressionCurve> xCurve, const OUString& aExpectedName, double aExpectedExtrapolateForward, double aExpectedExtrapolateBackward, sal_Bool aExpectedForceIntercept, double aExpectedInterceptValue, sal_Bool aExpectedShowEquation, sal_Bool aExpectedR2) @@ -309,7 +309,7 @@ void checkLinearTrendline( } void checkPolynomialTrendline( - Reference<chart2::XRegressionCurve> xCurve, OUString aExpectedName, + Reference<chart2::XRegressionCurve> xCurve, const OUString& aExpectedName, sal_Int32 aExpectedDegree, double aExpectedExtrapolateForward, double aExpectedExtrapolateBackward, sal_Bool aExpectedForceIntercept, double aExpectedInterceptValue, @@ -332,7 +332,7 @@ void checkPolynomialTrendline( } void checkMovingAverageTrendline( - Reference<chart2::XRegressionCurve> xCurve, OUString aExpectedName, sal_Int32 aExpectedPeriod) + Reference<chart2::XRegressionCurve> xCurve, const OUString& aExpectedName, sal_Int32 aExpectedPeriod) { Reference<XPropertySet> xProperties( xCurve , uno::UNO_QUERY ); CPPUNIT_ASSERT(xProperties.is()); diff --git a/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx index 9a24704c4ed7..0e2020aff790 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx @@ -40,7 +40,7 @@ class WrappedDataCaptionProperty : public WrappedSeriesOrDiagramProperty< sal_In { public: virtual sal_Int32 getValueFromSeries( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xSeriesPropertySet ) const; - virtual void setValueToSeries( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xSeriesPropertySet, sal_Int32 aNewValue ) const; + virtual void setValueToSeries( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xSeriesPropertySet, const sal_Int32& aNewValue ) const; explicit WrappedDataCaptionProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ); @@ -142,7 +142,7 @@ sal_Int32 WrappedDataCaptionProperty::getValueFromSeries( const Reference< beans return aRet; } -void WrappedDataCaptionProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, sal_Int32 nCaption ) const +void WrappedDataCaptionProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const sal_Int32& nCaption ) const { if(!xSeriesPropertySet.is()) return; diff --git a/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx index 7e7fcba38eee..a8177f2ffc9a 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx +++ b/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx @@ -46,7 +46,7 @@ class WrappedSeriesOrDiagramProperty : public WrappedProperty { public: virtual PROPERTYTYPE getValueFromSeries( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xSeriesPropertySet ) const =0; - virtual void setValueToSeries( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xSeriesPropertySet, PROPERTYTYPE aNewValue ) const =0; + virtual void setValueToSeries( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xSeriesPropertySet, const PROPERTYTYPE & aNewValue ) const =0; explicit WrappedSeriesOrDiagramProperty( const OUString& rName, const ::com::sun::star::uno::Any& rDefaulValue , ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx index c1f105036655..473447f3b26c 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx @@ -205,7 +205,7 @@ class WrappedConstantErrorLowProperty : public WrappedStatisticProperty< double { public: virtual double getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const; - virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, double aNewValue ) const; + virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const double& aNewValue ) const; explicit WrappedConstantErrorLowProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ); @@ -241,7 +241,7 @@ double WrappedConstantErrorLowProperty::getValueFromSeries( const Reference< bea return aRet; } -void WrappedConstantErrorLowProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, double aNewValue ) const +void WrappedConstantErrorLowProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const double& aNewValue ) const { uno::Reference< beans::XPropertySet > xErrorBarProperties( getOrCreateErrorBarProperties(xSeriesPropertySet) ); if( xErrorBarProperties.is() ) @@ -259,7 +259,7 @@ class WrappedConstantErrorHighProperty : public WrappedStatisticProperty< double { public: virtual double getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const; - virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, double aNewValue ) const; + virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const double& aNewValue ) const; explicit WrappedConstantErrorHighProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ); @@ -295,7 +295,7 @@ double WrappedConstantErrorHighProperty::getValueFromSeries( const Reference< be return aRet; } -void WrappedConstantErrorHighProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, double aNewValue ) const +void WrappedConstantErrorHighProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const double& aNewValue ) const { uno::Reference< beans::XPropertySet > xErrorBarProperties( getOrCreateErrorBarProperties(xSeriesPropertySet) ); if( xErrorBarProperties.is() ) @@ -313,7 +313,7 @@ class WrappedMeanValueProperty : public WrappedStatisticProperty< sal_Bool > { public: virtual sal_Bool getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const; - virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, sal_Bool aNewValue ) const; + virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const sal_Bool& aNewValue ) const; explicit WrappedMeanValueProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ); @@ -339,7 +339,7 @@ sal_Bool WrappedMeanValueProperty::getValueFromSeries( const Reference< beans::X return bRet; } -void WrappedMeanValueProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, sal_Bool aNewValue ) const +void WrappedMeanValueProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const sal_Bool& aNewValue ) const { uno::Reference< chart2::XRegressionCurveContainer > xRegCnt( xSeriesPropertySet, uno::UNO_QUERY ); if( xRegCnt.is() ) @@ -357,7 +357,7 @@ class WrappedErrorCategoryProperty : public WrappedStatisticProperty< ::com::sun { public: virtual ::com::sun::star::chart::ChartErrorCategory getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const; - virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, ::com::sun::star::chart::ChartErrorCategory aNewValue ) const; + virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const ::com::sun::star::chart::ChartErrorCategory& aNewValue ) const; explicit WrappedErrorCategoryProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ); @@ -414,7 +414,7 @@ WrappedErrorCategoryProperty::~WrappedErrorCategoryProperty() } return aRet; } -void WrappedErrorCategoryProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, ::com::sun::star::chart::ChartErrorCategory aNewValue ) const +void WrappedErrorCategoryProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const ::com::sun::star::chart::ChartErrorCategory& aNewValue ) const { if( !xSeriesPropertySet.is() ) return; @@ -455,7 +455,7 @@ class WrappedPercentageErrorProperty : public WrappedStatisticProperty< double > { public: virtual double getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const; - virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, double aNewValue ) const; + virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const double& aNewValue ) const; explicit WrappedPercentageErrorProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ); @@ -490,7 +490,7 @@ double WrappedPercentageErrorProperty::getValueFromSeries( const Reference< bean } return aRet; } -void WrappedPercentageErrorProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, double aNewValue ) const +void WrappedPercentageErrorProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const double& aNewValue ) const { uno::Reference< beans::XPropertySet > xErrorBarProperties( getOrCreateErrorBarProperties(xSeriesPropertySet) ); if( xErrorBarProperties.is() ) @@ -509,7 +509,7 @@ class WrappedErrorMarginProperty : public WrappedStatisticProperty< double > { public: virtual double getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const; - virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, double aNewValue ) const; + virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const double& aNewValue ) const; explicit WrappedErrorMarginProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ); @@ -544,7 +544,7 @@ double WrappedErrorMarginProperty::getValueFromSeries( const Reference< beans::X } return aRet; } -void WrappedErrorMarginProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, double aNewValue ) const +void WrappedErrorMarginProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const double& aNewValue ) const { uno::Reference< beans::XPropertySet > xErrorBarProperties( getOrCreateErrorBarProperties(xSeriesPropertySet) ); if( xErrorBarProperties.is() ) @@ -563,7 +563,7 @@ class WrappedErrorIndicatorProperty : public WrappedStatisticProperty< ::com::su { public: virtual ::com::sun::star::chart::ChartErrorIndicatorType getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const; - virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, ::com::sun::star::chart::ChartErrorIndicatorType aNewValue ) const; + virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const ::com::sun::star::chart::ChartErrorIndicatorType& aNewValue ) const; explicit WrappedErrorIndicatorProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ); @@ -602,7 +602,7 @@ WrappedErrorIndicatorProperty::~WrappedErrorIndicatorProperty() } return aRet; } -void WrappedErrorIndicatorProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, ::com::sun::star::chart::ChartErrorIndicatorType aNewValue ) const +void WrappedErrorIndicatorProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const ::com::sun::star::chart::ChartErrorIndicatorType& aNewValue ) const { uno::Reference< beans::XPropertySet > xErrorBarProperties( getOrCreateErrorBarProperties(xSeriesPropertySet) ); if( xErrorBarProperties.is() ) @@ -636,7 +636,7 @@ class WrappedErrorBarStyleProperty : public WrappedStatisticProperty< sal_Int32 { public: virtual sal_Int32 getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const; - virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, sal_Int32 nNewValue ) const; + virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const sal_Int32& nNewValue ) const; explicit WrappedErrorBarStyleProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact1, tSeriesOrDiagramPropertyType ePropertyType ); @@ -665,7 +665,7 @@ sal_Int32 WrappedErrorBarStyleProperty::getValueFromSeries( const Reference< bea } return nRet; } -void WrappedErrorBarStyleProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, sal_Int32 nNewValue ) const +void WrappedErrorBarStyleProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const sal_Int32& nNewValue ) const { if( !xSeriesPropertySet.is() ) return; @@ -682,7 +682,7 @@ class WrappedErrorBarRangePositiveProperty : public WrappedStatisticProperty< OU { public: virtual OUString getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const; - virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, OUString aNewValue ) const; + virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const OUString& aNewValue ) const; explicit WrappedErrorBarRangePositiveProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ); @@ -724,7 +724,7 @@ OUString WrappedErrorBarRangePositiveProperty::getValueFromSeries( const Referen return aRet; } -void WrappedErrorBarRangePositiveProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, OUString aNewValue ) const +void WrappedErrorBarRangePositiveProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const OUString& aNewValue ) const { uno::Reference< beans::XPropertySet > xErrorBarProperties( getOrCreateErrorBarProperties(xSeriesPropertySet) ); if( xErrorBarProperties.is() ) @@ -734,11 +734,12 @@ void WrappedErrorBarRangePositiveProperty::setValueToSeries( const Reference< be uno::Reference< chart2::data::XDataSource > xDataSource( xErrorBarProperties, uno::UNO_QUERY ); if( xDataSource.is() && xDataProvider.is()) { + OUString aTmp( aNewValue ); OUString aXMLRange( aNewValue ); - lcl_ConvertRangeFromXML( aNewValue, m_spChart2ModelContact ); + lcl_ConvertRangeFromXML( aTmp, m_spChart2ModelContact ); StatisticsHelper::setErrorDataSequence( - xDataSource, xDataProvider, aNewValue, true /* positive */, true /* y-error */, &aXMLRange ); - m_aOuterValue <<= aNewValue; + xDataSource, xDataProvider, aTmp, true /* positive */, true /* y-error */, &aXMLRange ); + m_aOuterValue <<= aTmp; } } } @@ -748,7 +749,7 @@ class WrappedErrorBarRangeNegativeProperty : public WrappedStatisticProperty< OU { public: virtual OUString getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const; - virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, OUString aNewValue ) const; + virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const OUString& aNewValue ) const; explicit WrappedErrorBarRangeNegativeProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ); @@ -790,7 +791,7 @@ OUString WrappedErrorBarRangeNegativeProperty::getValueFromSeries( const Referen return aRet; } -void WrappedErrorBarRangeNegativeProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, OUString aNewValue ) const +void WrappedErrorBarRangeNegativeProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const OUString& aNewValue ) const { uno::Reference< beans::XPropertySet > xErrorBarProperties( getOrCreateErrorBarProperties(xSeriesPropertySet) ); if( xErrorBarProperties.is() ) @@ -800,11 +801,12 @@ void WrappedErrorBarRangeNegativeProperty::setValueToSeries( const Reference< be uno::Reference< chart2::data::XDataSource > xDataSource( xErrorBarProperties, uno::UNO_QUERY ); if( xDataSource.is() && xDataProvider.is()) { + OUString aTmp( aNewValue ); OUString aXMLRange( aNewValue ); - lcl_ConvertRangeFromXML( aNewValue, m_spChart2ModelContact ); + lcl_ConvertRangeFromXML( aTmp, m_spChart2ModelContact ); StatisticsHelper::setErrorDataSequence( - xDataSource, xDataProvider, aNewValue, false /* positive */, true /* y-error */, &aXMLRange ); - m_aOuterValue <<= aNewValue; + xDataSource, xDataProvider, aTmp, false /* positive */, true /* y-error */, &aXMLRange ); + m_aOuterValue <<= aTmp; } } } @@ -814,7 +816,7 @@ class WrappedRegressionCurvesProperty : public WrappedStatisticProperty< ::com:: { public: virtual ::com::sun::star::chart::ChartRegressionCurveType getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const; - virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, ::com::sun::star::chart::ChartRegressionCurveType aNewValue ) const; + virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const ::com::sun::star::chart::ChartRegressionCurveType & aNewValue ) const; explicit WrappedRegressionCurvesProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ); @@ -844,7 +846,7 @@ WrappedRegressionCurvesProperty::~WrappedRegressionCurvesProperty() } return aRet; } -void WrappedRegressionCurvesProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, ::com::sun::star::chart::ChartRegressionCurveType aNewValue ) const +void WrappedRegressionCurvesProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const ::com::sun::star::chart::ChartRegressionCurveType& aNewValue ) const { uno::Reference< chart2::XRegressionCurveContainer > xRegressionCurveContainer( xSeriesPropertySet, uno::UNO_QUERY ); uno::Reference< chart2::XRegressionCurve > xRegressionCurve( xSeriesPropertySet, uno::UNO_QUERY ); @@ -869,7 +871,7 @@ class WrappedStatisticPropertySetProperty : public WrappedStatisticProperty< Ref public: virtual Reference< beans::XPropertySet > getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const; // properties are read-only, so this method should never be called - virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, Reference< beans::XPropertySet > xNewValue ) const; + virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const Reference< beans::XPropertySet > & xNewValue ) const; enum PropertySetType { @@ -931,7 +933,7 @@ Reference< beans::XPropertySet > WrappedStatisticPropertySetProperty::getValueFr void WrappedStatisticPropertySetProperty::setValueToSeries( const Reference< beans::XPropertySet >& /* xSeriesPropertySet */ - , Reference< beans::XPropertySet > /* xNewValue */ ) const + , const Reference< beans::XPropertySet >& /* xNewValue */ ) const { } diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx index a9eb28b2919f..fb03897f2dc7 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx @@ -68,7 +68,7 @@ class WrappedSymbolTypeProperty : public WrappedSeriesOrDiagramProperty< sal_Int { public: virtual sal_Int32 getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const; - virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, sal_Int32 aNewValue ) const; + virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const sal_Int32& aNewValue ) const; virtual Any getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const throw ( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException); @@ -84,7 +84,7 @@ class WrappedSymbolBitmapURLProperty : public WrappedSeriesOrDiagramProperty< OU { public: virtual OUString getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const; - virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, OUString aNewGraphicURL ) const; + virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const OUString& aNewGraphicURL ) const; explicit WrappedSymbolBitmapURLProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ); @@ -95,7 +95,7 @@ class WrappedSymbolSizeProperty : public WrappedSeriesOrDiagramProperty< awt::Si { public: virtual awt::Size getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const; - virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, awt::Size aNewSize ) const; + virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const awt::Size& aNewSize ) const; virtual beans::PropertyState getPropertyState( const Reference< beans::XPropertyState >& xInnerPropertyState ) const throw (beans::UnknownPropertyException, uno::RuntimeException); @@ -108,7 +108,7 @@ class WrappedSymbolAndLinesProperty : public WrappedSeriesOrDiagramProperty< sal { public: virtual sal_Bool getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const; - virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, sal_Bool bDrawLines ) const; + virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const sal_Bool& bDrawLines ) const; virtual beans::PropertyState getPropertyState( const Reference< beans::XPropertyState >& xInnerPropertyState ) const throw (beans::UnknownPropertyException, uno::RuntimeException); @@ -251,7 +251,7 @@ sal_Int32 WrappedSymbolTypeProperty::getValueFromSeries( const Reference< beans: return aRet; } -void WrappedSymbolTypeProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, sal_Int32 nSymbolType ) const +void WrappedSymbolTypeProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const sal_Int32& nSymbolType ) const { if(!xSeriesPropertySet.is()) return; @@ -344,7 +344,7 @@ OUString WrappedSymbolBitmapURLProperty::getValueFromSeries( const Reference< be void WrappedSymbolBitmapURLProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, - OUString aNewGraphicURL ) const + const OUString& aNewGraphicURL ) const { if(!xSeriesPropertySet.is()) return; @@ -466,7 +466,7 @@ awt::Size WrappedSymbolSizeProperty::getValueFromSeries( const Reference< beans: void WrappedSymbolSizeProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, - awt::Size aNewSize ) const + const awt::Size& aNewSize ) const { if(!xSeriesPropertySet.is()) return; @@ -524,7 +524,7 @@ sal_Bool WrappedSymbolAndLinesProperty::getValueFromSeries( const Reference< bea void WrappedSymbolAndLinesProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, - sal_Bool bDrawLines ) const + const sal_Bool& bDrawLines ) const { if(!xSeriesPropertySet.is()) return; diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index 95091b6753ae..7c4c98b05dc5 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -1118,7 +1118,7 @@ sal_uInt32 DataBrowser::GetNumberFormatKey( sal_Int32 nRow, sal_uInt16 nCol ) co return m_apDataBrowserModel->getNumberFormatKey( lcl_getColumnInData( nCol ), lcl_getRowInData( nRow )); } -bool DataBrowser::isDateString( OUString aInputString, double& fOutDateValue ) +bool DataBrowser::isDateString( const OUString& aInputString, double& fOutDateValue ) { sal_uInt32 nNumberFormat=0; SvNumberFormatter* pSvNumberFormatter = m_spNumberFormatterWrapper.get() ? m_spNumberFormatterWrapper->getSvNumberFormatter() : 0; diff --git a/chart2/source/controller/dialogs/DataBrowser.hxx b/chart2/source/controller/dialogs/DataBrowser.hxx index db160082f152..231772799edb 100644 --- a/chart2/source/controller/dialogs/DataBrowser.hxx +++ b/chart2/source/controller/dialogs/DataBrowser.hxx @@ -85,7 +85,7 @@ public: */ double GetCellNumber( long nRow, sal_uInt16 nColumnId ) const; - bool isDateString( OUString aInputString, double& fOutDateValue ); + bool isDateString( const OUString& aInputString, double& fOutDateValue ); // Window virtual void Resize(); diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx index ce6defc7f7b4..8ce7e2889535 100644 --- a/chart2/source/controller/dialogs/DataBrowserModel.cxx +++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx @@ -247,7 +247,7 @@ struct DataBrowserModel::tDataColumn const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries > & xDataSeries, sal_Int32 nIndexInDataSeries, - OUString aUIRoleName, + const OUString& aUIRoleName, ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > xLabeledDataSequence, eCellType aCellType, diff --git a/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx b/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx index 81f94d25ca73..918186730676 100644 --- a/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx @@ -70,7 +70,7 @@ namespace } template <class T, class D> -bool lclConvertToPropertySet(const SfxItemSet& rItemSet, sal_uInt16 nWhichId, uno::Reference<beans::XPropertySet> xProperties, OUString aPropertyID) +bool lclConvertToPropertySet(const SfxItemSet& rItemSet, sal_uInt16 nWhichId, uno::Reference<beans::XPropertySet> xProperties, const OUString& aPropertyID) { OSL_ASSERT(xProperties.is()); if( xProperties.is() ) @@ -88,7 +88,7 @@ bool lclConvertToPropertySet(const SfxItemSet& rItemSet, sal_uInt16 nWhichId, un } template <class T, class D> -void lclConvertToItemSet(SfxItemSet& rItemSet, sal_uInt16 nWhichId, uno::Reference<beans::XPropertySet> xProperties, OUString aPropertyID) +void lclConvertToItemSet(SfxItemSet& rItemSet, sal_uInt16 nWhichId, uno::Reference<beans::XPropertySet> xProperties, const OUString& aPropertyID) { OSL_ASSERT(xProperties.is()); if( xProperties.is() ) @@ -101,7 +101,7 @@ void lclConvertToItemSet(SfxItemSet& rItemSet, sal_uInt16 nWhichId, uno::Referen } } -void lclConvertToItemSetDouble(SfxItemSet& rItemSet, sal_uInt16 nWhichId, uno::Reference<beans::XPropertySet> xProperties, OUString aPropertyID) +void lclConvertToItemSetDouble(SfxItemSet& rItemSet, sal_uInt16 nWhichId, uno::Reference<beans::XPropertySet> xProperties, const OUString& aPropertyID) { OSL_ASSERT(xProperties.is()); if( xProperties.is() ) diff --git a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx index 3ea3a80105fa..17bb183ccc66 100644 --- a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx @@ -202,7 +202,7 @@ uno::Reference< beans::XPropertySet > lcl_getCurveProperties( } template <class T, class D> -bool lclConvertToPropertySet(const SfxItemSet& rItemSet, sal_uInt16 nWhichId, uno::Reference<beans::XPropertySet> xProperties, OUString aPropertyID) +bool lclConvertToPropertySet(const SfxItemSet& rItemSet, sal_uInt16 nWhichId, uno::Reference<beans::XPropertySet> xProperties, const OUString& aPropertyID) { OSL_ASSERT(xProperties.is()); if( xProperties.is() ) @@ -220,7 +220,7 @@ bool lclConvertToPropertySet(const SfxItemSet& rItemSet, sal_uInt16 nWhichId, un } template <class T, class D> -void lclConvertToItemSet(SfxItemSet& rItemSet, sal_uInt16 nWhichId, uno::Reference<beans::XPropertySet> xProperties, OUString aPropertyID) +void lclConvertToItemSet(SfxItemSet& rItemSet, sal_uInt16 nWhichId, uno::Reference<beans::XPropertySet> xProperties, const OUString& aPropertyID) { OSL_ASSERT(xProperties.is()); if( xProperties.is() ) @@ -233,7 +233,7 @@ void lclConvertToItemSet(SfxItemSet& rItemSet, sal_uInt16 nWhichId, uno::Referen } } -void lclConvertToItemSetDouble(SfxItemSet& rItemSet, sal_uInt16 nWhichId, uno::Reference<beans::XPropertySet> xProperties, OUString aPropertyID) +void lclConvertToItemSetDouble(SfxItemSet& rItemSet, sal_uInt16 nWhichId, uno::Reference<beans::XPropertySet> xProperties, const OUString& aPropertyID) { OSL_ASSERT(xProperties.is()); if( xProperties.is() ) diff --git a/chart2/source/inc/DataSeriesHelper.hxx b/chart2/source/inc/DataSeriesHelper.hxx index 14513732c53e..2755d3b8a89b 100644 --- a/chart2/source/inc/DataSeriesHelper.hxx +++ b/chart2/source/inc/DataSeriesHelper.hxx @@ -56,7 +56,7 @@ OUString GetRole( OOO_DLLPUBLIC_CHARTTOOLS ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > getDataSequenceByRole( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSource > & xSource, - OUString aRole, + const OUString& aRole, bool bMatchPrefix = false ); /** Retrieves all data sequences in the given data source that match the given @@ -73,7 +73,7 @@ OOO_DLLPUBLIC_CHARTTOOLS ::std::vector< getAllDataSequencesByRole( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > > & aDataSequences, - OUString aRole, + const OUString& aRole, bool bMatchPrefix = false ); /** Retrieves all data sequences found in the given data series and puts them diff --git a/chart2/source/inc/RegressionCurveHelper.hxx b/chart2/source/inc/RegressionCurveHelper.hxx index 851eb8b1a27d..ee1d1607ace4 100644 --- a/chart2/source/inc/RegressionCurveHelper.hxx +++ b/chart2/source/inc/RegressionCurveHelper.hxx @@ -45,7 +45,7 @@ public: SAL_DLLPRIVATE static css::uno::Reference<css::chart2::XRegressionCurve> createRegressionCurveByServiceName( const css::uno::Reference<css::uno::XComponentContext> & xContext, - OUString aServiceName ); + const OUString& aServiceName ); static bool hasMeanValueLine( const css::uno::Reference<css::chart2::XRegressionCurveContainer> & xRegCnt ); @@ -136,7 +136,7 @@ public: /// returns a calculator object for regression curves (used by the view) static css::uno::Reference<css::chart2::XRegressionCurveCalculator> - createRegressionCurveCalculatorByServiceName( OUString aServiceName ); + createRegressionCurveCalculatorByServiceName( const OUString& aServiceName ); /** recalculates the regression parameters according to the data given in the data source. diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx index 16d36968c9b6..3b682725b850 100644 --- a/chart2/source/tools/DataSeriesHelper.cxx +++ b/chart2/source/tools/DataSeriesHelper.cxx @@ -204,7 +204,8 @@ OUString GetRole( const uno::Reference< chart2::data::XLabeledDataSequence >& xL Reference< chart2::data::XLabeledDataSequence > getDataSequenceByRole( - const Reference< chart2::data::XDataSource > & xSource, OUString aRole, + const Reference< chart2::data::XDataSource > & xSource, + const OUString& aRole, bool bMatchPrefix /* = false */ ) { Reference< chart2::data::XLabeledDataSequence > aNoResult; @@ -225,7 +226,7 @@ Reference< chart2::data::XLabeledDataSequence > ::std::vector< Reference< chart2::data::XLabeledDataSequence > > getAllDataSequencesByRole( const Sequence< Reference< chart2::data::XLabeledDataSequence > > & aDataSequences, - OUString aRole, bool bMatchPrefix /* = false */ ) + const OUString& aRole, bool bMatchPrefix /* = false */ ) { ::std::vector< Reference< chart2::data::XLabeledDataSequence > > aResultVec; ::std::remove_copy_if( aDataSequences.getConstArray(), aDataSequences.getConstArray() + aDataSequences.getLength(), diff --git a/chart2/source/tools/RegressionCurveHelper.cxx b/chart2/source/tools/RegressionCurveHelper.cxx index d7c9dc4fb8f2..1f243370b18f 100644 --- a/chart2/source/tools/RegressionCurveHelper.cxx +++ b/chart2/source/tools/RegressionCurveHelper.cxx @@ -93,7 +93,7 @@ Reference< XRegressionCurve > RegressionCurveHelper::createMeanValueLine( Reference< XRegressionCurve > RegressionCurveHelper::createRegressionCurveByServiceName( const Reference< XComponentContext > & xContext, - OUString aServiceName ) + const OUString& aServiceName ) { Reference< XRegressionCurve > xResult; @@ -127,7 +127,7 @@ Reference< XRegressionCurve > RegressionCurveHelper::createRegressionCurveByServ } Reference< XRegressionCurveCalculator > RegressionCurveHelper::createRegressionCurveCalculatorByServiceName( - OUString aServiceName ) + const OUString& aServiceName ) { Reference< XRegressionCurveCalculator > xResult; diff --git a/chart2/source/view/inc/AbstractShapeFactory.hxx b/chart2/source/view/inc/AbstractShapeFactory.hxx index 9d0b8edc8519..cf709570c051 100644 --- a/chart2/source/view/inc/AbstractShapeFactory.hxx +++ b/chart2/source/view/inc/AbstractShapeFactory.hxx @@ -76,13 +76,13 @@ public: createGroup2D( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget - , OUString aName = OUString() ) = 0; + , const OUString& aName = OUString() ) = 0; virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > createGroup3D( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget - , OUString aName = OUString() ) = 0; + , const OUString& aName = OUString() ) = 0; diff --git a/chart2/source/view/inc/OpenglShapeFactory.hxx b/chart2/source/view/inc/OpenglShapeFactory.hxx index 2735f8da3927..823ad4e17dfe 100644 --- a/chart2/source/view/inc/OpenglShapeFactory.hxx +++ b/chart2/source/view/inc/OpenglShapeFactory.hxx @@ -26,13 +26,13 @@ public: createGroup2D( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget - , OUString aName = OUString() ); + , const OUString& aName = OUString() ); virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > createGroup3D( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget - , OUString aName = OUString() ); + , const OUString& aName = OUString() ); virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > createCube( const ::com::sun::star::uno::Reference< diff --git a/chart2/source/view/inc/PlotterBase.hxx b/chart2/source/view/inc/PlotterBase.hxx index 686d32bba92c..4cc8b6cc7369 100644 --- a/chart2/source/view/inc/PlotterBase.hxx +++ b/chart2/source/view/inc/PlotterBase.hxx @@ -70,7 +70,7 @@ protected: //methods ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > createGroupShape( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget - , OUString rName=OUString() ); + , const OUString& rName=OUString() ); protected: //member ::com::sun::star::uno::Reference< diff --git a/chart2/source/view/inc/ShapeFactory.hxx b/chart2/source/view/inc/ShapeFactory.hxx index 3f9652d4ccde..40551932ae95 100644 --- a/chart2/source/view/inc/ShapeFactory.hxx +++ b/chart2/source/view/inc/ShapeFactory.hxx @@ -36,13 +36,13 @@ public: createGroup2D( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget - , OUString aName = OUString() ); + , const OUString& aName = OUString() ); virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > createGroup3D( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget - , OUString aName = OUString() ); + , const OUString& aName = OUString() ); diff --git a/chart2/source/view/main/OpenglShapeFactory.cxx b/chart2/source/view/main/OpenglShapeFactory.cxx index efbceb9369f3..ecc30f48a4ba 100644 --- a/chart2/source/view/main/OpenglShapeFactory.cxx +++ b/chart2/source/view/main/OpenglShapeFactory.cxx @@ -288,7 +288,7 @@ uno::Reference< drawing::XShape > uno::Reference< drawing::XShapes > OpenglShapeFactory::createGroup2D( const uno::Reference< drawing::XShapes >& xTarget - , OUString aName) + , const OUString& aName) { dummy::DummyGroup2D* pNewShape = new dummy::DummyGroup2D(aName); xTarget->add(pNewShape); @@ -297,7 +297,7 @@ uno::Reference< drawing::XShapes > uno::Reference< drawing::XShapes > OpenglShapeFactory::createGroup3D( const uno::Reference< drawing::XShapes >& xTarget - , OUString aName ) + , const OUString& aName ) { dummy::DummyGroup3D* pNewShape = new dummy::DummyGroup3D(aName); xTarget->add(pNewShape); diff --git a/chart2/source/view/main/PlotterBase.cxx b/chart2/source/view/main/PlotterBase.cxx index 94eee35ea63b..f38b57052906 100644 --- a/chart2/source/view/main/PlotterBase.cxx +++ b/chart2/source/view/main/PlotterBase.cxx @@ -74,7 +74,7 @@ void PlotterBase::setTransformationSceneToScreen( const drawing::HomogenMatrix& uno::Reference< drawing::XShapes > PlotterBase::createGroupShape( const uno::Reference< drawing::XShapes >& xTarget - , OUString rName ) + , const OUString& rName ) { if(!m_xShapeFactory.is()) return NULL; diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx index 1b5b05473a97..1652673b6c35 100644 --- a/chart2/source/view/main/ShapeFactory.cxx +++ b/chart2/source/view/main/ShapeFactory.cxx @@ -1732,7 +1732,7 @@ uno::Reference< drawing::XShape > uno::Reference< drawing::XShapes > ShapeFactory::createGroup2D( const uno::Reference< drawing::XShapes >& xTarget - , OUString aName ) + , const OUString& aName ) { if( !xTarget.is() ) return 0; @@ -1767,7 +1767,7 @@ uno::Reference< drawing::XShapes > uno::Reference< drawing::XShapes > ShapeFactory::createGroup3D( const uno::Reference< drawing::XShapes >& xTarget - , OUString aName ) + , const OUString& aName ) { if( !xTarget.is() ) return 0; |