summaryrefslogtreecommitdiff
path: root/framework
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 /framework
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 'framework')
-rw-r--r--framework/source/dispatch/popupmenudispatcher.cxx3
-rw-r--r--framework/source/fwe/classes/actiontriggerpropertyset.cxx3
-rw-r--r--framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx3
-rw-r--r--framework/source/fwe/classes/addonsoptions.cxx3
-rw-r--r--framework/source/services/substitutepathvars.cxx6
-rw-r--r--framework/source/uielement/subtoolbarcontroller.cxx3
-rw-r--r--framework/source/uielement/thesaurusmenucontroller.cxx3
7 files changed, 8 insertions, 16 deletions
diff --git a/framework/source/dispatch/popupmenudispatcher.cxx b/framework/source/dispatch/popupmenudispatcher.cxx
index c53e5ed54d35..3723f324f77f 100644
--- a/framework/source/dispatch/popupmenudispatcher.cxx
+++ b/framework/source/dispatch/popupmenudispatcher.cxx
@@ -91,8 +91,7 @@ css::uno::Sequence< OUString > SAL_CALL PopupMenuDispatcher::getSupportedService
css::uno::Sequence< OUString > PopupMenuDispatcher::impl_getStaticSupportedServiceNames()
{
- css::uno::Sequence< OUString > seqServiceNames( 1 );
- seqServiceNames.getArray() [0] = SERVICENAME_PROTOCOLHANDLER;
+ css::uno::Sequence<OUString> seqServiceNames { SERVICENAME_PROTOCOLHANDLER };
return seqServiceNames;
}
diff --git a/framework/source/fwe/classes/actiontriggerpropertyset.cxx b/framework/source/fwe/classes/actiontriggerpropertyset.cxx
index acfe55be90e2..969bab6e73ff 100644
--- a/framework/source/fwe/classes/actiontriggerpropertyset.cxx
+++ b/framework/source/fwe/classes/actiontriggerpropertyset.cxx
@@ -112,8 +112,7 @@ throw ( RuntimeException, std::exception )
Sequence< OUString > SAL_CALL ActionTriggerPropertySet::getSupportedServiceNames()
throw ( RuntimeException, std::exception )
{
- Sequence< OUString > seqServiceNames( 1 );
- seqServiceNames[0] = SERVICENAME_ACTIONTRIGGER;
+ Sequence<OUString> seqServiceNames { SERVICENAME_ACTIONTRIGGER };
return seqServiceNames;
}
diff --git a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx
index be02ec2b1bc7..20cf8aabdf7f 100644
--- a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx
+++ b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx
@@ -105,8 +105,7 @@ throw ( RuntimeException, std::exception )
Sequence< OUString > SAL_CALL ActionTriggerSeparatorPropertySet::getSupportedServiceNames()
throw ( RuntimeException, std::exception )
{
- Sequence< OUString > seqServiceNames( 1 );
- seqServiceNames[0] = SERVICENAME_ACTIONTRIGGERSEPARATOR;
+ Sequence<OUString> seqServiceNames { SERVICENAME_ACTIONTRIGGERSEPARATOR };
return seqServiceNames;
}
diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx
index b64cc898f984..ee5af2e0d8cb 100644
--- a/framework/source/fwe/classes/addonsoptions.cxx
+++ b/framework/source/fwe/classes/addonsoptions.cxx
@@ -369,8 +369,7 @@ AddonsOptions_Impl::AddonsOptions_Impl()
// Enable notification mechanism of our baseclass.
// We need it to get information about changes outside these class on our used configuration keys!
- Sequence< OUString > aNotifySeq( 1 );
- aNotifySeq[0] = "AddonUI";
+ Sequence<OUString> aNotifySeq { "AddonUI" };
EnableNotification( aNotifySeq );
}
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index 2046631b0e0b..7ddb1648817a 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -402,8 +402,7 @@ SubstitutePathVariables_Impl::SubstitutePathVariables_Impl() :
{
// Enable notification mechanism
// We need it to get information about changes outside these class on our configuration branch
- Sequence< OUString > aNotifySeq( 1 );
- aNotifySeq[0] = "SharePoints";
+ Sequence<OUString> aNotifySeq { "SharePoints" };
EnableNotification( aNotifySeq, true );
}
@@ -656,8 +655,7 @@ void SubstitutePathVariables_Impl::ReadSharePointRuleSetFromConfiguration(
aDirProperty += m_aDirPropertyName;
// Read only the directory property
- Sequence< OUString > aDirPropertySeq( 1 );
- aDirPropertySeq[0] = aDirProperty;
+ Sequence<OUString> aDirPropertySeq { aDirProperty };
Sequence< Any > aValueSeq = GetProperties( aDirPropertySeq );
if ( aValueSeq.getLength() == 1 )
diff --git a/framework/source/uielement/subtoolbarcontroller.cxx b/framework/source/uielement/subtoolbarcontroller.cxx
index 4588c6a311da..c548afa0ab68 100644
--- a/framework/source/uielement/subtoolbarcontroller.cxx
+++ b/framework/source/uielement/subtoolbarcontroller.cxx
@@ -450,8 +450,7 @@ sal_Bool SubToolBarController::supportsService( const OUString& rServiceName )
css::uno::Sequence< OUString > SubToolBarController::getSupportedServiceNames()
throw ( css::uno::RuntimeException )
{
- css::uno::Sequence< OUString > aRet( 1 );
- aRet[0] = "com.sun.star.frame.ToolbarController";
+ css::uno::Sequence<OUString> aRet { "com.sun.star.frame.ToolbarController" };
return aRet;
}
diff --git a/framework/source/uielement/thesaurusmenucontroller.cxx b/framework/source/uielement/thesaurusmenucontroller.cxx
index b9457d72e1c9..8c1111b94869 100644
--- a/framework/source/uielement/thesaurusmenucontroller.cxx
+++ b/framework/source/uielement/thesaurusmenucontroller.cxx
@@ -202,8 +202,7 @@ OUString ThesaurusMenuController::getImplementationName()
css::uno::Sequence< OUString > ThesaurusMenuController::getSupportedServiceNames()
throw ( css::uno::RuntimeException, std::exception )
{
- css::uno::Sequence< OUString > aRet( 1 );
- aRet[0] = "com.sun.star.frame.PopupMenuController";
+ css::uno::Sequence<OUString> aRet { "com.sun.star.frame.PopupMenuController" };
return aRet;
}