[Libreoffice-commits] .: xmlsecurity/source xmlsecurity/tools xmlsecurity/workben

Gert Faller gfaller at kemper.freedesktop.org
Mon Nov 29 14:02:24 PST 2010


 xmlsecurity/source/helper/xmlsignaturehelper.cxx |    6 +--
 xmlsecurity/source/helper/xsecctl.cxx            |    6 +--
 xmlsecurity/source/helper/xsecsign.cxx           |    2 -
 xmlsecurity/source/helper/xsecverify.cxx         |    2 -
 xmlsecurity/source/xmlsec/certvalidity.cxx       |   36 +++++++++++------------
 xmlsecurity/tools/demo/performance.cxx           |   18 +++++------
 xmlsecurity/tools/standalone/csfit/helper.cxx    |    4 +-
 xmlsecurity/tools/standalone/mscsfit/helper.cxx  |    4 +-
 xmlsecurity/workben/signaturetest.cxx            |    4 +-
 9 files changed, 41 insertions(+), 41 deletions(-)

New commits:
commit 73393647bbac1757bf9cf2e8eead960cd3763d85
Author: Gert Faller <gertfaller at aliceadsl.fr>
Date:   Mon Nov 29 23:01:56 2010 +0100

    RTL_CONSTASCII_USTRINGPARAM in components 6

diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
index baeee83..7673bd2 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
@@ -89,7 +89,7 @@ bool XMLSignatureHelper::Init( const rtl::OUString& rTokenPath )
 
 void XMLSignatureHelper::ImplCreateSEInitializer()
 { 
-    rtl::OUString sSEInitializer(rtl::OUString::createFromAscii( SEINITIALIZER_COMPONENT ));
+    rtl::OUString sSEInitializer(RTL_CONSTASCII_USTRINGPARAM( SEINITIALIZER_COMPONENT ));
     uno::Reference< lang::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
     mxSEInitializer = uno::Reference< com::sun::star::xml::crypto::XSEInitializer > (
         xMCF->createInstanceWithContext( sSEInitializer,  mxCtx ), uno::UNO_QUERY );
@@ -195,8 +195,8 @@ uno::Reference<xml::sax::XDocumentHandler> XMLSignatureHelper::CreateDocumentHan
      */
     uno::Reference< lang::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
     uno::Reference< io::XActiveDataSource > xSaxWriter(
-        xMCF->createInstanceWithContext(rtl::OUString::createFromAscii( 
-            "com.sun.star.xml.sax.Writer"), mxCtx ), uno::UNO_QUERY );
+        xMCF->createInstanceWithContext(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+            "com.sun.star.xml.sax.Writer")), mxCtx ), uno::UNO_QUERY );
         
     DBG_ASSERT( xSaxWriter.is(), "can't instantiate XML writer" );
     
diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx
index 83f4774..282c47f 100644
--- a/xmlsecurity/source/helper/xsecctl.cxx
+++ b/xmlsecurity/source/helper/xsecctl.cxx
@@ -348,9 +348,9 @@ void XSecController::createXSecComponent( )
  *	Email: michael.mi at sun.com
  ******************************************************************************/
 {
-    rtl::OUString sSAXEventKeeper(rtl::OUString::createFromAscii( SAXEVENTKEEPER_COMPONENT ));
-    rtl::OUString sXMLSignature(rtl::OUString::createFromAscii( XMLSIGNATURE_COMPONENT ));
-    rtl::OUString sXMLDocument(rtl::OUString::createFromAscii( XMLDOCUMENTWRAPPER_COMPONENT ));
+    rtl::OUString sSAXEventKeeper(RTL_CONSTASCII_USTRINGPARAM( SAXEVENTKEEPER_COMPONENT ));
+    rtl::OUString sXMLSignature(RTL_CONSTASCII_USTRINGPARAM( XMLSIGNATURE_COMPONENT ));
+    rtl::OUString sXMLDocument(RTL_CONSTASCII_USTRINGPARAM( XMLDOCUMENTWRAPPER_COMPONENT ));
     
     /*
      * marks all security components are not available.
diff --git a/xmlsecurity/source/helper/xsecsign.cxx b/xmlsecurity/source/helper/xsecsign.cxx
index 33ed8c2..aab6b73 100644
--- a/xmlsecurity/source/helper/xsecsign.cxx
+++ b/xmlsecurity/source/helper/xsecsign.cxx
@@ -87,7 +87,7 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
     cssu::Reference< cssl::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
     xReferenceResolvedListener = cssu::Reference< cssxc::sax::XReferenceResolvedListener >(
         xMCF->createInstanceWithContext(
-            rtl::OUString::createFromAscii(SIGNATURECREATOR_COMPONENT), mxCtx),
+            rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SIGNATURECREATOR_COMPONENT)), mxCtx),
         cssu::UNO_QUERY);
     
     cssu::Reference<cssl::XInitialization> xInitialization(xReferenceResolvedListener, cssu::UNO_QUERY);
diff --git a/xmlsecurity/source/helper/xsecverify.cxx b/xmlsecurity/source/helper/xsecverify.cxx
index a55e4fc..39c93cd 100644
--- a/xmlsecurity/source/helper/xsecverify.cxx
+++ b/xmlsecurity/source/helper/xsecverify.cxx
@@ -71,7 +71,7 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
     cssu::Reference< cssl::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
     xReferenceResolvedListener = cssu::Reference< cssxc::sax::XReferenceResolvedListener >(
         xMCF->createInstanceWithContext(
-            rtl::OUString::createFromAscii( SIGNATUREVERIFIER_COMPONENT ), mxCtx),
+            rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SIGNATUREVERIFIER_COMPONENT )), mxCtx),
         cssu::UNO_QUERY);
     
     cssu::Reference<cssl::XInitialization> xInitialization(xReferenceResolvedListener, cssu::UNO_QUERY);
diff --git a/xmlsecurity/source/xmlsec/certvalidity.cxx b/xmlsecurity/source/xmlsec/certvalidity.cxx
index 2ce5c14..84d3665 100644
--- a/xmlsecurity/source/xmlsec/certvalidity.cxx
+++ b/xmlsecurity/source/xmlsec/certvalidity.cxx
@@ -57,41 +57,41 @@ rtl::OUString certificateValidityToOUString( ::sal_Int32 certValidity ) {
     OUString aValidity ;
 
     if( (certValidity & CertificateValidity::VALID) == CertificateValidity::VALID ) {
-        aValidity = OUString::createFromAscii( ( const char* )VALID_STR ) ;
+        aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(VALID_STR )) ;
     } else if( ( certValidity & CertificateValidity::INVALID ) == CertificateValidity::INVALID ) {
-         aValidity = OUString::createFromAscii( ( const char* )INVALID_STR ) ;
+         aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(INVALID_STR )) ;
     } else if( ( certValidity &  CertificateValidity::UNTRUSTED ) ==  CertificateValidity::UNTRUSTED ) {
-         aValidity = OUString::createFromAscii( ( const char* )UNTRUSTED_STR ) ;
+         aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(UNTRUSTED_STR )) ;
     } else if( ( certValidity & CertificateValidity::TIME_INVALID ) == CertificateValidity::TIME_INVALID ) {
-         aValidity = OUString::createFromAscii( ( const char* )TIME_INVALID_STR ) ;
+         aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(TIME_INVALID_STR )) ;
     } else if( ( certValidity & CertificateValidity::NOT_TIME_NESTED ) == CertificateValidity::NOT_TIME_NESTED ) {
-         aValidity = OUString::createFromAscii( ( const char* )NOT_NESTED_TIME_STR ) ;         
+         aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(NOT_NESTED_TIME_STR )) ;
     } else if( ( certValidity & CertificateValidity::REVOKED ) == CertificateValidity::REVOKED ) {
-         aValidity = OUString::createFromAscii( ( const char* )REVOKED_STR ) ;
+         aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(REVOKED_STR )) ;
     } else if( ( certValidity &  CertificateValidity::UNKNOWN_REVOKATION ) == CertificateValidity::UNKNOWN_REVOKATION ) {
-         aValidity = OUString::createFromAscii( ( const char* )UNKNOWN_REVOKATION_STR ) ;
+         aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(UNKNOWN_REVOKATION_STR )) ;
     } else if( ( certValidity &  CertificateValidity::SIGNATURE_INVALID ) == CertificateValidity::SIGNATURE_INVALID ) {
-         aValidity = OUString::createFromAscii( ( const char* )SIGNATURE_INVALID_STR ) ;
+         aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(SIGNATURE_INVALID_STR )) ;
     } else if( ( certValidity &  CertificateValidity::EXTENSION_INVALID ) == CertificateValidity::EXTENSION_INVALID ) {
-         aValidity = OUString::createFromAscii( ( const char* )EXTENSION_INVALID_STR ) ;
+         aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(EXTENSION_INVALID_STR )) ;
     } else if( ( certValidity &  CertificateValidity::EXTENSION_UNKNOWN ) == CertificateValidity::EXTENSION_UNKNOWN ) {
-         aValidity = OUString::createFromAscii( ( const char* )EXTENSION_UNKNOWN_STR ) ;
+         aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(EXTENSION_UNKNOWN_STR )) ;
     } else if( ( certValidity &  CertificateValidity::ISSUER_UNKNOWN ) == CertificateValidity::ISSUER_UNKNOWN ) {
-         aValidity = OUString::createFromAscii( ( const char* )ISSUER_UNKNOWN_STR ) ;
+         aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(ISSUER_UNKNOWN_STR )) ;
     } else if( ( certValidity &  CertificateValidity::ISSUER_UNTRUSTED ) == CertificateValidity::ISSUER_UNTRUSTED ) {
-         aValidity = OUString::createFromAscii( ( const char* )ISSUER_UNTRUSTED_STR ) ;
+         aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(ISSUER_UNTRUSTED_STR )) ;
     } else if( ( certValidity &  CertificateValidity::ISSUER_INVALID ) == CertificateValidity::ISSUER_INVALID ) {
-         aValidity = OUString::createFromAscii( ( const char* )ISSUER_INVALID_STR ) ;
+         aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(ISSUER_INVALID_STR )) ;
     } else if( ( certValidity &  CertificateValidity::ROOT_UNKNOWN ) == CertificateValidity::ROOT_UNKNOWN ) {
-         aValidity = OUString::createFromAscii( ( const char* )ROOT_UNKNOWN_STR ) ;
+         aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(ROOT_UNKNOWN_STR )) ;
     } else if( ( certValidity &  CertificateValidity::ROOT_UNTRUSTED ) == CertificateValidity::ROOT_UNTRUSTED ) {
-         aValidity = OUString::createFromAscii( ( const char* )ROOT_UNTRUSTED_STR ) ;
+         aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(ROOT_UNTRUSTED_STR )) ;
     } else if( ( certValidity &  CertificateValidity::ROOT_INVALID ) == CertificateValidity::ROOT_INVALID ) {
-         aValidity = OUString::createFromAscii( ( const char* )ROOT_INVALID_STR ) ;
+         aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(ROOT_INVALID_STR )) ;
     } else if( ( certValidity &  CertificateValidity::CHAIN_INCOMPLETE ) == CertificateValidity::CHAIN_INCOMPLETE ) {
-         aValidity = OUString::createFromAscii( ( const char* )CHAIN_INCOMPLETE_STR ) ;
+         aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(CHAIN_INCOMPLETE_STR )) ;
     } else {
-         aValidity = OUString::createFromAscii( ( const char* )INVALID_STR ) ;
+         aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(INVALID_STR )) ;
     }
 
     return aValidity ;
diff --git a/xmlsecurity/tools/demo/performance.cxx b/xmlsecurity/tools/demo/performance.cxx
index 8f1aee8..b3cd601 100644
--- a/xmlsecurity/tools/demo/performance.cxx
+++ b/xmlsecurity/tools/demo/performance.cxx
@@ -469,16 +469,16 @@ rtl::OUString XSecTester::parseFile(
         
         if (bIsJavaBased)
         {
-            SEInitializer_comp = rtl::OUString::createFromAscii( SEINITIALIZER_JAVA_COMPONENT );
-            XMLSignature_comp = rtl::OUString::createFromAscii( XMLSIGNATURE_JAVA_COMPONENT);
-            m_ouXMLDocumentWrapperComponentName = rtl::OUString::createFromAscii( XMLDOCUMENTWRAPPER_JAVA_COMPONENT );
+            SEInitializer_comp = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SEINITIALIZER_JAVA_COMPONENT ));
+            XMLSignature_comp = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XMLSIGNATURE_JAVA_COMPONENT));
+            m_ouXMLDocumentWrapperComponentName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XMLDOCUMENTWRAPPER_JAVA_COMPONENT ));
             tokenPath = m_ouJavaCryptokenDir;
         }
         else
         {
-            SEInitializer_comp = rtl::OUString::createFromAscii( SEINITIALIZER_C_COMPONENT );
-            XMLSignature_comp = rtl::OUString::createFromAscii( XMLSIGNATURE_C_COMPONENT);
-            m_ouXMLDocumentWrapperComponentName = rtl::OUString::createFromAscii( XMLDOCUMENT_C_COMPONENT );
+            SEInitializer_comp = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SEINITIALIZER_C_COMPONENT ));
+            XMLSignature_comp = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XMLSIGNATURE_C_COMPONENT));
+            m_ouXMLDocumentWrapperComponentName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XMLDOCUMENT_C_COMPONENT ));
             tokenPath = m_ouCCryptokenDir;
         }
         
@@ -890,7 +890,7 @@ SignatureEntity::SignatureEntity(
         m_xSAXEventKeeper->setSecurityId(m_nSignatureElementCollectorId, m_nSecurityId);
 
         m_xReferenceListener = cssu::Reference< cssxc::sax::XReferenceResolvedListener >(
-            mxMSF->createInstance( rtl::OUString::createFromAscii( SIGNATURECREATOR_COMPONENT )),
+            mxMSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SIGNATURECREATOR_COMPONENT ))),
             cssu::UNO_QUERY);
 
         cssu::Reference<cssl::XInitialization> xInitialization(m_xReferenceListener, cssu::UNO_QUERY);
@@ -929,7 +929,7 @@ SignatureEntity::SignatureEntity(
         m_xSAXEventKeeper->setSecurityId(m_nSignatureElementCollectorId, m_nSecurityId);
 
         m_xReferenceListener = cssu::Reference< cssxc::sax::XReferenceResolvedListener >(
-            mxMSF->createInstance( rtl::OUString::createFromAscii( SIGNATUREVERIFIER_COMPONENT )),
+            mxMSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SIGNATUREVERIFIER_COMPONENT ))),
             cssu::UNO_QUERY);	
         
         cssu::Reference<cssl::XInitialization> xInitialization(m_xReferenceListener, cssu::UNO_QUERY);
@@ -1186,7 +1186,7 @@ bool XSecTester::foundSecurityRelated()
              cssu::UNO_QUERY);
 
         m_xSAXEventKeeper = cssu::Reference< cssxc::sax::XSecuritySAXEventKeeper >
-            (mxMSF->createInstance( rtl::OUString::createFromAscii( SAXEVENTKEEPER_COMPONENT )),
+            (mxMSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SAXEVENTKEEPER_COMPONENT ))),
              cssu::UNO_QUERY);
 
         cssu::Reference<cssl::XInitialization> xInitialization(m_xSAXEventKeeper,  cssu::UNO_QUERY);
diff --git a/xmlsecurity/tools/standalone/csfit/helper.cxx b/xmlsecurity/tools/standalone/csfit/helper.cxx
index b136e4d..750f5db 100644
--- a/xmlsecurity/tools/standalone/csfit/helper.cxx
+++ b/xmlsecurity/tools/standalone/csfit/helper.cxx
@@ -137,8 +137,8 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext
                 "Cannot get multi-service factory" ) ;
 
             Sequence< Any > args( 2 ) ;
-            args[ 0 ] <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY1_LOCAL ) ;
-            args[ 1 ] <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY2_OFFICE ) ;
+            args[ 0 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY1_LOCAL )) ;
+            args[ 1 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY2_OFFICE )) ;
             if( ! ::ucb::ContentBroker::initialize( xSvmg , args ) ) {
                 throw RuntimeException( OUString(RTL_CONSTASCII_USTRINGPARAM("Cannot inlitialize ContentBroker")) , Reference< XInterface >() , Any() ) ;
             }
diff --git a/xmlsecurity/tools/standalone/mscsfit/helper.cxx b/xmlsecurity/tools/standalone/mscsfit/helper.cxx
index 6db4d7b..43d0a6c 100644
--- a/xmlsecurity/tools/standalone/mscsfit/helper.cxx
+++ b/xmlsecurity/tools/standalone/mscsfit/helper.cxx
@@ -105,8 +105,8 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext
                 "Cannot get multi-service factory" ) ;
 
             Sequence< Any > args( 2 ) ;
-            args[ 0 ] <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY1_LOCAL ) ;
-            args[ 1 ] <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY2_OFFICE ) ;
+            args[ 0 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY1_LOCAL )) ;
+            args[ 1 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY2_OFFICE )) ;
             if( ! ::ucb::ContentBroker::initialize( xSvmg , args ) ) {
                 throw RuntimeException( OUString(RTL_CONSTASCII_USTRINGPARAM("Cannot inlitialize ContentBroker")) , Reference< XInterface >() , Any() ) ;
             }
diff --git a/xmlsecurity/workben/signaturetest.cxx b/xmlsecurity/workben/signaturetest.cxx
index 0d2e507..0e3c6a0 100644
--- a/xmlsecurity/workben/signaturetest.cxx
+++ b/xmlsecurity/workben/signaturetest.cxx
@@ -110,8 +110,8 @@ void Main();
 
         // Init USB
         uno::Sequence< uno::Any > aArgs( 2 );
-        aArgs[ 0 ] <<= rtl::OUString::createFromAscii( UCB_CONFIGURATION_KEY1_LOCAL );
-        aArgs[ 1 ] <<= rtl::OUString::createFromAscii( UCB_CONFIGURATION_KEY2_OFFICE );
+        aArgs[ 0 ] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY1_LOCAL ));
+        aArgs[ 1 ] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY2_OFFICE ));
         sal_Bool bSuccess = ::ucb::ContentBroker::initialize( xMSF, aArgs );
         if ( !bSuccess )
         {


More information about the Libreoffice-commits mailing list