Addin exceptions in SvStream

Michael Meeks michael.meeks at
Thu Dec 13 01:40:32 PST 2012

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 :-)



michael.meeks at  <><, Pseudo Engineer, itinerant idiot

More information about the LibreOffice mailing list