[PUSHED] Re: [PATCH] sal_Bool -> bool in various places

Michael Stahl mstahl at redhat.com
Thu Oct 4 12:36:06 PDT 2012

On 27/09/12 11:00, Noel Grandin wrote:
> Hi
> These patches pass a full make check.

pushed, though i'm somewhat worried about changes to virtual methods...
but they should give "overloaded virtual" warnings if gone wrong?


these failed to apply here:

 sal_Bool->bool in lotuswordpro
 sal_Bool->bool in svl::SfxUndoAction

> Patch 20 might need some careful scrutiny since it adds extra operators 
> to SvStream for handling bool.

that sounds like a horrible idea to me: the use of overloading for
binary serialization of integers is a recipe for disaster in the first
place, because the serialization format can be changed accidentally then
by changing the type of some variable, or worse, some typedef or return
type of a function that happens to be used for serialization.

please add a WriteBool() method or something like that, and hopefully
the compiler will point you to the places where it has to be used.

(also, a week or two i foolishly said that adding the overload
OUStringBuffer::append(bool) can't break anything, but moggi had to
revert that because it did.)

these depend on that operator:

 sal_Bool->bool in svl::CntBoolItem

More information about the LibreOffice mailing list