Michael Meeks wrote:
        I was just reading the sc code (on an errand) and I notice that
'GetEnglishFormula' appears to exist in 2 (cut/pasted) forms, each ~55
lines of code.

        It seems the code for:

void ScFormulaCell::GetEnglishFormula( String& rFormula, BOOL bCompileXML) const
void ScFormulaCell::GetEnglishFormula( rtl::OUStringBuffer& rBuffer, BOOL 
bCompileXML) const

        was just cut/pasted verbatim with some trivial changes from String ->
OUStringBuffer.

        Why ? and why can't we express 1 in terms of the other [ leaving the
much more efficient stringbuffer variant of course ]. I thought the
answer might lie in the ScCompiler but it's CreateStringFromTokenArray
seems to do the sensible thing.

The OUStringBuffer variant was added to improve performance (you may have guessed), performance of saving files in particular, without harming the rest of the code that uses the String method.

        Are there any other known places where this sort of redundant
duplication lurks ? :-) or am I missing something ? would the obvious
patch be accepted ?

The obvious patch would be to eliminate all use of tools strings in Calc?

Niklas

P.S. Should I add a sentence here about our mailing lists working better if you're subscribed?

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

Reply via email to