summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2011-12-07 23:35:57 +0100
committerEike Rathke <erack@redhat.com>2011-12-07 23:39:22 +0100
commit3deb83d7a74a0fe026791e7a336ac6ffad9c0026 (patch)
tree05941589d338890349153175c58a49c730c2af77 /sc
parent4d6b88417fe01a8e4039d495071cd817b4efcc3a (diff)
i#106210 store proper ODFF names, accept aliases
Older releases stored a few function names not defined by ODFF, namely EASTERSUNDAY instead of ORG.OPENOFFICE.EASTERSUNDAY, TDIST instead of LEGACY.TDIST and B instead of BINOM.DIST.RANGE. Since OOo/LibO 3.3 the proper function names can be read, additionally to the "wrong" names. Now it's time to write the proper names and still accept the incorrect ones. Test cases are attached to AOOo issues: ORG.OPENOFFICE.EASTERSUNDAY https://issues.apache.org/ooo/show_bug.cgi?id=112882 LEGACY.TDIST and BINOM.DIST.RANGE https://issues.apache.org/ooo/show_bug.cgi?id=110229 Note that the FALSE in A2 and A3 is a result of the string comparison of the actual formula, that differs in separators (, vs ;) only. (cherry picked from commit a9b03bd19945a90040fd4346599e281a7813efc2)
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/compiler.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 3ca041ac36a1..66d807f86f70 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2478,11 +2478,12 @@ bool ScCompiler::IsOpCode( const String& rName, bool bInArray )
};
static const FunctionName aOdffAliases[] = {
// Renamed old names:
- // XXX none yet.
+ { "B", ocB }, // B -> BINOM.DIST.RANGE
+ { "TDIST", ocTDist }, // TDIST -> LEGACY.TDIST
+ { "EASTERSUNDAY", ocEasterSunday } // EASTERSUNDAY -> ORG.OPENOFFICE.EASTERSUNDAY
// Renamed new names:
- { "BINOM.DIST.RANGE", ocB }, // B -> BINOM.DIST.RANGE
- { "LEGACY.TDIST", ocTDist }, // TDIST -> LEGACY.TDIST
- { "ORG.OPENOFFICE.EASTERSUNDAY", ocEasterSunday } // EASTERSUNDAY -> ORG.OPENOFFICE.EASTERSUNDAY
+ // XXX none currently. Example:
+ //{ "ORG.OPENOFFICE.EASTERSUNDAY", ocEasterSunday }
};
static const size_t nOdffAliases = SAL_N_ELEMENTS(aOdffAliases);
for (size_t i=0; i<nOdffAliases; ++i)