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


On Fri, 2012-02-24 at 20:38 -0500, Kohei Yoshida wrote:
Hi Albert,

On Sat, 2012-02-25 at 01:12 +0100, Albert Thuswaldner wrote:

1.) ScDocument::SetDocOptions requires some rethink. Here, now that
the format option stuff is moved to appoptions, only
xPoolHelper->SetFormTableOpt(rOpt); uses data from docoptions, the mix
of options makes this method ugly. Splitting this up might be a
solution, however ScDocument::SetDocOptions is used in quite many
places....

So, your observation is correct.  As you say, it's best to take the code
that sets the formula options out of SetDocOptions and into its own
method.  We could call it SetFormulaOptions() or something.  The new
SetDocOptions() would basically have nothing other than

{
    OSL_ENSURE( pDocOptions, "No DocOptions! :-(" );
    *pDocOptions = rOpt;
    xPoolHelper->SetFormTableOpt(rOpt);
}

and the rest can go to the new method.

Actually, the new method doesn't have to be in ScDocument at all.  The
only thing you need to set to ScDocument is the grammar, but other than
that, the rest can be done outside of ScDocument.  I'm not really sure
what the best place would be, but you could, for instance, put it in
ScDocShell, since it needs to be callable from CheckConfigOptions...
Just an idea.

Kohei


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.