[Libreoffice] [PATCH] Add support for bool for the operator << and >> of SvStream

Noel Power nopower at novell.com
Mon Oct 4 12:48:16 PDT 2010


Hi Norbert
On Mon, 2010-10-04 at 12:46 -0500, Norbert Thiebaud wrote:
> On 10/4/10, Noel Power <nopower at novell.com> wrote:
> > On Mon, 2010-10-04 at 09:59 -0500, Norbert Thiebaud wrote:
> >> On 10/4/10, Noel Power <nopower at novell.com> wrote:
> >> > Hi Norbet

> > I guess I don't see what this is to do with adding those >>, <<
> > operators to one of the binary stream classes, there was no SvStream&
> > 'operator >>( BOOL )' or SvStream& operator << (BOOL&)' unless you found
> > code that does does read and write 'BOOL' types to the streams ? Have
> > you?
> Bingo.
> and there is indeed no  <<(BOOL&) , but there is a <<(unsigned char&)
> and since BOOL is sal_Bool which is unsigned char you end up with code like
> 
> BOOL bFOO;
> BOOL bBAR;
> 
> m_stream << bFOO << bBar;
> 
> which blow-up when I changed the typedef of BOOL to bool.
sounds suspicously like old code for serializing ( in binary format ) .
Be interesting to see all the places that is used  and see if they could
be removed 

Noel



More information about the LibreOffice mailing list