diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-11-15 12:17:19 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-15 11:31:23 +0000 |
commit | 54d22957bc241fc5867fa1c720cf1266133e4e90 (patch) | |
tree | a94c9008ccbe953226a479a875e01119d77d9402 /io | |
parent | 8e234c5b7d5bae66c544e581bee5770f3f83dd81 (diff) |
use initialiser for Sequence<OUString>
performed using:
git grep -lP 'Sequence.*OUString.*\(1\)'
| xargs perl -0777 -pi -e
"s/Sequence<OUString> (\w+)\(1\);
.*\[0\] = (\S+);/Sequence<OUString> \1 { \2 };/g"
Change-Id: I4da56c80fa09bfc1e8f868794001e9921431e09f
Reviewed-on: https://gerrit.libreoffice.org/19968
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'io')
-rw-r--r-- | io/source/stm/odata.cxx | 9 | ||||
-rw-r--r-- | io/source/stm/omark.cxx | 6 | ||||
-rw-r--r-- | io/source/stm/opipe.cxx | 3 | ||||
-rw-r--r-- | io/test/stm/datatest.cxx | 3 | ||||
-rw-r--r-- | io/test/stm/marktest.cxx | 6 | ||||
-rw-r--r-- | io/test/stm/pipetest.cxx | 3 |
6 files changed, 10 insertions, 20 deletions
diff --git a/io/source/stm/odata.cxx b/io/source/stm/odata.cxx index c626661cb6ce..d8ac9302e4cb 100644 --- a/io/source/stm/odata.cxx +++ b/io/source/stm/odata.cxx @@ -486,8 +486,7 @@ OUString ODataInputStream_getImplementationName() Sequence<OUString> ODataInputStream_getSupportedServiceNames() { - Sequence<OUString> aRet(1); - aRet.getArray()[0] = "com.sun.star.io.DataInputStream"; + Sequence<OUString> aRet { "com.sun.star.io.DataInputStream" }; return aRet; } @@ -1152,8 +1151,7 @@ OUString OObjectOutputStream_getImplementationName() Sequence<OUString> OObjectOutputStream_getSupportedServiceNames() { - Sequence<OUString> aRet(1); - aRet.getArray()[0] = "com.sun.star.io.ObjectOutputStream"; + Sequence<OUString> aRet { "com.sun.star.io.ObjectOutputStream" }; return aRet; } @@ -1456,8 +1454,7 @@ OUString OObjectInputStream_getImplementationName() Sequence<OUString> OObjectInputStream_getSupportedServiceNames() { - Sequence<OUString> aRet(1); - aRet.getArray()[0] = "com.sun.star.io.ObjectInputStream"; + Sequence<OUString> aRet { "com.sun.star.io.ObjectInputStream" }; return aRet; } diff --git a/io/source/stm/omark.cxx b/io/source/stm/omark.cxx index c2e524b0c965..c653efb87c08 100644 --- a/io/source/stm/omark.cxx +++ b/io/source/stm/omark.cxx @@ -450,8 +450,7 @@ OUString OMarkableOutputStream_getImplementationName() Sequence<OUString> OMarkableOutputStream_getSupportedServiceNames() { - Sequence<OUString> aRet(1); - aRet.getArray()[0] = "com.sun.star.io.MarkableOutputStream"; + Sequence<OUString> aRet { "com.sun.star.io.MarkableOutputStream" }; return aRet; } @@ -945,8 +944,7 @@ OUString OMarkableInputStream_getImplementationName() Sequence<OUString> OMarkableInputStream_getSupportedServiceNames() { - Sequence<OUString> aRet(1); - aRet.getArray()[0] = "com.sun.star.io.MarkableInputStream"; + Sequence<OUString> aRet { "com.sun.star.io.MarkableInputStream" }; return aRet; } diff --git a/io/source/stm/opipe.cxx b/io/source/stm/opipe.cxx index b32c869f093a..ec7b70320700 100644 --- a/io/source/stm/opipe.cxx +++ b/io/source/stm/opipe.cxx @@ -427,8 +427,7 @@ OUString OPipeImpl_getImplementationName() Sequence<OUString> OPipeImpl_getSupportedServiceNames() { - Sequence<OUString> aRet(1); - aRet.getArray()[0] = "com.sun.star.io.Pipe"; + Sequence<OUString> aRet { "com.sun.star.io.Pipe" }; return aRet; } } diff --git a/io/test/stm/datatest.cxx b/io/test/stm/datatest.cxx index f98f60276b5a..3d030805971a 100644 --- a/io/test/stm/datatest.cxx +++ b/io/test/stm/datatest.cxx @@ -614,8 +614,7 @@ Reference < XInterface > SAL_CALL OMyPersistObject_CreateInstance( Sequence<OUString> OMyPersistObject_getSupportedServiceNames( ) throw () { - Sequence<OUString> aRet(1); - aRet.getArray()[0] = OMyPersistObject_getImplementationName(); + Sequence<OUString> aRet { OMyPersistObject_getImplementationName() }; return aRet; } diff --git a/io/test/stm/marktest.cxx b/io/test/stm/marktest.cxx index f481c31bc860..e737f9400c00 100644 --- a/io/test/stm/marktest.cxx +++ b/io/test/stm/marktest.cxx @@ -375,8 +375,7 @@ Reference < XInterface > SAL_CALL OMarkableOutputStreamTest_CreateInstance( cons Sequence<OUString> OMarkableOutputStreamTest_getSupportedServiceNames() throw () { - Sequence<OUString> aRet(1); - aRet.getArray()[0] = OMarkableOutputStreamTest_getImplementationName(); + Sequence<OUString> aRet { OMarkableOutputStreamTest_getImplementationName() }; return aRet; } @@ -647,8 +646,7 @@ Reference < XInterface > SAL_CALL OMarkableInputStreamTest_CreateInstance( const Sequence<OUString> OMarkableInputStreamTest_getSupportedServiceNames() throw () { - Sequence<OUString> aRet(1); - aRet.getArray()[0] = OMarkableInputStreamTest_getImplementationName(); + Sequence<OUString> aRet { OMarkableInputStreamTest_getImplementationName() }; return aRet; } diff --git a/io/test/stm/pipetest.cxx b/io/test/stm/pipetest.cxx index 2d9ee9f5091f..f7dc2d46d5a2 100644 --- a/io/test/stm/pipetest.cxx +++ b/io/test/stm/pipetest.cxx @@ -411,8 +411,7 @@ Reference < XInterface > SAL_CALL OPipeTest_CreateInstance( const Reference< XMu Sequence<OUString> OPipeTest_getSupportedServiceNames() throw() { - Sequence<OUString> aRet(1); - aRet.getArray()[0] = OPipeTest_getServiceName(); + Sequence<OUString> aRet { OPipeTest_getServiceName() }; return aRet; } |