Date: prev next · Thread: first prev next last
2010 Archives by date, by thread · List index


regards
From b82fc44186adb943a95eeaa369d49719ea47fd6c Mon Sep 17 00:00:00 2001
From: pjacquod <pjacquod@alumni.ethz.ch>
Date: Tue, 16 Nov 2010 00:09:27 +0100
Subject: [PATCH 08/12] RTL_CONSTASCII_USTRINGPARAM in components misc

components/forms/source/misc should be OK now
---
 forms/source/misc/InterfaceContainer.cxx |   10 +++++-----
 forms/source/misc/limitedformats.cxx     |    6 +++---
 forms/source/misc/services.cxx           |    8 ++++----
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx
index fd54c4c..400f2d7 100644
--- a/forms/source/misc/InterfaceContainer.cxx
+++ b/forms/source/misc/InterfaceContainer.cxx
@@ -96,7 +96,7 @@ lcl_hasVbaEvents( const Sequence< ScriptEventDescriptor >& sEvents  )
     const ScriptEventDescriptor* pEnd = ( pDesc + sEvents.getLength() );
     for ( ; pDesc != pEnd; ++pDesc )
     {
-        if ( pDesc->ScriptType.equals( rtl::OUString::createFromAscii( "VBAInterop" ) ) )
+        if ( pDesc->ScriptType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VBAInterop") ) ) 
)
             return true;
     }
     return false;
@@ -112,7 +112,7 @@ lcl_stripVbaEvents( const Sequence< ScriptEventDescriptor >& sEvents )
     sal_Int32 nCopied = 0;
     for ( ; pDesc != pEnd; ++pDesc )
     {
-        if ( !pDesc->ScriptType.equals( rtl::OUString::createFromAscii( "VBAInterop" ) ) )
+        if ( !pDesc->ScriptType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VBAInterop") ) 
) )
         {
             sStripped[ nCopied++ ] = *pDesc;
         }
@@ -134,7 +134,7 @@ void OInterfaceContainer::impl_addVbEvents_nolck_nothrow(  const sal_Int32 i_nIn
                 break;
 
             Reference< XMultiServiceFactory > xDocFac( xDoc, UNO_QUERY_THROW );
-            Reference< XCodeNameQuery > xNameQuery( xDocFac->createInstance( 
rtl::OUString::createFromAscii( "ooo.vba.VBACodeNameProvider" ) ), UNO_QUERY );
+            Reference< XCodeNameQuery > xNameQuery( xDocFac->createInstance( 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo.vba.VBACodeNameProvider") ) ), UNO_QUERY );
             if ( !xNameQuery.is() )
                 break;
 
@@ -152,9 +152,9 @@ void OInterfaceContainer::impl_addVbEvents_nolck_nothrow(  const sal_Int32 i_nIn
 
             Reference< XPropertySet > xProps( xElement, UNO_QUERY_THROW );
             ::rtl::OUString sServiceName;
-            xProps->getPropertyValue( rtl::OUString::createFromAscii("DefaultControl" ) ) >>= 
sServiceName;
+            xProps->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultControl") 
) ) >>= sServiceName;
 
-            Reference< ooo::vba::XVBAToOOEventDescGen > xDescSupplier( 
m_xServiceFactory->createInstance( rtl::OUString::createFromAscii( "ooo.vba.VBAToOOEventDesc" ) ), 
UNO_QUERY_THROW );
+            Reference< ooo::vba::XVBAToOOEventDescGen > xDescSupplier( 
m_xServiceFactory->createInstance( 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo.vba.VBAToOOEventDesc") ) ), UNO_QUERY_THROW );
             Reference< XInterface > xInterface = m_xServiceFactory->createInstance( sServiceName );
             Sequence< ScriptEventDescriptor > vbaEvents = xDescSupplier->getEventDescriptions( 
xInterface, sCodeName );
             // register the vba script events
diff --git a/forms/source/misc/limitedformats.cxx b/forms/source/misc/limitedformats.cxx
index d63cb79..5951697 100644
--- a/forms/source/misc/limitedformats.cxx
+++ b/forms/source/misc/limitedformats.cxx
@@ -64,8 +64,8 @@ namespace frm
     //---------------------------------------------------------------------
     static const Locale& getLocale(LocaleType _eType)
     {
-        static const Locale s_aEnglishUS( ::rtl::OUString::createFromAscii("en"), 
::rtl::OUString::createFromAscii("us"), ::rtl::OUString() );
-        static const Locale s_aGerman( ::rtl::OUString::createFromAscii("de"), 
::rtl::OUString::createFromAscii("DE"), ::rtl::OUString() );
+        static const Locale s_aEnglishUS( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en") ), 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("us") ), ::rtl::OUString() );
+        static const Locale s_aGerman( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("de") ), 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DE") ), ::rtl::OUString() );
         static const ::rtl::OUString s_sEmptyString;
         static const Locale s_aSystem( s_sEmptyString, s_sEmptyString, s_sEmptyString );
 
@@ -342,7 +342,7 @@ namespace frm
 
             if (!bFoundIt)
             {  // somebody gave us an format which we can't translate
-                ::rtl::OUString sMessage = ::rtl::OUString::createFromAscii("This control supports 
only a very limited number of formats.");
+                ::rtl::OUString sMessage (RTL_CONSTASCII_USTRINGPARAM("This control supports only 
a very limited number of formats.") );
                 throw IllegalArgumentException(sMessage, NULL, 2);
             }
 
diff --git a/forms/source/misc/services.cxx b/forms/source/misc/services.cxx
index a06f4be..844180f 100644
--- a/forms/source/misc/services.cxx
+++ b/forms/source/misc/services.cxx
@@ -134,7 +134,7 @@ void registerClassInfo(
 //.......................................................................................
 #define REGISTER_CLASS_CORE(classImplName) \
     registerClassInfo( \
-        ::rtl::OUString::createFromAscii("com.sun.star.form.") + 
::rtl::OUString::createFromAscii(#classImplName), \
+        ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.") ) + 
::rtl::OUString::createFromAscii(#classImplName), \
         aServices, \
         frm::classImplName##_CreateInstance)
 
@@ -229,7 +229,7 @@ void ensureClassInfos()
     aServices.getArray()[2] = frm::FRM_SUN_COMPONENT_DATABASE_FORMATTEDFIELD;
     aServices.getArray()[3] = frm::BINDABLE_DATABASE_FORMATTED_FIELD;
 
-    
registerClassInfo(::rtl::OUString::createFromAscii("com.sun.star.comp.forms.OFormattedFieldWrapper_ForcedFormatted"),
+    
registerClassInfo(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.forms.OFormattedFieldWrapper_ForcedFormatted")
 ),
         aServices,
         frm::OFormattedFieldWrapper_CreateInstance_ForceFormatted);
 
@@ -287,9 +287,9 @@ void ensureClassInfos()
 //---------------------------------------------------------------------------------------
 void registerServiceProvider(const ::rtl::OUString& _rServiceImplName, const Sequence< 
::rtl::OUString >& _rServices, XRegistryKey* _pKey)
 {
-    ::rtl::OUString sMainKeyName = ::rtl::OUString::createFromAscii("/");
+    ::rtl::OUString sMainKeyName (RTL_CONSTASCII_USTRINGPARAM("/") );
     sMainKeyName += _rServiceImplName;
-    sMainKeyName += ::rtl::OUString::createFromAscii("/UNO/SERVICES");
+    sMainKeyName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES") );
     Reference< XRegistryKey > xNewKey = _pKey->createKey(sMainKeyName);
     OSL_ENSURE(xNewKey.is(), "forms::registerProvider : could not create a registry key !");
     if (!xNewKey.is())
-- 
1.7.1


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.