Commits

Anonymous committed c68bdd5

#i10000#: fix merge conflicts (CWS frmdlg)

Comments (0)

Files changed (7)

formula/inc/formula/ExternalReferenceHelper.hxx

+/*************************************************************************
+ *
+ * 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
+

formula/inc/formula/FormulaCompiler.hxx

 #include "formula/opcode.hxx"
 #include "formula/grammar.hxx"
 #include "formula/token.hxx"
+#include "formula/ExternalReferenceHelper.hxx"
 
 
 #define MAXJUMPCOUNT 32     /* maximum number of jumps (ocChose) */
     FormulaTokenRef     pToken;                     // current token
     FormulaTokenRef     pCurrentFactorToken;        // current factor token (of Factor() method)
     FormulaTokenArray*  pArr;
+    ExternalReferenceHelper* pExternalRef;
 
     FormulaToken**      pCode;
     FormulaArrayStack*  pStack;

formula/inc/formula/tokenarray.hxx

 #define FORMULA_TOKENARRAY_HXX
 
 #include "formula/token.hxx"
+#include "formula/ExternalReferenceHelper.hxx"
 #include <tools/solar.h>
 #include <com/sun/star/sheet/FormulaToken.hpp>
 
         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 );

formula/prj/d.lst

 ..\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

formula/source/core/api/FormulaCompiler.cxx

 FormulaCompiler::FormulaCompiler(FormulaTokenArray& _rArr)
         :
         pArr( &_rArr ),
+        pExternalRef(NULL),
         pStack( NULL ),
         nRecursion(0),
         nNumFmt( NUMBERFORMAT_UNDEFINED ),
 FormulaCompiler::FormulaCompiler()
         :
         pArr( NULL ),
+        pExternalRef(NULL),
         pStack( NULL ),
         nRecursion(0),
         nNumFmt( NUMBERFORMAT_UNDEFINED ),

formula/source/core/api/token.cxx

 }
 
 
-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
     } // 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;
 }

formula/source/ui/dlg/structpg.hxx

 
 	DECL_LINK( SelectHdl, SvTreeListBox* );
 
+    using Window::GetParent;
+
 protected:
 
 	IFormulaToken*		GetFunctionEntry(SvLBoxEntry* pEntry);