offapi/com/sun/star/accessibility/MSAAService.idl | 10 +---- offapi/com/sun/star/accessibility/XMSAAService.idl | 5 +- vcl/source/app/svdata.cxx | 17 ++++++-- winaccessibility/source/service/AccObject.cxx | 5 +- winaccessibility/source/service/exports.dxp | 2 - winaccessibility/source/service/msaaservice_impl.cxx | 36 +------------------ 6 files changed, 22 insertions(+), 53 deletions(-)
New commits: commit c26850a57da72a9fbd55a7232d3a6f4f96f8846e Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Nov 21 17:05:25 2013 +0100 Remove unused exports.dxp file Change-Id: Ic4313d9d1caea6448749c5c010ea9a034a75a907 (cherry picked from commit 36223cbe8b9a80827a8ec49c031540ea62c23c6d) diff --git a/winaccessibility/source/service/exports.dxp b/winaccessibility/source/service/exports.dxp deleted file mode 100644 index f0e1c69..0000000 --- a/winaccessibility/source/service/exports.dxp +++ /dev/null @@ -1,2 +0,0 @@ -component_getImplementationEnvironment -component_getFactory commit 0695d801b746b8e306b423aab49566c6361f7264 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Nov 21 17:03:52 2013 +0100 No need for default component_getImplementationEnvironment function any more Change-Id: Ia03e2797d80429284964987d07ebc033346a7ac0 (cherry picked from commit 1917dacaf2f3e29caadcac09162fe9b2158a45d1) diff --git a/winaccessibility/source/service/msaaservice_impl.cxx b/winaccessibility/source/service/msaaservice_impl.cxx index 578139b..e5e1231 100644 --- a/winaccessibility/source/service/msaaservice_impl.cxx +++ b/winaccessibility/source/service/msaaservice_impl.cxx @@ -328,11 +328,6 @@ static struct ::cppu::ImplementationEntry s_component_entries [] = extern "C" { - SAL_DLLPUBLIC_EXPORT void SAL_CALL iacc2_component_getImplementationEnvironment( - sal_Char const ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) - { - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; - } SAL_DLLPUBLIC_EXPORT void * SAL_CALL iacc2_component_getFactory( sal_Char const * implName, lang::XMultiServiceFactory * xMgr, registry::XRegistryKey * xRegistry ) commit 5faf3bdfdae1be4e9dbbed762f9a72ab195c4a20 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Nov 21 16:53:04 2013 +0100 Improve debug output Change-Id: If09b4c0452d2e436be146a789edf85b1087d74e2 (cherry picked from commit d7791c933d8f7545b2535fe1a6d706008d2f9605) diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx index db75660..b5c65b3 100644 --- a/winaccessibility/source/service/AccObject.cxx +++ b/winaccessibility/source/service/AccObject.cxx @@ -248,8 +248,9 @@ sal_Bool AccObject::ImplInitializeCreateObj() HRESULT hr = CoCreateInstance( CLSID_MAccessible, NULL, CLSCTX_ALL, IID_IMAccessible, (void **)&m_pIMAcc); - if( !m_pIMAcc ) - SAL_WARN( "iacc2", "Failed to create IAccessible2 instance" ); + SAL_WARN_IF( + m_pIMAcc == 0, "iacc2", + "Failed to create IAccessible2 instance: 0x" << std::hex << hr); DeactivateActContext(); if ( S_OK != hr ) commit 54bab3c6c1d225922d25420e44e7a915daeadce4 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Nov 21 16:50:30 2013 +0100 Simplify css.accessibility.MSAAService and corresponding XMSAAService Change-Id: I96c69e871aa7b20cdac9751a64faa5e436f31a1f (cherry picked from commit f3f4d9ec0f0eaa1aebdfebe831021a9d96e63f58) diff --git a/offapi/com/sun/star/accessibility/MSAAService.idl b/offapi/com/sun/star/accessibility/MSAAService.idl index 3e8840a..f71854b 100644 --- a/offapi/com/sun/star/accessibility/MSAAService.idl +++ b/offapi/com/sun/star/accessibility/MSAAService.idl @@ -22,17 +22,11 @@ #ifndef __com_sun_star_accessibility_Accessible_idl__ #define __com_sun_star_accessibility_Accessible_idl__ -#include <com/sun/star/uno/XInterface.idl> -#include <com/sun/star/lang/XInitialization.idl> -#include "XMSAAService.idl" +#include <com/sun/star/accessibility/XMSAAService.idl> module com { module sun { module star { module accessibility { -service MSAAService -{ - interface XMSAAService; - interface com::sun::star::lang::XInitialization; -}; +service MSAAService: XMSAAService; }; }; }; }; diff --git a/offapi/com/sun/star/accessibility/XMSAAService.idl b/offapi/com/sun/star/accessibility/XMSAAService.idl index 3b9773e..d091dec 100644 --- a/offapi/com/sun/star/accessibility/XMSAAService.idl +++ b/offapi/com/sun/star/accessibility/XMSAAService.idl @@ -22,15 +22,14 @@ #ifndef __com_sun_star_accessibility_XMSAASERVICE_idl__ #define __com_sun_star_accessibility_XMSAASERVICE_idl__ -#ifndef __com_sun_star_uno_XInterface_idl__ -#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/lang/XComponent.idl> #endif module com { module sun { module star { module accessibility { /** The interface must be implemented for a server that can support MSAA com objects and send win32 accessible events */ -interface XMSAAService : ::com::sun::star::uno::XInterface +interface XMSAAService : ::com::sun::star::lang::XComponent { /** Return com object pointer. diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx index cb24f02..97116d4 100644 --- a/vcl/source/app/svdata.cxx +++ b/vcl/source/app/svdata.cxx @@ -46,6 +46,7 @@ #include "svids.hrc" #include "com/sun/star/accessibility/AccessBridge.hpp" +#include "com/sun/star/accessibility/MSAAService.hpp" #include "com/sun/star/awt/XExtendedToolkit.hpp" #include "com/sun/star/java/JavaNotConfiguredException.hpp" #include "com/sun/star/java/JavaVMCreationFailureException.hpp" @@ -328,11 +329,17 @@ bool ImplInitAccessBridge(bool bAllowCancel, bool &rCancelled) if ( bTryIAcc2 ) // Windows only really { - // FIXME: convert to service ... pSVData->mxAccessBridge = css::accessibility::MSAAService::create( xContext ); - pSVData->mxAccessBridge = Reference< XComponent >( xContext->getServiceManager()->createInstanceWithContext( "com.sun.star.accessibility.MSAAService", xContext ), UNO_QUERY ); - - SAL_INFO( "vcl", "IAccessible2 bridge is: " << (int)(pSVData->mxAccessBridge.is()) ); - return pSVData->mxAccessBridge.is(); + try { + pSVData->mxAccessBridge + = css::accessibility::MSAAService::create(xContext); + SAL_INFO("vcl", "got IAccessible2 bridge"); + return true; + } catch (css::uno::DeploymentException & e) { + SAL_INFO( + "vcl", + "got no IAccessible2 bridge, \"" << e.Message + << "\", falling back to java"); + } } else SAL_INFO( "vcl", "IAccessible2 disabled, falling back to java" ); diff --git a/winaccessibility/source/service/msaaservice_impl.cxx b/winaccessibility/source/service/msaaservice_impl.cxx index ff3b017..578139b 100644 --- a/winaccessibility/source/service/msaaservice_impl.cxx +++ b/winaccessibility/source/service/msaaservice_impl.cxx @@ -18,13 +18,11 @@ */ #include <rtl/ref.hxx> -#include <cppuhelper/implbase4.hxx> +#include <cppuhelper/implbase2.hxx> #include <cppuhelper/factory.hxx> #include <cppuhelper/implementationentry.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/lang/XInitialization.hpp> -#include <com/sun/star/lang/IllegalArgumentException.hpp> #include <com/sun/star/accessibility/XMSAAService.hpp> #include <com/sun/star/accessibility/AccessibleRole.hpp> @@ -60,21 +58,16 @@ static OUString getImplementationName_MSAAServiceImpl() return OUString( "com.sun.star.accessibility.my_sc_implementation.MSAAService" ); } -class MSAAServiceImpl : public ::cppu::WeakImplHelper4< - XMSAAService, lang::XServiceInfo, - lang::XInitialization, lang::XComponent > +class MSAAServiceImpl : public ::cppu::WeakImplHelper2< + XMSAAService, lang::XServiceInfo > { private: rtl::Reference<AccTopWindowListener> m_pTopWindowListener; - OUString m_arg; public: MSAAServiceImpl (); virtual ~MSAAServiceImpl(); - // XInitialization will be called upon createInstanceWithArguments[AndContext]() - virtual void SAL_CALL initialize( Sequence< Any > const & args ) throw (Exception); - // XComponent - as used by VCL to lifecycle manage this bridge. virtual void SAL_CALL dispose(); virtual void SAL_CALL addEventListener( const ::css::uno::Reference< ::css::lang::XEventListener >& ) { /* dummy */ } @@ -91,24 +84,6 @@ public: virtual Sequence< OUString > SAL_CALL getSupportedServiceNames(); }; -void MSAAServiceImpl::initialize( Sequence< Any > const & args ) throw (Exception) -{ - if (1 != args.getLength()) - { - throw lang::IllegalArgumentException( - OUString( RTL_CONSTASCII_USTRINGPARAM("give a string instanciating this component!") ), - (::cppu::OWeakObject *)this, // resolve to XInterface reference - 0 ); // argument pos - } - if (! (args[ 0 ] >>= m_arg)) - { - throw lang::IllegalArgumentException( - OUString( RTL_CONSTASCII_USTRINGPARAM("no string given as argument!") ), - (::cppu::OWeakObject *)this, // resolve to XInterface reference - 0 ); // argument pos - } -} - /** * Implemention of getAccObjectPtr. * @param _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits