From 6ad8a6398dbf2b4605ee4c3c222a0c2ee396c163 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 4 May 2022 21:47:39 +0200 Subject: Just use Any ctor instead of makeAny in chart2 Change-Id: I156cd5597a4b9e683913d9730b8d8bb22e8064f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133845 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- chart2/qa/extras/PivotChartTest.cxx | 12 ++++++------ chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx | 4 ++-- .../controller/itemsetwrapper/DataPointItemConverter.cxx | 2 +- .../controller/itemsetwrapper/SeriesOptionsItemConverter.cxx | 2 +- chart2/source/controller/main/ChartController_Tools.cxx | 4 ++-- chart2/source/controller/main/ChartController_Window.cxx | 8 ++++---- chart2/source/controller/sidebar/ChartColorWrapper.cxx | 2 +- chart2/source/controller/sidebar/ChartLinePanel.cxx | 2 +- chart2/source/inc/CommonFunctors.hxx | 2 +- chart2/source/tools/TitleHelper.cxx | 2 +- chart2/source/view/main/VButton.cxx | 6 +++--- 11 files changed, 23 insertions(+), 23 deletions(-) (limited to 'chart2') diff --git a/chart2/qa/extras/PivotChartTest.cxx b/chart2/qa/extras/PivotChartTest.cxx index baa1c925132e..60dd561cb632 100644 --- a/chart2/qa/extras/PivotChartTest.cxx +++ b/chart2/qa/extras/PivotChartTest.cxx @@ -71,7 +71,7 @@ void lclModifyOrientation(uno::Reference const & xD OUString aName = xNamed->getName(); uno::Reference xPropSet(xNamed, UNO_QUERY_THROW); if (aName == sFieldName) - xPropSet->setPropertyValue("Orientation", uno::makeAny(eOrientation)); + xPropSet->setPropertyValue("Orientation", uno::Any(eOrientation)); } } @@ -87,7 +87,7 @@ void lclModifyFunction(uno::Reference const & xDesc OUString aName = xNamed->getName(); uno::Reference xPropSet(xNamed, UNO_QUERY_THROW); if (aName == sFieldName) - xPropSet->setPropertyValue("Function", uno::makeAny(eFunction)); + xPropSet->setPropertyValue("Function", uno::Any(eFunction)); } } @@ -134,13 +134,13 @@ void lclModifySubtotals(uno::Reference const & xDes void lclModifyColumnGrandTotal(uno::Reference const & xDataPilotDescriptor, bool bTotal) { uno::Reference xProperties(xDataPilotDescriptor, uno::UNO_QUERY_THROW); - xProperties->setPropertyValue("ColumnGrand", uno::makeAny(bTotal)); + xProperties->setPropertyValue("ColumnGrand", uno::Any(bTotal)); } void lclModifyRowGrandTotal(uno::Reference const & xDataPilotDescriptor, bool bTotal) { uno::Reference xProperties(xDataPilotDescriptor, uno::UNO_QUERY_THROW); - xProperties->setPropertyValue("RowGrand", uno::makeAny(bTotal)); + xProperties->setPropertyValue("RowGrand", uno::Any(bTotal)); } void lclCheckSequence(std::vector const & reference, @@ -293,7 +293,7 @@ table::CellRangeAddress lclCreateTestData(uno::ReferencegetStandardFormat(util::NumberFormat::DATE, aLocale); uno::Reference xCellRange = xSheet->getCellRangeByPosition(nEndCol, 1, nEndCol, nEndRow); uno::Reference xCellProp(xCellRange, UNO_QUERY_THROW); - xCellProp->setPropertyValue("NumberFormat", uno::makeAny(nDateKey)); + xCellProp->setPropertyValue("NumberFormat", uno::Any(nDateKey)); table::CellRangeAddress sCellRangeAddress; sCellRangeAddress.Sheet = 0; @@ -493,7 +493,7 @@ void PivotChartTest::testChangePivotTable() // Enable column totals and check the data is still unchanged { uno::Reference xProperties(xDataPilotTable, uno::UNO_QUERY_THROW); - xProperties->setPropertyValue("ColumnGrand", uno::makeAny(true)); + xProperties->setPropertyValue("ColumnGrand", uno::Any(true)); } CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getNumberOfDataSeries(xChartDoc)); diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx index 56d2d44f9ce6..abfa395ca5f0 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx @@ -138,7 +138,7 @@ namespace try { xSceneProperties->setPropertyValue( "D3DSceneLightColor" + aIndex, - uno::makeAny( rLightSource.nDiffuseColor )); + uno::Any( rLightSource.nDiffuseColor )); xSceneProperties->setPropertyValue( "D3DSceneLightDirection" + aIndex, uno::Any( rLightSource.aDirection )); xSceneProperties->setPropertyValue( "D3DSceneLightOn" + aIndex, @@ -172,7 +172,7 @@ namespace try { xSceneProperties->setPropertyValue("D3DSceneAmbientColor", - uno::makeAny( rColor )); + uno::Any( rColor )); } catch( const uno::Exception & ) { diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx index 42f572c45295..a6c4c34dc4b6 100644 --- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx @@ -581,7 +581,7 @@ bool DataPointItemConverter::ApplySpecialItem( } if (bHideLegendEntry) deletedLegendEntries.push_back(m_nPointIndex); - m_xSeries->setPropertyValue("DeletedLegendEntries", uno::makeAny(comphelper::containerToSequence(deletedLegendEntries))); + m_xSeries->setPropertyValue("DeletedLegendEntries", uno::Any(comphelper::containerToSequence(deletedLegendEntries))); } } break; diff --git a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx index 2af84b9142df..2f84084a192d 100644 --- a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx @@ -345,7 +345,7 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const Sf bool bHideLegendEntry = static_cast(rItemSet.Get(nWhichId)).GetValue(); if (bHideLegendEntry != m_bHideLegendEntry) { - GetPropertySet()->setPropertyValue("ShowLegendEntry", css::uno::makeAny(!bHideLegendEntry)); + GetPropertySet()->setPropertyValue("ShowLegendEntry", css::uno::Any(!bHideLegendEntry)); } } break; diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index 848452fdb4ce..40da1941e643 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -993,7 +993,7 @@ void ChartController::executeDispatch_LineColor(sal_uInt32 nColor) } if( xPropSet.is() ) - xPropSet->setPropertyValue( "LineColor", css::uno::makeAny( Color(ColorTransparency, nColor) ) ); + xPropSet->setPropertyValue( "LineColor", css::uno::Any( Color(ColorTransparency, nColor) ) ); } } catch( const uno::Exception& ) @@ -1023,7 +1023,7 @@ void ChartController::executeDispatch_LineWidth(sal_uInt32 nWidth) } if( xPropSet.is() ) - xPropSet->setPropertyValue( "LineWidth", css::uno::makeAny( nWidth ) ); + xPropSet->setPropertyValue( "LineWidth", css::uno::Any( nWidth ) ); } } catch( const uno::Exception& ) diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index f5dd0bdfeb9e..dc667a4fbbca 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -2099,12 +2099,12 @@ void ChartController::sendPopupRequest(OUString const & rCID, tools::Rectangle a uno::Sequence aCallbackData = comphelper::InitPropertySequence( { - {"Rectangle", uno::makeAny(xRectangle)}, - {"DimensionIndex", uno::makeAny(nDimensionIndex)}, - {"PivotTableName", uno::makeAny(sPivotTableName)}, + {"Rectangle", uno::Any(xRectangle)}, + {"DimensionIndex", uno::Any(sal_Int32(nDimensionIndex))}, + {"PivotTableName", uno::Any(sPivotTableName)}, }); - pPopupRequest->getCallback()->notify(uno::makeAny(aCallbackData)); + pPopupRequest->getCallback()->notify(uno::Any(aCallbackData)); } } //namespace chart diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.cxx b/chart2/source/controller/sidebar/ChartColorWrapper.cxx index ed94c0b0fa45..47df22d6eb02 100644 --- a/chart2/source/controller/sidebar/ChartColorWrapper.cxx +++ b/chart2/source/controller/sidebar/ChartColorWrapper.cxx @@ -96,7 +96,7 @@ void ChartColorWrapper::operator()([[maybe_unused]] const OUString& , const svx: return; } - xPropSet->setPropertyValue(maPropertyName, css::uno::makeAny(rColor.m_aColor)); + xPropSet->setPropertyValue(maPropertyName, css::uno::Any(rColor.m_aColor)); } void ChartColorWrapper::updateModel(const rtl::Reference<::chart::ChartModel>& xModel) diff --git a/chart2/source/controller/sidebar/ChartLinePanel.cxx b/chart2/source/controller/sidebar/ChartLinePanel.cxx index c98357535505..d9da9a2985ef 100644 --- a/chart2/source/controller/sidebar/ChartLinePanel.cxx +++ b/chart2/source/controller/sidebar/ChartLinePanel.cxx @@ -56,7 +56,7 @@ OUString getCID(const rtl::Reference<::chart::ChartModel>& xModel) css::uno::Any aAny = xSelectionSupplier->getSelection(); if (!aAny.hasValue()) { - xSelectionSupplier->select(css::uno::makeAny(OUString("CID/Page="))); + xSelectionSupplier->select(css::uno::Any(OUString("CID/Page="))); aAny = xSelectionSupplier->getSelection(); } diff --git a/chart2/source/inc/CommonFunctors.hxx b/chart2/source/inc/CommonFunctors.hxx index 4abdcc168ae6..7bb776490cda 100644 --- a/chart2/source/inc/CommonFunctors.hxx +++ b/chart2/source/inc/CommonFunctors.hxx @@ -39,7 +39,7 @@ template< typename T > { css::uno::Any operator() ( const T & aVal ) { - return css::uno::makeAny( aVal ); + return css::uno::Any( aVal ); } }; diff --git a/chart2/source/tools/TitleHelper.cxx b/chart2/source/tools/TitleHelper.cxx index ec2afa7c4327..ece3ec239d1b 100644 --- a/chart2/source/tools/TitleHelper.cxx +++ b/chart2/source/tools/TitleHelper.cxx @@ -419,7 +419,7 @@ void TitleHelper::hideTitle( TitleHelper::eTitleType nTitleIndex if( xTitled.is()) { css::uno::Reference xProps(xTitled, css::uno::UNO_QUERY_THROW); - xProps->setPropertyValue("Visible",css::uno::makeAny(false)); + xProps->setPropertyValue("Visible",css::uno::Any(false)); } } diff --git a/chart2/source/view/main/VButton.cxx b/chart2/source/view/main/VButton.cxx index a515e3fa0cba..25a770fb04bc 100644 --- a/chart2/source/view/main/VButton.cxx +++ b/chart2/source/view/main/VButton.cxx @@ -69,11 +69,11 @@ rtl::Reference VButton::createTriangle(awt::Size aSize) pInnerSequenceY[2] = 0.0; pInnerSequenceZ[2] = 0.0; - xShape->SvxShape::setPropertyValue("Name", uno::makeAny(m_sCID)); + xShape->SvxShape::setPropertyValue("Name", uno::Any(m_sCID)); xShape->SvxShape::setPropertyValue(UNO_NAME_POLYPOLYGON, uno::Any(PolyToPointSequence(aPolyPolygon))); - xShape->SvxShape::setPropertyValue("LineStyle", uno::makeAny(drawing::LineStyle_NONE)); - xShape->SvxShape::setPropertyValue("FillColor", uno::makeAny(m_nArrowColor)); + xShape->SvxShape::setPropertyValue("LineStyle", uno::Any(drawing::LineStyle_NONE)); + xShape->SvxShape::setPropertyValue("FillColor", uno::Any(m_nArrowColor)); return xShape; } -- cgit v1.2.3