Author: steve_y
Date: Sun Nov  3 15:42:11 2013
New Revision: 1538382

URL: http://svn.apache.org/r1538382
Log:
1. Updated ia2 api idl with version 1.3
2. Changed UAccCOM.dll to a isolated COM dll

Added:
    openoffice/branches/ia2/main/winaccessibility/inc/act.hxx
Removed:
    
openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/UAccComMarshal.def
    
openoffice/branches/ia2/main/winaccessibility/source/UAccCOMIDL/Accessible2.idl
    
openoffice/branches/ia2/main/winaccessibility/source/UAccCOMIDL/AccessibleAction.idl
    
openoffice/branches/ia2/main/winaccessibility/source/UAccCOMIDL/AccessibleApplication.idl
    
openoffice/branches/ia2/main/winaccessibility/source/UAccCOMIDL/AccessibleComponent.idl
    
openoffice/branches/ia2/main/winaccessibility/source/UAccCOMIDL/AccessibleEditableText.idl
    
openoffice/branches/ia2/main/winaccessibility/source/UAccCOMIDL/AccessibleEventId.idl
    
openoffice/branches/ia2/main/winaccessibility/source/UAccCOMIDL/AccessibleHyperlink.idl
    
openoffice/branches/ia2/main/winaccessibility/source/UAccCOMIDL/AccessibleHypertext.idl
    
openoffice/branches/ia2/main/winaccessibility/source/UAccCOMIDL/AccessibleImage.idl
    
openoffice/branches/ia2/main/winaccessibility/source/UAccCOMIDL/AccessibleRelation.idl
    
openoffice/branches/ia2/main/winaccessibility/source/UAccCOMIDL/AccessibleRole.idl
    
openoffice/branches/ia2/main/winaccessibility/source/UAccCOMIDL/AccessibleStates.idl
    
openoffice/branches/ia2/main/winaccessibility/source/UAccCOMIDL/AccessibleTable.idl
    
openoffice/branches/ia2/main/winaccessibility/source/UAccCOMIDL/AccessibleText.idl
    
openoffice/branches/ia2/main/winaccessibility/source/UAccCOMIDL/AccessibleValue.idl
    
openoffice/branches/ia2/main/winaccessibility/source/UAccCOMIDL/IA2CommonTypes.idl
    
openoffice/branches/ia2/main/winaccessibility/source/UAccCOMIDL/IA2TypeLibrary.idl
    openoffice/branches/ia2/main/winaccessibility/source/UAccCOMIDL/dlldata.c
Modified:
    openoffice/branches/ia2/main/scp2/source/ooo/file_library_ooo.scp
    openoffice/branches/ia2/main/vcl/inc/svdata.hxx
    openoffice/branches/ia2/main/vcl/inc/vcl/svapp.hxx
    openoffice/branches/ia2/main/vcl/source/app/svapp.cxx
    openoffice/branches/ia2/main/vcl/win/source/window/salframe.cxx
    openoffice/branches/ia2/main/winaccessibility/inc/AccObjectWinManager.hxx
    openoffice/branches/ia2/main/winaccessibility/inc/accHelper.hxx
    openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccComponent.h
    
openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccHypertext.cpp
    openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccTable.cpp
    openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/EnumVariant.cpp
    openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/MAccessible.cpp
    openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/MAccessible.h
    openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/UAccCOM.cpp
    openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/makefile.mk
    openoffice/branches/ia2/main/winaccessibility/source/UAccCOMIDL/UAccCOM.idl
    openoffice/branches/ia2/main/winaccessibility/source/UAccCOMIDL/makefile.mk
    openoffice/branches/ia2/main/winaccessibility/source/service/AccObject.cxx
    
openoffice/branches/ia2/main/winaccessibility/source/service/AccObjectWinManager.cxx
    openoffice/branches/ia2/main/winaccessibility/source/service/checkmt.cxx
    openoffice/branches/ia2/main/winaccessibility/source/service/checkmt.hxx
    openoffice/branches/ia2/main/winaccessibility/source/service/makefile.mk

Modified: openoffice/branches/ia2/main/scp2/source/ooo/file_library_ooo.scp
URL: 
http://svn.apache.org/viewvc/openoffice/branches/ia2/main/scp2/source/ooo/file_library_ooo.scp?rev=1538382&r1=1538381&r2=1538382&view=diff
==============================================================================
--- openoffice/branches/ia2/main/scp2/source/ooo/file_library_ooo.scp (original)
+++ openoffice/branches/ia2/main/scp2/source/ooo/file_library_ooo.scp Sun Nov  
3 15:42:11 2013
@@ -32,7 +32,7 @@ File gid_File_Lib_Winaccessibility
 End
 File gid_File_Lib_UAccCOM
        BIN_FILE_BODY;
-       Styles  = (PACKED, SELFREG);
+       Styles  = (PACKED);
        Dir     = SCP2_OOO_BIN_DIR;
        Name    = "UAccCOM.dll";
 End

Modified: openoffice/branches/ia2/main/vcl/inc/svdata.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/ia2/main/vcl/inc/svdata.hxx?rev=1538382&r1=1538381&r2=1538382&view=diff
==============================================================================
--- openoffice/branches/ia2/main/vcl/inc/svdata.hxx (original)
+++ openoffice/branches/ia2/main/vcl/inc/svdata.hxx Sun Nov  3 15:42:11 2013
@@ -184,7 +184,6 @@ struct ImplSVAppData
 
 //IAccessibility2 Implementation 2009-----
        long m_bEnableAccessInterface;
-       long m_mbIsBridgeRegistered;
 //-----IAccessibility2 Implementation 2009
                             DECL_STATIC_LINK( ImplSVAppData, ImplQuitMsg, 
void* );
                            

Modified: openoffice/branches/ia2/main/vcl/inc/vcl/svapp.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/ia2/main/vcl/inc/vcl/svapp.hxx?rev=1538382&r1=1538381&r2=1538382&view=diff
==============================================================================
--- openoffice/branches/ia2/main/vcl/inc/vcl/svapp.hxx (original)
+++ openoffice/branches/ia2/main/vcl/inc/vcl/svapp.hxx Sun Nov  3 15:42:11 2013
@@ -539,9 +539,6 @@ public:
 private:
        bool m_bIsEnableAccessInterface;
 };
-
-VCL_DLLPUBLIC bool TestBridgeRegistered();
-VCL_DLLPUBLIC bool IsBridgeRegistered();
 #endif
 //-----IAccessibility2 Implementation 2009
 #endif // _APP_HXX

Modified: openoffice/branches/ia2/main/vcl/source/app/svapp.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/ia2/main/vcl/source/app/svapp.cxx?rev=1538382&r1=1538381&r2=1538382&view=diff
==============================================================================
--- openoffice/branches/ia2/main/vcl/source/app/svapp.cxx (original)
+++ openoffice/branches/ia2/main/vcl/source/app/svapp.cxx Sun Nov  3 15:42:11 
2013
@@ -2069,7 +2069,7 @@ sal_Bool InitAccessBridge( sal_Bool bSho
 #else
 
        // Checking TestBridgeRegistered() && HasAtHook() was introduced with 
IBM's IA2 CWS.
-       if(TestBridgeRegistered() && HasAtHook() )
+       if( HasAtHook() )
        {
            bRet = ImplInitAccessBridge( bShowCancel, rCancelled );
            
@@ -2156,31 +2156,3 @@ bool Application::IsEnableAccessInterfac
 void Application::AppEvent( const ApplicationEvent& /*rAppEvent*/ )
 {
 }
-//IAccessible2 Implementation 2009-----
-#ifdef WNT
-bool TestBridgeRegistered()
-{
-       const CLSID CLSID_MAccessible = 
{0xCF8DF8BA,0x44FE,0x4B10,{0xBD,0x2E,0x8C,0x8C,0xB3,0x22,0x48,0x5F}};
-
-       LPCOLESTR lpMAcc=L"UAccCOM.MAccessible";
-
-       CLSID mid;      
-       bool bReg = false;
-       if(S_OK  == CLSIDFromProgID(lpMAcc,&mid))
-       {
-               if( IsEqualCLSID(mid,CLSID_MAccessible))
-                       bReg = true;
-               else
-                       bReg = false;
-       }
-
-       ImplGetSVData()->maAppData.m_mbIsBridgeRegistered =bReg;
-       return bReg;
-}
-
-bool IsBridgeRegistered()
-{
-       return ImplGetSVData()->maAppData.m_mbIsBridgeRegistered;;
-}
-#endif
-//-----IAccessible2 Implementation 2009

Modified: openoffice/branches/ia2/main/vcl/win/source/window/salframe.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/ia2/main/vcl/win/source/window/salframe.cxx?rev=1538382&r1=1538381&r2=1538382&view=diff
==============================================================================
--- openoffice/branches/ia2/main/vcl/win/source/window/salframe.cxx (original)
+++ openoffice/branches/ia2/main/vcl/win/source/window/salframe.cxx Sun Nov  3 
15:42:11 2013
@@ -6219,12 +6219,9 @@ LRESULT CALLBACK SalFrameWndProc( HWND h
                                else
                                {
                                        if 
(Application::GetSettings().GetMiscSettings().GetEnableATToolSupport())
-                                       {                                       
        
-                                               if (!TestBridgeRegistered())
-                                                       break;
+                                       {
                                                // Make sure to launch 
Accessibiliity only the following criterias are satisfied to avoid RFT 
interrupts regular acc processing
-                                               if (g_acc_manager1 == NULL && 
-                                                       IsBridgeRegistered() )
+                                               if (g_acc_manager1 == NULL)
                                                {
                                                        sal_Bool bCancelled;
                                                        
InitAccessBridge(sal_False,bCancelled);

Modified: 
openoffice/branches/ia2/main/winaccessibility/inc/AccObjectWinManager.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/inc/AccObjectWinManager.hxx?rev=1538382&r1=1538381&r2=1538382&view=diff
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/inc/AccObjectWinManager.hxx 
(original)
+++ openoffice/branches/ia2/main/winaccessibility/inc/AccObjectWinManager.hxx 
Sun Nov  3 15:42:11 2013
@@ -17,10 +17,10 @@
  * specific language governing permissions and limitations
  * under the License.
  * 
- *************************************************************/
+ *************************************************************/
 
 #ifndef __ACCOBJECTWINMANAGER_HXX
-#define __ACCOBJECTWINMANAGER_HXX
+#define __ACCOBJECTWINMANAGER_HXX
 
 #ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_HPP_
 #include <com/sun/star/accessibility/XAccessible.hpp>
@@ -48,7 +48,7 @@ AccObjectWinManager complete the functio
 class AccObjectWinManager
 {
     friend class AccObjectManagerAgent;
-
+
 private:
     struct ltstr1
     {
@@ -100,7 +100,6 @@ private:
     mutable ::vos::OMutex maATInterfaceMutex;
 
     AccObjectWinManager(AccObjectManagerAgent* Agent=NULL);
-       bool m_bBridgeRegistered;
 
 private:
     long ImpleGenerateResID();

Modified: openoffice/branches/ia2/main/winaccessibility/inc/accHelper.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/inc/accHelper.hxx?rev=1538382&r1=1538381&r2=1538382&view=diff
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/inc/accHelper.hxx (original)
+++ openoffice/branches/ia2/main/winaccessibility/inc/accHelper.hxx Sun Nov  3 
15:42:11 2013
@@ -26,9 +26,6 @@
 #include <com/sun/star/accessibility/AccessibleRole.hpp>
 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
 
-#include "AccessibleRole.h"
-
-
 #include "UAccCOM2.h"
 
 enum DIRECTION

Added: openoffice/branches/ia2/main/winaccessibility/inc/act.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/inc/act.hxx?rev=1538382&view=auto
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/inc/act.hxx (added)
+++ openoffice/branches/ia2/main/winaccessibility/inc/act.hxx Sun Nov  3 
15:42:11 2013
@@ -0,0 +1,90 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#ifndef __ACCACT_HXX
+#define __ACCACT_HXX
+
+#include <windows.h>
+#include <tchar.h>
+
+
+static bool IsXPOrLater()
+{
+       OSVERSIONINFO osvi;
+
+       ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
+
+       osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+
+       GetVersionEx(&osvi);
+       return ((osvi.dwMajorVersion > 5) ||
+               ((osvi.dwMajorVersion == 5) && (osvi.dwMinorVersion >= 1)));
+}
+
+static HANDLE pActCtx = INVALID_HANDLE_VALUE;
+static ULONG_PTR lpCookie;
+
+static bool ActivateActContext()
+{
+       if(!IsXPOrLater())
+               return false;
+
+       ACTCTX actctx; 
+
+       ZeroMemory(&actctx, sizeof(actctx)); 
+
+       actctx.cbSize = sizeof(actctx); 
+
+       TCHAR szDllDirPath[1024];
+       ::GetCurrentDirectory(1024,szDllDirPath);
+       LPTSTR szDllPath = szDllDirPath;
+       lstrcat(szDllPath, _T("\\UAccCOM.dll"));
+
+       actctx.lpSource = szDllPath;
+       actctx.lpResourceName = MAKEINTRESOURCE(97);
+       actctx.dwFlags = ACTCTX_FLAG_RESOURCE_NAME_VALID;
+
+       HANDLE pActCtx = CreateActCtx(&actctx); 
+
+       if(pActCtx != INVALID_HANDLE_VALUE) 
+       {
+               if(ActivateActCtx(pActCtx, &lpCookie))
+               {
+                       return true;
+               }               
+       }
+       pActCtx = INVALID_HANDLE_VALUE;
+       lpCookie = 0;
+       return false;
+}
+
+static void DeactivateActContext()
+{
+       if(!IsXPOrLater())
+               return;
+
+       if(lpCookie)
+               DeactivateActCtx(0, lpCookie); 
+
+       if(pActCtx!=INVALID_HANDLE_VALUE)
+               ReleaseActCtx(pActCtx);
+}
+#endif
\ No newline at end of file

Modified: 
openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccComponent.h
URL: 
http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccComponent.h?rev=1538382&r1=1538381&r2=1538382&view=diff
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccComponent.h 
(original)
+++ openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccComponent.h 
Sun Nov  3 15:42:11 2013
@@ -28,9 +28,6 @@
 
 #include "resource.h"       // main symbols
 
-#include "AccessibleComponent.h"
-
-
 #include <com/sun/star/accessibility/XAccessible.hpp>
 #include <com/sun/star/accessibility/XAccessibleContext.hpp>
 #include <com/sun/star/accessibility/XAccessibleComponent.hpp>

Modified: 
openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccHypertext.cpp
URL: 
http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccHypertext.cpp?rev=1538382&r1=1538381&r2=1538382&view=diff
==============================================================================
--- 
openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccHypertext.cpp 
(original)
+++ 
openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccHypertext.cpp 
Sun Nov  3 15:42:11 2013
@@ -23,6 +23,7 @@
 #include "UAccCOM2.h"
 #include "AccHypertext.h"
 
+#include "act.hxx"
 
 using namespace com::sun::star::accessibility;
 using namespace com::sun::star::uno;
@@ -326,9 +327,11 @@ STDMETHODIMP CAccHypertext::get_hyperlin
     }
 
     IAccessibleHyperlink* plink = NULL;
+       ActivateActContext();
        HRESULT hr = CoCreateInstance( CLSID_AccHyperLink, NULL, CLSCTX_SERVER ,
                                    IID_IAccessibleHyperlink,
                                    (void **)&plink);
+       DeactivateActContext();
     if( SUCCEEDED(hr) )
     {
         IUNOXWrapper* wrapper = NULL;

Modified: 
openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccTable.cpp
URL: 
http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccTable.cpp?rev=1538382&r1=1538381&r2=1538382&view=diff
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccTable.cpp 
(original)
+++ openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccTable.cpp 
Sun Nov  3 15:42:11 2013
@@ -28,6 +28,7 @@
 #include <com/sun/star/accessibility/XAccessible.hpp>
 #include "MAccessible.h"
 
+#include "act.hxx"
 
 #ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLETABLEEXTENT_HPP_
 #include <com/sun/star/accessibility/XAccessibleTableSelection.hpp>
@@ -215,10 +216,12 @@ STDMETHODIMP CAccTable::get_columnHeader
     *startingRowIndex = 0 ;
 
     IAccessible* m_pIMacc = NULL;
+       ActivateActContext();
        HRESULT hr = CoCreateInstance( CLSID_MAccessible, NULL, CLSCTX_ALL ,
                                     IID_IMAccessible,
                                     (void **)&m_pIMacc
                                   );
+       DeactivateActContext();
     ((CMAccessible*)m_pIMacc)->SetXAccessible((long)pRXColumnHeader.get());
     m_pIMacc->QueryInterface(IID_IAccessibleTable,(void **)accessibleTable);
     if( SUCCEEDED(hr) )
@@ -445,10 +448,12 @@ STDMETHODIMP CAccTable::get_rowHeader(IA
     *startingColumnIndex = 0 ;
 
     IAccessible* m_pIMacc = NULL;
+       ActivateActContext();
        HRESULT hr = CoCreateInstance( CLSID_MAccessible, NULL, CLSCTX_ALL ,
                                     IID_IMAccessible,
                                     (void **)&m_pIMacc
                                   );
+       DeactivateActContext();
     ((CMAccessible*)m_pIMacc)->SetXAccessible((long)pRXRowHeader.get());
     m_pIMacc->QueryInterface(IID_IAccessibleTable,(void **)accessibleTable);
     if( SUCCEEDED(hr) )

Modified: 
openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/EnumVariant.cpp
URL: 
http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/EnumVariant.cpp?rev=1538382&r1=1538381&r2=1538382&view=diff
==============================================================================
--- 
openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/EnumVariant.cpp 
(original)
+++ 
openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/EnumVariant.cpp 
Sun Nov  3 15:42:11 2013
@@ -24,6 +24,7 @@
 #include "EnumVariant.h"
 #include "MAccessible.h"
 
+#include "act.hxx"
 
 /////////////////////////////////////////////////////////////////////////////
 // CEnumVariant
@@ -150,8 +151,10 @@ HRESULT STDMETHODCALLTYPE CEnumVariant::
    */
 HRESULT STDMETHODCALLTYPE CEnumVariant::Create(CEnumVariant __RPC_FAR 
*__RPC_FAR *ppenum)
 {
+       ActivateActContext();
        HRESULT hr = CoCreateInstance(CLSID_EnumVariant,NULL,
                                  CLSCTX_SERVER,IID_IEnumVariant,(void 
**)ppenum);
+       DeactivateActContext();
        if (S_OK != hr)
     {
         return E_FAIL;


Reply via email to