1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright IBM Corporation 2010. 6 * Copyright 2000, 2010 Oracle and/or its affiliates. 7 * 8 * OpenOffice.org - a multi-platform office productivity suite 9 * 10 * This file is part of OpenOffice.org. 11 * 12 * OpenOffice.org is free software: you can redistribute it and/or modify 13 * it under the terms of the GNU Lesser General Public License version 3 14 * only, as published by the Free Software Foundation. 15 * 16 * OpenOffice.org is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU Lesser General Public License version 3 for more details 20 * (a copy is included in the LICENSE file that accompanied this code). 21 * 22 * You should have received a copy of the GNU Lesser General Public License 23 * version 3 along with OpenOffice.org. If not, see 24 * <http://www.openoffice.org/license.html> 25 * for a copy of the LGPLv3 License. 26 * 27 ************************************************************************/ 28 29 ////////////////////////////////////////////////////////////////////// 30 // AccActionBase.h: interface for the CAccActionBase class. 31 ////////////////////////////////////////////////////////////////////// 32 33 #if !defined(AFX_ACCACTIONBASE_H__F87FAD24_D66E_4D22_9B24_3304A303DC84__INCLUDED_) 34 #define AFX_ACCACTIONBASE_H__F87FAD24_D66E_4D22_9B24_3304A303DC84__INCLUDED_ 35 36 #if _MSC_VER > 1000 37 #pragma once 38 #endif // _MSC_VER > 1000 39 40 #define WNT 41 42 #include <com/sun/star/uno/reference.hxx> 43 #include <com/sun/star/accessibility/XAccessibleAction.hpp> 44 #include "UNOXWrapper.h" 45 46 class ATL_NO_VTABLE CAccActionBase : public CUNOXWrapper 47 { 48 public: 49 CAccActionBase(); 50 virtual ~CAccActionBase(); 51 52 // IAccessibleAction 53 public: 54 // IAccessibleAction 55 56 // Returns the number of action. 57 STDMETHOD(nActions)(/*[out,retval]*/long* nActions); 58 59 // Performs specified action on the object. 60 STDMETHOD(doAction)(/* [in] */ long actionIndex); 61 62 // Gets description of specified action. 63 STDMETHOD(get_description)(long actionIndex,BSTR __RPC_FAR *description); 64 65 // added by qiuhd, 2006/06/28, for driver 07/11 66 // get the action name 67 STDMETHOD(get_name)( long actionIndex, BSTR __RPC_FAR *name); 68 69 // get the localized action Name 70 STDMETHOD(get_localizedName)( long actionIndex, BSTR __RPC_FAR *localizedName); 71 72 // Returns key binding object (if any) associated with specified action 73 // key binding is string. 74 // e.g. "alt+d" (like IAccessible::get_accKeyboardShortcut). 75 STDMETHOD(get_keyBinding)( 76 /* [in] */ long actionIndex, 77 /* [in] */ long nMaxBinding, 78 /* [length_is][length_is][size_is][size_is][out] */ BSTR __RPC_FAR *__RPC_FAR *keyBinding, 79 /* [retval][out] */ long __RPC_FAR *nBinding); 80 81 // Overide of IUNOXWrapper. 82 STDMETHOD(put_XInterface)(long pXInterface); 83 84 static void GetkeyBindingStrByXkeyBinding( const com::sun::star::uno::Sequence< com::sun::star::awt::KeyStroke > &keySet, OLECHAR* pString ); 85 86 protected: 87 88 static OLECHAR* getOLECHARFromKeyCode(long key); 89 90 com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleAction> pRXAct; 91 92 private: 93 inline com::sun::star::accessibility::XAccessibleAction* GetXInterface() 94 { 95 return pRXAct.get(); 96 } 97 }; 98 99 #endif // !defined(AFX_ACCACTIONBASE_H__F87FAD24_D66E_4D22_9B24_3304A303DC84__INCLUDED_) 100