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
commitf8f34f8cd713d4ef8c9f370001c36c4950634563 (patch)
treea7b6a2597b2fd3cb635e80c7df7e0737c31faa89 /formula
parentddd9cef65af458a505f19db64e368f66e51f473f (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 8d04084d64d8..97b7b980678a 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 2010679907d2..607700960ca1 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()
{