Hi Søren,

On Wed, Sep 07, 2005 at 21:47:30 +0200, Søren Thing Pedersen wrote:

> I want to add a boolean - let's call it AssumeEnglishNumbers - to 
> /registry/data/org/openoffice/Office/Linguistic.xcu

First, as this would only be used by the Calc application, why would you
want to add the configuration entry to Linguistic.xcu, where furthermore
linguistic is completely unrelated to the topic in question?

Second, why do you want to use a configuration entry at all and not
use a simpler approach of an environment variable as I suggested in
http://qa.openoffice.org/issues/show_bug.cgi?id=50670
As you weren't pleased with that, you could revert the logic to an unset
variable meaning "import according to locale".

If you want to go the hard way and need a configuration entry to be able
to control the behavior by some other means, I suggest you add a new
node and property to the Office.Calc/Misc options instead,
registry/data/org/openoffice/Office/Calc.xcu, and read it by means of
the Calc application options. See sc/source/core/tool/appoptio.cxx and
add your node and property as SCMISCOPT_YOUROPTION at CFGPATH_MISC
behind SCMISCOPT_DEFOBJHEIGHT, adjust SCMISCOPT_COUNT, add the property
name to ScAppCfg::GetMiscPropertyNames(), add reading the property to
ScAppCfg::ScAppCfg() after SCMISCOPT_DEFOBJHEIGHT. If you want to be
able to write the property add it to IMPL_LINK( ScAppCfg, MiscCommitHdl, ...)

In sc/inc/appoptio.hxx add GetYourOption() and SetYourOption() methods
to class ScAppOptions and use them in ScAppCfg::ScAppCfg() and
ScAppCfg::MiscCommitHdl(). You may then access the configuration value
in sc/source/filter/rtf/eeimpars.cxx by calling
SC_MOD()->GetAppOptions().GetYourOption()

  Eike

-- 
 OOo/SO Calc core developer. Number formatter bedevilled I18N transpositionizer.
 GnuPG key 0x293C05FD:  997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to