diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-01 20:38:22 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-03-02 07:57:38 +0200 |
commit | f69585c35411ca74e17bb6cd1cf535489472a4c2 (patch) | |
tree | b5a8f3df94dea50d1f6bf498041e8f0bc7cb3fbd /chart2 | |
parent | 33265f52dfa6a4612156288a170a8e41cff2cfd8 (diff) |
loplugin:unuseddefaultparams in chart2
Change-Id: I03a3580fdbd1f6cf08af329b07edcfe09ecbb9aa
Diffstat (limited to 'chart2')
20 files changed, 106 insertions, 188 deletions
diff --git a/chart2/qa/extras/charttest.hxx b/chart2/qa/extras/charttest.hxx index 3cf509bb223b..21e89feb3b94 100644 --- a/chart2/qa/extras/charttest.hxx +++ b/chart2/qa/extras/charttest.hxx @@ -261,10 +261,10 @@ Reference< chart2::XDataSeries > getDataSeriesFromDoc( uno::Reference< chart2::X Reference< chart2::data::XDataSequence > getLabelDataSequenceFromDoc( Reference< chart2::XChartDocument > xChartDoc, - sal_Int32 nDataSeries = 0, sal_Int32 nChartType = 0, sal_Int32 nCooSys = 0 ) + sal_Int32 nDataSeries = 0, sal_Int32 nChartType = 0 ) { Reference< chart2::XDataSeries > xDataSeries = - getDataSeriesFromDoc( xChartDoc, nDataSeries, nChartType, nCooSys ); + getDataSeriesFromDoc( xChartDoc, nDataSeries, nChartType ); CPPUNIT_ASSERT(xDataSeries.is()); Reference< chart2::data::XDataSource > xDataSource( xDataSeries, uno::UNO_QUERY_THROW ); Sequence< Reference< chart2::data::XLabeledDataSequence > > xDataSequences = @@ -284,10 +284,10 @@ Reference< chart2::data::XDataSequence > getLabelDataSequenceFromDoc( Reference< chart2::data::XDataSequence > getDataSequenceFromDocByRole( Reference< chart2::XChartDocument > xChartDoc, const OUString& rRole, - sal_Int32 nDataSeries = 0, sal_Int32 nChartType = 0, sal_Int32 nCooSys = 0 ) + sal_Int32 nDataSeries = 0, sal_Int32 nChartType = 0 ) { Reference< chart2::XDataSeries > xDataSeries = - getDataSeriesFromDoc( xChartDoc, nDataSeries, nChartType, nCooSys ); + getDataSeriesFromDoc( xChartDoc, nDataSeries, nChartType ); CPPUNIT_ASSERT(xDataSeries.is()); Reference< chart2::data::XDataSource > xDataSource( xDataSeries, uno::UNO_QUERY_THROW ); Sequence< Reference< chart2::data::XLabeledDataSequence > > xDataSequences = diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx index 1f18f1fa1758..be4efd35ff34 100644 --- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx +++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx @@ -456,9 +456,9 @@ OUString ObjectNameProvider::getGridName( const OUString& rObjectCID return aRet; } -OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const Reference< chart2::XChartDocument >& xChartDocument, bool bVerbose ) +OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const Reference< chart2::XChartDocument >& xChartDocument ) { - return getHelpText( rObjectCID, Reference< frame::XModel >( xChartDocument, uno::UNO_QUERY ), bVerbose ); + return getHelpText( rObjectCID, Reference< frame::XModel >( xChartDocument, uno::UNO_QUERY ) ); } OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const Reference< frame::XModel >& xChartModel, bool bVerbose ) diff --git a/chart2/source/controller/inc/ObjectNameProvider.hxx b/chart2/source/controller/inc/ObjectNameProvider.hxx index 004eefb1a7c6..dbe7be844db6 100644 --- a/chart2/source/controller/inc/ObjectNameProvider.hxx +++ b/chart2/source/controller/inc/ObjectNameProvider.hxx @@ -62,7 +62,7 @@ public: The parameter rObjectCID has to be a ClassifiedIdentifier - see class ObjectIdentifier. */ static OUString getHelpText( const OUString& rObjectCID, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel, bool bVerbose=false ); - static OUString getHelpText( const OUString& rObjectCID, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& xChartDocument, bool bVerbose=false ); + static OUString getHelpText( const OUString& rObjectCID, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& xChartDocument ); /** This is used for showing the currently selected object in the status bar (command "Context") diff --git a/chart2/source/inc/DataSourceHelper.hxx b/chart2/source/inc/DataSourceHelper.hxx index c58fa2587dee..4ad1a289a4e3 100644 --- a/chart2/source/inc/DataSourceHelper.hxx +++ b/chart2/source/inc/DataSourceHelper.hxx @@ -82,8 +82,7 @@ public: static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSource > pressUsedDataIntoRectangularFormat( const ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XChartDocument >& xChartDoc, - bool bWithCategories = true ); + ::com::sun::star::chart2::XChartDocument >& xChartDoc ); SAL_DLLPRIVATE static ::com::sun::star::uno::Sequence< OUString > getUsedDataRanges( const ::com::sun::star::uno::Reference< diff --git a/chart2/source/inc/DiagramHelper.hxx b/chart2/source/inc/DiagramHelper.hxx index fa168fb87327..cbd78081edc8 100644 --- a/chart2/source/inc/DiagramHelper.hxx +++ b/chart2/source/inc/DiagramHelper.hxx @@ -60,11 +60,6 @@ public: /** tries to find a template in the chart-type manager that matches the given diagram. - @param rPreferredTemplateName - Check this template first. This may speed up searching, if the - caller assumes a certain template as most likely to be the one that - matches. - @return A pair containing a template with the correct properties set as first entry and the service name of the templateas second entry. If @@ -75,8 +70,7 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram > & xDiagram, const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XMultiServiceFactory > & xChartTypeManager, - const OUString & rPreferredTemplateName = OUString()); + ::com::sun::star::lang::XMultiServiceFactory > & xChartTypeManager); /** Sets the "SwapXAndYAxis" property at all coordinate systems found in the given diagram. @@ -102,18 +96,16 @@ public: bool& rbFound, bool& rbAmbiguous ); - /** @param bOnlyAtFirstChartType - If </sal_True>, the stacking mode is only set at the series found inside - the first chart type. This is the standard for all current - templates (the only template that has more than one chart-type and - allows stacking is bar/line combi, and for this the stacking only - applies to the first chart type/the bars) + /** The stacking mode is only set at the series found inside + the first chart type. This is the standard for all current + templates (the only template that has more than one chart-type and + allows stacking is bar/line combi, and for this the stacking only + applies to the first chart type/the bars) */ static void setStackMode( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram > & xDiagram, - StackMode eStackMode, - bool bOnlyAtFirstChartType = true + StackMode eStackMode ); /** Retrieves the stackmode of the first DataSeries or none. If the series have differing stack diff --git a/chart2/source/inc/RelativePositionHelper.hxx b/chart2/source/inc/RelativePositionHelper.hxx index 7f9b175864a0..4416abc2c114 100644 --- a/chart2/source/inc/RelativePositionHelper.hxx +++ b/chart2/source/inc/RelativePositionHelper.hxx @@ -73,8 +73,8 @@ public: position such that the resize is relative to the former rectangle's center. - @param bCheck If </sal_True>, the resize is only done, if after - transformation, the position and size are within the bounds [0,1]. + The resize is only done, if after + transformation, the position and size are within the bounds [0,1]. @return </sal_True>, if changes were applied. @@ -84,23 +84,21 @@ public: static bool centerGrow( ::com::sun::star::chart2::RelativePosition & rInOutPosition, ::com::sun::star::chart2::RelativeSize & rInOutSize, - double fAmountX, double fAmountY, - bool bCheck = true ); + double fAmountX, double fAmountY ); /** shifts a relative position about the given amount - @param bCheck If </sal_True>, the shift is only done, if after - transformation, the object represented by the position - rInOutPosition and its size rObjectSize the position and size are - within the bounds [0,1]. + The shift is only done, if after + transformation, the object represented by the position + rInOutPosition and its size rObjectSize the position and size are + within the bounds [0,1]. @return </sal_True>, if changes were applied. */ static bool moveObject( ::com::sun::star::chart2::RelativePosition & rInOutPosition, const ::com::sun::star::chart2::RelativeSize & rObjectSize, - double fAmountX, double fAmountY, - bool bCheck = true ); + double fAmountX, double fAmountY ); }; } //namespace chart diff --git a/chart2/source/inc/StatisticsHelper.hxx b/chart2/source/inc/StatisticsHelper.hxx index 334bbea19095..7d9aeaf7f1f9 100644 --- a/chart2/source/inc/StatisticsHelper.hxx +++ b/chart2/source/inc/StatisticsHelper.hxx @@ -34,12 +34,8 @@ namespace StatisticsHelper /** Calculates 1/n * sum (x_i - x_mean)^2. @see http://mathworld.wolfram.com/Variance.html - - @param bUnbiasedEstimator - If true, 1/(n-1) * sum (x_i - x_mean)^2 is returned. */ - OOO_DLLPUBLIC_CHARTTOOLS double getVariance( const ::com::sun::star::uno::Sequence< double > & rData, - bool bUnbiasedEstimator = false ); + OOO_DLLPUBLIC_CHARTTOOLS double getVariance( const ::com::sun::star::uno::Sequence< double > & rData ); // square root of the variance OOO_DLLPUBLIC_CHARTTOOLS double getStandardDeviation( const ::com::sun::star::uno::Sequence< double > & rData ); diff --git a/chart2/source/inc/ThreeDHelper.hxx b/chart2/source/inc/ThreeDHelper.hxx index 41427ab0435d..024466cc2083 100644 --- a/chart2/source/inc/ThreeDHelper.hxx +++ b/chart2/source/inc/ThreeDHelper.hxx @@ -80,7 +80,7 @@ public: static void switchRightAngledAxes( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xSceneProperties - , bool bRightAngledAxes, bool bRotateLights=true ); + , bool bRightAngledAxes ); static void adaptRadAnglesForRightAngledAxes( double& rfXAngleRad, double& rfYAngleRad ); static double getXDegreeAngleLimitForRightAngledAxes() { return 90.0; } diff --git a/chart2/source/tools/DataSourceHelper.cxx b/chart2/source/tools/DataSourceHelper.cxx index 84cf5f7e4831..6e3773268179 100644 --- a/chart2/source/tools/DataSourceHelper.cxx +++ b/chart2/source/tools/DataSourceHelper.cxx @@ -226,19 +226,16 @@ void DataSourceHelper::readArguments( const uno::Sequence< beans::PropertyValue } uno::Reference< chart2::data::XDataSource > DataSourceHelper::pressUsedDataIntoRectangularFormat( - const uno::Reference< chart2::XChartDocument >& xChartDoc, bool bWithCategories ) + const uno::Reference< chart2::XChartDocument >& xChartDoc ) { ::std::vector< Reference< chart2::data::XLabeledDataSequence > > aResultVector; //categories are always the first sequence Reference< chart2::XDiagram > xDiagram( xChartDoc->getFirstDiagram()); - if( bWithCategories ) - { - Reference< chart2::data::XLabeledDataSequence > xCategories( DiagramHelper::getCategoriesFromDiagram( xDiagram ) ); - if( xCategories.is() ) - aResultVector.push_back( xCategories ); - } + Reference< chart2::data::XLabeledDataSequence > xCategories( DiagramHelper::getCategoriesFromDiagram( xDiagram ) ); + if( xCategories.is() ) + aResultVector.push_back( xCategories ); ::std::vector< Reference< chart2::XDataSeries > > xSeriesVector( DiagramHelper::getDataSeriesFromDiagram( xDiagram ) ); uno::Reference< chart2::data::XDataSource > xSeriesSource( diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx index 5f1a074081a9..820209b25170 100644 --- a/chart2/source/tools/DiagramHelper.cxx +++ b/chart2/source/tools/DiagramHelper.cxx @@ -75,8 +75,7 @@ namespace chart DiagramHelper::tTemplateWithServiceName DiagramHelper::getTemplateForDiagram( const Reference< XDiagram > & xDiagram, - const Reference< lang::XMultiServiceFactory > & xChartTypeManager, - const OUString & rPreferredTemplateName ) + const Reference< lang::XMultiServiceFactory > & xChartTypeManager ) { DiagramHelper::tTemplateWithServiceName aResult; @@ -86,39 +85,20 @@ DiagramHelper::tTemplateWithServiceName Sequence< OUString > aServiceNames( xChartTypeManager->getAvailableServiceNames()); const sal_Int32 nLength = aServiceNames.getLength(); - bool bHasPreferredTemplate = !rPreferredTemplateName.isEmpty(); bool bTemplateFound = false; - if( bHasPreferredTemplate ) - { - Reference< XChartTypeTemplate > xTempl( - xChartTypeManager->createInstance( rPreferredTemplateName ), uno::UNO_QUERY ); - - if( xTempl.is() && - xTempl->matchesTemplate( xDiagram, sal_True )) - { - aResult.first = xTempl; - aResult.second = rPreferredTemplateName; - bTemplateFound = true; - } - } - for( sal_Int32 i = 0; ! bTemplateFound && i < nLength; ++i ) { try { - if( ! bHasPreferredTemplate || - ! rPreferredTemplateName.equals( aServiceNames[ i ] )) - { - Reference< XChartTypeTemplate > xTempl( - xChartTypeManager->createInstance( aServiceNames[ i ] ), uno::UNO_QUERY_THROW ); + Reference< XChartTypeTemplate > xTempl( + xChartTypeManager->createInstance( aServiceNames[ i ] ), uno::UNO_QUERY_THROW ); - if (xTempl.is() && xTempl->matchesTemplate(xDiagram, true)) - { - aResult.first = xTempl; - aResult.second = aServiceNames[ i ]; - bTemplateFound = true; - } + if (xTempl.is() && xTempl->matchesTemplate(xDiagram, true)) + { + aResult.first = xTempl; + aResult.second = aServiceNames[ i ]; + bTemplateFound = true; } } catch( const uno::Exception & ex ) @@ -247,8 +227,7 @@ bool DiagramHelper::getVertical( const uno::Reference< chart2::XDiagram > & xDia void DiagramHelper::setStackMode( const Reference< XDiagram > & xDiagram, - StackMode eStackMode, - bool bOnlyAtFirstChartType /* = true */ + StackMode eStackMode ) { try @@ -307,8 +286,7 @@ void DiagramHelper::setStackMode( continue; uno::Sequence< uno::Reference< XChartType > > aChartTypeList( xChartTypeContainer->getChartTypes() ); sal_Int32 nMax = aChartTypeList.getLength(); - if( bOnlyAtFirstChartType - && nMax >= 1 ) + if( nMax >= 1 ) nMax = 1; for( sal_Int32 nT = 0; nT < nMax; ++nT ) { diff --git a/chart2/source/tools/ImplOPropertySet.cxx b/chart2/source/tools/ImplOPropertySet.cxx index 7658d817a671..3fe1e9413c9b 100644 --- a/chart2/source/tools/ImplOPropertySet.cxx +++ b/chart2/source/tools/ImplOPropertySet.cxx @@ -160,15 +160,8 @@ bool ImplOPropertySet::GetPropertyValueByHandle( } void ImplOPropertySet::SetPropertyValueByHandle( - sal_Int32 nHandle, const Any & rValue, Any * pOldValue ) + sal_Int32 nHandle, const Any & rValue ) { - if( pOldValue != nullptr ) - { - tPropertyMap::const_iterator aFoundIter( m_aProperties.find( nHandle ) ); - if( m_aProperties.end() != aFoundIter ) - (*pOldValue) = (*aFoundIter).second; - } - m_aProperties[ nHandle ] = rValue; } diff --git a/chart2/source/tools/ImplOPropertySet.hxx b/chart2/source/tools/ImplOPropertySet.hxx index 0da1ca6f9a78..2c3c80e68663 100644 --- a/chart2/source/tools/ImplOPropertySet.hxx +++ b/chart2/source/tools/ImplOPropertySet.hxx @@ -62,8 +62,7 @@ public: sal_Int32 nHandle ) const; void SetPropertyValueByHandle( sal_Int32 nHandle, - const ::com::sun::star::uno::Any & rValue, - ::com::sun::star::uno::Any * pOldValue = nullptr ); + const ::com::sun::star::uno::Any & rValue ); bool SetStyle( const ::com::sun::star::uno::Reference< ::com::sun::star::style::XStyle > & xStyle ); ::com::sun::star::uno::Reference< ::com::sun::star::style::XStyle > diff --git a/chart2/source/tools/RelativePositionHelper.cxx b/chart2/source/tools/RelativePositionHelper.cxx index 71df2acf5cad..0d4edec1ab14 100644 --- a/chart2/source/tools/RelativePositionHelper.cxx +++ b/chart2/source/tools/RelativePositionHelper.cxx @@ -244,8 +244,7 @@ awt::Point RelativePositionHelper::getCenterOfAnchoredObject( bool RelativePositionHelper::centerGrow( chart2::RelativePosition & rInOutPosition, chart2::RelativeSize & rInOutSize, - double fAmountX, double fAmountY, - bool bCheck /* = true */ ) + double fAmountX, double fAmountY ) { chart2::RelativePosition aPos( rInOutPosition ); chart2::RelativeSize aSize( rInOutSize ); @@ -312,39 +311,35 @@ bool RelativePositionHelper::centerGrow( rInOutSize.Secondary == aSize.Secondary ) return false; - // check - if( bCheck ) - { - // Note: this somewhat complicated check allows the output being - // out-of-bounds if the input was also out-of-bounds, and the change is - // for "advantage". E.g., you have a chart that laps out on the left - // side. If you shrink it, this should be possible, also if it still - // laps out on the left side afterwards. But you shouldn't be able to - // grow it then. - - chart2::RelativePosition aUpperLeft( - RelativePositionHelper::getReanchoredPosition( aPos, aSize, drawing::Alignment_TOP_LEFT )); - chart2::RelativePosition aLowerRight( - RelativePositionHelper::getReanchoredPosition( aPos, aSize, drawing::Alignment_BOTTOM_RIGHT )); - - // Do not grow, if this leads to corners being off-screen - if( fAmountX > 0.0 && - ( (aUpperLeft.Primary < fPosCheckThreshold) || - (aLowerRight.Primary > (1.0 - fPosCheckThreshold)) )) - return false; - if( fAmountY > 0.0 && - ( (aUpperLeft.Secondary < fPosCheckThreshold) || - (aLowerRight.Secondary > (1.0 - fPosCheckThreshold)) )) - return false; - - // Do not shrink, if this leads to a size too small - if( fAmountX < 0.0 && - ( aSize.Primary < fSizeCheckThreshold )) - return false; - if( fAmountY < 0.0 && - ( aSize.Secondary < fSizeCheckThreshold )) - return false; - } + // Note: this somewhat complicated check allows the output being + // out-of-bounds if the input was also out-of-bounds, and the change is + // for "advantage". E.g., you have a chart that laps out on the left + // side. If you shrink it, this should be possible, also if it still + // laps out on the left side afterwards. But you shouldn't be able to + // grow it then. + + chart2::RelativePosition aUpperLeft( + RelativePositionHelper::getReanchoredPosition( aPos, aSize, drawing::Alignment_TOP_LEFT )); + chart2::RelativePosition aLowerRight( + RelativePositionHelper::getReanchoredPosition( aPos, aSize, drawing::Alignment_BOTTOM_RIGHT )); + + // Do not grow, if this leads to corners being off-screen + if( fAmountX > 0.0 && + ( (aUpperLeft.Primary < fPosCheckThreshold) || + (aLowerRight.Primary > (1.0 - fPosCheckThreshold)) )) + return false; + if( fAmountY > 0.0 && + ( (aUpperLeft.Secondary < fPosCheckThreshold) || + (aLowerRight.Secondary > (1.0 - fPosCheckThreshold)) )) + return false; + + // Do not shrink, if this leads to a size too small + if( fAmountX < 0.0 && + ( aSize.Primary < fSizeCheckThreshold )) + return false; + if( fAmountY < 0.0 && + ( aSize.Secondary < fSizeCheckThreshold )) + return false; rInOutPosition = aPos; rInOutSize = aSize; @@ -354,29 +349,25 @@ bool RelativePositionHelper::centerGrow( bool RelativePositionHelper::moveObject( chart2::RelativePosition & rInOutPosition, const chart2::RelativeSize & rObjectSize, - double fAmountX, double fAmountY, - bool bCheck /* = true */ ) + double fAmountX, double fAmountY ) { chart2::RelativePosition aPos( rInOutPosition ); aPos.Primary += fAmountX; aPos.Secondary += fAmountY; const double fPosCheckThreshold = 0.02; - if( bCheck ) - { - chart2::RelativePosition aUpperLeft( - RelativePositionHelper::getReanchoredPosition( aPos, rObjectSize, drawing::Alignment_TOP_LEFT )); - chart2::RelativePosition aLowerRight( aUpperLeft ); - aLowerRight.Primary += rObjectSize.Primary; - aLowerRight.Secondary += rObjectSize.Secondary; - - const double fFarEdgeThreshold = 1.0 - fPosCheckThreshold; - if( ( fAmountX > 0.0 && (aLowerRight.Primary > fFarEdgeThreshold)) || - ( fAmountX < 0.0 && (aUpperLeft.Primary < fPosCheckThreshold)) || - ( fAmountY > 0.0 && (aLowerRight.Secondary > fFarEdgeThreshold)) || - ( fAmountY < 0.0 && (aUpperLeft.Secondary < fPosCheckThreshold)) ) - return false; - } + chart2::RelativePosition aUpperLeft( + RelativePositionHelper::getReanchoredPosition( aPos, rObjectSize, drawing::Alignment_TOP_LEFT )); + chart2::RelativePosition aLowerRight( aUpperLeft ); + aLowerRight.Primary += rObjectSize.Primary; + aLowerRight.Secondary += rObjectSize.Secondary; + + const double fFarEdgeThreshold = 1.0 - fPosCheckThreshold; + if( ( fAmountX > 0.0 && (aLowerRight.Primary > fFarEdgeThreshold)) || + ( fAmountX < 0.0 && (aUpperLeft.Primary < fPosCheckThreshold)) || + ( fAmountY > 0.0 && (aLowerRight.Secondary > fFarEdgeThreshold)) || + ( fAmountY < 0.0 && (aUpperLeft.Secondary < fPosCheckThreshold)) ) + return false; rInOutPosition = aPos; return true; diff --git a/chart2/source/tools/StatisticsHelper.cxx b/chart2/source/tools/StatisticsHelper.cxx index 0c0064dffe78..b25d16594dc0 100644 --- a/chart2/source/tools/StatisticsHelper.cxx +++ b/chart2/source/tools/StatisticsHelper.cxx @@ -167,11 +167,10 @@ namespace chart { double StatisticsHelper::getVariance( - const Sequence< double > & rData, - bool bUnbiasedEstimator /* = false */ ) + const Sequence< double > & rData ) { sal_Int32 nValCount; - return lcl_getVariance( rData, nValCount, bUnbiasedEstimator ); + return lcl_getVariance( rData, nValCount, false/*bUnbiasedEstimator*/ ); } double StatisticsHelper::getStandardDeviation( const Sequence< double > & rData ) diff --git a/chart2/source/tools/ThreeDHelper.cxx b/chart2/source/tools/ThreeDHelper.cxx index 38eaa0e036ff..e08c349df1d9 100644 --- a/chart2/source/tools/ThreeDHelper.cxx +++ b/chart2/source/tools/ThreeDHelper.cxx @@ -948,7 +948,7 @@ void ThreeDHelper::getRotationAngleFromDiagram( } } -void ThreeDHelper::switchRightAngledAxes( const Reference< beans::XPropertySet >& xSceneProperties, bool bRightAngledAxes, bool bRotateLights ) +void ThreeDHelper::switchRightAngledAxes( const Reference< beans::XPropertySet >& xSceneProperties, bool bRightAngledAxes ) { try { @@ -959,18 +959,15 @@ void ThreeDHelper::switchRightAngledAxes( const Reference< beans::XPropertySet > if( bOldRightAngledAxes!=bRightAngledAxes) { xSceneProperties->setPropertyValue( "RightAngledAxes", uno::makeAny( bRightAngledAxes )); - if( bRotateLights ) + if(bRightAngledAxes) { - if(bRightAngledAxes) - { - ::basegfx::B3DHomMatrix aInverseRotation( lcl_getInverseRotationMatrix( xSceneProperties ) ); - lcl_rotateLights( aInverseRotation, xSceneProperties ); - } - else - { - ::basegfx::B3DHomMatrix aCompleteRotation( lcl_getCompleteRotationMatrix( xSceneProperties ) ); - lcl_rotateLights( aCompleteRotation, xSceneProperties ); - } + ::basegfx::B3DHomMatrix aInverseRotation( lcl_getInverseRotationMatrix( xSceneProperties ) ); + lcl_rotateLights( aInverseRotation, xSceneProperties ); + } + else + { + ::basegfx::B3DHomMatrix aCompleteRotation( lcl_getCompleteRotationMatrix( xSceneProperties ) ); + lcl_rotateLights( aCompleteRotation, xSceneProperties ); } } } diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 6c789cd8146b..380a84dde736 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -1025,8 +1025,7 @@ void VSeriesPlotter::createErrorBar( void VSeriesPlotter::createErrorBar_X( const drawing::Position3D& rUnscaledLogicPosition , VDataSeries& rVDataSeries, sal_Int32 nPointIndex - , const uno::Reference< drawing::XShapes >& xTarget - , double* pfScaledLogicX ) + , const uno::Reference< drawing::XShapes >& xTarget ) { if(m_nDimension!=2) return; @@ -1041,7 +1040,7 @@ void VSeriesPlotter::createErrorBar_X( const drawing::Position3D& rUnscaledLogic , rUnscaledLogicPosition, xErrorBarProp , rVDataSeries, nPointIndex , false /* bYError */ - , pfScaledLogicX ); + , nullptr ); } } diff --git a/chart2/source/view/inc/PlottingPositionHelper.hxx b/chart2/source/view/inc/PlottingPositionHelper.hxx index 9a568f1db10b..c4ddffe93968 100644 --- a/chart2/source/view/inc/PlottingPositionHelper.hxx +++ b/chart2/source/view/inc/PlottingPositionHelper.hxx @@ -60,12 +60,12 @@ public: inline bool isStrongLowerRequested( sal_Int32 nDimensionIndex ) const; inline bool isLogicVisible( double fX, double fY, double fZ ) const; inline void doLogicScaling( double* pX, double* pY, double* pZ, bool bClip=false ) const; - inline void doUnshiftedLogicScaling( double* pX, double* pY, double* pZ, bool bClip=false ) const; + inline void doUnshiftedLogicScaling( double* pX, double* pY, double* pZ ) const; inline void clipLogicValues( double* pX, double* pY, double* pZ ) const; void clipScaledLogicValues( double* pX, double* pY, double* pZ ) const; inline bool clipYRange( double& rMin, double& rMax ) const; - inline void doLogicScaling( ::com::sun::star::drawing::Position3D& rPos, bool bClip=false ) const; + inline void doLogicScaling( ::com::sun::star::drawing::Position3D& rPos ) const; virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTransformation > getTransformationScaledLogicToScene() const; @@ -323,11 +323,8 @@ void PlottingPositionHelper::doLogicScaling( double* pX, double* pY, double* pZ, } } -void PlottingPositionHelper::doUnshiftedLogicScaling( double* pX, double* pY, double* pZ, bool bClip ) const +void PlottingPositionHelper::doUnshiftedLogicScaling( double* pX, double* pY, double* pZ ) const { - if(bClip) - this->clipLogicValues( pX,pY,pZ ); - if(pX && m_aScales[0].Scaling.is()) *pX = m_aScales[0].Scaling->doScaling(*pX); if(pY && m_aScales[1].Scaling.is()) @@ -336,9 +333,9 @@ void PlottingPositionHelper::doUnshiftedLogicScaling( double* pX, double* pY, do *pZ = m_aScales[2].Scaling->doScaling(*pZ); } -void PlottingPositionHelper::doLogicScaling( ::com::sun::star::drawing::Position3D& rPos, bool bClip ) const +void PlottingPositionHelper::doLogicScaling( ::com::sun::star::drawing::Position3D& rPos ) const { - doLogicScaling( &rPos.PositionX, &rPos.PositionY, &rPos.PositionZ, bClip ); + doLogicScaling( &rPos.PositionX, &rPos.PositionY, &rPos.PositionZ ); } void PlottingPositionHelper::clipLogicValues( double* pX, double* pY, double* pZ ) const diff --git a/chart2/source/view/inc/VLineProperties.hxx b/chart2/source/view/inc/VLineProperties.hxx index 23de24c0cc61..51a9ea73f2ab 100644 --- a/chart2/source/view/inc/VLineProperties.hxx +++ b/chart2/source/view/inc/VLineProperties.hxx @@ -25,9 +25,6 @@ namespace chart { -/** -*/ - struct VLineProperties { com::sun::star::uno::Any Color; //type sal_Int32 UNO_NAME_LINECOLOR @@ -38,8 +35,7 @@ struct VLineProperties VLineProperties(); void initFromPropertySet( const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet >& xProp - , bool bUseSeriesPropertyNames=false ); + ::com::sun::star::beans::XPropertySet >& xProp ); bool isLineVisible() const; }; diff --git a/chart2/source/view/inc/VSeriesPlotter.hxx b/chart2/source/view/inc/VSeriesPlotter.hxx index dec486aa3b1d..c6873bdf2098 100644 --- a/chart2/source/view/inc/VSeriesPlotter.hxx +++ b/chart2/source/view/inc/VSeriesPlotter.hxx @@ -382,8 +382,7 @@ protected: void createErrorBar_X( const ::com::sun::star::drawing::Position3D& rUnscaledLogicPosition , VDataSeries& rVDataSeries, sal_Int32 nPointIndex , const ::com::sun::star::uno::Reference< - ::com::sun::star::drawing::XShapes >& xTarget - , double* pfScaledLogicX=nullptr ); + ::com::sun::star::drawing::XShapes >& xTarget ); void createErrorBar_Y( const ::com::sun::star::drawing::Position3D& rUnscaledLogicPosition , VDataSeries& rVDataSeries, sal_Int32 nPointIndex diff --git a/chart2/source/view/main/VLineProperties.cxx b/chart2/source/view/main/VLineProperties.cxx index 8cf06e6913bf..e3486ce84cf3 100644 --- a/chart2/source/view/main/VLineProperties.cxx +++ b/chart2/source/view/main/VLineProperties.cxx @@ -35,23 +35,11 @@ VLineProperties::VLineProperties() this->Width = uno::makeAny( sal_Int32(0) );//type sal_Int32 for property UNO_NAME_LINEWIDTH } -void VLineProperties::initFromPropertySet( const uno::Reference< beans::XPropertySet >& xProp, bool bUseSeriesPropertyNames ) +void VLineProperties::initFromPropertySet( const uno::Reference< beans::XPropertySet >& xProp ) { if(xProp.is()) { - if( bUseSeriesPropertyNames ) try - { - this->Color = xProp->getPropertyValue( "BorderColor" ); - this->LineStyle = xProp->getPropertyValue( "BorderStyle" ); - this->Transparence = xProp->getPropertyValue( "BorderTransparency" ); - this->Width = xProp->getPropertyValue( "BorderWidth" ); - this->DashName = xProp->getPropertyValue( "BorderDashName" ); - } - catch( const uno::Exception& e ) - { - ASSERT_EXCEPTION( e ); - } - else try + try { this->Color = xProp->getPropertyValue( "LineColor" ); this->LineStyle = xProp->getPropertyValue( "LineStyle" ); |