[Libreoffice] [PATCH] Conditional compilation of legacy Addin mechanism in calc

Alfonso Eusebio alfonso_eusebio at yahoo.co.uk
Sat Feb 19 01:33:22 PST 2011


Please find attached patches for the conditional removal of legacy calc addins.
As always, these changes are made available under LGPLv3+/MPL.

Kohei, I have used a macro definition to conditionally compile the code in/out.
In this patch the macro (SC_WITHOUT_LEGACY_ADDIN) is undefined, so the mechanism 
is left untouched.

Defining SC_WITHOUT_LEGACY_ADDIN in global.hxx (both in calc and in binfilter) 
will remove the legacy addin mechanism.

The changes are not optimal from a code point of view, but I've tried to ensure 
that it is clear what needs to be removed when (and if) the mechanism is finally 
Searching for SC_WITHOUT_LEGACY_ADDIN will find all the pieces of code that 
should be removed.


----- Original Message ----
From: Kohei Yoshida <kyoshida at novell.com>
To: Alfonso Eusebio <alfonso_eusebio at yahoo.co.uk>
Cc: michael.meeks at novell.com
Sent: Thu, 17 February, 2011 15:31:03
Subject: Re: [Libreoffice] [PATCH] Remove legacy Addin mechanism from calc

On Thu, 2011-02-17 at 13:39 +0000, Alfonso Eusebio wrote:
> Hi Michael,
> Don't worry: it was a bit of work, but it was a good exercise as well.
> I'm happy to change it to conditionally compiled if you think it's worth  it, 

My preferred approach is indeed to make this code conditionally
compiled, and at some point experimentally ship a release without this
piece to see how many users complain. ;-)

And yes, that would be worth the effort IMO.

> The only problem I see is that the version with this piece excluded  might not 

> get that much testing and hide some issues (I did only limited  testing).

If we can make that a build time option with --enable-calc-addin (or
similar), and then default to on, then we can still test this piece.  If
you are not too familiar with these autoconf stuff, simply defining a
switch somewhere in sc/inc/global.hxx would be fine.  Then one of us
will work on making that a configure/autogen.sh option.

Thanks a lot for looking into this, BTW.


Kohei Yoshida, LibreOffice hacker, Calc
<kyoshida at novell.com>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Conditional-compilation-of-legacy-addins-in-calc.patch
Type: text/x-patch
Size: 20426 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110219/be869db8/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Conditional-compilation-of-legacy-addins-in-binfilte.patch
Type: text/x-patch
Size: 15282 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110219/be869db8/attachment-0003.bin>

More information about the LibreOffice mailing list