diff options
Diffstat (limited to 'scripting/source')
34 files changed, 462 insertions, 235 deletions
diff --git a/scripting/source/basprov/basprov.component b/scripting/source/basprov/basprov.component new file mode 100644 index 0000000000..528ab6544e --- /dev/null +++ b/scripting/source/basprov/basprov.component @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* 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. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.scripting.ScriptProviderForBasic"> + <service name="com.sun.star.script.browse.BrowseNode"/> + <service name="com.sun.star.script.provider.LanguageScriptProvider"/> + <service name="com.sun.star.script.provider.ScriptProvider"/> + <service name="com.sun.star.script.provider.ScriptProviderForBasic"/> + </implementation> +</component> diff --git a/scripting/source/basprov/basprov.cxx b/scripting/source/basprov/basprov.cxx index aa356b4b8e..9e029ce826 100644 --- a/scripting/source/basprov/basprov.cxx +++ b/scripting/source/basprov/basprov.cxx @@ -605,14 +605,7 @@ extern "C" *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) - { - return ::cppu::component_writeInfoHelper( - pServiceManager, pRegistryKey, ::basprov::s_component_entries ); - } - - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( + SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) { diff --git a/scripting/source/basprov/basscript.cxx b/scripting/source/basprov/basscript.cxx index ccd0eb27a7..f4a4d3a763 100644 --- a/scripting/source/basprov/basscript.cxx +++ b/scripting/source/basprov/basscript.cxx @@ -93,13 +93,75 @@ namespace basprov ,m_documentBasicManager( &documentBasicManager ) ,m_xDocumentScriptContext( documentScriptContext ) { - // - registerProperty( BASSCRIPT_PROPERTY_CALLER, BASSCRIPT_PROPERTY_ID_CALLER, BASSCRIPT_DEFAULT_ATTRIBS(), &m_caller, ::getCppuType( &m_caller ) ); + StartListening( *m_documentBasicManager ); } // ----------------------------------------------------------------------------- BasicScriptImpl::~BasicScriptImpl() { + if ( m_documentBasicManager ) + EndListening( *m_documentBasicManager ); + } + + // ----------------------------------------------------------------------------- + // SfxListener + // ----------------------------------------------------------------------------- + void BasicScriptImpl::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) + { + if ( &rBC != m_documentBasicManager ) + { + OSL_ENSURE( false, "BasicScriptImpl::Notify: where does this come from?" ); + // not interested in + return; + } + const SfxSimpleHint* pSimpleHint = PTR_CAST( SfxSimpleHint, &rHint ); + if ( pSimpleHint && ( pSimpleHint->GetId() == SFX_HINT_DYING ) ) + { + m_documentBasicManager = NULL; + EndListening( rBC ); // prevent multiple notifications + } + } + + // ----------------------------------------------------------------------------- + // XInterface + // ----------------------------------------------------------------------------- + + IMPLEMENT_FORWARD_XINTERFACE2( BasicScriptImpl, BasicScriptImpl_BASE, OPropertyContainer ) + + // ----------------------------------------------------------------------------- + // XTypeProvider + // ----------------------------------------------------------------------------- + + IMPLEMENT_FORWARD_XTYPEPROVIDER2( BasicScriptImpl, BasicScriptImpl_BASE, OPropertyContainer ) + + // ----------------------------------------------------------------------------- + // OPropertySetHelper + // ----------------------------------------------------------------------------- + + ::cppu::IPropertyArrayHelper& BasicScriptImpl::getInfoHelper( ) + { + return *getArrayHelper(); + } + + // ----------------------------------------------------------------------------- + // OPropertyArrayUsageHelper + // ----------------------------------------------------------------------------- + + ::cppu::IPropertyArrayHelper* BasicScriptImpl::createArrayHelper( ) const + { + Sequence< Property > aProps; + describeProperties( aProps ); + return new ::cppu::OPropertyArrayHelper( aProps ); + } + + // ----------------------------------------------------------------------------- + // XPropertySet + // ----------------------------------------------------------------------------- + + Reference< XPropertySetInfo > BasicScriptImpl::getPropertySetInfo( ) throw (RuntimeException) + { + Reference< XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) ); + return xInfo; } // ----------------------------------------------------------------------------- diff --git a/scripting/source/basprov/basscript.hxx b/scripting/source/basprov/basscript.hxx index 7684f98949..878b5622d1 100644 --- a/scripting/source/basprov/basscript.hxx +++ b/scripting/source/basprov/basscript.hxx @@ -36,6 +36,7 @@ #include <comphelper/proparrhlp.hxx> #include <comphelper/propertycontainer.hxx> #include <basic/sbmeth.hxx> +#include <svl/lstner.hxx> class BasicManager; @@ -56,7 +57,8 @@ namespace basprov public ::scripting_helper::OMutexHolder, public ::scripting_helper::OBroadcastHelperHolder, public ::comphelper::OPropertyContainer, - public ::comphelper::OPropertyArrayUsageHelper< BasicScriptImpl > + public ::comphelper::OPropertyArrayUsageHelper< BasicScriptImpl >, + public SfxListener { private: SbMethodRef m_xMethod; @@ -106,6 +108,10 @@ namespace basprov // XPropertySet virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::RuntimeException ); + + // SfxListener + virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); }; //......................................................................... diff --git a/scripting/source/basprov/makefile.mk b/scripting/source/basprov/makefile.mk index 5001e5db28..244fd8d900 100644 --- a/scripting/source/basprov/makefile.mk +++ b/scripting/source/basprov/makefile.mk @@ -41,11 +41,11 @@ DLLPRE = # ------------------------------------------------------------------ SLOFILES= \ - $(SLO)$/basprov.obj \ - $(SLO)$/basscript.obj \ - $(SLO)$/baslibnode.obj \ - $(SLO)$/basmodnode.obj \ - $(SLO)$/basmethnode.obj + $(SLO)$/basprov.obj \ + $(SLO)$/basscript.obj \ + $(SLO)$/baslibnode.obj \ + $(SLO)$/basmodnode.obj \ + $(SLO)$/basmethnode.obj SHL1TARGET= $(TARGET)$(DLLPOSTFIX).uno SHL1IMPLIB= i$(TARGET) @@ -55,15 +55,16 @@ SHL1DEF=$(MISC)$/$(SHL1TARGET).def DEF1NAME=$(SHL1TARGET) SHL1STDLIBS= \ - $(SFX2LIB) \ - $(BASICLIB) \ - $(VCLLIB) \ - $(TOOLSLIB) \ - $(UCBHELPERLIB) \ - $(COMPHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) + $(SFX2LIB) \ + $(BASICLIB) \ + $(VCLLIB) \ + $(SVLLIB) \ + $(TOOLSLIB) \ + $(UCBHELPERLIB) \ + $(COMPHELPERLIB) \ + $(CPPUHELPERLIB) \ + $(CPPULIB) \ + $(SALLIB) SHL1DEPN= SHL1LIBS=$(SLB)$/$(TARGET).lib @@ -71,3 +72,11 @@ SHL1LIBS=$(SLB)$/$(TARGET).lib # --- Targets ------------------------------------------------------ .INCLUDE : target.mk + +ALLTAR : $(MISC)/basprov.component + +$(MISC)/basprov.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + basprov.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt basprov.component diff --git a/scripting/source/dlgprov/dlgevtatt.cxx b/scripting/source/dlgprov/dlgevtatt.cxx index 717e096f16..fa4a8ff687 100644 --- a/scripting/source/dlgprov/dlgevtatt.cxx +++ b/scripting/source/dlgprov/dlgevtatt.cxx @@ -220,7 +220,6 @@ namespace dlgprov Reference< ooo::vba::XVBAToOOEventDescGen > xVBAToOOEvtDesc( xSMgr->createInstanceWithContext( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAToOOEventDesc" ) ), m_xContext ), UNO_QUERY ); if ( xVBAToOOEvtDesc.is() ) xEventsSupplier.set( xVBAToOOEvtDesc->getEventSupplier( xControl, sControlName ), UNO_QUERY ); - } return xEventsSupplier; } @@ -371,16 +370,37 @@ namespace dlgprov } rtl::OUString sDialogCodeName; sal_Int32 nObjCount = Objects.getLength(); - Reference< awt::XControl > xDlgControl( Objects[ nObjCount - 1 ], uno::UNO_QUERY ); // last object is the dialog + Reference< awt::XControl > xDlgControl( Objects[ nObjCount - 1 ], uno::UNO_QUERY ); // last object is the dialog + rtl::OUString sDialogCodeName; if ( xDlgControl.is() ) { Reference< XPropertySet > xProps( xDlgControl->getModel(), UNO_QUERY ); try { - xProps->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name") ) ) >>= sDialogCodeName; + xProps->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name") ) ) >>= sDialogCodeName; } catch( Exception& ){} } + + for ( sal_Int32 i = 0; i < nObjCount; ++i ) + { + // We know that we have to do with instances of XControl. + // Otherwise this is not the right implementation for + // XScriptEventsAttacher and we have to give up. + Reference< XControl > xControl( pObjects[ i ], UNO_QUERY ); + if ( !xControl.is() ) + throw IllegalArgumentException(); + + // get XEventsSupplier from control model + Reference< XControlModel > xControlModel = xControl->getModel(); + Reference< XScriptEventsSupplier > xEventsSupplier( xControlModel, UNO_QUERY ); + attachEventsToControl( xControl, xEventsSupplier, Helper ); + if ( mbUseFakeVBAEvents ) + { + xEventsSupplier.set( getFakeVbaEventsSupplier( xControl, sDialogCodeName ) ); + attachEventsToControl( xControl, xEventsSupplier, Helper ); + } + } // go over all objects nestedAttachEvents( Objects, Helper, sDialogCodeName ); } diff --git a/scripting/source/dlgprov/dlgprov.component b/scripting/source/dlgprov/dlgprov.component new file mode 100644 index 0000000000..f7ceed336c --- /dev/null +++ b/scripting/source/dlgprov/dlgprov.component @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* 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. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.scripting.DialogProvider"> + <service name="com.sun.star.awt.ContainerWindowProvider"/> + <service name="com.sun.star.awt.DialogProvider"/> + <service name="com.sun.star.awt.DialogProvider2"/> + </implementation> +</component> diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx index caeead3b01..8faa510827 100644 --- a/scripting/source/dlgprov/dlgprov.cxx +++ b/scripting/source/dlgprov/dlgprov.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * 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 @@ -864,14 +864,7 @@ extern "C" *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - sal_Bool SAL_CALL component_writeInfo( - lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) - { - return ::cppu::component_writeInfoHelper( - pServiceManager, pRegistryKey, ::dlgprov::s_component_entries ); - } - - void * SAL_CALL component_getFactory( + void * SAL_CALL component_getFactory( const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) { diff --git a/scripting/source/dlgprov/dlgprov.hxx b/scripting/source/dlgprov/dlgprov.hxx index 3c9c71728a..f1dc2f2829 100644 --- a/scripting/source/dlgprov/dlgprov.hxx +++ b/scripting/source/dlgprov/dlgprov.hxx @@ -140,14 +140,14 @@ namespace dlgprov throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference < ::com::sun::star::awt::XDialog > SAL_CALL createDialogWithArguments( - const ::rtl::OUString& URL, + const ::rtl::OUString& URL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& Arguments ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createContainerWindow( - const ::rtl::OUString& URL, const ::rtl::OUString& WindowType, - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& xParent, - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xHandler ) + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createContainerWindow( + const ::rtl::OUString& URL, const ::rtl::OUString& WindowType, + const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& xParent, + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xHandler ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); }; diff --git a/scripting/source/dlgprov/makefile.mk b/scripting/source/dlgprov/makefile.mk index 6c8ec298c7..1145c2c2fa 100644 --- a/scripting/source/dlgprov/makefile.mk +++ b/scripting/source/dlgprov/makefile.mk @@ -40,8 +40,8 @@ DLLPRE = # ------------------------------------------------------------------ SLOFILES= \ - $(SLO)$/dlgprov.obj \ - $(SLO)$/dlgevtatt.obj + $(SLO)$/dlgprov.obj \ + $(SLO)$/dlgevtatt.obj SHL1TARGET= $(TARGET)$(DLLPOSTFIX).uno SHL1IMPLIB= i$(TARGET) @@ -54,13 +54,13 @@ SHL1STDLIBS= \ $(SFX2LIB) \ $(VCLLIB) \ $(TOOLSLIB) \ - $(XMLSCRIPTLIB) \ - $(CPPUHELPERLIB) \ + $(XMLSCRIPTLIB) \ + $(CPPUHELPERLIB) \ $(COMPHELPERLIB) \ $(UCBHELPERLIB) \ - $(CPPULIB) \ - $(BASICLIB) \ - $(SALLIB) + $(CPPULIB) \ + $(BASICLIB) \ + $(SALLIB) SHL1DEPN= SHL1LIBS=$(SLB)$/$(TARGET).lib @@ -80,3 +80,11 @@ $(MISC)$/$(TARGET).don : $(SOLARBINDIR)$/oovbaapi.rdb +$(CPPUMAKER) -O$(INCCOM)$/$(TARGET) -BUCR $(SOLARBINDIR)$/oovbaapi.rdb -X$(SOLARBINDIR)$/types.rdb && echo > $@ echo $@ + +ALLTAR : $(MISC)/dlgprov.component + +$(MISC)/dlgprov.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + dlgprov.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt dlgprov.component diff --git a/scripting/source/protocolhandler/exports.dxp b/scripting/source/protocolhandler/exports.dxp index 9630d7e067..f0e1c69934 100644 --- a/scripting/source/protocolhandler/exports.dxp +++ b/scripting/source/protocolhandler/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/scripting/source/protocolhandler/makefile.mk b/scripting/source/protocolhandler/makefile.mk index c782c1a188..71bcdfcda1 100644 --- a/scripting/source/protocolhandler/makefile.mk +++ b/scripting/source/protocolhandler/makefile.mk @@ -39,16 +39,16 @@ COMP1TYPELIST=$(TARGET) # ------------------------------------------------------------------ SLOFILES=\ - $(SLO)$/scripthandler.obj\ + $(SLO)$/scripthandler.obj\ SHL1TARGET= $(TARGET)$(DLLPOSTFIX) SHL1STDLIBS= \ $(SFXLIB) \ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(VCLLIB) \ - $(SALLIB) + $(CPPULIB) \ + $(CPPUHELPERLIB) \ + $(VCLLIB) \ + $(SALLIB) SHL1DEPN= SHL1IMPLIB= i$(TARGET) @@ -61,3 +61,11 @@ DEF1EXPORTFILE= exports.dxp # --- Targets ------------------------------------------------------ .INCLUDE : target.mk + +ALLTAR : $(MISC)/protocolhandler.component + +$(MISC)/protocolhandler.component .ERRREMOVE : \ + $(SOLARENV)/bin/createcomponent.xslt protocolhandler.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt protocolhandler.component diff --git a/scripting/source/protocolhandler/protocolhandler.component b/scripting/source/protocolhandler/protocolhandler.component new file mode 100644 index 0000000000..db177a896c --- /dev/null +++ b/scripting/source/protocolhandler/protocolhandler.component @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* 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. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.ScriptProtocolHandler"> + <service name="com.sun.star.frame.ProtocolHandler"/> + </implementation> +</component> diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx index b7bce7b9c3..b9496ff185 100644 --- a/scripting/source/protocolhandler/scripthandler.cxx +++ b/scripting/source/protocolhandler/scripthandler.cxx @@ -538,27 +538,6 @@ extern "C" *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; } - sal_Bool SAL_CALL component_writeInfo( void * pServiceManager , - void * pRegistryKey ) - { - (void)pServiceManager; - - Reference< css::registry::XRegistryKey > xKey( - reinterpret_cast< css::registry::XRegistryKey* >( pRegistryKey ) ) ; - - ::rtl::OUString aStr = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) ); - aStr += - ::scripting_protocolhandler::ScriptProtocolHandler::impl_getStaticImplementationName(); - - aStr += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" ) ); - Reference< css::registry::XRegistryKey > xNewKey = xKey->createKey( aStr ); - xNewKey->createKey( - ::rtl::OUString::createFromAscii( ::scripting_protocolhandler::MYSERVICENAME ) - ); - - return sal_True; - } - void* SAL_CALL component_getFactory( const sal_Char * pImplementationName , void * pServiceManager , void * pRegistryKey ) diff --git a/scripting/source/provider/ActiveMSPList.hxx b/scripting/source/provider/ActiveMSPList.hxx index fdc3ae4508..850d37e6b4 100644 --- a/scripting/source/provider/ActiveMSPList.hxx +++ b/scripting/source/provider/ActiveMSPList.hxx @@ -28,7 +28,7 @@ #ifndef _FRAMEWORK_SCRIPT_PROVIDER_OPENDOCUMENTLIST_HXX_ #define _FRAMEWORK_SCRIPT_PROVIDER_OPENDOCUMENTLIST_HXX_ -#include <hash_map> +#include <boost/unordered_map.hpp> #include <map> #include <osl/mutex.hxx> @@ -59,7 +59,7 @@ typedef ::std::map < css::uno::Reference< css::uno::XInterface > , ::comphelper::OInterfaceCompare< css::uno::XInterface > > ScriptComponent_map; -typedef ::std::hash_map< ::rtl::OUString, +typedef ::boost::unordered_map< ::rtl::OUString, css::uno::Reference< css::script::provider::XScriptProvider >, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > Msp_hash; diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx b/scripting/source/provider/BrowseNodeFactoryImpl.cxx index 1d49ede652..198a71a05f 100644 --- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx +++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx @@ -170,7 +170,7 @@ public: //typedef ::std::map< ::rtl::OUString, Reference< browse::XBrowseNode > > -typedef ::std::hash_map< ::rtl::OUString, Reference< browse::XBrowseNode >, +typedef ::boost::unordered_map< ::rtl::OUString, Reference< browse::XBrowseNode >, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > BrowseNodeAggregatorHash; typedef ::std::vector< ::rtl::OUString > vString; diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx index a6f029faf7..06f8446c54 100644 --- a/scripting/source/provider/MasterScriptProvider.cxx +++ b/scripting/source/provider/MasterScriptProvider.cxx @@ -982,42 +982,6 @@ extern "C" } /** - * This function creates an implementation section in the registry and another subkey - * - * for each supported service. - * @param pServiceManager the service manager - * @param pRegistryKey the registry key - */ - SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - lang::XMultiServiceFactory * pServiceManager, - registry::XRegistryKey * pRegistryKey ) - { - if (::cppu::component_writeInfoHelper( pServiceManager, pRegistryKey, - ::scripting_runtimemgr::s_entries )) - { - try - { - // MasterScriptProviderFactory Mangager singleton - registry::XRegistryKey * pKey = - reinterpret_cast< registry::XRegistryKey * >(pRegistryKey); - - Reference< registry::XRegistryKey >xKey = pKey->createKey( - OUSTR("com.sun.star.script.provider.MasterScriptProviderFactory/UNO/SINGLETONS/com.sun.star.script.provider.theMasterScriptProviderFactory")); - xKey->setStringValue( OUSTR("com.sun.star.script.provider.MasterScriptProviderFactory") ); - // BrowseNodeFactory Mangager singleton - xKey = pKey->createKey( - OUSTR("com.sun.star.script.browse.BrowseNodeFactory/UNO/SINGLETONS/com.sun.star.script.browse.theBrowseNodeFactory")); - xKey->setStringValue( OUSTR("com.sun.star.script.browse.BrowseNodeFactory") ); - return sal_True; - } - catch (Exception &) - { - } - } - return sal_False; - } - - /** * This function is called to get service factories for an implementation. * * @param pImplName name of implementation diff --git a/scripting/source/provider/ProviderCache.hxx b/scripting/source/provider/ProviderCache.hxx index 04bb50d2e2..a0c729ddba 100644 --- a/scripting/source/provider/ProviderCache.hxx +++ b/scripting/source/provider/ProviderCache.hxx @@ -29,7 +29,7 @@ #ifndef _FRAMEWORK_SCRIPT_PROVIDER_PROVIDERCACHE_HXX_ #define _FRAMEWORK_SCRIPT_PROVIDER_PROVIDERCACHE_HXX_ -#include <hash_map> +#include <boost/unordered_map.hpp> #include <osl/mutex.hxx> #include <rtl/ustring.hxx> #include <cppuhelper/implbase1.hxx> @@ -58,7 +58,7 @@ struct ProviderDetails css::uno::Reference< css::lang::XSingleComponentFactory > factory; css::uno::Reference< css::script::provider::XScriptProvider > provider; }; -typedef ::std::hash_map < ::rtl::OUString, ProviderDetails , ::rtl::OUStringHash, +typedef ::boost::unordered_map < ::rtl::OUString, ProviderDetails , ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > ProviderDetails_hash; diff --git a/scripting/source/provider/exports.dxp b/scripting/source/provider/exports.dxp index 9630d7e067..f0e1c69934 100644 --- a/scripting/source/provider/exports.dxp +++ b/scripting/source/provider/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/scripting/source/provider/makefile.mk b/scripting/source/provider/makefile.mk index a63ae078d8..64901bf43d 100644 --- a/scripting/source/provider/makefile.mk +++ b/scripting/source/provider/makefile.mk @@ -40,12 +40,12 @@ COMP1TYPELIST=$(TARGET) # ------------------------------------------------------------------ SLOFILES=\ - $(SLO)$/MasterScriptProvider.obj\ - $(SLO)$/URIHelper.obj\ - $(SLO)$/ActiveMSPList.obj\ - $(SLO)$/ProviderCache.obj\ - $(SLO)$/MasterScriptProviderFactory.obj\ - $(SLO)$/BrowseNodeFactoryImpl.obj\ + $(SLO)$/MasterScriptProvider.obj\ + $(SLO)$/URIHelper.obj\ + $(SLO)$/ActiveMSPList.obj\ + $(SLO)$/ProviderCache.obj\ + $(SLO)$/MasterScriptProviderFactory.obj\ + $(SLO)$/BrowseNodeFactoryImpl.obj\ # --- Targets ------------------------------------------------------ diff --git a/scripting/source/pyprov/mailmerge.component b/scripting/source/pyprov/mailmerge.component new file mode 100644 index 0000000000..dd6a65e9a1 --- /dev/null +++ b/scripting/source/pyprov/mailmerge.component @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* 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. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.Python" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="org.openoffice.pyuno.MailMessage"> + <service name="com.sun.star.mail.MailMessage"/> + </implementation> + <implementation name="org.openoffice.pyuno.MailServiceProvider"> + <service name="com.sun.star.mail.MailServiceProvider"/> + </implementation> +</component> diff --git a/scripting/source/pyprov/makefile.mk b/scripting/source/pyprov/makefile.mk index 2a63d9f25d..ebfa7324e8 100644 --- a/scripting/source/pyprov/makefile.mk +++ b/scripting/source/pyprov/makefile.mk @@ -39,8 +39,9 @@ TARGET=pyprov # --- Targets ------------------------------------------------------ ALL : ALLTAR \ + $(DLLDEST)$/pythonscript.py \ $(DLLDEST)$/officehelper.py \ - $(DLLDEST)$/mailmerge.py + $(DLLDEST)$/mailmerge.py $(DLLDEST)$/%.py: %.py cp $? $@ @@ -62,3 +63,17 @@ COMPONENT_FILES=$(EXTENSIONDIR)$/pythonscript.py .INCLUDE : target.mk .ENDIF + +ALLTAR : $(MISC)/mailmerge.component $(MISC)/pythonscript.component + +$(MISC)/mailmerge.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + mailmerge.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_PYTHON)mailmerge' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt mailmerge.component + +$(MISC)/pythonscript.component .ERRREMOVE : \ + $(SOLARENV)/bin/createcomponent.xslt pythonscript.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_PYTHON)pythonscript' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt pythonscript.component diff --git a/scripting/source/pyprov/pythonscript.component b/scripting/source/pyprov/pythonscript.component new file mode 100644 index 0000000000..08f8950972 --- /dev/null +++ b/scripting/source/pyprov/pythonscript.component @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* 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. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.Python" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="org.openoffice.pyuno.LanguageScriptProviderForPython"> + <service name="com.sun.star.script.provider.LanguageScriptProvider"/> + <service name="com.sun.star.script.provider.ScriptProviderForPython"/> + </implementation> +</component> diff --git a/scripting/source/runtimemgr/ScriptRuntimeManager.cxx b/scripting/source/runtimemgr/ScriptRuntimeManager.cxx index 613d5edc20..43d19c624f 100644 --- a/scripting/source/runtimemgr/ScriptRuntimeManager.cxx +++ b/scripting/source/runtimemgr/ScriptRuntimeManager.cxx @@ -485,68 +485,6 @@ extern "C" } /** - * This function creates an implementation section in the registry and another subkey - * - * for each supported service. - * @param pServiceManager the service manager - * @param pRegistryKey the registry key - */ - sal_Bool SAL_CALL component_writeInfo( lang::XMultiServiceFactory * pServiceManager, - registry::XRegistryKey * pRegistryKey ) - { - if (::cppu::component_writeInfoHelper( pServiceManager, pRegistryKey, - ::scripting_runtimemgr::s_entries )) - { - try - { - // register RuntimeManager singleton - - registry::XRegistryKey * pKey = - reinterpret_cast< registry::XRegistryKey * >(pRegistryKey); - - Reference< registry::XRegistryKey > xKey( - pKey->createKey( - - OUSTR("drafts.com.sun.star.script.framework.runtime.ScriptRuntimeManager/UNO/SINGLETONS/drafts.com.sun.star.script.framework.runtime.theScriptRuntimeManager"))); - xKey->setStringValue( OUSTR("drafts.com.sun.star.script.framework.runtime.ScriptRuntimeManager") ); - - // ScriptStorage Mangaer singleton - - xKey = pKey->createKey( - OUSTR("drafts.com.sun.star.script.framework.storage.ScriptStorageManager/UNO/SINGLETONS/drafts.com.sun.star.script.framework.storage.theScriptStorageManager")); - xKey->setStringValue( OUSTR("drafts.com.sun.star.script.framework.storage.ScriptStorageManager") ); - // Singleton entries are not handled by the setup process - // below is the only alternative at the momement which - // is to programmatically do this. - - // "Java" Runtime singleton entry - - xKey = pKey->createKey( - OUSTR("com.sun.star.scripting.runtime.java.ScriptRuntimeForJava$_ScriptRuntimeForJava/UNO/SINGLETONS/drafts.com.sun.star.script.framework.runtime.theScriptRuntimeForJava")); - xKey->setStringValue( OUSTR("drafts.com.sun.star.script.framework.runtime.ScriptRuntimeForJava") ); - - // "JavaScript" Runtime singleton entry - - xKey = pKey->createKey( - OUSTR("com.sun.star.scripting.runtime.javascript.ScriptRuntimeForJavaScript$_ScriptRuntimeForJavaScript/UNO/SINGLETONS/drafts.com.sun.star.script.framework.runtime.theScriptRuntimeForJavaScript")); - xKey->setStringValue( OUSTR("drafts.com.sun.star.script.framework.runtime.ScriptRuntimeForJavaScript") ); - - // "BeanShell" Runtime singleton entry - - xKey = pKey->createKey( - OUSTR("com.sun.star.scripting.runtime.beanshell.ScriptRuntimeForBeanShell$_ScriptRuntimeForBeanShell/UNO/SINGLETONS/drafts.com.sun.star.script.framework.runtime.theScriptRuntimeForBeanShell")); - xKey->setStringValue( OUSTR("drafts.com.sun.star.script.framework.runtime.ScriptRuntimeForBeanShell") ); - - return sal_True; - } - catch (Exception & exc) - { - } - } - return sal_False; - } - - /** * This function is called to get service factories for an implementation. * * @param pImplName name of implementation diff --git a/scripting/source/runtimemgr/exports.dxp b/scripting/source/runtimemgr/exports.dxp index 9630d7e067..f0e1c69934 100644 --- a/scripting/source/runtimemgr/exports.dxp +++ b/scripting/source/runtimemgr/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/scripting/source/runtimemgr/makefile.mk b/scripting/source/runtimemgr/makefile.mk index d802fd240a..a1411b61f0 100644 --- a/scripting/source/runtimemgr/makefile.mk +++ b/scripting/source/runtimemgr/makefile.mk @@ -39,8 +39,8 @@ COMP1TYPELIST=$(TARGET) # ------------------------------------------------------------------ SLOFILES=\ - $(SLO)$/ScriptNameResolverImpl.obj\ - $(SLO)$/ScriptRuntimeManager.obj \ + $(SLO)$/ScriptNameResolverImpl.obj\ + $(SLO)$/ScriptRuntimeManager.obj \ # --- Targets ------------------------------------------------------ diff --git a/scripting/source/storage/exports.dxp b/scripting/source/storage/exports.dxp index 9630d7e067..f0e1c69934 100644 --- a/scripting/source/storage/exports.dxp +++ b/scripting/source/storage/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/scripting/source/storage/makefile.mk b/scripting/source/storage/makefile.mk index 7ba35edf06..5bd0848b2a 100644 --- a/scripting/source/storage/makefile.mk +++ b/scripting/source/storage/makefile.mk @@ -39,14 +39,14 @@ COMP1TYPELIST=$(TARGET) # ------------------------------------------------------------------ SLOFILES=\ - $(SLO)$/ScriptURI.obj\ - $(SLO)$/ScriptStorage.obj\ - $(SLO)$/ScriptInfo.obj\ - $(SLO)$/ScriptMetadataImporter.obj\ - $(SLO)$/ScriptElement.obj\ - $(SLO)$/XMLElement.obj\ - $(SLO)$/ScriptStorageManager.obj\ - $(SLO)$/ScriptSecurityManager.obj\ + $(SLO)$/ScriptURI.obj\ + $(SLO)$/ScriptStorage.obj\ + $(SLO)$/ScriptInfo.obj\ + $(SLO)$/ScriptMetadataImporter.obj\ + $(SLO)$/ScriptElement.obj\ + $(SLO)$/XMLElement.obj\ + $(SLO)$/ScriptStorageManager.obj\ + $(SLO)$/ScriptSecurityManager.obj\ # --- Targets ------------------------------------------------------ diff --git a/scripting/source/stringresource/makefile.mk b/scripting/source/stringresource/makefile.mk index dfc2d19791..c50eb66181 100644 --- a/scripting/source/stringresource/makefile.mk +++ b/scripting/source/stringresource/makefile.mk @@ -39,7 +39,7 @@ DLLPRE = # ------------------------------------------------------------------ SLOFILES= \ - $(SLO)$/stringresource.obj \ + $(SLO)$/stringresource.obj \ SHL1TARGET= $(TARGET)$(DLLPOSTFIX).uno SHL1IMPLIB= i$(TARGET) @@ -50,9 +50,9 @@ DEF1NAME=$(SHL1TARGET) SHL1STDLIBS= \ $(TOOLSLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) + $(CPPUHELPERLIB) \ + $(CPPULIB) \ + $(SALLIB) SHL1DEPN= SHL1LIBS=$(SLB)$/$(TARGET).lib @@ -60,3 +60,11 @@ SHL1LIBS=$(SLB)$/$(TARGET).lib # --- Targets ------------------------------------------------------ .INCLUDE : target.mk + +ALLTAR : $(MISC)/stringresource.component + +$(MISC)/stringresource.component .ERRREMOVE : \ + $(SOLARENV)/bin/createcomponent.xslt stringresource.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt stringresource.component diff --git a/scripting/source/stringresource/stringresource.component b/scripting/source/stringresource/stringresource.component new file mode 100644 index 0000000000..6d64d95539 --- /dev/null +++ b/scripting/source/stringresource/stringresource.component @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* 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. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.scripting.StringResource"> + <service name="com.sun.star.resource.StringResource"/> + </implementation> + <implementation name="com.sun.star.comp.scripting.StringResourceWithLocation"> + <service name="com.sun.star.resource.StringResourceWithLocation"/> + </implementation> + <implementation name="com.sun.star.comp.scripting.StringResourceWithStorage"> + <service name="com.sun.star.resource.StringResourceWithStorage"/> + </implementation> +</component> diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx index df355d5520..ec6f46cb29 100644 --- a/scripting/source/stringresource/stringresource.cxx +++ b/scripting/source/stringresource/stringresource.cxx @@ -3079,13 +3079,6 @@ extern "C" *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - sal_Bool SAL_CALL component_writeInfo( - lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) - { - return ::cppu::component_writeInfoHelper( - pServiceManager, pRegistryKey, ::stringresource::s_component_entries ); - } - void * SAL_CALL component_getFactory( const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx index 881b9afda0..500e74d579 100644 --- a/scripting/source/vbaevents/eventhelper.cxx +++ b/scripting/source/vbaevents/eventhelper.cxx @@ -47,7 +47,6 @@ #include <com/sun/star/util/XCloseListener.hpp> #include <com/sun/star/util/XCloseBroadcaster.hpp> - #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/script/XLibraryContainer.hpp> @@ -70,6 +69,7 @@ #include <com/sun/star/awt/XListBox.hpp> #include "vbamsformreturntypes.hxx" +#include <msforms/ReturnInteger.hpp> #include <sfx2/objsh.hxx> #include <basic/sbstar.hxx> @@ -79,9 +79,6 @@ #include <basic/sbx.hxx> #include <filter/msfilter/msvbahelper.hxx> - - - // for debug #include <comphelper/anytostring.hxx> @@ -319,7 +316,7 @@ static TranslatePropMap aTranslatePropMap_Impl[] = { MAP_CHAR_LEN("keyReleased"), { MAP_CHAR_LEN("_KeyUp"), ooKeyPressedToVBAKeyUpDown, ApproveAll, NULL } }, // mouseReleased ooo event - { MAP_CHAR_LEN("mouseReleased"), { MAP_CHAR_LEN("_Click"), ooMouseEvtToVBAMouseEvt, ApproveType, (void*)(&fixedTextList) } }, + { MAP_CHAR_LEN("mouseReleased"), { MAP_CHAR_LEN("_Click"), ooMouseEvtToVBAMouseEvt, ApproveType, (void*)(&fixedTextList) } }, // to support VBA Label_Click event { MAP_CHAR_LEN("mouseReleased"), { MAP_CHAR_LEN("_MouseUp"), ooMouseEvtToVBAMouseEvt, ApproveAll, NULL } }, // mousePressed ooo event @@ -363,7 +360,6 @@ EventInfoHash& getEventTransInfo() return eventTransInfo; } - // Helper class class ScriptEventHelper @@ -464,7 +460,6 @@ ScriptEventHelper::getEventListeners() eventMethods.push_back( sEventMethod ); } } - } } @@ -589,6 +584,7 @@ ReadOnlyEventsNameContainer::getElementNames( ) throw (RuntimeException) } sal_Bool SAL_CALL +>>>>>>> stage/premerge/dev300_m98 ReadOnlyEventsNameContainer::hasByName( const ::rtl::OUString& aName ) throw (RuntimeException) { EventSupplierHash::const_iterator it = m_hEvents.find( aName ); @@ -837,8 +833,7 @@ EventListener::getPropertySetInfo( ) throw (RuntimeException) return xInfo; } - -//decide if the control should execute the event +// decide if the control should execute the event bool ApproveAll(const ScriptEvent&, void* ) { return true; @@ -911,9 +906,6 @@ bool DenyKeys(const ScriptEvent& evt, void* /*pPara*/) } } - - - // EventListener void @@ -1030,7 +1022,6 @@ EventListener::firing_Impl(const ScriptEvent& evt, Any* pRet ) throw(RuntimeExce ooo::vba::VBAMacroResolvedInfo aMacroResolvedInfo = ooo::vba::resolveVBAMacro( mpShell, sToResolve ); if ( aMacroResolvedInfo.IsResolved() ) { - if (! txInfo->ApproveRule(evt, txInfo->pPara) ) { continue; @@ -1086,7 +1077,6 @@ public: virtual Reference< XScriptEventsSupplier > SAL_CALL getEventSupplier( const Reference< XInterface >& xControl, const rtl::OUString& sCodeName ) throw (::com::sun::star::uno::RuntimeException); private: Reference< XComponentContext > m_xContext; - }; VBAToOOEventDescGen::VBAToOOEventDescGen( const Reference< XComponentContext >& rxContext ):m_xContext( rxContext ) {} diff --git a/scripting/source/vbaevents/service.cxx b/scripting/source/vbaevents/service.cxx index 3a706bd441..6a288ab30f 100644 --- a/scripting/source/vbaevents/service.cxx +++ b/scripting/source/vbaevents/service.cxx @@ -108,16 +108,6 @@ extern "C" *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) - { - OSL_TRACE("In component_writeInfo"); - if ( ::cppu::component_writeInfoHelper( - pServiceManager, pRegistryKey, s_component_entries ) ) - return sal_True; - return sal_False; - } - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) @@ -127,5 +117,4 @@ extern "C" pImplName, pServiceManager, pRegistryKey, s_component_entries ); } } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/scripting/source/vbaevents/vbaevents.component b/scripting/source/vbaevents/vbaevents.component new file mode 100644 index 0000000000..e8cbf3d88f --- /dev/null +++ b/scripting/source/vbaevents/vbaevents.component @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* 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. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="ooo.vba.EventListener"> + <service name="ooo.vba.EventListener"/> + </implementation> + <implementation name="ooo.vba.VBAToOOEventDesc"> + <service name="ooo.vba.VBAToOOEventDesc"/> + </implementation> +</component> |