Kaydet (Commit) d9f425e8 authored tarafından Steve Yin's avatar Steve Yin

Issue 124573 - Office does not start when accessibility is activated.

Fixed access bridge initialization issue in vcl.
üst 19cfea58
...@@ -2058,12 +2058,13 @@ sal_Bool Application::IsAccessibilityEnabled() ...@@ -2058,12 +2058,13 @@ sal_Bool Application::IsAccessibilityEnabled()
sal_Bool InitAccessBridge( sal_Bool bShowCancel, sal_Bool &rCancelled ) sal_Bool InitAccessBridge( sal_Bool bShowCancel, sal_Bool &rCancelled )
{ {
sal_Bool bRet = true; sal_Bool bRet = sal_True;
rCancelled = sal_False;
// Disable Java bridge on UNIX and OS/2 // Disable Java bridge on UNIX and OS/2
#ifndef WNT #ifndef WNT
(void) bShowCancel; // unsued (void) bShowCancel; // unsued
(void) rCancelled; // unused
#else #else
// Checking HasAtHook() was introduced with IBM's IA2 CWS. // Checking HasAtHook() was introduced with IBM's IA2 CWS.
if( HasAtHook() ) if( HasAtHook() )
......
...@@ -442,7 +442,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled) ...@@ -442,7 +442,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
{ {
rCancelled = sal_False; rCancelled = sal_False;
bool bErrorMessage = true; sal_Bool bErrorMessage = sal_True;
// Note: // Note:
// if bAllowCancel is sal_True we were called from application startup // if bAllowCancel is sal_True we were called from application startup
...@@ -452,13 +452,13 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled) ...@@ -452,13 +452,13 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
try try
{ {
bool bSuccess = true; sal_Bool bSuccess = sal_True;
// No error messages when env var is set .. // No error messages when env var is set ..
static const char* pEnv = getenv("SAL_ACCESSIBILITY_ENABLED" ); static const char* pEnv = getenv("SAL_ACCESSIBILITY_ENABLED" );
if( pEnv && *pEnv ) if( pEnv && *pEnv )
{ {
bErrorMessage = false; bErrorMessage = sal_False;
} }
ImplSVData* pSVData = ImplGetSVData(); ImplSVData* pSVData = ImplGetSVData();
...@@ -479,7 +479,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled) ...@@ -479,7 +479,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
} }
if( !pSVData->mxAccessBridge.is() ) if( !pSVData->mxAccessBridge.is() )
bSuccess = false; bSuccess = sal_False;
return bSuccess; return bSuccess;
#endif #endif
css::uno::Reference< XExtendedToolkit > xToolkit = css::uno::Reference< XExtendedToolkit > xToolkit =
...@@ -512,7 +512,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled) ...@@ -512,7 +512,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
} }
if( !pSVData->mxAccessBridge.is() ) if( !pSVData->mxAccessBridge.is() )
bSuccess = false; bSuccess = sal_False;
} }
} }
...@@ -541,7 +541,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled) ...@@ -541,7 +541,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
rCancelled = sal_True; rCancelled = sal_True;
} }
return false; return sal_False;
} }
catch(::com::sun::star::java::JavaVMCreationFailureException&) catch(::com::sun::star::java::JavaVMCreationFailureException&)
...@@ -566,7 +566,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled) ...@@ -566,7 +566,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
rCancelled = sal_True; rCancelled = sal_True;
} }
return false; return sal_False;
} }
catch(::com::sun::star::java::MissingJavaRuntimeException&) catch(::com::sun::star::java::MissingJavaRuntimeException&)
...@@ -591,7 +591,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled) ...@@ -591,7 +591,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
rCancelled = sal_True; rCancelled = sal_True;
} }
return false; return sal_False;
} }
catch(::com::sun::star::java::JavaDisabledException&) catch(::com::sun::star::java::JavaDisabledException&)
...@@ -616,7 +616,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled) ...@@ -616,7 +616,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
rCancelled = sal_True; rCancelled = sal_True;
} }
return false; return sal_False;
} }
...@@ -670,12 +670,12 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled) ...@@ -670,12 +670,12 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
} }
} }
return false; return sal_False;
} }
catch (...) catch (...)
{ {
return false; return sal_False;
} }
} }
......
...@@ -6211,7 +6211,7 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP ...@@ -6211,7 +6211,7 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP
// Make sure to launch Accessibiliity only the following criterias are satisfied to avoid RFT interrupts regular acc processing // Make sure to launch Accessibiliity only the following criterias are satisfied to avoid RFT interrupts regular acc processing
if (g_acc_manager1 == NULL) if (g_acc_manager1 == NULL)
{ {
sal_Bool bCancelled; sal_Bool bCancelled(sal_False);
InitAccessBridge(sal_False,bCancelled); InitAccessBridge(sal_False,bCancelled);
if( bCancelled ) if( bCancelled )
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment