summaryrefslogtreecommitdiff
path: root/formula/inc
diff options
context:
space:
mode:
Diffstat (limited to 'formula/inc')
-rwxr-xr-x[-rw-r--r--]formula/inc/AddressConvention.hxx3
-rwxr-xr-x[-rw-r--r--]formula/inc/formula/ExternalReferenceHelper.hxx2
-rwxr-xr-x[-rw-r--r--]formula/inc/formula/FormulaCompiler.hxx19
-rwxr-xr-x[-rw-r--r--]formula/inc/formula/FormulaOpCodeMapperObj.hxx3
-rwxr-xr-x[-rw-r--r--]formula/inc/formula/IControlReferenceHandler.hxx3
-rwxr-xr-x[-rw-r--r--]formula/inc/formula/IFunctionDescription.hxx3
-rwxr-xr-x[-rw-r--r--]formula/inc/formula/compiler.hrc0
-rwxr-xr-x[-rw-r--r--]formula/inc/formula/errorcodes.hxx3
-rwxr-xr-x[-rw-r--r--]formula/inc/formula/formdata.hxx2
-rwxr-xr-x[-rw-r--r--]formula/inc/formula/formula.hxx3
-rwxr-xr-x[-rw-r--r--]formula/inc/formula/formuladllapi.h2
-rwxr-xr-x[-rw-r--r--]formula/inc/formula/formulahelper.hxx3
-rwxr-xr-x[-rw-r--r--]formula/inc/formula/funcutl.hxx18
-rwxr-xr-x[-rw-r--r--]formula/inc/formula/grammar.hxx15
-rw-r--r--formula/inc/formula/intruref.hxx101
-rwxr-xr-x[-rw-r--r--]formula/inc/formula/opcode.hxx3
-rwxr-xr-x[-rw-r--r--]formula/inc/formula/token.hxx24
-rwxr-xr-x[-rw-r--r--]formula/inc/formula/tokenarray.hxx4
-rwxr-xr-x[-rw-r--r--]formula/inc/helpids.hrc0
-rwxr-xr-x[-rw-r--r--]formula/inc/makefile.mk0
-rwxr-xr-x[-rw-r--r--]formula/inc/pch/precompiled_formula.cxx2
-rwxr-xr-x[-rw-r--r--]formula/inc/pch/precompiled_formula.hxx3
22 files changed, 98 insertions, 118 deletions
diff --git a/formula/inc/AddressConvention.hxx b/formula/inc/AddressConvention.hxx
index d14091860160..bf98438acc2c 100644..100755
--- a/formula/inc/AddressConvention.hxx
+++ b/formula/inc/AddressConvention.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,3 +38,5 @@ namespace formula
// =============================================================================
#endif // FORMULA_ADDRESSCONVENTION_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/ExternalReferenceHelper.hxx b/formula/inc/formula/ExternalReferenceHelper.hxx
index 3ea961faf033..206dbc7685ea 100644..100755
--- a/formula/inc/formula/ExternalReferenceHelper.hxx
+++ b/formula/inc/formula/ExternalReferenceHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,3 +44,4 @@ namespace formula
// =============================================================================
#endif //FORMULA_EXTERNALREFERENCEHELPER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/FormulaCompiler.hxx b/formula/inc/formula/FormulaCompiler.hxx
index 75e163061ebe..9ff456beb4d2 100644..100755
--- a/formula/inc/formula/FormulaCompiler.hxx
+++ b/formula/inc/formula/FormulaCompiler.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,7 +35,7 @@
#include <rtl/ustrbuf.hxx>
#include <boost/shared_ptr.hpp>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <com/sun/star/uno/Sequence.hxx>
@@ -76,8 +77,8 @@ struct FORMULA_DLLPUBLIC StringHashCode
}
};
-typedef ::std::hash_map< String, OpCode, StringHashCode, ::std::equal_to< String > > OpCodeHashMap;
-typedef ::std::hash_map< String, String, StringHashCode, ::std::equal_to< String > > ExternalHashMap;
+typedef ::boost::unordered_map< String, OpCode, StringHashCode, ::std::equal_to< String > > OpCodeHashMap;
+typedef ::boost::unordered_map< String, String, StringHashCode, ::std::equal_to< String > > ExternalHashMap;
class FORMULA_DLLPUBLIC FormulaCompiler
{
@@ -122,6 +123,7 @@ public:
}
virtual ~OpCodeMap();
+ void copyFrom( const OpCodeMap& r );
/// Get the symbol String -> OpCode hash map for finds.
inline const OpCodeHashMap* getHashMap() const { return mpHashMap; }
@@ -219,8 +221,11 @@ public:
void SetCompileForFAP( sal_Bool bVal )
{ bCompileForFAP = bVal; bIgnoreErrors = bVal; }
+ static bool IsOpCodeVolatile( OpCode eOp );
+
static sal_Bool DeQuote( String& rStr );
+
static const String& GetNativeSymbol( OpCode eOp );
static sal_Bool IsMatrixFunction(OpCode _eOpCode); // if a function _always_ returns a Matrix
@@ -242,6 +247,9 @@ 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 );
+ static void ResetNativeSymbols();
+ static void SetNativeSymbols( const OpCodeMapPtr& xMap );
protected:
virtual String FindAddInFunction( const String& rUpperName, sal_Bool bLocalFirst ) const;
virtual void fillFromAddInCollectionUpperName( NonConstOpCodeMapPtr xMap ) const;
@@ -318,12 +326,13 @@ private:
void InitSymbolsEnglish() const; /// only SymbolsEnglish, maybe later
void InitSymbolsPODF() const; /// only SymbolsPODF, on demand
void InitSymbolsODFF() const; /// only SymbolsODFF, on demand
+ void InitSymbolsEnglishXL() const; /// only SymbolsEnglishXL, on demand
void loadSymbols(sal_uInt16 _nSymbols,FormulaGrammar::Grammar _eGrammar,NonConstOpCodeMapPtr& _xMap) const;
static inline void ForceArrayOperator( FormulaTokenRef& rCurr, const FormulaTokenRef& rPrev )
{
- if ( rPrev.Is() && rPrev->HasForceArray() &&
+ if ( rPrev && rPrev->HasForceArray() &&
rCurr->GetType() == svByte && rCurr->GetOpCode() != ocPush
&& !rCurr->HasForceArray() )
rCurr->SetForceArray( true);
@@ -371,6 +380,7 @@ private:
mutable NonConstOpCodeMapPtr mxSymbolsPODF; // ODF 1.1 symbols
mutable NonConstOpCodeMapPtr mxSymbolsNative; // native symbols
mutable NonConstOpCodeMapPtr mxSymbolsEnglish; // English symbols
+ mutable NonConstOpCodeMapPtr mxSymbolsEnglishXL; // English Excel symbols (for VBA formula parsing)
};
// =============================================================================
} // formula
@@ -379,3 +389,4 @@ private:
#endif // FORMULA_COMPILER_HXX_INCLUDED
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/FormulaOpCodeMapperObj.hxx b/formula/inc/formula/FormulaOpCodeMapperObj.hxx
index 08407819117e..78d44e91892a 100644..100755
--- a/formula/inc/formula/FormulaOpCodeMapperObj.hxx
+++ b/formula/inc/formula/FormulaOpCodeMapperObj.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -84,3 +85,5 @@ private:
// =============================================================================
#endif // FORMULA_FORMULAOPCODEMAPPER_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/IControlReferenceHandler.hxx b/formula/inc/formula/IControlReferenceHandler.hxx
index 9248040e0bbc..f078544f9527 100644..100755
--- a/formula/inc/formula/IControlReferenceHandler.hxx
+++ b/formula/inc/formula/IControlReferenceHandler.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,3 +44,5 @@ namespace formula
};
} // formula
#endif // FORMULA_ICONTROL_REFERENCE_HANDLER_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/IFunctionDescription.hxx b/formula/inc/formula/IFunctionDescription.hxx
index f78c7c09c4af..bf1500ac45a3 100644..100755
--- a/formula/inc/formula/IFunctionDescription.hxx
+++ b/formula/inc/formula/IFunctionDescription.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -161,3 +162,5 @@ namespace formula
}
#endif //INCLUDE_FUNCTION_DESCRIPTION
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/compiler.hrc b/formula/inc/formula/compiler.hrc
index e4dc05aca4e9..e4dc05aca4e9 100644..100755
--- a/formula/inc/formula/compiler.hrc
+++ b/formula/inc/formula/compiler.hrc
diff --git a/formula/inc/formula/errorcodes.hxx b/formula/inc/formula/errorcodes.hxx
index fe8382eced9b..d5dea4ca4ff0 100644..100755
--- a/formula/inc/formula/errorcodes.hxx
+++ b/formula/inc/formula/errorcodes.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -120,3 +121,5 @@ inline sal_uInt16 GetDoubleErrorValue( double fVal )
using namespace ScErrorCodes;
#endif // SC_ERRORCODES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/formdata.hxx b/formula/inc/formula/formdata.hxx
index 8be0bea12c87..b8540a7ecfc1 100644..100755
--- a/formula/inc/formula/formdata.hxx
+++ b/formula/inc/formula/formdata.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -89,3 +90,4 @@ private:
} // formula
#endif // FORMULA_FORMDATA_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/formula.hxx b/formula/inc/formula/formula.hxx
index 700c9043a02d..8da444308d93 100644..100755
--- a/formula/inc/formula/formula.hxx
+++ b/formula/inc/formula/formula.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,6 @@
#define FORMULA_FORMULA_HXX
#include <sfx2/basedlgs.hxx>
-// #include "formula/funcutl.hxx"
#include <memory>
#include "formula/formuladllapi.h"
@@ -155,3 +155,4 @@ protected:
#endif // FORMULA_FORMULA_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/formuladllapi.h b/formula/inc/formula/formuladllapi.h
index fb2a0e4c8575..a6de776f6401 100644..100755
--- a/formula/inc/formula/formuladllapi.h
+++ b/formula/inc/formula/formuladllapi.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,3 +40,4 @@
#endif /* INCLUDED_FORMULADLLAPI_H */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/formulahelper.hxx b/formula/inc/formula/formulahelper.hxx
index e4eae7cf5de4..d6b70977caba 100644..100755
--- a/formula/inc/formula/formulahelper.hxx
+++ b/formula/inc/formula/formulahelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -84,3 +85,5 @@ namespace formula
// =============================================================================
#endif //FORMULA_FORMULA_HELPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/funcutl.hxx b/formula/inc/formula/funcutl.hxx
index b29982cc2be5..fd6c3a76032e 100644..100755
--- a/formula/inc/formula/funcutl.hxx
+++ b/formula/inc/formula/funcutl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,16 +29,14 @@
#ifndef FORMULA_FUNCUTL_HXX
#define FORMULA_FUNCUTL_HXX
-// #include <vcl/scrbar.hxx>
#include <vcl/fixed.hxx>
#include <vcl/button.hxx>
#include <vcl/edit.hxx>
#include "formula/formuladllapi.h"
+namespace formula {
-namespace formula
-{
- class IControlReferenceHandler;
+class IControlReferenceHandler;
class FORMULA_DLLPUBLIC RefEdit : public Edit
{
@@ -59,6 +58,13 @@ public:
virtual ~RefEdit();
void SetRefString( const XubString& rStr );
+
+ /**
+ * Flag reference valid or invalid, which in turn changes the visual
+ * appearance of the control accordingly.
+ */
+ void SetRefValid(bool bValid);
+
using Edit::SetText;
virtual void SetText( const XubString& rStr );
virtual void Modify();
@@ -78,9 +84,7 @@ class FORMULA_DLLPUBLIC RefButton : public ImageButton
{
private:
Image aImgRefStart; /// Start reference input
- Image aImgRefStartHC; /// Start reference input (high contrast)
Image aImgRefDone; /// Stop reference input
- Image aImgRefDoneHC; /// Stop reference input (high contrast)
IControlReferenceHandler* pAnyRefDlg; // parent dialog
RefEdit* pRefEdit; // zugeordnetes Edit-Control
@@ -102,5 +106,7 @@ public:
};
} // formula
+
#endif // FORMULA_FUNCUTL_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/grammar.hxx b/formula/inc/formula/grammar.hxx
index 5f8e6be82350..d49c36f24ffe 100644..100755
--- a/formula/inc/formula/grammar.hxx
+++ b/formula/inc/formula/grammar.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -127,6 +128,16 @@ public:
GRAM_NATIVE_XL_R1C1 = ::com::sun::star::sheet::FormulaLanguage::NATIVE |
((CONV_XL_R1C1 +
kConventionOffset) << kConventionShift),
+ /// English with Excel A1 reference style.
+ GRAM_ENGLISH_XL_A1 = ::com::sun::star::sheet::FormulaLanguage::XL_ENGLISH |
+ ((CONV_XL_A1 +
+ kConventionOffset) << kConventionShift) |
+ kEnglishBit,
+ /// English with Excel R1C1 reference style.
+ GRAM_ENGLISH_XL_R1C1 = ::com::sun::star::sheet::FormulaLanguage::XL_ENGLISH |
+ ((CONV_XL_R1C1 +
+ kConventionOffset) << kConventionShift) |
+ kEnglishBit,
/// Central definition of the default grammar to be used.
GRAM_DEFAULT = GRAM_NATIVE_UI,
@@ -177,6 +188,8 @@ public:
case GRAM_NATIVE_ODF :
case GRAM_NATIVE_XL_A1 :
case GRAM_NATIVE_XL_R1C1 :
+ case GRAM_ENGLISH_XL_A1 :
+ case GRAM_ENGLISH_XL_R1C1:
return true;
default:
return extractFormulaLanguage( eGrammar) == GRAM_EXTERNAL;
@@ -234,3 +247,5 @@ public:
// =============================================================================
#endif // FORMULA_GRAMMAR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/intruref.hxx b/formula/inc/formula/intruref.hxx
deleted file mode 100644
index 93b988d6d6b0..000000000000
--- a/formula/inc/formula/intruref.hxx
+++ /dev/null
@@ -1,101 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef FORMULA_INTRUREF_HXX
-#define FORMULA_INTRUREF_HXX
-
-namespace formula
-{
-
-/** A simple intrusive refcounting template, not thread safe, but therefore
- also a bit faster than boost's smart_ptr or uno::Reference equivalents, and
- the type to be refcounted has full control over its behavior.
-
- Mainly used in formula compiler and interpreter context, e.g. ScTokenRef,
- ScMatrixRef.
-
- Type T must implement methods IncRef() and DecRef(), in case typename T is
- const they must be const as well and the reference counter be mutable.
- */
-template< typename T > class SimpleIntrusiveReference
-{
- T* p;
-public:
- inline SimpleIntrusiveReference() : p(0) {}
- inline SimpleIntrusiveReference( const SimpleIntrusiveReference& r )
- {
- p = r.p;
- if ( p )
- p->IncRef();
- }
- inline SimpleIntrusiveReference( T *t )
- {
- p = t;
- if ( p )
- t->IncRef();
- }
- inline void Clear()
- {
- if ( p )
- {
- p->DecRef();
- p = 0;
- }
- }
- inline ~SimpleIntrusiveReference()
- {
- if ( p )
- p->DecRef();
- }
- inline SimpleIntrusiveReference& operator=( T* t )
- {
- if ( t )
- t->IncRef();
- if ( p )
- p->DecRef();
- p = t;
- return *this;
- }
- inline SimpleIntrusiveReference& operator=( const SimpleIntrusiveReference& r )
- {
- *this = r.p;
- return *this;
- }
- inline bool Is() const { return p != 0; }
- inline bool operator ! () const { return p == 0; }
- inline T* operator&() const { return p; }
- inline T* operator->() const { return p; }
- inline T& operator*() const { return *p; }
- inline operator T*() const { return p; }
- inline T* get() const { return p; }
-};
-// =============================================================================
-} // formula
-// =============================================================================
-
-#endif // SC_INTRUREF_HXX
-
diff --git a/formula/inc/formula/opcode.hxx b/formula/inc/formula/opcode.hxx
index cfd3af767465..240f97401314 100644..100755
--- a/formula/inc/formula/opcode.hxx
+++ b/formula/inc/formula/opcode.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -403,3 +404,5 @@ typedef OpCodeEnum OpCode;
#endif
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/token.hxx b/formula/inc/formula/token.hxx
index 30618c67381a..6341be555062 100644..100755
--- a/formula/inc/formula/token.hxx
+++ b/formula/inc/formula/token.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,13 +33,12 @@
#include <string.h>
#include <vector>
#include "formula/opcode.hxx"
-//#include "refdata.hxx"
-//#include "scmatrix.hxx"
-#include "formula/intruref.hxx"
#include <tools/mempool.hxx>
#include "formula/IFunctionDescription.hxx"
#include "formula/formuladllapi.h"
+#include <boost/intrusive_ptr.hpp>
+
namespace formula
{
@@ -86,9 +86,8 @@ typedef StackVarEnum StackVar;
class FormulaToken;
-typedef SimpleIntrusiveReference< class FormulaToken > FormulaTokenRef;
-typedef SimpleIntrusiveReference< const class FormulaToken > FormulaConstTokenRef;
-
+typedef ::boost::intrusive_ptr<FormulaToken> FormulaTokenRef;
+typedef ::boost::intrusive_ptr<const FormulaToken> FormulaConstTokenRef;
class FORMULA_DLLPUBLIC FormulaToken : public IFormulaToken
{
@@ -113,6 +112,7 @@ public:
inline StackVar GetType() const { return eType; }
sal_Bool IsFunction() const; // pure functions, no operators
sal_Bool IsMatrixFunction() const; // if a function _always_ returns a Matrix
+ bool IsExternalRef() const;
sal_uInt8 GetParamCount() const;
inline void IncRef() const { nRefCnt++; }
inline void DecRef() const
@@ -179,6 +179,16 @@ public:
{ return GetStrLenBytes( rStr.Len() ); }
};
+inline void intrusive_ptr_add_ref(const FormulaToken* p)
+{
+ p->IncRef();
+}
+
+inline void intrusive_ptr_release(const FormulaToken* p)
+{
+ p->DecRef();
+}
+
class FORMULA_DLLPUBLIC FormulaByteToken : public FormulaToken
{
private:
@@ -397,3 +407,5 @@ public:
// =============================================================================
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/tokenarray.hxx b/formula/inc/formula/tokenarray.hxx
index 31d780c81a79..092cbda78673 100644..100755
--- a/formula/inc/formula/tokenarray.hxx
+++ b/formula/inc/formula/tokenarray.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,6 +29,7 @@
#ifndef FORMULA_TOKENARRAY_HXX
#define FORMULA_TOKENARRAY_HXX
+#include <limits.h>
#include "formula/token.hxx"
#include "formula/ExternalReferenceHelper.hxx"
#include <tools/solar.h>
@@ -125,6 +127,7 @@ public:
FormulaToken* LastRPN() { nIndex = nRPN; return PrevRPN(); }
FormulaToken* PrevRPN();
+ bool HasExternalRef() const;
sal_Bool HasOpCode( OpCode ) const;
sal_Bool HasOpCodeRPN( OpCode ) const;
/// Token of type svIndex or opcode ocColRowName
@@ -284,3 +287,4 @@ public:
#endif // FORMULA_TOKENARRAY_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/helpids.hrc b/formula/inc/helpids.hrc
index 5502c4370d58..5502c4370d58 100644..100755
--- a/formula/inc/helpids.hrc
+++ b/formula/inc/helpids.hrc
diff --git a/formula/inc/makefile.mk b/formula/inc/makefile.mk
index dfe7226e082a..dfe7226e082a 100644..100755
--- a/formula/inc/makefile.mk
+++ b/formula/inc/makefile.mk
diff --git a/formula/inc/pch/precompiled_formula.cxx b/formula/inc/pch/precompiled_formula.cxx
index e9079eebf2c9..8e7562f762ef 100644..100755
--- a/formula/inc/pch/precompiled_formula.cxx
+++ b/formula/inc/pch/precompiled_formula.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,3 +28,4 @@
#include "precompiled_formula.hxx"
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/pch/precompiled_formula.hxx b/formula/inc/pch/precompiled_formula.hxx
index 6334ffecb28d..6d5785ad20dd 100644..100755
--- a/formula/inc/pch/precompiled_formula.hxx
+++ b/formula/inc/pch/precompiled_formula.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,3 +35,5 @@
#include "comphelper/sequenceashashmap.hxx"
#include "comphelper/documentconstants.hxx"
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */