diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-11-15 13:17:00 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-15 12:20:39 +0000 |
commit | 96c26b0d9d10fa9bac3695222980d7145f0342d7 (patch) | |
tree | d2d2b4e60e8ec98ff4025abfad42be06d29b3c13 /sw/source/uibase/uno | |
parent | 25aec383f95fded43b3fe5fc588b4ebdc6d7d272 (diff) |
use initialiser for Sequence<OUString>
using variations of:
git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)' | xargs perl -0777 -pi -e "s/Sequence<OUString> (\w+)\(1\)\;
\s*OUString\* pArray.*;
.*\[0\]\s*=\s*(\S+)\;/Sequence<OUString> \1 { \2 };/g"
Change-Id: I03c64334ff30ee14dce0d17b67f5122a3893bbe3
Reviewed-on: https://gerrit.libreoffice.org/19971
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw/source/uibase/uno')
-rw-r--r-- | sw/source/uibase/uno/unoatxt.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/uno/unomod.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 4 |
3 files changed, 5 insertions, 15 deletions
diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx index ddba7056014b..e9d2fe53dc86 100644 --- a/sw/source/uibase/uno/unoatxt.cxx +++ b/sw/source/uibase/uno/unoatxt.cxx @@ -691,9 +691,7 @@ sal_Bool SwXAutoTextGroup::supportsService(const OUString& rServiceName) throw( uno::Sequence< OUString > SwXAutoTextGroup::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.AutoTextGroup"; + uno::Sequence<OUString> aRet { "com.sun.star.text.AutoTextGroup" }; return aRet; } @@ -974,9 +972,7 @@ sal_Bool SwXAutoTextEntry::supportsService(const OUString& rServiceName) throw( uno::Sequence< OUString > SwXAutoTextEntry::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.AutoTextEntry"; + uno::Sequence<OUString> aRet { "com.sun.star.text.AutoTextEntry" }; return aRet; } diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx index 31114c711d52..33281bab84e3 100644 --- a/sw/source/uibase/uno/unomod.cxx +++ b/sw/source/uibase/uno/unomod.cxx @@ -533,9 +533,7 @@ sal_Bool SwXPrintSettings::supportsService(const OUString& rServiceName) throw( Sequence< OUString > SwXPrintSettings::getSupportedServiceNames() throw( RuntimeException, std::exception ) { - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.PrintSettings"; + Sequence<OUString> aRet { "com.sun.star.text.PrintSettings" }; return aRet; } @@ -997,9 +995,7 @@ sal_Bool SwXViewSettings::supportsService(const OUString& rServiceName) throw( R Sequence< OUString > SwXViewSettings::getSupportedServiceNames() throw( RuntimeException, std::exception ) { - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.ViewSettings"; + Sequence<OUString> aRet { "com.sun.star.text.ViewSettings" }; return aRet; } diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 094e374d0e16..546d3c40e0e5 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -4136,9 +4136,7 @@ sal_Bool SwXOutlineTarget::supportsService(const OUString& ServiceName) throw( R Sequence< OUString > SwXOutlineTarget::getSupportedServiceNames() throw( RuntimeException, std::exception ) { - Sequence < OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.document.LinkTarget"; + Sequence<OUString> aRet { "com.sun.star.document.LinkTarget" }; return aRet; } |