openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stev...@apache.org
Subject svn commit: r1420522 [2/12] - in /openoffice/branches/ia2/main/winaccessibility: ./ inc/ prj/ source/ source/UAccCOM/ source/UAccCOMIDL/ source/service/
Date Wed, 12 Dec 2012 04:41:33 GMT
Added: openoffice/branches/ia2/main/winaccessibility/inc/UAccCOM2.h
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/inc/UAccCOM2.h?rev=1420522&view=auto
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/inc/UAccCOM2.h (added)
+++ openoffice/branches/ia2/main/winaccessibility/inc/UAccCOM2.h Wed Dec 12 04:41:12 2012
@@ -0,0 +1,37 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright IBM Corporation 2010.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __UACCCOM2_H
+#define __UACCCOM2_H
+
+// Just a wrapper header for disabling this warning....
+
+#pragma warning( disable: 4917 )  /* a GUID can only be associated with a class, interface or namespace */
+#include "UAccCOM.h"
+
+#endif

Added: openoffice/branches/ia2/main/winaccessibility/inc/accHelper.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/inc/accHelper.hxx?rev=1420522&view=auto
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/inc/accHelper.hxx (added)
+++ openoffice/branches/ia2/main/winaccessibility/inc/accHelper.hxx Wed Dec 12 04:41:12 2012
@@ -0,0 +1,155 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright IBM Corporation 2010.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __ACCHELPER_HXX
+#define __ACCHELPER_HXX
+
+#include <com/sun/star/accessibility/XAccessibleText.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+
+#include "AccessibleRole.h"
+
+
+#include "UAccCOM2.h"
+
+enum DIRECTION
+{
+    FIRST_CHILD=0,
+    LAST_CHILD=-1,
+    BEFORE_CHILD=1 ,
+    AFTER_CHILD=2
+};
+
+#define CHILDID_SELF			 0
+#define UNO_MSAA_UNMAPPING		 0x00000000
+
+using namespace com::sun::star::uno;
+using namespace com::sun::star::accessibility::AccessibleRole;
+using namespace com::sun::star::accessibility::AccessibleStateType;
+
+//Role mapping table,left side is UNO role, right side is MSAA role
+const short ROLE_TABLE[][2] =
+    {
+        {UNKNOWN,				   IA2_ROLE_UNKNOWN},
+        {ALERT ,                   ROLE_SYSTEM_DIALOG},
+        {COLUMN_HEADER ,           ROLE_SYSTEM_COLUMNHEADER},
+        //{CANVAS ,                  ROLE_SYSTEM_CLIENT},
+        {CANVAS ,                  IA2_ROLE_CANVAS},
+        {CHECK_BOX ,               ROLE_SYSTEM_CHECKBUTTON},
+        {CHECK_MENU_ITEM ,         IA2_ROLE_CHECK_MENU_ITEM},
+        {COLOR_CHOOSER,			   IA2_ROLE_COLOR_CHOOSER},
+        {COMBO_BOX ,               ROLE_SYSTEM_COMBOBOX},
+        {DATE_EDITOR ,             IA2_ROLE_DATE_EDITOR},
+        {DESKTOP_ICON ,			   IA2_ROLE_DESKTOP_ICON},
+        {DESKTOP_PANE,             IA2_ROLE_DESKTOP_PANE},
+        {DIRECTORY_PANE,           IA2_ROLE_DIRECTORY_PANE},
+        {DIALOG,                   ROLE_SYSTEM_DIALOG},
+        {DOCUMENT,                 ROLE_SYSTEM_DOCUMENT},
+        {EMBEDDED_OBJECT ,		   IA2_ROLE_EMBEDDED_OBJECT },
+        {END_NOTE ,				   IA2_ROLE_ENDNOTE },
+        {FILE_CHOOSER ,			   IA2_ROLE_FILE_CHOOSER },
+        {FILLER,                   ROLE_SYSTEM_WHITESPACE},
+        {FONT_CHOOSER,			   IA2_ROLE_FONT_CHOOSER},
+        {FOOTER,				   IA2_ROLE_FOOTER},
+        {FOOTNOTE,				   IA2_ROLE_FOOTNOTE},
+        //{FRAME,					   IA2_ROLE_FRAME},
+        {FRAME,					   ROLE_SYSTEM_DIALOG},
+        {GLASS_PANE ,              IA2_ROLE_GLASS_PANE},
+        {GRAPHIC ,                 ROLE_SYSTEM_GRAPHIC},
+        {GROUP_BOX,                ROLE_SYSTEM_GROUPING},
+        {HEADER	,				   IA2_ROLE_HEADER},
+        {HEADING ,                 IA2_ROLE_HEADING},
+        {HYPER_LINK ,              ROLE_SYSTEM_TEXT},
+        {ICON ,                    IA2_ROLE_ICON},
+        {INTERNAL_FRAME,           IA2_ROLE_INTERNAL_FRAME},
+        {LABEL,                    ROLE_SYSTEM_STATICTEXT},
+        {LAYERED_PANE ,            IA2_ROLE_LAYERED_PANE},
+        {LIST ,                    ROLE_SYSTEM_LIST},
+        {LIST_ITEM ,               ROLE_SYSTEM_LISTITEM},
+        //{MENU ,                    ROLE_SYSTEM_MENUPOPUP},
+        {MENU,                ROLE_SYSTEM_MENUITEM},
+        {MENU_BAR,                 ROLE_SYSTEM_MENUBAR},
+        {MENU_ITEM,                ROLE_SYSTEM_MENUITEM},
+        {OPTION_PANE ,             IA2_ROLE_OPTION_PANE},
+        {PAGE_TAB,                 ROLE_SYSTEM_PAGETAB},
+        {PAGE_TAB_LIST,            ROLE_SYSTEM_PAGETABLIST},
+        {PANEL,                    IA2_ROLE_OPTION_PANE},
+        {PARAGRAPH,                IA2_ROLE_PARAGRAPH},
+        {PASSWORD_TEXT,            ROLE_SYSTEM_TEXT},
+        {POPUP_MENU,               ROLE_SYSTEM_MENUPOPUP},
+        {PUSH_BUTTON,              ROLE_SYSTEM_PUSHBUTTON},
+        {PROGRESS_BAR,             ROLE_SYSTEM_PROGRESSBAR},
+        {RADIO_BUTTON,             ROLE_SYSTEM_RADIOBUTTON},
+        {RADIO_MENU_ITEM,     	   IA2_ROLE_RADIO_MENU_ITEM},
+        {ROW_HEADER ,              ROLE_SYSTEM_ROWHEADER},
+        {ROOT_PANE,                IA2_ROLE_ROOT_PANE},
+        {SCROLL_BAR ,              ROLE_SYSTEM_SCROLLBAR},
+        {SCROLL_PANE ,             IA2_ROLE_SCROLL_PANE},
+        {SHAPE,					   IA2_ROLE_SHAPE},
+        {SEPARATOR ,               ROLE_SYSTEM_SEPARATOR},
+        {SLIDER ,                  ROLE_SYSTEM_SLIDER},
+        {SPIN_BOX ,                ROLE_SYSTEM_SPINBUTTON},
+        {SPLIT_PANE,               IA2_ROLE_SPLIT_PANE},
+        {STATUS_BAR,               ROLE_SYSTEM_STATUSBAR},
+        {TABLE,                    ROLE_SYSTEM_TABLE},
+        {TABLE_CELL ,              ROLE_SYSTEM_CELL},
+        {TEXT,                     ROLE_SYSTEM_TEXT},
+        {TEXT_FRAME ,			   IA2_ROLE_TEXT_FRAME},
+        //for change toggle button to push button for jaws
+        {TOGGLE_BUTTON,            ROLE_SYSTEM_PUSHBUTTON},
+
+        {TOOL_BAR,                 ROLE_SYSTEM_TOOLBAR},
+        {TOOL_TIP,                 ROLE_SYSTEM_TOOLTIP},
+        {TREE ,                    ROLE_SYSTEM_OUTLINE},
+        {VIEW_PORT ,			   IA2_ROLE_VIEW_PORT},
+        {WINDOW,                   ROLE_SYSTEM_WINDOW},
+		{BUTTON_DROPDOWN,  ROLE_SYSTEM_BUTTONDROPDOWN},
+		{BUTTON_MENU,			  ROLE_SYSTEM_BUTTONMENU},
+		{CAPTION,					IA2_ROLE_CAPTION},
+		{CHART,						IA2_ROLE_SHAPE},
+		{EDIT_BAR,					IA2_ROLE_EDITBAR},
+		{FORM,						IA2_ROLE_FORM},
+		{IMAGE_MAP ,			  IA2_ROLE_IMAGE_MAP},
+		{NOTE,						IA2_ROLE_NOTE},
+		{PAGE,						IA2_ROLE_PAGE},
+		{RULER ,				  IA2_ROLE_RULER},
+		{SECTION,					IA2_ROLE_SECTION},
+        {TREE_ITEM ,              ROLE_SYSTEM_OUTLINEITEM},
+		{TREE_TABLE,				ROLE_SYSTEM_OUTLINE}
+    };
+
+struct ltstr4
+{
+    bool operator()(const long  s1, const long  s2) const
+    {
+        return long(s1)<long(s2);
+    }
+};
+
+#endif

Added: openoffice/branches/ia2/main/winaccessibility/inc/g_msacc.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/inc/g_msacc.hxx?rev=1420522&view=auto
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/inc/g_msacc.hxx (added)
+++ openoffice/branches/ia2/main/winaccessibility/inc/g_msacc.hxx Wed Dec 12 04:41:12 2012
@@ -0,0 +1,34 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright IBM Corporation 2010.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+ 
+#ifndef __G_MSACC_HXX
+#define __G_MSACC_HXX
+
+extern AccTopWindowListener* g_pTop;
+
+#endif

Added: openoffice/branches/ia2/main/winaccessibility/inc/unomsaaevent.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/inc/unomsaaevent.hxx?rev=1420522&view=auto
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/inc/unomsaaevent.hxx (added)
+++ openoffice/branches/ia2/main/winaccessibility/inc/unomsaaevent.hxx Wed Dec 12 04:41:12 2012
@@ -0,0 +1,117 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright IBM Corporation 2010.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+ 
+#ifndef __UNOMSAAEVENT_HXX
+#define __UNOMSAAEVENT_HXX
+
+//STATE_CHANGED with get FOCUSED -> EVENT_OBJECT_FOCUS
+const short UM_EVENT_STATE_FOCUSED = 0 ;
+
+//STATE_CHANGED --> EVENT_OBJECT_STATECHANGE
+const short UM_EVENT_STATE_CHECKED  = 1 ;
+const short UM_EVENT_STATE_ARMED    = 2 ;
+const short UM_EVENT_STATE_PRESSED  = 3 ;
+const short UM_EVENT_STATE_SELECTED = 4 ;
+const short UM_EVENT_STATE_SHOWING  = 5 ;
+
+//if acc role is MENU_BAR, STATE_CHANGED with get FOCUSED -> EVENT_SYSTEM_MENUSTART
+const short UM_EVENT_MENU_START = 6 ;
+
+//if acc role is MENU_BAR, STATE_CHANGED with lose FOCUSED -> EVENT_SYSTEM_MENUEND
+const short UM_EVENT_MENU_END = 7 ;
+
+//if acc role is POPUP_MENU, STATE_CHANGED with get FOCUSED -> EVENT_SYSTEM_MENUPOPUPSTART
+const short UM_EVENT_MENUPOPUPSTART = 8 ;
+
+//if acc role is POPUP_MENU, STATE_CHANGED with lose FOCUSED -> EVENT_SYSTEM_MENUPOPUPEND
+const short UM_EVENT_MENUPOPUPEND = 9 ;
+
+//SELECTION_CHANGED -> EVENT_OBJECT_SELECTION
+const short UM_EVENT_SELECTION_CHANGED = 10 ;
+
+//INVALIDATE_ALL_CHILDREN --> EVENT_OBJECT_SHOW
+const short UM_EVENT_INVALIDATE_ALL_CHILDREN = 11 ;
+
+//VALUE_CHANGED --> EVENT_OBJECT_VALUECHANGE
+const short UM_EVENT_OBJECT_VALUECHANGE = 12 ;
+
+//NAME_CHANGED --> EVENT_OBJECT_NAMECHANGE
+const short UM_EVENT_OBJECT_NAMECHANGE = 13 ;
+
+//DESCRIPTION_CHANGED --> EVENT_OBJECT_DESCRIPTIONCHANGE
+const short UM_EVENT_OBJECT_DESCRIPTIONCHANGE = 14 ;
+
+//ACTION_CHANGED --> EVENT_OBJECT_DEFACTIONCHANGE
+const short UM_EVENT_OBJECT_DEFACTIONCHANGE = 15 ;
+
+//CARET_CHANGED --> EVENT_OBJECT_LOCATIONCHANGED
+const short UM_EVENT_OBJECT_CARETCHANGE = 16 ;
+
+//TEXT_CHANGED --> EVENT_OBJECT_VALUECHANGE
+const short UM_EVENT_OBJECT_TEXTCHANGE = 17 ;
+
+//ACTIVE_DESCENDANT_CHANGED --> EVENT_OBJECT_FOCUS
+const short UM_EVENT_ACTIVE_DESCENDANT_CHANGED = 18 ;
+
+//BOUNDRECT_CHANGED --> EVENT_OBJECT_LOCATIONCHANGE
+const short UM_EVENT_BOUNDRECT_CHANGED = 19 ;
+
+//VISIBLE_DATA_CHANGED --> EVENT_OBJECT_VALUECHANGE
+const short UM_EVENT_VISIBLE_DATA_CHANGED = 20 ;
+
+//to enable SHOW on dialogs, windows, frames
+const short UM_EVENT_SHOW = 21 ;
+
+const short UM_EVENT_STATE_BUSY = 22 ;
+
+const short UM_EVENT_TABLE_CAPTION_CHANGED = 24;
+const short UM_EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED = 25;
+const short UM_EVENT_TABLE_COLUMN_HEADER_CHANGED = 26;
+const short UM_EVENT_TABLE_MODEL_CHANGED = 27;
+const short UM_EVENT_TABLE_ROW_HEADER_CHANGED = 28;
+const short UM_EVENT_TABLE_SUMMARY_CHANGED = 29;
+const short UM_EVENT_OBJECT_REORDER = 30;
+const short UM_EVENT_PAGE_CHANGED =31;
+const short UM_EVENT_CHILD_ADDED =32;
+const short UM_EVENT_CHILD_REMOVED =33;
+const short UM_EVENT_TABLE_ROW_DESCRIPTION_CHANGED =    34;
+const short UM_EVENT_SELECTION_CHANGED_ADD = 35 ;
+const short UM_EVENT_SELECTION_CHANGED_REMOVE = 36 ;
+const short UM_EVENT_SELECTION_CHANGED_WITHIN = 37 ;
+
+//support for PAGE_CHANGED event
+const short UM_EVENT_OBJECT_PAGECHANGED = 38;
+
+//to add TEXT_SELECTION_CHANGED event
+const short UM_EVENT_TEXT_SELECTION_CHANGED = 39;
+
+//for section change and column chang event
+const short UM_EVENT_SECTION_CHANGED = 40;
+const short UM_EVENT_COLUMN_CHANGED = 41;
+
+#endif

Added: openoffice/branches/ia2/main/winaccessibility/prj/build.lst
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/prj/build.lst?rev=1420522&view=auto
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/prj/build.lst (added)
+++ openoffice/branches/ia2/main/winaccessibility/prj/build.lst Wed Dec 12 04:41:12 2012
@@ -0,0 +1,5 @@
+wa	winaccessibility	:	vcl toolkit NULL
+wa	winaccessibility							usr1	-	w	wa_mkout NULL
+wa	winaccessibility\source\UAccComIDL			nmake	-	w	wa_UAccComIDL NULL
+wa	winaccessibility\source\UAccCOM				nmake	-	w	wa_UAccCOM wa_UAccComIDL.w NULL
+wa	winaccessibility\source\service				nmake	-	w	wa_service wa_UAccCOM.w NULL

Added: openoffice/branches/ia2/main/winaccessibility/prj/d.lst
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/prj/d.lst?rev=1420522&view=auto
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/prj/d.lst (added)
+++ openoffice/branches/ia2/main/winaccessibility/prj/d.lst Wed Dec 12 04:41:12 2012
@@ -0,0 +1,9 @@
+mkdir: %_DEST%\inc%_EXT%\winaccessibility
+mkdir: %_DEST%\inc%_EXT%\winaccessibility\UAccCOM
+
+..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll
+..\%__SRC%\misc\winaccessibility.component %_DEST%\xml%_EXT%\winaccessibility.component
+
+#..\%__SRC%\inc\*.hxx %_DEST%\inc%_EXT%\winaccessibility\*.hxx
+#..\%__SRC%\inc\UAccCOM\*.h %_DEST%\inc%_EXT%\winaccessibility\UAccCOM\*.h
+#..\%__SRC%\inc\UAccCOM\*.c %_DEST%\inc%_EXT%\winaccessibility\UAccCOM\*.c

Added: openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccAction.cpp
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccAction.cpp?rev=1420522&view=auto
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccAction.cpp (added)
+++ openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccAction.cpp Wed Dec 12 04:41:12 2012
@@ -0,0 +1,127 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright IBM Corporation 2010.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+/**
+ * AccAction.cpp : Implementation of CAccAction
+ */
+#include "stdafx.h"
+#include "UAccCOM2.h"
+#include "AccAction.h"
+
+using namespace com::sun::star::accessibility;
+using namespace com::sun::star::uno;
+
+/**
+ * Returns the number of action.
+ *
+ * @param    nActions    the number of action.
+ */
+STDMETHODIMP CAccAction::nActions(/*[out,retval]*/long* nActions)
+{
+    
+    return CAccActionBase::nActions(nActions);
+}
+
+/**
+ * Performs specified action on the object.
+ *
+ * @param    actionIndex    the index of action.
+ */
+STDMETHODIMP CAccAction::doAction(/* [in] */ long actionIndex)
+{
+    
+    return CAccActionBase::doAction(actionIndex);
+}
+
+/**
+ * Gets description of specified action.
+ *
+ * @param    actionIndex    the index of action.
+ * @param    description    the description string of the specified action.
+ */
+STDMETHODIMP CAccAction::get_description(long actionIndex,BSTR __RPC_FAR *description)
+{
+    
+    return CAccActionBase::get_description(actionIndex, description);
+}
+
+STDMETHODIMP CAccAction::get_name( long actionIndex, BSTR __RPC_FAR *name)
+{
+    
+    return CAccActionBase::get_name(actionIndex, name);
+}
+
+STDMETHODIMP CAccAction::get_localizedName( long actionIndex, BSTR __RPC_FAR *localizedName)
+{
+    
+    return CAccActionBase::get_localizedName(actionIndex, localizedName);
+}
+
+/**
+ * Returns key binding object (if any) associated with specified action 
+ * key binding is string.
+ * e.g. "alt+d" (like IAccessible::get_accKeyboardShortcut).
+ *
+ * @param    actionIndex    the index of action.
+ * @param    nMaxBinding    the max number of key binding.
+ * @param    keyBinding     the key binding array.
+ * @param    nBinding       the actual number of key binding returned.
+ */
+STDMETHODIMP CAccAction::get_keyBinding(
+    /* [in] */ long actionIndex,
+    /* [in] */ long nMaxBinding,
+    /* [length_is][length_is][size_is][size_is][out] */ BSTR __RPC_FAR *__RPC_FAR *keyBinding,
+    /* [retval][out] */ long __RPC_FAR *nBinding)
+{
+    
+    return CAccActionBase::get_keyBinding(actionIndex, nMaxBinding,	keyBinding, nBinding);
+}
+
+/**
+ * Overide of IUNOXWrapper.
+ *
+ * @param    pXInterface    the pointer of UNO interface.
+ */
+STDMETHODIMP CAccAction::put_XInterface(long pXInterface)
+{
+    
+    return CAccActionBase::put_XInterface(pXInterface);
+}
+/**
+   * Put UNO interface.
+   * @param pXSubInterface XAccessibleHyperlink interface.
+   * @return Result.
+*/
+STDMETHODIMP CAccAction::put_XSubInterface(long pXSubInterface)
+{
+    
+
+    pRXAct = (XAccessibleAction*)pXSubInterface;
+
+    return S_OK;
+}

Added: openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccAction.h
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccAction.h?rev=1420522&view=auto
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccAction.h (added)
+++ openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccAction.h Wed Dec 12 04:41:12 2012
@@ -0,0 +1,112 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright IBM Corporation 2010.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __ACCACTION_H_
+#define __ACCACTION_H_
+
+#include "resource.h"       // main symbols
+#include "AccActionBase.h"
+
+/**
+ * CAccAction implements IAccessibleAction interface.
+ */
+class ATL_NO_VTABLE CAccAction :
+            public CComObjectRoot,
+            public CComCoClass<CAccAction, &CLSID_AccAction>,
+            public IAccessibleAction,
+            public CAccActionBase
+{
+public:
+    CAccAction()
+    {
+        
+    }
+    ~CAccAction()
+    {
+        
+    }
+
+    DECLARE_REGISTRY_RESOURCEID(IDR_ACCACTION)
+
+    BEGIN_COM_MAP(CAccAction)
+    COM_INTERFACE_ENTRY(IAccessibleAction)
+    COM_INTERFACE_ENTRY(IUNOXWrapper)
+    COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,_SmartQI)
+    END_COM_MAP()
+
+    static HRESULT WINAPI _SmartQI(void* pv,
+                                   REFIID iid, void** ppvObject, DWORD)
+    {
+        return ((CAccAction*)pv)->SmartQI(iid,ppvObject);
+    }
+
+    HRESULT SmartQI(REFIID iid, void** ppvObject)
+    {
+        if( m_pOuterUnknown )
+            return OuterQueryInterface(iid,ppvObject);
+        return E_FAIL;
+    }
+
+    // IAccessibleAction
+public:
+    // IAccessibleAction
+
+    // Returns the number of action.
+    STDMETHOD(nActions)(/*[out,retval]*/long* nActions);
+
+    // Performs specified action on the object.
+    STDMETHOD(doAction)(/* [in] */ long actionIndex);
+
+    // Gets description of specified action.
+    STDMETHOD(get_description)(long actionIndex,BSTR __RPC_FAR *description);
+
+    // added by qiuhd, 2006/06/28, for driver 07/11
+    // get the action name
+    STDMETHOD(get_name)( long actionIndex, BSTR __RPC_FAR *name);
+
+    // get the localized action name
+    STDMETHOD(get_localizedName)( long actionIndex, BSTR __RPC_FAR *localizedName);
+
+    // Returns key binding object (if any) associated with specified action
+    // key binding is string.
+    // e.g. "alt+d" (like IAccessible::get_accKeyboardShortcut).
+    STDMETHOD(get_keyBinding)(
+        /* [in] */ long actionIndex,
+        /* [in] */ long nMaxBinding,
+        /* [length_is][length_is][size_is][size_is][out] */ BSTR __RPC_FAR *__RPC_FAR *keyBinding,
+        /* [retval][out] */ long __RPC_FAR *nBinding);
+
+    // Overide of IUNOXWrapper.
+    STDMETHOD(put_XInterface)(long pXInterface);
+
+    // Overide of IUNOXWrapper.
+    STDMETHOD(put_XSubInterface)(long pXSubInterface);
+
+};
+
+#endif //__ACCACTION_H_

Added: openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccAction.rgs
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccAction.rgs?rev=1420522&view=auto
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccAction.rgs (added)
+++ openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccAction.rgs Wed Dec 12 04:41:12 2012
@@ -0,0 +1,26 @@
+HKCR
+{
+	UAccCOM.AccAction.1 = s 'AccAction Class'
+	{
+		CLSID = s '{AA49F20E-BB4E-400D-A5B0-6F5B7B770227}'
+	}
+	UAccCOM.AccAction = s 'AccAction Class'
+	{
+		CLSID = s '{AA49F20E-BB4E-400D-A5B0-6F5B7B770227}'
+		CurVer = s 'UAccCOM.AccAction.1'
+	}
+	NoRemove CLSID
+	{
+		ForceRemove {AA49F20E-BB4E-400D-A5B0-6F5B7B770227} = s 'AccAction Class'
+		{
+			ProgID = s 'UAccCOM.AccAction.1'
+			VersionIndependentProgID = s 'UAccCOM.AccAction'
+			ForceRemove 'Programmable'
+			InprocServer32 = s '%MODULE%'
+			{
+				val ThreadingModel = s 'both'
+			}
+			'TypeLib' = s '{19ECB1B0-9376-4FF9-B580-223FC9C200B8}'
+		}
+	}
+}

Added: openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccActionBase.cpp
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccActionBase.cpp?rev=1420522&view=auto
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccActionBase.cpp (added)
+++ openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccActionBase.cpp Wed Dec 12 04:41:12 2012
@@ -0,0 +1,423 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright IBM Corporation 2010.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+//////////////////////////////////////////////////////////////////////
+// AccActionBase.cpp: implementation of the CAccActionBase class.
+//////////////////////////////////////////////////////////////////////
+#include "stdafx.h"
+
+#include "AccActionBase.h"
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+
+#include "AccessibleKeyStroke.h"
+
+#ifndef __ACCCOMMON_H_
+#include "acccommon.h"
+#endif
+
+using namespace com::sun::star::accessibility::AccessibleRole;
+using namespace com::sun::star::accessibility;
+using namespace com::sun::star::uno;
+using namespace com::sun::star::awt;
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CAccActionBase::CAccActionBase()
+{}
+
+CAccActionBase::~CAccActionBase()
+{}
+
+/**
+ * Helper function used for getting default action by UNO role.
+ *
+ * @param    pRContext    UNO context interface pointer.
+ * @param    pRet         the corresponding string to be returned.
+ */
+void GetDfActionByUNORole(XAccessibleContext* pRContext, BSTR* pRet)
+{
+    // #CHECK#
+    if(pRContext == NULL || pRet == NULL)
+    {
+        return;
+    }
+
+    long Role = pRContext->getAccessibleRole();
+
+    switch(Role)
+    {
+    case PUSH_BUTTON:
+        *pRet = ::SysAllocString(PRESS);
+        break;
+    case RADIO_BUTTON:
+    case MENU_ITEM:
+    case LIST_ITEM:
+        *pRet = ::SysAllocString(SELECT);
+        break;
+    case CHECK_BOX:
+        {
+            Reference< XAccessibleStateSet > pRState = pRContext->getAccessibleStateSet();
+            if( !pRState.is() )
+            {
+                return;
+            }
+
+            Sequence<short> pStates = pRState->getStates();
+            int count = pStates.getLength();
+            *pRet = ::SysAllocString(CHECK);
+            for( int iIndex = 0;iIndex < count;iIndex++ )
+            {
+                if( pStates[iIndex] == AccessibleStateType::CHECKED )
+                {
+                    SAFE_SYSFREESTRING(*pRet);
+                    *pRet = ::SysAllocString(UNCHECK);
+                    break;
+                }
+            }
+            break;
+        }
+    }
+}
+
+/**
+ * Returns the number of action.
+ *
+ * @param    nActions    the number of action.
+ */
+STDMETHODIMP CAccActionBase::nActions(/*[out,retval]*/long* nActions)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    // #CHECK#
+    if( pRXAct.is() && nActions != NULL )
+    {
+        *nActions = GetXInterface()->getAccessibleActionCount();
+        return S_OK;
+    }
+    *nActions = 0;
+
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Performs specified action on the object.
+ *
+ * @param    actionIndex    the index of action.
+ */
+STDMETHODIMP CAccActionBase::doAction(/* [in] */ long actionIndex)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    if( pRXAct.is() )
+    {
+        return GetXInterface()->doAccessibleAction( actionIndex )?S_OK:E_FAIL;
+    }
+    return E_FAIL;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Gets description of specified action.
+ *
+ * @param    actionIndex    the index of action.
+ * @param    description    the description string of the specified action.
+ */
+STDMETHODIMP CAccActionBase::get_description(long actionIndex,BSTR __RPC_FAR *description)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    // #CHECK#
+    if(description == NULL)
+        return E_INVALIDARG;
+
+    // #CHECK XInterface#
+    if(!pRXAct.is())
+        return E_FAIL;
+
+    ::rtl::OUString ouStr = GetXInterface()->getAccessibleActionDescription(actionIndex);
+    // #CHECK#
+
+    SAFE_SYSFREESTRING(*description);
+    *description = SysAllocString((OLECHAR*)ouStr.getStr());
+
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+STDMETHODIMP CAccActionBase::get_name( long, BSTR __RPC_FAR *)
+{
+    return E_NOTIMPL;
+}
+
+STDMETHODIMP CAccActionBase::get_localizedName( long, BSTR __RPC_FAR *)
+{
+    return E_NOTIMPL;
+}
+
+/**
+ * Returns key binding object (if any) associated with specified action 
+ * key binding is string.
+ * e.g. "alt+d" (like IAccessible::get_accKeyboardShortcut).
+ *
+ * @param    actionIndex    the index of action.
+ * @param    nMaxBinding    the max number of key binding.
+ * @param    keyBinding     the key binding array.
+ * @param    nBinding       the actual number of key binding returned.
+ */
+STDMETHODIMP CAccActionBase::get_keyBinding(
+    /* [in] */ long actionIndex,
+    /* [in] */ long,
+    /* [length_is][length_is][size_is][size_is][out] */ BSTR __RPC_FAR *__RPC_FAR *keyBinding,
+    /* [retval][out] */ long __RPC_FAR *nBinding)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    if( !keyBinding || !nBinding)
+        return E_INVALIDARG;
+
+    if( !pRXAct.is() )
+        return E_FAIL;
+
+    Reference< XAccessibleKeyBinding > binding = GetXInterface()->getAccessibleActionKeyBinding(actionIndex);
+    if( !binding.is() )
+        return E_FAIL;
+
+    long nCount = (binding.get())->getAccessibleKeyBindingCount();
+
+    OLECHAR wString[64];
+
+    *keyBinding = (BSTR*)::CoTaskMemAlloc(nCount*sizeof(BSTR));
+
+    // #CHECK Memory Allocation#
+    if(*keyBinding == NULL)
+        return E_FAIL;
+
+    for( int index = 0;index < nCount;index++ )
+    {
+        memset(wString,0,sizeof(wString));
+        GetkeyBindingStrByXkeyBinding( (binding.get())->getAccessibleKeyBinding(index), wString );
+
+        (*keyBinding)[index] = SysAllocString(wString);
+    }
+
+    *nBinding = nCount;
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Overide of IUNOXWrapper.
+ *
+ * @param    pXInterface    the pointer of UNO interface.
+ */
+STDMETHODIMP CAccActionBase::put_XInterface(long pXInterface)
+{
+    
+
+    ENTER_PROTECTED_BLOCK
+
+    CUNOXWrapper::put_XInterface(pXInterface);
+
+    //special query.
+    if(pUNOInterface == NULL)
+        return E_FAIL;
+    Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+    if( !pRContext.is() )
+        return E_FAIL;
+
+    Reference<XAccessibleAction> pRXI(pRContext,UNO_QUERY);
+    if( !pRXI.is() )
+        pRXAct = NULL;
+    else
+        pRXAct = pRXI.get();
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Helper function used for converting keybinding to string.
+ *
+ * @param    keySet    the key stroke sequence.
+ * @param    pString   the output keybinding string.
+ */
+void CAccActionBase::GetkeyBindingStrByXkeyBinding( const Sequence< KeyStroke > &keySet, OLECHAR* pString )
+{
+    // #CHECK#
+    if(pString == NULL)
+        return;
+
+    for( int iIndex = 0;iIndex < keySet.getLength();iIndex++ )
+    {
+        KeyStroke stroke = keySet[iIndex];
+        OLECHAR wString[64] = {NULL};
+        if(iIndex>0)
+            wcscat( wString, OLESTR("  ") );
+        if((stroke.Modifiers & MODIFIER_SHIFT) == MODIFIER_SHIFT)
+            wcscat( wString, OLESTR("Shift+") );
+        if((stroke.Modifiers & MODIFIER_CTRL) == MODIFIER_CTRL)
+            wcscat( wString, OLESTR("Ctrl+") );
+        if((stroke.Modifiers & MODIFIER_ALT) == MODIFIER_ALT)
+            wcscat( wString, OLESTR("Alt+") );
+        if(stroke.KeyCode)
+        {
+            OLECHAR* pChar = getOLECHARFromKeyCode(stroke.KeyCode);
+            if(pChar != NULL)
+                wcscat( wString, pChar );
+            else if (stroke.KeyCode <= 255)
+            {
+                OLECHAR pChar[4] = {NULL};
+                swprintf( pChar, L"%c", stroke.KeyCode);
+                wcscat( wString, pChar);
+            }
+            else
+            {
+                OLECHAR pChar[4] = {NULL};
+                swprintf( pChar, L"%d", stroke.KeyCode);
+                wcscat( wString, pChar);
+            }
+        }
+
+        wcscat( pString, wString);
+    }
+}
+
+/**
+ * Helper function used for converting key code to ole string.
+ *
+ * @param    key    the key code.
+ */
+OLECHAR* CAccActionBase::getOLECHARFromKeyCode(long key)
+{
+    static struct keyMap
+    {
+        int keyCode;
+        OLECHAR* key;
+    }
+    map[] =
+        {
+            {MODIFIER_SHIFT, L"SHIFT" },
+            {MODIFIER_CTRL, L"CTRL" },
+            {MODIFIER_ALT, L"ALT" },
+            CODEENTRY(NUM0),CODEENTRY(NUM1),CODEENTRY(NUM2),CODEENTRY(NUM3),CODEENTRY(NUM4),CODEENTRY(NUM5),
+            CODEENTRY(NUM6),CODEENTRY(NUM7),CODEENTRY(NUM8),CODEENTRY(NUM9),
+            CODEENTRY(A),CODEENTRY(B),CODEENTRY(C),CODEENTRY(D),CODEENTRY(E),CODEENTRY(F),
+            CODEENTRY(G),CODEENTRY(H),CODEENTRY(I),CODEENTRY(J),CODEENTRY(K),CODEENTRY(L),
+            CODEENTRY(M),CODEENTRY(N),CODEENTRY(O),CODEENTRY(P),CODEENTRY(Q),CODEENTRY(R),
+            CODEENTRY(S),CODEENTRY(T),CODEENTRY(U),CODEENTRY(V),CODEENTRY(W),CODEENTRY(X),
+            CODEENTRY(Y),CODEENTRY(Z),
+            CODEENTRY(F1),CODEENTRY(F2),CODEENTRY(F3),CODEENTRY(F4),CODEENTRY(F5),CODEENTRY(F6),
+            CODEENTRY(F7),CODEENTRY(F8),CODEENTRY(F9),CODEENTRY(F10),CODEENTRY(F11),CODEENTRY(F12),
+            CODEENTRY(F13),CODEENTRY(F14),CODEENTRY(F15),CODEENTRY(F16),CODEENTRY(F17),CODEENTRY(F18),
+            CODEENTRY(F19),CODEENTRY(F20),CODEENTRY(F21),CODEENTRY(F22),CODEENTRY(F23),CODEENTRY(F24),
+            CODEENTRY(F25),CODEENTRY(F26),
+
+            { KEYCODE_DOWN, L"DOWN" },
+            { KEYCODE_UP, L"UP" },
+            { KEYCODE_LEFT, L"LEFT" },
+            { KEYCODE_RIGHT, L"RIGHT" },
+            { KEYCODE_HOME, L"HOME" },
+            { KEYCODE_END, L"END" },
+            { KEYCODE_PAGEUP, L"PAGEUP" },
+            { KEYCODE_PAGEDOWN, L"PAGEDOWN" },
+            { KEYCODE_RETURN, L"RETURN" },
+            { KEYCODE_ESCAPE, L"ESCAPE" },
+            { KEYCODE_TAB, L"TAB" },
+            { KEYCODE_BACKSPACE, L"BACKSPACE" },
+            { KEYCODE_SPACE, L"SPACE" },
+            { KEYCODE_INSERT, L"INSERT" },
+            { KEYCODE_DELETE, L"DELETE" },
+            { KEYCODE_ADD, L"ADD" },
+            { KEYCODE_SUBTRACT, L"SUBTRACT" },
+            { KEYCODE_MULTIPLY, L"MULTIPLY" },
+            { KEYCODE_DIVIDE, L"DIVIDE" },
+            { KEYCODE_POINT, L"POINT" },
+            { KEYCODE_COMMA, L"COMMA" },
+            { KEYCODE_LESS, L"LESS" },
+            { KEYCODE_GREATER, L"GREATER" },
+            { KEYCODE_EQUAL, L"EQUAL" },
+            { KEYCODE_OPEN, L"OPEN" },
+            { KEYCODE_CUT, L"CUT" },
+            { KEYCODE_COPY, L"COPY" },
+            { KEYCODE_PASTE, L"PASTE" },
+            { KEYCODE_UNDO, L"UNDO" },
+            { KEYCODE_REPEAT, L"REPEAT" },
+            { KEYCODE_FIND, L"FIND" },
+            { KEYCODE_PROPERTIES, L"PROPERTIES" },
+            { KEYCODE_FRONT, L"FRONT" },
+            { KEYCODE_CONTEXTMENU, L"CONTEXTMENU" },
+            { KEYCODE_HELP, L"HELP" },
+        };
+    static long nCount = countof(map);
+
+    long min = 0;
+    long max = nCount-1;
+    long mid = nCount/2;
+    while(min<max)
+    {
+        if(key<map[mid].keyCode)
+            max = mid-1;
+        else if(key>map[mid].keyCode)
+            min = mid+1;
+        else
+            break;
+        mid = (min+max)/2;
+    }
+
+    if(key == map[mid].keyCode)
+    {
+        return map[mid].key;
+    }
+    else
+    {
+        return NULL;
+    }
+}
+

Added: openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccActionBase.h
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccActionBase.h?rev=1420522&view=auto
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccActionBase.h (added)
+++ openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccActionBase.h Wed Dec 12 04:41:12 2012
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright IBM Corporation 2010.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+//////////////////////////////////////////////////////////////////////
+// AccActionBase.h: interface for the CAccActionBase class.
+//////////////////////////////////////////////////////////////////////
+
+#if !defined(AFX_ACCACTIONBASE_H__F87FAD24_D66E_4D22_9B24_3304A303DC84__INCLUDED_)
+#define AFX_ACCACTIONBASE_H__F87FAD24_D66E_4D22_9B24_3304A303DC84__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#define WNT
+
+#include <com/sun/star/uno/reference.hxx>
+#include <com/sun/star/accessibility/XAccessibleAction.hpp>
+#include "UNOXWrapper.h"
+
+class ATL_NO_VTABLE CAccActionBase  : public CUNOXWrapper
+{
+public:
+    CAccActionBase();
+    virtual ~CAccActionBase();
+
+    // IAccessibleAction
+public:
+    // IAccessibleAction
+
+    // Returns the number of action.
+    STDMETHOD(nActions)(/*[out,retval]*/long* nActions);
+
+    // Performs specified action on the object.
+    STDMETHOD(doAction)(/* [in] */ long actionIndex);
+
+    // Gets description of specified action.
+    STDMETHOD(get_description)(long actionIndex,BSTR __RPC_FAR *description);
+
+    // added by qiuhd, 2006/06/28, for driver 07/11
+    // get the action name
+    STDMETHOD(get_name)( long actionIndex, BSTR __RPC_FAR *name);
+
+    // get the localized action Name
+    STDMETHOD(get_localizedName)( long actionIndex, BSTR __RPC_FAR *localizedName);
+
+    // Returns key binding object (if any) associated with specified action
+    // key binding is string.
+    // e.g. "alt+d" (like IAccessible::get_accKeyboardShortcut).
+    STDMETHOD(get_keyBinding)(
+        /* [in] */ long actionIndex,
+        /* [in] */ long nMaxBinding,
+        /* [length_is][length_is][size_is][size_is][out] */ BSTR __RPC_FAR *__RPC_FAR *keyBinding,
+        /* [retval][out] */ long __RPC_FAR *nBinding);
+
+    // Overide of IUNOXWrapper.
+    STDMETHOD(put_XInterface)(long pXInterface);
+
+    static void GetkeyBindingStrByXkeyBinding( const com::sun::star::uno::Sequence< com::sun::star::awt::KeyStroke > &keySet, OLECHAR* pString );
+
+protected:
+
+    static OLECHAR* getOLECHARFromKeyCode(long key);
+
+    com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleAction> pRXAct;
+
+private:
+    inline com::sun::star::accessibility::XAccessibleAction* GetXInterface()
+    {
+        return pRXAct.get();
+    }
+};
+
+#endif // !defined(AFX_ACCACTIONBASE_H__F87FAD24_D66E_4D22_9B24_3304A303DC84__INCLUDED_)

Added: openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccComponent.cpp
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccComponent.cpp?rev=1420522&view=auto
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccComponent.cpp (added)
+++ openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccComponent.cpp Wed Dec 12 04:41:12 2012
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright IBM Corporation 2010.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+/**
+ * AccComponent.cpp : Implementation of CUAccCOMApp and DLL registration.
+ */
+#include "stdafx.h"
+#include "UAccCOM2.h"
+#include "AccComponent.h"
+
+/**
+ * Returns the location of the upper left corner of the object's bounding 
+ * box relative to the parent.
+ * 
+ * @param    Location    the upper left corner of the object's bounding box.
+ */
+STDMETHODIMP CAccComponent::get_locationInParent(long *x, long *y)
+{
+    
+    return CAccComponentBase::get_locationInParent(x,y);
+}
+
+/**
+ * Returns the foreground color of this object.
+ * 
+ * @param    Color    the color of foreground.
+ */
+STDMETHODIMP CAccComponent::get_foreground(IA2Color * foreground)
+{
+    
+    return CAccComponentBase::get_foreground(foreground);
+}
+
+/**
+ * Returns the background color of this object.
+ * 
+ * @param    Color    the color of background.
+ */
+STDMETHODIMP CAccComponent::get_background(IA2Color * background)
+{
+    
+    return CAccComponentBase::get_background(background);
+}
+
+/**
+ * Overide of IUNOXWrapper.
+ *
+ * @param    pXInterface    the pointer of UNO interface.
+ */
+STDMETHODIMP CAccComponent::put_XInterface(long pXInterface)
+{
+    
+    return CAccComponentBase::put_XInterface(pXInterface);
+}

Added: 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=1420522&view=auto
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccComponent.h (added)
+++ openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccComponent.h Wed Dec 12 04:41:12 2012
@@ -0,0 +1,107 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright IBM Corporation 2010.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#if !defined(AFX_ACCCOMPONENT_H__626D760C_3944_4B0E_BB4D_F0D20AEDF7DC__INCLUDED_)
+#define AFX_ACCCOMPONENT_H__626D760C_3944_4B0E_BB4D_F0D20AEDF7DC__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#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>
+#include "UNOXWrapper.h"
+#include "AccComponentBase.h"
+
+using namespace com::sun::star::accessibility;
+using namespace com::sun::star::uno;
+
+/**
+ * CAccComponent implements IAccessibleComponent interface.
+ */
+class ATL_NO_VTABLE CAccComponent :
+            public CComObjectRoot,
+            public CComCoClass<CAccComponent,&CLSID_AccComponent>,
+            public IAccessibleComponent,
+            public CAccComponentBase
+{
+public:
+    CAccComponent()
+    {
+            }
+    ~CAccComponent()
+    {
+            }
+
+    BEGIN_COM_MAP(CAccComponent)
+    COM_INTERFACE_ENTRY(IAccessibleComponent)
+    COM_INTERFACE_ENTRY(IUNOXWrapper)
+    COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,_SmartQI)
+    END_COM_MAP()
+
+    static HRESULT WINAPI _SmartQI(void* pv,
+                                   REFIID iid, void** ppvObject, DWORD)
+    {
+        return ((CAccComponent*)pv)->SmartQI(iid,ppvObject);
+    }
+
+    HRESULT SmartQI(REFIID iid, void** ppvObject)
+    {
+        if( m_pOuterUnknown )
+            return OuterQueryInterface(iid,ppvObject);
+        return E_FAIL;
+    }
+
+    DECLARE_REGISTRY_RESOURCEID(IDR_AccComponent)
+
+    // IAccessibleComponent
+public:
+    // IAccessibleComponent
+
+    // Returns the location of the upper left corner of the object's bounding
+    // box relative to the parent.
+    STDMETHOD(get_locationInParent)(long *x, long *y);
+
+    // Returns the foreground color of this object.
+    STDMETHOD(get_foreground)(IA2Color * foreground);
+
+    // Returns the background color of this object.
+    STDMETHOD(get_background)(IA2Color * background);
+
+    // Overide of IUNOXWrapper.
+    STDMETHOD(put_XInterface)(long pXInterface);
+
+};
+
+#endif // !defined(AFX_ACCCOMPONENT_H__626D760C_3944_4B0E_BB4D_F0D20AEDF7DC__INCLUDED_)

Added: openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccComponent.rgs
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccComponent.rgs?rev=1420522&view=auto
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccComponent.rgs (added)
+++ openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccComponent.rgs Wed Dec 12 04:41:12 2012
@@ -0,0 +1,23 @@
+HKCR
+{
+	UAccCOM.AccComponent.1 = s 'AccComponent Class'
+	{
+		CLSID = s '{9FD9BA47-70AF-4160-99F1-526F2B9F111B}'
+	}
+	UAccCOM.AccComponent = s 'AccComponent Class'
+	{
+		CLSID = s '{9FD9BA47-70AF-4160-99F1-526F2B9F111B}'
+	}
+	NoRemove CLSID
+	{
+		ForceRemove {9FD9BA47-70AF-4160-99F1-526F2B9F111B} = s 'AccComponent Class'
+		{
+			ProgID = s 'UAccCOM.AccComponent.1'
+			VersionIndependentProgID = s 'UAccCOM.AccComponent'
+			InprocServer32 = s '%MODULE%'
+			{
+				val ThreadingModel = s 'both'
+			}
+		}
+	}
+}

Added: openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccComponentBase.cpp
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccComponentBase.cpp?rev=1420522&view=auto
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccComponentBase.cpp (added)
+++ openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccComponentBase.cpp Wed Dec 12 04:41:12 2012
@@ -0,0 +1,220 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright IBM Corporation 2010.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "stdafx.h"
+#include "AccComponentBase.h"
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include "MAccessible.h"
+
+using namespace com::sun::star::accessibility;
+using namespace com::sun::star::uno;
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CAccComponentBase::CAccComponentBase()
+{}
+
+CAccComponentBase::~CAccComponentBase()
+{}
+
+
+/**
+ * Returns the location of the upper left corner of the object's bounding 
+ * box relative to the parent.
+ * 
+ * @param    Location    the upper left corner of the object's bounding box.
+ */
+STDMETHODIMP CAccComponentBase::get_locationInParent(long *x, long *y)
+{
+    
+	CHECK_ENABLE_INF
+
+    try
+    {
+        if (x == NULL || y == NULL)
+            return E_INVALIDARG;
+        // #CHECK XInterface#
+        if(!pRXComp.is())
+            return E_FAIL;
+
+        const ::com::sun::star::awt::Point& pt = GetXInterface()->getLocation();
+        *x = pt.X;
+        *y = pt.Y;
+        return S_OK;
+    }
+    catch(...)
+    {
+        return E_FAIL;
+    }
+}
+
+/**
+ * Returns the location of the upper left corner of the object's bounding 
+ * box in screen.
+ * 
+ * @param    Location    the upper left corner of the object's bounding 
+ *                       box in screen coordinates.
+ */
+STDMETHODIMP CAccComponentBase::get_locationOnScreen(long *x, long *y)
+{
+    
+	CHECK_ENABLE_INF
+
+    try
+    {
+        if (x == NULL || y == NULL)
+            return E_INVALIDARG;
+        // #CHECK XInterface#
+        if(!pRXComp.is())
+            return E_FAIL;
+
+        const ::com::sun::star::awt::Point& pt = GetXInterface()->getLocationOnScreen();
+        *x = pt.X;
+        *y = pt.Y;
+        return S_OK;
+
+    }
+    catch(...)
+    {
+        return E_FAIL;
+    }
+}
+
+/**
+ * Grabs the focus to this object.
+ * 
+ * @param    success    the boolean result to be returned.
+ */
+STDMETHODIMP CAccComponentBase::grabFocus(boolean * success)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    if (success == NULL)
+        return E_INVALIDARG;
+    // #CHECK XInterface#
+    if(!pRXComp.is())
+    {
+        return E_FAIL;
+    }
+    GetXInterface()->grabFocus();
+    *success = TRUE;
+
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Returns the foreground color of this object.
+ * 
+ * @param    Color    the color of foreground.
+ */
+STDMETHODIMP CAccComponentBase::get_foreground(IA2Color * foreground)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    if (foreground == NULL)
+        return E_INVALIDARG;
+    // #CHECK XInterface#
+    if(!pRXComp.is())
+    {
+        return E_FAIL;
+    }
+    *foreground = (long)GetXInterface()->getForeground();
+
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Returns the background color of this object.
+ * 
+ * @param    Color    the color of background.
+ */
+STDMETHODIMP CAccComponentBase::get_background(IA2Color * background)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    if (background == NULL)
+        return E_INVALIDARG;
+    // #CHECK XInterface#
+    if(!pRXComp.is())
+    {
+        return E_FAIL;
+    }
+    *background = (long)GetXInterface()->getBackground();
+
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Overide of IUNOXWrapper.
+ *
+ * @param    pXInterface    the pointer of UNO interface.
+ */
+STDMETHODIMP CAccComponentBase::put_XInterface(long pXInterface)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    CUNOXWrapper::put_XInterface(pXInterface);
+    //special query.
+    if(pUNOInterface == NULL)
+        return E_FAIL;
+    Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+    if( !pRContext.is() )
+    {
+        return E_FAIL;
+    }
+    Reference<XAccessibleComponent> pRXI(pRContext,UNO_QUERY);
+    if( !pRXI.is() )
+        pRXComp = NULL;
+    else
+        pRXComp = pRXI.get();
+
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}

Added: openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccComponentBase.h
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccComponentBase.h?rev=1420522&view=auto
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccComponentBase.h (added)
+++ openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccComponentBase.h Wed Dec 12 04:41:12 2012
@@ -0,0 +1,85 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright IBM Corporation 2010.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+//////////////////////////////////////////////////////////////////////
+// AccComponentBase.h: interface for the CAccComponentBase class.
+//////////////////////////////////////////////////////////////////////
+
+#if !defined(AFX_ACCCOMPONENTBASE_H__946BE230_1DCB_494B_ACF6_32A2E197DD2A__INCLUDED_)
+#define AFX_ACCCOMPONENTBASE_H__946BE230_1DCB_494B_ACF6_32A2E197DD2A__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#define WNT
+
+#include <com/sun/star/uno/reference.hxx>
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+#include "UNOXWrapper.h"
+
+class ATL_NO_VTABLE CAccComponentBase : public CUNOXWrapper
+{
+public:
+    CAccComponentBase();
+    virtual ~CAccComponentBase();
+    // IAccessibleComponent
+public:
+    // IAccessibleComponent
+
+    // Returns the location of the upper left corner of the object's bounding
+    // box relative to the parent.
+    STDMETHOD(get_locationInParent)(long *x, long *y);
+
+    // Returns the location of the upper left corner of the object's bounding
+    // box in screen.
+    STDMETHOD(get_locationOnScreen)(long *x, long *y);
+
+    // Grabs the focus to this object.
+    STDMETHOD(grabFocus)(boolean * success);
+
+    // Returns the foreground color of this object.
+    STDMETHOD(get_foreground)(IA2Color * foreground);
+
+    // Returns the background color of this object.
+    STDMETHOD(get_background)(IA2Color * background);
+
+    // Overide of IUNOXWrapper.
+    STDMETHOD(put_XInterface)(long pXInterface);
+
+protected:
+
+    com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleComponent> pRXComp;
+
+    inline com::sun::star::accessibility::XAccessibleComponent* GetXInterface()
+    {
+        return pRXComp.get();
+    }
+};
+
+#endif // !defined(AFX_ACCCOMPONENTBASE_H__946BE230_1DCB_494B_ACF6_32A2E197DD2A__INCLUDED_)

Added: openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccContext.rgs
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccContext.rgs?rev=1420522&view=auto
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccContext.rgs (added)
+++ openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccContext.rgs Wed Dec 12 04:41:12 2012
@@ -0,0 +1,23 @@
+HKCR
+{
+	UAccCOM.AccContext.1 = s 'AccContext Class'
+	{
+		CLSID = s '{F77CAEC2-F04C-4E74-A36C-F3B557BC59E1}'
+	}
+	UAccCOM.AccContext = s 'AccContext Class'
+	{
+		CLSID = s '{F77CAEC2-F04C-4E74-A36C-F3B557BC59E1}'
+	}
+	NoRemove CLSID
+	{
+		ForceRemove {F77CAEC2-F04C-4E74-A36C-F3B557BC59E1} = s 'AccContext Class'
+		{
+			ProgID = s 'UAccCOM.AccContext.1'
+			VersionIndependentProgID = s 'UAccCOM.AccContext'
+			InprocServer32 = s '%MODULE%'
+			{
+				val ThreadingModel = s 'both'
+			}
+		}
+	}
+}

Added: openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccEditableText.cpp
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccEditableText.cpp?rev=1420522&view=auto
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccEditableText.cpp (added)
+++ openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccEditableText.cpp Wed Dec 12 04:41:12 2012
@@ -0,0 +1,515 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright IBM Corporation 2010.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+/**
+ * AccEditableText.cpp : Implementation of CUAccCOMApp and DLL registration.
+ */
+#include "stdafx.h"
+#include "UAccCOM2.h"
+#include "AccEditableText.h"
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include <com/sun/star/accessibility/XAccessibleText.hpp>
+#include <com/sun/star/awt/FontSlant.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/style/LineSpacing.hpp>
+#include <com/sun/star/style/TabStop.hpp>
+#include <vector>
+
+using namespace com::sun::star::accessibility;
+using namespace com::sun::star::uno;
+using namespace com::sun::star::awt;
+using namespace com::sun::star::beans;
+using namespace std;
+
+/**
+ * Copys a range of text to the clipboard.
+ *
+ * @param    startOffset    the start offset of copying.
+ * @param    endOffset      the end offset of copying.
+ * @param    success        the boolean result to be returned.
+ */
+STDMETHODIMP CAccEditableText::copyText(long startOffset, long endOffset)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    // #CHECK XInterface#
+    if(!pRXEdtTxt.is())
+    {
+        return E_FAIL;
+    }
+
+    if ( GetXInterface()->copyText( startOffset, endOffset ) )
+        return S_OK;
+
+    return E_FAIL;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Deletes a range of text.
+ *
+ * @param    startOffset    the start offset of deleting.
+ * @param    endOffset      the end offset of deleting.
+ * @param    success        the boolean result to be returned.
+ */
+STDMETHODIMP CAccEditableText::deleteText(long startOffset, long endOffset)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    if( !pRXEdtTxt.is() )
+        return E_FAIL;
+
+    if( GetXInterface()->deleteText( startOffset, endOffset ) )
+        return S_OK;
+
+    return E_FAIL;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Inserts text at a specified offset.
+ *
+ * @param    offset    the offset of inserting.
+ * @param    text      the text to be inserted.
+ * @param    success   the boolean result to be returned.
+ */
+STDMETHODIMP CAccEditableText::insertText(long offset, BSTR * text)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    if (text == NULL)
+        return E_INVALIDARG;
+
+    if( !pRXEdtTxt.is() )
+        return E_FAIL;
+
+    ::rtl::OUString ouStr(*text);
+
+    if( GetXInterface()->insertText( ouStr, offset ) )
+        return S_OK;
+
+    return E_FAIL;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Cuts a range of text to the clipboard.
+ *
+ * @param    startOffset    the start offset of cuting.
+ * @param    endOffset      the end offset of cuting.
+ * @param    success        the boolean result to be returned.
+ */
+STDMETHODIMP CAccEditableText::cutText(long startOffset, long endOffset)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    if( !pRXEdtTxt.is() )
+        return E_FAIL;
+
+    if( GetXInterface()->cutText( startOffset, endOffset ) )
+        return S_OK;
+
+    return E_FAIL;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Pastes text from clipboard at specified offset.
+ *
+ * @param    offset    the offset of pasting.
+ * @param    success   the boolean result to be returned.
+ */
+STDMETHODIMP CAccEditableText::pasteText(long offset)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    if( !pRXEdtTxt.is() )
+        return E_FAIL;
+
+    if( GetXInterface()->pasteText( offset ) )
+        return S_OK;
+
+    return E_FAIL;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Replaces range of text with new text.
+ *
+ * @param    startOffset    the start offset of replacing.
+ * @param    endOffset      the end offset of replacing.
+ * @param    text           the replacing text.
+ * @param    success        the boolean result to be returned.
+ */
+STDMETHODIMP CAccEditableText::replaceText(long startOffset, long endOffset, BSTR * text)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    // #CHECK#
+    if (text == NULL)
+        return E_INVALIDARG;
+    if( !pRXEdtTxt.is() )
+        return E_FAIL;
+
+    ::rtl::OUString ouStr(*text);
+
+    if( GetXInterface()->replaceText( startOffset,endOffset, ouStr) )
+        return S_OK;
+    return E_FAIL;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Sets attributes of range of text.
+ *
+ * @param    startOffset    the start offset.
+ * @param    endOffset      the end offset.
+ * @param    attributes     the attribute text.
+ * @param    success        the boolean result to be returned.
+ */
+STDMETHODIMP CAccEditableText::setAttributes(long startOffset, long endOffset, BSTR * attributes)
+{
+    
+	CHECK_ENABLE_INF
+
+    ENTER_PROTECTED_BLOCK
+
+    // #CHECK#
+    if (attributes == NULL)
+        return E_INVALIDARG;
+    if( !pRXEdtTxt.is() )
+        return E_FAIL;
+
+    ::rtl::OUString ouStr(*attributes);
+
+    sal_Int32 nIndex = 0;
+    sal_Unicode cTok = ';';
+    vector< ::rtl::OUString > vecAttr;
+    do
+    {
+        ::rtl::OUString ouToken = ouStr.getToken(0, cTok, nIndex);
+        vecAttr.push_back(ouToken);
+    }
+    while(nIndex >= 0);
+
+    Sequence< PropertyValue > beanSeq(vecAttr.size());
+    for(unsigned int i = 0; i < vecAttr.size(); i ++)
+    {
+        ::rtl::OUString attr = vecAttr[i];
+        sal_Int32 nPos = attr.indexOf(':');
+        if(nPos > -1)
+        {
+            ::rtl::OUString attrName = attr.copy(0, nPos);
+            ::rtl::OUString attrValue = attr.copy(nPos + 1, attr.getLength() - nPos - 1);
+            beanSeq[i].Name = attrName;
+            get_AnyFromOLECHAR(attrName, attrValue, beanSeq[i].Value);
+        }
+    }
+
+    if( GetXInterface()->setAttributes( startOffset,endOffset, beanSeq) )
+        return S_OK;
+
+    return E_FAIL;
+
+    LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Convert attributes string to Any type.
+ * Reference to infra\accessibility\bridge\org\openoffice\java\accessibility\AccessibleTextImpl.java
+ *
+ * @param	ouName		the string of attribute name.
+ * @param	ouValue		the string of attribute value.
+ * @param	rAny		the Any object to be returned.
+ */
+void CAccEditableText::get_AnyFromOLECHAR(const ::rtl::OUString &ouName, const ::rtl::OUString &ouValue, Any &rAny)
+{
+    if(ouName.compareTo(L"CharBackColor") == 0 ||
+            ouName.compareTo(L"CharColor") == 0 ||
+            ouName.compareTo(L"ParaAdjust") == 0 ||
+            ouName.compareTo(L"ParaFirstLineIndent") == 0 ||
+            ouName.compareTo(L"ParaLeftMargin") == 0 ||
+            ouName.compareTo(L"ParaRightMargin") == 0 ||
+            ouName.compareTo(L"ParaTopMargin") == 0 ||
+            ouName.compareTo(L"ParaBottomMargin") == 0 ||
+            ouName.compareTo(L"CharFontPitch") == 0)
+    {
+        // Convert to int.
+        // NOTE: CharFontPitch is not implemented in java file.
+        sal_Int32 nValue = ouValue.toInt32();
+        rAny.setValue(&nValue, getCppuType((sal_Int32 *)0));
+    }
+    else if(ouName.compareTo(L"CharShadowed") == 0 ||
+            ouName.compareTo(L"CharContoured") == 0)
+    {
+        // Convert to boolean.
+        boolean nValue = (boolean)ouValue.toBoolean();
+        rAny.setValue(&nValue, getCppuType((sal_Bool *)sal_False));
+    }
+    else if(ouName.compareTo(L"CharEscapement") == 0 ||
+            ouName.compareTo(L"CharStrikeout") == 0 ||
+            ouName.compareTo(L"CharUnderline") == 0 ||
+            ouName.compareTo(L"CharFontPitch") == 0)
+    {
+        // Convert to short.
+        short nValue = (short)ouValue.toInt32();
+        rAny.setValue(&nValue, getCppuType((short *)0));
+    }
+    else if(ouName.compareTo(L"CharHeight") == 0 ||
+            ouName.compareTo(L"CharWeight") == 0)
+    {
+        // Convert to float.
+        float fValue = ouValue.toFloat();
+        rAny.setValue(&fValue, getCppuType((float *)0));
+    }
+    else if(ouName.compareTo(L"CharFontName") == 0)
+    {
+        // Convert to string.
+        rAny.setValue(&ouValue, getCppuType((::rtl::OUString *)0));
+    }
+    else if(ouName.compareTo(L"CharPosture") == 0)
+    {
+        // Convert to FontSlant.
+        ::com::sun::star::awt::FontSlant fontSlant = (::com::sun::star::awt::FontSlant)ouValue.toInt32();
+        rAny.setValue(&fontSlant, getCppuType((::com::sun::star::awt::FontSlant*)0));
+    }
+    else if(ouName.compareTo(L"ParaTabStops") == 0)
+    {
+        //
+        // Convert to the Sequence with TabStop element.
+        vector< ::com::sun::star::style::TabStop > vecTabStop;
+        ::com::sun::star::style::TabStop tabStop;
+        ::rtl::OUString ouSubValue;
+        sal_Int32 nIndex = 0;
+        sal_Int32 pos = 0, posComma = 0;
+
+        do
+        {
+            // Position.
+            pos = ouValue.indexOf(L"Position=", pos);
+            if(pos != -1)
+            {
+                posComma = ouValue.indexOf(',', pos + 9); // 9 = length of "Position=".
+                if(posComma != -1)
+                {
+                    ouSubValue = ouValue.copy(pos + 9, posComma - pos - 9);
+                    tabStop.Position = ouSubValue.toInt32();
+                    pos = posComma + 1;
+
+                    // TabAlign.
+                    pos = ouValue.indexOf(L"TabAlign=", pos);
+                    if(pos != -1)
+                    {
+                        posComma = ouValue.indexOf(',', pos + 9); // 9 = length of "TabAlign=".
+                        if(posComma != -1)
+                        {
+                            ouSubValue = ouValue.copy(pos + 9, posComma - pos - 9);
+                            tabStop.Alignment = (::com::sun::star::style::TabAlign)ouSubValue.toInt32();
+                            pos = posComma + 1;
+
+                            // DecimalChar.
+                            pos = ouValue.indexOf(L"DecimalChar=", pos);
+                            if(pos != -1)
+                            {
+                                posComma = ouValue.indexOf(',', pos + 11); // 11 = length of "TabAlign=".
+                                if(posComma != -1)
+                                {
+                                    ouSubValue = ouValue.copy(pos + 11, posComma - pos - 11);
+                                    tabStop.DecimalChar = (sal_Unicode)ouSubValue.toChar();
+                                    pos = posComma + 1;
+
+                                    // FillChar.
+                                    pos = ouValue.indexOf(L"FillChar=", pos);
+                                    if(pos != -1)
+                                    {
+                                        posComma = ouValue.indexOf(',', pos + 9); // 9 = length of "TabAlign=".
+                                        if(posComma != -1)
+                                        {
+                                            ouSubValue = ouValue.copy(pos + 9, posComma - pos - 9);
+                                            tabStop.DecimalChar = (sal_Unicode)ouSubValue.toChar();
+                                            pos = posComma + 1;
+
+                                            // Complete TabStop element.
+                                            vecTabStop.push_back(tabStop);
+                                        }
+                                        else
+                                            break;	// No match comma.
+                                    }
+                                    else
+                                        break;	// No match FillChar.
+                                }
+                                else
+                                    break;	// No match comma.
+                            }
+                            else
+                                break;	// No match DecimalChar.
+                        }
+                        else
+                            break;	// No match comma.
+                    }
+                    else
+                        break;	// No match TabAlign.
+                }
+                else
+                    break;	// No match comma.
+            }
+            else
+                break;	// No match Position.
+        }
+        while(pos < ouValue.getLength());
+
+        //
+        // Dump into Sequence.
+        int iSeqLen = (vecTabStop.size() == 0) ? 1 : vecTabStop.size();
+        Sequence< ::com::sun::star::style::TabStop > seqTabStop(iSeqLen);
+
+        if(vecTabStop.size() != 0)
+        {
+            // Dump every element.
+            for(int i = 0; i < iSeqLen; i ++)
+            {
+                seqTabStop[i] = vecTabStop[i];
+            }
+        }
+        else
+        {
+            // Create default value.
+            seqTabStop[0].Position = 0;
+            seqTabStop[0].Alignment = ::com::sun::star::style::TabAlign_DEFAULT;
+            seqTabStop[0].DecimalChar = '.';
+            seqTabStop[0].FillChar = ' ';
+        }
+
+        // Assign to Any object.
+        rAny.setValue(&seqTabStop, getCppuType((Sequence< ::com::sun::star::style::TabStop >*)0));
+    }
+    else if(ouName.compareTo(L"ParaLineSpacing") == 0)
+    {
+        // Parse value string.
+        ::com::sun::star::style::LineSpacing lineSpacing;
+        ::rtl::OUString ouSubValue;
+        sal_Int32 pos = 0, posComma = 0;
+
+        pos = ouValue.indexOf(L"Mode=", pos);
+        if(pos != -1)
+        {
+            posComma = ouValue.indexOf(',', pos + 5); // 5 = length of "Mode=".
+            if(posComma != -1)
+            {
+                ouSubValue = ouValue.copy(pos + 5, posComma - pos - 5);
+                lineSpacing.Mode = (sal_Int16)ouSubValue.toInt32();
+                pos = posComma + 1;
+
+                pos = ouValue.indexOf(L"Height=", pos);
+                if(pos != -1)
+                {
+                    ouSubValue = ouValue.copy(pos + 7, ouValue.getLength() - pos - 7);
+                    lineSpacing.Height = (sal_Int16)ouSubValue.toInt32();
+                }
+                else
+                {
+                    lineSpacing.Height = (sal_Int16)100;	// Default height.
+                }
+            }
+            else
+            {
+                lineSpacing.Height = (sal_Int16)100;	// Default height.
+            }
+        }
+        else
+        {
+            // Default Mode and Height.
+            lineSpacing.Mode = (sal_Int16)0;
+            lineSpacing.Height = (sal_Int16)100;	// Default height.
+        }
+
+        // Convert to Any object.
+        rAny.setValue(&lineSpacing, getCppuType((::com::sun::star::style::LineSpacing* )0));
+    }
+    else
+    {
+        // Do nothing.
+        sal_Int32 nDefault = 0;
+        rAny.setValue(&nDefault, getCppuType((sal_Int32 *)0));
+    }
+}
+
+/**
+ * Overide of IUNOXWrapper.
+ *
+ * @param    pXInterface    the pointer of UNO interface.
+ */
+STDMETHODIMP CAccEditableText::put_XInterface(long pXInterface)
+{
+    
+
+    ENTER_PROTECTED_BLOCK
+
+    CUNOXWrapper::put_XInterface(pXInterface);
+    //special query.
+    if(pUNOInterface == NULL)
+        return E_FAIL;
+    Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+    if( !pRContext.is() )
+    {
+        return E_FAIL;
+    }
+    Reference<XAccessibleEditableText> pRXI(pRContext,UNO_QUERY);
+    if( !pRXI.is() )
+        pRXEdtTxt = NULL;
+    else
+        pRXEdtTxt = pRXI.get();
+    return S_OK;
+
+    LEAVE_PROTECTED_BLOCK
+}

Added: openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccEditableText.h
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccEditableText.h?rev=1420522&view=auto
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccEditableText.h (added)
+++ openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccEditableText.h Wed Dec 12 04:41:12 2012
@@ -0,0 +1,122 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright IBM Corporation 2010.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#if !defined(AFX_ACCEDITABLETEXT_H__0C41AFBE_5A87_4D9D_A284_CEC264D91F81__INCLUDED_)
+#define AFX_ACCEDITABLETEXT_H__0C41AFBE_5A87_4D9D_A284_CEC264D91F81__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "resource.h"
+#include <com/sun/star/uno/reference.hxx>
+#include <com/sun/star/accessibility/XAccessibleEditableText.hpp>
+#include "UNOXWrapper.h"
+
+/**
+ * CAccEditableText implements IAccessibleEditableText interface.
+ */
+class CAccEditableText :
+            public CComObjectRoot,
+            public CComCoClass<CAccEditableText,&CLSID_AccEditableText>,
+            public IAccessibleEditableText,
+            public CUNOXWrapper
+{
+public:
+    CAccEditableText()
+    {
+        
+    }
+    virtual ~CAccEditableText()
+    {
+        
+    }
+
+    BEGIN_COM_MAP(CAccEditableText)
+    COM_INTERFACE_ENTRY(IAccessibleEditableText)
+    COM_INTERFACE_ENTRY(IUNOXWrapper)
+    COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,_SmartQI)
+    END_COM_MAP()
+
+    static HRESULT WINAPI _SmartQI(void* pv,
+                                   REFIID iid, void** ppvObject, DWORD)
+    {
+        return ((CAccEditableText*)pv)->SmartQI(iid,ppvObject);
+    }
+
+    HRESULT SmartQI(REFIID iid, void** ppvObject)
+    {
+        if( m_pOuterUnknown )
+            return OuterQueryInterface(iid,ppvObject);
+        return E_FAIL;
+    }
+
+    DECLARE_REGISTRY_RESOURCEID(IDR_AccEditableText)
+
+    // IAccessibleEditableText
+public:
+    // IAccessibleEditableText
+
+    // Copys a range of text to the clipboard.
+    STDMETHOD(copyText)(long startOffset, long endOffset);
+
+    // Deletes a range of text.
+    STDMETHOD(deleteText)(long startOffset, long endOffset);
+
+    // Inserts text at a specified offset.
+    STDMETHOD(insertText)(long offset, BSTR * text);
+
+    // Cuts a range of text to the clipboard.
+    STDMETHOD(cutText)(long startOffset, long endOffset);
+
+    // Pastes text from clipboard at specified offset.
+    STDMETHOD(pasteText)(long offset);
+
+    // Replaces range of text with new text.
+    STDMETHOD(replaceText)(long startOffset, long endOffset, BSTR * text);
+
+
+    // Sets attributes of range of text.
+    STDMETHOD(setAttributes)(long startOffset, long endOffset, BSTR * attributes);
+
+    // Overide of IUNOXWrapper.
+    STDMETHOD(put_XInterface)(long pXInterface);
+
+private:
+
+    com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEditableText> pRXEdtTxt;
+
+    void get_AnyFromOLECHAR(const ::rtl::OUString &ouName, const ::rtl::OUString &ouValue, com::sun::star::uno::Any &rAny);
+
+    inline com::sun::star::accessibility::XAccessibleEditableText* GetXInterface()
+    {
+        return pRXEdtTxt.get();
+    }
+};
+
+#endif // !defined(AFX_ACCEDITABLETEXT_H__0C41AFBE_5A87_4D9D_A284_CEC264D91F81__INCLUDED_)

Added: openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccEditableText.rgs
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccEditableText.rgs?rev=1420522&view=auto
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccEditableText.rgs (added)
+++ openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccEditableText.rgs Wed Dec 12 04:41:12 2012
@@ -0,0 +1,23 @@
+HKCR
+{
+	UAccCOM.AccEditableText.1 = s 'AccEditableText Class'
+	{
+		CLSID = s '{79CE1450-1F61-48E2-BF76-C07BD10105E2}'
+	}
+	UAccCOM.AccEditableText = s 'AccEditableText Class'
+	{
+		CLSID = s '{79CE1450-1F61-48E2-BF76-C07BD10105E2}'
+	}
+	NoRemove CLSID
+	{
+		ForceRemove {79CE1450-1F61-48E2-BF76-C07BD10105E2} = s 'AccEditableText Class'
+		{
+			ProgID = s 'UAccCOM.AccEditableText.1'
+			VersionIndependentProgID = s 'UAccCOM.AccEditableText'
+			InprocServer32 = s '%MODULE%'
+			{
+				val ThreadingModel = s 'both'
+			}
+		}
+	}
+}

Added: openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccExtendedComponent.rgs
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccExtendedComponent.rgs?rev=1420522&view=auto
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccExtendedComponent.rgs (added)
+++ openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccExtendedComponent.rgs Wed Dec 12 04:41:12 2012
@@ -0,0 +1,23 @@
+HKCR
+{
+	UAccCOM.AccExtendedComponent.1 = s 'AccExtendedComponent Class'
+	{
+		CLSID = s '{D91562E1-BE6C-41F3-A34C-E7AA846561A4}'
+	}
+	UAccCOM.AccExtendedComponent = s 'AccExtendedComponent Class'
+	{
+		CLSID = s '{D91562E1-BE6C-41F3-A34C-E7AA846561A4}'
+	}
+	NoRemove CLSID
+	{
+		ForceRemove {D91562E1-BE6C-41F3-A34C-E7AA846561A4} = s 'AccExtendedComponent Class'
+		{
+			ProgID = s 'UAccCOM.AccExtendedComponent.1'
+			VersionIndependentProgID = s 'UAccCOM.AccExtendedComponent'
+			InprocServer32 = s '%MODULE%'
+			{
+				val ThreadingModel = s 'both'
+			}
+		}
+	}
+}

Added: openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccFont.rgs
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccFont.rgs?rev=1420522&view=auto
==============================================================================
--- openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccFont.rgs (added)
+++ openoffice/branches/ia2/main/winaccessibility/source/UAccCOM/AccFont.rgs Wed Dec 12 04:41:12 2012
@@ -0,0 +1,23 @@
+HKCR
+{
+	UAccCOM.AccFont.1 = s 'AccFont Class'
+	{
+		CLSID = s '{185B9AD9-5D31-4793-888F-A21846BBAEDD}'
+	}
+	UAccCOM.AccFont = s 'AccFont Class'
+	{
+		CLSID = s '{185B9AD9-5D31-4793-888F-A21846BBAEDD}'
+	}
+	NoRemove CLSID
+	{
+		ForceRemove {185B9AD9-5D31-4793-888F-A21846BBAEDD} = s 'AccFont Class'
+		{
+			ProgID = s 'UAccCOM.AccFont.1'
+			VersionIndependentProgID = s 'UAccCOM.AccFont'
+			InprocServer32 = s '%MODULE%'
+			{
+				val ThreadingModel = s 'both'
+			}
+		}
+	}
+}



Mime
View raw message