summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-11-13 18:35:05 +0100
committerEike Rathke <erack@redhat.com>2013-11-13 18:38:52 +0100
commit10515c6c6f2d7257b1e9f17b16f18a637dcbf5c8 (patch)
treefd166533da5edd6b891a01b16c80719bdf025dfc /include
parenta2a7a6411f7754b537d0ba2ad28a9823dd52ef74 (diff)
fixed file format mappings always have RESOURCE_BASE separators
Change-Id: I7ac93f742b469156cd8eb3f8171c7e05a98598ad
Diffstat (limited to 'include')
-rw-r--r--include/formula/FormulaCompiler.hxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/formula/FormulaCompiler.hxx b/include/formula/FormulaCompiler.hxx
index 5ce3c2dc3b2b..ff2ebf35b9ad 100644
--- a/include/formula/FormulaCompiler.hxx
+++ b/include/formula/FormulaCompiler.hxx
@@ -256,6 +256,18 @@ public:
static void UpdateSeparatorsNative( const OUString& rSep, const OUString& rArrayColSep, const OUString& rArrayRowSep );
static void ResetNativeSymbols();
static void SetNativeSymbols( const OpCodeMapPtr& xMap );
+
+ /** Separators mapped when loading opcodes from the resource, values other
+ than RESOURCE_BASE may override the resource strings. Used by OpCodeList
+ implementation via loadSymbols().
+ */
+ enum SeparatorType
+ {
+ RESOURCE_BASE,
+ SEMICOLON_BASE,
+ COMMA_BASE
+ };
+
protected:
virtual OUString FindAddInFunction( const OUString& rUpperName, bool bLocalFirst ) const;
virtual void fillFromAddInCollectionUpperName( NonConstOpCodeMapPtr xMap ) const;
@@ -327,6 +339,7 @@ protected:
bool bIgnoreErrors; // on AutoCorrect and CompileForFAP
// ignore errors and create RPN nevertheless
bool glSubTotal; // if code contains one or more subtotal functions
+
private:
void InitSymbolsNative() const; /// only SymbolsNative, on first document creation
void InitSymbolsEnglish() const; /// only SymbolsEnglish, maybe later
@@ -335,7 +348,8 @@ private:
void InitSymbolsEnglishXL() const; /// only SymbolsEnglishXL, on demand
void InitSymbolsOOXML() const; /// only SymbolsOOXML, on demand
- void loadSymbols(sal_uInt16 _nSymbols,FormulaGrammar::Grammar _eGrammar,NonConstOpCodeMapPtr& _xMap) const;
+ void loadSymbols( sal_uInt16 nSymbols, FormulaGrammar::Grammar eGrammar, NonConstOpCodeMapPtr& rxMap,
+ SeparatorType eSepType = SEMICOLON_BASE ) const;
static inline void ForceArrayOperator( FormulaTokenRef& rCurr, const FormulaTokenRef& rPrev )
{