framework/qa/cppunit/dispatchtest.cxx                             |    5 
 framework/source/accelerators/acceleratorconfiguration.cxx        |    6 
 framework/source/accelerators/presethandler.cxx                   |   12 
 framework/source/classes/taskcreator.cxx                          |   13 
 framework/source/dispatch/closedispatcher.cxx                     |   12 
 framework/source/dispatch/dispatchdisabler.cxx                    |    6 
 framework/source/dispatch/dispatchinformationprovider.cxx         |    7 
 framework/source/dispatch/dispatchprovider.cxx                    |    7 
 framework/source/dispatch/interceptionhelper.cxx                  |    5 
 framework/source/dispatch/mailtodispatcher.cxx                    |    3 
 framework/source/dispatch/oxt_handler.cxx                         |    3 
 framework/source/dispatch/popupmenudispatcher.cxx                 |    3 
 framework/source/dispatch/servicehandler.cxx                      |    3 
 framework/source/dispatch/systemexec.cxx                          |    3 
 framework/source/fwe/classes/actiontriggercontainer.cxx           |    8 
 framework/source/fwe/classes/addonsoptions.cxx                    |  394 
+++++-----
 framework/source/fwe/classes/rootactiontriggercontainer.cxx       |    9 
 framework/source/fwe/helper/undomanagerhelper.cxx                 |    3 
 framework/source/fwe/xml/menudocumenthandler.cxx                  |   38 
 framework/source/fwe/xml/statusbardocumenthandler.cxx             |   23 
 framework/source/fwe/xml/toolboxdocumenthandler.cxx               |   31 
 framework/source/fwi/classes/converter.cxx                        |    5 
 framework/source/fwi/classes/protocolhandlercache.cxx             |    4 
 framework/source/fwi/jobs/configaccess.cxx                        |    3 
 framework/source/fwi/uielement/constitemcontainer.cxx             |    4 
 framework/source/fwi/uielement/itemcontainer.cxx                  |    4 
 framework/source/fwi/uielement/rootitemcontainer.cxx              |    2 
 framework/source/helper/oframes.cxx                               |    8 
 framework/source/jobs/job.cxx                                     |   56 -
 framework/source/jobs/jobdata.cxx                                 |   23 
 framework/source/jobs/jobdispatch.cxx                             |    4 
 framework/source/layoutmanager/helpers.cxx                        |    6 
 framework/source/layoutmanager/layoutmanager.cxx                  |   50 -
 framework/source/layoutmanager/toolbarlayoutmanager.cxx           |   63 -
 framework/source/loadenv/loadenv.cxx                              |    6 
 framework/source/services/dispatchhelper.cxx                      |    5 
 framework/source/services/frame.cxx                               |    4 
 framework/source/services/mediatypedetectionhelper.cxx            |    3 
 framework/source/services/pathsettings.cxx                        |   53 -
 framework/source/services/sessionlistener.cxx                     |    8 
 framework/source/services/taskcreatorsrv.cxx                      |    9 
 framework/source/uiconfiguration/imagemanagerimpl.cxx             |    3 
 framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx |   11 
 framework/source/uiconfiguration/uiconfigurationmanager.cxx       |   11 
 framework/source/uielement/FixedTextToolbarController.cxx         |    8 
 framework/source/uielement/buttontoolbarcontroller.cxx            |    6 
 framework/source/uielement/comboboxtoolbarcontroller.cxx          |    8 
 framework/source/uielement/complextoolbarcontroller.cxx           |   11 
 framework/source/uielement/dropdownboxtoolbarcontroller.cxx       |    8 
 framework/source/uielement/edittoolbarcontroller.cxx              |    9 
 framework/source/uielement/generictoolbarcontroller.cxx           |    5 
 framework/source/uielement/menubarmanager.cxx                     |    8 
 framework/source/uielement/newmenucontroller.cxx                  |   11 
 framework/source/uielement/popuptoolbarcontroller.cxx             |    7 
 framework/source/uielement/recentfilesmenucontroller.cxx          |   18 
 framework/source/uielement/spinfieldtoolbarcontroller.cxx         |   14 
 framework/source/uielement/togglebuttontoolbarcontroller.cxx      |   11 
 framework/source/uielement/toolbarmanager.cxx                     |   12 
 framework/source/uielement/toolbarsmenucontroller.cxx             |   16 
 framework/source/uielement/uicommanddescription.cxx               |   31 
 framework/source/uifactory/addonstoolbarfactory.cxx               |   16 
 framework/source/uifactory/menubarfactory.cxx                     |    3 
 framework/source/uifactory/uicontrollerfactory.cxx                |    5 
 framework/source/uifactory/uielementfactorymanager.cxx            |   18 
 64 files changed, 568 insertions(+), 596 deletions(-)

New commits:
commit f662ba95361ba6b8eb49e0acd98bf28bc5f21100
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Fri Oct 29 09:44:28 2021 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Sat Oct 30 10:31:26 2021 +0200

    Prepare for removal of non-const operator[] from Sequence in framework
    
    Change-Id: Ied2683a0b8a1bab1a7594da1e9bdbd3cb753552c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124370
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/framework/qa/cppunit/dispatchtest.cxx 
b/framework/qa/cppunit/dispatchtest.cxx
index 9d2446b56ef3..4a22ab028ea5 100644
--- a/framework/qa/cppunit/dispatchtest.cxx
+++ b/framework/qa/cppunit/dispatchtest.cxx
@@ -110,11 +110,12 @@ uno::Sequence<uno::Reference<frame::XDispatch>>
 MyInterceptor::queryDispatches(const uno::Sequence<frame::DispatchDescriptor>& 
rRequests)
 {
     uno::Sequence<uno::Reference<frame::XDispatch>> 
aResult(rRequests.getLength());
+    auto aResultRange = asNonConstRange(aResult);
 
     for (sal_Int32 i = 0; i < rRequests.getLength(); ++i)
     {
-        aResult[i] = queryDispatch(rRequests[i].FeatureURL, 
rRequests[i].FrameName,
-                                   rRequests[i].SearchFlags);
+        aResultRange[i] = queryDispatch(rRequests[i].FeatureURL, 
rRequests[i].FrameName,
+                                        rRequests[i].SearchFlags);
     }
 
     return aResult;
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx 
b/framework/source/accelerators/acceleratorconfiguration.cxx
index 54b4f5a8f827..90b393ace7fd 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -171,6 +171,7 @@ css::uno::Sequence< css::uno::Any > SAL_CALL 
XMLBasedAcceleratorConfiguration::g
     css::uno::Sequence< css::uno::Any > lPreferredOnes (c); // don't pack list!
     AcceleratorCache&                   rCache         = impl_getCFG();
 
+    auto lPreferredOnesRange = asNonConstRange(lPreferredOnes);
     for (i=0; i<c; ++i)
     {
         const OUString& rCommand = lCommandList[i];
@@ -187,7 +188,7 @@ css::uno::Sequence< css::uno::Any > SAL_CALL 
XMLBasedAcceleratorConfiguration::g
         if ( lKeys.empty() )
             continue;
 
-        css::uno::Any& rAny = lPreferredOnes[i];
+        css::uno::Any& rAny = lPreferredOnesRange[i];
         rAny <<= *(lKeys.begin());
     }
 
@@ -677,6 +678,7 @@ css::uno::Sequence< css::uno::Any > SAL_CALL 
XCUBasedAcceleratorConfiguration::g
     css::uno::Sequence< css::uno::Any > lPreferredOnes (c); // don't pack list!
     AcceleratorCache&                   rCache         = impl_getCFG(true);
 
+    auto lPreferredOnesRange = asNonConstRange(lPreferredOnes);
     for (i=0; i<c; ++i)
     {
         const OUString& rCommand = lCommandList[i];
@@ -696,7 +698,7 @@ css::uno::Sequence< css::uno::Any > SAL_CALL 
XCUBasedAcceleratorConfiguration::g
         AcceleratorCache::TKeyList::const_iterator pPreferredKey = 
lcl_getPreferredKey(lKeys);
         if (pPreferredKey != lKeys.end ())
         {
-            css::uno::Any& rAny = lPreferredOnes[i];
+            css::uno::Any& rAny = lPreferredOnesRange[i];
             rAny <<= *pPreferredKey;
         }
     }
diff --git a/framework/source/accelerators/presethandler.cxx 
b/framework/source/accelerators/presethandler.cxx
index 44a6131a2951..40d8aeaebe3c 100644
--- a/framework/source/accelerators/presethandler.cxx
+++ b/framework/source/accelerators/presethandler.cxx
@@ -201,9 +201,10 @@ css::uno::Reference< css::embed::XStorage > 
PresetHandler::getOrCreateRootStorag
     // based of a system directory. This must be used so, till the storage 
implementation
     // can work on directories too.
     */
-    css::uno::Sequence< css::uno::Any > lArgs(2);
-    lArgs[0] <<= sShareLayer;
-    lArgs[1] <<= css::embed::ElementModes::READ | 
css::embed::ElementModes::NOCREATE;
+    css::uno::Sequence< css::uno::Any > lArgs{
+        css::uno::Any(sShareLayer),
+        css::uno::Any(css::embed::ElementModes::READ | 
css::embed::ElementModes::NOCREATE)
+    };
 
     css::uno::Reference< css::lang::XSingleServiceFactory > xStorageFactory = 
css::embed::FileSystemStorageFactory::create( xContext );
     css::uno::Reference< css::embed::XStorage >             xStorage;
@@ -249,9 +250,8 @@ css::uno::Reference< css::embed::XStorage > 
PresetHandler::getOrCreateRootStorag
 
     sUserLayer  += "soffice.cfg"; // storage file
 
-    css::uno::Sequence< css::uno::Any > lArgs(2);
-    lArgs[0] <<= sUserLayer;
-    lArgs[1] <<= css::embed::ElementModes::READWRITE;
+    css::uno::Sequence< css::uno::Any > lArgs{ css::uno::Any(sUserLayer),
+                                               
css::uno::Any(css::embed::ElementModes::READWRITE) };
 
     css::uno::Reference< css::lang::XSingleServiceFactory > xStorageFactory = 
css::embed::FileSystemStorageFactory::create( xContext );
     css::uno::Reference< css::embed::XStorage >             xStorage;
diff --git a/framework/source/classes/taskcreator.cxx 
b/framework/source/classes/taskcreator.cxx
index baaaa7aba708..9c8ea6415aeb 100644
--- a/framework/source/classes/taskcreator.cxx
+++ b/framework/source/classes/taskcreator.cxx
@@ -71,33 +71,34 @@ css::uno::Reference< css::frame::XFrame > 
TaskCreator::createTask( const OUStrin
         xCreator = css::frame::TaskCreator::create(m_xContext);
 
     css::uno::Sequence< css::uno::Any > lArgs(6);
+    auto plArgs = lArgs.getArray();
     css::beans::NamedValue              aArg;
 
     aArg.Name    = ARGUMENT_PARENTFRAME;
     aArg.Value <<= css::uno::Reference< css::frame::XFrame >( 
css::frame::Desktop::create( m_xContext ), css::uno::UNO_QUERY_THROW);
-    lArgs[0]   <<= aArg;
+    plArgs[0]   <<= aArg;
 
     aArg.Name    = ARGUMENT_CREATETOPWINDOW;
     aArg.Value <<= true;
-    lArgs[1]   <<= aArg;
+    plArgs[1]   <<= aArg;
 
     aArg.Name    = ARGUMENT_MAKEVISIBLE;
     aArg.Value <<= false;
-    lArgs[2]   <<= aArg;
+    plArgs[2]   <<= aArg;
 
     aArg.Name    = ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE;
     aArg.Value <<= true;
-    lArgs[3]   <<= aArg;
+    plArgs[3]   <<= aArg;
 
     aArg.Name    = ARGUMENT_FRAMENAME;
     aArg.Value <<= sName;
-    lArgs[4]   <<= aArg;
+    plArgs[4]   <<= aArg;
 
     bool bHidden
         = rDescriptor.getUnpackedValueOrDefault("HiddenForConversion", false);
     aArg.Name = "HiddenForConversion";
     aArg.Value <<= bHidden;
-    lArgs[5] <<= aArg;
+    plArgs[5] <<= aArg;
 
     css::uno::Reference< css::frame::XFrame > 
xTask(xCreator->createInstanceWithArguments(lArgs), css::uno::UNO_QUERY_THROW);
     return xTask;
diff --git a/framework/source/dispatch/closedispatcher.cxx 
b/framework/source/dispatch/closedispatcher.cxx
index d4fa824c11e0..6b2a13cb4eb7 100644
--- a/framework/source/dispatch/closedispatcher.cxx
+++ b/framework/source/dispatch/closedispatcher.cxx
@@ -101,16 +101,16 @@ css::uno::Sequence< css::frame::DispatchInformation > 
SAL_CALL CloseDispatcher::
         /* Attention: Don't add .uno:CloseFrame here. Because it's not really
                       a configurable feature ... and further it does not have
                       a valid UIName entry inside the GenericCommands.xcu ... 
*/
-        css::uno::Sequence< css::frame::DispatchInformation > lViewInfos(1);
-        lViewInfos[0].Command = URL_CLOSEWIN;
-        lViewInfos[0].GroupId = css::frame::CommandGroup::VIEW;
+        css::uno::Sequence< css::frame::DispatchInformation > lViewInfos{
+            { URL_CLOSEWIN, css::frame::CommandGroup::VIEW }
+        };
         return lViewInfos;
     }
     else if (nCommandGroup == css::frame::CommandGroup::DOCUMENT)
     {
-        css::uno::Sequence< css::frame::DispatchInformation > lDocInfos(1);
-        lDocInfos[0].Command = URL_CLOSEDOC;
-        lDocInfos[0].GroupId = css::frame::CommandGroup::DOCUMENT;
+        css::uno::Sequence< css::frame::DispatchInformation > lDocInfos{
+            { URL_CLOSEDOC, css::frame::CommandGroup::DOCUMENT }
+        };
         return lDocInfos;
     }
 
diff --git a/framework/source/dispatch/dispatchdisabler.cxx 
b/framework/source/dispatch/dispatchdisabler.cxx
index b38fe3d521d5..2341d0dd6439 100644
--- a/framework/source/dispatch/dispatchdisabler.cxx
+++ b/framework/source/dispatch/dispatchdisabler.cxx
@@ -52,8 +52,9 @@ uno::Sequence< uno::Reference< frame::XDispatch > > SAL_CALL
 DispatchDisabler::queryDispatches( const uno::Sequence< 
frame::DispatchDescriptor >& rRequests )
 {
     uno::Sequence< uno::Reference< frame::XDispatch > > 
aResult(rRequests.getLength());
+    auto aResultRange = asNonConstRange(aResult);
     for( sal_Int32 i = 0; i < rRequests.getLength(); ++i )
-        aResult[i] = queryDispatch(rRequests[i].FeatureURL,
+        aResultRange[i] = queryDispatch(rRequests[i].FeatureURL,
                                    rRequests[i].FrameName,
                                    rRequests[i].SearchFlags);
     return aResult;
@@ -87,9 +88,10 @@ uno::Sequence< OUString > SAL_CALL
     DispatchDisabler::getInterceptedURLs()
 {
     uno::Sequence< OUString > aDisabledURLs(maDisabledURLs.size());
+    auto aDisabledURLsRange = asNonConstRange(aDisabledURLs);
     sal_Int32 n = 0;
     for (auto const& disabledURL : maDisabledURLs)
-        aDisabledURLs[n++] = disabledURL;
+        aDisabledURLsRange[n++] = disabledURL;
     return aDisabledURLs;
 }
 
diff --git a/framework/source/dispatch/dispatchinformationprovider.cxx 
b/framework/source/dispatch/dispatchinformationprovider.cxx
index 3ad13062fd62..0f4b488a19a9 100644
--- a/framework/source/dispatch/dispatchinformationprovider.cxx
+++ b/framework/source/dispatch/dispatchinformationprovider.cxx
@@ -117,10 +117,9 @@ css::uno::Sequence< css::uno::Reference< 
css::frame::XDispatchInformationProvide
 
     css::uno::Reference< css::frame::XDispatchInformationProvider > 
xController   (xFrame->getController()                                      , 
css::uno::UNO_QUERY);
     css::uno::Reference< css::frame::XDispatchInformationProvider > 
xAppDispatcher = css::frame::AppDispatchProvider::create(m_xContext);
-    css::uno::Sequence< css::uno::Reference< 
css::frame::XDispatchInformationProvider > > lProvider(3);
-    lProvider[0] = xController;
-    lProvider[1] = css::uno::Reference< 
css::frame::XDispatchInformationProvider >(xCloser);
-    lProvider[2] = xAppDispatcher;
+    css::uno::Sequence< css::uno::Reference< 
css::frame::XDispatchInformationProvider > > lProvider{
+        xController, xCloser, xAppDispatcher
+    };
 
     return lProvider;
 }
diff --git a/framework/source/dispatch/dispatchprovider.cxx 
b/framework/source/dispatch/dispatchprovider.cxx
index e7c7fdfbe1a1..578170227578 100644
--- a/framework/source/dispatch/dispatchprovider.cxx
+++ b/framework/source/dispatch/dispatchprovider.cxx
@@ -126,11 +126,11 @@ css::uno::Sequence< css::uno::Reference< 
css::frame::XDispatch > > SAL_CALL Disp
     // It's not allowed to pack it!
     sal_Int32                                                          nCount  
   = lDescriptions.getLength();
     css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > 
lDispatcher( nCount );
-
+    auto lDispatcherRange = asNonConstRange(lDispatcher);
     // Step over all descriptors and try to get any dispatcher for it.
     for( sal_Int32 i=0; i<nCount; ++i )
     {
-        lDispatcher[i] = queryDispatch( lDescriptions[i].FeatureURL  ,
+        lDispatcherRange[i] = queryDispatch( lDescriptions[i].FeatureURL  ,
                                         lDescriptions[i].FrameName   ,
                                         lDescriptions[i].SearchFlags );
     }
@@ -460,8 +460,7 @@ css::uno::Reference< css::frame::XDispatch > 
DispatchProvider::implts_searchProt
                     try
                     {
                         // but do it only, if all context information is OK
-                        css::uno::Sequence< css::uno::Any > lContext(1);
-                        lContext[0] <<= xOwner;
+                        css::uno::Sequence< css::uno::Any > lContext{ 
css::uno::Any(xOwner) };
                         xInit->initialize(lContext);
                     }
                     catch(const css::uno::Exception&) {}
diff --git a/framework/source/dispatch/interceptionhelper.cxx 
b/framework/source/dispatch/interceptionhelper.cxx
index 3363805299f8..ecbace6337fd 100644
--- a/framework/source/dispatch/interceptionhelper.cxx
+++ b/framework/source/dispatch/interceptionhelper.cxx
@@ -116,10 +116,7 @@ void SAL_CALL 
InterceptionHelper::registerDispatchProviderInterceptor(const css:
     if (xInfo.is())
         aInfo.lURLPattern = xInfo->getInterceptedURLs();
     else
-    {
-        aInfo.lURLPattern.realloc(1);
-        aInfo.lURLPattern[0] = "*";
-    }
+        aInfo.lURLPattern = { "*" };
 
     // SAFE {
     SolarMutexClearableGuard aWriteLock;
diff --git a/framework/source/dispatch/mailtodispatcher.cxx 
b/framework/source/dispatch/mailtodispatcher.cxx
index 330e395c4cfa..4c74d1ca7c6a 100644
--- a/framework/source/dispatch/mailtodispatcher.cxx
+++ b/framework/source/dispatch/mailtodispatcher.cxx
@@ -92,9 +92,10 @@ css::uno::Sequence< css::uno::Reference< 
css::frame::XDispatch > > SAL_CALL Mail
 {
     sal_Int32 nCount = lDescriptor.getLength();
     css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > 
lDispatcher( nCount );
+    auto lDispatcherRange = asNonConstRange(lDispatcher);
     for( sal_Int32 i=0; i<nCount; ++i )
     {
-        lDispatcher[i] = queryDispatch(
+        lDispatcherRange[i] = queryDispatch(
                             lDescriptor[i].FeatureURL,
                             lDescriptor[i].FrameName,
                             lDescriptor[i].SearchFlags);
diff --git a/framework/source/dispatch/oxt_handler.cxx 
b/framework/source/dispatch/oxt_handler.cxx
index 254e07fed72e..92aa2711d827 100644
--- a/framework/source/dispatch/oxt_handler.cxx
+++ b/framework/source/dispatch/oxt_handler.cxx
@@ -93,8 +93,7 @@ void SAL_CALL Oxt_Handler::dispatchWithNotification( const 
css::util::URL& aURL,
 {
     osl::MutexGuard g(m_mutex);
 
-    css::uno::Sequence< css::uno::Any > lParams(1);
-    lParams[0] <<= aURL.Main;
+    css::uno::Sequence< css::uno::Any > lParams{ css::uno::Any(aURL.Main) };
 
     css::uno::Reference< css::uno::XInterface > xService = 
m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext( 
"com.sun.star.deployment.ui.PackageManagerDialog", lParams, m_xContext );
     css::uno::Reference< css::task::XJobExecutor > xExecutable( xService, 
css::uno::UNO_QUERY );
diff --git a/framework/source/dispatch/popupmenudispatcher.cxx 
b/framework/source/dispatch/popupmenudispatcher.cxx
index a35bd10599fd..154b9df688b4 100644
--- a/framework/source/dispatch/popupmenudispatcher.cxx
+++ b/framework/source/dispatch/popupmenudispatcher.cxx
@@ -160,9 +160,10 @@ PopupMenuDispatcher::queryDispatches(
 {
     sal_Int32 nCount = lDescriptor.getLength();
     css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > 
lDispatcher( nCount );
+    auto lDispatcherRange = asNonConstRange(lDispatcher);
     for( sal_Int32 i=0; i<nCount; ++i )
     {
-        lDispatcher[i] = queryDispatch(
+        lDispatcherRange[i] = queryDispatch(
                             lDescriptor[i].FeatureURL,
                             lDescriptor[i].FrameName,
                             lDescriptor[i].SearchFlags);
diff --git a/framework/source/dispatch/servicehandler.cxx 
b/framework/source/dispatch/servicehandler.cxx
index a7a100bd19c1..bff05e79f1eb 100644
--- a/framework/source/dispatch/servicehandler.cxx
+++ b/framework/source/dispatch/servicehandler.cxx
@@ -94,9 +94,10 @@ css::uno::Sequence< css::uno::Reference< 
css::frame::XDispatch > > SAL_CALL Serv
 {
     sal_Int32 nCount = lDescriptor.getLength();
     css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > 
lDispatcher( nCount );
+    auto lDispatcherRange = asNonConstRange(lDispatcher);
     for( sal_Int32 i=0; i<nCount; ++i )
     {
-        lDispatcher[i] = queryDispatch(
+        lDispatcherRange[i] = queryDispatch(
                             lDescriptor[i].FeatureURL,
                             lDescriptor[i].FrameName,
                             lDescriptor[i].SearchFlags);
diff --git a/framework/source/dispatch/systemexec.cxx 
b/framework/source/dispatch/systemexec.cxx
index 7ee48b7fc676..72f217e6ccfb 100644
--- a/framework/source/dispatch/systemexec.cxx
+++ b/framework/source/dispatch/systemexec.cxx
@@ -71,9 +71,10 @@ css::uno::Sequence< css::uno::Reference< 
css::frame::XDispatch > > SAL_CALL Syst
 {
     sal_Int32 nCount = lDescriptor.getLength();
     css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > 
lDispatcher( nCount );
+    auto lDispatcherRange = asNonConstRange(lDispatcher);
     for( sal_Int32 i=0; i<nCount; ++i )
     {
-        lDispatcher[i] = queryDispatch(
+        lDispatcherRange[i] = queryDispatch(
                             lDescriptor[i].FeatureURL,
                             lDescriptor[i].FrameName,
                             lDescriptor[i].SearchFlags);
diff --git a/framework/source/fwe/classes/actiontriggercontainer.cxx 
b/framework/source/fwe/classes/actiontriggercontainer.cxx
index e6675cf17c96..360223e6eb67 100644
--- a/framework/source/fwe/classes/actiontriggercontainer.cxx
+++ b/framework/source/fwe/classes/actiontriggercontainer.cxx
@@ -87,11 +87,9 @@ Reference< XInterface > SAL_CALL 
ActionTriggerContainer::createInstanceWithArgum
 
 Sequence< OUString > SAL_CALL 
ActionTriggerContainer::getAvailableServiceNames()
 {
-    Sequence< OUString > aSeq( 3 );
-
-    aSeq[0] = SERVICENAME_ACTIONTRIGGER;
-    aSeq[1] = SERVICENAME_ACTIONTRIGGERCONTAINER;
-    aSeq[2] = SERVICENAME_ACTIONTRIGGERSEPARATOR;
+    Sequence< OUString > aSeq{ SERVICENAME_ACTIONTRIGGER,
+                               SERVICENAME_ACTIONTRIGGERCONTAINER,
+                               SERVICENAME_ACTIONTRIGGERSEPARATOR };
 
     return aSeq;
 }
diff --git a/framework/source/fwe/classes/addonsoptions.cxx 
b/framework/source/fwe/classes/addonsoptions.cxx
index cd638a979522..ad9408291e34 100644
--- a/framework/source/fwe/classes/addonsoptions.cxx
+++ b/framework/source/fwe/classes/addonsoptions.cxx
@@ -655,14 +655,14 @@ void AddonsOptions_Impl::ReadAddonMenuSet( Sequence< 
Sequence< PropertyValue > >
     sal_uInt32              nCount = aAddonMenuNodeSeq.getLength();
     sal_uInt32              nIndex = 0;
     Sequence< PropertyValue > aMenuItem( PROPERTYCOUNT_MENUITEM );
-
+    auto pMenuItem = aMenuItem.getArray();
     // Init the property value sequence
-    aMenuItem[ OFFSET_MENUITEM_URL              ].Name = m_aPropNames[ 
INDEX_URL            ];
-    aMenuItem[ OFFSET_MENUITEM_TITLE            ].Name = m_aPropNames[ 
INDEX_TITLE          ];
-    aMenuItem[ OFFSET_MENUITEM_TARGET           ].Name = m_aPropNames[ 
INDEX_TARGET         ];
-    aMenuItem[ OFFSET_MENUITEM_IMAGEIDENTIFIER  ].Name = m_aPropNames[ 
INDEX_IMAGEIDENTIFIER];
-    aMenuItem[ OFFSET_MENUITEM_CONTEXT          ].Name = m_aPropNames[ 
INDEX_CONTEXT        ];
-    aMenuItem[ OFFSET_MENUITEM_SUBMENU          ].Name = m_aPropNames[ 
INDEX_SUBMENU        ];  // Submenu set!
+    pMenuItem[ OFFSET_MENUITEM_URL              ].Name = m_aPropNames[ 
INDEX_URL            ];
+    pMenuItem[ OFFSET_MENUITEM_TITLE            ].Name = m_aPropNames[ 
INDEX_TITLE          ];
+    pMenuItem[ OFFSET_MENUITEM_TARGET           ].Name = m_aPropNames[ 
INDEX_TARGET         ];
+    pMenuItem[ OFFSET_MENUITEM_IMAGEIDENTIFIER  ].Name = m_aPropNames[ 
INDEX_IMAGEIDENTIFIER];
+    pMenuItem[ OFFSET_MENUITEM_CONTEXT          ].Name = m_aPropNames[ 
INDEX_CONTEXT        ];
+    pMenuItem[ OFFSET_MENUITEM_SUBMENU          ].Name = m_aPropNames[ 
INDEX_SUBMENU        ];  // Submenu set!
 
     for ( sal_uInt32 n = 0; n < nCount; n++ )
     {
@@ -674,7 +674,7 @@ void AddonsOptions_Impl::ReadAddonMenuSet( Sequence< 
Sequence< PropertyValue > >
             // Successfully read a menu item, append to our list
             sal_uInt32 nMenuItemCount = rAddonMenuSeq.getLength() + 1;
             rAddonMenuSeq.realloc( nMenuItemCount );
-            rAddonMenuSeq[nIndex++] = aMenuItem;
+            rAddonMenuSeq.getArray()[nIndex++] = aMenuItem;
         }
     }
 }
@@ -689,14 +689,14 @@ void AddonsOptions_Impl::ReadOfficeHelpSet( Sequence< 
Sequence< PropertyValue >
     sal_uInt32              nCount = aAddonHelpMenuNodeSeq.getLength();
     sal_uInt32              nIndex = 0;
     Sequence< PropertyValue > aMenuItem( PROPERTYCOUNT_MENUITEM );
-
+    auto pMenuItem = aMenuItem.getArray();
     // Init the property value sequence
-    aMenuItem[ OFFSET_MENUITEM_URL              ].Name = m_aPropNames[ 
INDEX_URL            ];
-    aMenuItem[ OFFSET_MENUITEM_TITLE            ].Name = m_aPropNames[ 
INDEX_TITLE          ];
-    aMenuItem[ OFFSET_MENUITEM_TARGET           ].Name = m_aPropNames[ 
INDEX_TARGET         ];
-    aMenuItem[ OFFSET_MENUITEM_IMAGEIDENTIFIER  ].Name = m_aPropNames[ 
INDEX_IMAGEIDENTIFIER];
-    aMenuItem[ OFFSET_MENUITEM_CONTEXT          ].Name = m_aPropNames[ 
INDEX_CONTEXT        ];
-    aMenuItem[ OFFSET_MENUITEM_SUBMENU          ].Name = m_aPropNames[ 
INDEX_SUBMENU        ];  // Submenu set!
+    pMenuItem[ OFFSET_MENUITEM_URL              ].Name = m_aPropNames[ 
INDEX_URL            ];
+    pMenuItem[ OFFSET_MENUITEM_TITLE            ].Name = m_aPropNames[ 
INDEX_TITLE          ];
+    pMenuItem[ OFFSET_MENUITEM_TARGET           ].Name = m_aPropNames[ 
INDEX_TARGET         ];
+    pMenuItem[ OFFSET_MENUITEM_IMAGEIDENTIFIER  ].Name = m_aPropNames[ 
INDEX_IMAGEIDENTIFIER];
+    pMenuItem[ OFFSET_MENUITEM_CONTEXT          ].Name = m_aPropNames[ 
INDEX_CONTEXT        ];
+    pMenuItem[ OFFSET_MENUITEM_SUBMENU          ].Name = m_aPropNames[ 
INDEX_SUBMENU        ];  // Submenu set!
 
     for ( sal_uInt32 n = 0; n < nCount; n++ )
     {
@@ -708,7 +708,7 @@ void AddonsOptions_Impl::ReadOfficeHelpSet( Sequence< 
Sequence< PropertyValue >
             // Successfully read a menu item, append to our list
             sal_uInt32 nMenuItemCount = rAddonOfficeHelpMenuSeq.getLength() + 
1;
             rAddonOfficeHelpMenuSeq.realloc( nMenuItemCount );
-            rAddonOfficeHelpMenuSeq[nIndex++] = aMenuItem;
+            rAddonOfficeHelpMenuSeq.getArray()[nIndex++] = aMenuItem;
         }
     }
 }
@@ -723,15 +723,15 @@ void AddonsOptions_Impl::ReadOfficeMenuBarSet( Sequence< 
Sequence< PropertyValue
     sal_uInt32              nCount = aAddonMenuBarNodeSeq.getLength();
     sal_uInt32              nIndex = 0;
     Sequence< PropertyValue > aPopupMenu( PROPERTYCOUNT_POPUPMENU );
-
+    auto pPopupMenu = aPopupMenu.getArray();
     // Init the property value sequence
-    aPopupMenu[ OFFSET_POPUPMENU_TITLE      ].Name = m_aPropNames[ INDEX_TITLE 
 ];
-    aPopupMenu[ OFFSET_POPUPMENU_CONTEXT    ].Name = m_aPropNames[ 
INDEX_CONTEXT];
-    aPopupMenu[ OFFSET_POPUPMENU_SUBMENU    ].Name = m_aPropNames[ 
INDEX_SUBMENU];
-    aPopupMenu[ OFFSET_POPUPMENU_URL        ].Name = m_aPropNames[ INDEX_URL   
 ];
+    pPopupMenu[ OFFSET_POPUPMENU_TITLE      ].Name = m_aPropNames[ INDEX_TITLE 
 ];
+    pPopupMenu[ OFFSET_POPUPMENU_CONTEXT    ].Name = m_aPropNames[ 
INDEX_CONTEXT];
+    pPopupMenu[ OFFSET_POPUPMENU_SUBMENU    ].Name = m_aPropNames[ 
INDEX_SUBMENU];
+    pPopupMenu[ OFFSET_POPUPMENU_URL        ].Name = m_aPropNames[ INDEX_URL   
 ];
 
     StringToIndexMap aTitleToIndexMap;
-
+    auto pAddonOfficeMenuBarSeq = rAddonOfficeMenuBarSeq.getArray();
     for ( sal_uInt32 n = 0; n < nCount; n++ )
     {
         OUString aPopupMenuNode( aAddonMenuBarNode + aAddonMenuBarNodeSeq[n] );
@@ -747,7 +747,7 @@ void AddonsOptions_Impl::ReadOfficeMenuBarSet( Sequence< 
Sequence< PropertyValue
                 if ( pIter != aTitleToIndexMap.end() )
                 {
                     // title already there => concat both popup menus
-                    Sequence< PropertyValue >& rOldPopupMenu = 
rAddonOfficeMenuBarSeq[pIter->second];
+                    Sequence< PropertyValue >& rOldPopupMenu = 
pAddonOfficeMenuBarSeq[pIter->second];
                     AppendPopupMenu( rOldPopupMenu, aPopupMenu );
                 }
                 else
@@ -755,7 +755,8 @@ void AddonsOptions_Impl::ReadOfficeMenuBarSet( Sequence< 
Sequence< PropertyValue
                     // not found
                     sal_uInt32 nMenuItemCount = 
rAddonOfficeMenuBarSeq.getLength() + 1;
                     rAddonOfficeMenuBarSeq.realloc( nMenuItemCount );
-                    rAddonOfficeMenuBarSeq[nIndex] = aPopupMenu;
+                    pAddonOfficeMenuBarSeq = rAddonOfficeMenuBarSeq.getArray();
+                    pAddonOfficeMenuBarSeq[nIndex] = aPopupMenu;
                     aTitleToIndexMap.emplace( aPopupTitle, nIndex );
                     ++nIndex;
                 }
@@ -788,15 +789,15 @@ bool AddonsOptions_Impl::ReadToolBarItemSet( const 
OUString& rToolBarItemSetNode
     OUString                 aAddonToolBarItemSetNode( rToolBarItemSetNodeName 
+ m_aPathDelimiter );
     Sequence< OUString >     aAddonToolBarItemSetNodeSeq = GetNodeNames( 
rToolBarItemSetNodeName );
     Sequence< PropertyValue >   aToolBarItem( PROPERTYCOUNT_TOOLBARITEM );
-
+    auto pToolBarItem = aToolBarItem.getArray();
     // Init the property value sequence
-    aToolBarItem[ OFFSET_TOOLBARITEM_URL                ].Name = m_aPropNames[ 
INDEX_URL            ];
-    aToolBarItem[ OFFSET_TOOLBARITEM_TITLE              ].Name = m_aPropNames[ 
INDEX_TITLE          ];
-    aToolBarItem[ OFFSET_TOOLBARITEM_IMAGEIDENTIFIER    ].Name = m_aPropNames[ 
INDEX_IMAGEIDENTIFIER];
-    aToolBarItem[ OFFSET_TOOLBARITEM_TARGET             ].Name = m_aPropNames[ 
INDEX_TARGET         ];
-    aToolBarItem[ OFFSET_TOOLBARITEM_CONTEXT            ].Name = m_aPropNames[ 
INDEX_CONTEXT        ];
-    aToolBarItem[ OFFSET_TOOLBARITEM_CONTROLTYPE        ].Name = m_aPropNames[ 
INDEX_CONTROLTYPE    ];
-    aToolBarItem[ OFFSET_TOOLBARITEM_WIDTH              ].Name = m_aPropNames[ 
INDEX_WIDTH          ];
+    pToolBarItem[ OFFSET_TOOLBARITEM_URL                ].Name = m_aPropNames[ 
INDEX_URL            ];
+    pToolBarItem[ OFFSET_TOOLBARITEM_TITLE              ].Name = m_aPropNames[ 
INDEX_TITLE          ];
+    pToolBarItem[ OFFSET_TOOLBARITEM_IMAGEIDENTIFIER    ].Name = m_aPropNames[ 
INDEX_IMAGEIDENTIFIER];
+    pToolBarItem[ OFFSET_TOOLBARITEM_TARGET             ].Name = m_aPropNames[ 
INDEX_TARGET         ];
+    pToolBarItem[ OFFSET_TOOLBARITEM_CONTEXT            ].Name = m_aPropNames[ 
INDEX_CONTEXT        ];
+    pToolBarItem[ OFFSET_TOOLBARITEM_CONTROLTYPE        ].Name = m_aPropNames[ 
INDEX_CONTROLTYPE    ];
+    pToolBarItem[ OFFSET_TOOLBARITEM_WIDTH              ].Name = m_aPropNames[ 
INDEX_WIDTH          ];
 
     sal_uInt32 nCount = aAddonToolBarItemSetNodeSeq.getLength();
     for ( sal_uInt32 n = 0; n < nCount; n++ )
@@ -809,7 +810,7 @@ bool AddonsOptions_Impl::ReadToolBarItemSet( const 
OUString& rToolBarItemSetNode
             // Successfully read a toolbar item, append to our list
             sal_uInt32 nAddonCount = rAddonOfficeToolBarSeq.getLength();
             rAddonOfficeToolBarSeq.realloc( nAddonCount+1 );
-            rAddonOfficeToolBarSeq[nAddonCount] = aToolBarItem;
+            rAddonOfficeToolBarSeq.getArray()[nAddonCount] = aToolBarItem;
         }
     }
 
@@ -844,17 +845,17 @@ bool AddonsOptions_Impl::ReadNotebookBarItemSet(
     OUString aAddonNotebookBarItemSetNode(rNotebookBarItemSetNodeName + 
m_aPathDelimiter);
     Sequence<OUString> aAddonNotebookBarItemSetNodeSeq = 
GetNodeNames(rNotebookBarItemSetNodeName);
     Sequence<PropertyValue> aNotebookBarItem(PROPERTYCOUNT_NOTEBOOKBARITEM);
-
+    auto pNotebookBarItem = aNotebookBarItem.getArray();
     // Init the property value sequence
-    aNotebookBarItem[OFFSET_NOTEBOOKBARITEM_URL].Name = 
m_aPropNames[INDEX_URL];
-    aNotebookBarItem[OFFSET_NOTEBOOKBARITEM_TITLE].Name = 
m_aPropNames[INDEX_TITLE];
-    aNotebookBarItem[OFFSET_NOTEBOOKBARITEM_IMAGEIDENTIFIER].Name
+    pNotebookBarItem[OFFSET_NOTEBOOKBARITEM_URL].Name = 
m_aPropNames[INDEX_URL];
+    pNotebookBarItem[OFFSET_NOTEBOOKBARITEM_TITLE].Name = 
m_aPropNames[INDEX_TITLE];
+    pNotebookBarItem[OFFSET_NOTEBOOKBARITEM_IMAGEIDENTIFIER].Name
         = m_aPropNames[INDEX_IMAGEIDENTIFIER];
-    aNotebookBarItem[OFFSET_NOTEBOOKBARITEM_TARGET].Name = 
m_aPropNames[INDEX_TARGET];
-    aNotebookBarItem[OFFSET_NOTEBOOKBARITEM_CONTEXT].Name = 
m_aPropNames[INDEX_CONTEXT];
-    aNotebookBarItem[OFFSET_NOTEBOOKBARITEM_CONTROLTYPE].Name = 
m_aPropNames[INDEX_CONTROLTYPE];
-    aNotebookBarItem[OFFSET_NOTEBOOKBARITEM_WIDTH].Name = 
m_aPropNames[INDEX_WIDTH];
-    aNotebookBarItem[OFFSET_NOTEBOOKBARITEM_STYLE].Name = 
m_aPropNames[INDEX_STYLE];
+    pNotebookBarItem[OFFSET_NOTEBOOKBARITEM_TARGET].Name = 
m_aPropNames[INDEX_TARGET];
+    pNotebookBarItem[OFFSET_NOTEBOOKBARITEM_CONTEXT].Name = 
m_aPropNames[INDEX_CONTEXT];
+    pNotebookBarItem[OFFSET_NOTEBOOKBARITEM_CONTROLTYPE].Name = 
m_aPropNames[INDEX_CONTROLTYPE];
+    pNotebookBarItem[OFFSET_NOTEBOOKBARITEM_WIDTH].Name = 
m_aPropNames[INDEX_WIDTH];
+    pNotebookBarItem[OFFSET_NOTEBOOKBARITEM_STYLE].Name = 
m_aPropNames[INDEX_STYLE];
 
     sal_uInt32 nCount = aAddonNotebookBarItemSetNodeSeq.getLength();
     for (sal_uInt32 n = 0; n < nCount; n++)
@@ -867,7 +868,7 @@ bool AddonsOptions_Impl::ReadNotebookBarItemSet(
             // Successfully read a toolbar item, append to our list
             sal_uInt32 nAddonCount = rAddonOfficeNotebookBarSeq.getLength();
             rAddonOfficeNotebookBarSeq.realloc(nAddonCount + 1);
-            rAddonOfficeNotebookBarSeq[nAddonCount] = aNotebookBarItem;
+            rAddonOfficeNotebookBarSeq.getArray()[nAddonCount] = 
aNotebookBarItem;
         }
     }
 
@@ -885,7 +886,6 @@ void AddonsOptions_Impl::ReadImages( ImageManager& 
aImageManager )
     sal_uInt32              nCount = aAddonImagesNodeSeq.getLength();
 
     // Init the property value sequence
-    Sequence< OUString > aAddonImageItemNodePropNames( 1 );
     OUString                aURL;
 
     for ( sal_uInt32 n = 0; n < nCount; n++ )
@@ -893,9 +893,9 @@ void AddonsOptions_Impl::ReadImages( ImageManager& 
aImageManager )
         OUString aImagesItemNode( aAddonImagesNode + aAddonImagesNodeSeq[n] );
 
         // Create sequence for data access
-        aAddonImageItemNodePropNames[0] = aImagesItemNode +
+        Sequence< OUString > aAddonImageItemNodePropNames = { aImagesItemNode +
             m_aPathDelimiter +
-            m_aPropNames[ OFFSET_MENUITEM_URL ];
+            m_aPropNames[ OFFSET_MENUITEM_URL ] };
 
         Sequence< Any > aAddonImageItemNodeValues = GetProperties( 
aAddonImageItemNodePropNames );
 
@@ -942,6 +942,7 @@ void AddonsOptions_Impl::ReadMenuMergeInstructions( 
MergeMenuInstructionContaine
 
     // Init the property value sequence
     Sequence< OUString > aNodePropNames( 5 );
+    auto pNodePropNames = aNodePropNames.getArray();
 
     for ( sal_uInt32 i = 0; i < nCount; i++ )
     {
@@ -958,19 +959,19 @@ void AddonsOptions_Impl::ReadMenuMergeInstructions( 
MergeMenuInstructionContaine
                 m_aPathDelimiter;
 
             // Create sequence for data access
-            aNodePropNames[0] = aMergeAddonInstructionBase +
+            pNodePropNames[0] = aMergeAddonInstructionBase +
                 m_aPropMergeMenuNames[ OFFSET_MERGEMENU_MERGEPOINT ];
 
-            aNodePropNames[1] = aMergeAddonInstructionBase +
+            pNodePropNames[1] = aMergeAddonInstructionBase +
                 m_aPropMergeMenuNames[ OFFSET_MERGEMENU_MERGECOMMAND ];
 
-            aNodePropNames[2] = aMergeAddonInstructionBase +
+            pNodePropNames[2] = aMergeAddonInstructionBase +
                 m_aPropMergeMenuNames[ OFFSET_MERGEMENU_MERGECOMMANDPARAMETER 
];
 
-            aNodePropNames[3] = aMergeAddonInstructionBase +
+            pNodePropNames[3] = aMergeAddonInstructionBase +
                 m_aPropMergeMenuNames[ OFFSET_MERGEMENU_MERGEFALLBACK ];
 
-            aNodePropNames[4] = aMergeAddonInstructionBase +
+            pNodePropNames[4] = aMergeAddonInstructionBase +
                 m_aPropMergeMenuNames[ OFFSET_MERGEMENU_MERGECONTEXT ];
 
             Sequence< Any > aNodePropValues = GetProperties( aNodePropNames );
@@ -1012,6 +1013,7 @@ void AddonsOptions_Impl::ReadToolbarMergeInstructions( 
ToolbarMergingInstruction
 
     // Init the property value sequence
     Sequence< OUString > aNodePropNames( 6 );
+    auto pNodePropNames = aNodePropNames.getArray();
 
     for ( sal_uInt32 i = 0; i < nCount; i++ )
     {
@@ -1028,22 +1030,22 @@ void AddonsOptions_Impl::ReadToolbarMergeInstructions( 
ToolbarMergingInstruction
                 m_aPathDelimiter;
 
             // Create sequence for data access
-            aNodePropNames[0] = aMergeAddonInstructionBase +
+            pNodePropNames[0] = aMergeAddonInstructionBase +
                 m_aPropMergeToolbarNames[ OFFSET_MERGETOOLBAR_TOOLBAR ];
 
-            aNodePropNames[1] = aMergeAddonInstructionBase +
+            pNodePropNames[1] = aMergeAddonInstructionBase +
                 m_aPropMergeToolbarNames[ OFFSET_MERGETOOLBAR_MERGEPOINT ];
 
-            aNodePropNames[2] = aMergeAddonInstructionBase +
+            pNodePropNames[2] = aMergeAddonInstructionBase +
                 m_aPropMergeToolbarNames[ OFFSET_MERGETOOLBAR_MERGECOMMAND ];
 
-            aNodePropNames[3] = aMergeAddonInstructionBase +
+            pNodePropNames[3] = aMergeAddonInstructionBase +
                 m_aPropMergeToolbarNames[ 
OFFSET_MERGETOOLBAR_MERGECOMMANDPARAMETER ];
 
-            aNodePropNames[4] = aMergeAddonInstructionBase +
+            pNodePropNames[4] = aMergeAddonInstructionBase +
                 m_aPropMergeToolbarNames[ OFFSET_MERGETOOLBAR_MERGEFALLBACK ];
 
-            aNodePropNames[5] = aMergeAddonInstructionBase +
+            pNodePropNames[5] = aMergeAddonInstructionBase +
                 m_aPropMergeToolbarNames[ OFFSET_MERGETOOLBAR_MERGECONTEXT ];
 
             Sequence< Any > aNodePropValues = GetProperties( aNodePropNames );
@@ -1083,6 +1085,7 @@ void AddonsOptions_Impl::ReadNotebookBarMergeInstructions(
 
     // Init the property value sequence
     Sequence<OUString> aNodePropNames(6);
+    auto pNodePropNames = aNodePropNames.getArray();
 
     for (sal_uInt32 i = 0; i < nCount; i++)
     {
@@ -1099,22 +1102,22 @@ void 
AddonsOptions_Impl::ReadNotebookBarMergeInstructions(
                 m_aPathDelimiter;
 
             // Create sequence for data access
-            aNodePropNames[0] = aMergeAddonInstructionBase +
+            pNodePropNames[0] = aMergeAddonInstructionBase +
                 
m_aPropMergeNotebookBarNames[OFFSET_MERGENOTEBOOKBAR_NOTEBOOKBAR];
 
-            aNodePropNames[1] = aMergeAddonInstructionBase +
+            pNodePropNames[1] = aMergeAddonInstructionBase +
                 
m_aPropMergeNotebookBarNames[OFFSET_MERGENOTEBOOKBAR_MERGEPOINT];
 
-            aNodePropNames[2] = aMergeAddonInstructionBase +
+            pNodePropNames[2] = aMergeAddonInstructionBase +
                 
m_aPropMergeNotebookBarNames[OFFSET_MERGENOTEBOOKBAR_MERGECOMMAND];
 
-            aNodePropNames[3] = aMergeAddonInstructionBase +
+            pNodePropNames[3] = aMergeAddonInstructionBase +
                 
m_aPropMergeNotebookBarNames[OFFSET_MERGENOTEBOOKBAR_MERGECOMMANDPARAMETER];
 
-            aNodePropNames[4] = aMergeAddonInstructionBase +
+            pNodePropNames[4] = aMergeAddonInstructionBase +
                 
m_aPropMergeNotebookBarNames[OFFSET_MERGENOTEBOOKBAR_MERGEFALLBACK];
 
-            aNodePropNames[5] = aMergeAddonInstructionBase +
+            pNodePropNames[5] = aMergeAddonInstructionBase +
                 
m_aPropMergeNotebookBarNames[OFFSET_MERGENOTEBOOKBAR_MERGECONTEXT];
 
             Sequence<Any> aNodePropValues = GetProperties(aNodePropNames);
@@ -1156,6 +1159,7 @@ void AddonsOptions_Impl::ReadStatusbarMergeInstructions( 
MergeStatusbarInstructi
     sal_uInt32  nCount = aAddonMergeNodesSeq.getLength();
 
     Sequence< OUString > aNodePropNames( 5 );
+    auto pNodePropNames = aNodePropNames.getArray();
 
     for ( sal_uInt32 i = 0; i < nCount; i++ )
     {
@@ -1172,19 +1176,19 @@ void 
AddonsOptions_Impl::ReadStatusbarMergeInstructions( MergeStatusbarInstructi
                 m_aPathDelimiter;
 
             // Create sequence for data access
-            aNodePropNames[0] = aMergeAddonInstructionBase +
+            pNodePropNames[0] = aMergeAddonInstructionBase +
                 m_aPropMergeMenuNames[ OFFSET_MERGESTATUSBAR_MERGEPOINT ];
 
-            aNodePropNames[1] = aMergeAddonInstructionBase +
+            pNodePropNames[1] = aMergeAddonInstructionBase +
                 m_aPropMergeMenuNames[ OFFSET_MERGESTATUSBAR_MERGECOMMAND ];
 
-            aNodePropNames[2] = aMergeAddonInstructionBase +
+            pNodePropNames[2] = aMergeAddonInstructionBase +
                 m_aPropMergeMenuNames[ 
OFFSET_MERGESTATUSBAR_MERGECOMMANDPARAMETER ];
 
-            aNodePropNames[3] = aMergeAddonInstructionBase +
+            pNodePropNames[3] = aMergeAddonInstructionBase +
                 m_aPropMergeMenuNames[ OFFSET_MERGESTATUSBAR_MERGEFALLBACK ];
 
-            aNodePropNames[4] = aMergeAddonInstructionBase +
+            pNodePropNames[4] = aMergeAddonInstructionBase +
                 m_aPropMergeMenuNames[ OFFSET_MERGESTATUSBAR_MERGECONTEXT ];
 
             Sequence< Any > aNodePropValues = GetProperties( aNodePropNames );
@@ -1215,14 +1219,15 @@ void AddonsOptions_Impl::ReadMergeStatusbarData(
     Sequence< OUString > aAddonStatusbarItemSetNodeSeq = GetNodeNames( 
aMergeStatusbarBaseNode );
 
     Sequence< PropertyValue > aStatusbarItem( PROPERTYCOUNT_STATUSBARITEM );
-    aStatusbarItem[ OFFSET_STATUSBARITEM_URL       ].Name = m_aPropNames[ 
INDEX_URL       ];
-    aStatusbarItem[ OFFSET_STATUSBARITEM_TITLE     ].Name = m_aPropNames[ 
INDEX_TITLE     ];
-    aStatusbarItem[ OFFSET_STATUSBARITEM_CONTEXT   ].Name = m_aPropNames[ 
INDEX_CONTEXT   ];
-    aStatusbarItem[ OFFSET_STATUSBARITEM_ALIGN     ].Name = m_aPropNames[ 
INDEX_ALIGN     ];
-    aStatusbarItem[ OFFSET_STATUSBARITEM_AUTOSIZE  ].Name = m_aPropNames[ 
INDEX_AUTOSIZE  ];
-    aStatusbarItem[ OFFSET_STATUSBARITEM_OWNERDRAW ].Name = m_aPropNames[ 
INDEX_OWNERDRAW ];
-    aStatusbarItem[ OFFSET_STATUSBARITEM_MANDATORY ].Name = m_aPropNames[ 
INDEX_MANDATORY ];
-    aStatusbarItem[ OFFSET_STATUSBARITEM_WIDTH     ].Name = m_aPropNames[ 
INDEX_WIDTH     ];
+    auto pStatusbarItem = aStatusbarItem.getArray();
+    pStatusbarItem[ OFFSET_STATUSBARITEM_URL       ].Name = m_aPropNames[ 
INDEX_URL       ];
+    pStatusbarItem[ OFFSET_STATUSBARITEM_TITLE     ].Name = m_aPropNames[ 
INDEX_TITLE     ];
+    pStatusbarItem[ OFFSET_STATUSBARITEM_CONTEXT   ].Name = m_aPropNames[ 
INDEX_CONTEXT   ];
+    pStatusbarItem[ OFFSET_STATUSBARITEM_ALIGN     ].Name = m_aPropNames[ 
INDEX_ALIGN     ];
+    pStatusbarItem[ OFFSET_STATUSBARITEM_AUTOSIZE  ].Name = m_aPropNames[ 
INDEX_AUTOSIZE  ];
+    pStatusbarItem[ OFFSET_STATUSBARITEM_OWNERDRAW ].Name = m_aPropNames[ 
INDEX_OWNERDRAW ];
+    pStatusbarItem[ OFFSET_STATUSBARITEM_MANDATORY ].Name = m_aPropNames[ 
INDEX_MANDATORY ];
+    pStatusbarItem[ OFFSET_STATUSBARITEM_WIDTH     ].Name = m_aPropNames[ 
INDEX_WIDTH     ];
 
     sal_uInt32 nCount = aAddonStatusbarItemSetNodeSeq.getLength();
     for ( sal_uInt32 n = 0; n < nCount; n++ )
@@ -1233,7 +1238,7 @@ void AddonsOptions_Impl::ReadMergeStatusbarData(
         {
             sal_uInt32 nAddonCount = rMergeStatusbarItems.getLength();
             rMergeStatusbarItems.realloc( nAddonCount+1 );
-            rMergeStatusbarItems[nAddonCount] = aStatusbarItem;
+            rMergeStatusbarItems.getArray()[nAddonCount] = aStatusbarItem;
         }
     }
 }
@@ -1251,18 +1256,19 @@ bool AddonsOptions_Impl::ReadStatusBarItem(
     // Command URL is required
     if (( aStatusbarItemNodePropValues[ OFFSET_STATUSBARITEM_URL ] >>= aURL ) 
&& aURL.getLength() > 0 )
     {
-        aStatusbarItem[ OFFSET_STATUSBARITEM_URL        ].Value <<= aURL;
-        aStatusbarItem[ OFFSET_STATUSBARITEM_TITLE      ].Value = 
aStatusbarItemNodePropValues[ OFFSET_STATUSBARITEM_TITLE     ];
-        aStatusbarItem[ OFFSET_STATUSBARITEM_CONTEXT    ].Value = 
aStatusbarItemNodePropValues[ OFFSET_STATUSBARITEM_CONTEXT   ];
-        aStatusbarItem[ OFFSET_STATUSBARITEM_ALIGN      ].Value = 
aStatusbarItemNodePropValues[ OFFSET_STATUSBARITEM_ALIGN     ];
-        aStatusbarItem[ OFFSET_STATUSBARITEM_AUTOSIZE   ].Value = 
aStatusbarItemNodePropValues[ OFFSET_STATUSBARITEM_AUTOSIZE  ];
-        aStatusbarItem[ OFFSET_STATUSBARITEM_OWNERDRAW  ].Value = 
aStatusbarItemNodePropValues[ OFFSET_STATUSBARITEM_OWNERDRAW ];
-        aStatusbarItem[ OFFSET_STATUSBARITEM_MANDATORY  ].Value = 
aStatusbarItemNodePropValues[ OFFSET_STATUSBARITEM_MANDATORY ];
+        auto pStatusbarItem = aStatusbarItem.getArray();
+        pStatusbarItem[ OFFSET_STATUSBARITEM_URL        ].Value <<= aURL;
+        pStatusbarItem[ OFFSET_STATUSBARITEM_TITLE      ].Value = 
aStatusbarItemNodePropValues[ OFFSET_STATUSBARITEM_TITLE     ];
+        pStatusbarItem[ OFFSET_STATUSBARITEM_CONTEXT    ].Value = 
aStatusbarItemNodePropValues[ OFFSET_STATUSBARITEM_CONTEXT   ];
+        pStatusbarItem[ OFFSET_STATUSBARITEM_ALIGN      ].Value = 
aStatusbarItemNodePropValues[ OFFSET_STATUSBARITEM_ALIGN     ];
+        pStatusbarItem[ OFFSET_STATUSBARITEM_AUTOSIZE   ].Value = 
aStatusbarItemNodePropValues[ OFFSET_STATUSBARITEM_AUTOSIZE  ];
+        pStatusbarItem[ OFFSET_STATUSBARITEM_OWNERDRAW  ].Value = 
aStatusbarItemNodePropValues[ OFFSET_STATUSBARITEM_OWNERDRAW ];
+        pStatusbarItem[ OFFSET_STATUSBARITEM_MANDATORY  ].Value = 
aStatusbarItemNodePropValues[ OFFSET_STATUSBARITEM_MANDATORY ];
 
         // Configuration uses hyper for long. Therefore transform into 
sal_Int32
         sal_Int64 nValue( 0 );
         aStatusbarItemNodePropValues[ OFFSET_STATUSBARITEM_WIDTH ] >>= nValue;
-        aStatusbarItem[ OFFSET_STATUSBARITEM_WIDTH ].Value <<= sal_Int32( 
nValue );
+        pStatusbarItem[ OFFSET_STATUSBARITEM_WIDTH ].Value <<= sal_Int32( 
nValue );
 
         bResult = true;
     }
@@ -1279,7 +1285,8 @@ bool AddonsOptions_Impl::ReadMenuItem( 
std::u16string_view aMenuNodeName, Sequen
     Sequence< Any >  aMenuItemNodePropValues = GetProperties( 
GetPropertyNamesMenuItem( aAddonMenuItemTreeNode ) );
     if (( aMenuItemNodePropValues[ OFFSET_MENUITEM_TITLE ] >>= aStrValue ) && 
!aStrValue.isEmpty() )
     {
-        aMenuItem[ OFFSET_MENUITEM_TITLE ].Value <<= aStrValue;
+        auto pMenuItem = aMenuItem.getArray();
+        pMenuItem[ OFFSET_MENUITEM_TITLE ].Value <<= aStrValue;
 
         OUString aRootSubMenuName( aAddonMenuItemTreeNode + m_aPropNames[ 
INDEX_SUBMENU ] );
         Sequence< OUString > aRootSubMenuNodeNames = GetNodeNames( 
aRootSubMenuName );
@@ -1294,10 +1301,10 @@ bool AddonsOptions_Impl::ReadMenuItem( 
std::u16string_view aMenuNodeName, Sequen
 
             // A popup menu must have a title and can have a URL and 
ImageIdentifier
             // Set the other property values to empty
-            aMenuItem[ OFFSET_MENUITEM_URL              ].Value <<= 
aPopupMenuURL;
-            aMenuItem[ OFFSET_MENUITEM_TARGET           ].Value <<= OUString();
-            aMenuItem[ OFFSET_MENUITEM_IMAGEIDENTIFIER  ].Value <<= 
aPopupMenuImageId;
-            aMenuItem[ OFFSET_MENUITEM_CONTEXT          ].Value = 
aMenuItemNodePropValues[ OFFSET_MENUITEM_CONTEXT ];
+            pMenuItem[ OFFSET_MENUITEM_URL              ].Value <<= 
aPopupMenuURL;
+            pMenuItem[ OFFSET_MENUITEM_TARGET           ].Value <<= OUString();
+            pMenuItem[ OFFSET_MENUITEM_IMAGEIDENTIFIER  ].Value <<= 
aPopupMenuImageId;
+            pMenuItem[ OFFSET_MENUITEM_CONTEXT          ].Value = 
aMenuItemNodePropValues[ OFFSET_MENUITEM_CONTEXT ];
 
             // Continue to read the sub menu nodes
             Sequence< Sequence< PropertyValue > > aSubMenuSeq;
@@ -1305,7 +1312,7 @@ bool AddonsOptions_Impl::ReadMenuItem( 
std::u16string_view aMenuNodeName, Sequen
             for ( OUString& rName : asNonConstRange(aRootSubMenuNodeNames) )
                 rName = aSubMenuRootNodeName + rName;
             ReadSubMenuEntries( aRootSubMenuNodeNames, aSubMenuSeq );
-            aMenuItem[ OFFSET_MENUITEM_SUBMENU ].Value <<= aSubMenuSeq;
+            pMenuItem[ OFFSET_MENUITEM_SUBMENU ].Value <<= aSubMenuSeq;
             bResult = true;
         }
         else if (( aMenuItemNodePropValues[ OFFSET_MENUITEM_URL ] >>= 
aStrValue ) && !aStrValue.isEmpty() )
@@ -1316,11 +1323,11 @@ bool AddonsOptions_Impl::ReadMenuItem( 
std::u16string_view aMenuNodeName, Sequen
             aMenuItemNodePropValues[ OFFSET_MENUITEM_IMAGEIDENTIFIER ] >>= 
aMenuImageId;
             ReadAndAssociateImages( aStrValue, aMenuImageId );
 
-            aMenuItem[ OFFSET_MENUITEM_URL              ].Value <<= aStrValue;
-            aMenuItem[ OFFSET_MENUITEM_TARGET           ].Value = 
aMenuItemNodePropValues[ OFFSET_MENUITEM_TARGET         ];
-            aMenuItem[ OFFSET_MENUITEM_IMAGEIDENTIFIER  ].Value <<= 
aMenuImageId;
-            aMenuItem[ OFFSET_MENUITEM_CONTEXT          ].Value = 
aMenuItemNodePropValues[ OFFSET_MENUITEM_CONTEXT        ];
-            aMenuItem[ OFFSET_MENUITEM_SUBMENU          ].Value <<= Sequence< 
Sequence< PropertyValue > >(); // Submenu set!
+            pMenuItem[ OFFSET_MENUITEM_URL              ].Value <<= aStrValue;
+            pMenuItem[ OFFSET_MENUITEM_TARGET           ].Value = 
aMenuItemNodePropValues[ OFFSET_MENUITEM_TARGET         ];
+            pMenuItem[ OFFSET_MENUITEM_IMAGEIDENTIFIER  ].Value <<= 
aMenuImageId;
+            pMenuItem[ OFFSET_MENUITEM_CONTEXT          ].Value = 
aMenuItemNodePropValues[ OFFSET_MENUITEM_CONTEXT        ];
+            pMenuItem[ OFFSET_MENUITEM_SUBMENU          ].Value <<= Sequence< 
Sequence< PropertyValue > >(); // Submenu set!
 
             bResult = true;
         }
@@ -1328,12 +1335,14 @@ bool AddonsOptions_Impl::ReadMenuItem( 
std::u16string_view aMenuNodeName, Sequen
     else if (( aMenuItemNodePropValues[ OFFSET_MENUITEM_URL ] >>= aStrValue ) 
&&
               aStrValue == SEPARATOR_URL )
     {
+        auto pMenuItem = aMenuItem.getArray();
+
         // Separator
-        aMenuItem[ OFFSET_MENUITEM_URL              ].Value <<= aStrValue;
-        aMenuItem[ OFFSET_MENUITEM_TARGET           ].Value <<= OUString();
-        aMenuItem[ OFFSET_MENUITEM_IMAGEIDENTIFIER  ].Value <<= OUString();
-        aMenuItem[ OFFSET_MENUITEM_CONTEXT          ].Value <<= OUString();
-        aMenuItem[ OFFSET_MENUITEM_SUBMENU          ].Value <<= Sequence< 
Sequence< PropertyValue > >(); // Submenu set!
+        pMenuItem[ OFFSET_MENUITEM_URL              ].Value <<= aStrValue;
+        pMenuItem[ OFFSET_MENUITEM_TARGET           ].Value <<= OUString();
+        pMenuItem[ OFFSET_MENUITEM_IMAGEIDENTIFIER  ].Value <<= OUString();
+        pMenuItem[ OFFSET_MENUITEM_CONTEXT          ].Value <<= OUString();
+        pMenuItem[ OFFSET_MENUITEM_SUBMENU          ].Value <<= Sequence< 
Sequence< PropertyValue > >(); // Submenu set!
         bResult = true;
     }
 
@@ -1350,7 +1359,8 @@ bool AddonsOptions_Impl::ReadPopupMenu( 
std::u16string_view aPopupMenuNodeName,
     if (( aPopupMenuNodePropValues[ OFFSET_POPUPMENU_TITLE ] >>= aStrValue ) &&
          !aStrValue.isEmpty() )
     {
-        aPopupMenu[ OFFSET_POPUPMENU_TITLE ].Value <<= aStrValue;
+        auto pPopupMenu = aPopupMenu.getArray();
+        pPopupMenu[ OFFSET_POPUPMENU_TITLE ].Value <<= aStrValue;
 
         OUString aRootSubMenuName( aAddonPopupMenuTreeNode + m_aPropNames[ 
INDEX_SUBMENU ] );
         Sequence< OUString > aRootSubMenuNodeNames = GetNodeNames( 
aRootSubMenuName );
@@ -1360,8 +1370,8 @@ bool AddonsOptions_Impl::ReadPopupMenu( 
std::u16string_view aPopupMenuNodeName,
             // Set a unique prefixed Add-On popup menu URL so it can be 
identified later
             OUString aPopupMenuURL = GeneratePrefixURL();
 
-            aPopupMenu[ OFFSET_POPUPMENU_URL        ].Value <<= aPopupMenuURL;
-            aPopupMenu[ OFFSET_POPUPMENU_CONTEXT    ].Value = 
aPopupMenuNodePropValues[ OFFSET_POPUPMENU_CONTEXT ];
+            pPopupMenu[ OFFSET_POPUPMENU_URL        ].Value <<= aPopupMenuURL;
+            pPopupMenu[ OFFSET_POPUPMENU_CONTEXT    ].Value = 
aPopupMenuNodePropValues[ OFFSET_POPUPMENU_CONTEXT ];
 
             // Continue to read the sub menu nodes
             Sequence< Sequence< PropertyValue > > aSubMenuSeq;
@@ -1369,7 +1379,7 @@ bool AddonsOptions_Impl::ReadPopupMenu( 
std::u16string_view aPopupMenuNodeName,
             for ( OUString& rName : asNonConstRange(aRootSubMenuNodeNames) )
                 rName = aSubMenuRootNodeName + rName;
             ReadSubMenuEntries( aRootSubMenuNodeNames, aSubMenuSeq );
-            aPopupMenu[ OFFSET_POPUPMENU_SUBMENU ].Value <<= aSubMenuSeq;
+            pPopupMenu[ OFFSET_POPUPMENU_SUBMENU ].Value <<= aSubMenuSeq;
             bResult = true;
         }
     }
@@ -1387,9 +1397,10 @@ void AddonsOptions_Impl::AppendPopupMenu( Sequence< 
PropertyValue >& rTargetPopu
     {
         sal_uInt32 nIndex = aTargetSubMenuSeq.getLength();
         aTargetSubMenuSeq.realloc( nIndex + aSourceSubMenuSeq.getLength() );
+        auto pTargetSubMenuSeq = aTargetSubMenuSeq.getArray();
         for ( Sequence<PropertyValue> const & rSeq : 
std::as_const(aSourceSubMenuSeq) )
-            aTargetSubMenuSeq[nIndex++] = rSeq;
-        rTargetPopupMenu[ OFFSET_POPUPMENU_SUBMENU ].Value <<= 
aTargetSubMenuSeq;
+            pTargetSubMenuSeq[nIndex++] = rSeq;
+        rTargetPopupMenu.getArray()[ OFFSET_POPUPMENU_SUBMENU ].Value <<= 
aTargetSubMenuSeq;
     }
 }
 
@@ -1407,19 +1418,23 @@ bool AddonsOptions_Impl::ReadToolBarItem( 
std::u16string_view aToolBarItemNodeNa
         OUString         aTitle;
         if ( aURL == SEPARATOR_URL )
         {
+            auto pToolBarItem = aToolBarItem.getArray();
+
             // A separator toolbar item only needs a URL
-            aToolBarItem[ OFFSET_TOOLBARITEM_URL                ].Value <<= 
aURL;
-            aToolBarItem[ OFFSET_TOOLBARITEM_TITLE              ].Value <<= 
OUString();
-            aToolBarItem[ OFFSET_TOOLBARITEM_TARGET             ].Value <<= 
OUString();
-            aToolBarItem[ OFFSET_TOOLBARITEM_IMAGEIDENTIFIER    ].Value <<= 
OUString();
-            aToolBarItem[ OFFSET_TOOLBARITEM_CONTEXT            ].Value <<= 
OUString();
-            aToolBarItem[ OFFSET_TOOLBARITEM_CONTROLTYPE        ].Value <<= 
OUString();
-            aToolBarItem[ OFFSET_TOOLBARITEM_WIDTH              ].Value <<= 
sal_Int32( 0 );
+            pToolBarItem[ OFFSET_TOOLBARITEM_URL                ].Value <<= 
aURL;
+            pToolBarItem[ OFFSET_TOOLBARITEM_TITLE              ].Value <<= 
OUString();
+            pToolBarItem[ OFFSET_TOOLBARITEM_TARGET             ].Value <<= 
OUString();
+            pToolBarItem[ OFFSET_TOOLBARITEM_IMAGEIDENTIFIER    ].Value <<= 
OUString();
+            pToolBarItem[ OFFSET_TOOLBARITEM_CONTEXT            ].Value <<= 
OUString();
+            pToolBarItem[ OFFSET_TOOLBARITEM_CONTROLTYPE        ].Value <<= 
OUString();
+            pToolBarItem[ OFFSET_TOOLBARITEM_WIDTH              ].Value <<= 
sal_Int32( 0 );
 
             bResult = true;
         }
         else if (( aToolBarItemNodePropValues[ OFFSET_TOOLBARITEM_TITLE ] >>= 
aTitle ) && !aTitle.isEmpty() )
         {
+            auto pToolBarItem = aToolBarItem.getArray();
+
             // A normal toolbar item must also have title => read the other 
properties;
             OUString aImageId;
 
@@ -1427,17 +1442,17 @@ bool AddonsOptions_Impl::ReadToolBarItem( 
std::u16string_view aToolBarItemNodeNa
             aToolBarItemNodePropValues[ OFFSET_TOOLBARITEM_IMAGEIDENTIFIER ] 
>>= aImageId;
             ReadAndAssociateImages( aURL, aImageId );
 
-            aToolBarItem[ OFFSET_TOOLBARITEM_URL                ].Value <<= 
aURL;
-            aToolBarItem[ OFFSET_TOOLBARITEM_TITLE              ].Value <<= 
aTitle;
-            aToolBarItem[ OFFSET_TOOLBARITEM_TARGET             ].Value = 
aToolBarItemNodePropValues[ OFFSET_TOOLBARITEM_TARGET      ];
-            aToolBarItem[ OFFSET_TOOLBARITEM_IMAGEIDENTIFIER    ].Value <<= 
aImageId;
-            aToolBarItem[ OFFSET_TOOLBARITEM_CONTEXT            ].Value = 
aToolBarItemNodePropValues[ OFFSET_TOOLBARITEM_CONTEXT     ];
-            aToolBarItem[ OFFSET_TOOLBARITEM_CONTROLTYPE        ].Value = 
aToolBarItemNodePropValues[ OFFSET_TOOLBARITEM_CONTROLTYPE ];
+            pToolBarItem[ OFFSET_TOOLBARITEM_URL                ].Value <<= 
aURL;
+            pToolBarItem[ OFFSET_TOOLBARITEM_TITLE              ].Value <<= 
aTitle;
+            pToolBarItem[ OFFSET_TOOLBARITEM_TARGET             ].Value = 
aToolBarItemNodePropValues[ OFFSET_TOOLBARITEM_TARGET      ];
+            pToolBarItem[ OFFSET_TOOLBARITEM_IMAGEIDENTIFIER    ].Value <<= 
aImageId;
+            pToolBarItem[ OFFSET_TOOLBARITEM_CONTEXT            ].Value = 
aToolBarItemNodePropValues[ OFFSET_TOOLBARITEM_CONTEXT     ];
+            pToolBarItem[ OFFSET_TOOLBARITEM_CONTROLTYPE        ].Value = 
aToolBarItemNodePropValues[ OFFSET_TOOLBARITEM_CONTROLTYPE ];
 
             // Configuration uses hyper for long. Therefore transform into 
sal_Int32
             sal_Int64 nValue( 0 );
             aToolBarItemNodePropValues[ OFFSET_TOOLBARITEM_WIDTH ] >>= nValue;
-            aToolBarItem[ OFFSET_TOOLBARITEM_WIDTH              ].Value <<= 
sal_Int32( nValue );
+            pToolBarItem[ OFFSET_TOOLBARITEM_WIDTH              ].Value <<= 
sal_Int32( nValue );
 
             bResult = true;
         }
@@ -1460,20 +1475,24 @@ bool AddonsOptions_Impl::ReadNotebookBarItem( 
std::u16string_view aNotebookBarIt
         OUString         aTitle;
         if ( aURL == SEPARATOR_URL )
         {
+            auto pNotebookBarItem = aNotebookBarItem.getArray();
+
             // A separator toolbar item only needs a URL
-            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_URL                
].Value <<= aURL;
-            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_TITLE              
].Value <<= OUString();
-            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_TARGET             
].Value <<= OUString();
-            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_IMAGEIDENTIFIER    
].Value <<= OUString();
-            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_CONTEXT            
].Value <<= OUString();
-            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_CONTROLTYPE        
].Value <<= OUString();
-            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_WIDTH              
].Value <<= sal_Int32( 0 );
-            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_STYLE              
].Value <<= OUString();
+            pNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_URL                
].Value <<= aURL;
+            pNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_TITLE              
].Value <<= OUString();
+            pNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_TARGET             
].Value <<= OUString();
+            pNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_IMAGEIDENTIFIER    
].Value <<= OUString();
+            pNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_CONTEXT            
].Value <<= OUString();
+            pNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_CONTROLTYPE        
].Value <<= OUString();
+            pNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_WIDTH              
].Value <<= sal_Int32( 0 );
+            pNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_STYLE              
].Value <<= OUString();
 
             bResult = true;
         }
         else if (( aNotebookBarItemNodePropValues[ 
OFFSET_NOTEBOOKBARITEM_TITLE ] >>= aTitle ) && !aTitle.isEmpty() )
         {
+            auto pNotebookBarItem = aNotebookBarItem.getArray();
+
             // A normal toolbar item must also have title => read the other 
properties;
             OUString aImageId;
 
@@ -1481,18 +1500,18 @@ bool AddonsOptions_Impl::ReadNotebookBarItem( 
std::u16string_view aNotebookBarIt
             aNotebookBarItemNodePropValues[ 
OFFSET_NOTEBOOKBARITEM_IMAGEIDENTIFIER ] >>= aImageId;
             ReadAndAssociateImages( aURL, aImageId );
 
-            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_URL                
].Value <<= aURL;
-            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_TITLE              
].Value <<= aTitle;
-            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_TARGET             
].Value = aNotebookBarItemNodePropValues[ OFFSET_NOTEBOOKBARITEM_TARGET      ];
-            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_IMAGEIDENTIFIER    
].Value <<= aImageId;
-            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_CONTEXT            
].Value = aNotebookBarItemNodePropValues[ OFFSET_NOTEBOOKBARITEM_CONTEXT     ];
-            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_CONTROLTYPE        
].Value = aNotebookBarItemNodePropValues[ OFFSET_NOTEBOOKBARITEM_CONTROLTYPE ];
+            pNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_URL                
].Value <<= aURL;
+            pNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_TITLE              
].Value <<= aTitle;
+            pNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_TARGET             
].Value = aNotebookBarItemNodePropValues[ OFFSET_NOTEBOOKBARITEM_TARGET      ];
+            pNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_IMAGEIDENTIFIER    
].Value <<= aImageId;
+            pNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_CONTEXT            
].Value = aNotebookBarItemNodePropValues[ OFFSET_NOTEBOOKBARITEM_CONTEXT     ];
+            pNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_CONTROLTYPE        
].Value = aNotebookBarItemNodePropValues[ OFFSET_NOTEBOOKBARITEM_CONTROLTYPE ];
 
             // Configuration uses hyper for long. Therefore transform into 
sal_Int32
             sal_Int64 nValue( 0 );
             aNotebookBarItemNodePropValues[ OFFSET_NOTEBOOKBARITEM_WIDTH ] >>= 
nValue;
-            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_WIDTH              
].Value <<= sal_Int32( nValue );
-            aNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_STYLE              
].Value = aNotebookBarItemNodePropValues[ OFFSET_NOTEBOOKBARITEM_STYLE ];
+            pNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_WIDTH              
].Value <<= sal_Int32( nValue );
+            pNotebookBarItem[ OFFSET_NOTEBOOKBARITEM_STYLE              
].Value = aNotebookBarItemNodePropValues[ OFFSET_NOTEBOOKBARITEM_STYLE ];
 
             bResult = true;
         }
@@ -1504,14 +1523,15 @@ bool AddonsOptions_Impl::ReadNotebookBarItem( 
std::u16string_view aNotebookBarIt
 void AddonsOptions_Impl::ReadSubMenuEntries( const Sequence< OUString >& 
aSubMenuNodeNames, Sequence< Sequence< PropertyValue > >& rSubMenuSeq )
 {
     Sequence< PropertyValue > aMenuItem( PROPERTYCOUNT_MENUITEM );
+    auto pMenuItem = aMenuItem.getArray();
 
     // Init the property value sequence
-    aMenuItem[ OFFSET_MENUITEM_URL              ].Name = PROPERTYNAME_URL;
-    aMenuItem[ OFFSET_MENUITEM_TITLE            ].Name = PROPERTYNAME_TITLE;
-    aMenuItem[ OFFSET_MENUITEM_TARGET           ].Name = PROPERTYNAME_TARGET;
-    aMenuItem[ OFFSET_MENUITEM_IMAGEIDENTIFIER  ].Name = 
PROPERTYNAME_IMAGEIDENTIFIER;
-    aMenuItem[ OFFSET_MENUITEM_CONTEXT          ].Name = PROPERTYNAME_CONTEXT;
-    aMenuItem[ OFFSET_MENUITEM_SUBMENU          ].Name = PROPERTYNAME_SUBMENU; 
 // Submenu set!
+    pMenuItem[ OFFSET_MENUITEM_URL              ].Name = PROPERTYNAME_URL;
+    pMenuItem[ OFFSET_MENUITEM_TITLE            ].Name = PROPERTYNAME_TITLE;
+    pMenuItem[ OFFSET_MENUITEM_TARGET           ].Name = PROPERTYNAME_TARGET;
+    pMenuItem[ OFFSET_MENUITEM_IMAGEIDENTIFIER  ].Name = 
PROPERTYNAME_IMAGEIDENTIFIER;
+    pMenuItem[ OFFSET_MENUITEM_CONTEXT          ].Name = PROPERTYNAME_CONTEXT;
+    pMenuItem[ OFFSET_MENUITEM_SUBMENU          ].Name = PROPERTYNAME_SUBMENU; 
 // Submenu set!
 
     sal_uInt32 nIndex = 0;
     sal_uInt32 nCount = aSubMenuNodeNames.getLength();
@@ -1521,7 +1541,7 @@ void AddonsOptions_Impl::ReadSubMenuEntries( const 
Sequence< OUString >& aSubMen
         {
             sal_uInt32 nSubMenuCount = rSubMenuSeq.getLength() + 1;
             rSubMenuSeq.realloc( nSubMenuCount );
-            rSubMenuSeq[nIndex++] = aMenuItem;
+            rSubMenuSeq.getArray()[nIndex++] = aMenuItem;
         }
     }
 }
@@ -1662,14 +1682,15 @@ bool AddonsOptions_Impl::CreateImageFromSequence( 
BitmapEx& rImage, Sequence< sa
 Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesMenuItem( 
std::u16string_view aPropertyRootNode ) const
 {
     Sequence< OUString > lResult( PROPERTYCOUNT_MENUITEM );
+    auto plResult = lResult.getArray();
 
     // Create property names dependent from the root node name
-    lResult[OFFSET_MENUITEM_URL]             = aPropertyRootNode + 
m_aPropNames[ INDEX_URL          ];
-    lResult[OFFSET_MENUITEM_TITLE]           = aPropertyRootNode + 
m_aPropNames[ INDEX_TITLE            ];
-    lResult[OFFSET_MENUITEM_IMAGEIDENTIFIER] = aPropertyRootNode + 
m_aPropNames[ INDEX_IMAGEIDENTIFIER ];
-    lResult[OFFSET_MENUITEM_TARGET]          = aPropertyRootNode + 
m_aPropNames[ INDEX_TARGET           ];
-    lResult[OFFSET_MENUITEM_CONTEXT]         = aPropertyRootNode + 
m_aPropNames[ INDEX_CONTEXT      ];
-    lResult[OFFSET_MENUITEM_SUBMENU]         = aPropertyRootNode + 
m_aPropNames[ INDEX_SUBMENU      ];
+    plResult[OFFSET_MENUITEM_URL]             = aPropertyRootNode + 
m_aPropNames[ INDEX_URL          ];
+    plResult[OFFSET_MENUITEM_TITLE]           = aPropertyRootNode + 
m_aPropNames[ INDEX_TITLE            ];
+    plResult[OFFSET_MENUITEM_IMAGEIDENTIFIER] = aPropertyRootNode + 
m_aPropNames[ INDEX_IMAGEIDENTIFIER ];
+    plResult[OFFSET_MENUITEM_TARGET]          = aPropertyRootNode + 
m_aPropNames[ INDEX_TARGET           ];
+    plResult[OFFSET_MENUITEM_CONTEXT]         = aPropertyRootNode + 
m_aPropNames[ INDEX_CONTEXT      ];
+    plResult[OFFSET_MENUITEM_SUBMENU]         = aPropertyRootNode + 
m_aPropNames[ INDEX_SUBMENU      ];
 
     return lResult;
 }
@@ -1678,11 +1699,12 @@ Sequence< OUString > 
AddonsOptions_Impl::GetPropertyNamesPopupMenu( std::u16stri
 {
     // The URL is automatically set and not read from the configuration.
     Sequence< OUString > lResult( PROPERTYCOUNT_POPUPMENU-1 );
+    auto plResult = lResult.getArray();
 
     // Create property names dependent from the root node name
-    lResult[OFFSET_POPUPMENU_TITLE]   = aPropertyRootNode + m_aPropNames[ 
INDEX_TITLE  ];
-    lResult[OFFSET_POPUPMENU_CONTEXT] = aPropertyRootNode + m_aPropNames[ 
INDEX_CONTEXT    ];
-    lResult[OFFSET_POPUPMENU_SUBMENU] = aPropertyRootNode + m_aPropNames[ 
INDEX_SUBMENU    ];
+    plResult[OFFSET_POPUPMENU_TITLE]   = aPropertyRootNode + m_aPropNames[ 
INDEX_TITLE  ];
+    plResult[OFFSET_POPUPMENU_CONTEXT] = aPropertyRootNode + m_aPropNames[ 
INDEX_CONTEXT    ];
+    plResult[OFFSET_POPUPMENU_SUBMENU] = aPropertyRootNode + m_aPropNames[ 
INDEX_SUBMENU    ];
 
     return lResult;
 }
@@ -1690,15 +1712,16 @@ Sequence< OUString > 
AddonsOptions_Impl::GetPropertyNamesPopupMenu( std::u16stri
 Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesToolBarItem( 
std::u16string_view aPropertyRootNode ) const
 {
     Sequence< OUString > lResult( PROPERTYCOUNT_TOOLBARITEM );
+    auto plResult = lResult.getArray();
 
     // Create property names dependent from the root node name
-    lResult[0] = aPropertyRootNode + m_aPropNames[ INDEX_URL             ];
-    lResult[1] = aPropertyRootNode + m_aPropNames[ INDEX_TITLE       ];
-    lResult[2] = aPropertyRootNode + m_aPropNames[ INDEX_IMAGEIDENTIFIER];
-    lResult[3] = aPropertyRootNode + m_aPropNames[ INDEX_TARGET          ];
-    lResult[4] = aPropertyRootNode + m_aPropNames[ INDEX_CONTEXT         ];
-    lResult[5] = aPropertyRootNode + m_aPropNames[ INDEX_CONTROLTYPE     ];
-    lResult[6] = aPropertyRootNode + m_aPropNames[ INDEX_WIDTH       ];
+    plResult[0] = aPropertyRootNode + m_aPropNames[ INDEX_URL             ];
+    plResult[1] = aPropertyRootNode + m_aPropNames[ INDEX_TITLE       ];
+    plResult[2] = aPropertyRootNode + m_aPropNames[ INDEX_IMAGEIDENTIFIER];
+    plResult[3] = aPropertyRootNode + m_aPropNames[ INDEX_TARGET          ];
+    plResult[4] = aPropertyRootNode + m_aPropNames[ INDEX_CONTEXT         ];
+    plResult[5] = aPropertyRootNode + m_aPropNames[ INDEX_CONTROLTYPE     ];
+    plResult[6] = aPropertyRootNode + m_aPropNames[ INDEX_WIDTH       ];
 
     return lResult;
 }
@@ -1706,16 +1729,17 @@ Sequence< OUString > 
AddonsOptions_Impl::GetPropertyNamesToolBarItem( std::u16st
 Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesNotebookBarItem( 
std::u16string_view aPropertyRootNode ) const
 {
     Sequence< OUString > lResult( PROPERTYCOUNT_NOTEBOOKBARITEM );
+    auto plResult = lResult.getArray();
 
     // Create property names dependent from the root node name
-    lResult[0] = aPropertyRootNode + m_aPropNames[ INDEX_URL             ];
-    lResult[1] = aPropertyRootNode + m_aPropNames[ INDEX_TITLE       ];
-    lResult[2] = aPropertyRootNode + m_aPropNames[ INDEX_IMAGEIDENTIFIER];
-    lResult[3] = aPropertyRootNode + m_aPropNames[ INDEX_TARGET          ];
-    lResult[4] = aPropertyRootNode + m_aPropNames[ INDEX_CONTEXT         ];
-    lResult[5] = aPropertyRootNode + m_aPropNames[ INDEX_CONTROLTYPE     ];
-    lResult[6] = aPropertyRootNode + m_aPropNames[ INDEX_WIDTH       ];
-    lResult[7] = aPropertyRootNode + m_aPropNames[ INDEX_STYLE       ];
+    plResult[0] = aPropertyRootNode + m_aPropNames[ INDEX_URL             ];
+    plResult[1] = aPropertyRootNode + m_aPropNames[ INDEX_TITLE       ];
+    plResult[2] = aPropertyRootNode + m_aPropNames[ INDEX_IMAGEIDENTIFIER];
+    plResult[3] = aPropertyRootNode + m_aPropNames[ INDEX_TARGET          ];
+    plResult[4] = aPropertyRootNode + m_aPropNames[ INDEX_CONTEXT         ];
+    plResult[5] = aPropertyRootNode + m_aPropNames[ INDEX_CONTROLTYPE     ];
+    plResult[6] = aPropertyRootNode + m_aPropNames[ INDEX_WIDTH       ];
+    plResult[7] = aPropertyRootNode + m_aPropNames[ INDEX_STYLE       ];
 
     return lResult;
 }
@@ -1724,15 +1748,16 @@ Sequence< OUString > 
AddonsOptions_Impl::GetPropertyNamesStatusbarItem(
     std::u16string_view aPropertyRootNode ) const
 {
     Sequence< OUString > lResult( PROPERTYCOUNT_STATUSBARITEM );
+    auto plResult = lResult.getArray();
 
-    lResult[0] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_URL       ] 
);
-    lResult[1] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_TITLE     ] 
);
-    lResult[2] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_CONTEXT   ] 
);
-    lResult[3] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_ALIGN     ] 
);
-    lResult[4] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_AUTOSIZE  ] 
);
-    lResult[5] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_OWNERDRAW ] 
);
-    lResult[6] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_MANDATORY ] 
);
-    lResult[7] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_WIDTH     ] 
);
+    plResult[0] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_URL       
] );
+    plResult[1] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_TITLE     
] );
+    plResult[2] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_CONTEXT   
] );
+    plResult[3] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_ALIGN     
] );
+    plResult[4] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_AUTOSIZE  
] );
+    plResult[5] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_OWNERDRAW 
] );
+    plResult[6] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_MANDATORY 
] );
+    plResult[7] = OUString( aPropertyRootNode + m_aPropNames[ INDEX_WIDTH     
] );
 
     return lResult;
 }
@@ -1740,16 +1765,17 @@ Sequence< OUString > 
AddonsOptions_Impl::GetPropertyNamesStatusbarItem(
 Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesImages( 
std::u16string_view aPropertyRootNode ) const
 {
     Sequence< OUString > lResult( PROPERTYCOUNT_IMAGES );
+    auto plResult = lResult.getArray();
 
     // Create property names dependent from the root node name
-    lResult[0] = aPropertyRootNode + m_aPropImagesNames[ OFFSET_IMAGES_SMALL   
    ];
-    lResult[1] = aPropertyRootNode + m_aPropImagesNames[ OFFSET_IMAGES_BIG     
];
-    lResult[2] = aPropertyRootNode + m_aPropImagesNames[ OFFSET_IMAGES_SMALLHC 
];
-    lResult[3] = aPropertyRootNode + m_aPropImagesNames[ OFFSET_IMAGES_BIGHC   
    ];
-    lResult[4] = aPropertyRootNode + m_aPropImagesNames[ 
OFFSET_IMAGES_SMALL_URL  ];
-    lResult[5] = aPropertyRootNode + m_aPropImagesNames[ OFFSET_IMAGES_BIG_URL 
];
-    lResult[6] = aPropertyRootNode + m_aPropImagesNames[ 
OFFSET_IMAGES_SMALLHC_URL];
-    lResult[7] = aPropertyRootNode + m_aPropImagesNames[ 
OFFSET_IMAGES_BIGHC_URL   ];
+    plResult[0] = aPropertyRootNode + m_aPropImagesNames[ OFFSET_IMAGES_SMALL  
     ];
+    plResult[1] = aPropertyRootNode + m_aPropImagesNames[ OFFSET_IMAGES_BIG    
 ];
+    plResult[2] = aPropertyRootNode + m_aPropImagesNames[ 
OFFSET_IMAGES_SMALLHC ];
+    plResult[3] = aPropertyRootNode + m_aPropImagesNames[ OFFSET_IMAGES_BIGHC  
     ];
+    plResult[4] = aPropertyRootNode + m_aPropImagesNames[ 
OFFSET_IMAGES_SMALL_URL  ];
+    plResult[5] = aPropertyRootNode + m_aPropImagesNames[ 
OFFSET_IMAGES_BIG_URL ];
+    plResult[6] = aPropertyRootNode + m_aPropImagesNames[ 
OFFSET_IMAGES_SMALLHC_URL];
+    plResult[7] = aPropertyRootNode + m_aPropImagesNames[ 
OFFSET_IMAGES_BIGHC_URL   ];
 
     return lResult;
 }
diff --git a/framework/source/fwe/classes/rootactiontriggercontainer.cxx 
b/framework/source/fwe/classes/rootactiontriggercontainer.cxx
index f49cf9c70c5e..46e36d9bb94a 100644
--- a/framework/source/fwe/classes/rootactiontriggercontainer.cxx
+++ b/framework/source/fwe/classes/rootactiontriggercontainer.cxx
@@ -104,12 +104,9 @@ Reference< XInterface > SAL_CALL 
RootActionTriggerContainer::createInstanceWithA
 
 Sequence< OUString > SAL_CALL 
RootActionTriggerContainer::getAvailableServiceNames()
 {
-    Sequence< OUString > aSeq( 3 );
-
-    aSeq[0] = SERVICENAME_ACTIONTRIGGER;
-    aSeq[1] = SERVICENAME_ACTIONTRIGGERCONTAINER;
-    aSeq[2] = SERVICENAME_ACTIONTRIGGERSEPARATOR;
-
+    Sequence< OUString > aSeq{ SERVICENAME_ACTIONTRIGGER,
+                               SERVICENAME_ACTIONTRIGGERCONTAINER,
+                               SERVICENAME_ACTIONTRIGGERSEPARATOR };
     return aSeq;
 }
 
diff --git a/framework/source/fwe/helper/undomanagerhelper.cxx 
b/framework/source/fwe/helper/undomanagerhelper.cxx
index ef6a9da4a5b4..87cba0c6de09 100644
--- a/framework/source/fwe/helper/undomanagerhelper.cxx
+++ b/framework/source/fwe/helper/undomanagerhelper.cxx
@@ -958,9 +958,10 @@ namespace framework
                                 :   rUndoManager.GetRedoActionCount( 
SfxUndoManager::TopLevel );
 
             Sequence< OUString > aTitles( nCount );
+            auto aTitlesRange = asNonConstRange(aTitles);
             for ( size_t i=0; i<nCount; ++i )
             {
-                aTitles[i] =    i_undo
+                aTitlesRange[i] =    i_undo
                             ?   rUndoManager.GetUndoActionComment( i, 
SfxUndoManager::TopLevel )
                             :   rUndoManager.GetRedoActionComment( i, 
SfxUndoManager::TopLevel );
             }
diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx 
b/framework/source/fwe/xml/menudocumenthandler.cxx
index c2c44447f3cc..f265f9260828 100644
--- a/framework/source/fwe/xml/menudocumenthandler.cxx
+++ b/framework/source/fwe/xml/menudocumenthandler.cxx
@@ -31,6 +31,7 @@
 #include <com/sun/star/beans/PropertyValue.hpp>
 
 #include <comphelper/processfactory.hxx>
+#include <comphelper/propertyvalue.hxx>
 #include <comphelper/attributelist.hxx>
 
 #ifdef ATTRIBUTE_HELPID
@@ -191,20 +192,22 @@ void ReadMenuDocumentHandlerBase::initPropertyCommon(
     Sequence< PropertyValue > &rProps, const OUString &rCommandURL,
     const OUString &rHelpId, const OUString &rLabel, sal_Int16 nItemStyleBits )
 {
-    rProps[0].Name = m_aCommandURL;
-    rProps[1].Name = m_aHelpURL;
-    rProps[2].Name = m_aContainer;
-    rProps[3].Name = m_aLabel;
-    rProps[4].Name = m_aStyle;
-    rProps[5].Name = m_aType;
+    auto pProps = rProps.getArray();
+
+    pProps[0].Name = m_aCommandURL;
+    pProps[1].Name = m_aHelpURL;
+    pProps[2].Name = m_aContainer;
+    pProps[3].Name = m_aLabel;
+    pProps[4].Name = m_aStyle;
+    pProps[5].Name = m_aType;
 
     // Common values
-    rProps[0].Value <<= rCommandURL.intern();
-    rProps[1].Value <<= rHelpId;
-    rProps[2].Value <<= Reference< XIndexContainer >();
-    rProps[3].Value <<= rLabel;
-    rProps[4].Value <<= nItemStyleBits;
-    rProps[5].Value <<= css::ui::ItemType::DEFAULT;
+    pProps[0].Value <<= rCommandURL.intern();
+    pProps[1].Value <<= rHelpId;
+    pProps[2].Value <<= Reference< XIndexContainer >();
+    pProps[3].Value <<= rLabel;
+    pProps[4].Value <<= nItemStyleBits;
+    pProps[5].Value <<= css::ui::ItemType::DEFAULT;
 }
 
 OReadMenuDocumentHandler::OReadMenuDocumentHandler(
@@ -376,7 +379,7 @@ void SAL_CALL OReadMenuBarHandler::startElement(
             {
                 Sequence< PropertyValue > aSubMenuProp( 6 );
                 initPropertyCommon( aSubMenuProp, aCommandId, aHelpId, aLabel, 
nItemBits );
-                aSubMenuProp[2].Value <<= xSubItemContainer;
+                aSubMenuProp.getArray()[2].Value <<= xSubItemContainer;
 
                 m_xMenuBarContainer->insertByIndex( 
m_xMenuBarContainer->getCount(), makeAny( aSubMenuProp ) );
             }
@@ -577,7 +580,7 @@ void SAL_CALL OReadMenuPopupHandler::startElement(
         {
             Sequence< PropertyValue > aSubMenuProp( 6 );
             initPropertyCommon( aSubMenuProp, aCommandId, aHelpId, aLabel, 
nItemBits );
-            aSubMenuProp[2].Value <<= xSubItemContainer;
+            aSubMenuProp.getArray()[2].Value <<= xSubItemContainer;
 
             m_xMenuContainer->insertByIndex( m_xMenuContainer->getCount(), 
makeAny( aSubMenuProp ) );
         }
@@ -633,7 +636,7 @@ void SAL_CALL OReadMenuPopupHandler::startElement(
         {
             Sequence< PropertyValue > aMenuItem( 6 );
             initPropertyCommon( aMenuItem, aCommandId, aHelpId, aLabel, 
nItemBits );
-            aMenuItem[2].Value <<= Reference< XIndexContainer >();
+            aMenuItem.getArray()[2].Value <<= Reference< XIndexContainer >();
 
             m_xMenuContainer->insertByIndex( m_xMenuContainer->getCount(), 
makeAny( aMenuItem ) );
         }
@@ -642,9 +645,8 @@ void SAL_CALL OReadMenuPopupHandler::startElement(
     }
     else if ( rName == ELEMENT_MENUSEPARATOR )
     {
-        Sequence< PropertyValue > aMenuSeparator( 1 );
-        aMenuSeparator[0].Name = ITEM_DESCRIPTOR_TYPE;
-        aMenuSeparator[0].Value <<= css::ui::ItemType::SEPARATOR_LINE;
+        Sequence< PropertyValue > aMenuSeparator{ 
comphelper::makePropertyValue(
+            ITEM_DESCRIPTOR_TYPE, css::ui::ItemType::SEPARATOR_LINE) };
 
         m_xMenuContainer->insertByIndex( m_xMenuContainer->getCount(), 
makeAny( aMenuSeparator ) );
 
diff --git a/framework/source/fwe/xml/statusbardocumenthandler.cxx 
b/framework/source/fwe/xml/statusbardocumenthandler.cxx
index 16f10f157660..e04299d764d1 100644
--- a/framework/source/fwe/xml/statusbardocumenthandler.cxx
+++ b/framework/source/fwe/xml/statusbardocumenthandler.cxx
@@ -31,6 +31,7 @@
 #include <vcl/status.hxx>
 
 #include <comphelper/attributelist.hxx>
+#include <comphelper/propertyvalue.hxx>
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
@@ -374,20 +375,14 @@ void SAL_CALL OReadStatusBarDocumentHandler::startElement(
             }
             else
             {
-                Sequence< PropertyValue > aStatusbarItemProp( 6 );
-                aStatusbarItemProp[0].Name = ITEM_DESCRIPTOR_COMMANDURL;
-                aStatusbarItemProp[1].Name = ITEM_DESCRIPTOR_HELPURL;
-                aStatusbarItemProp[2].Name = ITEM_DESCRIPTOR_OFFSET;
-                aStatusbarItemProp[3].Name = ITEM_DESCRIPTOR_STYLE;
-                aStatusbarItemProp[4].Name = ITEM_DESCRIPTOR_WIDTH;
-                aStatusbarItemProp[5].Name = ITEM_DESCRIPTOR_TYPE;
-
-                aStatusbarItemProp[0].Value <<= aCommandURL;
-                aStatusbarItemProp[1].Value <<= aHelpURL;
-                aStatusbarItemProp[2].Value <<= nOffset;
-                aStatusbarItemProp[3].Value <<= nItemBits;
-                aStatusbarItemProp[4].Value <<= nWidth;
-                aStatusbarItemProp[5].Value <<= css::ui::ItemType::DEFAULT;
+                Sequence< PropertyValue > aStatusbarItemProp{
+                    comphelper::makePropertyValue(ITEM_DESCRIPTOR_COMMANDURL, 
aCommandURL),
+                    comphelper::makePropertyValue(ITEM_DESCRIPTOR_HELPURL, 
aHelpURL),
+                    comphelper::makePropertyValue(ITEM_DESCRIPTOR_OFFSET, 
nOffset),
+                    comphelper::makePropertyValue(ITEM_DESCRIPTOR_STYLE, 
nItemBits),
+                    comphelper::makePropertyValue(ITEM_DESCRIPTOR_WIDTH, 
nWidth),
+                    comphelper::makePropertyValue(ITEM_DESCRIPTOR_TYPE, 
css::ui::ItemType::DEFAULT)
+                };
 
                 m_aStatusBarItems->insertByIndex( 
m_aStatusBarItems->getCount(), makeAny( aStatusbarItemProp ) );
            }
diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx 
b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
index c5dc0f429483..4fd152a6f03e 100644
--- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx
+++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
@@ -36,6 +36,7 @@
 
 #include <comphelper/attributelist.hxx>
 #include <comphelper/propertysequence.hxx>
+#include <comphelper/propertyvalue.hxx>
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
@@ -400,12 +401,10 @@ void SAL_CALL OReadToolBoxDocumentHandler::startElement(
 
             m_bToolBarSpaceStartFound = true;
 
-            Sequence< PropertyValue > aToolbarItemProp( 2 );
-            aToolbarItemProp[0].Name = m_aCommandURL;
-            aToolbarItemProp[1].Name = m_aType;
-
-            aToolbarItemProp[0].Value <<= OUString();
-            aToolbarItemProp[1].Value <<= css::ui::ItemType::SEPARATOR_SPACE;
+            Sequence< PropertyValue > aToolbarItemProp{
+                comphelper::makePropertyValue(m_aCommandURL, OUString()),
+                comphelper::makePropertyValue(m_aType, 
css::ui::ItemType::SEPARATOR_SPACE)
+            };
 
             m_rItemContainer->insertByIndex( m_rItemContainer->getCount(), 
makeAny( aToolbarItemProp ) );
         }
@@ -424,12 +423,10 @@ void SAL_CALL OReadToolBoxDocumentHandler::startElement(
 
             m_bToolBarBreakStartFound = true;
 
-            Sequence< PropertyValue > aToolbarItemProp( 2 );
-            aToolbarItemProp[0].Name = m_aCommandURL;
-            aToolbarItemProp[1].Name = m_aType;
-
-            aToolbarItemProp[0].Value <<= OUString();
-            aToolbarItemProp[1].Value <<= 
css::ui::ItemType::SEPARATOR_LINEBREAK;
+            Sequence< PropertyValue > aToolbarItemProp{
+                comphelper::makePropertyValue(m_aCommandURL, OUString()),
+                comphelper::makePropertyValue(m_aType, 
css::ui::ItemType::SEPARATOR_LINEBREAK)
+            };
 
             m_rItemContainer->insertByIndex( m_rItemContainer->getCount(), 
makeAny( aToolbarItemProp ) );
         }
@@ -448,12 +445,10 @@ void SAL_CALL OReadToolBoxDocumentHandler::startElement(
 
             m_bToolBarSeparatorStartFound = true;
 
-            Sequence< PropertyValue > aToolbarItemProp( 2 );
-            aToolbarItemProp[0].Name = m_aCommandURL;
-            aToolbarItemProp[1].Name = m_aType;
-
-            aToolbarItemProp[0].Value <<= OUString();
-            aToolbarItemProp[1].Value <<= css::ui::ItemType::SEPARATOR_LINE;
+            Sequence< PropertyValue > aToolbarItemProp{
+                comphelper::makePropertyValue(m_aCommandURL, OUString()),
+                comphelper::makePropertyValue(m_aType, 
css::ui::ItemType::SEPARATOR_LINE)
+            };
 
             m_rItemContainer->insertByIndex( m_rItemContainer->getCount(), 
makeAny( aToolbarItemProp ) );
         }
diff --git a/framework/source/fwi/classes/converter.cxx 
b/framework/source/fwi/classes/converter.cxx
index 33af820202c9..a29c5b1271c9 100644
--- a/framework/source/fwi/classes/converter.cxx
+++ b/framework/source/fwi/classes/converter.cxx
@@ -29,10 +29,11 @@ css::uno::Sequence< css::beans::NamedValue > 
Converter::convert_seqPropVal2seqNa
 {
     sal_Int32 nCount = lSource.getLength();
     css::uno::Sequence< css::beans::NamedValue > lDestination(nCount);
+    auto lDestinationRange = asNonConstRange(lDestination);
     for (sal_Int32 nItem=0; nItem<nCount; ++nItem)
     {
-        lDestination[nItem].Name  = lSource[nItem].Name;
-        lDestination[nItem].Value = lSource[nItem].Value;
+        lDestinationRange[nItem].Name  = lSource[nItem].Name;
+        lDestinationRange[nItem].Value = lSource[nItem].Value;
     }
     return lDestination;
 }
diff --git a/framework/source/fwi/classes/protocolhandlercache.cxx 
b/framework/source/fwi/classes/protocolhandlercache.cxx
index 41aa74a02f17..7619d4323a24 100644
--- a/framework/source/fwi/classes/protocolhandlercache.cxx
+++ b/framework/source/fwi/classes/protocolhandlercache.cxx
@@ -193,13 +193,13 @@ void HandlerCFGAccess::read( HandlerHash& rHandlerHash, 
PatternHash& rPatternHas
     sal_Int32 nTargetCount = nSourceCount;
     // list of all full qualified path names of configuration entries
     css::uno::Sequence< OUString > lFullNames ( nTargetCount );
-
+    auto lFullNamesRange = asNonConstRange(lFullNames);
     // expand names to full path names
     sal_Int32 nSource=0;
     sal_Int32 nTarget=0;
     for( nSource=0; nSource<nSourceCount; ++nSource )
     {
-        lFullNames[nTarget] =
+        lFullNamesRange[nTarget] =
             SETNAME_HANDLER +
             CFG_PATH_SEPARATOR +
             lNames[nSource] +
diff --git a/framework/source/fwi/jobs/configaccess.cxx 
b/framework/source/fwi/jobs/configaccess.cxx
index bcb739c09cdb..d3ce0e5f70a1 100644
--- a/framework/source/fwi/jobs/configaccess.cxx
+++ b/framework/source/fwi/jobs/configaccess.cxx
@@ -107,8 +107,7 @@ void ConfigAccess::open( /*IN*/ EOpenMode eMode )
     aParam.Name    = "nodepath";
     aParam.Value <<= m_sRoot;
 
-    css::uno::Sequence< css::uno::Any > lParams(1);
-    lParams[0] <<= aParam;
+    css::uno::Sequence< css::uno::Any > lParams{ css::uno::Any(aParam) };
 
     // open it
     try
diff --git a/framework/source/fwi/uielement/constitemcontainer.cxx 
b/framework/source/fwi/uielement/constitemcontainer.cxx
index ef76a51e5cc0..9dee39a6e76d 100644
--- a/framework/source/fwi/uielement/constitemcontainer.cxx
+++ b/framework/source/fwi/uielement/constitemcontainer.cxx
@@ -100,7 +100,7 @@ ConstItemContainer::ConstItemContainer( const Reference< 
XIndexAccess >& rSource
                     }
 
                     if ( xIndexAccess.is() && nContainerIndex >= 0 )
-                        aPropSeq[nContainerIndex].Value <<= deepCopyContainer( 
xIndexAccess );
+                        aPropSeq.getArray()[nContainerIndex].Value <<= 
deepCopyContainer( xIndexAccess );
 
                     m_aItemVector.push_back( aPropSeq );
                 }
@@ -136,7 +136,7 @@ void ConstItemContainer::copyItemContainer( const 
std::vector< Sequence< Propert
         }
 
         if ( xIndexAccess.is() && nContainerIndex >= 0 )
-            aPropSeq[nContainerIndex].Value <<= deepCopyContainer( 
xIndexAccess );
+            aPropSeq.getArray()[nContainerIndex].Value <<= deepCopyContainer( 
xIndexAccess );
 
         m_aItemVector.push_back( aPropSeq );
     }
diff --git a/framework/source/fwi/uielement/itemcontainer.cxx 
b/framework/source/fwi/uielement/itemcontainer.cxx
index 1f690452aee2..8cee8440ee41 100644
--- a/framework/source/fwi/uielement/itemcontainer.cxx
+++ b/framework/source/fwi/uielement/itemcontainer.cxx
@@ -76,7 +76,7 @@ ItemContainer::ItemContainer( const Reference< XIndexAccess 
>& rSourceContainer,
                 }
 
                 if ( xIndexAccess.is() && nContainerIndex >= 0 )
-                    aPropSeq[nContainerIndex].Value <<= deepCopyContainer( 
xIndexAccess, rMutex );
+                    aPropSeq.getArray()[nContainerIndex].Value <<= 
deepCopyContainer( xIndexAccess, rMutex );
 
                 m_aItemVector.push_back( aPropSeq );
             }
@@ -111,7 +111,7 @@ void ItemContainer::copyItemContainer( const std::vector< 
Sequence< PropertyValu
         }
 
         if ( xIndexAccess.is() && nContainerIndex >= 0 )
-            aPropSeq[nContainerIndex].Value <<= deepCopyContainer( 
xIndexAccess, rMutex );
+            aPropSeq.getArray()[nContainerIndex].Value <<= deepCopyContainer( 
xIndexAccess, rMutex );
 
         m_aItemVector.push_back( aPropSeq );
     }
diff --git a/framework/source/fwi/uielement/rootitemcontainer.cxx 
b/framework/source/fwi/uielement/rootitemcontainer.cxx
index 480c5b23d7b9..a91742cb598e 100644
--- a/framework/source/fwi/uielement/rootitemcontainer.cxx
+++ b/framework/source/fwi/uielement/rootitemcontainer.cxx
@@ -90,7 +90,7 @@ RootItemContainer::RootItemContainer( const Reference< 
XIndexAccess >& rSourceCo
                 }
 
                 if ( xIndexAccess.is() && nContainerIndex >= 0 )
-                    aPropSeq[nContainerIndex].Value <<= deepCopyContainer( 
xIndexAccess );
+                    aPropSeq.getArray()[nContainerIndex].Value <<= 
deepCopyContainer( xIndexAccess );
 
                 m_aItemVector.push_back( aPropSeq );
             }
diff --git a/framework/source/helper/oframes.cxx 
b/framework/source/helper/oframes.cxx
index 048d5ad79b54..a58949852d43 100644
--- a/framework/source/helper/oframes.cxx
+++ b/framework/source/helper/oframes.cxx
@@ -143,18 +143,14 @@ Sequence< css::uno::Reference< XFrame > > SAL_CALL 
OFrames::queryFrames( sal_Int
                 css::uno::Reference< XFrame > xParent = xOwner->getCreator();
                 if( xParent.is() )
                 {
-                    Sequence< css::uno::Reference< XFrame > > seqParent( 1 );
-                    seqParent[0] = xParent;
-                    impl_appendSequence( seqFrames, seqParent );
+                    impl_appendSequence( seqFrames, { xParent } );
                 }
             }
 
             // Add owner to list if SELF is searched.
             if( nSearchFlags & FrameSearchFlag::SELF )
             {
-                Sequence< css::uno::Reference< XFrame > > seqSelf( 1 );
-                seqSelf[0] = xOwner;
-                impl_appendSequence( seqFrames, seqSelf );
+                impl_appendSequence( seqFrames, { xOwner } );
             }
 
             // Add SIBLINGS to list.
diff --git a/framework/source/jobs/job.cxx b/framework/source/jobs/job.cxx
index 81203f3afcfc..39b867ac3291 100644
--- a/framework/source/jobs/job.cxx
+++ b/framework/source/jobs/job.cxx
@@ -336,30 +336,36 @@ css::uno::Sequence< css::beans::NamedValue > 
Job::impl_generateJobArgs( /*IN*/ c
 
     // Create list of environment variables. This list must be part of the
     // returned structure every time... but some of its members are optional!
-    css::uno::Sequence< css::beans::NamedValue > lEnvArgs(1);
-    lEnvArgs[0].Name = "EnvType";
-    lEnvArgs[0].Value <<= m_aJobCfg.getEnvironmentDescriptor();
+    sal_Int32 nLen = 1;
+    if (m_xFrame.is())
+        ++nLen;
+    if (m_xModel.is())
+        ++nLen;
+    if (eMode==JobData::E_EVENT)
+        ++nLen;
+    css::uno::Sequence< css::beans::NamedValue > lEnvArgs(nLen);
+    auto plEnvArgs = lEnvArgs.getArray();
+    plEnvArgs[0].Name = "EnvType";
+    plEnvArgs[0].Value <<= m_aJobCfg.getEnvironmentDescriptor();
 
+    sal_Int32 i = 0;
     if (m_xFrame.is())
     {
-        sal_Int32 c = lEnvArgs.getLength();
-        lEnvArgs.realloc(c+1);
-        lEnvArgs[c].Name = "Frame";
-        lEnvArgs[c].Value <<= m_xFrame;
+        ++i;
+        plEnvArgs[i].Name = "Frame";
+        plEnvArgs[i].Value <<= m_xFrame;
     }
     if (m_xModel.is())
     {
-        sal_Int32 c = lEnvArgs.getLength();
-        lEnvArgs.realloc(c+1);
-        lEnvArgs[c].Name = "Model";
-        lEnvArgs[c].Value <<= m_xModel;
+        ++i;
+        plEnvArgs[i].Name = "Model";
+        plEnvArgs[i].Value <<= m_xModel;
     }
     if (eMode==JobData::E_EVENT)
     {
-        sal_Int32 c = lEnvArgs.getLength();
-        lEnvArgs.realloc(c+1);
-        lEnvArgs[c].Name = "EventName";
-        lEnvArgs[c].Value <<= m_aJobCfg.getEvent();
+        ++i;
+        plEnvArgs[i].Name = "EventName";
+        plEnvArgs[i].Value <<= m_aJobCfg.getEvent();
     }
 
     // get the configuration data from the job data container ... if possible
@@ -381,29 +387,33 @@ css::uno::Sequence< css::beans::NamedValue > 
Job::impl_generateJobArgs( /*IN*/ c
     {
         sal_Int32 nLength = lAllArgs.getLength();
         lAllArgs.realloc(nLength+1);
-        lAllArgs[nLength].Name = "Config";
-        lAllArgs[nLength].Value <<= lConfigArgs;
+        auto plAllArgs = lAllArgs.getArray();
+        plAllArgs[nLength].Name = "Config";
+        plAllArgs[nLength].Value <<= lConfigArgs;
     }
     if (!lJobConfigArgs.empty())
     {
         sal_Int32 nLength = lAllArgs.getLength();
         lAllArgs.realloc(nLength+1);
-        lAllArgs[nLength].Name = "JobConfig";
-        lAllArgs[nLength].Value <<= 
comphelper::containerToSequence(lJobConfigArgs);
+        auto plAllArgs = lAllArgs.getArray();
+        plAllArgs[nLength].Name = "JobConfig";
+        plAllArgs[nLength].Value <<= 
comphelper::containerToSequence(lJobConfigArgs);
     }
     if (lEnvArgs.hasElements())
     {
         sal_Int32 nLength = lAllArgs.getLength();
         lAllArgs.realloc(nLength+1);
-        lAllArgs[nLength].Name = "Environment";
-        lAllArgs[nLength].Value <<= lEnvArgs;
+        auto plAllArgs = lAllArgs.getArray();
+        plAllArgs[nLength].Name = "Environment";
+        plAllArgs[nLength].Value <<= lEnvArgs;
     }
     if (lDynamicArgs.hasElements())
     {
         sal_Int32 nLength = lAllArgs.getLength();
         lAllArgs.realloc(nLength+1);
-        lAllArgs[nLength].Name = "DynamicData";
-        lAllArgs[nLength].Value <<= lDynamicArgs;
+        auto plAllArgs = lAllArgs.getArray();
+        plAllArgs[nLength].Name = "DynamicData";
+        plAllArgs[nLength].Value <<= lDynamicArgs;
     }
 
     return lAllArgs;
diff --git a/framework/source/jobs/jobdata.cxx 
b/framework/source/jobs/jobdata.cxx
index a516abdadd7c..974f2630fe84 100644
--- a/framework/source/jobs/jobdata.cxx
+++ b/framework/source/jobs/jobdata.cxx
@@ -252,12 +252,14 @@ void JobData::setJobConfig( std::vector< 
css::beans::NamedValue >&& lArguments )
     {
         sal_Int32                             nCount = m_lArguments.size();
         css::uno::Sequence< OUString > lNames (nCount);
+        auto lNamesRange = asNonConstRange(lNames);
         css::uno::Sequence< css::uno::Any >   lValues(nCount);
+        auto lValuesRange = asNonConstRange(lValues);
 
         for (sal_Int32 i=0; i<nCount; ++i)
         {
-            lNames [i] = m_lArguments[i].Name;
-            lValues[i] = m_lArguments[i].Value;
+            lNamesRange [i] = m_lArguments[i].Name;
+            lValuesRange[i] = m_lArguments[i].Value;
         }
 
         xArgumentList->setHierarchicalPropertyValues(lNames, lValues);
@@ -341,20 +343,9 @@ css::uno::Sequence< css::beans::NamedValue > 
JobData::getConfig() const
     css::uno::Sequence< css::beans::NamedValue > lConfig;
     if (m_eMode==E_ALIAS)
     {
-        lConfig.realloc(3);
-        sal_Int32 i = 0;
-
-        lConfig[i].Name = "Alias";
-        lConfig[i].Value <<= m_sAlias;
-        ++i;
-
-        lConfig[i].Name = "Service";
-        lConfig[i].Value <<= m_sService;
-        ++i;
-
-        lConfig[i].Name = "Context";
-        lConfig[i].Value <<= m_sContext;
-        ++i;
+        lConfig = { { "Alias", css::uno::Any(m_sAlias) },
+                    { "Service", css::uno::Any(m_sService) },
+                    { "Context", css::uno::Any(m_sContext) } };
     }
     return lConfig;
 }
diff --git a/framework/source/jobs/jobdispatch.cxx 
b/framework/source/jobs/jobdispatch.cxx
index c07727d017e7..e32f65123375 100644
--- a/framework/source/jobs/jobdispatch.cxx
+++ b/framework/source/jobs/jobdispatch.cxx
@@ -226,9 +226,9 @@ css::uno::Sequence< css::uno::Reference< 
css::frame::XDispatch > > SAL_CALL JobD
     // don't pack resulting list!
     sal_Int32 nCount = lDescriptor.getLength();
     css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > 
lDispatches(nCount);
-
+    auto lDispatchesRange = asNonConstRange(lDispatches);
     for (sal_Int32 i=0; i<nCount; ++i)
-        lDispatches[i] = queryDispatch( lDescriptor[i].FeatureURL  ,
+        lDispatchesRange[i] = queryDispatch( lDescriptor[i].FeatureURL  ,
                                         lDescriptor[i].FrameName   ,
                                         lDescriptor[i].SearchFlags );
     return lDispatches;
diff --git a/framework/source/layoutmanager/helpers.cxx 
b/framework/source/layoutmanager/helpers.cxx
index f9b319f4e19e..494281f16e5e 100644
--- a/framework/source/layoutmanager/helpers.cxx
+++ b/framework/source/layoutmanager/helpers.cxx
@@ -29,6 +29,7 @@
 #include <com/sun/star/ui/XUIElement.hpp>
 
 #include <comphelper/lok.hxx>
+#include <comphelper/propertyvalue.hxx>
 #include <unotools/mediadescriptor.hxx>
 #include <vcl/svapp.hxx>
 #include <toolkit/helper/vclunohelper.hxx>
@@ -297,9 +298,8 @@ void impl_setDockingWindowVisibility( const 
css::uno::Reference< css::uno::XComp
 
     OUString aDockWinArgName = "DockingWindow" + OUString::number( nIndex );
 
-    css::uno::Sequence< css::beans::PropertyValue > aArgs(1);
-    aArgs[0].Name  = aDockWinArgName;
-    aArgs[0].Value <<= bVisible;
+    css::uno::Sequence< css::beans::PropertyValue > aArgs{ 
comphelper::makePropertyValue(
+        aDockWinArgName, bVisible) };
 
     css::uno::Reference< css::frame::XDispatchHelper > xDispatcher = 
css::frame::DispatchHelper::create( rxContext );
 
diff --git a/framework/source/layoutmanager/layoutmanager.cxx 
b/framework/source/layoutmanager/layoutmanager.cxx
index bed044cc5523..e02f57e4345e 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -51,6 +51,7 @@
 #include <com/sun/star/util/URLTransformer.hpp>
 
 #include <comphelper/lok.hxx>
+#include <comphelper/propertyvalue.hxx>
 #include <vcl/status.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/window.hxx>
@@ -672,28 +673,21 @@ void LayoutManager::implts_writeWindowStateData( const 
OUString& aName, const UI
 
     try
     {
-        Sequence< PropertyValue > aWindowState( 8 );
-
-        aWindowState[0].Name  = WINDOWSTATE_PROPERTY_DOCKED;
-        aWindowState[0].Value <<= !rElementData.m_bFloating;
-        aWindowState[1].Name  = WINDOWSTATE_PROPERTY_VISIBLE;
-        aWindowState[1].Value <<= rElementData.m_bVisible;
-
-        aWindowState[2].Name  = WINDOWSTATE_PROPERTY_DOCKINGAREA;
-        aWindowState[2].Value <<= rElementData.m_aDockedData.m_nDockedArea;
-
-        aWindowState[3].Name = WINDOWSTATE_PROPERTY_DOCKPOS;
-        aWindowState[3].Value <<= rElementData.m_aDockedData.m_aPos;
-
-        aWindowState[4].Name = WINDOWSTATE_PROPERTY_POS;
-        aWindowState[4].Value <<= rElementData.m_aFloatingData.m_aPos;
-
-        aWindowState[5].Name  = WINDOWSTATE_PROPERTY_SIZE;
-        aWindowState[5].Value <<= rElementData.m_aFloatingData.m_aSize;
-        aWindowState[6].Name  = WINDOWSTATE_PROPERTY_UINAME;
-        aWindowState[6].Value <<= rElementData.m_aUIName;
-        aWindowState[7].Name  = WINDOWSTATE_PROPERTY_LOCKED;
-        aWindowState[7].Value <<= rElementData.m_aDockedData.m_bLocked;
+        Sequence< PropertyValue > aWindowState{
+            comphelper::makePropertyValue(WINDOWSTATE_PROPERTY_DOCKED, 
!rElementData.m_bFloating),
+            comphelper::makePropertyValue(WINDOWSTATE_PROPERTY_VISIBLE, 
rElementData.m_bVisible),
+            comphelper::makePropertyValue(WINDOWSTATE_PROPERTY_DOCKINGAREA,
+                                          
rElementData.m_aDockedData.m_nDockedArea),
+            comphelper::makePropertyValue(WINDOWSTATE_PROPERTY_DOCKPOS,
+                                          rElementData.m_aDockedData.m_aPos),
+            comphelper::makePropertyValue(WINDOWSTATE_PROPERTY_POS,
+                                          rElementData.m_aFloatingData.m_aPos),
+            comphelper::makePropertyValue(WINDOWSTATE_PROPERTY_SIZE,
+                                          
rElementData.m_aFloatingData.m_aSize),
+            comphelper::makePropertyValue(WINDOWSTATE_PROPERTY_UINAME, 
rElementData.m_aUIName),
+            comphelper::makePropertyValue(WINDOWSTATE_PROPERTY_LOCKED,
+                                          rElementData.m_aDockedData.m_bLocked)
+        };
 
         if ( xPersistentWindowState->hasByName( aName ))
         {
@@ -730,11 +724,8 @@ Reference< XUIElement > 
LayoutManager::implts_createElement( const OUString& aNa
     Reference< ui::XUIElement > xUIElement;
 
     SolarMutexGuard g;
-    Sequence< PropertyValue > aPropSeq( 2 );
-    aPropSeq[0].Name = "Frame";
-    aPropSeq[0].Value <<= m_xFrame;
-    aPropSeq[1].Name = "Persistent";
-    aPropSeq[1].Value <<= true;
+    Sequence< PropertyValue > aPropSeq{ comphelper::makePropertyValue("Frame", 
m_xFrame),
+                                        
comphelper::makePropertyValue("Persistent", true) };
 
     try
     {
@@ -1681,10 +1672,11 @@ Sequence< Reference< ui::XUIElement > > SAL_CALL 
LayoutManager::getElements()
     }
 
     aSeq.realloc(nSize);
+    auto pSeq = aSeq.getArray();
     if ( nMenuBarIndex >= 0 )
-        aSeq[nMenuBarIndex] = xMenuBar;
+        pSeq[nMenuBarIndex] = xMenuBar;
     if ( nStatusBarIndex >= 0 )
-        aSeq[nStatusBarIndex] = xStatusBar;
+        pSeq[nStatusBarIndex] = xStatusBar;
 
     return aSeq;
 }
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx 
b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 97e8e75e5b29..c190b1a40f23 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -33,6 +33,7 @@
 #include <com/sun/star/ui/XUIElementSettings.hpp>
 #include <com/sun/star/ui/XUIFunctionListener.hpp>
 
+#include <comphelper/propertyvalue.hxx>
 #include <cppuhelper/queryinterface.hxx>
 #include <o3tl/string_view.hxx>
 #include <unotools/cmdoptions.hxx>
@@ -450,11 +451,10 @@ bool ToolbarLayoutManager::createToolbar( const OUString& 
rResourceURL )
     {
         uno::Reference< ui::XUIElement > xUIElement;
 
-        uno::Sequence< beans::PropertyValue > aPropSeq( 2 );
-        aPropSeq[0].Name = "Frame";
-        aPropSeq[0].Value <<= xFrame;
-        aPropSeq[1].Name = "Persistent";
-        aPropSeq[1].Value <<= true;
+        uno::Sequence< beans::PropertyValue > aPropSeq{
+            comphelper::makePropertyValue("Frame", xFrame),
+            comphelper::makePropertyValue("Persistent", true)
+        };
         uno::Reference<ui::XUIElementFactory> xUIElementFactory;
         {
             SolarMutexGuard aReadLock;
@@ -1080,15 +1080,16 @@ void ToolbarLayoutManager::implts_createAddonsToolBars()
     sal_uInt32 nCount = m_pAddonOptions->GetAddonsToolBarCount();
 
     uno::Sequence< beans::PropertyValue > aPropSeq( 2 );
-    aPropSeq[0].Name = "Frame";
-    aPropSeq[0].Value <<= xFrame;
-    aPropSeq[1].Name = "ConfigurationData";
+    auto pPropSeq = aPropSeq.getArray();
+    pPropSeq[0].Name = "Frame";
+    pPropSeq[0].Value <<= xFrame;
+    pPropSeq[1].Name = "ConfigurationData";
     for ( sal_uInt32 i = 0; i < nCount; i++ )
     {
         OUString aAddonToolBarName( "private:resource/toolbar/addon_" +
                 m_pAddonOptions->GetAddonsToolbarResourceName(i) );
         aAddonToolBarData = m_pAddonOptions->GetAddonsToolBarPart( i );

... etc. - the rest is truncated

Reply via email to