diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-10-29 09:57:41 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-10-30 21:55:53 +0200 |
commit | f528fff9b58e95ed572b226c0fec29f9a0464725 (patch) | |
tree | a5cfb66c337ea68c6559ef8d450cc77d5a5f0ca6 /sc/source/filter/excel/xiescher.cxx | |
parent | 9a668129259eeba1a05745b7cd820fccf3043f45 (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/filter/excel/xiescher.cxx')
-rw-r--r-- | sc/source/filter/excel/xiescher.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 883c77beaf0c..01ee80649778 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -51,6 +51,7 @@ #include <vcl/wmf.hxx> #include <comphelper/classids.hxx> #include <comphelper/documentinfo.hxx> +#include <o3tl/safeint.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/polygon/b2dpolygon.hxx> @@ -1926,8 +1927,7 @@ void XclImpControlHelper::ApplySheetLinkProps() const aValue.Name = SC_UNONAME_BOUNDCELL; aValue.Value <<= aApiAddress; - Sequence< Any > aArgs( 1 ); - aArgs[ 0 ] <<= aValue; + Sequence< Any > aArgs{ Any(aValue) }; // create the CellValueBinding instance and set at the control model OUString aServiceName; @@ -1960,8 +1960,7 @@ void XclImpControlHelper::ApplySheetLinkProps() const aValue.Name = SC_UNONAME_CELLRANGE; aValue.Value <<= aApiRange; - Sequence< Any > aArgs( 1 ); - aArgs[ 0 ] <<= aValue; + Sequence< Any > aArgs{ Any(aValue) }; // create the EntrySource instance and set at the control model Reference< XListEntrySource > xEntrySource( xFactory->createInstanceWithArguments( @@ -2897,8 +2896,7 @@ void XclImpDropDownObj::DoProcessControl( ScfPropertySet& rPropSet ) const // selection (do not set, if dropdown is linked to a cell) if( !HasCellLink() && (mnSelEntry > 0) ) { - Sequence< sal_Int16 > aSelSeq( 1 ); - aSelSeq[ 0 ] = mnSelEntry - 1; + Sequence< sal_Int16 > aSelSeq{ o3tl::narrowing<sal_Int16>(mnSelEntry - 1) }; rPropSet.SetProperty( "DefaultSelection", aSelSeq ); } } |