diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-10-29 09:27:05 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-10-30 17:39:47 +0200 |
commit | 471f5ab323c5676ca22358ca67f4e6820b7e071c (patch) | |
tree | fc66276831a6bf9397d1235d306d81321682b417 /desktop/source/app/appinit.cxx | |
parent | 7ba7c1128f469ee5631f3221f6c468ed24c04b98 (diff) |
Prepare for removal of non-const operator[] from Sequence in desktop
Change-Id: I76959f62d46e12d984fe4c7be74e5857399e9126
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124358
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'desktop/source/app/appinit.cxx')
-rw-r--r-- | desktop/source/app/appinit.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx index cff0a684cfcf..bc4af1c681b8 100644 --- a/desktop/source/app/appinit.cxx +++ b/desktop/source/app/appinit.cxx @@ -136,9 +136,7 @@ void Desktop::createAcceptor(const OUString& aAcceptString) if (pIter != rMap.end() ) return; - Sequence< Any > aSeq( 2 ); - aSeq[0] <<= aAcceptString; - aSeq[1] <<= bAccept; + Sequence< Any > aSeq{ Any(aAcceptString), Any(bAccept) }; Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext(); Reference<XInitialization> rAcceptor( xContext->getServiceManager()->createInstanceWithContext("com.sun.star.office.Acceptor", xContext), @@ -169,11 +167,9 @@ namespace { class enable { private: - Sequence<Any> m_aSeq; + Sequence<Any> m_aSeq{ Any(true) }; public: - enable() : m_aSeq(1) { - m_aSeq[0] <<= true; - } + enable() = default; void operator() (const AcceptorMap::value_type& val) { if (val.second.is()) { val.second->initialize(m_aSeq); |