[Libreoffice-commits] .: 4 commits - cppu/source sal/inc sal/osl sal/rtl stoc/source

Caolán McNamara caolan at kemper.freedesktop.org
Sun Oct 24 13:06:43 PDT 2010


 cppu/source/typelib/typelib.cxx                                   |    2 -
 sal/inc/osl/socket_decl.hxx                                       |    2 -
 sal/osl/unx/file_url.cxx                                          |    2 -
 sal/rtl/source/bootstrap.cxx                                      |    2 -
 stoc/source/defaultregistry/defaultregistry.cxx                   |    4 +-
 stoc/source/inspect/introspection.cxx                             |    6 ++--
 stoc/source/javavm/javavm.cxx                                     |    2 -
 stoc/source/namingservice/namingservice.cxx                       |    2 -
 stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx          |    4 +-
 stoc/source/tdmanager/tdmgr_tdenumeration.cxx                     |    8 ++---
 stoc/source/uriproc/ExternalUriReferenceTranslator.cxx            |   10 +++----
 stoc/source/uriproc/UriReferenceFactory.cxx                       |   14 +++++-----
 stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx |   12 ++++----
 stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx          |   10 +++----
 14 files changed, 40 insertions(+), 40 deletions(-)

New commits:
commit 7007c9943026a4106763a8f362c2314a6a46ec4a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Oct 24 20:47:49 2010 +0100

    micro opts

diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx
index ab40708..6b78d55 100644
--- a/stoc/source/defaultregistry/defaultregistry.cxx
+++ b/stoc/source/defaultregistry/defaultregistry.cxx
@@ -1288,7 +1288,7 @@ void SAL_CALL NestedRegistryImpl::open( const OUString&, sal_Bool, sal_Bool )
     throw(InvalidRegistryException, RuntimeException)
 {
     throw InvalidRegistryException( 
-            OUString::createFromAscii("the 'open' method is not specified for a nested registry"), 
+            OUString(RTL_CONSTASCII_USTRINGPARAM("the 'open' method is not specified for a nested registry")),
             Reference< XInterface >() );
 }	
 
@@ -1334,7 +1334,7 @@ void SAL_CALL NestedRegistryImpl::destroy(  )
     throw(InvalidRegistryException, RuntimeException)
 {
     throw InvalidRegistryException( 
-            OUString::createFromAscii("the 'destroy' method is not specified for a nested registry"), 
+            OUString(RTL_CONSTASCII_USTRINGPARAM("the 'destroy' method is not specified for a nested registry")),
             Reference< XInterface >() );
 }	
 
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index 3cc94f1..e41ef82 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -1928,14 +1928,14 @@ Sequence< OUString > ImplIntrospection::getSupportedServiceNames(void) throw()
 // Helper XServiceInfo
 OUString ImplIntrospection::getImplementationName_Static(  ) 
 {
-    return OUString::createFromAscii( IMPLEMENTATION_NAME );
+    return OUString(RTL_CONSTASCII_USTRINGPARAM(IMPLEMENTATION_NAME));
 }
 
 // ORegistryServiceManager_Static
 Sequence< OUString > ImplIntrospection::getSupportedServiceNames_Static(void) throw()
 {
     Sequence< OUString > aSNS( 1 );
-    aSNS.getArray()[0] = OUString::createFromAscii( SERVICE_NAME );
+    aSNS.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM(SERVICE_NAME));
     return aSNS;
 }
 
@@ -3074,7 +3074,7 @@ sal_Bool SAL_CALL component_writeInfo( void *, void * pRegistryKey )
         {
             Reference< XRegistryKey > xNewKey(
                 reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
-                    OUString::createFromAscii( "/" IMPLEMENTATION_NAME "/UNO/SERVICES" ) ) );
+                    OUString(RTL_CONSTASCII_USTRINGPARAM("/" IMPLEMENTATION_NAME "/UNO/SERVICES" )) ) );
 
             const Sequence< OUString > & rSNL =
                 stoc_inspect::ImplIntrospection::getSupportedServiceNames_Static();
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index 9a3215a..c19f286 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -543,7 +543,7 @@ static void setTimeZone(stoc_javavm::JVM * pjvm) throw() {
 #endif
 
     if (!strcmp(TIMEZONE, p))
-        pjvm->pushProp(rtl::OUString::createFromAscii("user.timezone=ECT"));
+        pjvm->pushProp(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("user.timezone=ECT")));
 }
 
 void initVMConfiguration(
diff --git a/stoc/source/namingservice/namingservice.cxx b/stoc/source/namingservice/namingservice.cxx
index d053d40..3444978 100644
--- a/stoc/source/namingservice/namingservice.cxx
+++ b/stoc/source/namingservice/namingservice.cxx
@@ -130,7 +130,7 @@ public:
     throw(::com::sun::star::uno::RuntimeException);
     static Sequence< OUString > SAL_CALL getSupportedServiceNames_Static()
     {
-        OUString aStr( OUString::createFromAscii( SERVICENAME ) );
+        OUString aStr( OUString(RTL_CONSTASCII_USTRINGPARAM(SERVICENAME)) );
         return Sequence< OUString >( &aStr, 1 );
     }
 
diff --git a/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx b/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx
index e93ca12..ab0c586 100644
--- a/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx
+++ b/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx
@@ -290,8 +290,8 @@ TypeDescriptionEnumerationImpl::nextTypeDescription()
         return xTD;
 
     throw container::NoSuchElementException(
-        rtl::OUString::createFromAscii(
-            "No further elements in enumeration!" ),
+        rtl::OUString(
+            RTL_CONSTASCII_USTRINGPARAM("No further elements in enumeration!") ),
         static_cast< cppu::OWeakObject * >( this  ) );
 }
 
diff --git a/stoc/source/tdmanager/tdmgr_tdenumeration.cxx b/stoc/source/tdmanager/tdmgr_tdenumeration.cxx
index 8e52c52..39f1045 100644
--- a/stoc/source/tdmanager/tdmgr_tdenumeration.cxx
+++ b/stoc/source/tdmanager/tdmgr_tdenumeration.cxx
@@ -99,8 +99,8 @@ uno::Any SAL_CALL TypeDescriptionEnumerationImpl::nextElement()
         return xEnum->nextElement();
 
     throw container::NoSuchElementException(
-        rtl::OUString::createFromAscii(
-            "No further elements in enumeration!" ),
+        rtl::OUString(
+            RTL_CONSTASCII_USTRINGPARAM("No further elements in enumeration!") ),
         static_cast< cppu::OWeakObject * >( this  ) );
 }
 
@@ -122,8 +122,8 @@ TypeDescriptionEnumerationImpl::nextTypeDescription()
         return xEnum->nextTypeDescription();
 
     throw container::NoSuchElementException(
-        rtl::OUString::createFromAscii(
-            "No further elements in enumeration!" ),
+        rtl::OUString(
+            RTL_CONSTASCII_USTRINGPARAM("No further elements in enumeration!") ),
         static_cast< cppu::OWeakObject * >( this  ) );
 }
 
diff --git a/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx b/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx
index d044069..08722a9 100644
--- a/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx
+++ b/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx
@@ -222,19 +222,19 @@ css::uno::Reference< css::uno::XInterface > create(
         return static_cast< cppu::OWeakObject * >(new Translator(context));
     } catch (std::bad_alloc &) {
         throw css::uno::RuntimeException(
-            rtl::OUString::createFromAscii("std::bad_alloc"), 0);
+            rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("std::bad_alloc")), 0);
     }
 }
 
 rtl::OUString getImplementationName() {
-    return rtl::OUString::createFromAscii(
-        "com.sun.star.comp.uri.ExternalUriReferenceTranslator");
+    return rtl::OUString(
+        RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.uri.ExternalUriReferenceTranslator"));
 }
 
 css::uno::Sequence< rtl::OUString > getSupportedServiceNames() {
     css::uno::Sequence< rtl::OUString > s(1);
-    s[0] = rtl::OUString::createFromAscii(
-        "com.sun.star.uri.ExternalUriReferenceTranslator");
+    s[0] = rtl::OUString(
+        RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uri.ExternalUriReferenceTranslator"));
     return s;
 }
 
diff --git a/stoc/source/uriproc/UriReferenceFactory.cxx b/stoc/source/uriproc/UriReferenceFactory.cxx
index 8a9c111..bbcfa17 100644
--- a/stoc/source/uriproc/UriReferenceFactory.cxx
+++ b/stoc/source/uriproc/UriReferenceFactory.cxx
@@ -422,7 +422,7 @@ css::uno::Reference< css::uri::XUriReference > Factory::parse(
                 throw;
             } catch (css::uno::Exception & e) {
                 throw css::lang::WrappedTargetRuntimeException(
-                    rtl::OUString::createFromAscii("creating service ")
+                    rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("creating service "))
                         + serviceName,
                     static_cast< cppu::OWeakObject * >(this),
                     css::uno::makeAny(e)); //TODO: preserve type of e
@@ -441,7 +441,7 @@ css::uno::Reference< css::uri::XUriReference > Factory::parse(
             uriRef = parseGeneric(scheme, schemeSpecificPart);
         } catch (std::bad_alloc &) {
             throw css::uno::RuntimeException(
-                rtl::OUString::createFromAscii("std::bad_alloc"),
+                rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("std::bad_alloc")),
                 static_cast< cppu::OWeakObject * >(this));
         }
     }
@@ -706,19 +706,19 @@ css::uno::Reference< css::uno::XInterface > create(
         return static_cast< cppu::OWeakObject * >(new Factory(context));
     } catch (std::bad_alloc &) {
         throw css::uno::RuntimeException(
-            rtl::OUString::createFromAscii("std::bad_alloc"), 0);
+            rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("std::bad_alloc")), 0);
     }
 }
 
 rtl::OUString getImplementationName() {
-    return rtl::OUString::createFromAscii(
-        "com.sun.star.comp.uri.UriReferenceFactory");
+    return rtl::OUString(
+        RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.uri.UriReferenceFactory"));
 }
 
 css::uno::Sequence< rtl::OUString > getSupportedServiceNames() {
     css::uno::Sequence< rtl::OUString > s(1);
-    s[0] = rtl::OUString::createFromAscii(
-        "com.sun.star.uri.UriReferenceFactory");
+    s[0] = rtl::OUString(
+        RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uri.UriReferenceFactory"));
     return s;
 }
 
diff --git a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx
index 75447fc..581358b 100644
--- a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx
+++ b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx
@@ -449,7 +449,7 @@ Parser::parse(
         return new UrlReference(scheme, schemeSpecificPart);
     } catch (std::bad_alloc &) {
         throw css::uno::RuntimeException(
-            rtl::OUString::createFromAscii("std::bad_alloc"), 0);
+            rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("std::bad_alloc")), 0);
     }
 }
 
@@ -467,19 +467,19 @@ css::uno::Reference< css::uno::XInterface > create(
         return static_cast< cppu::OWeakObject * >(new Parser);
     } catch (std::bad_alloc &) {
         throw css::uno::RuntimeException(
-            rtl::OUString::createFromAscii("std::bad_alloc"), 0);
+            rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("std::bad_alloc")), 0);
     }
 }
 
 rtl::OUString getImplementationName() {
-    return rtl::OUString::createFromAscii(
-        "com.sun.star.comp.uri.UriSchemeParser_vndDOTsunDOTstarDOTscript");
+    return rtl::OUString(
+        RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.uri.UriSchemeParser_vndDOTsunDOTstarDOTscript"));
 }
 
 css::uno::Sequence< rtl::OUString > getSupportedServiceNames() {
     css::uno::Sequence< rtl::OUString > s(1);
-    s[0] = rtl::OUString::createFromAscii(
-        "com.sun.star.uri.UriSchemeParser_vndDOTsunDOTstarDOTscript");
+    s[0] = rtl::OUString(
+        RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uri.UriSchemeParser_vndDOTsunDOTstarDOTscript"));
     return s;
 }
 
diff --git a/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx b/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx
index 2839729..f117b5b 100644
--- a/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx
+++ b/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx
@@ -149,19 +149,19 @@ css::uno::Reference< css::uno::XInterface > create(
         return static_cast< cppu::OWeakObject * >(new Factory(context));
     } catch (std::bad_alloc &) {
         throw css::uno::RuntimeException(
-            rtl::OUString::createFromAscii("std::bad_alloc"), 0);
+            rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("std::bad_alloc")), 0);
     }
 }
 
 rtl::OUString getImplementationName() {
-    return rtl::OUString::createFromAscii(
-        "com.sun.star.comp.uri.VndSunStarPkgUrlReferenceFactory");
+    return rtl::OUString(
+        RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.uri.VndSunStarPkgUrlReferenceFactory"));
 }
 
 css::uno::Sequence< rtl::OUString > getSupportedServiceNames() {
     css::uno::Sequence< rtl::OUString > s(1);
-    s[0] = rtl::OUString::createFromAscii(
-        "com.sun.star.uri.VndSunStarPkgUrlReferenceFactory");
+    s[0] = rtl::OUString(
+        RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uri.VndSunStarPkgUrlReferenceFactory"));
     return s;
 }
 
commit 867ee3c393a5725ef5a661844b0384e4e2352309
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Oct 24 20:46:45 2010 +0100

    microopt

diff --git a/sal/inc/osl/socket_decl.hxx b/sal/inc/osl/socket_decl.hxx
index d24090f..051384c 100644
--- a/sal/inc/osl/socket_decl.hxx
+++ b/sal/inc/osl/socket_decl.hxx
@@ -165,7 +165,7 @@ namespace osl
         */
         static inline sal_Int32 SAL_CALL getServicePort(
             const ::rtl::OUString& strServiceName,
-            const ::rtl::OUString & strProtocolName= ::rtl::OUString::createFromAscii( "tcp" ) );
+            const ::rtl::OUString & strProtocolName= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("tcp")) );
     };
     
 
commit fbef539825d6260b4508c67d4c036379bc23213c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Oct 24 20:36:55 2010 +0100

    micro opts

diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index db81932..10a7cb1 100644
--- a/cppu/source/typelib/typelib.cxx
+++ b/cppu/source/typelib/typelib.cxx
@@ -2202,7 +2202,7 @@ extern "C" void SAL_CALL typelib_typedescription_getByName(
         {
             // Check for derived interface member type:
             sal_Int32 i1 = name.lastIndexOf(
-                rtl::OUString::createFromAscii(":@"));
+                rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":@")));
             if (i1 >= 0) {
                 sal_Int32 i2 = i1 + RTL_CONSTASCII_LENGTH(":@");
                 sal_Int32 i3 = name.indexOf(',', i2);
commit d049754b32bccc39f7d05ff8f35fb17e4382c31d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Oct 24 20:34:11 2010 +0100

    micro opts

diff --git a/sal/osl/unx/file_url.cxx b/sal/osl/unx/file_url.cxx
index 2f8d233..3c88641 100644
--- a/sal/osl/unx/file_url.cxx
+++ b/sal/osl/unx/file_url.cxx
@@ -765,7 +765,7 @@ namespace /* private */
     bool find_in_PATH(const rtl::OUString& file_path, rtl::OUString& result)
     {	
         bool          bfound = false;		
-        rtl::OUString path   = rtl::OUString::createFromAscii("PATH");
+        rtl::OUString path(RTL_CONSTASCII_USTRINGPARAM("PATH"));
         rtl::OUString env_path;
         
         if (osl_Process_E_None == osl_getEnvironment(path.pData, &env_path.pData))
diff --git a/sal/rtl/source/bootstrap.cxx b/sal/rtl/source/bootstrap.cxx
index 7ae2d93..7f22ac2 100644
--- a/sal/rtl/source/bootstrap.cxx
+++ b/sal/rtl/source/bootstrap.cxx
@@ -273,7 +273,7 @@ static OUString & getIniFileName_Impl()
             && fileName.copy(fileName.getLength() - progExt.getLength()).equalsIgnoreAsciiCase(progExt))
                 fileName = fileName.copy(0, fileName.getLength() - progExt.getLength());
 
-            progExt = OUString::createFromAscii(".exe");
+            progExt = OUString(RTL_CONSTASCII_USTRINGPARAM(".exe"));
             if(fileName.getLength() > progExt.getLength()
             && fileName.copy(fileName.getLength() - progExt.getLength()).equalsIgnoreAsciiCase(progExt))
                 fileName = fileName.copy(0, fileName.getLength() - progExt.getLength());


More information about the Libreoffice-commits mailing list