diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-01-13 12:09:22 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-01-13 12:09:22 +0000 |
commit | f79944144dc1cf4a71171d96c7ab5cee40e3fdbb (patch) | |
tree | c509a5a5f649436f2fcfbe91c47c9b453f3c2793 /formula | |
parent | 17ae03fba98ddcffaca401f3f4b224cbc684ce16 (diff) |
#i10000#: fix merge conflicts (CWS frmdlg)
Diffstat (limited to 'formula')
-rw-r--r-- | formula/inc/formula/ExternalReferenceHelper.hxx | 48 | ||||
-rw-r--r-- | formula/inc/formula/FormulaCompiler.hxx | 2 | ||||
-rw-r--r-- | formula/inc/formula/tokenarray.hxx | 5 | ||||
-rw-r--r-- | formula/prj/d.lst | 1 | ||||
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 2 | ||||
-rw-r--r-- | formula/source/core/api/token.cxx | 6 | ||||
-rw-r--r-- | formula/source/ui/dlg/structpg.hxx | 2 |
7 files changed, 61 insertions, 5 deletions
diff --git a/formula/inc/formula/ExternalReferenceHelper.hxx b/formula/inc/formula/ExternalReferenceHelper.hxx new file mode 100644 index 000000000000..9044bd7b7a69 --- /dev/null +++ b/formula/inc/formula/ExternalReferenceHelper.hxx @@ -0,0 +1,48 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: externalrefmgr.hxx,v $ + * $Revision: 1.1.2.23 $ + * + * 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_EXTERNALREFERENCEHELPER_HXX +#define FORMULA_EXTERNALREFERENCEHELPER_HXX + +#include <tools/string.hxx> +#include "formula/formuladllapi.h" + +namespace formula +{ + class FORMULA_DLLPUBLIC SAL_NO_VTABLE ExternalReferenceHelper + { + public: + virtual String getCacheTableName(sal_uInt16 nFileId, size_t nTabIndex) const = 0; + }; +// ============================================================================= +} // formula +// ============================================================================= +#endif //FORMULA_EXTERNALREFERENCEHELPER_HXX + diff --git a/formula/inc/formula/FormulaCompiler.hxx b/formula/inc/formula/FormulaCompiler.hxx index f0be8c10e52f..eb715f926e5c 100644 --- a/formula/inc/formula/FormulaCompiler.hxx +++ b/formula/inc/formula/FormulaCompiler.hxx @@ -44,6 +44,7 @@ #include "formula/opcode.hxx" #include "formula/grammar.hxx" #include "formula/token.hxx" +#include "formula/ExternalReferenceHelper.hxx" #define MAXJUMPCOUNT 32 /* maximum number of jumps (ocChose) */ @@ -287,6 +288,7 @@ protected: FormulaTokenRef pToken; // current token FormulaTokenRef pCurrentFactorToken; // current factor token (of Factor() method) FormulaTokenArray* pArr; + ExternalReferenceHelper* pExternalRef; FormulaToken** pCode; FormulaArrayStack* pStack; diff --git a/formula/inc/formula/tokenarray.hxx b/formula/inc/formula/tokenarray.hxx index b61cec5ad946..c2641f4ca47f 100644 --- a/formula/inc/formula/tokenarray.hxx +++ b/formula/inc/formula/tokenarray.hxx @@ -32,6 +32,7 @@ #define FORMULA_TOKENARRAY_HXX #include "formula/token.hxx" +#include "formula/ExternalReferenceHelper.hxx" #include <tools/solar.h> #include <com/sun/star/sheet/FormulaToken.hpp> @@ -191,14 +192,14 @@ public: Derived classes must overload it when they want to support derived classes from FormulaToken. @return true when an error occurs */ - virtual bool AddFormulaToken(const com::sun::star::sheet::FormulaToken& _aToken); + virtual bool AddFormulaToken(const com::sun::star::sheet::FormulaToken& _aToken, ExternalReferenceHelper* _pRef = NULL); /** fill the array with the tokens from the sequence. It calls AddFormulaToken for each token in the list. @param _aSequence the token to add @return true when an error occurs */ - bool Fill(const com::sun::star::uno::Sequence< com::sun::star::sheet::FormulaToken >& _aSequence); + bool Fill(const com::sun::star::uno::Sequence< com::sun::star::sheet::FormulaToken >& _aSequence, ExternalReferenceHelper* _pRef = NULL); FormulaToken* AddToken( const FormulaToken& ); FormulaToken* AddString( const sal_Unicode* pStr ); diff --git a/formula/prj/d.lst b/formula/prj/d.lst index 6e97d7bb9ee0..b37802fb922d 100644 --- a/formula/prj/d.lst +++ b/formula/prj/d.lst @@ -19,6 +19,7 @@ mkdir: %_DEST%\inc%_EXT%\formula ..\inc\formula\funcutl.hxx %_DEST%\inc%_EXT%\formula\funcutl.hxx
..\inc\formula\IControlReferenceHandler.hxx %_DEST%\inc%_EXT%\formula\IControlReferenceHandler.hxx
..\inc\formula\IFunctionDescription.hxx %_DEST%\inc%_EXT%\formula\IFunctionDescription.hxx
+..\inc\formula\ExternalReferenceHelper.hxx %_DEST%\inc%_EXT%\formula\ExternalReferenceHelper.hxx
..\inc\formula\formuladllapi.h %_DEST%\inc%_EXT%\formula\formuladllapi.h
..\inc\formula\opcode.hxx %_DEST%\inc%_EXT%\formula\opcode.hxx
..\inc\formula\grammar.hxx %_DEST%\inc%_EXT%\formula\grammar.hxx
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index e4382e349afe..a4840802192f 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -511,6 +511,7 @@ DBG_NAME(FormulaCompiler) FormulaCompiler::FormulaCompiler(FormulaTokenArray& _rArr) : pArr( &_rArr ), + pExternalRef(NULL), pStack( NULL ), nRecursion(0), nNumFmt( NUMBERFORMAT_UNDEFINED ), @@ -526,6 +527,7 @@ FormulaCompiler::FormulaCompiler(FormulaTokenArray& _rArr) FormulaCompiler::FormulaCompiler() : pArr( NULL ), + pExternalRef(NULL), pStack( NULL ), nRecursion(0), nNumFmt( NUMBERFORMAT_UNDEFINED ), diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx index 8a9615752daf..021eb651e5ac 100644 --- a/formula/source/core/api/token.cxx +++ b/formula/source/core/api/token.cxx @@ -276,7 +276,7 @@ FormulaJumpToken::~FormulaJumpToken() } -bool FormulaTokenArray::AddFormulaToken(const sheet::FormulaToken& _aToken) +bool FormulaTokenArray::AddFormulaToken(const sheet::FormulaToken& _aToken,ExternalReferenceHelper* /*_pRef*/) { bool bError = false; const OpCode eOpCode = static_cast<OpCode>(_aToken.OpCode); //! assuming equal values for the moment @@ -325,13 +325,13 @@ bool FormulaTokenArray::AddFormulaToken(const sheet::FormulaToken& _aToken) } // switch ( eClass ) return bError; } -bool FormulaTokenArray::Fill(const uno::Sequence< sheet::FormulaToken >& _aSequence) +bool FormulaTokenArray::Fill(const uno::Sequence< sheet::FormulaToken >& _aSequence,ExternalReferenceHelper* _pRef) { bool bError = false; const sal_Int32 nCount = _aSequence.getLength(); for (sal_Int32 nPos=0; nPos<nCount; nPos++) { - bError |= AddFormulaToken( _aSequence[nPos] ); + bError |= AddFormulaToken( _aSequence[nPos] ,_pRef); } return bError; } diff --git a/formula/source/ui/dlg/structpg.hxx b/formula/source/ui/dlg/structpg.hxx index 1d9c7b0281d0..06d6a5ad9579 100644 --- a/formula/source/ui/dlg/structpg.hxx +++ b/formula/source/ui/dlg/structpg.hxx @@ -96,6 +96,8 @@ private: DECL_LINK( SelectHdl, SvTreeListBox* ); + using Window::GetParent; + protected: IFormulaToken* GetFunctionEntry(SvLBoxEntry* pEntry); |