summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-09-15 21:20:46 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2010-09-15 21:20:46 +0200
commit02ea0d7bdd0192fe9349f849926efc7c922b13d4 (patch)
treea3d2a41d9f14e6c89a8ad76e53478c4576eb35ee /formula
parent28f8d9d68f350c4e48a98aa8d3337252018b3273 (diff)
calc-formula-variable-separators-sc.diff: formula separators changeable
n#447164, i#92056 Make the formula separators changeable per locale setting, and add new configuration page for formula syntax and separators.
Diffstat (limited to 'formula')
-rw-r--r--formula/inc/formula/FormulaCompiler.hxx2
-rw-r--r--formula/source/core/api/FormulaCompiler.cxx11
2 files changed, 13 insertions, 0 deletions
diff --git a/formula/inc/formula/FormulaCompiler.hxx b/formula/inc/formula/FormulaCompiler.hxx
index b67d78abd1..d82e2c83bb 100644
--- a/formula/inc/formula/FormulaCompiler.hxx
+++ b/formula/inc/formula/FormulaCompiler.hxx
@@ -242,6 +242,8 @@ public:
including an address reference convention. */
inline FormulaGrammar::Grammar GetGrammar() const { return meGrammar; }
+ static void UpdateSeparatorsNative( const rtl::OUString& rSep, const rtl::OUString& rArrayColSep, const rtl::OUString& rArrayRowSep );
+
protected:
virtual String FindAddInFunction( const String& rUpperName, BOOL bLocalFirst ) const;
virtual void fillFromAddInCollectionUpperName( NonConstOpCodeMapPtr xMap ) const;
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index 51e2ca99f1..508d780d3a 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -1678,6 +1678,17 @@ void FormulaCompiler::AppendString( rtl::OUStringBuffer& rBuffer, const String &
rBuffer.append(sal_Unicode('"'));
}
}
+
+void FormulaCompiler::UpdateSeparatorsNative(
+ const rtl::OUString& rSep, const rtl::OUString& rArrayColSep, const rtl::OUString& rArrayRowSep )
+{
+ NonConstOpCodeMapPtr xSymbolsNative;
+ lcl_fillNativeSymbols(xSymbolsNative);
+ xSymbolsNative->putOpCode(rSep, ocSep);
+ xSymbolsNative->putOpCode(rArrayColSep, ocArrayColSep);
+ xSymbolsNative->putOpCode(rArrayRowSep, ocArrayRowSep);
+}
+
// -----------------------------------------------------------------------------
OpCode FormulaCompiler::NextToken()
{