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.

-- 
[email protected]  <><, Pseudo Engineer, itinerant idiot

_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to