summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-24 11:22:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-28 10:17:47 +0000
commit198c41c4fe8be4ce8a6ddab43ae0c5f17a4889ac (patch)
tree041d55126e9770b81f68fadfaaa69e82313786b3 /chart2
parentd3981b3e8c021ee03a2ca7103a73e56cca18df81 (diff)
new loplugin unoany
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89 Reviewed-on: https://gerrit.libreoffice.org/34714 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx2
-rw-r--r--chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx2
-rw-r--r--chart2/source/controller/chartapiwrapper/LegendWrapper.cxx2
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx20
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx8
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx6
-rw-r--r--chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx6
-rw-r--r--chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx2
-rw-r--r--chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx2
-rw-r--r--chart2/source/controller/main/ChartController_Window.cxx4
-rw-r--r--chart2/source/model/main/BaseCoordinateSystem.cxx2
-rw-r--r--chart2/source/model/main/Diagram.cxx4
12 files changed, 30 insertions, 30 deletions
diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
index 4eac71ec5864..371249471359 100644
--- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
@@ -433,7 +433,7 @@ void WrappedLineStyleProperty::setPropertyValue( const Any& rOuterValue, const R
if( m_pDataSeriesPointWrapper && m_pDataSeriesPointWrapper->isLinesForbidden() )
{
m_aOuterValue = rOuterValue;
- aNewValue = uno::Any(drawing::LineStyle_NONE);
+ aNewValue <<= drawing::LineStyle_NONE;
}
WrappedSeriesAreaOrLineProperty::setPropertyValue( aNewValue, xInnerPropertySet );
}
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 1d67914e2431..96f4f01360fa 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -1526,7 +1526,7 @@ bool WrappedNumberOfLinesProperty::detectInnerValue( uno::Any& rInnerValue ) con
}
}
if(bHasDetectableInnerValue)
- rInnerValue = uno::Any(nNumberOfLines);
+ rInnerValue <<= nNumberOfLines;
return bHasDetectableInnerValue;
}
diff --git a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
index 36878f863fc3..9b20ac825035 100644
--- a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
@@ -79,7 +79,7 @@ Any WrappedLegendAlignmentProperty::getPropertyValue( const Reference< beans::XP
xInnerPropertySet->getPropertyValue( "Show" ) >>= bShowLegend;
if(!bShowLegend)
{
- aRet = uno::Any( css::chart::ChartLegendPosition_NONE );
+ aRet <<= css::chart::ChartLegendPosition_NONE;
}
else
{
diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
index 63f8860f1f72..6884f4e8e7c5 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
@@ -404,7 +404,7 @@ Any WrappedScaleProperty::getPropertyValue( tScaleProperty eScaleProperty, const
{
sal_Int32 nIntervalCount = 0;
rSubIncrements[ 0 ].IntervalCount >>= nIntervalCount;
- aRet = uno::Any( double(nIntervalCount) );
+ aRet <<= double(nIntervalCount);
bNeedToCalculateExplicitValues = false;
}
}
@@ -442,7 +442,7 @@ Any WrappedScaleProperty::getPropertyValue( tScaleProperty eScaleProperty, const
if( rSubIncrements.getLength() > 0 )
{
sal_Int32 nIntervalCount = aExplicitIncrement.SubIncrements[ 0 ].IntervalCount;
- aRet = uno::Any( double(nIntervalCount) );
+ aRet <<= double(nIntervalCount);
}
}
else
@@ -476,7 +476,7 @@ Any WrappedScaleProperty::getPropertyValue( tScaleProperty eScaleProperty, const
if( !aExplicitIncrement.SubIncrements.empty() )
nIntervalCount = aExplicitIncrement.SubIncrements[ 0 ].IntervalCount;
}
- aRet = uno::Any( nIntervalCount );
+ aRet <<= nIntervalCount;
break;
}
case SCALE_PROP_AUTO_MAX:
@@ -531,13 +531,13 @@ Any WrappedScaleProperty::getPropertyValue( tScaleProperty eScaleProperty, const
if( !aScaleData.AutoDateAxis )
nType = css::chart::ChartAxisType::CATEGORY;
}
- aRet = uno::Any( nType );
+ aRet <<= nType;
break;
}
case SCALE_PROP_DATE_INCREMENT:
{
if( aScaleData.AxisType == AxisType::DATE || aScaleData.AutoDateAxis )
- aRet = uno::Any( aScaleData.TimeIncrement );
+ aRet <<= aScaleData.TimeIncrement;
break;
}
case SCALE_PROP_EXPLICIT_DATE_INCREMENT:
@@ -548,15 +548,15 @@ Any WrappedScaleProperty::getPropertyValue( tScaleProperty eScaleProperty, const
if( aExplicitScale.AxisType == AxisType::DATE )
{
TimeIncrement aTimeIncrement;
- aTimeIncrement.MajorTimeInterval = uno::Any( aExplicitIncrement.MajorTimeInterval );
- aTimeIncrement.MinorTimeInterval = uno::Any( aExplicitIncrement.MinorTimeInterval );
- aTimeIncrement.TimeResolution = uno::Any( aExplicitScale.TimeResolution );
- aRet = uno::Any(aTimeIncrement);
+ aTimeIncrement.MajorTimeInterval <<= aExplicitIncrement.MajorTimeInterval;
+ aTimeIncrement.MinorTimeInterval <<= aExplicitIncrement.MinorTimeInterval;
+ aTimeIncrement.TimeResolution <<= aExplicitScale.TimeResolution;
+ aRet <<= aTimeIncrement;
}
}
if( aScaleData.AxisType == AxisType::DATE || aScaleData.AutoDateAxis )
- aRet = uno::Any( aScaleData.TimeIncrement );
+ aRet <<= aScaleData.TimeIncrement;
break;
}
case SCALE_PROP_LOGARITHMIC:
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
index 72d2ca86dd45..16070e58d628 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
@@ -240,7 +240,7 @@ void WrappedConstantErrorLowProperty::setValueToSeries( const Reference< beans::
uno::Reference< beans::XPropertySet > xErrorBarProperties( getOrCreateErrorBarProperties(xSeriesPropertySet) );
if( xErrorBarProperties.is() )
{
- m_aOuterValue = uno::Any( aNewValue );
+ m_aOuterValue <<= aNewValue;
if( css::chart::ErrorBarStyle::ABSOLUTE == lcl_getErrorBarStyle( xErrorBarProperties ) )
{
xErrorBarProperties->setPropertyValue( "NegativeError", m_aOuterValue );
@@ -290,7 +290,7 @@ void WrappedConstantErrorHighProperty::setValueToSeries( const Reference< beans:
uno::Reference< beans::XPropertySet > xErrorBarProperties( getOrCreateErrorBarProperties(xSeriesPropertySet) );
if( xErrorBarProperties.is() )
{
- m_aOuterValue = uno::Any( aNewValue );
+ m_aOuterValue <<= aNewValue;
if( css::chart::ErrorBarStyle::ABSOLUTE == lcl_getErrorBarStyle( xErrorBarProperties ) )
{
xErrorBarProperties->setPropertyValue( "PositiveError" , m_aOuterValue );
@@ -473,7 +473,7 @@ void WrappedPercentageErrorProperty::setValueToSeries( const Reference< beans::X
uno::Reference< beans::XPropertySet > xErrorBarProperties( getOrCreateErrorBarProperties(xSeriesPropertySet) );
if( xErrorBarProperties.is() )
{
- m_aOuterValue = uno::Any( aNewValue );
+ m_aOuterValue <<= aNewValue;
if( css::chart::ErrorBarStyle::RELATIVE == lcl_getErrorBarStyle( xErrorBarProperties ) )
{
xErrorBarProperties->setPropertyValue( "PositiveError" , m_aOuterValue );
@@ -523,7 +523,7 @@ void WrappedErrorMarginProperty::setValueToSeries( const Reference< beans::XProp
uno::Reference< beans::XPropertySet > xErrorBarProperties( getOrCreateErrorBarProperties(xSeriesPropertySet) );
if( xErrorBarProperties.is() )
{
- m_aOuterValue = uno::Any( aNewValue );
+ m_aOuterValue <<= aNewValue;
if( css::chart::ErrorBarStyle::ERROR_MARGIN == lcl_getErrorBarStyle( xErrorBarProperties ) )
{
xErrorBarProperties->setPropertyValue( "PositiveError" , m_aOuterValue );
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
index 31b458abea71..f8bbbffda161 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
@@ -248,14 +248,14 @@ Any WrappedSymbolTypeProperty::getPropertyValue( const Reference< beans::XProper
{
if(bHasAmbiguousValue)
{
- m_aOuterValue = uno::Any( css::chart::ChartSymbolType::AUTO );
+ m_aOuterValue <<= css::chart::ChartSymbolType::AUTO;
}
else
{
if( css::chart::ChartSymbolType::NONE == aValue )
- m_aOuterValue = uno::Any( css::chart::ChartSymbolType::NONE );
+ m_aOuterValue <<= css::chart::ChartSymbolType::NONE;
else
- m_aOuterValue = uno::Any( css::chart::ChartSymbolType::AUTO );
+ m_aOuterValue <<= css::chart::ChartSymbolType::AUTO;
}
}
return m_aOuterValue;
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
index 909760b3e932..a41830d2063f 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
@@ -313,7 +313,7 @@ uno::Any SAL_CALL CreationWizardUnoDlg::getPropertyValue( const OUString& rPrope
{
Rectangle aRect( m_pDialog->GetWindowExtentsRelative( nullptr ) );
awt::Point aPoint(aRect.Left(),aRect.Top());
- aRet = uno::Any( aPoint );
+ aRet <<= aPoint;
}
}
else if( rPropertyName == "Size" )
@@ -326,12 +326,12 @@ uno::Any SAL_CALL CreationWizardUnoDlg::getPropertyValue( const OUString& rPrope
{
Rectangle aRect( m_pDialog->GetWindowExtentsRelative( nullptr ) );
awt::Size aSize(aRect.GetWidth(),aRect.GetHeight());
- aRet = uno::Any( aSize );
+ aRet <<= aSize;
}
}
else if( rPropertyName == "UnlockControllersOnExecute" )
{
- aRet = uno::Any( m_bUnlockControllersOnExecute );
+ aRet <<= m_bUnlockControllersOnExecute;
}
else
throw beans::UnknownPropertyException( "unknown property was tried to get from chart wizard" , nullptr );
diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
index e22dc881dd61..1bbb029ef294 100644
--- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
@@ -809,7 +809,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
if( xCrossingMainAxis.is() )
{
ScaleData aCrossingScale( xCrossingMainAxis->getScaleData() );
- aCrossingScale.Origin = uno::Any(fValue);
+ aCrossingScale.Origin <<= fValue;
xCrossingMainAxis->setScaleData(aCrossingScale);
}
}
diff --git a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
index 40e42a608ca2..cda6691c67a6 100644
--- a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
@@ -106,7 +106,7 @@ bool numberFormatFromItemToPropertySet(
sal_Int32 nFmt = static_cast<sal_Int32>(
static_cast<const SfxUInt32Item&>(
rItemSet.Get(nWhichId)).GetValue());
- aValue = uno::Any(nFmt);
+ aValue <<= nFmt;
}
else
return bChanged;
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index 5aa588971400..f32e0c25fab1 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -1601,12 +1601,12 @@ uno::Any SAL_CALL ChartController::getSelection()
OUString aCID( m_aSelection.getSelectedCID() );
if ( !aCID.isEmpty() )
{
- aReturn = uno::Any( aCID );
+ aReturn <<= aCID;
}
else
{
// #i12587# support for shapes in chart
- aReturn = uno::Any( m_aSelection.getSelectedAdditionalShape() );
+ aReturn <<= m_aSelection.getSelectedAdditionalShape();
}
}
return aReturn;
diff --git a/chart2/source/model/main/BaseCoordinateSystem.cxx b/chart2/source/model/main/BaseCoordinateSystem.cxx
index fcff9a60aad1..38694dcdf0e2 100644
--- a/chart2/source/model/main/BaseCoordinateSystem.cxx
+++ b/chart2/source/model/main/BaseCoordinateSystem.cxx
@@ -149,7 +149,7 @@ BaseCoordinateSystem::BaseCoordinateSystem(
m_aOrigin.realloc( m_nDimensionCount );
for( sal_Int32 i = 0; i < m_nDimensionCount; ++i )
- m_aOrigin[ i ] = uno::Any( double( 0.0 ) );
+ m_aOrigin[ i ] <<= double( 0.0 );
setFastPropertyValue_NoBroadcast( PROP_COORDINATESYSTEM_SWAPXANDYAXIS, uno::Any( false ));
}
diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx
index 06ce4ac9cab6..b55c8e690017 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -680,7 +680,7 @@ void SAL_CALL Diagram::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) co
{
sal_Int32 nPerspective = ::basegfx::fround( ThreeDHelper::CameraDistanceToPerspective(
ThreeDHelper::getCameraDistance( const_cast< Diagram* >( this ) ) ) );
- rValue = uno::Any(nPerspective);
+ rValue <<= nPerspective;
}
else if( PROP_DIAGRAM_ROTATION_HORIZONTAL == nHandle
|| PROP_DIAGRAM_ROTATION_VERTICAL == nHandle )
@@ -692,7 +692,7 @@ void SAL_CALL Diagram::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) co
nAngleDegree = nHorizontal;
else
nAngleDegree = nVertical;
- rValue = uno::Any(nAngleDegree);
+ rValue <<= nAngleDegree;
}
else
::property::OPropertySet::getFastPropertyValue( rValue,nHandle );