Hello,

Here is a patch for some files

(LGPLv3+ / MPL)

Julien
commit 63c58944749de8f44dac979eb4e044e2c08120a8
Author: serval <[email protected]>
Date:   Tue Dec 21 22:28:50 2010 +0100

    RTL_CONSTASCII_USTRINGPARAM

diff --git a/linguistic/source/defs.hxx b/linguistic/source/defs.hxx
index af78449..2ead973 100644
--- a/linguistic/source/defs.hxx
+++ b/linguistic/source/defs.hxx
@@ -41,8 +41,6 @@ class SvStream;
 
 ///////////////////////////////////////////////////////////////////////////
 
-#define A2OU(x)        ::rtl::OUString::createFromAscii( x )
-
 typedef boost::shared_ptr< SvStream > SvStreamPtr;
 
 namespace css = ::com::sun::star;
diff --git a/linguistic/workben/sprophelp.cxx b/linguistic/workben/sprophelp.cxx
index 4e57cb2..eba4624 100644
--- a/linguistic/workben/sprophelp.cxx
+++ b/linguistic/workben/sprophelp.cxx
@@ -53,7 +53,7 @@ using namespace com::sun::star::linguistic2;
 using namespace linguistic;
 
 
-#define A2OU(x)        ::rtl::OUString::createFromAscii( x )
+#define A2OU(x)        ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( x ))
 
 ///////////////////////////////////////////////////////////////////////////
 
@@ -70,7 +70,7 @@ PropertyChgHelper::PropertyChgHelper(
     OUString *pName = aPropNames.getArray();
     for (INT32 i = 0;  i < nPropCount;  ++i)
     {
-        pName[i] = A2OU( pPropNames[i] );
+        pName[i] = ::rtl::OUString::createFromAscii( pPropNames[i] );
     }
 }
 
diff --git a/linguistic/workben/sspellimp.hxx b/linguistic/workben/sspellimp.hxx
index 6ad7fe6..ae6655e 100644
--- a/linguistic/workben/sspellimp.hxx
+++ b/linguistic/workben/sspellimp.hxx
@@ -52,9 +52,6 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::linguistic2;
 
-
-#define A2OU(x)        ::rtl::OUString::createFromAscii( x )
-
 ///////////////////////////////////////////////////////////////////////////
 
 
@@ -168,7 +165,7 @@ public:
 
 inline OUString SpellChecker::getImplementationName_Static() throw()
 {
-    return A2OU( "com.sun.star.lingu.examples.SpellChecker" );
+    return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( 
"com.sun.star.lingu.examples.SpellChecker" ));
 }
 
 
diff --git a/scripting/source/inc/util/util.hxx 
b/scripting/source/inc/util/util.hxx
index 442c965..fb3bcb0 100644
--- a/scripting/source/inc/util/util.hxx
+++ b/scripting/source/inc/util/util.hxx
@@ -33,7 +33,7 @@
 #include <rtl/ustrbuf.hxx>
 #include <osl/diagnose.h>
 
-#define OUSTR(x) ::rtl::OUString( ::rtl::OUString::createFromAscii(x) )
+#define OUSTR(x) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(x) )
 
 namespace scripting_util
 {
@@ -43,7 +43,7 @@ namespace scripting_util
     
         if(!xRef.is())
         {
-            throw ::com::sun::star::uno::RuntimeException(OUSTR(Msg), 
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >());
+            throw 
::com::sun::star::uno::RuntimeException(::rtl::OUString::createFromAscii(Msg), 
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >());
         }
     }
 }
commit ad010eab30953d6c11c9f6b104e42071dff82978
Author: serval <[email protected]>
Date:   Tue Dec 21 22:29:27 2010 +0100

    RTL_CONSTASCII_USTRINGPARAM

diff --git a/dtrans/source/win32/ftransl/ftransl.cxx 
b/dtrans/source/win32/ftransl/ftransl.cxx
index fd7ed18..ec17b05 100644
--- a/dtrans/source/win32/ftransl/ftransl.cxx
+++ b/dtrans/source/win32/ftransl/ftransl.cxx
@@ -58,8 +58,7 @@
 #define CPPUTYPE_DEFAULT                 CPPUTYPE_SEQSALINT8
 #define CPPUTYPE_OUSTR                   getCppuType( (const ::rtl::OUString*) 
0 )
 #define CPPUTYPE_SALINT32         getCppuType( ( sal_Int32 * ) 0 )
-#define OUSTR( str )                     OUString::createFromAscii( #str )
-#define OUSTR_( str )             OUString::createFromAscii( str )
+#define OUSTR( str )                     OUString(RTL_CONSTASCII_USTRINGPARAM( 
#str ))
 #define EMPTY_OUSTR               OUString()
 
 const rtl::OUString Windows_FormatName 
(RTL_CONSTASCII_USTRINGPARAM("windows_formatname"));
diff --git a/i18npool/source/transliteration/transliteration_body.cxx 
b/i18npool/source/transliteration/transliteration_body.cxx
index 491932d..03ab018 100644
--- a/i18npool/source/transliteration/transliteration_body.cxx
+++ b/i18npool/source/transliteration/transliteration_body.cxx
@@ -48,8 +48,6 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
 using namespace ::rtl;
 
-#define A2OU(x) OUString::createFromAscii(x)
-
 namespace com { namespace sun { namespace star { namespace i18n {
 
 
diff --git a/svl/source/config/asiancfg.cxx b/svl/source/config/asiancfg.cxx
index 5e169bb..2d3211c 100644
--- a/svl/source/config/asiancfg.cxx
+++ b/svl/source/config/asiancfg.cxx
@@ -45,10 +45,7 @@ using namespace com::sun::star::uno;
 using namespace com::sun::star::beans;
 using namespace com::sun::star::lang;
 
-#define C2U(cChar) OUString::createFromAscii(cChar)
-const sal_Char sStartEndCharacters[] = "StartEndCharacters";
-const sal_Char sStartCharacters[] = "StartCharacters";
-const sal_Char sEndCharacters[] = "EndCharacters";
+#define C2U(cChar) OUString(RTL_CONSTASCII_USTRINGPARAM(cChar))
 
 //-----------------------------------------------------------------------------
 struct SvxForbiddenStruct_Impl
@@ -106,7 +103,7 @@ void SvxAsianConfig::Load()
     pValues[1] >>= pImpl->nCharDistanceCompression;
 
     pImpl->aForbiddenArr.DeleteAndDestroy(0, pImpl->aForbiddenArr.Count());
-    OUString sPropPrefix(C2U(sStartEndCharacters));
+    OUString sPropPrefix(C2U("StartEndCharacters"));
     Sequence<OUString> aNodes = GetNodeNames(sPropPrefix);
 
     Sequence<OUString> aPropNames(aNodes.getLength() * 2);
@@ -153,7 +150,7 @@ void SvxAsianConfig::Commit()
     PutProperties(lcl_GetPropertyNames(), aValues);
 
 
-    OUString sNode(C2U(sStartEndCharacters));
+    OUString sNode(C2U("StartEndCharacters"));
     if(!pImpl->aForbiddenArr.Count())
         ClearNodeSet(sNode);
     else
@@ -161,8 +158,8 @@ void SvxAsianConfig::Commit()
         Sequence<PropertyValue> aSetValues(2 * pImpl->aForbiddenArr.Count());
         PropertyValue* pSetValues = aSetValues.getArray();
         sal_Int32 nSetValue = 0;
-        const OUString sStartChars(C2U(sStartCharacters));
-        const OUString sEndChars(C2U(sEndCharacters));
+        const OUString sStartChars(C2U("StartCharacters"));
+        const OUString sEndChars(C2U("EndCharacters"));
         for(sal_uInt16 i = 0; i < pImpl->aForbiddenArr.Count(); i++)
         {
             OUString sPrefix(sNode);
diff --git a/svl/source/config/cjkoptions.cxx b/svl/source/config/cjkoptions.cxx
index 661bb23..a0c4550 100644
--- a/svl/source/config/cjkoptions.cxx
+++ b/svl/source/config/cjkoptions.cxx
@@ -45,7 +45,7 @@
 using namespace ::com::sun::star::uno;
 using namespace ::rtl;
 
-#define C2U(cChar) OUString::createFromAscii(cChar)
+#define C2U(cChar) OUString(RTL_CONSTASCII_USTRINGPARAM(cChar))
 #define CFG_READONLY_DEFAULT sal_False
 
 class SvtCJKOptions_Impl : public utl::ConfigItem
diff --git a/svl/source/config/srchcfg.cxx b/svl/source/config/srchcfg.cxx
index 69beb51..faf540f 100644
--- a/svl/source/config/srchcfg.cxx
+++ b/svl/source/config/srchcfg.cxx
@@ -44,7 +44,7 @@ using namespace com::sun::star;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::beans;
 
-#define C2U(cChar) OUString::createFromAscii(cChar)
+#define C2U(cChar) OUString(RTL_CONSTASCII_USTRINGPARAM(cChar))
 
 //-----------------------------------------------------------------------------
 typedef SvxSearchEngineData* SvxSearchEngineDataPtr;
diff --git a/unotools/source/config/configitem.cxx 
b/unotools/source/config/configitem.cxx
index e01e1b7..eea1eb7 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -61,7 +61,7 @@ using namespace com::sun::star::beans;
 using namespace com::sun::star::container;
 using namespace com::sun::star::configuration;
 
-#define C2U(cChar) OUString::createFromAscii(cChar)
+#define C2U(cChar) OUString(RTL_CONSTASCII_USTRINGPARAM(cChar))
 #include <cppuhelper/implbase1.hxx> // helper for implementations
 
 #ifdef DBG_UTIL
diff --git a/unotools/source/config/fltrcfg.cxx 
b/unotools/source/config/fltrcfg.cxx
index ec6d22c..fff0308 100644
--- a/unotools/source/config/fltrcfg.cxx
+++ b/unotools/source/config/fltrcfg.cxx
@@ -40,7 +40,7 @@ using namespace utl;
 using namespace rtl;
 using namespace com::sun::star::uno;
 
-#define C2U(cChar) OUString::createFromAscii(cChar)
+#define C2U(cChar) OUString(RTL_CONSTASCII_USTRINGPARAM(cChar))
 
 // -----------------------------------------------------------------------
 #define FILTERCFG_WORD_CODE                    0x0001
@@ -350,7 +350,7 @@ const Sequence<OUString>& 
SvtFilterOptions::GetPropertyNames()
         };
         OUString* pNames = aNames.getArray();
         for(int i = 0; i < nCount; i++)
-            pNames[i] = C2U(aPropNames[i]);
+            pNames[i] = OUString::createFromAscii(aPropNames[i]);
     }
     return aNames;
 }
diff --git a/unotools/source/config/javaoptions.cxx 
b/unotools/source/config/javaoptions.cxx
index b9b2435..3f9208e 100644
--- a/unotools/source/config/javaoptions.cxx
+++ b/unotools/source/config/javaoptions.cxx
@@ -38,7 +38,7 @@
 using namespace ::com::sun::star::uno;
 using namespace ::rtl;
 
-#define C2U(cChar) OUString::createFromAscii(cChar)
+#define C2U(cChar) OUString(RTL_CONSTASCII_USTRINGPARAM(cChar))
 #define CFG_READONLY_DEFAULT    sal_False
 
 class SvtExecAppletsItem_Impl : public utl::ConfigItem
diff --git a/unotools/source/config/lingucfg.cxx 
b/unotools/source/config/lingucfg.cxx
index e82c070..fe2519e 100644
--- a/unotools/source/config/lingucfg.cxx
+++ b/unotools/source/config/lingucfg.cxx
@@ -54,7 +54,7 @@
 using namespace rtl;
 using namespace com::sun::star;
 
-#define A2OU(x)        ::rtl::OUString::createFromAscii( x )
+#define A2OU(x)        ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( x ))
 #define EXPAND_PROTOCOL     "vnd.sun.star.expand:"
 #define FILE_PROTOCOL       "file:///"
 
@@ -303,7 +303,7 @@ const uno::Sequence< OUString > & 
SvtLinguConfigItem::GetPropertyNames()
         {
             const sal_Char *pFullPropName = aNamesToHdl[i].pFullPropName;
             if (pFullPropName)
-                pNames[ nIdx++ ] = A2OU( pFullPropName );
+                pNames[ nIdx++ ] = ::rtl::OUString::createFromAscii( 
pFullPropName );
         }
         aNames.realloc( nIdx );
         bInitialized = sal_True;
diff --git a/unotools/source/config/misccfg.cxx 
b/unotools/source/config/misccfg.cxx
index b05c6da..2364773 100644
--- a/unotools/source/config/misccfg.cxx
+++ b/unotools/source/config/misccfg.cxx
@@ -49,8 +49,6 @@
 using namespace rtl;
 using namespace com::sun::star::uno;
 
-#define C2U(cChar) OUString::createFromAscii(cChar)
-
 namespace utl
 {
 
@@ -90,7 +88,7 @@ public:
 };
 
 SfxMiscCfg::SfxMiscCfg() :
-    ConfigItem(C2U("Office.Common") ),
+    ConfigItem(OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Common")) ),
     bPaperSize(FALSE),
     bPaperOrientation (FALSE),
     bNotFound (FALSE),
commit d41a1358c10da39ede94440e992d294ae0d544fa
Author: serval <[email protected]>
Date:   Sun Dec 19 13:04:25 2010 +0100

    RTL_CONSTASCII_USTRINGPARAM

diff --git a/chart2/source/tools/MediaDescriptorHelper.cxx 
b/chart2/source/tools/MediaDescriptorHelper.cxx
index dc92065..e58b2e5 100644
--- a/chart2/source/tools/MediaDescriptorHelper.cxx
+++ b/chart2/source/tools/MediaDescriptorHelper.cxx
@@ -40,7 +40,7 @@ const short FLAG_DEPRECATED   =1;
 const short FLAG_MODEL         =2;
 
 #define WRITE_PROPERTY( MediaName, nFlags )                            \
-if(rProp.Name.equals(::rtl::OUString::createFromAscii(#MediaName)))    \
+if(rProp.Name.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(#MediaName))))
        \
 {                                                                              
                                \
     if( rProp.Value >>= MediaName )                                            
\
         ISSET_##MediaName = sal_True;                                  \
_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to