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 <serval2412@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 &)
{
Context
- [Libreoffice] [Patch] RTL_CONSTASCII_USTRINGPARAM for some files part 3 · Julien Nabet
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.