summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore/unocoll.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-11-15 13:17:00 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-11-15 12:20:39 +0000
commit96c26b0d9d10fa9bac3695222980d7145f0342d7 (patch)
treed2d2b4e60e8ec98ff4025abfad42be06d29b3c13 /sw/source/core/unocore/unocoll.cxx
parent25aec383f95fded43b3fe5fc588b4ebdc6d7d272 (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/core/unocore/unocoll.cxx')
-rw-r--r--sw/source/core/unocore/unocoll.cxx24
1 files changed, 6 insertions, 18 deletions
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index acc29c675099..107a1f1622c1 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -1306,9 +1306,7 @@ sal_Bool SwXTextFrames::supportsService(const OUString& rServiceName) throw( Run
Sequence< OUString > SwXTextFrames::getSupportedServiceNames() throw( RuntimeException, std::exception )
{
- Sequence< OUString > aRet(1);
- OUString* pArray = aRet.getArray();
- pArray[0] = "com.sun.star.text.TextFrames";
+ Sequence<OUString> aRet { "com.sun.star.text.TextFrames" };
return aRet;
}
@@ -1333,9 +1331,7 @@ sal_Bool SwXTextGraphicObjects::supportsService(const OUString& rServiceName) th
Sequence< OUString > SwXTextGraphicObjects::getSupportedServiceNames() throw( RuntimeException, std::exception )
{
- Sequence< OUString > aRet(1);
- OUString* pArray = aRet.getArray();
- pArray[0] = "com.sun.star.text.TextGraphicObjects";
+ Sequence<OUString> aRet { "com.sun.star.text.TextGraphicObjects" };
return aRet;
}
@@ -1360,9 +1356,7 @@ sal_Bool SwXTextEmbeddedObjects::supportsService(const OUString& rServiceName) t
Sequence< OUString > SwXTextEmbeddedObjects::getSupportedServiceNames() throw( RuntimeException, std::exception )
{
- Sequence< OUString > aRet(1);
- OUString* pArray = aRet.getArray();
- pArray[0] = "com.sun.star.text.TextEmbeddedObjects";
+ Sequence<OUString> aRet { "com.sun.star.text.TextEmbeddedObjects" };
return aRet;
}
@@ -1387,9 +1381,7 @@ sal_Bool SwXTextSections::supportsService(const OUString& rServiceName) throw( R
Sequence< OUString > SwXTextSections::getSupportedServiceNames() throw( RuntimeException, std::exception )
{
- Sequence< OUString > aRet(1);
- OUString* pArray = aRet.getArray();
- pArray[0] = "com.sun.star.text.TextSections";
+ Sequence<OUString> aRet { "com.sun.star.text.TextSections" };
return aRet;
}
@@ -1782,9 +1774,7 @@ sal_Bool SwXFootnotes::supportsService(const OUString& rServiceName) throw( Runt
Sequence< OUString > SwXFootnotes::getSupportedServiceNames() throw( RuntimeException, std::exception )
{
- Sequence< OUString > aRet(1);
- OUString* pArray = aRet.getArray();
- pArray[0] = "com.sun.star.text.Footnotes";
+ Sequence<OUString> aRet { "com.sun.star.text.Footnotes" };
return aRet;
}
@@ -1882,9 +1872,7 @@ sal_Bool SwXReferenceMarks::supportsService(const OUString& rServiceName) throw(
Sequence< OUString > SwXReferenceMarks::getSupportedServiceNames() throw( RuntimeException, std::exception )
{
- Sequence< OUString > aRet(1);
- OUString* pArray = aRet.getArray();
- pArray[0] = "com.sun.star.text.ReferenceMarks";
+ Sequence<OUString> aRet { "com.sun.star.text.ReferenceMarks" };
return aRet;
}