Hello,

Here is a patch for some files.

(LGPLv3+ / MPL)

Caolán: there's still this :
writer/sw/inc/unomid.h:#define C2U(cChar) rtl::OUString::createFromAscii( cChar )

There a lot of files that use this macro.
Could you give details about this part of your last message ? (how do you do this)

after passing a build with the SAL_N_ELEMENTS
as compile-time test

Thank you in advance.

Julien
commit 5576e38145fc8a4f34e3a435986e9b562ac2a49b
Author: serval <serval2...@yahoo.fr>
Date:   Wed Dec 22 22:14:03 2010 +0100

    RTL_CONSTASCII_USTRINGPARAM

diff --git a/linguistic/inc/misc.hxx b/linguistic/inc/misc.hxx
index e28a4f1..5853e81 100644
--- a/linguistic/inc/misc.hxx
+++ b/linguistic/inc/misc.hxx
@@ -77,7 +77,7 @@ namespace linguistic
 {
 
 // ascii to OUString conversion
-#define A2OU(x) ::rtl::OUString::createFromAscii( x )
+#define A2OU(x) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( x ))
 
 /// Flags to be used with the multi-path related functions
 /// @see GetDictionaryPaths, GetLinguisticPaths
diff --git a/linguistic/source/iprcache.cxx b/linguistic/source/iprcache.cxx
index f831505..185e1e7 100644
--- a/linguistic/source/iprcache.cxx
+++ b/linguistic/source/iprcache.cxx
@@ -100,7 +100,7 @@ static void lcl_AddAsPropertyChangeListener(
         for (int i = 0;  i < NUM_FLUSH_PROPS;  ++i)
         {
             rPropSet->addPropertyChangeListener( 
-                    A2OU(aFlushProperties[i].pPropName), xListener );
+                    
::rtl::OUString::createFromAscii(aFlushProperties[i].pPropName), xListener );
         }
     }
 }
@@ -115,7 +115,7 @@ static void lcl_RemoveAsPropertyChangeListener(
         for (int i = 0;  i < NUM_FLUSH_PROPS;  ++i)
         {
             rPropSet->removePropertyChangeListener( 
-                    A2OU(aFlushProperties[i].pPropName), xListener );
+                    
::rtl::OUString::createFromAscii(aFlushProperties[i].pPropName), xListener );
         }
     }
 }
diff --git a/linguistic/source/lngprophelp.cxx 
b/linguistic/source/lngprophelp.cxx
index 5ccd55c..5a81077 100644
--- a/linguistic/source/lngprophelp.cxx
+++ b/linguistic/source/lngprophelp.cxx
@@ -82,7 +82,7 @@ PropertyChgHelper::PropertyChgHelper(
     OUString *pName = aPropNames.getArray();
     for (INT32 i = 0;  i < nCHCount;  ++i)
     {
-        pName[i] = A2OU( aCH[i] );
+        pName[i] = ::rtl::OUString::createFromAscii( aCH[i] );
     }
 
     SetDefaultValues();
@@ -119,7 +119,8 @@ void PropertyChgHelper::AddPropNames( const char 
*pNewNames[], INT32 nCount )
         OUString *pName = GetPropNames().getArray();
         for (INT32 i = 0;  i < nCount;  ++i)
         {
-            pName[ nLen + i ] = A2OU( pNewNames[ i ] );
+            pName[ nLen + i ] = ::rtl::OUString::createFromAscii( pNewNames[ i 
] );
+
         }
     }
 }
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 4b32b4d..a46918c 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -1653,7 +1653,7 @@ BOOL LngSvcMgr::SaveCfgSvcs( const String &rServiceName )
         {
             DBG_ASSERT( 0, "node name missing" );
         }
-        OUString aNodeName( A2OU(pNodeName) );
+        OUString aNodeName( ::rtl::OUString::createFromAscii(pNodeName) );
 
         for (INT32 i = 0;  i < nLen;  ++i)
         {
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index edfdaac..a107d7f 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -892,7 +892,7 @@ uno::Reference< XInterface > GetOneInstanceService( const 
char *pServiceName )
         {
             try
             {
-                xRef = xMgr->createInstance( A2OU( pServiceName ) );
+                xRef = xMgr->createInstance( ::rtl::OUString::createFromAscii( 
pServiceName ) );
             }
             catch (uno::Exception &)
             {
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to