[Libreoffice-commits] .: dtrans/source i18npool/source svl/source unotools/source

Caolán McNamara caolan at kemper.freedesktop.org
Wed Dec 22 08:46:46 PST 2010


 dtrans/source/win32/ftransl/ftransl.cxx                  |    3 +--
 i18npool/source/transliteration/transliteration_body.cxx |    2 --
 svl/source/config/asiancfg.cxx                           |   13 +++++--------
 svl/source/config/cjkoptions.cxx                         |    2 +-
 svl/source/config/srchcfg.cxx                            |    2 +-
 unotools/source/config/configitem.cxx                    |    2 +-
 unotools/source/config/fltrcfg.cxx                       |    4 ++--
 unotools/source/config/javaoptions.cxx                   |    2 +-
 unotools/source/config/lingucfg.cxx                      |    4 ++--
 unotools/source/config/misccfg.cxx                       |    4 +---
 10 files changed, 15 insertions(+), 23 deletions(-)

New commits:
commit e5e3e28742838823fabc76fd65c0c597b5faf629
Author: serval <serval2412 at yahoo.fr>
Date:   Wed Dec 22 16:20:58 2010 +0000

    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),


More information about the Libreoffice-commits mailing list