[Libreoffice-commits] core.git: sc/workben

Andreas Brandner Andreas.Brandner at cib.de
Tue Sep 5 21:14:49 UTC 2017


 sc/workben/addin.cxx   |  547 -------------------------------------------------
 sc/workben/addin.hxx   |   92 --------
 sc/workben/makefile.mk |   86 -------
 sc/workben/map.idl     |   31 --
 sc/workben/result.cxx  |   98 --------
 sc/workben/result.hxx  |   56 -----
 sc/workben/testadd.idl |   60 -----
 7 files changed, 970 deletions(-)

New commits:
commit 571abca0461485380017095087ebe39bc8280b67
Author: Andreas Brandner <Andreas.Brandner at cib.de>
Date:   Tue Sep 5 16:55:48 2017 +0200

    Remove add-in demo/test-files in sc/workben
    
    Change-Id: Ie8a887e0a478bfe0fd3d31f895229e3aca553bee
    Reviewed-on: https://gerrit.libreoffice.org/41948
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/sc/workben/addin.cxx b/sc/workben/addin.cxx
deleted file mode 100644
index 0361ff0731cc..000000000000
--- a/sc/workben/addin.cxx
+++ /dev/null
@@ -1,547 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <usr/factoryhlp.hxx>
-#include <usr/macros.hxx>
-#include <usr/reflserv.hxx>
-#include <osl/mutex.hxx>
-#include <vcl/svapp.hxx>
-#include <tools/date.hxx>
-#include <svl/itemprop.hxx>
-#include <usr/proptypehlp.hxx>
-#include <cppuhelper/factory.hxx>
-#include <osl/diagnose.h>
-
-#include <com/sun/star/util/date.hpp>
-
-#include "addin.hxx"
-#include "result.hxx"
-
-using namespace com::sun::star;
-
-SMART_UNO_IMPLEMENTATION( ScTestAddIn, UsrObject );
-
-#define SCTESTADDIN_SERVICE     L"stardiv.one.sheet.DemoAddIn"
-
-extern "C" {
-
-sal_Bool SAL_CALL component_writeInfo(
-    void * pServiceManager, registry::XRegistryKey * pRegistryKey )
-{
-    if (pRegistryKey)
-    {
-        try
-        {
-            UString aImpl = L"/";
-            aImpl += ScTestAddIn::getImplementationName_Static();
-            aImpl += L"/UNO/SERVICES";
-
-            uno::Reference<registry::XRegistryKey> xNewKey(
-                reinterpret_cast<registry::XRegistryKey*>(pRegistryKey)->createKey(aImpl) );
-
-            uno::Sequence <OUString> aSequ = ScTestAddIn::getSupportedServiceNames_Static();
-            const OUString * pArray = aSequ.getConstArray();
-            for( INT32 i = 0; i < aSequ.getLength(); i++ )
-                xNewKey->createKey( pArray[i] );
-
-            return sal_True;
-        }
-        catch (registry::InvalidRegistryException&)
-        {
-            OSL_ENSHURE( false, "### InvalidRegistryException!" );
-        }
-    }
-    return false;
-}
-
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
-    const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
-{
-    void* pRet = 0;
-
-    if ( pServiceManager && UString(pImplName) == ScTestAddIn::getImplementationName_Static() )
-    {
-        uno::Reference<lang::XSingleServiceFactory> xFactory( cppu::createOneInstanceFactory(
-                reinterpret_cast<lang::XMultiServiceFactory*>(pServiceManager),
-                ScTestAddIn::getImplementationName_Static(),
-                ScTestAddIn_CreateInstance,
-                ScTestAddIn::getSupportedServiceNames_Static() ) );
-
-        if (xFactory.is())
-        {
-            xFactory->acquire();
-            pRet = xFactory.get();
-        }
-    }
-
-    return pRet;
-}
-
-}   // extern C
-
-ScTestAddIn::ScTestAddIn()
-{
-}
-
-ScTestAddIn::~ScTestAddIn()
-{
-}
-
-UString ScTestAddIn::getImplementationName_Static()
-{
-    return L"stardiv.StarCalc.ScTestAddIn";
-}
-
-css::uno::Sequence< OUString > ScTestAddIn::getSupportedServiceNames_Static()
-{
-    uno::Sequence< OUString > aRet(2);
-    OUString* pArray = aRet.getArray();
-    pArray[0] = L"com.sun.star.sheet.AddIn";
-    pArray[1] = SCTESTADDIN_SERVICE;
-    return aRet;
-}
-
-uno::Reference<uno::XInterface> ScTestAddIn_CreateInstance(
-        const uno::Reference<lang::XMultiServiceFactory>& )
-{
-    return (cppu::OWeakObject*)new ScTestAddIn();
-}
-
-// XAddIn
-
-UString ScTestAddIn::getProgrammaticFuntionName(const UString& aDisplayName)
-                                THROWS( (UsrSystemException) )
-{
-    //!...
-    return UString();
-}
-
-UString ScTestAddIn::getDisplayFunctionName(const UString& aProgrammaticName)
-                                THROWS( (UsrSystemException) )
-{
-    //  return translated strings
-
-    UString aRet;
-    if ( aProgrammaticName == L"countParams" )        aRet = L"ParamAnzahl";
-    else if ( aProgrammaticName == L"addOne" )        aRet = L"PlusEins";
-    else if ( aProgrammaticName == L"repeatStr" )     aRet = L"WiederholeString";
-    else if ( aProgrammaticName == L"getDateString" ) aRet = L"Datumsstring";
-    else if ( aProgrammaticName == L"getColorValue" ) aRet = L"Farbwert";
-    else if ( aProgrammaticName == L"transpose" )     aRet = L"Transponieren";
-    else if ( aProgrammaticName == L"transposeInt" )  aRet = L"IntegerTransponieren";
-    else if ( aProgrammaticName == L"repeatMultiple" )aRet = L"Mehrfach";
-    else if ( aProgrammaticName == L"getStrOrVal" )   aRet = L"StringOderWert";
-    else if ( aProgrammaticName == L"callAsync" )     aRet = L"Asynchron";
-    return aRet;
-}
-
-UString ScTestAddIn::getFunctionDescription(const UString& aProgrammaticName)
-                                THROWS( (UsrSystemException) )
-{
-    //  return translated strings
-
-    UString aRet;
-    if ( aProgrammaticName == L"countParams" )        aRet = L"Gibt die Anzahl der Parameter zurueck.";
-    else if ( aProgrammaticName == L"addOne" )        aRet = L"Addiert 1 zur uebergebenen Zahl.";
-    else if ( aProgrammaticName == L"repeatStr" )     aRet = L"Wiederholt eine Zeichenkette.";
-    else if ( aProgrammaticName == L"getDateString" ) aRet = L"Wandelt ein Datum in eine Zeichenkette.";
-    else if ( aProgrammaticName == L"getColorValue" ) aRet = L"Gibt den Farbwert eines Zellbereichs zurueck. Bei transparentem Hintergrund wird -1 zurueckgegeben";
-    else if ( aProgrammaticName == L"transpose" )     aRet = L"Transponiert eine Matrix.";
-    else if ( aProgrammaticName == L"transposeInt" )  aRet = L"Transponiert eine Matrix mit Ganzzahlen.";
-    else if ( aProgrammaticName == L"repeatMultiple" )aRet = L"Wiederholt mehrere Bestandteile.";
-    else if ( aProgrammaticName == L"getStrOrVal" )   aRet = L"Gibt einen String oder einen Wert zurueck.";
-    else if ( aProgrammaticName == L"callAsync" )     aRet = L"Test fuer asynchrone Funktion.";
-    return aRet;
-}
-
-UString ScTestAddIn::getDisplayArgumentName(const UString& aProgrammaticFunctionName,
-                                INT32 nArgument) THROWS( (UsrSystemException) )
-{
-    //  return translated strings
-
-    UString aRet;
-    if ( aProgrammaticFunctionName == L"countParams" )
-    {
-        if ( nArgument == 0 )       aRet = L"Parameter";
-    }
-    else if ( aProgrammaticFunctionName == L"addOne" )
-    {
-        if ( nArgument == 0 )       aRet = L"Wert";
-    }
-    else if ( aProgrammaticFunctionName == L"repeatStr" )
-    {
-        if ( nArgument == 0 )       aRet = L"String";
-        else if ( nArgument == 1 )  aRet = L"Anzahl";
-    }
-    else if ( aProgrammaticFunctionName == L"getDateString" )
-    {
-        if ( nArgument == 0 )       aRet = L"Dokument";
-        else if ( nArgument == 1 )  aRet = L"Wert";
-    }
-    else if ( aProgrammaticFunctionName == L"getColorValue" )
-    {
-        if ( nArgument == 0 )       aRet = L"Bereich";
-    }
-    else if ( aProgrammaticFunctionName == L"transpose" )
-    {
-        if ( nArgument == 0 )       aRet = L"Matrix";
-    }
-    else if ( aProgrammaticFunctionName == L"transposeInt" )
-    {
-        if ( nArgument == 0 )       aRet = L"Matrix";
-    }
-    else if ( aProgrammaticFunctionName == L"repeatMultiple" )
-    {
-        if ( nArgument == 0 )       aRet = L"Anzahl";
-        else if ( nArgument == 1 )  aRet = L"Trenner";
-        else if ( nArgument == 2 )  aRet = L"Inhalt";
-    }
-    else if ( aProgrammaticFunctionName == L"getStrOrVal" )
-    {
-        if ( nArgument == 0 )       aRet = L"Flag";
-    }
-    else if ( aProgrammaticFunctionName == L"callAsync" )
-    {
-        if ( nArgument == 0 )       aRet = L"Name";
-    }
-    return aRet;
-}
-
-UString ScTestAddIn::getArgumentDescription(const UString& aProgrammaticFunctionName,
-                                INT32 nArgument) THROWS( (UsrSystemException) )
-{
-    //  return translated strings
-
-    UString aRet;
-    if ( aProgrammaticFunctionName == L"countParams" )
-    {
-        if ( nArgument == 0 )       aRet = L"Beliebiger Parameter";
-    }
-    else if ( aProgrammaticFunctionName == L"addOne" )
-    {
-        if ( nArgument == 0 )       aRet = L"Der Wert, zu dem 1 addiert wird";
-    }
-    else if ( aProgrammaticFunctionName == L"repeatStr" )
-    {
-        if ( nArgument == 0 )       aRet = L"Der Text, der wiederholt wird";
-        else if ( nArgument == 1 )  aRet = L"Die Anzahl der Wiederholungen";
-    }
-    else if ( aProgrammaticFunctionName == L"getDateString" )
-    {
-        if ( nArgument == 0 )       aRet = L"(intern)";
-        else if ( nArgument == 1 )  aRet = L"Der Wert, der als Datum formatiert wird";
-    }
-    else if ( aProgrammaticFunctionName == L"getColorValue" )
-    {
-        if ( nArgument == 0 )       aRet = L"Der Bereich, dessen Hintergrundfarbe abgefragt wird";
-    }
-    else if ( aProgrammaticFunctionName == L"transpose" )
-    {
-        if ( nArgument == 0 )       aRet = L"Die Matrix, die transponiert werden soll";
-    }
-    else if ( aProgrammaticFunctionName == L"transposeInt" )
-    {
-        if ( nArgument == 0 )       aRet = L"Die Matrix, die transponiert werden soll";
-    }
-    else if ( aProgrammaticFunctionName == L"repeatMultiple" )
-    {
-        if ( nArgument == 0 )       aRet = L"Anzahl der Wiederholungen";
-        else if ( nArgument == 1 )  aRet = L"Text, der zwischen den Inhalten erscheint";
-        else if ( nArgument == 2 )  aRet = L"Mehrere Inhalte";
-    }
-    else if ( aProgrammaticFunctionName == L"getStrOrVal" )
-    {
-        if ( nArgument == 0 )       aRet = L"Wenn Flag 0 ist, wird ein Wert zurueckgegeben, sonst ein String.";
-    }
-    else if ( aProgrammaticFunctionName == L"callAsync" )
-    {
-        if ( nArgument == 0 )       aRet = L"Ein String";
-    }
-    return aRet;
-}
-
-UString ScTestAddIn::getProgrammaticCategoryName(const UString& aProgrammaticFunctionName)
-                                THROWS( (UsrSystemException) )
-{
-    //  return non-translated strings
-
-    UString aRet;
-    if ( aProgrammaticFunctionName == L"countParams" )        aRet = L"Information";
-    else if ( aProgrammaticFunctionName == L"addOne" )        aRet = L"Mathematical";
-    else if ( aProgrammaticFunctionName == L"repeatStr" )     aRet = L"Text";
-    else if ( aProgrammaticFunctionName == L"getDateString" ) aRet = L"Date&Time";
-    else if ( aProgrammaticFunctionName == L"getColorValue" ) aRet = L"Spreadsheet";
-    else if ( aProgrammaticFunctionName == L"transpose" )     aRet = L"Matrix";
-    else if ( aProgrammaticFunctionName == L"transposeInt" )  aRet = L"Matrix";
-    else if ( aProgrammaticFunctionName == L"repeatMultiple" )aRet = L"Text";
-    else if ( aProgrammaticFunctionName == L"getStrOrVal" )   aRet = L"Add-In";
-    else if ( aProgrammaticFunctionName == L"callAsync" )     aRet = L"Realtime";       // new group
-    return aRet;
-}
-
-UString ScTestAddIn::getDisplayCategoryName(const UString& aProgrammaticFunctionName)
-                                THROWS( (UsrSystemException) )
-{
-    //  return translated strings
-
-    return L"irgendwas";    // not used for predefined categories
-}
-
-// XLocalizable
-
-void ScTestAddIn::setLocale(const lang::Locale& eLocale) THROWS( (UsrSystemException) )
-{
-    aFuncLoc = eLocale;
-}
-
-css::lang::Locale SAL_CALL ScTestAddIn::getLocale(  ) throw(css::uno::RuntimeException)
-{
-    return aFuncLoc;
-}
-
-// XTestAddIn
-
-sal_Int32 SAL_CALL ScTestAddIn::countParams( const css::uno::Sequence< css::uno::Any >& aArgs ) throw(css::uno::RuntimeException)
-{
-    return aArgs.getLength();
-}
-
-double SAL_CALL ScTestAddIn::addOne( double fValue ) throw(css::uno::RuntimeException)
-{
-    return fValue + 1.0;
-}
-
-OUString SAL_CALL ScTestAddIn::repeatStr( const OUString& aStr, sal_Int32 nCount ) throw(css::uno::RuntimeException)
-{
-    String aRet;
-    String aStrStr = OUStringToString( aStr, CHARSET_SYSTEM );
-    for (long i=0; i<nCount; i++)
-        aRet += aStrStr;
-
-    return StringToOUString( aRet, CHARSET_SYSTEM );
-}
-
-OUString SAL_CALL ScTestAddIn::getDateString( const css::uno::Reference< css::beans::XPropertySet >& xCaller, double fValue ) throw(css::uno::RuntimeException)
-{
-    uno::Any aDateAny = xCaller->getPropertyValue( L"NullDate" );
-    {
-        util::Date aDate;
-        aDateAny >>= aDate;
-        {
-            Date aNewDate( aDate.Day, aDate.Month, aDate.Year );
-
-            aNewDate += static_cast<sal_Int32>(fValue+0.5);
-
-            String aRet;
-            aRet += aNewDate.GetDay();
-            aRet += '.';
-            aRet += aNewDate.GetMonth();
-            aRet += '.';
-            aRet += aNewDate.GetYear();
-            return StringToOUString( aRet, CHARSET_SYSTEM );
-        }
-    }
-
-    return L"**ERROR**";
-}
-
-sal_Int32 SAL_CALL ScTestAddIn::getColorValue( const css::uno::Reference< css::table::XCellRange >& xRange ) throw(css::uno::RuntimeException)
-{
-    uno::Reference<beans::XPropertySet> xProp( xRange, uno::UNO_QUERY );
-    if (xProp.is())
-    {
-        long nRet = -1;
-        uno::Any aTrans = xProp->getPropertyValue( L"IsCellBackgroundTransparent" );
-        sal_Bool bIsTrans;
-        aTrans >>= bIsTrans;        //! don't use >>= for BOOL
-        if (!bIsTrans)
-        {
-            uno::Any aCol = xProp->getPropertyValue( L"CellBackColor" );
-            aCol >>= nRet;
-        }
-        return nRet;
-    }
-    return 0;
-}
-
-double lcl_GetDoubleElement( const uno::Sequence< uno::Sequence<double> >& aMatrix, long nCol, long nRow )
-{
-    if ( nRow < aMatrix.getLength() )
-    {
-        const uno::Sequence<double>& rRowSeq = aMatrix.getConstArray()[nRow];
-        if ( nCol < rRowSeq.getLength() )
-            return rRowSeq.getConstArray()[nCol];
-    }
-    return 0.0;     // error
-}
-
-INT32 lcl_GetLongElement( const uno::Sequence< uno::Sequence<INT32> >& aMatrix, long nCol, long nRow )
-{
-    if ( nRow < aMatrix.getLength() )
-    {
-        const uno::Sequence<INT32>& rRowSeq = aMatrix.getConstArray()[nRow];
-        if ( nCol < rRowSeq.getLength() )
-            return rRowSeq.getConstArray()[nCol];
-    }
-    return 0.0;     // error
-}
-
-css::uno::Sequence< css::uno::Sequence< double > > SAL_CALL ScTestAddIn::transpose( const css::uno::Sequence< css::uno::Sequence< double > >& aMatrix ) throw(css::uno::RuntimeException)
-{
-    long nRowCount = aMatrix.getLength();
-    long nColCount = 0;
-    if ( nRowCount )
-        nColCount = aMatrix.getConstArray()[0].getLength();
-
-    uno::Sequence< uno::Sequence<double> > aRet( nColCount );
-    for (long nCol=0; nCol<nColCount; nCol++)
-    {
-        uno::Sequence<double> aSubSeq(nRowCount);
-        for (long nRow=0; nRow<nRowCount; nRow++)
-            aSubSeq.getArray()[nRow] = lcl_GetDoubleElement( aMatrix, nCol, nRow );
-
-        aRet.getArray()[nCol] = aSubSeq;
-    }
-
-    return aRet;
-}
-
-css::uno::Sequence< css::uno::Sequence< sal_Int32 > > SAL_CALL ScTestAddIn::transposeInt( const css::uno::Sequence< css::uno::Sequence< sal_Int32 > >& aMatrix ) throw(css::uno::RuntimeException)
-{
-    long nRowCount = aMatrix.getLength();
-    long nColCount = 0;
-    if ( nRowCount )
-        nColCount = aMatrix.getConstArray()[0].getLength();
-
-    uno::Sequence< uno::Sequence<INT32> > aRet( nColCount );
-    for (long nCol=0; nCol<nColCount; nCol++)
-    {
-        uno::Sequence<INT32> aSubSeq(nRowCount);
-        for (long nRow=0; nRow<nRowCount; nRow++)
-            aSubSeq.getArray()[nRow] = lcl_GetLongElement( aMatrix, nCol, nRow );
-
-        aRet.getArray()[nCol] = aSubSeq;
-    }
-
-    return aRet;
-}
-
-OUString SAL_CALL ScTestAddIn::repeatMultiple( sal_Int32 nCount, const css::uno::Any& aFirst, const css::uno::Sequence< css::uno::Any >& aFollow ) throw(css::uno::RuntimeException)
-{
-    String aSeparator;
-    if ( !aFirst.hasValue() )   // not specified
-        aSeparator = ';';
-    else
-    {
-        OUString aUStr;
-        aFirst >>= aUStr;
-        aSeparator = OUStringToString( aUStr, CHARSET_SYSTEM );
-    }
-
-    String aContent;
-    long nContCount = aFollow.getLength();
-    const uno::Any* pArr = aFollow.getConstArray();
-    for (long nPos=0; nPos<nContCount; nPos++)
-    {
-        if ( nPos > 0 )
-            aContent += ' ';
-        OUString aUStr;
-        pArr[nPos] >>= aUStr;
-        aContent += OUStringToString( aUStr, CHARSET_SYSTEM );
-    }
-
-    String aRet;
-
-    for (long i=0; i<nCount; i++)
-    {
-        if (i>0)
-            aRet += aSeparator;
-        aRet += aContent;
-    }
-
-    return StringToOUString(aRet, CHARSET_SYSTEM);
-}
-
-css::uno::Any SAL_CALL ScTestAddIn::getStrOrVal( sal_Int32 nFlag ) throw(css::uno::RuntimeException)
-{
-    uno::Any aRet;
-
-    //! Test
-    if ( nFlag == 42 )
-    {
-        uno::Sequence<OUString> aInner(3);
-        aInner.getArray()[0] = L"Bla";
-        aInner.getArray()[1] = L"Fasel";
-        aInner.getArray()[2] = L"Suelz";
-        uno::Sequence< uno::Sequence<OUString> > aOuter( &aInner, 1 );
-
-        aRet <<= aOuter;
-        return aRet;
-    }
-    //! Test
-
-    if ( nFlag )
-        aRet <<= UString(L"This is a string.");
-    else
-        aRet <<= (INT32)42;
-
-    return aRet;
-}
-
-css::uno::Reference< css::sheet::XVolatileResult > SAL_CALL ScTestAddIn::callAsync( const OUString& aString ) throw(css::uno::RuntimeException)
-{
-    String aStr = OUStringToString( aString, CHARSET_SYSTEM );
-    char c = (char) aStr;
-    if ( c >= '0' && c <= '9' )
-    {
-        if (!xNumResult.is())
-            xNumResult = new ScAddInResult( "Num" );
-        return xNumResult;
-    }
-    else
-    {
-        if (!xAlphaResult.is())
-            xAlphaResult = new ScAddInResult( "Str" );
-        return xAlphaResult;
-    }
-}
-
-// XServiceName
-OUString SAL_CALL ScTestAddIn::getServiceName(  ) throw(css::uno::RuntimeException)
-{
-    return SCTESTADDIN_SERVICE;     // name of specific AddIn service
-}
-
-// XServiceInfo
-OUString SAL_CALL ScTestAddIn::getImplementationName(  ) throw(css::uno::RuntimeException)
-{
-    return getImplementationName_Static();
-}
-
-sal_Bool SAL_CALL ScTestAddIn::supportsService( const OUString& ServiceName ) throw(css::uno::RuntimeException)
-{
-    return cppu::supportsService(this, ServiceName);
-}
-
-css::uno::Sequence< OUString > SAL_CALL ScTestAddIn::getSupportedServiceNames(  ) throw(css::uno::RuntimeException)
-{
-    return getSupportedServiceNames_Static();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/workben/addin.hxx b/sc/workben/addin.hxx
deleted file mode 100644
index 5ad56228b099..000000000000
--- a/sc/workben/addin.hxx
+++ /dev/null
@@ -1,92 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_SC_WORKBEN_ADDIN_HXX
-#define INCLUDED_SC_WORKBEN_ADDIN_HXX
-
-#include <com/sun/star/sheet/XAddIn.hpp>
-#include <com/sun/star/lang/XServiceName.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <stardiv/starcalc/test/XTestAddIn.hpp>
-
-#include <cppuhelper/implbase.hxx>
-
-css::uno::Reference<css::uno::XInterface> ScTestAddIn_CreateInstance(
-    const css::uno::Reference<css::lang::XMultiServiceFactory>& );
-
-class ScTestAddIn : public cppu::WeakImplHelper<
-                        css::sheet::XAddIn,
-                        stardiv::starcalc::test::XTestAddIn,
-                        css::lang::XServiceName,
-                        css::lang::XServiceInfo >
-{
-private:
-    css::uno::Reference<css::sheet::XVolatileResult>  xAlphaResult;   //! Test
-    css::uno::Reference<css::sheet::XVolatileResult>  xNumResult;     //! Test
-    css::lang::Locale                                 aFuncLoc;
-
-public:
-                            ScTestAddIn();
-    virtual                 ~ScTestAddIn();
-
-//                          SMART_UNO_DECLARATION( ScTestAddIn, UsrObject );
-//  friend Reflection *     ScTestAddIn_getReflection();
-//  virtual BOOL            queryInterface( Uik, XInterfaceRef& );
-//  virtual XIdlClassRef    getIdlClass();
-
-    static UString          getImplementationName_Static();
-    static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
-
-                            // XAddIn
-    virtual OUString SAL_CALL getProgrammaticFuntionName( const OUString& aDisplayName ) throw(css::uno::RuntimeException);
-    virtual OUString SAL_CALL getDisplayFunctionName( const OUString& aProgrammaticName ) throw(css::uno::RuntimeException);
-    virtual OUString SAL_CALL getFunctionDescription( const OUString& aProgrammaticName ) throw(css::uno::RuntimeException);
-    virtual OUString SAL_CALL getDisplayArgumentName( const OUString& aProgrammaticFunctionName, sal_Int32 nArgument ) throw(css::uno::RuntimeException);
-    virtual OUString SAL_CALL getArgumentDescription( const OUString& aProgrammaticFunctionName, sal_Int32 nArgument ) throw(css::uno::RuntimeException);
-    virtual OUString SAL_CALL getProgrammaticCategoryName( const OUString& aProgrammaticFunctionName ) throw(css::uno::RuntimeException);
-    virtual OUString SAL_CALL getDisplayCategoryName( const OUString& aProgrammaticFunctionName ) throw(css::uno::RuntimeException);
-
-                            // XLocalizable
-    virtual void SAL_CALL setLocale( const css::lang::Locale& eLocale ) throw(css::uno::RuntimeException);
-    virtual css::lang::Locale SAL_CALL getLocale(  ) throw(css::uno::RuntimeException);
-
-                            // XTestAddIn
-    virtual sal_Int32 SAL_CALL countParams( const css::uno::Sequence< css::uno::Any >& aArgs ) throw(css::uno::RuntimeException);
-    virtual double SAL_CALL addOne( double fValue ) throw(css::uno::RuntimeException);
-    virtual OUString SAL_CALL repeatStr( const OUString& aStr, sal_Int32 nCount ) throw(css::uno::RuntimeException);
-    virtual OUString SAL_CALL getDateString( const css::uno::Reference< css::beans::XPropertySet >& xCaller, double fValue ) throw(css::uno::RuntimeException);
-    virtual sal_Int32 SAL_CALL getColorValue( const css::uno::Reference< css::table::XCellRange >& xRange ) throw(css::uno::RuntimeException);
-    virtual css::uno::Sequence< css::uno::Sequence< double > > SAL_CALL transpose( const css::uno::Sequence< css::uno::Sequence< double > >& aMatrix ) throw(css::uno::RuntimeException);
-    virtual css::uno::Sequence< css::uno::Sequence< sal_Int32 > > SAL_CALL transposeInt( const css::uno::Sequence< css::uno::Sequence< sal_Int32 > >& aMatrix ) throw(css::uno::RuntimeException);
-    virtual css::uno::Reference< css::sheet::XVolatileResult > SAL_CALL callAsync( const OUString& aString ) throw(css::uno::RuntimeException);
-    virtual OUString SAL_CALL repeatMultiple( sal_Int32 nCount, const css::uno::Any& aFirst, const css::uno::Sequence< css::uno::Any >& aFollow ) throw(css::uno::RuntimeException);
-    virtual css::uno::Any SAL_CALL getStrOrVal( sal_Int32 nFlag ) throw(css::uno::RuntimeException);
-
-                            // XServiceName
-    virtual OUString SAL_CALL getServiceName(  ) throw(css::uno::RuntimeException);
-
-                            // XServiceInfo
-    virtual OUString SAL_CALL getImplementationName(  ) throw(css::uno::RuntimeException);
-    virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(css::uno::RuntimeException);
-    virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  ) throw(css::uno::RuntimeException);
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/workben/makefile.mk b/sc/workben/makefile.mk
deleted file mode 100644
index 6ac900932477..000000000000
--- a/sc/workben/makefile.mk
+++ /dev/null
@@ -1,86 +0,0 @@
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# This file incorporates work covered by the following license notice:
-#
-#   Licensed to the Apache Software Foundation (ASF) under one or more
-#   contributor license agreements. See the NOTICE file distributed
-#   with this work for additional information regarding copyright
-#   ownership. The ASF licenses this file to you under the Apache
-#   License, Version 2.0 (the "License"); you may not use this file
-#   except in compliance with the License. You may obtain a copy of
-#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
-#
-PRJ=..
-
-PRJNAME=sc
-TARGET=tst
-IDLMAP=map.idl
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE :  settings.mk
-
-# --- Files --------------------------------------------------------
-
-UNOUCRDEP=	$(BIN)$/applicat.rdb
-UNOUCRRDB=	$(BIN)$/applicat.rdb
-
-UNOTYPES=\
-    com.sun.star.util.Date		\
-    com.sun.star.sheet.XAddIn	\
-    com.sun.star.sheet.XVolatileResult	\
-    com.sun.star.lang.XServiceName	\
-    com.sun.star.lang.XServiceInfo	\
-    com.sun.star.lang.Locale	\
-    com.sun.star.lang.XSingleServiceFactory	\
-    com.sun.star.registry.XRegistryKey	\
-    com.sun.star.uno.XWeak	\
-    com.sun.star.uno.XAggregation	\
-    com.sun.star.uno.TypeClass	\
-    com.sun.star.lang.XTypeProvider	\
-    com.sun.star.lang.XMultiServiceFactory	\
-    stardiv.starcalc.test.XTestAddIn
-
-PACKAGE=stardiv$/starcalc$/test
-IDLFILES= testadd.idl
-
-SLOFILES=	\
-        $(SLO)$/addin.obj \
-        $(SLO)$/result.obj
-
-EXCEPTIONSFILES= \
-        $(SLO)$/addin.obj \
-        $(SLO)$/result.obj
-
-SHL1TARGET= $(TARGET)$(DLLPOSTFIX)
-
-SHL1STDLIBS=$(VCLLIB) $(TOOLSLIB) $(SVLLIB) $(TKLIB) $(SALLIB)  $(CPPULIB) $(CPPUHELPERLIB)
-
-SHL1DEPN=   $(L)$/itools.lib $(SVLIBDEPEND)
-SHL1DEF=    $(MISC)$/$(SHL1TARGET).def
-SHL1IMPLIB=$(TARGET)
-SHL1OBJS=	$(SLO)$/addin.obj $(SLO)$/result.obj $(SLO)$/workben$/testadd.obj
-
-# --- Targets ------------------------------------------------------
-.INCLUDE :  target.mk
-
-.IF "$(OS)" == "WNT"
-
-$(MISC)$/$(SHL1TARGET).def:  makefile.mk
-    @echo ------------------------------
-    @echo Making: $@
-    @echo LIBRARY     $(SHL1TARGET)                                  >$@
-.IF "$(COM)"!="GCC"
-    @echo DESCRIPTION 'StarOne Test-DLL'                            >>$@
-    @echo DATA        READ WRITE NONSHARED                          >>$@
-.ENDIF
-    @echo EXPORTS                                                   >>$@
-    @echo   component_writeInfo @25                                 >>$@
-    @echo   component_getFactory @26                                >>$@
-.ENDIF
-
diff --git a/sc/workben/map.idl b/sc/workben/map.idl
deleted file mode 100644
index 0fedbe6a519e..000000000000
--- a/sc/workben/map.idl
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef SC_WORKBEN_MAP_IDL
-#define SC_WORKBEN_MAP_IDL
-
-#import <com/smartmap.idl>
-//#import <vcl/vclmap.idl>
-
-language cpp
-{
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/workben/result.cxx b/sc/workben/result.cxx
deleted file mode 100644
index 53ab4d81f946..000000000000
--- a/sc/workben/result.cxx
+++ /dev/null
@@ -1,98 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <usr/ustring.hxx>
-
-#include "result.hxx"
-
-using namespace com::sun::star;
-
-
-ScAddInResult::ScAddInResult(const String& rStr) :
-    aArg( rStr ),
-    nTickCount( 0 )
-{
-    aTimer.SetTimeout( 1000 );
-    aTimer.SetInvokeHandler( LINK( this, ScAddInResult, TimeoutHdl ) );
-    aTimer.Start();
-}
-
-void ScAddInResult::NewValue()
-{
-    ++nTickCount;
-
-    String aRet = aArg;
-    aRet += nTickCount;
-    OUString aUStr = StringToOUString( aRet, CHARSET_SYSTEM );
-
-    sheet::ResultEvent aEvent( (cppu::OWeakObject*)this, Any(aUStr) );
-
-    for (size_t n = 0; n < m_Listeners.size(); ++n)
-        m_Listeners[n]->modified( aEvent );
-}
-
-IMPL_LINK( ScAddInResult, TimeoutHdl, Timer*, pT, void )
-{
-    NewValue();
-    pT->Start();
-}
-
-ScAddInResult::~ScAddInResult()
-{
-}
-
-// XVolatileResult
-
-void SAL_CALL ScAddInResult::addResultListener( const css::uno::Reference< css::sheet::XResultListener >& aListener ) throw(css::uno::RuntimeException)
-{
-    m_Listeners.push_back(uno::Reference<sheet::XResultListener>(aListener));
-
-    if (m_Listeners.size() == 1)
-    {
-        acquire();                      // one Ref for all listeners
-
-        NewValue(); //! Test
-    }
-}
-
-void SAL_CALL ScAddInResult::removeResultListener( const css::uno::Reference< css::sheet::XResultListener >& aListener ) throw(css::uno::RuntimeException)
-{
-    acquire();
-
-    for (size_t n = m_Listeners.size(); --n; )
-    {
-        if (m_Listeners[n] == aListener)
-        {
-            m_Listeners.erase(m_Listeners.begin() + n);
-
-            if (m_Listeners.empty())
-            {
-                nTickCount = 0; //! Test
-
-                release();                  // release listener Ref
-            }
-
-            break;
-        }
-    }
-
-    release();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/workben/result.hxx b/sc/workben/result.hxx
deleted file mode 100644
index 52d4a62b18c6..000000000000
--- a/sc/workben/result.hxx
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_SC_WORKBEN_RESULT_HXX
-#define INCLUDED_SC_WORKBEN_RESULT_HXX
-
-#include <vcl/timer.hxx>
-#include <rtl/ustring.hxx>
-
-#include <com/sun/star/sheet/XVolatileResult.hpp>
-
-#include <cppuhelper/implbase.hxx>
-
-#include <vector>
-
-class ScAddInResult : public cppu::WeakImplHelper< css::sheet::XVolatileResult>
-{
-private:
-    String                  aArg;
-    long                    nTickCount;
-    std::vector<css::uno::Reference<css::sheet::XResultListener>>
-                            m_Listeners;
-    Timer                   aTimer;
-
-    DECL_LINK( TimeoutHdl, Timer* );
-
-    void                    NewValue();
-
-public:
-    explicit                ScAddInResult(const String& rStr);
-    virtual                 ~ScAddInResult();
-
-                            // XVolatileResult
-    virtual void SAL_CALL addResultListener( const css::uno::Reference< css::sheet::XResultListener >& aListener ) throw(css::uno::RuntimeException);
-    virtual void SAL_CALL removeResultListener( const css::uno::Reference< css::sheet::XResultListener >& aListener ) throw(css::uno::RuntimeException);
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/workben/testadd.idl b/sc/workben/testadd.idl
deleted file mode 100644
index 8b362d8e7a37..000000000000
--- a/sc/workben/testadd.idl
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef SC_WORKBEN_TESTADD_IDL
-#define SC_WORKBEN_TESTADD_IDL
-
-#include <com/sun/star/uno/XInterface.idl>
-#include <com/sun/star/beans/XPropertySet.idl>
-#include <com/sun/star/table/XCellRange.idl>
-#include <com/sun/star/sheet/XVolatileResult.idl>
-
-
-module stardiv
-{
-module starcalc
-{
-module test
-{
-
-/** test-interface for an AddIn implementation
- */
-[ uik(2DB48150-7FBB-11d3-9F510050-042A51C9), ident("XTestAddIn", 1.0) ]
-interface XTestAddIn:com::sun::star::uno::XInterface
-{
-    long countParams([in]sequence<any> aArgs);
-    double addOne([in]double fValue);
-    string repeatStr([in]string aStr, [in]long nCount);
-    string getDateString([in]com::sun::star::beans::XPropertySet xCaller, [in]double fValue);
-    long getColorValue([in]com::sun::star::table::XCellRange xRange);
-    sequence< sequence<double> > transpose([in]sequence< sequence<double> > aMatrix);
-    sequence< sequence<long> > transposeInt([in]sequence< sequence<long> > aMatrix);
-    com::sun::star::sheet::XVolatileResult callAsync([in]string aString);
-    string repeatMultiple([in]long nCount, [in]any aFirst, [in]sequence<any> aFollow);
-    any getStrOrVal([in]long nFlag);
-};
-
-};
-};
-};
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list