On Sat, 2010-10-30 at 22:23 +0200, Gert Faller wrote: > Hi, > > here are some more of them.
Great, thanks. Looking at this createFromAscii_4.patch reminds me of something else. Nothing to do with you, the code was this way already, but rtl::OUString foo = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("apple")); is rather unnecessarily verbose rtl::OUString foo(RTL_CONSTASCII_USTRINGPARAM("apple")); is far easier on the eye and is equivalent. Looking at createFromAscii_2.patch I see it affects a ternary operator (i.e. ?:) so.. #define RTL_CONSTASCII_USTRINGPARAM( constAsciiStr ) constAsciiStr, ((sal_Int32)(sizeof(constAsciiStr)-1)), RTL_TEXTENCODING_ASCII_US old: OUString sFoo(OUString::createFromAscii(bBool ? "true" : "false)); new: OUString sFoo(RTL_CONSTASCII_USTRINGPARAM(bBool ? "true" : "false)); would be expanded as... OUString sFoo(bBool ? "true" : "false, ((sal_Int32)(sizeof(bBool ? "true" : "false)-1)); I think this is fine, but I'm a little bit wary of making that change while sleep-deprived given the occasional gotchas messing with ternary operators can have, e.g. http://blogs.linux.ie/caolan/2009/04/15/ternary-operator-blues/ so everything pushed except that I've omitted createFromAscii_2.patch for now. C. _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice