summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2021-06-11 16:02:26 +0200
committerJulien Nabet <serval2412@yahoo.fr>2021-06-11 18:55:00 +0200
commitc384c7d7ae39495a9cfd55c3d610133f97db1304 (patch)
tree5eff416f473c8f2f68299b0d1cc8c32e829faba1 /sfx2
parent8d3e7b2f5836106eac5172d8f4868bb540d652e6 (diff)
Simplify Sequence/vector initializations
Change-Id: Ib02e25b4600666185cf0f8d0cc8d5c64186789c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117064 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/appopen.cxx5
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx4
2 files changed, 2 insertions, 7 deletions
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 03a94e0811b1..08431c29eaaa 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -866,11 +866,8 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
else
{
// check for "internal" protocols that should not be forwarded to the system
- std::vector < OUString > aProtocols(2);
-
// add special protocols that always should be treated as internal
- aProtocols[0] = "private:*";
- aProtocols[1] = "vnd.sun.star.*";
+ std::vector < OUString > aProtocols { "private:*", "vnd.sun.star.*" };
// get registered protocol handlers from configuration
Reference < XNameAccess > xAccess(officecfg::Office::ProtocolHandler::HandlerSet::get());
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 35e4bd106635..c95c068463cd 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -3876,9 +3876,7 @@ void SfxBaseModel::impl_getPrintHelper()
return;
m_pData->m_xPrintable = new SfxPrintHelper();
Reference < lang::XInitialization > xInit( m_pData->m_xPrintable, UNO_QUERY );
- Sequence < Any > aValues(1);
- aValues[0] <<= Reference < frame::XModel > (static_cast< frame::XModel* >(this), UNO_QUERY );
- xInit->initialize( aValues );
+ xInit->initialize( { Any(Reference < frame::XModel > (static_cast< frame::XModel* >(this), UNO_QUERY )) } );
Reference < view::XPrintJobBroadcaster > xBrd( m_pData->m_xPrintable, UNO_QUERY );
xBrd->addPrintJobListener( new SfxPrintHelperListener_Impl( m_pData.get() ) );
}