Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On 10/04/2012 07:49 AM, Noel Grandin wrote:
On 2012-10-03 22:03, Stephan Bergmann wrote:
places. The commit seems to have caused some test failures and
crashes. I reverted it for now.

...which only goes to show what a horrible mess C++ is in practice.
bool is rather special, but you easily forget to consider all the
consequences of that.  Turns out that code like
  aBuf.append( pElementType->pTypeName );
(typelib_static_sequence_type_init,
cppu/source/typelib/static_types.cxx), where pElementType->pTypeName
is of type rtl_uString*, now chooses for overload resolution the
standard boolean conversion from rtl_uString* to bool (yielding true,
so appending "true" to aBuf) rather than the user-defined conversion
by constructor from rtl_uString* to rtl::OUString.

Can that be fixed by adding an
    OUStringBuffer::append( rtl_uString* )
method, which does the necessary conversion internally?

That would solve this specific incident, but who knows what other, similar problems with other types would still be lurking.

Stephan


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.