Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi,

Please find attached two patches for the removal of the legacy Addin Mechanism 
from calc.
One of the patches removes the code from binfilter. I have now read what this 
module is about and I guess it might not have been necessary to remove stuff 
from here, but I hope this will keep it aligned with calc.

As always, these changes are made available under LGPLv3+/MPL.

I have rebased, compiled and tested scalc after the changes. I've had no issues 
with uploading spreadsheets and creating formulas with scaddin functions.
If there is a more systematic way of testing this, or some documents that could 
be used to test that everything still works, please let me know.

Thanks & regards,
Alfonso


      
From 91ee4f99ff211994106fd2640c3df838e344ddd8 Mon Sep 17 00:00:00 2001
From: Alfonso Eusebio <alfonso_eusebio@yahoo.co.uk>
Date: Tue, 15 Feb 2011 22:24:38 +0000
Subject: [PATCH] Remove legacy Addin mechanism from calc

Removes legacy addin mechanism (calc/addin) for calc repo.
---
 sc/inc/callform.hxx              |  130 ----------
 sc/inc/global.hxx                |    2 -
 sc/source/core/data/documen2.cxx |    2 -
 sc/source/core/data/funcdesc.cxx |  108 --------
 sc/source/core/data/global.cxx   |   15 --
 sc/source/core/data/globalx.cxx  |   81 ------
 sc/source/core/inc/addinlis.hxx  |    6 +-
 sc/source/core/inc/adiasync.hxx  |   95 -------
 sc/source/core/inc/core_pch.hxx  |    2 -
 sc/source/core/inc/interpre.hxx  |    6 -
 sc/source/core/tool/addinlis.cxx |    2 +
 sc/source/core/tool/adiasync.cxx |  189 --------------
 sc/source/core/tool/callform.cxx |  466 -----------------------------------
 sc/source/core/tool/compiler.cxx |   34 +--
 sc/source/core/tool/interpr4.cxx |  501 +-------------------------------------
 sc/source/core/tool/makefile.mk  |    2 -
 sc/source/core/tool/parclass.cxx |   25 +--
 sc/source/ui/unoobj/funcuno.cxx  |   12 +-
 18 files changed, 20 insertions(+), 1658 deletions(-)
 delete mode 100644 sc/inc/callform.hxx
 delete mode 100644 sc/source/core/inc/adiasync.hxx
 delete mode 100644 sc/source/core/tool/adiasync.cxx
 delete mode 100644 sc/source/core/tool/callform.cxx

diff --git a/sc/inc/callform.hxx b/sc/inc/callform.hxx
deleted file mode 100644
index df22605..0000000
--- a/sc/inc/callform.hxx
+++ /dev/null
@@ -1,130 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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 SC_CALLFORM_HXX
-#define SC_CALLFORM_HXX
-
-#include "collect.hxx"
-
-#include <rtl/ustring.hxx>
-
-//------------------------------------------------------------------------
-#define MAXFUNCPARAM   16
-#define MAXARRSIZE             0xfffe
-
-//------------------------------------------------------------------------
-#ifndef WIN
-#ifndef WNT
-#define CALLTYPE
-#else
-#define CALLTYPE                       __cdecl
-#endif
-#else
-#define PASCAL                         _pascal
-#define FAR                                    _far
-#define CALLTYPE                       FAR PASCAL
-#endif
-
-extern "C" {
-typedef void (CALLTYPE* AdvData)( double& nHandle, void* pData );
-}
-
-//------------------------------------------------------------------------
-enum ParamType
-{
-    PTR_DOUBLE,
-    PTR_STRING,
-    PTR_DOUBLE_ARR,
-    PTR_STRING_ARR,
-    PTR_CELL_ARR,
-    NONE
-};
-
-//------------------------------------------------------------------------
-class ModuleData;
-class FuncData : public ScDataObject
-{
-friend class FuncCollection;
-    const ModuleData* pModuleData;
-    String             aInternalName;
-    String             aFuncName;
-    USHORT      nNumber;
-    USHORT             nParamCount;
-    ParamType  eAsyncType;
-    ParamType  eParamType[MAXFUNCPARAM];
-private:
-    FuncData(const String& rIName);
-public:
-    FuncData(const ModuleData*pModule,
-             const String&    rIName,
-             const String&    rFName,
-                   USHORT     nNo,
-                   USHORT     nCount,
-             const ParamType* peType,
-                   ParamType  eType);
-    FuncData(const FuncData& rData);
-    virtual    ScDataObject*   Clone() const { return new FuncData(*this); }
-
-    const      String&         GetModuleName() const;
-    const      String&         GetInternalName() const { return aInternalName; }
-    const      String&         GetFuncName() const { return aFuncName; }
-            USHORT             GetParamCount() const { return nParamCount; }
-            ParamType  GetParamType(USHORT nIndex) const { return eParamType[nIndex]; }
-            ParamType  GetReturnType() const { return eParamType[0]; }
-            ParamType  GetAsyncType() const { return eAsyncType; }
-            BOOL        Call(void** ppParam);
-            BOOL               Unadvice(double nHandle);
-
-                        // name and description of parameter nParam.
-                        // nParam==0 => Desc := function description,
-                        // Name := n/a
-            bool        getParamDesc( ::rtl::OUString& aName, ::rtl::OUString& aDesc, sal_uInt16 
nParam );
-
-};
-
-
-//------------------------------------------------------------------------
-class FuncCollection : public ScSortedCollection
-{
-public:
-    FuncCollection(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE) : ScSortedCollection ( 
nLim, nDel, bDup ) {}
-    FuncCollection(const FuncCollection& rFuncCollection) : ScSortedCollection ( rFuncCollection ) 
{}
-
-    virtual    ScDataObject*   Clone() const { return new FuncCollection(*this); }
-            FuncData*  operator[]( const USHORT nIndex) const {return (FuncData*)At(nIndex);}
-    virtual    short           Compare(ScDataObject* pKey1, ScDataObject* pKey2) const;
-            BOOL               SearchFunc( const String& rName, USHORT& rIndex ) const;
-};
-
-
-BOOL InitExternalFunc(const rtl::OUString& rModuleName);
-void ExitExternalFunc();
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 80e4ccc..dc55b1f 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -555,7 +555,6 @@ public:
     SC_DLLPUBLIC static void                                   SetSearchItem( const SvxSearchItem& 
rNew );
     SC_DLLPUBLIC static ScAutoFormat*          GetAutoFormat();
     static void                                        ClearAutoFormat(); //BugId 54209
-    static FuncCollection*             GetFuncCollection();
     SC_DLLPUBLIC static ScUnoAddInCollection* GetAddInCollection();
     SC_DLLPUBLIC static ScUserList*                    GetUserList();
     static void                                        SetUserList( const ScUserList* pNewList );
@@ -582,7 +581,6 @@ public:
     static long                                nLastColWidthExtra;
 
     static void             Init();                                            // during start up
-    static void             InitAddIns();
     static void                                Clear();                                        // 
at the end of the program
 
     static void                                UpdatePPT(OutputDevice* pDev);
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 56b77bf..7e5f63b 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -70,7 +70,6 @@
 #include "global.hxx"
 #include "brdcst.hxx"
 #include "bcaslot.hxx"
-#include "adiasync.hxx"
 #include "addinlis.hxx"
 #include "chartlis.hxx"
 #include "markdata.hxx"
@@ -400,7 +399,6 @@ ScDocument::~ScDocument()
     // which needs to be stopped before the app closes.
     pExternalRefMgr.reset();
 
-    ScAddInAsync::RemoveDocument( this );
     ScAddInListener::RemoveDocument( this );
     DELETEZ( pChartListenerCollection);   // vor pBASM wg. evtl. Listener!
     DELETEZ( pLookupCacheMapImpl);  // before pBASM because of listeners
diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx
index 111c2da..923286d 100644
--- a/sc/source/core/data/funcdesc.cxx
+++ b/sc/source/core/data/funcdesc.cxx
@@ -30,7 +30,6 @@
 
 #include "addincol.hxx"
 #include "appoptio.hxx"
-#include "callform.hxx"
 #include "compiler.hxx"
 #include "global.hxx"
 #include "sc.hrc"
@@ -379,7 +378,6 @@ ScFunctionList::ScFunctionList() :
 {
     ScFuncDesc* pDesc = NULL;
     xub_StrLen nStrLen = 0;
-    FuncCollection* pFuncColl;
     ::std::list<ScFuncDesc*> tmpFuncList;
     sal_uInt16 nDescBlock[] =
     {
@@ -424,112 +422,6 @@ ScFunctionList::ScFunctionList() :
 
     sal_uInt16 nNextId = SC_OPCODE_LAST_OPCODE_ID + 1; // FuncID for AddIn functions
 
-    // Interpretation of AddIn list
-    ::rtl::OUString aDefArgNameValue   = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value"));
-    ::rtl::OUString aDefArgNameString  = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("string"));
-    ::rtl::OUString aDefArgNameValues  = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("values"));
-    ::rtl::OUString aDefArgNameStrings = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("strings"));
-    ::rtl::OUString aDefArgNameCells   = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("cells"));
-    ::rtl::OUString aDefArgNameNone    = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("none"));
-    ::rtl::OUString aDefArgDescValue   = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("a value"));
-    ::rtl::OUString aDefArgDescString  = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("a string"));
-    ::rtl::OUString aDefArgDescValues  = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("array of 
values"));
-    ::rtl::OUString aDefArgDescStrings = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("array of 
strings"));
-    ::rtl::OUString aDefArgDescCells   = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("range of 
cells"));
-    ::rtl::OUString aDefArgDescNone    = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("none"));
-
-    ::rtl::OUString aArgName, aArgDesc;
-    pFuncColl = ScGlobal::GetFuncCollection();
-    for (sal_uInt16 i = 0; i < pFuncColl->GetCount(); ++i)
-    {
-        pDesc = new ScFuncDesc;
-        FuncData *pAddInFuncData = (FuncData*)pFuncColl->At(i);
-        sal_uInt16 nArgs = pAddInFuncData->GetParamCount() - 1;
-        pAddInFuncData->getParamDesc( aArgName, aArgDesc, 0 );
-        pDesc->nFIndex     = nNextId++; //  ??? OpCode vergeben
-        pDesc->nCategory   = ID_FUNCTION_GRP_ADDINS;
-        pDesc->pFuncName   = new ::rtl::OUString(pAddInFuncData->GetInternalName());
-        pDesc->pFuncName->toAsciiUpperCase();
-
-        ::rtl::OUStringBuffer aBuf(aArgDesc);
-        aBuf.append(sal_Unicode('\n'));
-        aBuf.appendAscii("( AddIn: ");
-        aBuf.append(pAddInFuncData->GetModuleName());
-        aBuf.appendAscii(" )");
-        pDesc->pFuncDesc = new ::rtl::OUString(aBuf.makeStringAndClear());
-
-        pDesc->nArgCount   = nArgs;
-        if (nArgs)
-        {
-            pDesc->pDefArgFlags  = new ScFuncDesc::ParameterFlags[nArgs];
-            pDesc->ppDefArgNames = new ::rtl::OUString*[nArgs];
-            pDesc->ppDefArgDescs = new ::rtl::OUString*[nArgs];
-            for (sal_uInt16 j = 0; j < nArgs; ++j)
-            {
-                pDesc->pDefArgFlags[j].bOptional = false;
-                pDesc->pDefArgFlags[j].bSuppress = false;
-                pAddInFuncData->getParamDesc( aArgName, aArgDesc, j+1 );
-                if ( aArgName.getLength() )
-                    pDesc->ppDefArgNames[j] = new ::rtl::OUString( aArgName );
-                else
-                {
-                    switch (pAddInFuncData->GetParamType(j+1))
-                    {
-                        case PTR_DOUBLE:
-                            pDesc->ppDefArgNames[j] = new ::rtl::OUString( aDefArgNameValue );
-                            break;
-                        case PTR_STRING:
-                            pDesc->ppDefArgNames[j] = new ::rtl::OUString( aDefArgNameString );
-                            break;
-                        case PTR_DOUBLE_ARR:
-                            pDesc->ppDefArgNames[j] = new ::rtl::OUString( aDefArgNameValues );
-                            break;
-                        case PTR_STRING_ARR:
-                            pDesc->ppDefArgNames[j] = new ::rtl::OUString( aDefArgNameStrings );
-                            break;
-                        case PTR_CELL_ARR:
-                            pDesc->ppDefArgNames[j] = new ::rtl::OUString( aDefArgNameCells );
-                            break;
-                        default:
-                            pDesc->ppDefArgNames[j] = new ::rtl::OUString( aDefArgNameNone );
-                            break;
-                    }
-                }
-                if ( aArgDesc.getLength() )
-                    pDesc->ppDefArgDescs[j] = new ::rtl::OUString( aArgDesc );
-                else
-                {
-                    switch (pAddInFuncData->GetParamType(j+1))
-                    {
-                        case PTR_DOUBLE:
-                            pDesc->ppDefArgDescs[j] = new ::rtl::OUString( aDefArgDescValue );
-                            break;
-                        case PTR_STRING:
-                            pDesc->ppDefArgDescs[j] = new ::rtl::OUString( aDefArgDescString );
-                            break;
-                        case PTR_DOUBLE_ARR:
-                            pDesc->ppDefArgDescs[j] = new ::rtl::OUString( aDefArgDescValues );
-                            break;
-                        case PTR_STRING_ARR:
-                            pDesc->ppDefArgDescs[j] = new ::rtl::OUString( aDefArgDescStrings );
-                            break;
-                        case PTR_CELL_ARR:
-                            pDesc->ppDefArgDescs[j] = new ::rtl::OUString( aDefArgDescCells );
-                            break;
-                        default:
-                            pDesc->ppDefArgDescs[j] = new ::rtl::OUString( aDefArgDescNone );
-                            break;
-                    }
-                }
-            }
-        }
-
-        tmpFuncList.push_back(pDesc);
-        nStrLen = (*(pDesc->pFuncName)).getLength();
-        if ( nStrLen > nMaxFuncNameLen)
-            nMaxFuncNameLen = nStrLen;
-    }
-
     // StarOne AddIns
 
     ScUnoAddInCollection* pUnoAddIns = ScGlobal::GetAddInCollection();
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 9b00b3f..2191a7b 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -75,7 +75,6 @@
 #include "document.hxx"
 #include "patattr.hxx"
 #include "addincol.hxx"
-#include "adiasync.hxx"
 #include "userlist.hxx"
 #include "interpre.hxx"
 #include "strload.hxx"
@@ -103,7 +102,6 @@ using ::rtl::OUStringBuffer;
 ScDocShellRef* ScGlobal::pDrawClipDocShellRef = NULL;
 SvxSearchItem* ScGlobal::pSearchItem = NULL;
 ScAutoFormat*  ScGlobal::pAutoFormat = NULL;
-FuncCollection* ScGlobal::pFuncCollection = NULL;
 ScUnoAddInCollection* ScGlobal::pAddInCollection = NULL;
 ScUserList*            ScGlobal::pUserList = NULL;
 String**               ScGlobal::ppRscString = NULL;
@@ -309,13 +307,6 @@ ScAutoFormat* ScGlobal::GetAutoFormat()
     return pAutoFormat;
 }
 
-FuncCollection* ScGlobal::GetFuncCollection()
-{
-    if (!pFuncCollection)
-        pFuncCollection = new FuncCollection();
-    return pFuncCollection;
-}
-
 ScUnoAddInCollection* ScGlobal::GetAddInCollection()
 {
     if (!pAddInCollection)
@@ -564,8 +555,6 @@ void ScGlobal::Init()
     ScParameterClassification::Init();
     srand( (unsigned) time( NULL ) );          // Random Seed Init fuer Interpreter
 
-    InitAddIns();
-
     pStrClipDocName = new String( ScResId( SCSTR_NONAME ) );
     *pStrClipDocName += '1';
 
@@ -635,12 +624,8 @@ void ScGlobal::InitTextHeight(SfxItemPool* pPool)
 
 void ScGlobal::Clear()
 {
-    // asyncs _vor_ ExitExternalFunc zerstoeren!
-    theAddInAsyncTbl.DeleteAndDestroy( 0, theAddInAsyncTbl.Count() );
-    ExitExternalFunc();
     DELETEZ(pAutoFormat);
     DELETEZ(pSearchItem);
-    DELETEZ(pFuncCollection);
     DELETEZ(pAddInCollection);
     DELETEZ(pUserList);
 
diff --git a/sc/source/core/data/globalx.cxx b/sc/source/core/data/globalx.cxx
index cce88a1..3858807 100644
--- a/sc/source/core/data/globalx.cxx
+++ b/sc/source/core/data/globalx.cxx
@@ -29,8 +29,6 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sc.hxx"
 
-
-#include "callform.hxx"
 #include "global.hxx"
 #include <tools/urlobj.hxx>
 #include <ucbhelper/contentbroker.hxx>
@@ -55,85 +53,6 @@ using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::ucb;
 
-
-void ScGlobal::InitAddIns()
-{
-    // multi paths separated by semicolons
-    SvtPathOptions aPathOpt;
-    String aMultiPath = aPathOpt.GetAddinPath();
-    if ( aMultiPath.Len() > 0 )
-    {
-        xub_StrLen nTokens = aMultiPath.GetTokenCount( ';' );
-        xub_StrLen nIndex = 0;
-        for ( xub_StrLen j=0; j<nTokens; j++ )
-        {
-            String aPath( aMultiPath.GetToken( 0, ';', nIndex ) );
-            if ( aPath.Len() > 0 )
-            {
-                //     use LocalFileHelper to convert the path to a URL that always points
-                //     to the file on the server
-                String aUrl;
-                if ( utl::LocalFileHelper::ConvertPhysicalNameToURL( aPath, aUrl ) )
-                    aPath = aUrl;
-
-                INetURLObject aObj;
-                aObj.SetSmartURL( aPath );
-                aObj.setFinalSlash();
-                try
-                {
-                    ::ucbhelper::Content aCnt( aObj.GetMainURL(INetURLObject::NO_DECODE),
-                        Reference< XCommandEnvironment > () );
-                    Reference< sdbc::XResultSet > xResultSet;
-                    Sequence< rtl::OUString > aProps;
-                    try
-                    {
-                        xResultSet = aCnt.createCursor(
-                            aProps, ::ucbhelper::INCLUDE_DOCUMENTS_ONLY );
-                    }
-                    catch ( Exception& )
-                    {
-                        // ucb may throw different exceptions on failure now
-                        // no assertion if AddIn directory doesn't exist
-                    }
-
-                    if ( xResultSet.is() )
-                    {
-                        Reference< sdbc::XRow > xRow( xResultSet, UNO_QUERY );
-                        Reference< XContentAccess >
-                            xContentAccess( xResultSet, UNO_QUERY );
-                        try
-                        {
-                            if ( xResultSet->first() )
-                            {
-                                do
-                                {
-                                    rtl::OUString aId( 
xContentAccess->queryContentIdentifierString() );
-                                    InitExternalFunc( aId );
-                                }
-                                while ( xResultSet->next() );
-                            }
-                        }
-                        catch ( Exception& )
-                        {
-                            DBG_ERRORFILE( "ResultSetException catched!" );
-                        }
-                    }
-                }
-                catch ( Exception& )
-                {
-                    DBG_ERRORFILE( "Exception catched!" );
-                }
-                catch ( ... )
-                {
-
-                    DBG_ERRORFILE( "unexpected exception caught!" );
-                }
-            }
-        }
-    }
-}
-
-
 String ScGlobal::GetOrdinalSuffix( sal_Int32 nNumber)
 {
     if (!xOrdinalSuffix.is())
diff --git a/sc/source/core/inc/addinlis.hxx b/sc/source/core/inc/addinlis.hxx
index 753998a..287fa96 100644
--- a/sc/source/core/inc/addinlis.hxx
+++ b/sc/source/core/inc/addinlis.hxx
@@ -29,13 +29,17 @@
 #ifndef SC_ADDINLIS_HXX
 #define SC_ADDINLIS_HXX
 
-#include "adiasync.hxx" // for ScAddInDocs PtrArr
+#include <svl/broadcast.hxx>
+#include <svl/svarray.hxx>
+
 #include <com/sun/star/sheet/XResultListener.hpp>
 #include <com/sun/star/sheet/XVolatileResult.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <cppuhelper/implbase2.hxx>
 
 class ScDocument;
+typedef ScDocument* ScAddInDocPtr;
+SV_DECL_PTRARR_SORT( ScAddInDocs, ScAddInDocPtr, 1, 1 )
 
 class ScAddInListener : public cppu::WeakImplHelper2<
                             com::sun::star::sheet::XResultListener,
diff --git a/sc/source/core/inc/adiasync.hxx b/sc/source/core/inc/adiasync.hxx
deleted file mode 100644
index 3931d46..0000000
--- a/sc/source/core/inc/adiasync.hxx
+++ /dev/null
@@ -1,95 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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 SC_ADIASYNC_HXX
-#define SC_ADIASYNC_HXX
-
-#include <svl/broadcast.hxx>
-#include <svl/svarray.hxx>
-
-#include "callform.hxx"
-
-extern "C" {
-void CALLTYPE ScAddInAsyncCallBack( double& nHandle, void* pData );
-}
-
-
-class ScAddInAsync;
-typedef ScAddInAsync* ScAddInAsyncPtr;
-SV_DECL_PTRARR_SORT( ScAddInAsyncs, ScAddInAsyncPtr, 4, 4 )
-extern ScAddInAsyncs theAddInAsyncTbl; // in adiasync.cxx
-
-class ScDocument;
-typedef ScDocument* ScAddInDocPtr;
-SV_DECL_PTRARR_SORT( ScAddInDocs, ScAddInDocPtr, 1, 1 )
-
-class String;
-
-class ScAddInAsync : public SvtBroadcaster
-{
-private:
-    union
-    {
-        double         nVal;                           // aktueller Wert
-        String*                pStr;
-    };
-    ScAddInDocs*       pDocs;                          // Liste der benutzenden Dokumente
-    FuncData*          pFuncData;                      // Zeiger auf die Daten in der Collection
-    ULONG                      nHandle;                        // wird von double auf ULONG 
gecasted
-    ParamType          eType;                          // PTR_DOUBLE oder PTR_STRING Ergebnis
-    BOOL                       bValid;                         // ob Wert gueltig
-
-public:
-                    // cTor nur wenn ScAddInAsync::Get fehlschlaegt!
-                    // nIndex: Index aus der FunctionCollection
-                    ScAddInAsync( ULONG nHandle, USHORT nIndex,
-                                    ScDocument* pDoc );
-                    // default-cTor nur fuer das eine globale aSeekObj !!!
-                    ScAddInAsync();
-    virtual                    ~ScAddInAsync();
-    static ScAddInAsync*       Get( ULONG nHandle );
-    static void                CallBack( ULONG nHandle, void* pData );
-    static void                RemoveDocument( ScDocument* pDocument );
-    BOOL                       IsValid() const                 { return bValid; }
-    ParamType          GetType() const                 { return eType; }
-    double                     GetValue() const                { return nVal; }
-    const String&      GetString() const               { return *pStr; }
-    BOOL                       HasDocument( ScDocument* pDoc ) const
-                        { return pDocs->Seek_Entry( pDoc ); }
-    void                       AddDocument( ScDocument* pDoc ) { pDocs->Insert( pDoc ); }
-
-    // Vergleichsoperatoren fuer PtrArrSort
-    BOOL operator < ( const ScAddInAsync& r ) { return nHandle <  r.nHandle; }
-    BOOL operator ==( const ScAddInAsync& r ) { return nHandle == r.nHandle; }
-};
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/inc/core_pch.hxx b/sc/source/core/inc/core_pch.hxx
index 1c96119..2821bca 100644
--- a/sc/source/core/inc/core_pch.hxx
+++ b/sc/source/core/inc/core_pch.hxx
@@ -207,7 +207,6 @@
 #include <svx/svdglue.hxx>
 #include <editeng/langitem.hxx>
 #include <editeng/eeitem.hxx>
-#include <callform.hxx>
 #include <validat.hxx>
 #include <editeng/brshitem.hxx>
 #include <sot/exchange.hxx>
@@ -228,7 +227,6 @@
 #include <editeng/postitem.hxx>
 #include <svx/svditer.hxx>
 #include <editeng/udlnitem.hxx>
-#include <adiasync.hxx>
 #include <sfx2/bindings.hxx>
 #include <ddelink.hxx>
 #include <chartlis.hxx>
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index d323027..e167b57 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -219,12 +219,6 @@ inline BOOL HasCellValueData( const ScBaseCell* pCell )
 inline BOOL HasCellStringData( const ScBaseCell* pCell )
     { return pCell ? pCell->HasStringData() : FALSE; }
 
-BOOL CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
-                     SCCOL nCol2, SCROW nRow2, SCTAB nTab2, BYTE* pCellArr);
-BOOL CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
-                     SCCOL nCol2, SCROW nRow2, SCTAB nTab2, BYTE* pCellArr);
-BOOL CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
-                   SCCOL nCol2, SCROW nRow2, SCTAB nTab2, BYTE* pCellArr);
 
 //-----------------------------------------------------------------------------
 // Stack operations
diff --git a/sc/source/core/tool/addinlis.cxx b/sc/source/core/tool/addinlis.cxx
index 69a8f52..1f0407c 100644
--- a/sc/source/core/tool/addinlis.cxx
+++ b/sc/source/core/tool/addinlis.cxx
@@ -38,6 +38,8 @@
 #include "brdcst.hxx"
 #include "sc.hrc"
 
+SV_IMPL_PTRARR_SORT( ScAddInDocs, ScAddInDocPtr );
+
 using namespace com::sun::star;
 
 SC_SIMPLE_SERVICE_INFO( ScAddInListener, "ScAddInListener", "stardiv.one.sheet.AddInListener" )
diff --git a/sc/source/core/tool/adiasync.cxx b/sc/source/core/tool/adiasync.cxx
deleted file mode 100644
index 85916d1..0000000
--- a/sc/source/core/tool/adiasync.cxx
+++ /dev/null
@@ -1,189 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sc.hxx"
-
-
-
-//------------------------------------------------------------------------
-
-#include <sfx2/objsh.hxx>
-
-#include "adiasync.hxx"
-#include "brdcst.hxx"
-#include "global.hxx"
-#include "document.hxx"
-#include "sc.hrc"              // FID_DATACHANGED
-#include <osl/thread.h>
-
-
-//------------------------------------------------------------------------
-
-ScAddInAsyncs theAddInAsyncTbl;
-static ScAddInAsync aSeekObj;
-
-
-SV_IMPL_OP_PTRARR_SORT( ScAddInAsyncs, ScAddInAsyncPtr );
-
-SV_IMPL_PTRARR_SORT( ScAddInDocs, ScAddInDocPtr );
-
-extern "C" {
-void CALLTYPE ScAddInAsyncCallBack( double& nHandle, void* pData )
-{
-    ScAddInAsync::CallBack( ULONG( nHandle ), pData );
-}
-}
-
-
-
-ScAddInAsync::ScAddInAsync() :
-    SvtBroadcaster(),
-    nHandle( 0 )
-{      // nur fuer aSeekObj !
-}
-
-
-
-ScAddInAsync::ScAddInAsync( ULONG nHandleP, USHORT nIndex, ScDocument* pDoc ) :
-    SvtBroadcaster(),
-    pStr( NULL ),
-    nHandle( nHandleP ),
-    bValid( FALSE )
-{
-    pDocs = new ScAddInDocs( 1, 1 );
-    pDocs->Insert( pDoc );
-    pFuncData = (FuncData*)ScGlobal::GetFuncCollection()->At(nIndex);
-    eType = pFuncData->GetAsyncType();
-    theAddInAsyncTbl.Insert( this );
-}
-
-
-
-ScAddInAsync::~ScAddInAsync()
-{
-    // aSeekObj hat das alles nicht, Handle 0 gibt es sonst nicht
-    if ( nHandle )
-    {
-        // im dTor wg. theAddInAsyncTbl.DeleteAndDestroy in ScGlobal::Clear
-        pFuncData->Unadvice( (double)nHandle );
-        if ( eType == PTR_STRING && pStr )             // mit Typvergleich wg. Union!
-            delete pStr;
-        delete pDocs;
-    }
-}
-
-
-
-ScAddInAsync* ScAddInAsync::Get( ULONG nHandleP )
-{
-    USHORT nPos;
-    ScAddInAsync* pRet = 0;
-    aSeekObj.nHandle = nHandleP;
-    if ( theAddInAsyncTbl.Seek_Entry( &aSeekObj, &nPos ) )
-        pRet = theAddInAsyncTbl[ nPos ];
-    aSeekObj.nHandle = 0;
-    return pRet;
-}
-
-
-
-void ScAddInAsync::CallBack( ULONG nHandleP, void* pData )
-{
-    ScAddInAsync* p;
-    if ( (p = Get( nHandleP )) == NULL )
-        return;
-    // keiner mehr dran? Unadvice und weg damit
-    if ( !p->HasListeners() )
-    {
-        // nicht im dTor wg. theAddInAsyncTbl.DeleteAndDestroy in ScGlobal::Clear
-        theAddInAsyncTbl.Remove( p );
-        delete p;
-        return ;
-    }
-    switch ( p->eType )
-    {
-        case PTR_DOUBLE :
-            p->nVal = *(double*)pData;
-            break;
-        case PTR_STRING :
-            if ( p->pStr )
-                *p->pStr = String( (sal_Char*)pData, osl_getThreadTextEncoding() );
-            else
-                p->pStr = new String( (sal_Char*)pData, osl_getThreadTextEncoding() );
-            break;
-        default :
-            DBG_ERROR( "unbekannter AsyncType" );
-            return;
-    }
-    p->bValid = TRUE;
-    p->Broadcast( ScHint( SC_HINT_DATACHANGED, ScAddress(), NULL ) );
-
-    const ScDocument** ppDoc = (const ScDocument**) p->pDocs->GetData();
-    USHORT nCount = p->pDocs->Count();
-    for ( USHORT j=0; j<nCount; j++, ppDoc++ )
-    {
-        ScDocument* pDoc = (ScDocument*)*ppDoc;
-        pDoc->TrackFormulas();
-        pDoc->GetDocumentShell()->Broadcast( SfxSimpleHint( FID_DATACHANGED ) );
-        pDoc->ResetChanged( ScRange(0,0,0,MAXCOL,MAXROW,MAXTAB) );
-    }
-}
-
-
-
-void ScAddInAsync::RemoveDocument( ScDocument* pDocumentP )
-{
-    USHORT nPos = theAddInAsyncTbl.Count();
-    if ( nPos )
-    {
-        const ScAddInAsync** ppAsync =
-            (const ScAddInAsync**) theAddInAsyncTbl.GetData() + nPos - 1;
-        for ( ; nPos-- >0; ppAsync-- )
-        {      // rueckwaerts wg. Pointer-Aufrueckerei im Array
-            ScAddInDocs* p = ((ScAddInAsync*)*ppAsync)->pDocs;
-            USHORT nFoundPos;
-            if ( p->Seek_Entry( pDocumentP, &nFoundPos ) )
-            {
-                p->Remove( nFoundPos );
-                if ( p->Count() == 0 )
-                {      // dieses AddIn wird nicht mehr benutzt
-                    ScAddInAsync* pAsync = (ScAddInAsync*)*ppAsync;
-                    theAddInAsyncTbl.Remove( nPos );
-                    delete pAsync;
-                    ppAsync = (const ScAddInAsync**) theAddInAsyncTbl.GetData()
-                        + nPos;
-                }
-            }
-        }
-    }
-}
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/callform.cxx b/sc/source/core/tool/callform.cxx
deleted file mode 100644
index 484d631..0000000
--- a/sc/source/core/tool/callform.cxx
+++ /dev/null
@@ -1,466 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sc.hxx"
-
-
-
-// INCLUDE ---------------------------------------------------------------
-#include <vcl/svapp.hxx>
-#include <osl/module.hxx>
-#include <osl/file.hxx>
-#include <unotools/transliterationwrapper.hxx>
-
-#include "callform.hxx"
-#include "global.hxx"
-#include "adiasync.hxx"
-
-//------------------------------------------------------------------------
-
-extern "C" {
-
-typedef void (CALLTYPE* ExFuncPtr1)(void*);
-typedef void (CALLTYPE* ExFuncPtr2)(void*, void*);
-typedef void (CALLTYPE* ExFuncPtr3)(void*, void*, void*);
-typedef void (CALLTYPE* ExFuncPtr4)(void*, void*, void*, void*);
-typedef void (CALLTYPE* ExFuncPtr5)(void*, void*, void*, void*, void*);
-typedef void (CALLTYPE* ExFuncPtr6)(void*, void*, void*, void*, void*, void*);
-typedef void (CALLTYPE* ExFuncPtr7)(void*, void*, void*, void*, void*, void*, void*);
-typedef void (CALLTYPE* ExFuncPtr8)(void*, void*, void*, void*, void*, void*, void*, void*);
-typedef void (CALLTYPE* ExFuncPtr9)(void*, void*, void*, void*, void*, void*, void*, void*, void*);
-typedef void (CALLTYPE* ExFuncPtr10)(void*, void*, void*, void*, void*, void*, void*, void*, 
void*, void*);
-typedef void (CALLTYPE* ExFuncPtr11)(void*, void*, void*, void*, void*, void*, void*, void*, 
void*, void*, void*);
-typedef void (CALLTYPE* ExFuncPtr12)(void*, void*, void*, void*, void*, void*, void*, void*, 
void*, void*, void*, void*);
-typedef void (CALLTYPE* ExFuncPtr13)(void*, void*, void*, void*, void*, void*, void*, void*, 
void*, void*, void*, void*, void*);
-typedef void (CALLTYPE* ExFuncPtr14)(void*, void*, void*, void*, void*, void*, void*, void*, 
void*, void*, void*, void*, void*, void*);
-typedef void (CALLTYPE* ExFuncPtr15)(void*, void*, void*, void*, void*, void*, void*, void*, 
void*, void*, void*, void*, void*, void*, void*);
-typedef void (CALLTYPE* ExFuncPtr16)(void*, void*, void*, void*, void*, void*, void*, void*, 
void*, void*, void*, void*, void*, void*, void*, void*);
-
-typedef void (CALLTYPE* GetFuncCountPtr)(USHORT& nCount);
-typedef void (CALLTYPE* GetFuncDataPtr)
-    (USHORT& nNo, sal_Char* pFuncName, USHORT& nParamCount, ParamType* peType, sal_Char* 
pInternalName);
-
-typedef void (CALLTYPE* SetLanguagePtr)( USHORT& nLanguage );
-typedef void (CALLTYPE* GetParamDesc)
-    (USHORT& nNo, USHORT& nParam, sal_Char* pName, sal_Char* pDesc );
-
-typedef void (CALLTYPE* IsAsync) ( USHORT&             nNo,
-                                   ParamType*  peType );
-typedef void (CALLTYPE* Advice)  ( USHORT&             nNo,
-                                   AdvData&            pfCallback );
-typedef void (CALLTYPE* Unadvice)( double&             nHandle );
-
-typedef void (CALLTYPE* FARPROC) ( void );
-
-}
-
-#if defined(OS2) && defined(BLC)
-#define GETFUNCTIONCOUNT               "_GetFunctionCount"
-#define GETFUNCTIONDATA                        "_GetFunctionData"
-#define SETLANGUAGE                            "_SetLanguage"
-#define GETPARAMDESC                   "_GetParameterDescription"
-#define ISASYNC                                        "_IsAsync"
-#define ADVICE                                 "_Advice"
-#define UNADVICE                               "_Unadvice"
-#else // Pascal oder extern "C"
-#define GETFUNCTIONCOUNT               "GetFunctionCount"
-#define GETFUNCTIONDATA                        "GetFunctionData"
-#define SETLANGUAGE                            "SetLanguage"
-#define GETPARAMDESC                   "GetParameterDescription"
-#define ISASYNC                                        "IsAsync"
-#define ADVICE                                 "Advice"
-#define UNADVICE                               "Unadvice"
-#endif
-
-#define LIBFUNCNAME( name ) \
-    (String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( name ) ))
-
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-FuncData::FuncData(const String& rIName) :
-    pModuleData                (NULL),
-    aInternalName   (rIName),
-    nNumber                    (0),
-    nParamCount                (0),
-    eAsyncType         (NONE)
-{
-    for (USHORT i = 0; i < MAXFUNCPARAM; i++)
-        eParamType[i] = PTR_DOUBLE;
-}
-
-//------------------------------------------------------------------------
-
-FuncData::FuncData(const ModuleData*pModule,
-                   const String&       rIName,
-                   const String&       rFName,
-                         USHORT        nNo,
-                    USHORT     nCount,
-                   const ParamType* peType,
-                    ParamType  eType) :
-    pModuleData                (pModule),
-    aInternalName   (rIName),
-    aFuncName          (rFName),
-    nNumber                    (nNo),
-    nParamCount                (nCount),
-    eAsyncType         (eType)
-{
-    for (USHORT i = 0; i < MAXFUNCPARAM; i++)
-        eParamType[i] = peType[i];
-}
-
-//------------------------------------------------------------------------
-
-FuncData::FuncData(const FuncData& rData) :
-    ScDataObject(),
-    pModuleData                (rData.pModuleData),
-    aInternalName   (rData.aInternalName),
-    aFuncName          (rData.aFuncName),
-    nNumber                    (rData.nNumber),
-    nParamCount                (rData.nParamCount),
-    eAsyncType         (rData.eAsyncType)
-{
-    for (USHORT i = 0; i < MAXFUNCPARAM; i++)
-        eParamType[i] = rData.eParamType[i];
-}
-
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-short FuncCollection::Compare(ScDataObject* pKey1, ScDataObject* pKey2) const
-{
-    return (short) ScGlobal::GetpTransliteration()->compareString(
-        ((FuncData*)pKey1)->aInternalName, ((FuncData*)pKey2)->aInternalName );
-}
-
-//------------------------------------------------------------------------
-
-BOOL FuncCollection::SearchFunc( const String& rName, USHORT& rIndex ) const
-{
-    FuncData aDataObj(rName);
-    return Search( &aDataObj, rIndex );
-}
-
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-class ModuleData : public ScDataObject
-{
-friend class ModuleCollection;
-    String             aName;
-    osl::Module* pInstance;
-public:
-    ModuleData(const String& rStr, osl::Module* pInst) : aName (rStr), pInstance (pInst) {}
-    ModuleData(const ModuleData& rData) : ScDataObject(), aName (rData.aName) {pInstance = new 
osl::Module(aName);}
-    ~ModuleData() { delete pInstance; }
-    virtual ScDataObject*      Clone() const { return new ModuleData(*this); }
-
-    const   String&                    GetName() const { return aName; }
-            osl::Module*    GetInstance() const { return pInstance; }
-            void                       FreeInstance() { delete pInstance; pInstance = 0; }
-};
-
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-class ModuleCollection : public ScSortedCollection
-{
-public:
-    ModuleCollection(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE) : ScSortedCollection ( 
nLim, nDel, bDup ) {}
-    ModuleCollection(const ModuleCollection& rModuleCollection) : ScSortedCollection ( 
rModuleCollection ) {}
-
-    virtual ScDataObject*              Clone() const { return new ModuleCollection(*this); }
-            ModuleData*                operator[]( const USHORT nIndex) const {return 
(ModuleData*)At(nIndex);}
-    virtual short                      Compare(ScDataObject* pKey1, ScDataObject* pKey2) const;
-            BOOL                       SearchModule( const String& rName,
-                                          const ModuleData*& rpModule ) const;
-};
-
-static ModuleCollection aModuleCollection;
-
-//------------------------------------------------------------------------
-
-short ModuleCollection::Compare(ScDataObject* pKey1, ScDataObject* pKey2) const
-{
-    return (short) ScGlobal::GetpTransliteration()->compareString(
-        ((ModuleData*)pKey1)->aName, ((ModuleData*)pKey2)->aName );
-}
-
-//------------------------------------------------------------------------
-
-BOOL ModuleCollection::SearchModule( const String& rName,
-                                     const ModuleData*& rpModule ) const
-{
-    USHORT nIndex;
-    ModuleData aSearchModule(rName, 0);
-    BOOL bFound = Search( &aSearchModule, nIndex );
-    if (bFound)
-        rpModule = (ModuleData*)At(nIndex);
-    else
-        rpModule = 0;
-    return bFound;
-}
-
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-BOOL InitExternalFunc(const rtl::OUString& rModuleName)
-{
-    String aModuleName( rModuleName );
-
-    // Module schon geladen?
-    const ModuleData* pTemp;
-    if (aModuleCollection.SearchModule(aModuleName, pTemp))
-        return FALSE;
-
-    rtl::OUString aNP;
-    aNP = rModuleName;
-
-    BOOL bRet = FALSE;
-    osl::Module* pLib = new osl::Module( aNP );
-    if (pLib->is())
-    {
-        FARPROC fpGetCount = (FARPROC)pLib->getFunctionSymbol(LIBFUNCNAME(GETFUNCTIONCOUNT));
-        FARPROC fpGetData = (FARPROC)pLib->getFunctionSymbol(LIBFUNCNAME(GETFUNCTIONDATA));
-        if ((fpGetCount != NULL) && (fpGetData != NULL))
-        {
-            FARPROC fpIsAsync = (FARPROC)pLib->getFunctionSymbol(LIBFUNCNAME(ISASYNC));
-            FARPROC fpAdvice = (FARPROC)pLib->getFunctionSymbol(LIBFUNCNAME(ADVICE));
-            FARPROC fpSetLanguage = (FARPROC)pLib->getFunctionSymbol(LIBFUNCNAME(SETLANGUAGE));
-            if ( fpSetLanguage )
-            {
-                LanguageType eLanguage = Application::GetSettings().GetUILanguage();
-                USHORT nLanguage = (USHORT) eLanguage;
-                (*((SetLanguagePtr)fpSetLanguage))( nLanguage );
-            }
-
-            // Module in die Collection aufnehmen
-            ModuleData* pModuleData = new ModuleData(aModuleName, pLib);
-            aModuleCollection.Insert(pModuleData);
-
-            // Schnittstelle initialisieren
-            AdvData pfCallBack = &ScAddInAsyncCallBack;
-            FuncData* pFuncData;
-            FuncCollection* pFuncCol = ScGlobal::GetFuncCollection();
-            USHORT nCount;
-            (*((GetFuncCountPtr)fpGetCount))(nCount);
-            for (USHORT i=0; i < nCount; i++)
-            {
-                sal_Char cFuncName[256];
-                sal_Char cInternalName[256];
-                USHORT nParamCount;
-                ParamType eParamType[MAXFUNCPARAM];
-                ParamType eAsyncType = NONE;
-                // #62113# alles initialisieren, falls das AddIn sich schlecht verhaelt
-                cFuncName[0] = 0;
-                cInternalName[0] = 0;
-                nParamCount = 0;
-                for ( USHORT j=0; j<MAXFUNCPARAM; j++ )
-                {
-                    eParamType[j] = NONE;
-                }
-                (*((GetFuncDataPtr)fpGetData))(i, cFuncName, nParamCount,
-                                               eParamType, cInternalName);
-                if( fpIsAsync )
-                {
-                    (*((IsAsync)fpIsAsync))(i, &eAsyncType);
-                    if ( fpAdvice && eAsyncType != NONE )
-                        (*((Advice)fpAdvice))( i, pfCallBack );
-                }
-                String aInternalName( cInternalName, osl_getThreadTextEncoding() );
-                String aFuncName( cFuncName, osl_getThreadTextEncoding() );
-                pFuncData = new FuncData( pModuleData,
-                                          aInternalName,
-                                          aFuncName,
-                                          i,
-                                          nParamCount,
-                                          eParamType,
-                                          eAsyncType );
-                pFuncCol->Insert(pFuncData);
-            }
-            bRet = TRUE;
-        }
-        else
-            delete pLib;
-    }
-    else
-        delete pLib;
-    return bRet;
-}
-
-//------------------------------------------------------------------------
-
-void ExitExternalFunc()
-{
-    USHORT nCount = aModuleCollection.GetCount();
-    for (USHORT i=0; i<nCount; i++)
-    {
-        ModuleData* pData = aModuleCollection[i];
-        pData->FreeInstance();
-    }
-}
-
-//------------------------------------------------------------------------
-
-BOOL FuncData::Call(void** ppParam)
-{
-    BOOL bRet = FALSE;
-    osl::Module* pLib = pModuleData->GetInstance();
-    FARPROC fProc = (FARPROC)pLib->getFunctionSymbol(aFuncName);
-    if (fProc != NULL)
-    {
-        switch (nParamCount)
-        {
-            case 1 :
-                (*((ExFuncPtr1)fProc))(ppParam[0]);
-                bRet = TRUE;
-                break;
-            case 2 :
-                (*((ExFuncPtr2)fProc))(ppParam[0], ppParam[1]);
-                bRet = TRUE;
-                break;
-            case 3 :
-                (*((ExFuncPtr3)fProc))(ppParam[0], ppParam[1], ppParam[2]);
-                bRet = TRUE;
-                break;
-            case 4 :
-                (*((ExFuncPtr4)fProc))(ppParam[0], ppParam[1], ppParam[2], ppParam[3]);
-                bRet = TRUE;
-                break;
-            case 5 :
-                (*((ExFuncPtr5)fProc))(ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4]);
-                bRet = TRUE;
-                break;
-            case 6 :
-                (*((ExFuncPtr6)fProc))(ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], 
ppParam[5]);
-                bRet = TRUE;
-                break;
-            case 7 :
-                (*((ExFuncPtr7)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], 
ppParam[4], ppParam[5],
-                                        ppParam[6]);
-                bRet = TRUE;
-                break;
-            case 8 :
-                (*((ExFuncPtr8)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], 
ppParam[4], ppParam[5],
-                                        ppParam[6], ppParam[7]);
-                bRet = TRUE;
-                break;
-            case 9 :
-                (*((ExFuncPtr9)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], 
ppParam[4], ppParam[5],
-                                        ppParam[6], ppParam[7], ppParam[8]);
-                bRet = TRUE;
-                break;
-            case 10 :
-                (*((ExFuncPtr10)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], 
ppParam[4], ppParam[5],
-                                        ppParam[6], ppParam[7], ppParam[8], ppParam[9]);
-                bRet = TRUE;
-                break;
-            case 11 :
-                (*((ExFuncPtr11)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], 
ppParam[4], ppParam[5],
-                                        ppParam[6], ppParam[7], ppParam[8], ppParam[9], 
ppParam[10]);
-                bRet = TRUE;
-                break;
-            case 12:
-                (*((ExFuncPtr12)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], 
ppParam[4], ppParam[5],
-                                        ppParam[6], ppParam[7], ppParam[8], ppParam[9], 
ppParam[10], ppParam[11]);
-                bRet = TRUE;
-                break;
-            case 13:
-                (*((ExFuncPtr13)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], 
ppParam[4], ppParam[5],
-                                        ppParam[6], ppParam[7], ppParam[8], ppParam[9], 
ppParam[10], ppParam[11],
-                                        ppParam[12]);
-                bRet = TRUE;
-                break;
-            case 14 :
-                (*((ExFuncPtr14)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], 
ppParam[4], ppParam[5],
-                                        ppParam[6], ppParam[7], ppParam[8], ppParam[9], 
ppParam[10], ppParam[11],
-                                        ppParam[12], ppParam[13]);
-                bRet = TRUE;
-                break;
-            case 15 :
-                (*((ExFuncPtr15)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], 
ppParam[4], ppParam[5],
-                                        ppParam[6], ppParam[7], ppParam[8], ppParam[9], 
ppParam[10], ppParam[11],
-                                        ppParam[12], ppParam[13], ppParam[14]);
-                bRet = TRUE;
-                break;
-            case 16 :
-                (*((ExFuncPtr16)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], 
ppParam[4], ppParam[5],
-                                        ppParam[6], ppParam[7], ppParam[8], ppParam[9], 
ppParam[10], ppParam[11],
-                                        ppParam[12], ppParam[13], ppParam[14], ppParam[15]);
-                bRet = TRUE;
-                break;
-            default : break;
-        }
-    }
-    return bRet;
-}
-
-//------------------------------------------------------------------------
-
-BOOL FuncData::Unadvice( double nHandle )
-{
-    BOOL bRet = FALSE;
-    osl::Module* pLib = pModuleData->GetInstance();
-    FARPROC fProc = (FARPROC)pLib->getFunctionSymbol(LIBFUNCNAME(UNADVICE));
-    if (fProc != NULL)
-    {
-        ((::Unadvice)fProc)(nHandle);
-        bRet = TRUE;
-    }
-    return bRet;
-}
-
-//------------------------------------------------------------------------
-
-const String& FuncData::GetModuleName() const
-{
-    return pModuleData->GetName();
-}
-
-bool FuncData::getParamDesc( ::rtl::OUString& aName, ::rtl::OUString& aDesc, sal_uInt16 nParam )
-{
-    bool bRet = false;
-    if ( nParam <= nParamCount )
-    {
-        osl::Module* pLib = pModuleData->GetInstance();
-        FARPROC fProc = (FARPROC) pLib->getFunctionSymbol( LIBFUNCNAME(GETPARAMDESC) );
-        if ( fProc != NULL )
-        {
-            sal_Char pcName[256];
-            sal_Char pcDesc[256];
-            *pcName = *pcDesc = 0;
-            sal_uInt16 nFuncNo = nNumber;      // nicht per Reference versauen lassen..
-            ((::GetParamDesc)fProc)( nFuncNo, nParam, pcName, pcDesc );
-            aName = ::rtl::OUString( pcName, 256, osl_getThreadTextEncoding() );
-            aDesc = ::rtl::OUString( pcDesc, 256, osl_getThreadTextEncoding() );
-            bRet = true;
-        }
-    }
-    if ( !bRet )
-    {
-        aName = ::rtl::OUString();
-        aDesc = ::rtl::OUString();
-    }
-    return bRet;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index e98fcff..df8f801 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -58,7 +58,6 @@
 #include "rangenam.hxx"
 #include "dbcolect.hxx"
 #include "document.hxx"
-#include "callform.hxx"
 #include "addincol.hxx"
 #include "refupdat.hxx"
 #include "scresid.hxx"
@@ -222,14 +221,8 @@ bool ScCompiler::IsEnglishSymbol( const String& rName )
     {
         return true;
     }
-    // 2. old add in functions
-    USHORT nIndex;
-    if ( ScGlobal::GetFuncCollection()->SearchFunc( aUpper, nIndex ) )
-    {
-        return true;
-    }
 
-    // 3. new (uno) add in functions
+    // 2. new (uno) add in functions
     String aIntName(ScGlobal::GetAddInCollection()->FindFunction( aUpper, FALSE ));
     if (aIntName.Len())
     {
@@ -2497,27 +2490,18 @@ BOOL ScCompiler::IsOpCode( const String& rName, bool bInArray )
         }
         if (!aIntName.Len())
         {
-            // Old (deprecated) addins first for legacy.
-            USHORT nIndex;
-            bFound = ScGlobal::GetFuncCollection()->SearchFunc( cSymbol, nIndex);
-            if (bFound)
+            // bLocalFirst=FALSE for (English) upper full original name
+            // (service.function)
+            aIntName = ScGlobal::GetAddInCollection()->FindFunction(
+                    rName, !mxSymbols->isEnglish());
+
+            if (aIntName.Len())
             {
                 ScRawToken aToken;
-                aToken.SetExternal( cSymbol );
+                aToken.SetExternal( aIntName.GetBuffer() );     // international name
                 pRawToken = aToken.Clone();
+                bFound = TRUE;
             }
-            else
-                // bLocalFirst=FALSE for (English) upper full original name
-                // (service.function)
-                aIntName = ScGlobal::GetAddInCollection()->FindFunction(
-                        rName, !mxSymbols->isEnglish());
-        }
-        if (aIntName.Len())
-        {
-            ScRawToken aToken;
-            aToken.SetExternal( aIntName.GetBuffer() );     // international name
-            pRawToken = aToken.Clone();
-            bFound = TRUE;
         }
     }
     OpCode eOp;
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 52a1a76..192b796 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -57,13 +57,11 @@
 #include "global.hxx"
 #include "dbcolect.hxx"
 #include "cell.hxx"
-#include "callform.hxx"
 #include "addincol.hxx"
 #include "document.hxx"
 #include "dociter.hxx"
 #include "docoptio.hxx"
 #include "scmatrix.hxx"
-#include "adiasync.hxx"
 #include "sc.hrc"
 #include "cellsuno.hxx"
 #include "optuno.hxx"
@@ -548,312 +546,6 @@ void ScInterpreter::GetCellString( String& rStr, const ScBaseCell* pCell )
 }
 
 
-BOOL ScInterpreter::CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
-                            SCCOL nCol2, SCROW nRow2, SCTAB nTab2, BYTE* pCellArr)
-{
-    RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CreateDoubleArr" );
-
-    // Old Add-Ins are hard limited to USHORT values.
-#if MAXCOLCOUNT_DEFINE > USHRT_MAX
-#error Add check for columns > USHRT_MAX!
-#endif
-    if (nRow1 > USHRT_MAX || nRow2 > USHRT_MAX)
-        return FALSE;
-
-    USHORT nCount = 0;
-    USHORT* p = (USHORT*) pCellArr;
-    *p++ = static_cast<USHORT>(nCol1);
-    *p++ = static_cast<USHORT>(nRow1);
-    *p++ = static_cast<USHORT>(nTab1);
-    *p++ = static_cast<USHORT>(nCol2);
-    *p++ = static_cast<USHORT>(nRow2);
-    *p++ = static_cast<USHORT>(nTab2);
-    USHORT* pCount = p;
-    *p++ = 0;
-    USHORT nPos = 14;
-    SCTAB nTab = nTab1;
-    ScAddress aAdr;
-    while (nTab <= nTab2)
-    {
-        aAdr.SetTab( nTab );
-        SCROW nRow = nRow1;
-        while (nRow <= nRow2)
-        {
-            aAdr.SetRow( nRow );
-            SCCOL nCol = nCol1;
-            while (nCol <= nCol2)
-            {
-                aAdr.SetCol( nCol );
-                ScBaseCell* pCell = pDok->GetCell( aAdr );
-                if (pCell)
-                {
-                    USHORT  nErr = 0;
-                    double  nVal = 0.0;
-                    BOOL    bOk = TRUE;
-                    switch ( pCell->GetCellType() )
-                    {
-                        case CELLTYPE_VALUE :
-                            nVal = GetValueCellValue( aAdr, (ScValueCell*)pCell );
-                            break;
-                        case CELLTYPE_FORMULA :
-                            if (((ScFormulaCell*)pCell)->IsValue())
-                            {
-                                nErr = ((ScFormulaCell*)pCell)->GetErrCode();
-                                nVal = ((ScFormulaCell*)pCell)->GetValue();
-                            }
-                            else
-                                bOk = FALSE;
-                            break;
-                        default :
-                            bOk = FALSE;
-                            break;
-                    }
-                    if (bOk)
-                    {
-                        if ((nPos + (4 * sizeof(USHORT)) + sizeof(double)) > MAXARRSIZE)
-                            return FALSE;
-                        *p++ = static_cast<USHORT>(nCol);
-                        *p++ = static_cast<USHORT>(nRow);
-                        *p++ = static_cast<USHORT>(nTab);
-                        *p++ = nErr;
-                        memcpy( p, &nVal, sizeof(double));
-                        nPos += 8 + sizeof(double);
-                        p = (USHORT*) ( pCellArr + nPos );
-                        nCount++;
-                    }
-                }
-                nCol++;
-            }
-            nRow++;
-        }
-        nTab++;
-    }
-    *pCount = nCount;
-    return TRUE;
-}
-
-
-BOOL ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
-                                    SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
-                                    BYTE* pCellArr)
-{
-    RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CreateStringArr" );
-
-    // Old Add-Ins are hard limited to USHORT values.
-#if MAXCOLCOUNT_DEFINE > USHRT_MAX
-#error Add check for columns > USHRT_MAX!
-#endif
-    if (nRow1 > USHRT_MAX || nRow2 > USHRT_MAX)
-        return FALSE;
-
-    USHORT nCount = 0;
-    USHORT* p = (USHORT*) pCellArr;
-    *p++ = static_cast<USHORT>(nCol1);
-    *p++ = static_cast<USHORT>(nRow1);
-    *p++ = static_cast<USHORT>(nTab1);
-    *p++ = static_cast<USHORT>(nCol2);
-    *p++ = static_cast<USHORT>(nRow2);
-    *p++ = static_cast<USHORT>(nTab2);
-    USHORT* pCount = p;
-    *p++ = 0;
-    USHORT nPos = 14;
-    SCTAB nTab = nTab1;
-    while (nTab <= nTab2)
-    {
-        SCROW nRow = nRow1;
-        while (nRow <= nRow2)
-        {
-            SCCOL nCol = nCol1;
-            while (nCol <= nCol2)
-            {
-                ScBaseCell* pCell;
-                pDok->GetCell(nCol, nRow, nTab, pCell);
-                if (pCell)
-                {
-                    String  aStr;
-                    USHORT  nErr = 0;
-                    BOOL    bOk = TRUE;
-                    switch ( pCell->GetCellType() )
-                    {
-                        case CELLTYPE_STRING :
-                            ((ScStringCell*)pCell)->GetString(aStr);
-                            break;
-                        case CELLTYPE_EDIT :
-                            ((ScEditCell*)pCell)->GetString(aStr);
-                            break;
-                        case CELLTYPE_FORMULA :
-                            if (!((ScFormulaCell*)pCell)->IsValue())
-                            {
-                                nErr = ((ScFormulaCell*)pCell)->GetErrCode();
-                                ((ScFormulaCell*)pCell)->GetString(aStr);
-                            }
-                            else
-                                bOk = FALSE;
-                            break;
-                        default :
-                            bOk = FALSE;
-                            break;
-                    }
-                    if (bOk)
-                    {
-                        ByteString aTmp( aStr, osl_getThreadTextEncoding() );
-                        // In case the xub_StrLen will be longer than USHORT
-                        // one day, and room for pad byte check.
-                        if ( aTmp.Len() > ((USHORT)(~0)) - 2 )
-                            return FALSE;
-                        // Append a 0-pad-byte if string length is not even
-                        //! MUST be USHORT and not xub_StrLen
-                        USHORT nStrLen = (USHORT) aTmp.Len();
-                        USHORT nLen = ( nStrLen + 2 ) & ~1;
-
-                        if (((ULONG)nPos + (5 * sizeof(USHORT)) + nLen) > MAXARRSIZE)
-                            return FALSE;
-                        *p++ = static_cast<USHORT>(nCol);
-                        *p++ = static_cast<USHORT>(nRow);
-                        *p++ = static_cast<USHORT>(nTab);
-                        *p++ = nErr;
-                        *p++ = nLen;
-                        memcpy( p, aTmp.GetBuffer(), nStrLen + 1);
-                        nPos += 10 + nStrLen + 1;
-                        BYTE* q = ( pCellArr + nPos );
-                        if( !nStrLen & 1 )
-                            *q++ = 0, nPos++;
-                        p = (USHORT*) ( pCellArr + nPos );
-                        nCount++;
-                    }
-                }
-                nCol++;
-            }
-            nRow++;
-        }
-        nTab++;
-    }
-    *pCount = nCount;
-    return TRUE;
-}
-
-
-BOOL ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
-                                  SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
-                                  BYTE* pCellArr)
-{
-    RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CreateCellArr" );
-
-    // Old Add-Ins are hard limited to USHORT values.
-#if MAXCOLCOUNT_DEFINE > USHRT_MAX
-#error Add check for columns > USHRT_MAX!
-#endif
-    if (nRow1 > USHRT_MAX || nRow2 > USHRT_MAX)
-        return FALSE;
-
-    USHORT nCount = 0;
-    USHORT* p = (USHORT*) pCellArr;
-    *p++ = static_cast<USHORT>(nCol1);
-    *p++ = static_cast<USHORT>(nRow1);
-    *p++ = static_cast<USHORT>(nTab1);
-    *p++ = static_cast<USHORT>(nCol2);
-    *p++ = static_cast<USHORT>(nRow2);
-    *p++ = static_cast<USHORT>(nTab2);
-    USHORT* pCount = p;
-    *p++ = 0;
-    USHORT nPos = 14;
-    SCTAB nTab = nTab1;
-    ScAddress aAdr;
-    while (nTab <= nTab2)
-    {
-        aAdr.SetTab( nTab );
-        SCROW nRow = nRow1;
-        while (nRow <= nRow2)
-        {
-            aAdr.SetRow( nRow );
-            SCCOL nCol = nCol1;
-            while (nCol <= nCol2)
-            {
-                aAdr.SetCol( nCol );
-                ScBaseCell* pCell = pDok->GetCell( aAdr );
-                if (pCell)
-                {
-                    USHORT  nErr = 0;
-                    USHORT  nType = 0; // 0 = Zahl; 1 = String
-                    double  nVal = 0.0;
-                    String  aStr;
-                    BOOL    bOk = TRUE;
-                    switch ( pCell->GetCellType() )
-                    {
-                        case CELLTYPE_STRING :
-                            ((ScStringCell*)pCell)->GetString(aStr);
-                            nType = 1;
-                            break;
-                        case CELLTYPE_EDIT :
-                            ((ScEditCell*)pCell)->GetString(aStr);
-                            nType = 1;
-                            break;
-                        case CELLTYPE_VALUE :
-                            nVal = GetValueCellValue( aAdr, (ScValueCell*)pCell );
-                            break;
-                        case CELLTYPE_FORMULA :
-                            nErr = ((ScFormulaCell*)pCell)->GetErrCode();
-                            if (((ScFormulaCell*)pCell)->IsValue())
-                                nVal = ((ScFormulaCell*)pCell)->GetValue();
-                            else
-                                ((ScFormulaCell*)pCell)->GetString(aStr);
-                            break;
-                        default :
-                            bOk = FALSE;
-                            break;
-                    }
-                    if (bOk)
-                    {
-                        if ((nPos + (5 * sizeof(USHORT))) > MAXARRSIZE)
-                            return FALSE;
-                        *p++ = static_cast<USHORT>(nCol);
-                        *p++ = static_cast<USHORT>(nRow);
-                        *p++ = static_cast<USHORT>(nTab);
-                        *p++ = nErr;
-                        *p++ = nType;
-                        nPos += 10;
-                        if (nType == 0)
-                        {
-                            if ((nPos + sizeof(double)) > MAXARRSIZE)
-                                return FALSE;
-                            memcpy( p, &nVal, sizeof(double));
-                            nPos += sizeof(double);
-                        }
-                        else
-                        {
-                            ByteString aTmp( aStr, osl_getThreadTextEncoding() );
-                            // In case the xub_StrLen will be longer than USHORT
-                            // one day, and room for pad byte check.
-                            if ( aTmp.Len() > ((USHORT)(~0)) - 2 )
-                                return FALSE;
-                            // Append a 0-pad-byte if string length is not even
-                            //! MUST be USHORT and not xub_StrLen
-                            USHORT nStrLen = (USHORT) aTmp.Len();
-                            USHORT nLen = ( nStrLen + 2 ) & ~1;
-                            if ( ((ULONG)nPos + 2 + nLen) > MAXARRSIZE)
-                                return FALSE;
-                            *p++ = nLen;
-                            memcpy( p, aTmp.GetBuffer(), nStrLen + 1);
-                            nPos += 2 + nStrLen + 1;
-                            BYTE* q = ( pCellArr + nPos );
-                            if( !nStrLen & 1 )
-                                *q++ = 0, nPos++;
-                        }
-                        nCount++;
-                        p = (USHORT*) ( pCellArr + nPos );
-                    }
-                }
-                nCol++;
-            }
-            nRow++;
-        }
-        nTab++;
-    }
-    *pCount = nCount;
-    return TRUE;
-}
-
-
 //-----------------------------------------------------------------------------
 // Stack operations
 //-----------------------------------------------------------------------------
@@ -2430,202 +2122,11 @@ void ScInterpreter::ScDBGet()
 void ScInterpreter::ScExternal()
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScExternal" );
-    USHORT nIndex;
     BYTE nParamCount = GetByte();
     String aUnoName;
     String aFuncName( ScGlobal::pCharClass->upper( pCur->GetExternal() ) );
-    if (ScGlobal::GetFuncCollection()->SearchFunc(aFuncName, nIndex))
-    {
-        FuncData* pFuncData = (FuncData*)ScGlobal::GetFuncCollection()->At(nIndex);
-        if (nParamCount <= MAXFUNCPARAM && nParamCount == pFuncData->GetParamCount() - 1)
-        {
-            ParamType   eParamType[MAXFUNCPARAM];
-            void*       ppParam[MAXFUNCPARAM];
-            double      nVal[MAXFUNCPARAM];
-            sal_Char*   pStr[MAXFUNCPARAM];
-            BYTE*       pCellArr[MAXFUNCPARAM];
-            short       i;
-
-            for (i = 0; i < MAXFUNCPARAM; i++)
-            {
-                eParamType[i] = pFuncData->GetParamType(i);
-                ppParam[i] = NULL;
-                nVal[i] = 0.0;
-                pStr[i] = NULL;
-                pCellArr[i] = NULL;
-            }
-
-            for (i = nParamCount; (i > 0) && (nGlobalError == 0); i--)
-            {
-                switch (eParamType[i])
-                {
-                    case PTR_DOUBLE :
-                        {
-                            nVal[i-1] = GetDouble();
-                            ppParam[i] = &nVal[i-1];
-                        }
-                        break;
-                    case PTR_STRING :
-                        {
-                            ByteString aStr( GetString(), osl_getThreadTextEncoding() );
-                            if ( aStr.Len() >= ADDIN_MAXSTRLEN )
-                                SetError( errStringOverflow );
-                            else
-                            {
-                                pStr[i-1] = new sal_Char[ADDIN_MAXSTRLEN];
-                                strncpy( pStr[i-1], aStr.GetBuffer(), ADDIN_MAXSTRLEN );
-                                pStr[i-1][ADDIN_MAXSTRLEN-1] = 0;
-                                ppParam[i] = pStr[i-1];
-                            }
-                        }
-                        break;
-                    case PTR_DOUBLE_ARR :
-                        {
-                            SCCOL nCol1;
-                            SCROW nRow1;
-                            SCTAB nTab1;
-                            SCCOL nCol2;
-                            SCROW nRow2;
-                            SCTAB nTab2;
-                            PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
-                            pCellArr[i-1] = new BYTE[MAXARRSIZE];
-                            if (!CreateDoubleArr(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2, 
pCellArr[i-1]))
-                                SetError(errCodeOverflow);
-                            else
-                                ppParam[i] = pCellArr[i-1];
-                        }
-                        break;
-                    case PTR_STRING_ARR :
-                        {
-                            SCCOL nCol1;
-                            SCROW nRow1;
-                            SCTAB nTab1;
-                            SCCOL nCol2;
-                            SCROW nRow2;
-                            SCTAB nTab2;
-                            PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
-                            pCellArr[i-1] = new BYTE[MAXARRSIZE];
-                            if (!CreateStringArr(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2, 
pCellArr[i-1]))
-                                SetError(errCodeOverflow);
-                            else
-                                ppParam[i] = pCellArr[i-1];
-                        }
-                        break;
-                    case PTR_CELL_ARR :
-                        {
-                            SCCOL nCol1;
-                            SCROW nRow1;
-                            SCTAB nTab1;
-                            SCCOL nCol2;
-                            SCROW nRow2;
-                            SCTAB nTab2;
-                            PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
-                            pCellArr[i-1] = new BYTE[MAXARRSIZE];
-                            if (!CreateCellArr(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2, 
pCellArr[i-1]))
-                                SetError(errCodeOverflow);
-                            else
-                                ppParam[i] = pCellArr[i-1];
-                        }
-                        break;
-                    default :
-                        SetError(errIllegalParameter);
-                        break;
-                }
-            }
-            while ( i-- )
-                Pop();      // im Fehlerfall (sonst ist i==0) Parameter wegpoppen
 
-            if (nGlobalError == 0)
-            {
-                if ( pFuncData->GetAsyncType() == NONE )
-                {
-                    switch ( eParamType[0] )
-                    {
-                        case PTR_DOUBLE :
-                        {
-                            double nErg = 0.0;
-                            ppParam[0] = &nErg;
-                            pFuncData->Call(ppParam);
-                            PushDouble(nErg);
-                        }
-                        break;
-                        case PTR_STRING :
-                        {
-                            sal_Char* pcErg = new sal_Char[ADDIN_MAXSTRLEN];
-                            ppParam[0] = pcErg;
-                            pFuncData->Call(ppParam);
-                            String aUni( pcErg, osl_getThreadTextEncoding() );
-                            PushString( aUni );
-                            delete[] pcErg;
-                        }
-                        break;
-                        default:
-                            PushError( errUnknownState );
-                    }
-                }
-                else
-                {
-                    // nach dem Laden Asyncs wieder anwerfen
-                    if ( pMyFormulaCell->GetCode()->IsRecalcModeNormal() )
-                        pMyFormulaCell->GetCode()->SetRecalcModeOnLoad();
-                    // garantiert identischer Handle bei identischem Aufruf?!?
-                    // sonst schei*e ...
-                    double nErg = 0.0;
-                    ppParam[0] = &nErg;
-                    pFuncData->Call(ppParam);
-                    ULONG nHandle = ULONG( nErg );
-                    if ( nHandle >= 65536 )
-                    {
-                        ScAddInAsync* pAs = ScAddInAsync::Get( nHandle );
-                        if ( !pAs )
-                        {
-                            pAs = new ScAddInAsync( nHandle, nIndex, pDok );
-                            pMyFormulaCell->StartListening( *pAs );
-                        }
-                        else
-                        {
-                            // falls per cut/copy/paste
-                            pMyFormulaCell->StartListening( *pAs );
-                            // in anderes Dokument?
-                            if ( !pAs->HasDocument( pDok ) )
-                                pAs->AddDocument( pDok );
-                        }
-                        if ( pAs->IsValid() )
-                        {
-                            switch ( pAs->GetType() )
-                            {
-                                case PTR_DOUBLE :
-                                    PushDouble( pAs->GetValue() );
-                                    break;
-                                case PTR_STRING :
-                                    PushString( pAs->GetString() );
-                                    break;
-                                default:
-                                    PushError( errUnknownState );
-                            }
-                        }
-                        else
-                            PushNA();
-                    }
-                    else
-                        PushNoValue();
-                }
-            }
-
-            for (i = 0; i < MAXFUNCPARAM; i++)
-            {
-                delete[] pStr[i];
-                delete[] pCellArr[i];
-            }
-        }
-        else
-        {
-            while( nParamCount-- > 0)
-                Pop();
-            PushIllegalParameter();
-        }
-    }
-    else if ( ( aUnoName = ScGlobal::GetAddInCollection()->FindFunction(aFuncName, FALSE) ).Len()  
)
+    if ( ( aUnoName = ScGlobal::GetAddInCollection()->FindFunction(aFuncName, FALSE) ).Len()  )
     {
         //  bLocalFirst=FALSE in FindFunction, cFunc should be the stored internal name
 
diff --git a/sc/source/core/tool/makefile.mk b/sc/source/core/tool/makefile.mk
index 15ec283..ced3ed0 100644
--- a/sc/source/core/tool/makefile.mk
+++ b/sc/source/core/tool/makefile.mk
@@ -61,10 +61,8 @@ EXCEPTIONSFILES= \
         $(SLO)$/addincol.obj \
         $(SLO)$/addinlis.obj \
         $(SLO)$/address.obj \
-        $(SLO)$/adiasync.obj \
         $(SLO)$/appoptio.obj \
         $(SLO)$/autoform.obj \
-        $(SLO)$/callform.obj \
         $(SLO)$/cellform.obj \
         $(SLO)$/cellkeytranslator.obj \
         $(SLO)$/chartarr.obj \
diff --git a/sc/source/core/tool/parclass.cxx b/sc/source/core/tool/parclass.cxx
index b882da1..125d3e5 100644
--- a/sc/source/core/tool/parclass.cxx
+++ b/sc/source/core/tool/parclass.cxx
@@ -33,7 +33,6 @@
 #include "parclass.hxx"
 #include "token.hxx"
 #include "global.hxx"
-#include "callform.hxx"
 #include "addincol.hxx"
 #include "funcdesc.hxx"
 #include <unotools/charclass.hxx>
@@ -326,30 +325,10 @@ ScParameterClassification::GetExternalParameterType( const 
formula::FormulaToken
 {
     Type eRet = Unknown;
     // similar to ScInterpreter::ScExternal()
-    USHORT nIndex;
     String aUnoName;
     String aFuncName( ScGlobal::pCharClass->upper( pToken->GetExternal()));
-    if ( ScGlobal::GetFuncCollection()->SearchFunc( aFuncName, nIndex) )
-    {
-        FuncData* pFuncData = (FuncData*)ScGlobal::GetFuncCollection()->At(
-                nIndex);
-        if ( nParameter >= pFuncData->GetParamCount() )
-            eRet = Bounds;
-        else
-        {
-            switch ( pFuncData->GetParamType( nParameter) )
-            {
-                case PTR_DOUBLE:
-                case PTR_STRING:
-                    eRet = Value;
-                break;
-                default:
-                    eRet = Reference;
-                    // also array types are created using an area reference
-            }
-        }
-    }
-    else if ( (aUnoName = ScGlobal::GetAddInCollection()->FindFunction(
+
+    if ( (aUnoName = ScGlobal::GetAddInCollection()->FindFunction(
                     aFuncName, FALSE)).Len() )
     {
         // the relevant parts of ScUnoAddInCall without having to create one
diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx
index 9c5ac45..d88385c 100644
--- a/sc/source/ui/unoobj/funcuno.cxx
+++ b/sc/source/ui/unoobj/funcuno.cxx
@@ -43,7 +43,6 @@
 #include "document.hxx"
 #include "compiler.hxx"
 #include "formula/errorcodes.hxx"
-#include "callform.hxx"
 #include "addincol.hxx"
 #include "rangeseq.hxx"
 #include "cell.hxx"
@@ -370,16 +369,7 @@ BOOL lcl_AddFunctionToken( ScTokenArray& rArray, const rtl::OUString& 
rName,cons
         return TRUE;
     }
 
-    // 2. old add in functions
-
-    USHORT nIndex;
-    if ( ScGlobal::GetFuncCollection()->SearchFunc( aUpper, nIndex ) )
-    {
-        rArray.AddExternal( aUpper.GetBuffer() );
-        return TRUE;
-    }
-
-    // 3. new (uno) add in functions
+    // 2. new (uno) add in functions
 
     String aIntName(ScGlobal::GetAddInCollection()->FindFunction( aUpper, FALSE ));
     if (aIntName.Len())
-- 
1.7.1

From 863bd77fa2247ca8435c536142b83f3c5e787695 Mon Sep 17 00:00:00 2001
From: Alfonso Eusebio <alfonso_eusebio@yahoo.co.uk>
Date: Tue, 15 Feb 2011 22:22:14 +0000
Subject: [PATCH] Remove legacy calc Addin mechanism from filters

Removes legacy addin mechanism (calc/addin) from filters.
---
 binfilter/bf_sc/source/core/data/makefile.mk     |    4 +-
 binfilter/bf_sc/source/core/data/sc_documen2.cxx |    1 -
 binfilter/bf_sc/source/core/data/sc_global.cxx   |   15 -
 binfilter/bf_sc/source/core/data/sc_globalx.cxx  |  138 -------
 binfilter/bf_sc/source/core/inc/addinlis.hxx     |   12 +-
 binfilter/bf_sc/source/core/inc/adiasync.hxx     |   95 -----
 binfilter/bf_sc/source/core/inc/interpre.hxx     |    7 +-
 binfilter/bf_sc/source/core/tool/makefile.mk     |    2 -
 binfilter/bf_sc/source/core/tool/sc_addinlis.cxx |    2 +
 binfilter/bf_sc/source/core/tool/sc_adiasync.cxx |  148 -------
 binfilter/bf_sc/source/core/tool/sc_callform.cxx |  285 -------------
 binfilter/bf_sc/source/core/tool/sc_compiler.cxx |   20 +-
 binfilter/bf_sc/source/core/tool/sc_interpr4.cxx |  463 +---------------------
 binfilter/bf_sc/source/ui/unoobj/sc_funcuno.cxx  |   12 +-
 binfilter/inc/bf_sc/global.hxx                   |    7 +-
 15 files changed, 18 insertions(+), 1193 deletions(-)
 delete mode 100644 binfilter/bf_sc/source/core/data/sc_globalx.cxx
 delete mode 100644 binfilter/bf_sc/source/core/inc/adiasync.hxx
 delete mode 100644 binfilter/bf_sc/source/core/tool/sc_adiasync.cxx
 delete mode 100644 binfilter/bf_sc/source/core/tool/sc_callform.cxx

diff --git a/binfilter/bf_sc/source/core/data/makefile.mk 
b/binfilter/bf_sc/source/core/data/makefile.mk
index 3ec4133..4baa0c0 100644
--- a/binfilter/bf_sc/source/core/data/makefile.mk
+++ b/binfilter/bf_sc/source/core/data/makefile.mk
@@ -71,7 +71,6 @@ SLOFILES =  \
     $(SLO)$/sc_attrib.obj \
     $(SLO)$/sc_global.obj \
     $(SLO)$/sc_global2.obj \
-    $(SLO)$/sc_globalx.obj \
     $(SLO)$/sc_markarr.obj \
     $(SLO)$/sc_markdata.obj \
     $(SLO)$/sc_dociter.obj \
@@ -100,8 +99,7 @@ EXCEPTIONSFILES= \
     $(SLO)$/sc_dpoutput.obj \
     $(SLO)$/sc_dpsave.obj      \
     $(SLO)$/sc_dbdocutl.obj \
-    $(SLO)$/sc_dptabsrc.obj \
-    $(SLO)$/sc_globalx.obj
+    $(SLO)$/sc_dptabsrc.obj
 
 # --- Tagets -------------------------------------------------------
 
diff --git a/binfilter/bf_sc/source/core/data/sc_documen2.cxx 
b/binfilter/bf_sc/source/core/data/sc_documen2.cxx
index 8019db3..38f95fe 100644
--- a/binfilter/bf_sc/source/core/data/sc_documen2.cxx
+++ b/binfilter/bf_sc/source/core/data/sc_documen2.cxx
@@ -385,7 +385,6 @@ namespace binfilter {
 /*N*/                  pLinkManager->Remove( 0, pLinkManager->GetLinks().Count() );
 /*N*/  }
 /*N*/ 
-/*N*/  ScAddInAsync::RemoveDocument( this );
 /*N*/  ScAddInListener::RemoveDocument( this );
 /*N*/  delete pChartListenerCollection;        // vor pBASM wg. evtl. Listener!
 /*N*/  pChartListenerCollection = NULL;
diff --git a/binfilter/bf_sc/source/core/data/sc_global.cxx 
b/binfilter/bf_sc/source/core/data/sc_global.cxx
index ab3e165..7567f8d 100644
--- a/binfilter/bf_sc/source/core/data/sc_global.cxx
+++ b/binfilter/bf_sc/source/core/data/sc_global.cxx
@@ -52,7 +52,6 @@
 #include "autoform.hxx"
 #include "patattr.hxx"
 #include "addincol.hxx"
-#include "adiasync.hxx"
 #include "userlist.hxx"
 #include "interpre.hxx"
 #include "strload.hxx"
@@ -72,7 +71,6 @@ namespace binfilter {
 
 ScDocShellRef* ScGlobal::pDrawClipDocShellRef = NULL;
 ScAutoFormat*  ScGlobal::pAutoFormat = NULL;
-FuncCollection* ScGlobal::pFuncCollection = NULL;
 ScUnoAddInCollection* ScGlobal::pAddInCollection = NULL;
 ScUserList*            ScGlobal::pUserList = NULL;
 String**               ScGlobal::ppRscString = NULL;
@@ -307,13 +305,6 @@ void global_InitAppOptions();
 /*N*/  return pAutoFormat;
 /*N*/ }
 
-/*N*/ FuncCollection* ScGlobal::GetFuncCollection()
-/*N*/ {
-/*N*/  if (!pFuncCollection)
-/*N*/          pFuncCollection = new FuncCollection();
-/*N*/  return pFuncCollection;
-/*N*/ }
-
 /*N*/ ScUnoAddInCollection* ScGlobal::GetAddInCollection()
 /*N*/ {
 /*N*/  if (!pAddInCollection)
@@ -432,8 +423,6 @@ void global_InitAppOptions();
 /*N*/  ScCompiler::Init();
 /*N*/  srand( (unsigned) time( NULL ) );               // Random Seed Init fuer Interpreter
 /*N*/ 
-/*N*/  InitAddIns();
-/*N*/ 
 /*N*/  pStrClipDocName = new String( ScResId( SCSTR_NONAME ) );
 /*N*/  *pStrClipDocName += '1';
 /*N*/ 
@@ -496,11 +485,7 @@ void global_InitAppOptions();
 
 /*N*/ void ScGlobal::Clear()
 /*N*/ {
-/*N*/  // asyncs _vor_ ExitExternalFunc zerstoeren!
-/*N*/  theAddInAsyncTbl.DeleteAndDestroy( 0, theAddInAsyncTbl.Count() );
-/*N*/  ExitExternalFunc();
 /*N*/  DELETEZ(pAutoFormat);
-/*N*/  DELETEZ(pFuncCollection);
 /*N*/  DELETEZ(pAddInCollection);
 /*N*/  DELETEZ(pUserList);
 /*N*/ 
diff --git a/binfilter/bf_sc/source/core/data/sc_globalx.cxx 
b/binfilter/bf_sc/source/core/data/sc_globalx.cxx
deleted file mode 100644
index 713673a..0000000
--- a/binfilter/bf_sc/source/core/data/sc_globalx.cxx
+++ /dev/null
@@ -1,138 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-
-#include "callform.hxx"
-#include "global.hxx"
-
-#include <tools/urlobj.hxx>
-#include <ucbhelper/contentbroker.hxx>
-#include <ucbhelper/content.hxx>
-#include <unotools/localfilehelper.hxx>
-
-#include <tools/debug.hxx>
-#include <bf_svtools/pathoptions.hxx>
-
-#include <com/sun/star/sdbc/XResultSet.hpp>
-#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/ucb/XCommandEnvironment.hpp>
-#include <com/sun/star/ucb/XContentAccess.hpp>
-
-#ifdef _MSC_VER
-#pragma hdrstop
-#endif
-
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::ucb;
-namespace binfilter {
-
-
-// static
-/*N*/ void ScGlobal::InitAddIns()
-/*N*/ {
-/*N*/  // multi paths separated by semicolons
-/*N*/  SvtPathOptions aPathOpt;
-/*N*/  String aMultiPath = aPathOpt.GetAddinPath();
-/*N*/  if ( aMultiPath.Len() > 0 )
-/*N*/  {
-/*N*/          xub_StrLen nTokens = aMultiPath.GetTokenCount( ';' );
-/*N*/          xub_StrLen nIndex = 0;
-/*N*/          for ( xub_StrLen j=0; j<nTokens; j++ )
-/*N*/          {
-/*N*/                  String aPath( aMultiPath.GetToken( 0, ';', nIndex ) );
-/*N*/                  if ( aPath.Len() > 0 )
-/*N*/                  {
-/*N*/                          //      use LocalFileHelper to convert the path to a URL that 
always points
-/*N*/                          //      to the file on the server
-/*N*/                          String aUrl;
-/*N*/                          if ( ::utl::LocalFileHelper::ConvertPhysicalNameToURL( aPath, aUrl 
) )
-/*N*/                                  aPath = aUrl;
-/*N*/ 
-/*N*/                          INetURLObject aObj;
-/*N*/                          aObj.SetSmartURL( aPath );
-/*N*/                          aObj.setFinalSlash();
-/*N*/                          try
-/*N*/                          {
-/*N*/                                  ::ucbhelper::Content aCnt( 
aObj.GetMainURL(INetURLObject::NO_DECODE),
-/*N*/                                          Reference< XCommandEnvironment > () );
-/*N*/                                  Reference< sdbc::XResultSet > xResultSet;
-/*N*/                                  Sequence< ::rtl::OUString > aProps;
-/*N*/                                  try
-/*N*/                                  {
-/*N*/                                          xResultSet = aCnt.createCursor(
-/*N*/                                                  aProps, ::ucbhelper::INCLUDE_DOCUMENTS_ONLY 
);
-/*N*/                                  }
-/*N*/                                  catch ( Exception& )
-/*N*/                                  {
-/*N*/                                          // ucb may throw different exceptions on failure now
-/*N*/                                          // no assertion if AddIn directory doesn't exist
-/*N*/                                  }
-/*N*/ 
-/*N*/                                  if ( xResultSet.is() )
-/*N*/                                  {
-/*N*/                                          Reference< sdbc::XRow > xRow( xResultSet, UNO_QUERY 
);
-/*N*/                                          Reference< XContentAccess >
-/*N*/                                                  xContentAccess( xResultSet, UNO_QUERY );
-/*N*/                                          try
-/*N*/                                          {
-/*N*/                                                  if ( xResultSet->first() )
-/*N*/                                                  {
-/*N*/                                                          do
-/*?*/                                                          {
-/*?*/                                                                  ::rtl::OUString aId( 
xContentAccess->queryContentIdentifierString() );
-/*?*/          DBG_BF_ASSERT(0, "STRIP");
-/*?*/                                                          }
-/*?*/                                                          while ( xResultSet->next() );
-/*?*/                                                  }
-/*N*/                                          }
-/*N*/                                          catch ( Exception& )
-/*N*/                                          {
-/*N*/                                          DBG_ERRORFILE( "ResultSetException catched!" );
-/*N*/                                          }
-/*N*/                                  }
-/*N*/                          }
-/*N*/                          catch ( Exception& )
-/*N*/                          {
-/*N*/                                  DBG_ERRORFILE( "Exception catched!" );
-/*N*/                          }
-/*N*/                          catch ( ... )
-/*N*/                          {
-/*N*/ 
-/*N*/                                  DBG_ERRORFILE( "unexpected exception caught!" );
-/*N*/                          }
-/*N*/                  }
-/*N*/          }
-/*N*/  }
-/*N*/ }
-
-
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sc/source/core/inc/addinlis.hxx 
b/binfilter/bf_sc/source/core/inc/addinlis.hxx
index 0ff0734..9424fb8 100644
--- a/binfilter/bf_sc/source/core/inc/addinlis.hxx
+++ b/binfilter/bf_sc/source/core/inc/addinlis.hxx
@@ -29,21 +29,19 @@
 #ifndef SC_ADDINLIS_HXX
 #define SC_ADDINLIS_HXX
 
-#include "adiasync.hxx"                        // for ScAddInDocs PtrArr
+#include <svl/broadcast.hxx>
+#include <svl/svarray.hxx>
 
 #include <com/sun/star/sheet/XResultListener.hpp>
-
 #include <com/sun/star/sheet/XVolatileResult.hpp>
-
 #include <com/sun/star/lang/XServiceInfo.hpp>
-
 #include <cppuhelper/implbase2.hxx>
-namespace binfilter {
-
 
+namespace binfilter {
 
 class ScDocument;
-
+typedef ScDocument* ScAddInDocPtr;
+SV_DECL_PTRARR_SORT( ScAddInDocs, ScAddInDocPtr, 1, 1 )
 
 class ScAddInListener : public cppu::WeakImplHelper2<
                             ::com::sun::star::sheet::XResultListener,
diff --git a/binfilter/bf_sc/source/core/inc/adiasync.hxx 
b/binfilter/bf_sc/source/core/inc/adiasync.hxx
deleted file mode 100644
index fd41964..0000000
--- a/binfilter/bf_sc/source/core/inc/adiasync.hxx
+++ /dev/null
@@ -1,95 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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 _SC_ADIASYNC_HXX
-#define _SC_ADIASYNC_HXX
-
-#include <bf_svtools/brdcst.hxx>
-
-#include "callform.hxx"
-class String;
-namespace binfilter {
-
-extern "C" {
-void CALLTYPE ScAddInAsyncCallBack( double& nHandle, void* pData );
-}
-
-
-class ScAddInAsync;
-typedef ScAddInAsync* ScAddInAsyncPtr;
-SV_DECL_PTRARR_SORT( ScAddInAsyncs, ScAddInAsyncPtr, 4, 4 )
-extern ScAddInAsyncs theAddInAsyncTbl; // in adiasync.cxx
-
-class ScDocument;
-typedef ScDocument* ScAddInDocPtr;
-SV_DECL_PTRARR_SORT( ScAddInDocs, ScAddInDocPtr, 1, 1 )
-
-
-class ScAddInAsync : public SfxBroadcaster
-{
-private:
-    union
-    {
-        double         nVal;                           // aktueller Wert
-        String*                pStr;
-    };
-    ScAddInDocs*       pDocs;                          // Liste der benutzenden Dokumente
-    FuncData*          pFuncData;                      // Zeiger auf die Daten in der Collection
-    ULONG                      nHandle;                        // wird von double auf ULONG 
gecasted
-    ParamType          eType;                          // PTR_DOUBLE oder PTR_STRING Ergebnis
-    BOOL                       bValid;                         // ob Wert gueltig
-
-public:
-                    // cTor nur wenn ScAddInAsync::Get fehlschlaegt!
-                    // nIndex: Index aus der FunctionCollection
-                    ScAddInAsync( ULONG nHandle, USHORT nIndex,
-                                    ScDocument* pDoc );
-                    // default-cTor nur fuer das eine globale aSeekObj !!!
-                    ScAddInAsync();
-    virtual                    ~ScAddInAsync();
-    static ScAddInAsync*       Get( ULONG nHandle );
-    static void                RemoveDocument( ScDocument* pDocument );
-    BOOL                       IsValid() const                 { return bValid; }
-    ParamType          GetType() const                 { return eType; }
-    double                     GetValue() const                { return nVal; }
-    const String&      GetString() const               { return *pStr; }
-    BOOL                       HasDocument( ScDocument* pDoc ) const
-                        { return pDocs->Seek_Entry( pDoc ); }
-    void                       AddDocument( ScDocument* pDoc ) { pDocs->Insert( pDoc ); }
-
-    // Vergleichsoperatoren fuer PtrArrSort
-    BOOL operator < ( const ScAddInAsync& r ) { return nHandle <  r.nHandle; }
-    BOOL operator ==( const ScAddInAsync& r ) { return nHandle == r.nHandle; }
-};
-
-
-
-} //namespace binfilter
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sc/source/core/inc/interpre.hxx 
b/binfilter/bf_sc/source/core/inc/interpre.hxx
index 6ad17be..bf724bc 100644
--- a/binfilter/bf_sc/source/core/inc/interpre.hxx
+++ b/binfilter/bf_sc/source/core/inc/interpre.hxx
@@ -213,12 +213,7 @@ inline BOOL HasCellValueData( const ScBaseCell* pCell )
     { return pCell ? pCell->HasValueData() : FALSE; }
 inline BOOL HasCellStringData( const ScBaseCell* pCell )
     { return pCell ? pCell->HasStringData() : FALSE; }
-BOOL CreateDoubleArr(USHORT nCol1, USHORT nRow1, USHORT nTab1,
-                     USHORT nCol2, USHORT nRow2, USHORT nTab2, BYTE* pCellArr);
-BOOL CreateStringArr(USHORT nCol1, USHORT nRow1, USHORT nTab1,
-                     USHORT nCol2, USHORT nRow2, USHORT nTab2, BYTE* pCellArr);
-BOOL CreateCellArr(USHORT nCol1, USHORT nRow1, USHORT nTab1,
-                   USHORT nCol2, USHORT nRow2, USHORT nTab2, BYTE* pCellArr);
+
 //-----------------------------------------------------------------------------
 // Stackoperationen
 //-----------------------------------------------------------------------------
diff --git a/binfilter/bf_sc/source/core/tool/makefile.mk 
b/binfilter/bf_sc/source/core/tool/makefile.mk
index f7955e0..7e1780d 100644
--- a/binfilter/bf_sc/source/core/tool/makefile.mk
+++ b/binfilter/bf_sc/source/core/tool/makefile.mk
@@ -41,10 +41,8 @@ INC+= -I$(PRJ)$/inc$/bf_sc
 # --- Files --------------------------------------------------------
 
 SLOFILES =  \
-        $(SLO)$/sc_adiasync.obj \
         $(SLO)$/sc_appoptio.obj \
         $(SLO)$/sc_autoform.obj \
-        $(SLO)$/sc_callform.obj \
         $(SLO)$/sc_cellform.obj \
         $(SLO)$/sc_chartarr.obj \
         $(SLO)$/sc_chartlis.obj \
diff --git a/binfilter/bf_sc/source/core/tool/sc_addinlis.cxx 
b/binfilter/bf_sc/source/core/tool/sc_addinlis.cxx
index b972743..45fdcd0 100644
--- a/binfilter/bf_sc/source/core/tool/sc_addinlis.cxx
+++ b/binfilter/bf_sc/source/core/tool/sc_addinlis.cxx
@@ -40,6 +40,8 @@
 #include "bf_sc.hrc"
 namespace binfilter {
 
+SV_IMPL_PTRARR_SORT( ScAddInDocs, ScAddInDocPtr );
+
 using namespace ::com::sun::star;
 
 //------------------------------------------------------------------------
diff --git a/binfilter/bf_sc/source/core/tool/sc_adiasync.cxx 
b/binfilter/bf_sc/source/core/tool/sc_adiasync.cxx
deleted file mode 100644
index ff3223a..0000000
--- a/binfilter/bf_sc/source/core/tool/sc_adiasync.cxx
+++ /dev/null
@@ -1,148 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-#ifdef _MSC_VER
-#pragma hdrstop
-#endif
-
-//------------------------------------------------------------------------
-
-#include <bf_sfx2/objsh.hxx>
-
-#include "adiasync.hxx"
-#include "document.hxx"
-#include "bf_sc.hrc"           // FID_DATACHANGED
-
-#include <osl/thread.h>
-namespace binfilter {
-
-
-//------------------------------------------------------------------------
-
-#ifdef _MSC_VER
-#pragma code_seg("SCSTATICS")
-#endif
-
-ScAddInAsyncs theAddInAsyncTbl;
-static ScAddInAsync aSeekObj;
-
-#ifdef _MSC_VER
-#pragma code_seg()
-#endif
-
-
-/*N*/ SV_IMPL_OP_PTRARR_SORT( ScAddInAsyncs, ScAddInAsyncPtr );
-
-/*N*/ SV_IMPL_PTRARR_SORT( ScAddInDocs, ScAddInDocPtr );
-
-
-
-
-/*N*/ ScAddInAsync::ScAddInAsync() :
-/*N*/  SfxBroadcaster(),
-/*N*/  nHandle( 0 )
-/*N*/ {        // nur fuer aSeekObj !
-/*N*/ }
-
-
-
-/*N*/ ScAddInAsync::ScAddInAsync( ULONG nHandleP, USHORT nIndex, ScDocument* pDoc ) :
-/*N*/  SfxBroadcaster(),
-/*N*/  pStr( NULL ),
-/*N*/  nHandle( nHandleP ),
-/*N*/  bValid( FALSE )
-/*N*/ {
-/*N*/  pDocs = new ScAddInDocs( 1, 1 );
-/*N*/  pDocs->Insert( pDoc );
-/*N*/  pFuncData = (FuncData*)ScGlobal::GetFuncCollection()->At(nIndex);
-/*N*/  eType = pFuncData->GetAsyncType();
-/*N*/  theAddInAsyncTbl.Insert( this );
-/*N*/ }
-
-
-
-/*N*/ ScAddInAsync::~ScAddInAsync()
-/*N*/ {
-/*N*/  // aSeekObj hat das alles nicht, Handle 0 gibt es sonst nicht
-/*N*/  if ( nHandle )
-/*N*/  {
-/*?*/          // im dTor wg. theAddInAsyncTbl.DeleteAndDestroy in ScGlobal::Clear
-/*?*/          DBG_BF_ASSERT(0, "STRIP");
-/*N*/  }
-/*N*/ }
-
-
-
-/*N*/ ScAddInAsync* ScAddInAsync::Get( ULONG nHandleP )
-/*N*/ {
-/*N*/  USHORT nPos;
-/*N*/  ScAddInAsync* pRet = 0;
-/*N*/  aSeekObj.nHandle = nHandleP;
-/*N*/  if ( theAddInAsyncTbl.Seek_Entry( &aSeekObj, &nPos ) )
-/*N*/          pRet = theAddInAsyncTbl[ nPos ];
-/*N*/  aSeekObj.nHandle = 0;
-/*N*/  return pRet;
-/*N*/ }
-
-
-
-
-
-
-/*N*/ void ScAddInAsync::RemoveDocument( ScDocument* pDocumentP )
-/*N*/ {
-/*N*/  USHORT nPos = theAddInAsyncTbl.Count();
-/*N*/  if ( nPos )
-/*N*/  {
-/*?*/          const ScAddInAsync** ppAsync =
-/*?*/                  (const ScAddInAsync**) theAddInAsyncTbl.GetData() + nPos - 1;
-/*?*/          for ( ; nPos-- >0; ppAsync-- )
-/*?*/          {       // rueckwaerts wg. Pointer-Aufrueckerei im Array
-/*?*/                  ScAddInDocs* p = ((ScAddInAsync*)*ppAsync)->pDocs;
-/*?*/                  USHORT nFoundPos;
-/*?*/                  if ( p->Seek_Entry( pDocumentP, &nFoundPos ) )
-/*?*/                  {
-/*?*/                          p->Remove( nFoundPos );
-/*?*/                          if ( p->Count() == 0 )
-/*?*/                          {       // dieses AddIn wird nicht mehr benutzt
-/*?*/                                  ScAddInAsync* pAsync = (ScAddInAsync*)*ppAsync;
-/*?*/                                  theAddInAsyncTbl.Remove( nPos );
-/*?*/                                  delete pAsync;
-/*?*/                                  ppAsync = (const ScAddInAsync**) theAddInAsyncTbl.GetData()
-/*?*/                                          + nPos;
-/*?*/                          }
-/*?*/                  }
-/*?*/          }
-/*N*/  }
-/*N*/ }
-
-
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sc/source/core/tool/sc_callform.cxx 
b/binfilter/bf_sc/source/core/tool/sc_callform.cxx
deleted file mode 100644
index d65cb26..0000000
--- a/binfilter/bf_sc/source/core/tool/sc_callform.cxx
+++ /dev/null
@@ -1,285 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-#ifdef _MSC_VER
-#pragma hdrstop
-#endif
-
-
-#include <osl/module.hxx>
-
-#include "adiasync.hxx"
-#include <tools/debug.hxx>
-namespace binfilter {
-
-
-
-extern "C" {
-
-typedef void (CALLTYPE* ExFuncPtr1)(void*);
-typedef void (CALLTYPE* ExFuncPtr2)(void*, void*);
-typedef void (CALLTYPE* ExFuncPtr3)(void*, void*, void*);
-typedef void (CALLTYPE* ExFuncPtr4)(void*, void*, void*, void*);
-typedef void (CALLTYPE* ExFuncPtr5)(void*, void*, void*, void*, void*);
-typedef void (CALLTYPE* ExFuncPtr6)(void*, void*, void*, void*, void*, void*);
-typedef void (CALLTYPE* ExFuncPtr7)(void*, void*, void*, void*, void*, void*, void*);
-typedef void (CALLTYPE* ExFuncPtr8)(void*, void*, void*, void*, void*, void*, void*, void*);
-typedef void (CALLTYPE* ExFuncPtr9)(void*, void*, void*, void*, void*, void*, void*, void*, void*);
-typedef void (CALLTYPE* ExFuncPtr10)(void*, void*, void*, void*, void*, void*, void*, void*, 
void*, void*);
-typedef void (CALLTYPE* ExFuncPtr11)(void*, void*, void*, void*, void*, void*, void*, void*, 
void*, void*, void*);
-typedef void (CALLTYPE* ExFuncPtr12)(void*, void*, void*, void*, void*, void*, void*, void*, 
void*, void*, void*, void*);
-typedef void (CALLTYPE* ExFuncPtr13)(void*, void*, void*, void*, void*, void*, void*, void*, 
void*, void*, void*, void*, void*);
-typedef void (CALLTYPE* ExFuncPtr14)(void*, void*, void*, void*, void*, void*, void*, void*, 
void*, void*, void*, void*, void*, void*);
-typedef void (CALLTYPE* ExFuncPtr15)(void*, void*, void*, void*, void*, void*, void*, void*, 
void*, void*, void*, void*, void*, void*, void*);
-typedef void (CALLTYPE* ExFuncPtr16)(void*, void*, void*, void*, void*, void*, void*, void*, 
void*, void*, void*, void*, void*, void*, void*, void*);
-
-typedef void (CALLTYPE* GetFuncCountPtr)(USHORT& nCount);
-typedef void (CALLTYPE* GetFuncDataPtr)
-    (USHORT& nNo, sal_Char* pFuncName, USHORT& nParamCount, ParamType* peType, sal_Char* 
pInternalName);
-
-typedef void (CALLTYPE* SetLanguagePtr)( USHORT& nLanguage );
-typedef void (CALLTYPE* GetParamDesc)
-    (USHORT& nNo, USHORT& nParam, sal_Char* pName, sal_Char* pDesc );
-
-typedef void (CALLTYPE* IsAsync) ( USHORT&             nNo,
-                                   ParamType*  peType );
-typedef void (CALLTYPE* Advice)  ( USHORT&             nNo,
-                                   AdvData&            pfCallback );
-typedef void (CALLTYPE* Unadvice)( double&             nHandle );
-
-typedef void (CALLTYPE* FARPROC) ( void );
-
-}
-
-#if defined(OS2) && defined(BLC)
-#define GETFUNCTIONCOUNT               "_GetFunctionCount"
-#define GETFUNCTIONDATA                        "_GetFunctionData"
-#define SETLANGUAGE                            "_SetLanguage"
-#define GETPARAMDESC                   "_GetParameterDescription"
-#define ISASYNC                                        "_IsAsync"
-#define ADVICE                                 "_Advice"
-#define UNADVICE                               "_Unadvice"
-#else // Pascal oder extern "C"
-#define GETFUNCTIONCOUNT               "GetFunctionCount"
-#define GETFUNCTIONDATA                        "GetFunctionData"
-#define SETLANGUAGE                            "SetLanguage"
-#define GETPARAMDESC                   "GetParameterDescription"
-#define ISASYNC                                        "IsAsync"
-#define ADVICE                                 "Advice"
-#define UNADVICE                               "Unadvice"
-#endif
-
-#define LIBFUNCNAME( name ) \
-    (String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( name ) ))
-
-
-/*N*/ FuncData::FuncData(const String& rIName) :
-/*N*/  pModuleData             (NULL),
-/*N*/  aInternalName   (rIName),
-/*N*/  nNumber                 (0),
-/*N*/  nParamCount             (0),
-/*N*/  eAsyncType              (NONE)
-/*N*/ {
-/*N*/  for (USHORT i = 0; i < MAXFUNCPARAM; i++)
-/*N*/          eParamType[i] = PTR_DOUBLE;
-/*N*/ }
-
-//------------------------------------------------------------------------
-
-
-
-/*N*/ FuncData::FuncData(const FuncData& rData) :
-/*N*/  pModuleData             (rData.pModuleData),
-/*N*/  aInternalName   (rData.aInternalName),
-/*N*/  aFuncName               (rData.aFuncName),
-/*N*/  nNumber                 (rData.nNumber),
-/*N*/  nParamCount             (rData.nParamCount),
-/*N*/  eAsyncType              (rData.eAsyncType)
-/*N*/ {
-/*N*/  for (USHORT i = 0; i < MAXFUNCPARAM; i++)
-/*N*/          eParamType[i] = rData.eParamType[i];
-/*N*/ }
-
-
-/*N*/ short FuncCollection::Compare(DataObject*, DataObject*) const
-/*N*/ {
-            DBG_BF_ASSERT(0, "STRIP"); return 0;
-/*N*/ }
-
-/*N*/ BOOL FuncCollection::SearchFunc( const String& rName, USHORT& rIndex ) const
-/*N*/ {
-/*N*/  FuncData aDataObj(rName);
-/*N*/  return Search( &aDataObj, rIndex );
-/*N*/ }
-
-class ModuleData : public DataObject
-{
-    friend class ModuleCollection;
-    String      aName;
-    osl::Module* pInstance;
-public:
-    ModuleData(const String& rStr, osl::Module* pInst) : aName (rStr), pInstance (pInst) {}
-    ModuleData(const ModuleData& rData) : aName (rData.aName) {pInstance = new osl::Module(aName);}
-    ~ModuleData() { delete pInstance; }
-    virtual DataObject* Clone() const { return new ModuleData(*this); }
-
-    const   String&         GetName() const { return aName; }
-    osl::Module*            GetInstance() const { return pInstance; }
-    void            FreeInstance() { delete pInstance; pInstance = 0; }
-};
-
-/*N*/ class ModuleCollection : public SortedCollection
-/*N*/ {
-/*N*/ public:
-/*N*/  ModuleCollection(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE) : SortedCollection ( 
nLim, nDel, bDup ) {}
-/*N*/  ModuleCollection(const ModuleCollection& rModuleCollection) : SortedCollection ( 
rModuleCollection ) {}
-/*N*/ 
-/*N*/  virtual DataObject*             Clone() const { return new ModuleCollection(*this); }
-/*N*/                  ModuleData*             operator[]( const USHORT nIndex) const {return 
(ModuleData*)At(nIndex);}
-    virtual short Compare(DataObject*, DataObject*) const{DBG_BF_ASSERT(0, "STRIP"); return 0;}
-/*N*/ };
-
-/*N*/ #ifdef _MSC_VER
-/*N*/ #pragma code_seg("SCSTATICS")
-/*N*/ #endif
-/*N*/ 
-/*N*/ static ModuleCollection aModuleCollection;
-/*N*/ 
-/*N*/ #ifdef _MSC_VER
-/*N*/ #pragma code_seg()
-/*N*/ #endif
-
-
-/*N*/ void ExitExternalFunc()
-/*N*/ {
-/*N*/  USHORT nCount = aModuleCollection.GetCount();
-/*N*/  for (USHORT i=0; i<nCount; i++)
-/*N*/  {
-/*?*/          ModuleData* pData = aModuleCollection[i];
-/*?*/          pData->FreeInstance();
-/*N*/  }
-/*N*/ }
-
-
-/*N*/ BOOL FuncData::Call(void** ppParam)
-/*N*/ {
-/*N*/  BOOL bRet = FALSE;
-        osl::Module* pLib = pModuleData->GetInstance();
-/*N*/  FARPROC fProc = (FARPROC)pLib->getSymbol(aFuncName);
-/*N*/  if (fProc != NULL)
-/*N*/  {
-/*N*/          switch (nParamCount)
-/*N*/          {
-/*N*/                  case 1 :
-/*N*/                          (*((ExFuncPtr1)fProc))(ppParam[0]);
-/*N*/                          bRet = TRUE;
-/*N*/                          break;
-/*N*/                  case 2 :
-/*N*/                          (*((ExFuncPtr2)fProc))(ppParam[0], ppParam[1]);
-/*N*/                          bRet = TRUE;
-/*N*/                          break;
-/*N*/                  case 3 :
-/*N*/                          (*((ExFuncPtr3)fProc))(ppParam[0], ppParam[1], ppParam[2]);
-/*N*/                          bRet = TRUE;
-/*N*/                          break;
-/*N*/                  case 4 :
-/*N*/                          (*((ExFuncPtr4)fProc))(ppParam[0], ppParam[1], ppParam[2], 
ppParam[3]);
-/*N*/                          bRet = TRUE;
-/*N*/                          break;
-/*N*/                  case 5 :
-/*N*/                          (*((ExFuncPtr5)fProc))(ppParam[0], ppParam[1], ppParam[2], 
ppParam[3], ppParam[4]);
-/*N*/                          bRet = TRUE;
-/*N*/                          break;
-/*N*/                  case 6 :
-/*N*/                          (*((ExFuncPtr6)fProc))(ppParam[0], ppParam[1], ppParam[2], 
ppParam[3], ppParam[4], ppParam[5]);
-/*N*/                          bRet = TRUE;
-/*N*/                          break;
-/*N*/                  case 7 :
-/*N*/                          (*((ExFuncPtr7)fProc))( ppParam[0], ppParam[1], ppParam[2], 
ppParam[3], ppParam[4], ppParam[5],
-/*N*/                                                                          ppParam[6]);
-/*N*/                          bRet = TRUE;
-/*N*/                          break;
-/*N*/                  case 8 :
-/*N*/                          (*((ExFuncPtr8)fProc))( ppParam[0], ppParam[1], ppParam[2], 
ppParam[3], ppParam[4], ppParam[5],
-/*N*/                                                                          ppParam[6], 
ppParam[7]);
-/*N*/                          bRet = TRUE;
-/*N*/                          break;
-/*N*/                  case 9 :
-/*N*/                          (*((ExFuncPtr9)fProc))( ppParam[0], ppParam[1], ppParam[2], 
ppParam[3], ppParam[4], ppParam[5],
-/*N*/                                                                          ppParam[6], 
ppParam[7], ppParam[8]);
-/*N*/                          bRet = TRUE;
-/*N*/                          break;
-/*N*/                  case 10 :
-/*N*/                          (*((ExFuncPtr10)fProc))( ppParam[0], ppParam[1], ppParam[2], 
ppParam[3], ppParam[4], ppParam[5],
-/*N*/                                                                          ppParam[6], 
ppParam[7], ppParam[8], ppParam[9]);
-/*N*/                          bRet = TRUE;
-/*N*/                          break;
-/*N*/                  case 11 :
-/*N*/                          (*((ExFuncPtr11)fProc))( ppParam[0], ppParam[1], ppParam[2], 
ppParam[3], ppParam[4], ppParam[5],
-/*N*/                                                                          ppParam[6], 
ppParam[7], ppParam[8], ppParam[9], ppParam[10]);
-/*N*/                          bRet = TRUE;
-/*N*/                          break;
-/*N*/                  case 12:
-/*N*/                          (*((ExFuncPtr12)fProc))( ppParam[0], ppParam[1], ppParam[2], 
ppParam[3], ppParam[4], ppParam[5],
-/*N*/                                                                          ppParam[6], 
ppParam[7], ppParam[8], ppParam[9], ppParam[10], ppParam[11]);
-/*N*/                          bRet = TRUE;
-/*N*/                          break;
-/*N*/                  case 13:
-/*N*/                          (*((ExFuncPtr13)fProc))( ppParam[0], ppParam[1], ppParam[2], 
ppParam[3], ppParam[4], ppParam[5],
-/*N*/                                                                          ppParam[6], 
ppParam[7], ppParam[8], ppParam[9], ppParam[10], ppParam[11],
-/*N*/                                                                          ppParam[12]);
-/*N*/                          bRet = TRUE;
-/*N*/                          break;
-/*N*/                  case 14 :
-/*N*/                          (*((ExFuncPtr14)fProc))( ppParam[0], ppParam[1], ppParam[2], 
ppParam[3], ppParam[4], ppParam[5],
-/*N*/                                                                          ppParam[6], 
ppParam[7], ppParam[8], ppParam[9], ppParam[10], ppParam[11],
-/*N*/                                                                          ppParam[12], 
ppParam[13]);
-/*N*/                          bRet = TRUE;
-/*N*/                          break;
-/*N*/                  case 15 :
-/*N*/                          (*((ExFuncPtr15)fProc))( ppParam[0], ppParam[1], ppParam[2], 
ppParam[3], ppParam[4], ppParam[5],
-/*N*/                                                                          ppParam[6], 
ppParam[7], ppParam[8], ppParam[9], ppParam[10], ppParam[11],
-/*N*/                                                                          ppParam[12], 
ppParam[13], ppParam[14]);
-/*N*/                          bRet = TRUE;
-/*N*/                          break;
-/*N*/                  case 16 :
-/*N*/                          (*((ExFuncPtr16)fProc))( ppParam[0], ppParam[1], ppParam[2], 
ppParam[3], ppParam[4], ppParam[5],
-/*N*/                                                                          ppParam[6], 
ppParam[7], ppParam[8], ppParam[9], ppParam[10], ppParam[11],
-/*N*/                                                                          ppParam[12], 
ppParam[13], ppParam[14], ppParam[15]);
-/*N*/                          bRet = TRUE;
-/*N*/                          break;
-/*N*/                  default : break;
-/*N*/          }
-/*N*/  }
-/*N*/  return bRet;
-/*N*/ }
-
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sc/source/core/tool/sc_compiler.cxx 
b/binfilter/bf_sc/source/core/tool/sc_compiler.cxx
index 005fc13..859162f 100644
--- a/binfilter/bf_sc/source/core/tool/sc_compiler.cxx
+++ b/binfilter/bf_sc/source/core/tool/sc_compiler.cxx
@@ -50,7 +50,6 @@
 #include "rangenam.hxx"
 #include "dbcolect.hxx"
 #include "document.hxx"
-#include "callform.hxx"
 #include "addincol.hxx"
 #include "refupdat.hxx"
 #include "scresid.hxx"
@@ -760,19 +759,9 @@ namespace binfilter {
 /*N*/         ScRawToken aToken;
 /*N*/         aToken.SetOpCode( iLook->second );
 /*N*/         pRawToken = aToken.Clone();
-/*N*/  }
-/*N*/  else
-/*N*/  {
-/*N*/          USHORT nIndex;
-/*N*/          bFound = ScGlobal::GetFuncCollection()->SearchFunc(cSymbol, nIndex);
-/*N*/          if( bFound )
-/*N*/          {
-/*?*/                  DBG_BF_ASSERT(0, "STRIP"); /*N*/  ScRawToken aToken;
-/*N*/  /*?*/                   aToken.SetExternal( cSymbol );
-/*N*/  /*?*/                   pRawToken = aToken.Clone();
-/*N*/          }
-/*N*/          else
-/*N*/          {
+/*N*/     }
+/*N*/    else
+/*N*/    {
 /*N*/                  // bLocalFirst=FALSE for english
 /*N*/                  String aIntName = ScGlobal::GetAddInCollection()->
 /*N*/                     FindFunction( rName, ( pSymbolTable != pSymbolTableEnglish ) );
@@ -783,8 +772,7 @@ namespace binfilter {
 /*N*/                                  pRawToken = aToken.Clone();
 /*N*/                                  bFound = TRUE;
 /*N*/                  }
-/*N*/          }
-/*N*/  }
+/*N*/    }
 /*N*/  if ( bFound && pRawToken->GetOpCode() == ocSub &&
 /*N*/          (eLastOp == ocOpen || eLastOp == ocSep ||
 /*N*/           (eLastOp > ocEndDiv && eLastOp < ocEndBinOp /*ocEndUnOp*/)))
diff --git a/binfilter/bf_sc/source/core/tool/sc_interpr4.cxx 
b/binfilter/bf_sc/source/core/tool/sc_interpr4.cxx
index 7e4a91b..2dd4a87 100644
--- a/binfilter/bf_sc/source/core/tool/sc_interpr4.cxx
+++ b/binfilter/bf_sc/source/core/tool/sc_interpr4.cxx
@@ -325,285 +325,6 @@ USHORT ScInterpreter::GetCellErrCode( const ScBaseCell* pCell )
     return 0;
 }
 
-
-BOOL ScInterpreter::CreateDoubleArr(USHORT nCol1, USHORT nRow1, USHORT nTab1,
-                            USHORT nCol2, USHORT nRow2, USHORT nTab2, BYTE* pCellArr)
-{
-    USHORT nCount = 0;
-    USHORT* p = (USHORT*) pCellArr;
-    *p++ = nCol1;
-    *p++ = nRow1;
-    *p++ = nTab1;
-    *p++ = nCol2;
-    *p++ = nRow2;
-    *p++ = nTab2;
-    USHORT* pCount = p;
-    *p++ = 0;
-    USHORT nPos = 14;
-    USHORT nTab = nTab1;
-    ScAddress aAdr;
-    while (nTab <= nTab2)
-    {
-        aAdr.SetTab( nTab );
-        USHORT nRow = nRow1;
-        while (nRow <= nRow2)
-        {
-            aAdr.SetRow( nRow );
-            USHORT nCol = nCol1;
-            while (nCol <= nCol2)
-            {
-                aAdr.SetCol( nCol );
-                ScBaseCell* pCell = pDok->GetCell( aAdr );
-                if (pCell)
-                {
-                    USHORT     nErr = 0;
-                    double     nVal = 0.0;
-                    BOOL       bOk = TRUE;
-                    switch ( pCell->GetCellType() )
-                    {
-                        case CELLTYPE_VALUE :
-                            nVal = GetValueCellValue( aAdr, (ScValueCell*)pCell );
-                            break;
-                        case CELLTYPE_FORMULA :
-                            if (((ScFormulaCell*)pCell)->IsValue())
-                            {
-                                nErr = ((ScFormulaCell*)pCell)->GetErrCode();
-                                nVal = ((ScFormulaCell*)pCell)->GetValue();
-                            }
-                            else
-                                bOk = FALSE;
-                            break;
-                        default :
-                            bOk = FALSE;
-                            break;
-                    }
-                    if (bOk)
-                    {
-                        if ((nPos + (4 * sizeof(USHORT)) + sizeof(double)) > MAXARRSIZE)
-                            return FALSE;
-                        *p++ = nCol;
-                        *p++ = nRow;
-                        *p++ = nTab;
-                        *p++ = nErr;
-                        memcpy( p, &nVal, sizeof(double));
-                        nPos += 8 + sizeof(double);
-                        p = (USHORT*) ( pCellArr + nPos );
-                        nCount++;
-                    }
-                }
-                nCol++;
-            }
-            nRow++;
-        }
-        nTab++;
-    }
-    *pCount = nCount;
-    return TRUE;
-}
-
-
-BOOL ScInterpreter::CreateStringArr(USHORT nCol1, USHORT nRow1, USHORT nTab1,
-                                    USHORT nCol2, USHORT nRow2, USHORT nTab2,
-                                    BYTE* pCellArr)
-{
-    USHORT nCount = 0;
-    USHORT* p = (USHORT*) pCellArr;
-    *p++ = nCol1;
-    *p++ = nRow1;
-    *p++ = nTab1;
-    *p++ = nCol2;
-    *p++ = nRow2;
-    *p++ = nTab2;
-    USHORT* pCount = p;
-    *p++ = 0;
-    USHORT nPos = 14;
-    USHORT nTab = nTab1;
-    while (nTab <= nTab2)
-    {
-        USHORT nRow = nRow1;
-        while (nRow <= nRow2)
-        {
-            USHORT nCol = nCol1;
-            while (nCol <= nCol2)
-            {
-                ScBaseCell* pCell;
-                pDok->GetCell(nCol, nRow, nTab, pCell);
-                if (pCell)
-                {
-                    String     aStr;
-                    USHORT     nErr = 0;
-                    BOOL       bOk = TRUE;
-                    switch ( pCell->GetCellType() )
-                    {
-                        case CELLTYPE_STRING :
-                            ((ScStringCell*)pCell)->GetString(aStr);
-                            break;
-                        case CELLTYPE_EDIT :
-                            ((ScEditCell*)pCell)->GetString(aStr);
-                            break;
-                        case CELLTYPE_FORMULA :
-                            if (!((ScFormulaCell*)pCell)->IsValue())
-                            {
-                                nErr = ((ScFormulaCell*)pCell)->GetErrCode();
-                                ((ScFormulaCell*)pCell)->GetString(aStr);
-                            }
-                            else
-                                bOk = FALSE;
-                            break;
-                        default :
-                            bOk = FALSE;
-                            break;
-                    }
-                    if (bOk)
-                    {
-                        ByteString aTmp( aStr, osl_getThreadTextEncoding() );
-                        // In case the xub_StrLen will be longer than USHORT
-                        // one day, and room for pad byte check.
-                        if ( aTmp.Len() > ((USHORT)(~0)) - 2 )
-                            return FALSE;
-                        // Append a 0-pad-byte if string length is not even
-                        //! MUST be USHORT and not xub_StrLen
-                        USHORT nStrLen = (USHORT) aTmp.Len();
-                        USHORT nLen = ( nStrLen + 2 ) & ~1;
-
-                        if (((ULONG)nPos + (5 * sizeof(USHORT)) + nLen) > MAXARRSIZE)
-                            return FALSE;
-                        *p++ = nCol;
-                        *p++ = nRow;
-                        *p++ = nTab;
-                        *p++ = nErr;
-                        *p++ = nLen;
-                        memcpy( p, aTmp.GetBuffer(), nStrLen + 1);
-                        nPos += 10 + nStrLen + 1;
-                        BYTE* q = ( pCellArr + nPos );
-                        if( !nStrLen & 1 )
-                            *q++ = 0, nPos++;
-                        p = (USHORT*) ( pCellArr + nPos );
-                        nCount++;
-                    }
-                }
-                nCol++;
-            }
-            nRow++;
-        }
-        nTab++;
-    }
-    *pCount = nCount;
-    return TRUE;
-}
-
-
-BOOL ScInterpreter::CreateCellArr(USHORT nCol1, USHORT nRow1, USHORT nTab1,
-                                  USHORT nCol2, USHORT nRow2, USHORT nTab2,
-                                  BYTE* pCellArr)
-{
-    USHORT nCount = 0;
-    USHORT* p = (USHORT*) pCellArr;
-    *p++ = nCol1;
-    *p++ = nRow1;
-    *p++ = nTab1;
-    *p++ = nCol2;
-    *p++ = nRow2;
-    *p++ = nTab2;
-    USHORT* pCount = p;
-    *p++ = 0;
-    USHORT nPos = 14;
-    USHORT nTab = nTab1;
-    ScAddress aAdr;
-    while (nTab <= nTab2)
-    {
-        aAdr.SetTab( nTab );
-        USHORT nRow = nRow1;
-        while (nRow <= nRow2)
-        {
-            aAdr.SetRow( nRow );
-            USHORT nCol = nCol1;
-            while (nCol <= nCol2)
-            {
-                aAdr.SetCol( nCol );
-                ScBaseCell* pCell = pDok->GetCell( aAdr );
-                if (pCell)
-                {
-                    USHORT     nErr = 0;
-                    USHORT     nType = 0; // 0 = Zahl; 1 = String
-                    double     nVal = 0.0;
-                    String     aStr;
-                    BOOL       bOk = TRUE;
-                    switch ( pCell->GetCellType() )
-                    {
-                        case CELLTYPE_STRING :
-                            ((ScStringCell*)pCell)->GetString(aStr);
-                            nType = 1;
-                            break;
-                        case CELLTYPE_EDIT :
-                            ((ScEditCell*)pCell)->GetString(aStr);
-                            nType = 1;
-                            break;
-                        case CELLTYPE_VALUE :
-                            nVal = GetValueCellValue( aAdr, (ScValueCell*)pCell );
-                            break;
-                        case CELLTYPE_FORMULA :
-                            nErr = ((ScFormulaCell*)pCell)->GetErrCode();
-                            if (((ScFormulaCell*)pCell)->IsValue())
-                                nVal = ((ScFormulaCell*)pCell)->GetValue();
-                            else
-                                ((ScFormulaCell*)pCell)->GetString(aStr);
-                            break;
-                        default :
-                            bOk = FALSE;
-                            break;
-                    }
-                    if (bOk)
-                    {
-                        if ((nPos + (5 * sizeof(USHORT))) > MAXARRSIZE)
-                            return FALSE;
-                        *p++ = nCol;
-                        *p++ = nRow;
-                        *p++ = nTab;
-                        *p++ = nErr;
-                        *p++ = nType;
-                        nPos += 10;
-                        if (nType == 0)
-                        {
-                            if ((nPos + sizeof(double)) > MAXARRSIZE)
-                                return FALSE;
-                            memcpy( p, &nVal, sizeof(double));
-                            nPos += sizeof(double);
-                        }
-                        else
-                        {
-                            ByteString aTmp( aStr, osl_getThreadTextEncoding() );
-                            // In case the xub_StrLen will be longer than USHORT
-                            // one day, and room for pad byte check.
-                            if ( aTmp.Len() > ((USHORT)(~0)) - 2 )
-                                return FALSE;
-                            // Append a 0-pad-byte if string length is not even
-                            //! MUST be USHORT and not xub_StrLen
-                            USHORT nStrLen = (USHORT) aTmp.Len();
-                            USHORT nLen = ( nStrLen + 2 ) & ~1;
-                            if ( ((ULONG)nPos + 2 + nLen) > MAXARRSIZE)
-                                return FALSE;
-                            *p++ = nLen;
-                            memcpy( p, aTmp.GetBuffer(), nStrLen + 1);
-                            nPos += 2 + nStrLen + 1;
-                            BYTE* q = ( pCellArr + nPos );
-                            if( !nStrLen & 1 )
-                                *q++ = 0, nPos++;
-                        }
-                        nCount++;
-                        p = (USHORT*) ( pCellArr + nPos );
-                    }
-                }
-                nCol++;
-            }
-            nRow++;
-        }
-        nTab++;
-    }
-    *pCount = nCount;
-    return TRUE;
-}
-
 //-----------------------------------------------------------------------------
 // Stackoperationen
 //-----------------------------------------------------------------------------
@@ -1430,188 +1151,8 @@ BOOL ScInterpreter::DoubleRefToPosSingleRef( const ScRange& rRange, 
ScAddress& r
 /*N*/  BYTE nParamCount = GetByte();
 /*N*/  String aUnoName;
 /*N*/  String aFuncName( ScGlobal::pCharClass->upper( pCur->GetExternal() ) );
-/*N*/  if (ScGlobal::GetFuncCollection()->SearchFunc(aFuncName, nIndex))
-/*N*/  {
-/*?*/          FuncData* pFuncData = (FuncData*)ScGlobal::GetFuncCollection()->At(nIndex);
-/*?*/          if (nParamCount == pFuncData->GetParamCount() - 1)
-/*?*/          {
-/*?*/                  ParamType       eParamType[MAXFUNCPARAM];
-/*?*/                  void*           ppParam[MAXFUNCPARAM];
-/*?*/                  double          nVal[MAXFUNCPARAM];
-/*?*/                  sal_Char*       pStr[MAXFUNCPARAM];
-/*?*/                  BYTE*           pCellArr[MAXFUNCPARAM];
-/*?*/                  short           i;
-/*?*/
-/*?*/                  for (i = 0; i < MAXFUNCPARAM; i++)
-/*?*/                  {
-/*?*/                          eParamType[i] = pFuncData->GetParamType(i);
-/*?*/                          ppParam[i] = NULL;
-/*?*/                          nVal[i] = 0.0;
-/*?*/                          pStr[i] = NULL;
-/*?*/                          pCellArr[i] = NULL;
-/*?*/                  }
-/*?*/
-/*?*/                  for (i = nParamCount; (i > 0) && (nGlobalError == 0); i--)
-/*?*/                  {
-/*?*/                          GetStackType();
-/*?*/                          switch (eParamType[i])
-/*?*/                          {
-/*?*/                                  case PTR_DOUBLE :
-/*?*/                                          {
-/*?*/                                                  nVal[i-1] = GetDouble();
-/*?*/                                                  ppParam[i] = &nVal[i-1];
-/*?*/                                          }
-/*?*/                                          break;
-/*?*/                                  case PTR_STRING :
-/*?*/                                          {
-/*?*/                                                  ByteString aStr( GetString(), 
osl_getThreadTextEncoding() );
-/*?*/                                                  if ( aStr.Len() >= MAXSTRLEN )
-/*?*/                                                          SetError( errStringOverflow );
-/*?*/                                                  else
-/*?*/                                                  {
-/*?*/                                                          pStr[i-1] = new sal_Char[MAXSTRLEN];
-/*?*/                                                          strncpy( pStr[i-1], 
aStr.GetBuffer(), MAXSTRLEN );
-/*?*/                                 pStr[i-1][MAXSTRLEN-1] = 0;
-/*?*/                                                          ppParam[i] = pStr[i-1];
-/*?*/                                                  }
-/*?*/                                          }
-/*?*/                                          break;
-/*?*/                                  case PTR_DOUBLE_ARR :
-/*?*/                                          {
-/*?*/                                                  USHORT nCol1, nRow1, nTab1, nCol2, nRow2, 
nTab2;
-/*?*/                                                  PopDoubleRef(nCol1, nRow1, nTab1, nCol2, 
nRow2, nTab2);
-/*?*/                                                  pCellArr[i-1] = new BYTE[MAXARRSIZE];
-/*?*/                                                  if (!CreateDoubleArr(nCol1, nRow1, nTab1, 
nCol2, nRow2, nTab2, pCellArr[i-1]))
-/*?*/                                                          SetError(errCodeOverflow);
-/*?*/                                                  else
-/*?*/                                                          ppParam[i] = pCellArr[i-1];
-/*?*/                                          }
-/*?*/                                          break;
-/*?*/                                  case PTR_STRING_ARR :
-/*?*/                                          {
-/*?*/                                                  USHORT nCol1, nRow1, nTab1, nCol2, nRow2, 
nTab2;
-/*?*/                                                  PopDoubleRef(nCol1, nRow1, nTab1, nCol2, 
nRow2, nTab2);
-/*?*/                                                  pCellArr[i-1] = new BYTE[MAXARRSIZE];
-/*?*/                                                  if (!CreateStringArr(nCol1, nRow1, nTab1, 
nCol2, nRow2, nTab2, pCellArr[i-1]))
-/*?*/                                                          SetError(errCodeOverflow);
-/*?*/                                                  else
-/*?*/                                                          ppParam[i] = pCellArr[i-1];
-/*?*/                                          }
-/*?*/                                          break;
-/*?*/                                  case PTR_CELL_ARR :
-/*?*/                                          {
-/*?*/                                                  USHORT nCol1, nRow1, nTab1, nCol2, nRow2, 
nTab2;
-/*?*/                                                  PopDoubleRef(nCol1, nRow1, nTab1, nCol2, 
nRow2, nTab2);
-/*?*/                                                  pCellArr[i-1] = new BYTE[MAXARRSIZE];
-/*?*/                                                  if (!CreateCellArr(nCol1, nRow1, nTab1, 
nCol2, nRow2, nTab2, pCellArr[i-1]))
-/*?*/                                                          SetError(errCodeOverflow);
-/*?*/                                                  else
-/*?*/                                                          ppParam[i] = pCellArr[i-1];
-/*?*/                                          }
-/*?*/                                          break;
-/*?*/                                  default :
-/*?*/                                          SetError(errIllegalParameter);
-/*?*/                                          break;
-/*?*/                          }
-/*?*/                  }
-/*?*/                  while ( i-- )
-/*?*/                          Pop();          // im Fehlerfall (sonst ist i==0) Parameter 
wegpoppen
-/*?*/
-/*?*/                  if (nGlobalError == 0)
-/*?*/                  {
-/*?*/                          if ( pFuncData->GetAsyncType() == NONE )
-/*?*/                          {
-/*?*/                                  switch ( eParamType[0] )
-/*?*/                                  {
-/*?*/                                          case PTR_DOUBLE :
-/*?*/                                          {
-/*?*/                                                  double nErg = 0.0;
-/*?*/                                                  ppParam[0] = &nErg;
-/*?*/                                                  pFuncData->Call(ppParam);
-/*?*/                                                  PushDouble(nErg);
-/*?*/                                          }
-/*?*/                                          break;
-/*?*/                                          case PTR_STRING :
-/*?*/                                          {
-/*?*/                                                  sal_Char* pcErg = new sal_Char[MAXSTRLEN];
-/*?*/                                                  ppParam[0] = pcErg;
-/*?*/                                                  pFuncData->Call(ppParam);
-/*?*/                                                  String aUni( pcErg, 
osl_getThreadTextEncoding() );
-/*?*/                                                  PushString( aUni );
-/*?*/                                                  delete[] pcErg;
-/*?*/                                          }
-/*?*/                                          break;
-/*?*/                                          default:
-/*?*/                                                  SetError( errUnknownState );
-/*?*/                                                  PushInt(0);
-/*?*/                                  }
-/*?*/                          }
-/*?*/                          else
-/*?*/                          {
-/*?*/                                  // nach dem Laden Asyncs wieder anwerfen
-/*?*/                                  if ( pMyFormulaCell->GetCode()->IsRecalcModeNormal() )
-/*?*/                                          pMyFormulaCell->GetCode()->SetRecalcModeOnLoad();
-/*?*/                                  // garantiert identischer Handle bei identischem Aufruf?!?
-/*?*/                                  // sonst schei*e ...
-/*?*/                                  double nErg = 0.0;
-/*?*/                                  ppParam[0] = &nErg;
-/*?*/                                  pFuncData->Call(ppParam);
-/*?*/                                  ULONG nHandle = ULONG( nErg );
-/*?*/                                  if ( nHandle >= 65536 )
-/*?*/                                  {
-/*?*/                                          ScAddInAsync* pAs = ScAddInAsync::Get( nHandle );
-/*?*/                                          if ( !pAs )
-/*?*/                                          {
-/*?*/                                                  pAs = new ScAddInAsync( nHandle, nIndex, 
pDok );
-/*?*/                                                  pMyFormulaCell->StartListening( *pAs, TRUE 
);
-/*?*/                                          }
-/*?*/                                          else
-/*?*/                                          {
-/*?*/                                                  // falls per cut/copy/paste
-/*?*/                                                  if ( !pMyFormulaCell->IsListening( *pAs ) )
-/*?*/                                                          pMyFormulaCell->StartListening( 
*pAs, TRUE );
-/*?*/                                                  // in anderes Dokument?
-/*?*/                                                  if ( !pAs->HasDocument( pDok ) )
-/*?*/                                                          pAs->AddDocument( pDok );
-/*?*/                                          }
-/*?*/                                          if ( pAs->IsValid() )
-/*?*/                                          {
-/*?*/                                                  switch ( pAs->GetType() )
-/*?*/                                                  {
-/*?*/                                                          case PTR_DOUBLE :
-/*?*/                                                                  PushDouble( pAs->GetValue() 
);
-/*?*/                                                                  break;
-/*?*/                                                          case PTR_STRING :
-/*?*/                                                                  PushString( 
pAs->GetString() );
-/*?*/                                                                  break;
-/*?*/                                                          default:
-/*?*/                                                                  SetError( errUnknownState );
-/*?*/                                                                  PushInt(0);
-/*?*/                                                  }
-/*?*/                                          }
-/*?*/                                          else
-/*?*/                                                  SetNV();
-/*?*/                                  }
-/*?*/                                  else
-/*?*/                                          SetNoValue();
-/*?*/                          }
-/*?*/                  }
-/*?*/
-/*?*/                  for (i = 0; i < MAXFUNCPARAM; i++)
-/*?*/                  {
-/*?*/                          delete[] pStr[i];
-/*?*/                          delete[] pCellArr[i];
-/*?*/                  }
-/*?*/          }
-/*?*/          else
-/*?*/          {
-/*?*/                  while( nParamCount-- )
-/*?*/                          Pop();
-/*?*/                  SetError(errIllegalParameter);
-/*?*/                  PushInt(0);
-/*?*/          }
-/*N*/  }
-/*N*/  else if ( ( aUnoName = ScGlobal::GetAddInCollection()->FindFunction(aFuncName, FALSE) 
).Len()  )
+
+/*N*/  if ( ( aUnoName = ScGlobal::GetAddInCollection()->FindFunction(aFuncName, FALSE) ).Len()  )
 /*N*/  {
 /*N*/          //      bLocalFirst=FALSE in FindFunction, cFunc should be the stored internal name
 /*N*/
diff --git a/binfilter/bf_sc/source/ui/unoobj/sc_funcuno.cxx 
b/binfilter/bf_sc/source/ui/unoobj/sc_funcuno.cxx
index 1ea510d..10b57cc 100644
--- a/binfilter/bf_sc/source/ui/unoobj/sc_funcuno.cxx
+++ b/binfilter/bf_sc/source/ui/unoobj/sc_funcuno.cxx
@@ -38,7 +38,6 @@
 #include <vcl/svapp.hxx>
 #include "scdll.hxx"
 #include "document.hxx"
-#include "callform.hxx"
 #include "addincol.hxx"
 #include "rangeseq.hxx"
 #include "cell.hxx"
@@ -325,16 +324,7 @@ BOOL lcl_AddFunctionToken( ScTokenArray& rArray, const ::rtl::OUString& rName )
         return TRUE;
     }
 
-    // 2. old add in functions
-
-    USHORT nIndex;
-    if ( ScGlobal::GetFuncCollection()->SearchFunc( aUpper, nIndex ) )
-    {
-        rArray.AddExternal( aUpper.GetBuffer() );
-        return TRUE;
-    }
-
-    // 3. new (uno) add in functions
+    // 2. new (uno) add in functions
 
     String aIntName = ScGlobal::GetAddInCollection()->FindFunction( aUpper, FALSE );
     if (aIntName.Len())
diff --git a/binfilter/inc/bf_sc/global.hxx b/binfilter/inc/bf_sc/global.hxx
index 1d7201b..5478e41 100644
--- a/binfilter/inc/bf_sc/global.hxx
+++ b/binfilter/inc/bf_sc/global.hxx
@@ -509,7 +509,6 @@ class ScUnitConverter;
 class ScGlobal
 {
     static ScAutoFormat*       pAutoFormat;
-    static FuncCollection*     pFuncCollection;
     static ScUnoAddInCollection* pAddInCollection;
     static ScUserList*         pUserList;
     static String**                    ppRscString;
@@ -550,7 +549,6 @@ public:
     static LanguageType                        eLnge;
     static sal_Unicode                 cListDelimiter;
     static ScAutoFormat*               GetAutoFormat();
-    static FuncCollection*             GetFuncCollection();
     static ScUnoAddInCollection* GetAddInCollection();
     static ScUserList*                 GetUserList();
     static void                                        SetUserList( const ScUserList* pNewList );
@@ -575,9 +573,8 @@ public:
     static long                                nLastRowHeightExtra;
     static long                                nLastColWidthExtra;
 
-    static void             Init();                                            // am Anfang
-    static void             InitAddIns();
-    static void                                Clear();                                        // 
bei Programmende
+    static void             Init();                                            // during start up
+    static void                                Clear();                                        // 
at the end of the program
 
     static void                                UpdatePPT(OutputDevice* pDev);
 
-- 
1.7.1


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.