Hi Kohei,

On Tuesday, 2008-12-09 13:20:48 -0500, Kohei Yoshida wrote:

> > >> Again, modularization. We want to separate the Excel filter from the 
> > >> "sc" module, and opcode mapping is part of it.
> > > 
> > > But VBA is not part of the filter, and we need that for VBA.  The filter
> > > is merely re-using it.
> > > 
> > > There is a fine line between modularization and reusability.
> > 
> > To share something between the filter and VBA, it doesn't have to become 
> > part of the Calc core.
> 
> On the contrary, I believe this opcode map does belong in the core.
> Doing it any other way, especially a duplication of opcode in various
> places, is a kludge.

The new mapping actually would duplicate things once the resource
strings differed from the Calc English ones, if I understood that
correctly. So far the core did not need to know any Excel specific name
mappings, those were setup by the filter using the token API. I'm
probably repeating things, but we spent quite some effort to separate
that.

Btw, in the code committed, ScCompiler::InitSymbolsEnglishXL() uses
ScGrammar::GRAM_ENGLISH, I think that should had been
ScGrammar::GRAM_ENGLISH_XL_A1 instead.

> While it's important to separate out things from
> the core, there are still things that *do* belong in the core.
> 
> > This is now the second change surfacing from ooxml02 which runs contrary 
> > to the separation of filter and core. 
> 
> Once again, VBA is not a filter, and I don't see how that would
> contradicts the separation of filter and core.

Wouldn't it be possible to let VBA create a mapping similar to how the
filter does it, by using ScCompiler::CreateOpCodeMap() and
ScCompiler::SetFormulaLanguage()? Btw, where is the difference between
names VBA uses and names Excel uses in MOOXML? If there isn't any,
wouldn't it be "natural" to share the filter's name mapping with VBA?

  Eike

-- 
 PGP/OpenPGP/GnuPG encrypted mail preferred in all private communication.
 Key ID: 0x293C05FD - 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD

Attachment: pgpipRKamWw5y.pgp
Description: PGP signature

Reply via email to