<commit_before>/*************************************************************************
 *
 *  $RCSfile: cpnt.cxx,v $
 *
 *  $Revision: 1.3 $
 *
 *  last change: $Author: jl $ $Date: 2000-10-20 15:40:08 $
 *
 *  The Contents of this file are made available subject to the terms of
 *  either of the following licenses
 *
 *         - GNU Lesser General Public License Version 2.1
 *         - Sun Industry Standards Source License Version 1.1
 *
 *  Sun Microsystems Inc., October, 2000
 *
 *  GNU Lesser General Public License Version 2.1
 *  =============================================
 *  Copyright 2000 by Sun Microsystems, Inc.
 *  901 San Antonio Road, Palo Alto, CA 94303, USA
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License version 2.1, as published by the Free Software Foundation.
 *
 *  This library 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 for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *  MA  02111-1307  USA
 *
 *
 *  Sun Industry Standards Source License Version 1.1
 *  =================================================
 *  The contents of this file are subject to the Sun Industry Standards
 *  Source License Version 1.1 (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.openoffice.org/license.html.
 *
 *  Software provided under this License is provided on an "AS IS" basis,
 *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
 *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
 *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
 *  See the License for the specific provisions governing your rights and
 *  obligations concerning the Software.
 *
 *  The Initial Developer of the Original Code is: Sun Microsystems, Inc.
 *
 *  Copyright: 2000 by Sun Microsystems, Inc.
 *
 *  All Rights Reserved.
 *
 *  Contributor(s): _______________________________________
 *
 *
 ************************************************************************/

#include <windows.h>
#include <atlbase.h>

#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <osl/diagnose.h>
#include <uno/environment.h>
#include <cppuhelper/factory.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/script/XInvocation.hpp>
#include <com/sun/star/reflection/XIdlReflection.hpp>


#include <cppuhelper/implbase5.hxx>
#include <com/sun/star/uno/Reference.h>
#include <rtl/ustring>
#include <com/sun/star/uno/Reference.hxx>
#include <oletest/XTestSequence.hpp>
#include <oletest/XTestStruct.hpp>
#include <oletest/XTestOther.hpp>
#include <oletest/XTestInterfaces.hpp>
#include <oletest/XSimple.hpp>
#include <oletest/XSimple2.hpp>
#include <oletest/XSimple3.hpp>

#include <com/sun/star/beans/Property.hpp>
using namespace cppu;
using namespace osl;
using namespace oletest;
using namespace rtl;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::beans;
using namespace com::sun::star::registry;
using namespace com::sun::star::script;
using namespace com::sun::star::reflection;

#define IMPL_NAME L"oletest.OleTestImpl"  // oletest.OleTestImpl in applicat.rdb
#define SERVICE_NAME L"oletest.OleTest"
#define KEY1 L"/oletest.OleTestImpl/UNO/SERVICES"
#define KEY2 L"oletest.OleTest"

class OComponent : public WeakImplHelper5<
         XTestSequence, XTestStruct, XTestOther, XTestInterfaces, XSimple>
{
    sal_Int32 m_arrayConstructor;
    Reference<XMultiServiceFactory> m_rFactory;

    Sequence<sal_Int8> m_seqByte;
    Sequence<float> m_seqFloat;
    Sequence<double> m_seqDouble;
    Sequence<sal_Bool> m_seqBool;
    Sequence<sal_Int16> m_seqShort;
    Sequence<sal_uInt16> m_seqUShort;
    Sequence<sal_Int32> m_seqLong;
    Sequence<sal_uInt32> m_seqULong;
    Sequence<sal_Unicode> m_seqChar;
    Sequence<OUString> m_seqString;
    Sequence<Any> m_seqAny;
    Sequence<Sequence< sal_Int32> > m_seq1;
    Sequence<Sequence< Sequence< sal_Int32> > > m_seq2;
    Any m_any;
    Sequence<Reference< XInterface > > m_seqxInterface;
public:
    OComponent( const Reference<XMultiServiceFactory> & rFactory ) :
      m_rFactory( rFactory ), m_arrayConstructor(0) {}
    ~OComponent();

public: // refcounting
//      sal_Bool                        queryInterface( Uik aUik, XInterfaceRef & rOut );
//      void                        acquire()                        { OWeakObject::acquire(); }
//      void                        release()                        { OWeakObject::release(); }
//      void*                       getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); }

public: // XTestSequence
    virtual Sequence<sal_Int8> SAL_CALL methodByte(const Sequence< sal_Int8 >& aSeq) throw( RuntimeException );
    virtual Sequence<float> SAL_CALL methodFloat(const Sequence< float >& aSeq) throw( RuntimeException );
    virtual Sequence< double > SAL_CALL methodDouble(const Sequence< double >& aSeq) throw( RuntimeException);
    virtual Sequence< sal_Bool > SAL_CALL methodBool(const Sequence< sal_Bool >& aSeq) throw( RuntimeException );
    virtual Sequence< sal_Int16 > SAL_CALL methodShort(const Sequence< sal_Int16 >& aSeq) throw( RuntimeException );
    virtual Sequence< sal_uInt16 > SAL_CALL methodUShort(const Sequence< sal_uInt16 >& aSeq) throw( RuntimeException );
    virtual Sequence< sal_Int32 > SAL_CALL methodLong(const Sequence< sal_Int32 >& aSeq) throw( RuntimeException) ;
    virtual Sequence< sal_uInt32 > SAL_CALL methodULong(const Sequence< sal_uInt32 >& aSeq) throw( RuntimeException );
    virtual Sequence< OUString > SAL_CALL methodString(const Sequence< OUString >& aSeq) throw( RuntimeException );
    virtual Sequence< sal_Unicode > SAL_CALL methodChar(const Sequence< sal_Unicode >& aSeq) throw( RuntimeException );
    virtual Sequence< Any > SAL_CALL methodAny(const Sequence< Any >& aSeq) throw( RuntimeException );
    virtual Sequence< Reference< XInterface > > SAL_CALL methodXInterface( const Sequence< Reference< XInterface > >& aSeq ) throw(RuntimeException) ;
    virtual Sequence< Sequence< sal_Int32 > > SAL_CALL methodSequence(const Sequence< Sequence< sal_Int32 > >& aSeq) throw( RuntimeException );
    virtual Sequence< Sequence< Sequence< sal_Int32 > > > SAL_CALL methodSequence2(const Sequence< Sequence< Sequence< sal_Int32 > > >& aSeq) throw( RuntimeException );

    virtual Sequence< sal_Int8 > SAL_CALL getAttrByte(void) throw( RuntimeException );
    virtual void SAL_CALL setAttrByte(const Sequence< sal_Int8 >& AttrByte_) throw( RuntimeException );
    virtual Sequence< float > SAL_CALL getAttrFloat(void)  throw( RuntimeException) ;
    virtual void SAL_CALL setAttrFloat(const Sequence< float >& AttrFloat_) throw( RuntimeException );
    virtual Sequence< double > SAL_CALL getAttrDouble(void)  throw( RuntimeException) ;
    virtual void SAL_CALL setAttrDouble(const Sequence< double >& AttrDouble_) throw( RuntimeException );
    virtual Sequence< sal_Bool > SAL_CALL getAttrBool(void)  throw( RuntimeException );
    virtual void SAL_CALL setAttrBool(const Sequence< sal_Bool >& AttrBool_) throw( RuntimeException );
    virtual Sequence< sal_Int16 > SAL_CALL getAttrShort(void)  throw( RuntimeException );
    virtual void SAL_CALL setAttrShort(const Sequence< sal_Int16 >& AttrShort_) throw( RuntimeException );
    virtual Sequence< sal_uInt16 > SAL_CALL getAttrUShort(void)  throw( RuntimeException );
    virtual void SAL_CALL setAttrUShort(const Sequence< sal_uInt16 >& AttrUShort_) throw( RuntimeException );
    virtual Sequence< sal_Int32 > SAL_CALL getAttrLong(void)  throw( RuntimeException );
    virtual void SAL_CALL setAttrLong(const Sequence< sal_Int32 >& AttrLong_) throw( RuntimeException );
    virtual Sequence< sal_uInt32 > SAL_CALL getAttrULong(void)  throw( RuntimeException );
    virtual void SAL_CALL setAttrULong(const Sequence< sal_uInt32 >& AttrULong_) throw( RuntimeException );
    virtual Sequence< OUString > SAL_CALL getAttrString(void)  throw(RuntimeException );
    virtual void SAL_CALL setAttrString(const Sequence< OUString >& AttrString_) throw( RuntimeException );
    virtual Sequence< sal_Unicode > SAL_CALL getAttrChar(void)  throw( RuntimeException );
    virtual void SAL_CALL setAttrChar(const Sequence< sal_Unicode >& AttrChar_) throw( RuntimeException );
    virtual Sequence< Any > SAL_CALL getAttrAny(void)  throw( RuntimeException );
    virtual void SAL_CALL setAttrAny(const Sequence< Any >& AttrAny_) throw( RuntimeException );
    virtual Sequence< Sequence< sal_Int32 > > SAL_CALL getAttrSequence(void) throw( RuntimeException );
    virtual void SAL_CALL  setAttrSequence(const Sequence< Sequence< sal_Int32 > >& AttrSequence_) throw( RuntimeException );
    virtual Sequence< Sequence< Sequence< sal_Int32 > > > SAL_CALL getAttrSequence2(void)  throw( RuntimeException );
    virtual void SAL_CALL setAttrSequence2(const Sequence< Sequence< Sequence< sal_Int32 > > >& AttrSequence2_) throw ( RuntimeException );
    virtual Sequence< Reference< XInterface > > SAL_CALL getAttrXInterface() throw(RuntimeException);
    virtual void SAL_CALL setAttrXInterface( const Sequence< Reference< XInterface > >& _attrxinterface ) throw(RuntimeException);

    virtual void SAL_CALL testout_methodByte(sal_Int8& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodFloat(float& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodDouble(double& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodBool(sal_Bool& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodShort(sal_Int16& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodUShort(sal_uInt16& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodLong(sal_Int32& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodULong(sal_uInt32& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodString(OUString& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodChar(sal_Unicode& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodAny(Any& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodSequence2(Sequence< Sequence< sal_Int32 > >& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodMulParams1(sal_Int32& rout1, sal_Int32& rout2) throw( RuntimeException );
    virtual void SAL_CALL testout_methodMulParams2(sal_Int32& rout1, sal_Int32& rout2, OUString& rout3) throw( RuntimeException );
    virtual void SAL_CALL testout_methodMulParams3(const OUString& sin, OUString& sout) throw( RuntimeException );
    virtual void SAL_CALL testout_methodMulParams4( float in1, float& out1, sal_Int32 in2, sal_Int32& out2, sal_Int32 in3 ) throw(RuntimeException);
    virtual void SAL_CALL testout_methodXInterface( Reference< XInterface >& rOut ) throw(RuntimeException);

    virtual void SAL_CALL testinout_methodByte(sal_Int8& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodFloat(float& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodDouble(double& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodBool(sal_Bool& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodShort(sal_Int16& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodUShort(sal_uInt16& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodLong(sal_Int32& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodULong(sal_uInt32& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodString(OUString& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodChar(sal_Unicode& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodAny(Any& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodSequence2(Sequence< Sequence< sal_Int32 > >& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodXInterface( Reference< XInvocation >& rOut ) throw(RuntimeException);
    virtual Any SAL_CALL methodAnyTest1(const Any& rIn) throw( RuntimeException ) ;
    virtual Any SAL_CALL getAttrAny2(void) throw( RuntimeException ) ;
    virtual void SAL_CALL setAttrAny2(const Any& AttrAny2_) throw( RuntimeException ) ;


    // XTestStruct
    virtual void SAL_CALL methodStruct(const Property& aProp) throw( RuntimeException );

    virtual Property SAL_CALL retMethodStruct(void) throw( RuntimeException );

    virtual Property SAL_CALL  getAttrStruct(void) throw( RuntimeException );
    virtual void SAL_CALL setAttrStruct(const Property& AttrStruct_) throw( RuntimeException );

    // XTestOther
    virtual void SAL_CALL other_methodAnyIn(const Any& rAny) throw( RuntimeException );
    virtual void SAL_CALL other_methodAnyOut(Any& rAny) throw( RuntimeException );
    virtual Any SAL_CALL other_methodAnyRet(void) throw( RuntimeException );
    virtual void SAL_CALL in_float( float val) throw ( RuntimeException);

    // XTestOutParameters ------------------------------------------------------------------------
    virtual void SAL_CALL out_test(sal_Int8 rIn) throw( RuntimeException );

    virtual void SAL_CALL out_methodByte(sal_Int8& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodFloat(float& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodDouble(double& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodBool(sal_Bool& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodShort(sal_Int16& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodUShort(sal_uInt16& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodLong(sal_Int32& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodULong(sal_uInt32& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodString(OUString& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodChar(sal_Unicode& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodAny(Any& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodSequence2(Sequence< Sequence< sal_Int32 > >& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodMulParams1(sal_Int32& rout1, sal_Int32& rout2) throw( RuntimeException );
    virtual void SAL_CALL out_methodMulParams2(sal_Int32& rout1, sal_Int32& rout2, OUString& rout3) throw( RuntimeException );
    virtual void SAL_CALL out_methodMulParams3(const OUString& sin, OUString& sout) throw( RuntimeException );

    // XTestInterfaces --------------------------------------------------------------------------
    virtual void SAL_CALL testInterface(  const Reference< XCallback >& xCallback, sal_Int32 mode ) throw(RuntimeException);
    virtual void SAL_CALL testInterface2(  const Reference< XSimple >& xSimple, sal_Int32 mode ) throw(RuntimeException);
    // XSimple --------------------------------------------------------------------------
    void SAL_CALL func( const OUString &message) throw(::com::sun::star::uno::RuntimeException);
    OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException);

};


OComponent::~OComponent()
{
}


// Funktions ==============================================================================

Reference<XInterface> SAL_CALL OComponent_CreateInstance( const Reference<XMultiServiceFactory> & rSMgr ) throw(RuntimeException)
{
    Reference<XInterface> xService = *new OComponent( rSMgr );
    return xService;
}

Sequence<OUString> OComponent_getSupportedServiceNames(void)
{
    Sequence<OUString> aRet(1);
    aRet.getArray()[0] = SERVICE_NAME;//ODataInputStream_getImplementationName();

    return aRet;
}


extern "C" sal_Bool SAL_CALL component_writeInfo(   void * pServiceManager, void * pRegistryKey )
{
    if(pRegistryKey)
    {
        try
        {
            Reference<XRegistryKey> xNewKey =
                reinterpret_cast<XRegistryKey*>( pRegistryKey)->createKey(KEY1);
            xNewKey->createKey( KEY2);
            return sal_True;

        }
        catch(InvalidRegistryException &)
        {
            OSL_ENSHURE( sal_False, "### InvalidRegistryException!\n");
        }
    }
    return sal_False;
}

extern "C" void * SAL_CALL component_getFactory(
    const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
    static void * pRet= NULL;<commit_msg>*** empty log message ***<commit_after>/*************************************************************************
 *
 *  $RCSfile: cpnt.cxx,v $
 *
 *  $Revision: 1.4 $
 *
 *  last change: $Author: jl $ $Date: 2001-03-23 11:58:31 $
 *
 *  The Contents of this file are made available subject to the terms of
 *  either of the following licenses
 *
 *         - GNU Lesser General Public License Version 2.1
 *         - Sun Industry Standards Source License Version 1.1
 *
 *  Sun Microsystems Inc., October, 2000
 *
 *  GNU Lesser General Public License Version 2.1
 *  =============================================
 *  Copyright 2000 by Sun Microsystems, Inc.
 *  901 San Antonio Road, Palo Alto, CA 94303, USA
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License version 2.1, as published by the Free Software Foundation.
 *
 *  This library 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 for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *  MA  02111-1307  USA
 *
 *
 *  Sun Industry Standards Source License Version 1.1
 *  =================================================
 *  The contents of this file are subject to the Sun Industry Standards
 *  Source License Version 1.1 (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.openoffice.org/license.html.
 *
 *  Software provided under this License is provided on an "AS IS" basis,
 *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
 *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
 *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
 *  See the License for the specific provisions governing your rights and
 *  obligations concerning the Software.
 *
 *  The Initial Developer of the Original Code is: Sun Microsystems, Inc.
 *
 *  Copyright: 2000 by Sun Microsystems, Inc.
 *
 *  All Rights Reserved.
 *
 *  Contributor(s): _______________________________________
 *
 *
 ************************************************************************/

#include <windows.h>
#include <atlbase.h>

#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <osl/diagnose.h>
#include <uno/environment.h>
#include <cppuhelper/factory.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/script/XInvocation.hpp>
#include <com/sun/star/reflection/XIdlReflection.hpp>


#include <cppuhelper/implbase5.hxx>
#include <com/sun/star/uno/Reference.h>
#include <rtl/ustring>
#include <com/sun/star/uno/Reference.hxx>
#include <oletest/XTestSequence.hpp>
#include <oletest/XTestStruct.hpp>
#include <oletest/XTestOther.hpp>
#include <oletest/XTestInterfaces.hpp>
#include <oletest/XSimple.hpp>
#include <oletest/XSimple2.hpp>
#include <oletest/XSimple3.hpp>

#include <com/sun/star/beans/Property.hpp>
using namespace cppu;
using namespace osl;
using namespace oletest;
using namespace rtl;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::beans;
using namespace com::sun::star::registry;
using namespace com::sun::star::script;
using namespace com::sun::star::reflection;

#define IMPL_NAME L"oletest.OleTestImpl"  // oletest.OleTestImpl in applicat.rdb
#define SERVICE_NAME L"oletest.OleTest"
#define KEY1 L"/oletest.OleTestImpl/UNO/SERVICES"
#define KEY2 L"oletest.OleTest"

class OComponent : public WeakImplHelper5<
         XTestSequence, XTestStruct, XTestOther, XTestInterfaces, XSimple>
{
    sal_Int32 m_arrayConstructor;
    Reference<XMultiServiceFactory> m_rFactory;

    Sequence<sal_Int8> m_seqByte;
    Sequence<float> m_seqFloat;
    Sequence<double> m_seqDouble;
    Sequence<sal_Bool> m_seqBool;
    Sequence<sal_Int16> m_seqShort;
    Sequence<sal_uInt16> m_seqUShort;
    Sequence<sal_Int32> m_seqLong;
    Sequence<sal_uInt32> m_seqULong;
    Sequence<sal_Unicode> m_seqChar;
    Sequence<OUString> m_seqString;
    Sequence<Any> m_seqAny;
    Sequence<Sequence< sal_Int32> > m_seq1;
    Sequence<Sequence< Sequence< sal_Int32> > > m_seq2;
    Any m_any;
    Sequence<Reference< XInterface > > m_seqxInterface;
public:
    OComponent( const Reference<XMultiServiceFactory> & rFactory ) :
      m_rFactory( rFactory ), m_arrayConstructor(0) {}
    ~OComponent();

public: // refcounting
//      sal_Bool                        queryInterface( Uik aUik, XInterfaceRef & rOut );
//      void                        acquire()                        { OWeakObject::acquire(); }
//      void                        release()                        { OWeakObject::release(); }
//      void*                       getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); }

public: // XTestSequence
    virtual Sequence<sal_Int8> SAL_CALL methodByte(const Sequence< sal_Int8 >& aSeq) throw( RuntimeException );
    virtual Sequence<float> SAL_CALL methodFloat(const Sequence< float >& aSeq) throw( RuntimeException );
    virtual Sequence< double > SAL_CALL methodDouble(const Sequence< double >& aSeq) throw( RuntimeException);
    virtual Sequence< sal_Bool > SAL_CALL methodBool(const Sequence< sal_Bool >& aSeq) throw( RuntimeException );
    virtual Sequence< sal_Int16 > SAL_CALL methodShort(const Sequence< sal_Int16 >& aSeq) throw( RuntimeException );
    virtual Sequence< sal_uInt16 > SAL_CALL methodUShort(const Sequence< sal_uInt16 >& aSeq) throw( RuntimeException );
    virtual Sequence< sal_Int32 > SAL_CALL methodLong(const Sequence< sal_Int32 >& aSeq) throw( RuntimeException) ;
    virtual Sequence< sal_uInt32 > SAL_CALL methodULong(const Sequence< sal_uInt32 >& aSeq) throw( RuntimeException );
    virtual Sequence< OUString > SAL_CALL methodString(const Sequence< OUString >& aSeq) throw( RuntimeException );
    virtual Sequence< sal_Unicode > SAL_CALL methodChar(const Sequence< sal_Unicode >& aSeq) throw( RuntimeException );
    virtual Sequence< Any > SAL_CALL methodAny(const Sequence< Any >& aSeq) throw( RuntimeException );
    virtual Sequence< Reference< XInterface > > SAL_CALL methodXInterface( const Sequence< Reference< XInterface > >& aSeq ) throw(RuntimeException) ;
    virtual Sequence< Sequence< sal_Int32 > > SAL_CALL methodSequence(const Sequence< Sequence< sal_Int32 > >& aSeq) throw( RuntimeException );
    virtual Sequence< Sequence< Sequence< sal_Int32 > > > SAL_CALL methodSequence2(const Sequence< Sequence< Sequence< sal_Int32 > > >& aSeq) throw( RuntimeException );

    virtual Sequence< sal_Int8 > SAL_CALL getAttrByte(void) throw( RuntimeException );
    virtual void SAL_CALL setAttrByte(const Sequence< sal_Int8 >& AttrByte_) throw( RuntimeException );
    virtual Sequence< float > SAL_CALL getAttrFloat(void)  throw( RuntimeException) ;
    virtual void SAL_CALL setAttrFloat(const Sequence< float >& AttrFloat_) throw( RuntimeException );
    virtual Sequence< double > SAL_CALL getAttrDouble(void)  throw( RuntimeException) ;
    virtual void SAL_CALL setAttrDouble(const Sequence< double >& AttrDouble_) throw( RuntimeException );
    virtual Sequence< sal_Bool > SAL_CALL getAttrBool(void)  throw( RuntimeException );
    virtual void SAL_CALL setAttrBool(const Sequence< sal_Bool >& AttrBool_) throw( RuntimeException );
    virtual Sequence< sal_Int16 > SAL_CALL getAttrShort(void)  throw( RuntimeException );
    virtual void SAL_CALL setAttrShort(const Sequence< sal_Int16 >& AttrShort_) throw( RuntimeException );
    virtual Sequence< sal_uInt16 > SAL_CALL getAttrUShort(void)  throw( RuntimeException );
    virtual void SAL_CALL setAttrUShort(const Sequence< sal_uInt16 >& AttrUShort_) throw( RuntimeException );
    virtual Sequence< sal_Int32 > SAL_CALL getAttrLong(void)  throw( RuntimeException );
    virtual void SAL_CALL setAttrLong(const Sequence< sal_Int32 >& AttrLong_) throw( RuntimeException );
    virtual Sequence< sal_uInt32 > SAL_CALL getAttrULong(void)  throw( RuntimeException );
    virtual void SAL_CALL setAttrULong(const Sequence< sal_uInt32 >& AttrULong_) throw( RuntimeException );
    virtual Sequence< OUString > SAL_CALL getAttrString(void)  throw(RuntimeException );
    virtual void SAL_CALL setAttrString(const Sequence< OUString >& AttrString_) throw( RuntimeException );
    virtual Sequence< sal_Unicode > SAL_CALL getAttrChar(void)  throw( RuntimeException );
    virtual void SAL_CALL setAttrChar(const Sequence< sal_Unicode >& AttrChar_) throw( RuntimeException );
    virtual Sequence< Any > SAL_CALL getAttrAny(void)  throw( RuntimeException );
    virtual void SAL_CALL setAttrAny(const Sequence< Any >& AttrAny_) throw( RuntimeException );
    virtual Sequence< Sequence< sal_Int32 > > SAL_CALL getAttrSequence(void) throw( RuntimeException );
    virtual void SAL_CALL  setAttrSequence(const Sequence< Sequence< sal_Int32 > >& AttrSequence_) throw( RuntimeException );
    virtual Sequence< Sequence< Sequence< sal_Int32 > > > SAL_CALL getAttrSequence2(void)  throw( RuntimeException );
    virtual void SAL_CALL setAttrSequence2(const Sequence< Sequence< Sequence< sal_Int32 > > >& AttrSequence2_) throw ( RuntimeException );
    virtual Sequence< Reference< XInterface > > SAL_CALL getAttrXInterface() throw(RuntimeException);
    virtual void SAL_CALL setAttrXInterface( const Sequence< Reference< XInterface > >& _attrxinterface ) throw(RuntimeException);

    virtual void SAL_CALL testout_methodByte(sal_Int8& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodFloat(float& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodDouble(double& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodBool(sal_Bool& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodShort(sal_Int16& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodUShort(sal_uInt16& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodLong(sal_Int32& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodULong(sal_uInt32& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodString(OUString& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodChar(sal_Unicode& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodAny(Any& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodSequence2(Sequence< Sequence< sal_Int32 > >& rOut) throw( RuntimeException );
    virtual void SAL_CALL testout_methodMulParams1(sal_Int32& rout1, sal_Int32& rout2) throw( RuntimeException );
    virtual void SAL_CALL testout_methodMulParams2(sal_Int32& rout1, sal_Int32& rout2, OUString& rout3) throw( RuntimeException );
    virtual void SAL_CALL testout_methodMulParams3(const OUString& sin, OUString& sout) throw( RuntimeException );
    virtual void SAL_CALL testout_methodMulParams4( float in1, float& out1, sal_Int32 in2, sal_Int32& out2, sal_Int32 in3 ) throw(RuntimeException);
    virtual void SAL_CALL testout_methodXInterface( Reference< XInterface >& rOut ) throw(RuntimeException);

    virtual void SAL_CALL testinout_methodByte(sal_Int8& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodFloat(float& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodDouble(double& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodBool(sal_Bool& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodShort(sal_Int16& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodUShort(sal_uInt16& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodLong(sal_Int32& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodULong(sal_uInt32& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodString(OUString& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodChar(sal_Unicode& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodAny(Any& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodSequence2(Sequence< Sequence< sal_Int32 > >& rOut) throw( RuntimeException );
    virtual void SAL_CALL testinout_methodXInterface( Reference< XInvocation >& rOut ) throw(RuntimeException);
    virtual Any SAL_CALL methodAnyTest1(const Any& rIn) throw( RuntimeException ) ;
    virtual Any SAL_CALL getAttrAny2(void) throw( RuntimeException ) ;
    virtual void SAL_CALL setAttrAny2(const Any& AttrAny2_) throw( RuntimeException ) ;


    // XTestStruct
    virtual void SAL_CALL methodStruct(const Property& aProp) throw( RuntimeException );

    virtual Property SAL_CALL retMethodStruct(void) throw( RuntimeException );

    virtual Property SAL_CALL  getAttrStruct(void) throw( RuntimeException );
    virtual void SAL_CALL setAttrStruct(const Property& AttrStruct_) throw( RuntimeException );

    // XTestOther
    virtual void SAL_CALL other_methodAnyIn(const Any& rAny) throw( RuntimeException );
    virtual void SAL_CALL other_methodAnyOut(Any& rAny) throw( RuntimeException );
    virtual Any SAL_CALL other_methodAnyRet(void) throw( RuntimeException );
    virtual void SAL_CALL in_float( float val) throw ( RuntimeException);

    // XTestOutParameters ------------------------------------------------------------------------
    virtual void SAL_CALL out_test(sal_Int8 rIn) throw( RuntimeException );

    virtual void SAL_CALL out_methodByte(sal_Int8& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodFloat(float& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodDouble(double& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodBool(sal_Bool& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodShort(sal_Int16& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodUShort(sal_uInt16& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodLong(sal_Int32& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodULong(sal_uInt32& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodString(OUString& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodChar(sal_Unicode& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodAny(Any& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodSequence2(Sequence< Sequence< sal_Int32 > >& rOut) throw( RuntimeException );
    virtual void SAL_CALL out_methodMulParams1(sal_Int32& rout1, sal_Int32& rout2) throw( RuntimeException );
    virtual void SAL_CALL out_methodMulParams2(sal_Int32& rout1, sal_Int32& rout2, OUString& rout3) throw( RuntimeException );
    virtual void SAL_CALL out_methodMulParams3(const OUString& sin, OUString& sout) throw( RuntimeException );

    // XTestInterfaces --------------------------------------------------------------------------
    virtual void SAL_CALL testInterface(  const Reference< XCallback >& xCallback, sal_Int32 mode ) throw(RuntimeException);
    virtual void SAL_CALL testInterface2(  const Reference< XSimple >& xSimple, sal_Int32 mode ) throw(RuntimeException);
    // XSimple --------------------------------------------------------------------------
    void SAL_CALL func( const OUString &message) throw(::com::sun::star::uno::RuntimeException);
    OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException);

};


OComponent::~OComponent()
{
}


// Funktions ==============================================================================

Reference<XInterface> SAL_CALL OComponent_CreateInstance( const Reference<XMultiServiceFactory> & rSMgr ) throw(RuntimeException)
{
    Reference<XInterface> xService = *new OComponent( rSMgr );
    return xService;
}

Sequence<OUString> OComponent_getSupportedServiceNames(void)
{
    Sequence<OUString> aRet(1);
    aRet.getArray()[0] = SERVICE_NAME;//ODataInputStream_getImplementationName();

    return aRet;
}


extern "C" sal_Bool SAL_CALL component_writeInfo(   void * pServiceManager, void * pRegistryKey )
{
    if(pRegistryKey)
    {
        try
        {
            Reference<XRegistryKey> xNewKey =
                reinterpret_cast<XRegistryKey*>( pRegistryKey)->createKey(KEY1);
            xNewKey->createKey( KEY2);
            return sal_True;

        }
        catch(InvalidRegistryException &)
        {
            OSL_ENSURE( sal_False, "### InvalidRegistryException!\n");
        }
    }
    return sal_False;
}

extern "C" void * SAL_CALL component_getFactory(
    const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
    static void * pRet= NULL;
{'fraction_non_alphanumeric': 0.11387634145639727, 'fraction_numerical': 0.013925252467128923, 'mean_word_length': 4.590799420942576, 'pattern_counts': {'":': 0, '<': 273, '<?xml version=': 0, '>': 277, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4871292', 'n_tokens_mistral': 10513, 'n_tokens_neox': 9781, 'n_words': 2809}