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 * AccAction.cpp : Implementation of CAccAction 31 */ 32 #include "stdafx.h" 33 #include "UAccCOM2.h" 34 #include "AccAction.h" 35 36 using namespace com::sun::star::accessibility; 37 using namespace com::sun::star::uno; 38 39 /** 40 * Returns the number of action. 41 * 42 * @param nActions the number of action. 43 */ 44 STDMETHODIMP CAccAction::nActions(/*[out,retval]*/long* nActions) 45 { 46 47 return CAccActionBase::nActions(nActions); 48 } 49 50 /** 51 * Performs specified action on the object. 52 * 53 * @param actionIndex the index of action. 54 */ 55 STDMETHODIMP CAccAction::doAction(/* [in] */ long actionIndex) 56 { 57 58 return CAccActionBase::doAction(actionIndex); 59 } 60 61 /** 62 * Gets description of specified action. 63 * 64 * @param actionIndex the index of action. 65 * @param description the description string of the specified action. 66 */ 67 STDMETHODIMP CAccAction::get_description(long actionIndex,BSTR __RPC_FAR *description) 68 { 69 70 return CAccActionBase::get_description(actionIndex, description); 71 } 72 73 STDMETHODIMP CAccAction::get_name( long actionIndex, BSTR __RPC_FAR *name) 74 { 75 76 return CAccActionBase::get_name(actionIndex, name); 77 } 78 79 STDMETHODIMP CAccAction::get_localizedName( long actionIndex, BSTR __RPC_FAR *localizedName) 80 { 81 82 return CAccActionBase::get_localizedName(actionIndex, localizedName); 83 } 84 85 /** 86 * Returns key binding object (if any) associated with specified action 87 * key binding is string. 88 * e.g. "alt+d" (like IAccessible::get_accKeyboardShortcut). 89 * 90 * @param actionIndex the index of action. 91 * @param nMaxBinding the max number of key binding. 92 * @param keyBinding the key binding array. 93 * @param nBinding the actual number of key binding returned. 94 */ 95 STDMETHODIMP CAccAction::get_keyBinding( 96 /* [in] */ long actionIndex, 97 /* [in] */ long nMaxBinding, 98 /* [length_is][length_is][size_is][size_is][out] */ BSTR __RPC_FAR *__RPC_FAR *keyBinding, 99 /* [retval][out] */ long __RPC_FAR *nBinding) 100 { 101 102 return CAccActionBase::get_keyBinding(actionIndex, nMaxBinding, keyBinding, nBinding); 103 } 104 105 /** 106 * Overide of IUNOXWrapper. 107 * 108 * @param pXInterface the pointer of UNO interface. 109 */ 110 STDMETHODIMP CAccAction::put_XInterface(long pXInterface) 111 { 112 113 return CAccActionBase::put_XInterface(pXInterface); 114 } 115 /** 116 * Put UNO interface. 117 * @param pXSubInterface XAccessibleHyperlink interface. 118 * @return Result. 119 */ 120 STDMETHODIMP CAccAction::put_XSubInterface(long pXSubInterface) 121 { 122 123 124 pRXAct = (XAccessibleAction*)pXSubInterface; 125 126 return S_OK; 127 } 128