Hello,
Here are 2 patches for RTL_CONSTASCII_USTRINGPARAM in sw and toolkit
Compiling was ok with HAVE_CXX0X forced (since I've got gcc < 4.5.1)
Julien
(LGPLv3+ / MPL)
commit aa72f99c55a8824a7429b322721c29f004d64c34
Author: Julien Nabet
Date: Sat Dec 25 13:09:26 2010 +0100
RTL_CONSTASCII_USTRINGPARAM
diff --git a/tools/inc/tools/diagnose_ex.h b/tools/inc/tools/diagnose_ex.h
index 1069466..abc2e74 100644
--- a/tools/inc/tools/diagnose_ex.h
+++ b/tools/inc/tools/diagnose_ex.h
@@ -90,14 +90,14 @@
#define ENSURE_ARG_OR_THROW(c, m) if( !(c) ) { \
OSL_ENSURE(c, m); \
throw
::com::sun::star::lang::IllegalArgumentException( \
-
::rtl::OUString::createFromAscii(BOOST_CURRENT_FUNCTION) + \
+
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(BOOST_CURRENT_FUNCTION)) + \
::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( ",\n"m )), \
::com::sun::star::uno::Reference<
::com::sun::star::uno::XInterface >(), \
0 ); }
#define ENSURE_ARG_OR_THROW2(c, m, ifc, arg) if( !(c) ) { \
OSL_ENSURE(c, m); \
throw
::com::sun::star::lang::IllegalArgumentException( \
-
::rtl::OUString::createFromAscii(BOOST_CURRENT_FUNCTION) + \
+
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(BOOST_CURRENT_FUNCTION)) + \
::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( ",\n"m )), \
ifc, \
arg ); }
@@ -109,7 +109,7 @@
if( !(c) ){ \
OSL_ENSURE(c, m); \
throw ::com::sun::star::uno::RuntimeException( \
-::rtl::OUString::createFromAscii(BOOST_CURRENT_FUNCTION) + \
+::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(BOOST_CURRENT_FUNCTION)) +
\
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ",\n"m )), \
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface
>() ); }
@@ -117,7 +117,7 @@
if( !(c) ) { \
OSL_ENSURE(c, m); \
throw ::com::sun::star::uno::RuntimeException( \
-::rtl::OUString::createFromAscii(BOOST_CURRENT_FUNCTION) + \
+::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(BOOST_CURRENT_FUNCTION)) +
\
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ",\n"m )), \
ifc ); }
commit c37e392414d125eef68a9a9dc825442096557168
Author: Julien Nabet
Date: Sat Dec 25 13:08:12 2010 +0100
RTL_CONSTASCII_USTRINGPARAM
diff --git a/sw/inc/unomid.h b/sw/inc/unomid.h
index 6e68bdc..14de6d2 100644
--- a/sw/inc/unomid.h
+++ b/sw/inc/unomid.h
@@ -29,7 +29,8 @@
#define SW_UNOMID_HXX
#define C2S(cChar) String::CreateFromAscii( cChar )
-#define C2U(cChar) rtl::OUString::createFromAscii( cChar )
+//#define C2U(cChar) rtl::OUString::createFromAscii( cChar )
+#define C2U(cChar) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( cChar ))
#define MID_MIRROR_VERT0
#define MID_MIRROR_HORZ_EVEN_PAGES 1
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index a1344dd..a2e358c 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -72,8 +72,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::linguistic2;
-#define C2U(cChar) rtl::OUString::createFromAscii(cChar)
-
extern void repaintTextFrames( SwModify& rModify );
/*
@@ -488,7 +486,7 @@ sal_Bool SwHyphIter::IsAuto()
{
uno::Reference< beans::XPropertySet > xProp( ::GetLinguPropertySet() );
return xProp.is() ? *(sal_Bool*)xProp->getPropertyValue(
-C2U(UPN_IS_HYPH_AUTO) ).getValue()
+
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UPN_IS_HYPH_AUTO)) ).getValue()
: sal_False;
}
@@ -1043,7 +1041,7 @@ uno::Reference< XSpellAlternatives >
// implementation here by providing an additional
parameter.
Sequence< PropertyValue > aPropVals(1);
PropertyValue &rVal = aPropVals.getArray()[0];
-rVal.Name = C2U( UPN_MAX_NUMBER_OF_SUGGESTIONS );
+rVal.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
UPN_MAX_NUMBER_OF_SUGGESTIONS ));
rVal.Value <<= (INT16) 7;
xSpellAlt = xSpell->spell( aWord, eActLang, aPropVals );
diff --git a/sw/source/core/fields/authfld.cxx
b/sw/source/core/fields/authfld.cxx
index a006b5f..ec5c