summaryrefslogtreecommitdiff
path: root/xmlsecurity/source/xmlsec
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 /xmlsecurity/source/xmlsec
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 'xmlsecurity/source/xmlsec')
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx3
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx4
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx3
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx3
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx3
-rw-r--r--xmlsecurity/source/xmlsec/nss/nssinitializer.cxx4
-rw-r--r--xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx3
-rw-r--r--xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx3
-rw-r--r--xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx3
-rw-r--r--xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx3
-rw-r--r--xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx4
-rw-r--r--xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx4
12 files changed, 12 insertions, 28 deletions
diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
index ab794e8036ea..7c99df8b4813 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
@@ -195,8 +195,7 @@ Sequence< OUString > SAL_CALL SecurityEnvironment_MSCryptImpl::getSupportedServi
//Helper for XServiceInfo
Sequence< OUString > SecurityEnvironment_MSCryptImpl::impl_getSupportedServiceNames() {
::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ;
- Sequence< OUString > seqServiceNames( 1 ) ;
- seqServiceNames[0] = "com.sun.star.xml.crypto.SecurityEnvironment";
+ Sequence<OUString> seqServiceNames { "com.sun.star.xml.crypto.SecurityEnvironment" };
return seqServiceNames ;
}
diff --git a/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx
index 8ca0d7dec2a9..985dc2cdc149 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx
@@ -156,9 +156,7 @@ OUString SEInitializer_MSCryptImpl_getImplementationName()
cssu::Sequence< OUString > SAL_CALL SEInitializer_MSCryptImpl_getSupportedServiceNames()
throw (cssu::RuntimeException)
{
- cssu::Sequence < OUString > aRet(1);
- OUString* pArray = aRet.getArray();
- pArray[0] = "com.sun.star.xml.crypto.SEInitializer";
+ cssu::Sequence<OUString> aRet { "com.sun.star.xml.crypto.SEInitializer" };
return aRet;
}
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx
index 93c20b85855a..3d59737e6ef4 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx
@@ -343,8 +343,7 @@ Sequence< OUString > SAL_CALL XMLEncryption_MSCryptImpl::getSupportedServiceName
//Helper for XServiceInfo
Sequence< OUString > XMLEncryption_MSCryptImpl::impl_getSupportedServiceNames() {
::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ;
- Sequence< OUString > seqServiceNames( 1 ) ;
- seqServiceNames[0] = "com.sun.star.xml.crypto.XMLEncryption";
+ Sequence<OUString> seqServiceNames { "com.sun.star.xml.crypto.XMLEncryption" };
return seqServiceNames ;
}
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx
index 018c003a48fe..39fa1e2bf235 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx
@@ -139,8 +139,7 @@ Sequence< OUString > SAL_CALL XMLSecurityContext_MSCryptImpl::getSupportedServic
//Helper for XServiceInfo
Sequence< OUString > XMLSecurityContext_MSCryptImpl::impl_getSupportedServiceNames() {
::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ;
- Sequence< OUString > seqServiceNames( 1 ) ;
- seqServiceNames[0] = "com.sun.star.xml.crypto.XMLSecurityContext";
+ Sequence<OUString> seqServiceNames { "com.sun.star.xml.crypto.XMLSecurityContext" };
return seqServiceNames ;
}
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
index 9dbaac4365ea..98ba66295d3f 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
@@ -272,8 +272,7 @@ Sequence< OUString > SAL_CALL XMLSignature_MSCryptImpl::getSupportedServiceNames
//Helper for XServiceInfo
Sequence< OUString > XMLSignature_MSCryptImpl::impl_getSupportedServiceNames() {
::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ;
- Sequence< OUString > seqServiceNames( 1 ) ;
- seqServiceNames[0] = "com.sun.star.xml.crypto.XMLSignature";
+ Sequence<OUString> seqServiceNames { "com.sun.star.xml.crypto.XMLSignature" };
return seqServiceNames ;
}
diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
index dff7cd7a1a4c..b7276688f034 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
@@ -471,9 +471,7 @@ OUString ONSSInitializer_getImplementationName ()
cssu::Sequence< OUString > SAL_CALL ONSSInitializer_getSupportedServiceNames( )
throw (cssu::RuntimeException)
{
- cssu::Sequence < OUString > aRet(1);
- OUString* pArray = aRet.getArray();
- pArray[0] = NSS_SERVICE_NAME;
+ cssu::Sequence<OUString> aRet { NSS_SERVICE_NAME };
return aRet;
}
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
index ff08ce67c1ba..8d367b782edc 100644
--- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
@@ -166,8 +166,7 @@ Sequence< OUString > SAL_CALL SecurityEnvironment_NssImpl::getSupportedServiceNa
//Helper for XServiceInfo
Sequence< OUString > SecurityEnvironment_NssImpl::impl_getSupportedServiceNames() {
::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ;
- Sequence< OUString > seqServiceNames( 1 ) ;
- seqServiceNames[0] = "com.sun.star.xml.crypto.SecurityEnvironment";
+ Sequence<OUString> seqServiceNames { "com.sun.star.xml.crypto.SecurityEnvironment" };
return seqServiceNames ;
}
diff --git a/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx
index 921178f0dac4..176d56f2cc77 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx
@@ -333,8 +333,7 @@ Sequence< OUString > SAL_CALL XMLEncryption_NssImpl::getSupportedServiceNames()
//Helper for XServiceInfo
Sequence< OUString > XMLEncryption_NssImpl::impl_getSupportedServiceNames() {
::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ;
- Sequence< OUString > seqServiceNames( 1 ) ;
- seqServiceNames[0] = "com.sun.star.xml.crypto.XMLEncryption";
+ Sequence<OUString> seqServiceNames { "com.sun.star.xml.crypto.XMLEncryption" };
return seqServiceNames ;
}
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
index 967a50ab38f9..7cd8ba5b8d7a 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
@@ -146,8 +146,7 @@ Sequence< OUString > SAL_CALL XMLSecurityContext_NssImpl::getSupportedServiceNam
//Helper for XServiceInfo
Sequence< OUString > XMLSecurityContext_NssImpl::impl_getSupportedServiceNames() {
::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ;
- Sequence< OUString > seqServiceNames( 1 ) ;
- seqServiceNames[0] = "com.sun.star.xml.crypto.XMLSecurityContext";
+ Sequence<OUString> seqServiceNames { "com.sun.star.xml.crypto.XMLSecurityContext" };
return seqServiceNames ;
}
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
index 5d30bf716300..9607753446ec 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
@@ -296,8 +296,7 @@ Sequence< OUString > SAL_CALL XMLSignature_NssImpl::getSupportedServiceNames() t
//Helper for XServiceInfo
Sequence< OUString > XMLSignature_NssImpl::impl_getSupportedServiceNames() {
::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ;
- Sequence< OUString > seqServiceNames( 1 ) ;
- seqServiceNames[0] = "com.sun.star.xml.crypto.XMLSignature";
+ Sequence<OUString> seqServiceNames { "com.sun.star.xml.crypto.XMLSignature" };
return seqServiceNames ;
}
diff --git a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
index 5af8716c96b8..af7543b8b4fd 100644
--- a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
+++ b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
@@ -1064,9 +1064,7 @@ OUString XMLDocumentWrapper_XmlSecImpl_getImplementationName ()
cssu::Sequence< OUString > SAL_CALL XMLDocumentWrapper_XmlSecImpl_getSupportedServiceNames( )
throw (cssu::RuntimeException)
{
- cssu::Sequence < OUString > aRet(1);
- OUString* pArray = aRet.getArray();
- pArray[0] = "com.sun.star.xml.wrapper.XMLDocumentWrapper";
+ cssu::Sequence<OUString> aRet { "com.sun.star.xml.wrapper.XMLDocumentWrapper" };
return aRet;
}
diff --git a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx
index 14e6ff342827..a9ce4eda5c2a 100644
--- a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx
+++ b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx
@@ -80,9 +80,7 @@ OUString XMLElementWrapper_XmlSecImpl_getImplementationName ()
cssu::Sequence< OUString > SAL_CALL XMLElementWrapper_XmlSecImpl_getSupportedServiceNames( )
throw (cssu::RuntimeException)
{
- cssu::Sequence < OUString > aRet(1);
- OUString* pArray = aRet.getArray();
- pArray[0] = "com.sun.star.xml.wrapper.XMLElementWrapper";
+ cssu::Sequence<OUString> aRet { "com.sun.star.xml.wrapper.XMLElementWrapper" };
return aRet;
}