Hi there,
On Tue, 2013-03-19 at 15:13 +0100, Stephan Bergmann wrote:
- if( rule.compareToAscii( RTL_CONSTASCII_STRINGPARAM( "r" ) ) == 0 )
+ if( rule == "r" )
...
smells like an incorrect conversion from
rtl::OUString::compareToAscii(asciiStr,maxLength) to operator== rather
than rtl::OUString::startsWith, but then again, given the preceeding
So I've fallen for this as well - if indeed compareToAscii just
compares the first few characters that are in asciiStr - then the
documentation in the header:
/**
Compares two strings.
The comparison is based on the numeric value of each character in
the strings and return a value indicating their relationship.
...
@param asciiStr the 8-Bit ASCII character string to be compared.
@return 0 - if both strings are equal
< 0 - if this string is less than the string argument
> 0 - if this string is greater than the string argument
*/
sal_Int32 compareToAscii( const sal_Char* asciiStr ) const SAL_THROW(())
I took 'both strings are equal' at face value ;-)
Does it really not do that ?
Anyhow - thanks for chasing this Stephan - no doubt I've made the same
mistake elsewhere.
ATB,
Michael.
--
michael.meeks@suse.com <><, Pseudo Engineer, itinerant idiot
Context
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.