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


Hi Marc,

On Thu, 2012-12-13 at 02:09 -0500, Marc-André Laverdière wrote:
I feel that this behavior of SvStream not to change the parameter in
case of a broken stream should be changed. I am not sure why that is
there.

        Well - it is -thought- (but hard to prove) that this behaviour is
relied on by the code in a number of places:

        sal_uInt16 nFallbackStyleFoo = 0xffff;
        nStream >> nFallbackStyleFoo;

        And that nil'ing it - though attractive -might- then break things.
Clever ideas to find and fix those few cases appreciated - but in
general combining that with re-working to use explicit read functions
seems like a good (albeit time-consuming) idea.

        Of course, it'd be possible to imagine a boolean on the stream to
return defined data in these cases - but that's a bit sick IMHO ;-) if
we have to audit the code and test it, why not clean it to use (much
safer) readInt16(); style methods :-)

        HTH,

                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.