summaryrefslogtreecommitdiff
path: root/sc/source/core/tool
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-10-29 09:57:41 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-10-30 21:55:53 +0200
commitf528fff9b58e95ed572b226c0fec29f9a0464725 (patch)
treea5cfb66c337ea68c6559ef8d450cc77d5a5f0ca6 /sc/source/core/tool
parent9a668129259eeba1a05745b7cd820fccf3043f45 (diff)
Prepare for removal of non-const operator[] from Sequence in sc
Change-Id: Ic49c0fda3e98aeda471e674b68d40464ddac1ea1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124382 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sc/source/core/tool')
-rw-r--r--sc/source/core/tool/charthelper.cxx7
-rw-r--r--sc/source/core/tool/formulaparserpool.cxx3
-rw-r--r--sc/source/core/tool/interpr4.cxx5
3 files changed, 7 insertions, 8 deletions
diff --git a/sc/source/core/tool/charthelper.cxx b/sc/source/core/tool/charthelper.cxx
index b3bda1c529f0..32315565ace5 100644
--- a/sc/source/core/tool/charthelper.cxx
+++ b/sc/source/core/tool/charthelper.cxx
@@ -24,6 +24,7 @@
#include <chartlis.hxx>
#include <docuno.hxx>
+#include <comphelper/propertyvalue.hxx>
#include <svx/svditer.hxx>
#include <svx/svdoole2.hxx>
#include <svx/svdpage.hxx>
@@ -415,9 +416,9 @@ void ScChartHelper::CreateProtectedChartListenersAndNotify( ScDocument& rDoc, co
ScRange aRange( rDoc.GetRange( nTab, aRectangle ) );
ScRangeList aChangeRanges( aRange );
- uno::Sequence< beans::PropertyValue > aProperties( 1 );
- aProperties[ 0 ].Name = "Name";
- aProperties[ 0 ].Value <<= aChartName;
+ uno::Sequence< beans::PropertyValue > aProperties{
+ comphelper::makePropertyValue("Name", aChartName)
+ };
pModelObj->NotifyChanges( "insert-chart", aChangeRanges, aProperties );
}
diff --git a/sc/source/core/tool/formulaparserpool.cxx b/sc/source/core/tool/formulaparserpool.cxx
index 94c47fa903e8..00c5c9108063 100644
--- a/sc/source/core/tool/formulaparserpool.cxx
+++ b/sc/source/core/tool/formulaparserpool.cxx
@@ -90,8 +90,7 @@ Reference< XFormulaParser > ScParserFactoryMap::createFormulaParser(
FactoryMap::const_iterator aIt = maFactories.find( rNamespace );
if( aIt != maFactories.end() ) try
{
- Sequence< Any > aArgs( 1 );
- aArgs[ 0 ] <<= rxComponent;
+ Sequence< Any > aArgs{ Any(rxComponent) };
xParser.set( aIt->second->createInstanceWithArgumentsAndContext( aArgs, mxContext ), UNO_QUERY_THROW );
}
catch( Exception& )
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 93fb46657fb4..929844886b66 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -3134,9 +3134,8 @@ static bool lcl_setVBARange( const ScRange& aRange, const ScDocument& rDok, SbxV
{
uno::Reference< uno::XInterface > xVBARange;
uno::Reference<table::XCellRange> xCellRange = ScCellRangeObj::CreateRangeFromDoc( rDok, aRange );
- uno::Sequence< uno::Any > aArgs(2);
- aArgs[0] = lcl_getSheetModule( xCellRange, &rDok );
- aArgs[1] <<= xCellRange;
+ uno::Sequence< uno::Any > aArgs{ lcl_getSheetModule( xCellRange, &rDok ),
+ uno::Any(xCellRange) };
xVBARange = ooo::vba::createVBAUnoAPIServiceWithArgs( rDok.GetDocumentShell(), "ooo.vba.excel.Range", aArgs );
if ( xVBARange.is() )
{