vcl/source/app/svdata.cxx | 3 + vcl/source/window/window.cxx | 4 +- vcl/win/source/window/salframe.cxx | 13 ++++---- winaccessibility/source/service/msaaservice_impl.cxx | 21 ++++++------- winaccessibility/source/service/winaccessibility.component | 2 - 5 files changed, 24 insertions(+), 19 deletions(-)
New commits: commit dd327cc57ee4e718efe9b1657f22975768a624bf Author: Michael Meeks <michael.me...@collabora.com> Date: Mon Nov 18 18:02:24 2013 +0000 uia: get component namespacing right. Change-Id: Iaa985703507657c2800d8912b1d46db321aae7f1 diff --git a/winaccessibility/source/service/msaaservice_impl.cxx b/winaccessibility/source/service/msaaservice_impl.cxx index b570446..99b6728 100755 --- a/winaccessibility/source/service/msaaservice_impl.cxx +++ b/winaccessibility/source/service/msaaservice_impl.cxx @@ -373,12 +373,12 @@ static struct ::cppu::ImplementationEntry s_component_entries [] = extern "C" { - SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( + 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 component_getFactory( + SAL_DLLPUBLIC_EXPORT void * SAL_CALL iacc2_component_getFactory( sal_Char const * implName, lang::XMultiServiceFactory * xMgr, registry::XRegistryKey * xRegistry ) { diff --git a/winaccessibility/source/service/winaccessibility.component b/winaccessibility/source/service/winaccessibility.component index 3a73858..71ea6de 100644 --- a/winaccessibility/source/service/winaccessibility.component +++ b/winaccessibility/source/service/winaccessibility.component @@ -16,7 +16,7 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . --> -<component loader="com.sun.star.loader.SharedLibrary" +<component loader="com.sun.star.loader.SharedLibrary" prefix="iacc2" xmlns="http://openoffice.org/2010/uno-components"> <implementation name="com.sun.star.accessibility.my_sc_implementation.MSAAService"> <service name="com.sun.star.accessibility.MSAAService"/> commit b5ace73de803b30b8fa585f0d7b164fc38da2ac2 Author: Michael Meeks <michael.me...@suse.com> Date: Mon Nov 18 18:30:00 2013 +0000 fix silly compile issues. Change-Id: I6af3f6f894bb04ddd76635b5a68def207d078256 diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx index 072aa9e..521b07c 100644 --- a/vcl/source/app/svdata.cxx +++ b/vcl/source/app/svdata.cxx @@ -324,7 +324,8 @@ bool ImplInitAccessBridge(bool bAllowCancel, bool &rCancelled) // Windows only but safe here if ( !getenv ("SAL_DISABLE_IACCESSIBLE2") ) { - pSVData->mxAccessBridge = css::accessibility::MSAAService::create( xContext ); + // 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 ); return pSVData->mxAccessBridge.is(); } diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index d4b8ebb..90a15d9 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -8851,7 +8851,7 @@ sal_uInt16 Window::getDefaultAccessibleRole() const case WINDOW_FIXEDTEXT: nRole = accessibility::AccessibleRole::LABEL; break; case WINDOW_FIXEDLINE: - if( GetText().Len() > 0 ) + if( !GetText().isEmpty() ) nRole = accessibility::AccessibleRole::LABEL; else nRole = accessibility::AccessibleRole::SEPARATOR; @@ -8938,7 +8938,7 @@ void Window::SetAccessibleName( const OUString& rName ) if ( !mpWindowImpl->mpAccessibleInfos ) mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos; - String oldName = GetAccessibleName(); + OUString oldName = GetAccessibleName(); delete mpWindowImpl->mpAccessibleInfos->pAccessibleName; mpWindowImpl->mpAccessibleInfos->pAccessibleName = new OUString( rName ); diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index 5a2149b..8ee2cae 100644 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -5484,7 +5484,7 @@ static void ImplHandleIMENotify( HWND hWnd, WPARAM wParam ) // ----------------------------------------------------------------------- -static bool ImplHandleIMENotify( HWND hWnd, LPARAM lParam, WPARAM wParam, long &nRet ) +static bool ImplHandleGetObject( HWND hWnd, LPARAM lParam, WPARAM wParam, long &nRet ) { // IA2 should be enabled automatically AllSettings aSettings = Application::GetSettings(); @@ -5496,22 +5496,25 @@ static bool ImplHandleIMENotify( HWND hWnd, LPARAM lParam, WPARAM wParam, long & if (!Application::GetSettings().GetMiscSettings().GetEnableATToolSupport()) return false; // locked down somehow ? + ImplSVData* pSVData = ImplGetSVData(); + // Make sure to launch Accessibiliity only the following criterias are satisfied // to avoid RFT interrupts regular accessibility processing if ( !pSVData->mxAccessBridge.is() ) { - sal_Bool bCancelled; - InitAccessBridge(sal_False,bCancelled); + bool bCancelled = false; + InitAccessBridge( false, bCancelled ); if( bCancelled ) return false; } - if ( !pSVData->mxAccessBridge.is() ) + uno::Reference< accessibility::XMSAAService > xMSAA( pSVData->mxAccessBridge, uno::UNO_QUERY ); + if ( xMSAA.is() ) { // mhOnSetTitleWnd not set to reasonable value anywhere... if ( lParam == OBJID_CLIENT ) { - nRet = g_acc_manager1->getAccObjectPtr( (long)hWnd, lParam, wParam ); + nRet = xMSAA->getAccObjectPtr( (long)hWnd, lParam, wParam ); if( nRet != 0 ) return true; } diff --git a/winaccessibility/source/service/msaaservice_impl.cxx b/winaccessibility/source/service/msaaservice_impl.cxx index e7a68a9..b570446 100755 --- a/winaccessibility/source/service/msaaservice_impl.cxx +++ b/winaccessibility/source/service/msaaservice_impl.cxx @@ -25,11 +25,14 @@ #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> #include <com/sun/star/awt/XExtendedToolkit.hpp> #include <vcl/svapp.hxx> #include <vcl/window.hxx> +#include <windows.h> + using namespace ::rtl; // for OUString using namespace ::com::sun::star; // for odk interfaces using namespace ::com::sun::star::uno; // for basic types @@ -37,8 +40,6 @@ using namespace ::com::sun::star::accessibility; using namespace ::com::sun::star::awt; -typedef sal_Int32 HWND; - #include "AccTopWindowListener.hxx" #include "g_msacc.hxx" @@ -193,7 +194,7 @@ Sequence< OUString > MSAAServiceImpl::getSupportedServiceNames() throw (RuntimeE return getSupportedServiceNames_MSAAServiceImpl(); } -void AccessBridgehandleExistingWindow(const Reference<MSAAServiceImpl> &xAccMgr, +void AccessBridgehandleExistingWindow(const Reference< XMSAAService > &xAccMgr, Window * pWindow, bool bShow) { if ( pWindow ) @@ -255,7 +256,7 @@ void AccessBridgehandleExistingWindow(const Reference<MSAAServiceImpl> &xAccMgr, /* * Setup and notify the OS of Accessible peers for all existing windows. */ -void AccessBridgeupdateOldTopWindows( const Reference<MSAAServiceImpl> &xAccMgr ) +void AccessBridgeUpdateOldTopWindows( const Reference< XMSAAService > &xAccMgr ) { sal_uInt16 nTopWindowCount = (sal_uInt16)Application::GetTopWindowCount(); @@ -305,14 +306,14 @@ Reference< XInterface > SAL_CALL create_MSAAServiceImpl( Reference< XComponentCo if ( !HasAtHook() ) { SAL_INFO("iacc2", "Apparently no running AT -> not enabling IAccessible2 integration"); - return Reference< XMSAAService > p(); + return Reference< XMSAAService >(); } - Reference< XMSAAService > p( new MSAAServiceImpl() ); + Reference< XMSAAService > xAccMgr( new MSAAServiceImpl() ); - AccessBridgeupdateOldTopWindows(p); + AccessBridgeUpdateOldTopWindows( xAccMgr ); - return p; + return xAccMgr; } /** _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits