diff options
author | Gert Faller <gertfaller@aliceadsl.fr> | 2010-11-27 17:20:30 +0100 |
---|---|---|
committer | Gert Faller <gertfaller@aliceadsl.fr> | 2010-11-27 17:20:30 +0100 |
commit | 1231e74a6d5c17f91d235b1564251497fa2e3f72 (patch) | |
tree | 1dc6ef96cb11d39a2461977c584ade730d553ff5 /xmlsecurity/tools | |
parent | c838ea595f578d57da5f25a14f8a84bdf51e7bbf (diff) |
RTL_CONSTASCII_USTRINGPARAM in components 2 (build problem in sal ?)
Diffstat (limited to 'xmlsecurity/tools')
-rw-r--r-- | xmlsecurity/tools/demo/performance.cxx | 22 | ||||
-rw-r--r-- | xmlsecurity/tools/demo/util.cxx | 2 | ||||
-rw-r--r-- | xmlsecurity/tools/demo/util2.cxx | 76 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/csfit/certmngr.cxx | 4 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/csfit/decrypter.cxx | 12 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/csfit/encrypter.cxx | 14 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/csfit/helper.cxx | 14 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/csfit/signer.cxx | 12 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/csfit/verifier.cxx | 12 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/mscsfit/certmngr.cxx | 4 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/mscsfit/decrypter.cxx | 12 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/mscsfit/encrypter.cxx | 14 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/mscsfit/helper.cxx | 14 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/mscsfit/signer.cxx | 12 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/mscsfit/verifier.cxx | 12 |
15 files changed, 118 insertions, 118 deletions
diff --git a/xmlsecurity/tools/demo/performance.cxx b/xmlsecurity/tools/demo/performance.cxx index c262ec2377f0..bcf0d203bfad 100644 --- a/xmlsecurity/tools/demo/performance.cxx +++ b/xmlsecurity/tools/demo/performance.cxx @@ -584,13 +584,13 @@ rtl::OUString XSecTester::parseFile( } else { - ouMessage += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("N/A")); + ouMessage += rtl::OUString::createFromAscii( "N/A" ); } } else { - ouMessage += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-")); + ouMessage += rtl::OUString::createFromAscii( "-" ); } return ouMessage; @@ -736,7 +736,7 @@ rtl::OUString SAL_CALL XSecTester::transfer_without_sec( xJavaFilterParser, cssu::UNO_QUERY ); if ( !xJavaFilterParser.is() ) - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NO JAVA")); + return rtl::OUString::createFromAscii( "NO JAVA" ); /* connect the SAX Parser, the Java Flat Filter and the SAX Writer */ xJavaFilterParser->setDocumentHandler( xSaxWriterHandler ); @@ -1772,7 +1772,7 @@ int main( int argc, char **argv ) * export the file with signautre/encryption (C++) */ outputFileName1 = ouInputFileName.copy(0, nPosition) + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-ex.xml")); + rtl::OUString::createFromAscii("-ex.xml"); ouTime_C = pTester->export_xml(ouInputFileName, outputFileName1, sal_False); nPosition1 = ouTime_C.lastIndexOf('\t'); ouRemark_C = ouTime_C.copy(nPosition1 + 1); @@ -1782,7 +1782,7 @@ int main( int argc, char **argv ) * export the file with signautre/encryption (Java) */ outputFileName1 = ouInputFileName.copy(0, nPosition) + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-ex2.xml")); + rtl::OUString::createFromAscii("-ex2.xml"); ouTime_Java = pTester->export_xml(ouInputFileName, outputFileName1, sal_True); nPosition1 = ouTime_Java.lastIndexOf('\t'); ouRemark_Java = ouTime_Java.copy(nPosition1 + 1); @@ -1792,14 +1792,14 @@ int main( int argc, char **argv ) * export the file without signautre/encryption */ outputFileName2 = ouInputFileName.copy(0, nPosition) + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-ex-no.xml")); + rtl::OUString::createFromAscii("-ex-no.xml"); ouTime_NoSecurity = pTester->transfer_without_sec(ouInputFileName, outputFileName2, sal_False); /* * export the file with Java Flat Filter */ outputFileName2 = ouInputFileName.copy(0, nPosition) + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-ex-jf.xml")); + rtl::OUString::createFromAscii("-ex-jf.xml"); ouTime_JavaForwardOnly = pTester->transfer_without_sec(ouInputFileName, outputFileName2, sal_True); /* @@ -1822,7 +1822,7 @@ int main( int argc, char **argv ) * import the file with signautre/encryption (C++) */ outputFileName1 = ouInputFileName.copy(0, nPosition) + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-im.xml")); + rtl::OUString::createFromAscii("-im.xml"); ouTime_C = pTester->import_xml(ouInputFileName, outputFileName1, sal_False); nPosition1 = ouTime_C.lastIndexOf('\t'); ouRemark_C = ouTime_C.copy(nPosition1 + 1); @@ -1832,7 +1832,7 @@ int main( int argc, char **argv ) * import the file with signautre/encryption (Java) */ outputFileName1 = ouInputFileName.copy(0, nPosition) + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-im2.xml")); + rtl::OUString::createFromAscii("-im2.xml"); ouTime_Java = pTester->import_xml(ouInputFileName, outputFileName1, sal_True); nPosition1 = ouTime_Java.lastIndexOf('\t'); ouRemark_Java = ouTime_Java.copy(nPosition1 + 1); @@ -1842,7 +1842,7 @@ int main( int argc, char **argv ) * import the file without signautre/encryption */ outputFileName2 = ouInputFileName.copy(0, nPosition) + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-im-no.xml")); + rtl::OUString::createFromAscii("-im-no.xml"); ouTime_NoSecurity = pTester->transfer_without_sec(ouInputFileName, outputFileName2, sal_False); /* @@ -1850,7 +1850,7 @@ int main( int argc, char **argv ) */ outputFileName2 = ouInputFileName.copy(0, nPosition) + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-im-jf.xml")); + rtl::OUString::createFromAscii("-im-jf.xml"); ouTime_JavaForwardOnly = pTester->transfer_without_sec(ouInputFileName, outputFileName2, sal_True); /* diff --git a/xmlsecurity/tools/demo/util.cxx b/xmlsecurity/tools/demo/util.cxx index 32fbc60a28ec..b81724f15c4e 100644 --- a/xmlsecurity/tools/demo/util.cxx +++ b/xmlsecurity/tools/demo/util.cxx @@ -61,7 +61,7 @@ cssu::Reference< cssl::XMultiServiceFactory > CreateDemoServiceFactory() "serviceManager - " "Cannot create simple registry" ) ; - xSimpleRegistry->open(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("demo.rdb")), sal_True, sal_False); + xSimpleRegistry->open(rtl::OUString::createFromAscii( "demo.rdb" ), sal_True, sal_False); OSL_ENSURE( xSimpleRegistry->isValid() , "serviceManager - " "Cannot open xml security registry rdb" ) ; diff --git a/xmlsecurity/tools/demo/util2.cxx b/xmlsecurity/tools/demo/util2.cxx index 5b71f6108e6a..d40506bc498e 100644 --- a/xmlsecurity/tools/demo/util2.cxx +++ b/xmlsecurity/tools/demo/util2.cxx @@ -170,68 +170,68 @@ void convertDateTime( ::rtl::OUStringBuffer& rBuffer, rtl::OUString result; - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Security Id : ")) + result += rtl::OUString::createFromAscii( "Security Id : " ) +rtl::OUString::valueOf(infor.nSecurityId) - +rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")); - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Status : [")) + +rtl::OUString::createFromAscii( "\n" ); + result += rtl::OUString::createFromAscii( "Status : [" ) +rtl::OUString::valueOf((sal_Int32)(infor.nStatus)) - +rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("] ")) + +rtl::OUString::createFromAscii( "] " ) +rtl::OUString::createFromAscii(status[infor.nStatus]) - +rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")); + +rtl::OUString::createFromAscii( "\n" ); const SignatureReferenceInformations& rInfors = infor.vSignatureReferenceInfors; int i; int size = rInfors.size(); - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("--References :\n")); + result += rtl::OUString::createFromAscii( "--References :\n" ); for (i=0; i<size; i++) { - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("---URI : ")); + result += rtl::OUString::createFromAscii( "---URI : " ); result += rInfors[i].ouURI; - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")); - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("---DigestValue : ")); + result += rtl::OUString::createFromAscii( "\n" ); + result += rtl::OUString::createFromAscii( "---DigestValue : " ); result += rInfors[i].ouDigestValue; - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")); + result += rtl::OUString::createFromAscii( "\n" ); } if (infor.ouX509IssuerName.getLength()>0) { - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("--X509IssuerName :\n")); + result += rtl::OUString::createFromAscii( "--X509IssuerName :\n" ); result += infor.ouX509IssuerName; - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")); + result += rtl::OUString::createFromAscii( "\n" ); } if (infor.ouX509SerialNumber.getLength()>0) { - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("--X509SerialNumber :\n")); + result += rtl::OUString::createFromAscii( "--X509SerialNumber :\n" ); result += infor.ouX509SerialNumber; - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")); + result += rtl::OUString::createFromAscii( "\n" ); } if (infor.ouX509Certificate.getLength()>0) { - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("--X509Certificate :\n")); + result += rtl::OUString::createFromAscii( "--X509Certificate :\n" ); result += infor.ouX509Certificate; - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")); + result += rtl::OUString::createFromAscii( "\n" ); } if (infor.ouSignatureValue.getLength()>0) { - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("--SignatureValue :\n")); + result += rtl::OUString::createFromAscii( "--SignatureValue :\n" ); result += infor.ouSignatureValue; - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")); + result += rtl::OUString::createFromAscii( "\n" ); } - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("--Date :\n")); + result += rtl::OUString::createFromAscii( "--Date :\n" ); ::rtl::OUStringBuffer buffer; convertDateTime( buffer, infor.stDateTime ); result += buffer.makeStringAndClear(); - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")); + result += rtl::OUString::createFromAscii( "\n" ); if (infor.ouX509IssuerName.getLength()>0 && infor.ouX509SerialNumber.getLength()>0 && xSecurityEnvironment.is()) { - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("--Certificate Path :\n")); + result += rtl::OUString::createFromAscii( "--Certificate Path :\n" ); cssu::Reference< ::com::sun::star::security::XCertificate > xCert = xSecurityEnvironment->getCertificate( infor.ouX509IssuerName, numericStringToBigInteger(infor.ouX509SerialNumber) ); cssu::Sequence < cssu::Reference< ::com::sun::star::security::XCertificate > > xCertPath; if(! xCert.is() ) @@ -247,68 +247,68 @@ void convertDateTime( ::rtl::OUStringBuffer& rBuffer, for( int i = 0; i < xCertPath.getLength(); i++ ) { result += xCertPath[i]->getSubjectName(); - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n Subject public key algorithm : ")); + result += rtl::OUString::createFromAscii( "\n Subject public key algorithm : " ); result += xCertPath[i]->getSubjectPublicKeyAlgorithm(); - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n Signature algorithm : ")); + result += rtl::OUString::createFromAscii( "\n Signature algorithm : " ); result += xCertPath[i]->getSignatureAlgorithm(); - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n Subject public key value : ")); + result += rtl::OUString::createFromAscii( "\n Subject public key value : " ); cssu::Sequence< sal_Int8 > keyValue = xCertPath[i]->getSubjectPublicKeyValue(); result += printHexString(keyValue); - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n Thumbprint (SHA1) : ")); + result += rtl::OUString::createFromAscii( "\n Thumbprint (SHA1) : " ); cssu::Sequence< sal_Int8 > SHA1Thumbprint = xCertPath[i]->getSHA1Thumbprint(); result += printHexString(SHA1Thumbprint); - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n Thumbprint (MD5) : ")); + result += rtl::OUString::createFromAscii( "\n Thumbprint (MD5) : " ); cssu::Sequence< sal_Int8 > MD5Thumbprint = xCertPath[i]->getMD5Thumbprint(); result += printHexString(MD5Thumbprint); - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n <<\n")); + result += rtl::OUString::createFromAscii( "\n <<\n" ); } - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n Key Usage : ")); + result += rtl::OUString::createFromAscii( "\n Key Usage : " ); sal_Int32 usage = xCert->getCertificateUsage(); if (usage & ::com::sun::star::security::KeyUsage::DIGITAL_SIGNATURE) { - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DIGITAL_SIGNATURE ")); + result += rtl::OUString::createFromAscii( "DIGITAL_SIGNATURE " ); } if (usage & ::com::sun::star::security::KeyUsage::NON_REPUDIATION) { - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NON_REPUDIATION ")); + result += rtl::OUString::createFromAscii( "NON_REPUDIATION " ); } if (usage & ::com::sun::star::security::KeyUsage::KEY_ENCIPHERMENT) { - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KEY_ENCIPHERMENT ")); + result += rtl::OUString::createFromAscii( "KEY_ENCIPHERMENT " ); } if (usage & ::com::sun::star::security::KeyUsage::DATA_ENCIPHERMENT) { - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATA_ENCIPHERMENT ")); + result += rtl::OUString::createFromAscii( "DATA_ENCIPHERMENT " ); } if (usage & ::com::sun::star::security::KeyUsage::KEY_AGREEMENT) { - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KEY_AGREEMENT ")); + result += rtl::OUString::createFromAscii( "KEY_AGREEMENT " ); } if (usage & ::com::sun::star::security::KeyUsage::KEY_CERT_SIGN) { - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KEY_CERT_SIGN ")); + result += rtl::OUString::createFromAscii( "KEY_CERT_SIGN " ); } if (usage & ::com::sun::star::security::KeyUsage::CRL_SIGN) { - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CRL_SIGN ")); + result += rtl::OUString::createFromAscii( "CRL_SIGN " ); } - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")); + result += rtl::OUString::createFromAscii( "\n" ); } - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")); + result += rtl::OUString::createFromAscii( "\n" ); return result; } @@ -326,7 +326,7 @@ void convertDateTime( ::rtl::OUStringBuffer& rBuffer, result += getSignatureInformation( infor, xSecurityEnvironment ); } - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")); + result += rtl::OUString::createFromAscii( "\n" ); return result; } diff --git a/xmlsecurity/tools/standalone/csfit/certmngr.cxx b/xmlsecurity/tools/standalone/csfit/certmngr.cxx index d0096a9c284e..5c6d78c89d9a 100644 --- a/xmlsecurity/tools/standalone/csfit/certmngr.cxx +++ b/xmlsecurity/tools/standalone/csfit/certmngr.cxx @@ -106,7 +106,7 @@ int SAL_CALL main( int argc, char **argv ) Reference< XMultiComponentFactory > xManager = NULL ; Reference< XComponentContext > xContext = NULL ; - xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[2] ) ) ; + xManager = serviceManager( xContext , OUString::createFromAscii( "local" ), OUString::createFromAscii( argv[2] ) ) ; OSL_ENSURE( xManager.is() , "ServicesManager - " "Cannot get service manager" ) ; @@ -114,7 +114,7 @@ int SAL_CALL main( int argc, char **argv ) //Create security environment //Build Security Environment Reference< XInterface > xsecenv = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl"), xContext ) ; OSL_ENSURE( xsecenv.is() , "Signer - " "Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ; diff --git a/xmlsecurity/tools/standalone/csfit/decrypter.cxx b/xmlsecurity/tools/standalone/csfit/decrypter.cxx index fb65f5fcf098..b1177efe58d1 100644 --- a/xmlsecurity/tools/standalone/csfit/decrypter.cxx +++ b/xmlsecurity/tools/standalone/csfit/decrypter.cxx @@ -136,11 +136,11 @@ int SAL_CALL main( int argc, char **argv ) Reference< XMultiComponentFactory > xManager = NULL ; Reference< XComponentContext > xContext = NULL ; - xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[4] ) ) ; + xManager = serviceManager( xContext , OUString::createFromAscii( "local" ), OUString::createFromAscii( argv[4] ) ) ; //Create encryption template Reference< XInterface > tplElement = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl" ) , xContext ) ; OSL_ENSURE( tplElement.is() , "Decryptor - " "Cannot get service instance of \"xsec.XMLElementWrapper\"" ) ; @@ -164,7 +164,7 @@ int SAL_CALL main( int argc, char **argv ) //Build XML Encryption template Reference< XInterface > enctpl = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLEncryptionTemplate")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.crypto.XMLEncryptionTemplate"), xContext ) ; OSL_ENSURE( enctpl.is() , "Decryptor - " "Cannot get service instance of \"xsec.XMLEncryptionTemplate\"" ) ; @@ -180,7 +180,7 @@ int SAL_CALL main( int argc, char **argv ) //Create security environment //Build Security Environment Reference< XInterface > xsecenv = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl"), xContext ) ; OSL_ENSURE( xsecenv.is() , "Decryptor - " "Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ; @@ -207,7 +207,7 @@ int SAL_CALL main( int argc, char **argv ) //Build XML Security Context Reference< XInterface > xmlsecctx = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_NssImpl")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_NssImpl"), xContext ) ; OSL_ENSURE( xmlsecctx.is() , "Decryptor - " "Cannot get service instance of \"xsec.XMLSecurityContext\"" ) ; @@ -222,7 +222,7 @@ int SAL_CALL main( int argc, char **argv ) //Get encrypter Reference< XInterface > xmlencrypter = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLEncryption_NssImpl")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLEncryption_NssImpl"), xContext ) ; OSL_ENSURE( xmlencrypter.is() , "Decryptor - " "Cannot get service instance of \"xsec.XMLEncryption\"" ) ; diff --git a/xmlsecurity/tools/standalone/csfit/encrypter.cxx b/xmlsecurity/tools/standalone/csfit/encrypter.cxx index 63b2b4a6703e..ce6e4c15ccdf 100644 --- a/xmlsecurity/tools/standalone/csfit/encrypter.cxx +++ b/xmlsecurity/tools/standalone/csfit/encrypter.cxx @@ -144,11 +144,11 @@ int SAL_CALL main( int argc, char **argv ) Reference< XMultiComponentFactory > xManager = NULL ; Reference< XComponentContext > xContext = NULL ; - xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[6] ) ) ; + xManager = serviceManager( xContext , OUString::createFromAscii( "local" ), OUString::createFromAscii( argv[6] ) ) ; //Create encryption template Reference< XInterface > tplElement = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl" ) , xContext ) ; OSL_ENSURE( tplElement.is() , "Encryptor - " "Cannot get service instance of \"xsec.XMLElementWrapper\"" ) ; @@ -172,7 +172,7 @@ int SAL_CALL main( int argc, char **argv ) //Create encryption target element Reference< XInterface > tarElement = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl" ) , xContext ) ; OSL_ENSURE( tarElement.is() , "Encryptor - " "Cannot get service instance of \"xsec.XMLElementWrapper\"" ) ; @@ -197,7 +197,7 @@ int SAL_CALL main( int argc, char **argv ) //Build XML Encryption template Reference< XInterface > enctpl = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLEncryptionTemplate")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.crypto.XMLEncryptionTemplate"), xContext ) ; OSL_ENSURE( enctpl.is() , "Encryptor - " "Cannot get service instance of \"xsec.XMLEncryptionTemplate\"" ) ; @@ -214,7 +214,7 @@ int SAL_CALL main( int argc, char **argv ) //Create security environment //Build Security Environment Reference< XInterface > xsecenv = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl"), xContext ) ; OSL_ENSURE( xsecenv.is() , "Encryptor - " "Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ; @@ -242,7 +242,7 @@ int SAL_CALL main( int argc, char **argv ) //Build XML Security Context Reference< XInterface > xmlsecctx = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_NssImpl")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_NssImpl"), xContext ) ; OSL_ENSURE( xmlsecctx.is() , "Encryptor - " "Cannot get service instance of \"xsec.XMLSecurityContext\"" ) ; @@ -256,7 +256,7 @@ int SAL_CALL main( int argc, char **argv ) //Get encrypter Reference< XInterface > xmlencrypter = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLEncryption_NssImpl")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLEncryption_NssImpl"), xContext ) ; OSL_ENSURE( xmlencrypter.is() , "Encryptor - " "Cannot get service instance of \"xsec.XMLEncryption\"" ) ; diff --git a/xmlsecurity/tools/standalone/csfit/helper.cxx b/xmlsecurity/tools/standalone/csfit/helper.cxx index 25dc0439650e..fb2b6b0933c5 100644 --- a/xmlsecurity/tools/standalone/csfit/helper.cxx +++ b/xmlsecurity/tools/standalone/csfit/helper.cxx @@ -108,7 +108,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext "serviceManager - " "Cannot create simple registry" ) ; - //xSimpleRegistry->open(OUString(RTL_CONSTASCII_USTRINGPARAM("xmlsecurity.rdb")), sal_False, sal_False); + //xSimpleRegistry->open(OUString::createFromAscii("xmlsecurity.rdb"), sal_False, sal_False); xSimpleRegistry->open(sRdbUrl, sal_True, sal_False); OSL_ENSURE( xSimpleRegistry->isValid() , "serviceManager - " @@ -140,7 +140,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext args[ 0 ] <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY1_LOCAL ) ; args[ 1 ] <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY2_OFFICE ) ; if( ! ::ucb::ContentBroker::initialize( xSvmg , args ) ) { - throw RuntimeException( OUString(RTL_CONSTASCII_USTRINGPARAM("Cannot inlitialize ContentBroker")) , Reference< XInterface >() , Any() ) ; + throw RuntimeException( OUString::createFromAscii( "Cannot inlitialize ContentBroker" ) , Reference< XInterface >() , Any() ) ; } } ********************************************************************/ @@ -159,7 +159,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext "Cannot create intial service manager" ) ; Reference< XInterface > urlResolver = - xLocalServiceManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.UnoUrlResolver")) , xLocalComponentContext ) ; + xLocalServiceManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.bridge.UnoUrlResolver") , xLocalComponentContext ) ; OSL_ENSURE( urlResolver.is() , "serviceManager - " "Cannot get service instance of \"bridge.UnoUrlResolver\"" ) ; @@ -183,7 +183,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext "Cannot get interface of \"XNamingService\" from URL resolver" ) ; Reference< XInterface > serviceManager = - xNamingService->getRegisteredObject( OUString(RTL_CONSTASCII_USTRINGPARAM("StarOffice.ServiceManager")) ) ; + xNamingService->getRegisteredObject( OUString::createFromAscii( "StarOffice.ServiceManager" ) ) ; OSL_ENSURE( serviceManager.is() , "serviceManager - " "Cannot get service instance of \"StarOffice.ServiceManager\"" ) ; @@ -198,7 +198,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext "serviceManager - " "Cannot get interface of \"XPropertySet\" from service \"StarOffice.ServiceManager\"" ) ; - xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xUsedComponentContext ; + xPropSet->getPropertyValue( OUString::createFromAscii( "DefaultContext" ) ) >>= xUsedComponentContext ; OSL_ENSURE( xUsedComponentContext.is() , "serviceManager - " "Cannot create remote component context" ) ; @@ -213,7 +213,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext "serviceManager - " "Cannot get interface of \"XPropertySet\" from URL resolver" ) ; - xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xUsedComponentContext ; + xPropSet->getPropertyValue( OUString::createFromAscii( "DefaultContext" ) ) >>= xUsedComponentContext ; OSL_ENSURE( xUsedComponentContext.is() , "serviceManager - " "Cannot create remote component context" ) ; @@ -237,7 +237,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext "serviceManager - " "Cannot get interface of \"XPropertySet\" from service \"StarOffice.ServiceManager\"" ) ; - xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xUsedComponentContext ; + xPropSet->getPropertyValue( OUString::createFromAscii( "DefaultContext" ) ) >>= xUsedComponentContext ; OSL_ENSURE( xUsedComponentContext.is() , "serviceManager - " "Cannot create remote component context" ) ; diff --git a/xmlsecurity/tools/standalone/csfit/signer.cxx b/xmlsecurity/tools/standalone/csfit/signer.cxx index fc4e4d743943..40e6a64a2b78 100644 --- a/xmlsecurity/tools/standalone/csfit/signer.cxx +++ b/xmlsecurity/tools/standalone/csfit/signer.cxx @@ -221,14 +221,14 @@ int SAL_CALL main( int argc, char **argv ) Reference< XMultiComponentFactory > xManager = NULL ; Reference< XComponentContext > xContext = NULL ; - xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[4] ) ) ; + xManager = serviceManager( xContext , OUString::createFromAscii( "local" ), OUString::createFromAscii( argv[4] ) ) ; OSL_ENSURE( xManager.is() , "ServicesManager - " "Cannot get service manager" ) ; //Create signature template Reference< XInterface > element = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl" ) , xContext ) ; OSL_ENSURE( element.is() , "Signer - " "Cannot get service instance of \"wrapper.XMLElementWrapper\"" ) ; @@ -253,7 +253,7 @@ int SAL_CALL main( int argc, char **argv ) //Build XML Signature template Reference< XInterface > signtpl = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLSignatureTemplate")) , xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.crypto.XMLSignatureTemplate" ) , xContext ) ; OSL_ENSURE( signtpl.is() , "Signer - " "Cannot get service instance of \"xsec.XMLSignatureTemplate\"" ) ; @@ -273,7 +273,7 @@ int SAL_CALL main( int argc, char **argv ) //Create security environment //Build Security Environment Reference< XInterface > xsecenv = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl"), xContext ) ; OSL_ENSURE( xsecenv.is() , "Signer - " "Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ; @@ -299,7 +299,7 @@ int SAL_CALL main( int argc, char **argv ) //Build XML Security Context Reference< XInterface > xmlsecctx = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_NssImpl")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_NssImpl"), xContext ) ; OSL_ENSURE( xsecenv.is() , "Signer - " "Cannot get service instance of \"xsec.XMLSecurityContext\"" ) ; @@ -313,7 +313,7 @@ int SAL_CALL main( int argc, char **argv ) //Generate XML signature Reference< XInterface > xmlsigner = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_NssImpl")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_NssImpl"), xContext ) ; OSL_ENSURE( xmlsigner.is() , "Signer - " "Cannot get service instance of \"xsec.XMLSignature\"" ) ; diff --git a/xmlsecurity/tools/standalone/csfit/verifier.cxx b/xmlsecurity/tools/standalone/csfit/verifier.cxx index 43c72a102c30..a109b63931fe 100644 --- a/xmlsecurity/tools/standalone/csfit/verifier.cxx +++ b/xmlsecurity/tools/standalone/csfit/verifier.cxx @@ -208,11 +208,11 @@ int SAL_CALL main( int argc, char **argv ) Reference< XMultiComponentFactory > xManager = NULL ; Reference< XComponentContext > xContext = NULL ; - xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[3] ) ) ; + xManager = serviceManager( xContext , OUString::createFromAscii( "local" ), OUString::createFromAscii( argv[3] ) ) ; //Create signature template Reference< XInterface > element = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl" ) , xContext ) ; OSL_ENSURE( element.is() , "Verifier - " "Cannot get service instance of \"xsec.XMLElementWrapper\"" ) ; @@ -237,7 +237,7 @@ int SAL_CALL main( int argc, char **argv ) //Build XML Signature template Reference< XInterface > signtpl = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLSignatureTemplate")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.crypto.XMLSignatureTemplate"), xContext ) ; OSL_ENSURE( signtpl.is() , "Verifier - " "Cannot get service instance of \"xsec.XMLSignatureTemplate\"" ) ; @@ -257,7 +257,7 @@ int SAL_CALL main( int argc, char **argv ) //Create security environment //Build Security Environment Reference< XInterface > xsecenv = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl"), xContext ) ; OSL_ENSURE( xsecenv.is() , "Verifier - " "Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ; @@ -283,7 +283,7 @@ int SAL_CALL main( int argc, char **argv ) //Build XML Security Context Reference< XInterface > xmlsecctx = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_NssImpl")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_NssImpl"), xContext ) ; OSL_ENSURE( xsecenv.is() , "Verifier - " "Cannot get service instance of \"xsec.XMLSecurityContext\"" ) ; @@ -297,7 +297,7 @@ int SAL_CALL main( int argc, char **argv ) //Generate XML signature Reference< XInterface > xmlsigner = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_NssImpl")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_NssImpl"), xContext ) ; OSL_ENSURE( xmlsigner.is() , "Verifier - " "Cannot get service instance of \"xsec.XMLSignature\"" ) ; diff --git a/xmlsecurity/tools/standalone/mscsfit/certmngr.cxx b/xmlsecurity/tools/standalone/mscsfit/certmngr.cxx index fee83746faff..2856967cbd26 100644 --- a/xmlsecurity/tools/standalone/mscsfit/certmngr.cxx +++ b/xmlsecurity/tools/standalone/mscsfit/certmngr.cxx @@ -63,7 +63,7 @@ int SAL_CALL main( int argc, char **argv ) Reference< XMultiComponentFactory > xManager = NULL ; Reference< XComponentContext > xContext = NULL ; - xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[1] ) ) ; + xManager = serviceManager( xContext , OUString::createFromAscii( "local" ), OUString::createFromAscii( argv[1] ) ) ; OSL_ENSURE( xManager.is() , "ServicesManager - " "Cannot get service manager" ) ; @@ -71,7 +71,7 @@ int SAL_CALL main( int argc, char **argv ) //Create security environment //Build Security Environment Reference< XInterface > xsecenv = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_MSCryptImpl")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_MSCryptImpl"), xContext ) ; OSL_ENSURE( xsecenv.is() , "Signer - " "Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ; diff --git a/xmlsecurity/tools/standalone/mscsfit/decrypter.cxx b/xmlsecurity/tools/standalone/mscsfit/decrypter.cxx index a481824ad52e..1b0015c6d92e 100644 --- a/xmlsecurity/tools/standalone/mscsfit/decrypter.cxx +++ b/xmlsecurity/tools/standalone/mscsfit/decrypter.cxx @@ -110,11 +110,11 @@ int SAL_CALL main( int argc, char **argv ) Reference< XMultiComponentFactory > xManager = NULL ; Reference< XComponentContext > xContext = NULL ; - xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[4] ) ) ; + xManager = serviceManager( xContext , OUString::createFromAscii( "local" ), OUString::createFromAscii( argv[4] ) ) ; //Create encryption template Reference< XInterface > tplElement = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.xsec.XMLElementWrapper")) , xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.xsec.XMLElementWrapper" ) , xContext ) ; OSL_ENSURE( tplElement.is() , "Decryptor - " "Cannot get service instance of \"xsec.XMLElementWrapper\"" ) ; @@ -138,7 +138,7 @@ int SAL_CALL main( int argc, char **argv ) //Build XML Encryption template Reference< XInterface > enctpl = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.xsec.XMLEncryptionTemplate")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.xsec.XMLEncryptionTemplate"), xContext ) ; OSL_ENSURE( enctpl.is() , "Decryptor - " "Cannot get service instance of \"xsec.XMLEncryptionTemplate\"" ) ; @@ -154,7 +154,7 @@ int SAL_CALL main( int argc, char **argv ) //Create security environment //Build Security Environment Reference< XInterface > xsecenv = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.xsec.SecurityEnvironment")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.xsec.SecurityEnvironment"), xContext ) ; OSL_ENSURE( xsecenv.is() , "Decryptor - " "Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ; @@ -181,7 +181,7 @@ int SAL_CALL main( int argc, char **argv ) //Build XML Security Context Reference< XInterface > xmlsecctx = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.xsec.XMLSecurityContext")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.xsec.XMLSecurityContext"), xContext ) ; OSL_ENSURE( xmlsecctx.is() , "Decryptor - " "Cannot get service instance of \"xsec.XMLSecurityContext\"" ) ; @@ -196,7 +196,7 @@ int SAL_CALL main( int argc, char **argv ) //Get encrypter Reference< XInterface > xmlencrypter = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.xsec.XMLEncryption")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.xsec.XMLEncryption"), xContext ) ; OSL_ENSURE( xmlencrypter.is() , "Decryptor - " "Cannot get service instance of \"xsec.XMLEncryption\"" ) ; diff --git a/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx b/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx index 3f0e98ca8a50..d580649ed0e6 100644 --- a/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx +++ b/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx @@ -125,11 +125,11 @@ int SAL_CALL main( int argc, char **argv ) Reference< XMultiComponentFactory > xManager = NULL ; Reference< XComponentContext > xContext = NULL ; - xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[5] ) ) ; + xManager = serviceManager( xContext , OUString::createFromAscii( "local" ), OUString::createFromAscii( argv[5] ) ) ; //Create encryption template Reference< XInterface > tplElement = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl" ) , xContext ) ; OSL_ENSURE( tplElement.is() , "Encryptor - " "Cannot get service instance of \"xsec.XMLElementWrapper\"" ) ; @@ -153,7 +153,7 @@ int SAL_CALL main( int argc, char **argv ) //Create encryption target element Reference< XInterface > tarElement = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl" ) , xContext ) ; OSL_ENSURE( tarElement.is() , "Encryptor - " "Cannot get service instance of \"xsec.XMLElementWrapper\"" ) ; @@ -178,7 +178,7 @@ int SAL_CALL main( int argc, char **argv ) //Build XML Encryption template Reference< XInterface > enctpl = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLEncryptionTemplate")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.crypto.XMLEncryptionTemplate"), xContext ) ; OSL_ENSURE( enctpl.is() , "Encryptor - " "Cannot get service instance of \"xsec.XMLEncryptionTemplate\"" ) ; @@ -195,7 +195,7 @@ int SAL_CALL main( int argc, char **argv ) //Create security environment //Build Security Environment Reference< XInterface > xsecenv = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_MSCryptImpl")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_MSCryptImpl"), xContext ) ; OSL_ENSURE( xsecenv.is() , "Encryptor - " "Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ; @@ -229,7 +229,7 @@ int SAL_CALL main( int argc, char **argv ) //Build XML Security Context Reference< XInterface > xmlsecctx = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_MSCryptImpl")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_MSCryptImpl"), xContext ) ; OSL_ENSURE( xmlsecctx.is() , "Encryptor - " "Cannot get service instance of \"xsec.XMLSecurityContext\"" ) ; @@ -243,7 +243,7 @@ int SAL_CALL main( int argc, char **argv ) //Get encrypter Reference< XInterface > xmlencrypter = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLEncryption_MSCryptImpl")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLEncryption_MSCryptImpl"), xContext ) ; OSL_ENSURE( xmlencrypter.is() , "Encryptor - " "Cannot get service instance of \"xsec.XMLEncryption\"" ) ; diff --git a/xmlsecurity/tools/standalone/mscsfit/helper.cxx b/xmlsecurity/tools/standalone/mscsfit/helper.cxx index 522a8c2d14eb..631ae1c397b7 100644 --- a/xmlsecurity/tools/standalone/mscsfit/helper.cxx +++ b/xmlsecurity/tools/standalone/mscsfit/helper.cxx @@ -76,7 +76,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext "serviceManager - " "Cannot create simple registry" ) ; - //xSimpleRegistry->open(OUString(RTL_CONSTASCII_USTRINGPARAM("xmlsecurity.rdb")), sal_False, sal_False); + //xSimpleRegistry->open(OUString::createFromAscii("xmlsecurity.rdb"), sal_False, sal_False); xSimpleRegistry->open(sRdbUrl, sal_True, sal_False); OSL_ENSURE( xSimpleRegistry->isValid() , "serviceManager - " @@ -108,7 +108,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext args[ 0 ] <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY1_LOCAL ) ; args[ 1 ] <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY2_OFFICE ) ; if( ! ::ucb::ContentBroker::initialize( xSvmg , args ) ) { - throw RuntimeException( OUString(RTL_CONSTASCII_USTRINGPARAM("Cannot inlitialize ContentBroker")) , Reference< XInterface >() , Any() ) ; + throw RuntimeException( OUString::createFromAscii( "Cannot inlitialize ContentBroker" ) , Reference< XInterface >() , Any() ) ; } } ********************************************************************/ @@ -130,7 +130,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext "Cannot create intial service manager" ) ; Reference< XInterface > urlResolver = - xLocalServiceManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.UnoUrlResolver")) , xLocalComponentContext ) ; + xLocalServiceManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.bridge.UnoUrlResolver") , xLocalComponentContext ) ; OSL_ENSURE( urlResolver.is() , "serviceManager - " "Cannot get service instance of \"bridge.UnoUrlResolver\"" ) ; @@ -154,7 +154,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext "Cannot get interface of \"XNamingService\" from URL resolver" ) ; Reference< XInterface > serviceManager = - xNamingService->getRegisteredObject( OUString(RTL_CONSTASCII_USTRINGPARAM("StarOffice.ServiceManager")) ) ; + xNamingService->getRegisteredObject( OUString::createFromAscii( "StarOffice.ServiceManager" ) ) ; OSL_ENSURE( serviceManager.is() , "serviceManager - " "Cannot get service instance of \"StarOffice.ServiceManager\"" ) ; @@ -169,7 +169,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext "serviceManager - " "Cannot get interface of \"XPropertySet\" from service \"StarOffice.ServiceManager\"" ) ; - xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xUsedComponentContext ; + xPropSet->getPropertyValue( OUString::createFromAscii( "DefaultContext" ) ) >>= xUsedComponentContext ; OSL_ENSURE( xUsedComponentContext.is() , "serviceManager - " "Cannot create remote component context" ) ; @@ -184,7 +184,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext "serviceManager - " "Cannot get interface of \"XPropertySet\" from URL resolver" ) ; - xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xUsedComponentContext ; + xPropSet->getPropertyValue( OUString::createFromAscii( "DefaultContext" ) ) >>= xUsedComponentContext ; OSL_ENSURE( xUsedComponentContext.is() , "serviceManager - " "Cannot create remote component context" ) ; @@ -208,7 +208,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext "serviceManager - " "Cannot get interface of \"XPropertySet\" from service \"StarOffice.ServiceManager\"" ) ; - xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xUsedComponentContext ; + xPropSet->getPropertyValue( OUString::createFromAscii( "DefaultContext" ) ) >>= xUsedComponentContext ; OSL_ENSURE( xUsedComponentContext.is() , "serviceManager - " "Cannot create remote component context" ) ; diff --git a/xmlsecurity/tools/standalone/mscsfit/signer.cxx b/xmlsecurity/tools/standalone/mscsfit/signer.cxx index 270fb23bf076..ffa88577444a 100644 --- a/xmlsecurity/tools/standalone/mscsfit/signer.cxx +++ b/xmlsecurity/tools/standalone/mscsfit/signer.cxx @@ -178,14 +178,14 @@ int SAL_CALL main( int argc, char **argv ) Reference< XMultiComponentFactory > xManager = NULL ; Reference< XComponentContext > xContext = NULL ; - xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[3] ) ) ; + xManager = serviceManager( xContext , OUString::createFromAscii( "local" ), OUString::createFromAscii( argv[3] ) ) ; OSL_ENSURE( xManager.is() , "ServicesManager - " "Cannot get service manager" ) ; //Create signature template Reference< XInterface > element = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl" ) , xContext ) ; OSL_ENSURE( element.is() , "Signer - " "Cannot get service instance of \"wrapper.XMLElementWrapper\"" ) ; @@ -210,7 +210,7 @@ int SAL_CALL main( int argc, char **argv ) //Build XML Signature template Reference< XInterface > signtpl = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLSignatureTemplate")) , xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.crypto.XMLSignatureTemplate" ) , xContext ) ; OSL_ENSURE( signtpl.is() , "Signer - " "Cannot get service instance of \"xsec.XMLSignatureTemplate\"" ) ; @@ -230,7 +230,7 @@ int SAL_CALL main( int argc, char **argv ) //Create security environment //Build Security Environment Reference< XInterface > xsecenv = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_MSCryptImpl")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_MSCryptImpl"), xContext ) ; OSL_ENSURE( xsecenv.is() , "Signer - " "Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ; @@ -261,7 +261,7 @@ int SAL_CALL main( int argc, char **argv ) //Build XML Security Context Reference< XInterface > xmlsecctx = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_MSCryptImpl")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_MSCryptImpl"), xContext ) ; OSL_ENSURE( xsecenv.is() , "Signer - " "Cannot get service instance of \"xsec.XMLSecurityContext\"" ) ; @@ -275,7 +275,7 @@ int SAL_CALL main( int argc, char **argv ) //Generate XML signature Reference< XInterface > xmlsigner = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_MSCryptImpl")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_MSCryptImpl"), xContext ) ; OSL_ENSURE( xmlsigner.is() , "Signer - " "Cannot get service instance of \"xsec.XMLSignature\"" ) ; diff --git a/xmlsecurity/tools/standalone/mscsfit/verifier.cxx b/xmlsecurity/tools/standalone/mscsfit/verifier.cxx index 6af44f0975c9..149923742fa6 100644 --- a/xmlsecurity/tools/standalone/mscsfit/verifier.cxx +++ b/xmlsecurity/tools/standalone/mscsfit/verifier.cxx @@ -180,11 +180,11 @@ int SAL_CALL main( int argc, char **argv ) Reference< XMultiComponentFactory > xManager = NULL ; Reference< XComponentContext > xContext = NULL ; - xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[2] ) ) ; + xManager = serviceManager( xContext , OUString::createFromAscii( "local" ), OUString::createFromAscii( argv[2] ) ) ; //Create signature template Reference< XInterface > element = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl" ) , xContext ) ; OSL_ENSURE( element.is() , "Verifier - " "Cannot get service instance of \"xsec.XMLElementWrapper\"" ) ; @@ -209,7 +209,7 @@ int SAL_CALL main( int argc, char **argv ) //Build XML Signature template Reference< XInterface > signtpl = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLSignatureTemplate")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.crypto.XMLSignatureTemplate"), xContext ) ; OSL_ENSURE( signtpl.is() , "Verifier - " "Cannot get service instance of \"xsec.XMLSignatureTemplate\"" ) ; @@ -229,7 +229,7 @@ int SAL_CALL main( int argc, char **argv ) //Create security environment //Build Security Environment Reference< XInterface > xsecenv = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_MSCryptImpl")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_MSCryptImpl"), xContext ) ; OSL_ENSURE( xsecenv.is() , "Verifier - " "Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ; @@ -260,7 +260,7 @@ int SAL_CALL main( int argc, char **argv ) //Build XML Security Context Reference< XInterface > xmlsecctx = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_MSCryptImpl")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_MSCryptImpl"), xContext ) ; OSL_ENSURE( xsecenv.is() , "Verifier - " "Cannot get service instance of \"xsec.XMLSecurityContext\"" ) ; @@ -274,7 +274,7 @@ int SAL_CALL main( int argc, char **argv ) //Generate XML signature Reference< XInterface > xmlsigner = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_MSCryptImpl")), xContext ) ; + xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_MSCryptImpl"), xContext ) ; OSL_ENSURE( xmlsigner.is() , "Verifier - " "Cannot get service instance of \"xsec.XMLSignature\"" ) ; |