From 96c26b0d9d10fa9bac3695222980d7145f0342d7 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 15 Nov 2015 13:17:00 +0200 Subject: use initialiser for Sequence using variations of: git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)' | xargs perl -0777 -pi -e "s/Sequence (\w+)\(1\)\; \s*OUString\* pArray.*; .*\[0\]\s*=\s*(\S+)\;/Sequence \1 { \2 };/g" Change-Id: I03c64334ff30ee14dce0d17b67f5122a3893bbe3 Reviewed-on: https://gerrit.libreoffice.org/19971 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- framework/source/uielement/popuptoolbarcontroller.cxx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'framework/source/uielement/popuptoolbarcontroller.cxx') diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx index 7b36967650b8..cdf07a17279a 100644 --- a/framework/source/uielement/popuptoolbarcontroller.cxx +++ b/framework/source/uielement/popuptoolbarcontroller.cxx @@ -284,9 +284,7 @@ sal_Bool WizardsToolbarController::supportsService(OUString const & rServiceName css::uno::Sequence WizardsToolbarController::getSupportedServiceNames() throw (css::uno::RuntimeException) { - css::uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.frame.ToolbarController"; + css::uno::Sequence aRet { "com.sun.star.frame.ToolbarController" }; return aRet; } @@ -329,9 +327,7 @@ sal_Bool OpenToolbarController::supportsService(OUString const & rServiceName) css::uno::Sequence OpenToolbarController::getSupportedServiceNames() throw (css::uno::RuntimeException) { - css::uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.frame.ToolbarController"; + css::uno::Sequence aRet { "com.sun.star.frame.ToolbarController" }; return aRet; } @@ -381,9 +377,7 @@ sal_Bool NewToolbarController::supportsService(OUString const & rServiceName) css::uno::Sequence NewToolbarController::getSupportedServiceNames() throw (css::uno::RuntimeException) { - css::uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.frame.ToolbarController"; + css::uno::Sequence aRet { "com.sun.star.frame.ToolbarController" }; return aRet; } -- cgit v1.2.3