Hi Olivier,
Thank you a lot for the OUString cleanups, like
http://cgit.freedesktop.org/libreoffice/core/commit/?id=c75af8578d921040e1baf8414edd7239969bcd45
One thing I noticed is the
@@ -606,8 +596,7 @@ void DocumentHandlerImpl::startElement(
{
OUString const & rQAttributeName = pQNames[ nPos ];
OSL_ENSURE(
- rQAttributeName.compareToAscii(
- RTL_CONSTASCII_STRINGPARAM("xmlns:") ) != 0,
+ rQAttributeName.compareToAscii( "xmlns:" ) != 0,
"### unexpected xmlns!" );
// collect attribute's uid and current prefix
hunk. In this case, the use of RTL_CONSTASCII_STRINGPARAM() kind of
simulates "startsWith" (that we do not have as a method); ie. for
rQAttributeName == "xmlns:SOMETHING":
rQAttributeName.compareToAscii( RTL_CONSTASCII_STRINGPARAM("xmlns:") ) == 0
but
rQAttributeName.compareToAscii( "xmlns:" ) > 0
I wonder if it makes sense to introduce some kind of CONSTASCII_STRLEN()
macro that would make this more obvious, and convert the
rQAttributeName.compareToAscii( RTL_CONSTASCII_STRINGPARAM("xmlns:") )
cases to that? Or even better, introduce a startsWith() [or just
startsWithAscii() for the optimized case] method, like we did with the
isEmpty()...
Can you please check your previous commits for this kind of change, and
re-introduce RTL_CONSTASCII_STRINGPARAM() in compareToAscii for now?
Thank you a lot,
Kendy
Context
- compareToAscii( RTL_CONSTASCII_STRINGPARAM( "something" ) ) · Jan Holesovsky
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.