summaryrefslogtreecommitdiff
path: root/vcl/win/source/window/salframe.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/win/source/window/salframe.cxx')
-rw-r--r--vcl/win/source/window/salframe.cxx58
1 files changed, 57 insertions, 1 deletions
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 87e5c1a2ec92..8ee2cae0a3c4 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -77,6 +77,12 @@ using ::std::max;
#include <com/sun/star/uno/Exception.hpp>
+#include <oleacc.h>
+#include <com/sun/star/accessibility/XMSAAService.hpp>
+#ifndef WM_GETOBJECT // TESTME does this ever happen ?
+# define WM_GETOBJECT 0x003D
+#endif
+
#include <time.h>
#if defined ( __MINGW32__ )
@@ -5178,7 +5184,7 @@ static sal_Bool ImplHandleIMEStartComposition( HWND hWnd )
// -----------------------------------------------------------------------
static sal_Bool ImplHandleIMECompositionInput( WinSalFrame* pFrame,
- HIMC hIMC, LPARAM lParam )
+ HIMC hIMC, LPARAM lParam )
{
sal_Bool bDef = TRUE;
@@ -5478,6 +5484,46 @@ static void ImplHandleIMENotify( HWND hWnd, WPARAM wParam )
// -----------------------------------------------------------------------
+static bool ImplHandleGetObject( HWND hWnd, LPARAM lParam, WPARAM wParam, long &nRet )
+{
+ // IA2 should be enabled automatically
+ AllSettings aSettings = Application::GetSettings();
+ MiscSettings aMisc = aSettings.GetMiscSettings();
+ aMisc.SetEnableATToolSupport( sal_True );
+ aSettings.SetMiscSettings( aMisc );
+ Application::SetSettings( aSettings );
+
+ 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() )
+ {
+ bool bCancelled = false;
+ InitAccessBridge( false, bCancelled );
+ if( bCancelled )
+ return false;
+ }
+
+ 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 = xMSAA->getAccObjectPtr( (long)hWnd, lParam, wParam );
+ if( nRet != 0 )
+ return true;
+ }
+ }
+ return false;
+}
+
+// -----------------------------------------------------------------------
+
static LRESULT ImplHandleIMEReconvertString( HWND hWnd, LPARAM lParam )
{
WinSalFrame* pFrame = GetWindowPtr( hWnd );
@@ -6005,6 +6051,16 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP
case WM_IME_NOTIFY:
ImplHandleIMENotify( hWnd, wParam );
break;
+
+ case WM_GETOBJECT:
+ long nRet;
+ if ( ImplHandleGetObject( hWnd, lParam, wParam, nRet ) )
+ {
+ rDef = false;
+ return (HRESULT) nRet;
+ }
+ break;
+
case WM_APPCOMMAND:
if( ImplHandleAppCommand( hWnd, lParam ) )
{