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


On Mon, 2010-10-04 at 08:54 -0600, Noel Power wrote:
Hi Norbet
On Sat, 2010-10-02 at 21:18 -0500, Norbert Thiebaud wrote:
[PATCH] Add support for bool for the operator << and >> of SvStream

I just wonder did you have a specific reason for this patch. I would
assume if someone would be reading or writing a boolean value to a
binary stream they probably would be packing it some how in the
structure they are writing. E.g. normally in the binary filters ( where
SvStream is used ) boolean values are usually read & written ( packed )
into some sort of bit field in 16 or 32 bit words. 

Caolan what do you think?

I don't like adding another << >> SvStream operator for bool. If there
are places which would break on converting BOOL to bool because they're
getting streamed to disk via SvStreams, then I think I'd prefer to see
those specific BOOLs converted to sal_uInt8.

I see we also have a << >> SvStream operators for "long" which is
another disaster seeing as a long is either 32bits of 64bits in size
depending on platform. Anything streaming a long to disk is probably
broken and depending on a long being 32bit, or is hopefully only being
used for some temporary scratch format which could be replaced by
something platform-independent.

Here's another to-do for someone. Remove the long << >> SvStream
operators and find what's using them and lets consider if we can remove
them too as they are a ticking timebomb.

C.


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.