On 11/16/2011 11:25 AM, Michael Meeks wrote:
        IMHO we need to make that code efficient by having a var-args style
helper:

        throw FooException("Failure loading file '%S' code %d",
                           aOUStr.pData, nCode);

        That would also be fairly code size efficient as well vs. the
heavy-lifting, and big string-buffer construction madness :-)

This (as well as cooking something up using OSL_FORMAT) would have the disadvantage that it potentially converts data from UTF-16 to char ("%S") and then from char to UTF-16 (as UNO Exception's Message is of type rtl::OUString).

It seems like all attempts at true improvement in this area always collide with rtl::OUString being neither UTF-8 (i.e., layout compatible with plain char) nor wchar_t (at least on Linux etc.; and using GCC's -fshort-wchar would not help, as it breaks binary compatibility with libstdc++). We'll probably wait until either all relevant compilers support C++11's new character types, or we incompatibly change rtl::OUString to UTF-8 (whatever happens first).

        It'd be great to use a more pleasant format like Stephan's new configmr
XML - if we can get the performance we need there; and of course add the
API docs to some parallel docs file, only loaded when needed
(interactively by developers). But of course it's a good idea.

For types.rdb, my vision is to either use an XML format or, IMO even better, a new .idl format that is (a) less verbose (why the heck all those ";" in there, etc.?) and (b) does not rely on a preprocessor. Then, a types.rdb could effectively be just one large .idl file.

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

Reply via email to