summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-11-15 12:22:28 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-11-15 12:18:55 +0000
commit25aec383f95fded43b3fe5fc588b4ebdc6d7d272 (patch)
tree846cce228d7ff120abc40b7767b251c2e04b2a30 /svtools
parent35f5833ca35dc170b67ed9f8e288302eb06eb972 (diff)
use initialiser for Sequence<OUString>
replaced using: git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)' | xargs perl -0777 -pi -e "s/Sequence<\s*OUString\s*> (\w+)\(\s*1\s*\); .*\[0\] = (\S+);/Sequence<OUString> \1 { \2 };/g" Change-Id: I20ad0489da887a9712982531c3b127339bb8b3b9 Reviewed-on: https://gerrit.libreoffice.org/19969 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/dialogs/ServerDetailsControls.cxx6
-rw-r--r--svtools/source/uno/contextmenuhelper.cxx3
2 files changed, 3 insertions, 6 deletions
diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx
index dc84d71146f0..3529de24fbd7 100644
--- a/svtools/source/dialogs/ServerDetailsControls.cxx
+++ b/svtools/source/dialogs/ServerDetailsControls.cxx
@@ -440,8 +440,7 @@ IMPL_LINK_NOARG_TYPED( CmisDetailsContainer, RefreshReposHdl, Button*, void )
InteractionHandler::createWithParent( xContext, nullptr ),
UNO_QUERY );
- Sequence< OUString > aPasswd( 1 );
- aPasswd[0] = m_sPassword;
+ Sequence<OUString> aPasswd { m_sPassword };
xMasterPasswd->add(
sUrl, m_sUsername, aPasswd, xInteractionHandler );
@@ -452,8 +451,7 @@ IMPL_LINK_NOARG_TYPED( CmisDetailsContainer, RefreshReposHdl, Button*, void )
// Get the Content
::ucbhelper::Content aCnt( sUrl, m_xCmdEnv, comphelper::getProcessComponentContext() );
- Sequence< OUString > aProps( 1 );
- aProps[0] = "Title";
+ Sequence<OUString> aProps { "Title" };
try
{
diff --git a/svtools/source/uno/contextmenuhelper.cxx b/svtools/source/uno/contextmenuhelper.cxx
index 3ea93dbd90e7..3ae2b5b10129 100644
--- a/svtools/source/uno/contextmenuhelper.cxx
+++ b/svtools/source/uno/contextmenuhelper.cxx
@@ -462,8 +462,7 @@ ContextMenuHelper::getImageFromCommandURL( const OUString& aCmdURL ) const
ui::ImageType::SIZE_DEFAULT );
uno::Sequence< uno::Reference< graphic::XGraphic > > aGraphicSeq;
- uno::Sequence< OUString > aImageCmdSeq( 1 );
- aImageCmdSeq[0] = aCmdURL;
+ uno::Sequence<OUString> aImageCmdSeq { aCmdURL };
if ( m_xDocImageMgr.is() )
{