diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-10-29 09:55:58 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-10-30 20:55:43 +0200 |
commit | c5196e281f51b2894aa903469ba8c15a6723eb4c (patch) | |
tree | 8a54d1c35de97ede316fc94036e25fc591382290 /reportdesign/source/ui/report/ReportController.cxx | |
parent | 7ddf23d19439b9aa569ae35bbac41079203b9f84 (diff) |
Prepare for removal of non-const operator[] from Sequence in reportdesign
Change-Id: I7631aeb90bf224ba7a00025df6e3fa444b216a42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124380
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'reportdesign/source/ui/report/ReportController.cxx')
-rw-r--r-- | reportdesign/source/ui/report/ReportController.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 886e3390adf6..d765dee29783 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -33,6 +33,7 @@ #include <comphelper/documentconstants.hxx> #include <unotools/mediadescriptor.hxx> #include <comphelper/propertysequence.hxx> +#include <comphelper/propertyvalue.hxx> #include <comphelper/sequenceashashmap.hxx> #include <comphelper/types.hxx> @@ -435,8 +436,9 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const SfxUndoManager& rUndoManager( getUndoManager() ); size_t nCount(( rUndoManager.*retrieveCount )( SfxUndoManager::TopLevel )); Sequence<OUString> aSeq(nCount); + auto aSeqRange = asNonConstRange(aSeq); for (size_t n = 0; n < nCount; ++n) - aSeq[n] = (rUndoManager.*retrieveComment)( n, SfxUndoManager::TopLevel ); + aSeqRange[n] = (rUndoManager.*retrieveComment)( n, SfxUndoManager::TopLevel ); aReturn.aValue <<= aSeq; aReturn.bEnabled = true; } @@ -1700,7 +1702,7 @@ void OReportController::impl_initialize( ) if ( pPage ) { uno::Sequence< beans::PropertyValue> aArgs(1); - aArgs[0].Value <<= pPage->getSection(); + aArgs.getArray()[0].Value <<= pPage->getSection(); executeUnChecked(SID_SELECT,aArgs); } } @@ -2788,10 +2790,7 @@ void SAL_CALL OReportController::restoreViewData(const uno::Any& i_data) util::URL aCommand; aCommand.Complete = ".uno:" + rCommandName; - Sequence< PropertyValue > aCommandArgs(1); - aCommandArgs[0].Name = "Value"; - aCommandArgs[0].Value = rCommandValue; - + Sequence aCommandArgs{ comphelper::makePropertyValue("Value", rCommandValue) }; executeUnChecked( aCommand, aCommandArgs ); } else @@ -3043,8 +3042,7 @@ sal_Bool SAL_CALL OReportController::select( const Any& aSelection ) if ( xProp.is() ) { getDesignView()->showProperties(xObject); - aElements.realloc(1); - aElements[0] = xProp; + aElements = { xProp }; getDesignView()->setMarked(aElements, true); } else |