1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 /**
23  * AccAction.cpp : Implementation of CAccAction
24  */
25 #include "stdafx.h"
26 #include "UAccCOM2.h"
27 #include "AccAction.h"
28 
29 using namespace com::sun::star::accessibility;
30 using namespace com::sun::star::uno;
31 
32 /**
33  * Returns the number of action.
34  *
35  * @param    nActions    the number of action.
36  */
nActions(long * nActions)37 STDMETHODIMP CAccAction::nActions(/*[out,retval]*/long* nActions)
38 {
39 
40     return CAccActionBase::nActions(nActions);
41 }
42 
43 /**
44  * Performs specified action on the object.
45  *
46  * @param    actionIndex    the index of action.
47  */
doAction(long actionIndex)48 STDMETHODIMP CAccAction::doAction(/* [in] */ long actionIndex)
49 {
50 
51     return CAccActionBase::doAction(actionIndex);
52 }
53 
54 /**
55  * Gets description of specified action.
56  *
57  * @param    actionIndex    the index of action.
58  * @param    description    the description string of the specified action.
59  */
get_description(long actionIndex,BSTR __RPC_FAR * description)60 STDMETHODIMP CAccAction::get_description(long actionIndex,BSTR __RPC_FAR *description)
61 {
62 
63     return CAccActionBase::get_description(actionIndex, description);
64 }
65 
get_name(long actionIndex,BSTR __RPC_FAR * name)66 STDMETHODIMP CAccAction::get_name( long actionIndex, BSTR __RPC_FAR *name)
67 {
68 
69     return CAccActionBase::get_name(actionIndex, name);
70 }
71 
get_localizedName(long actionIndex,BSTR __RPC_FAR * localizedName)72 STDMETHODIMP CAccAction::get_localizedName( long actionIndex, BSTR __RPC_FAR *localizedName)
73 {
74 
75     return CAccActionBase::get_localizedName(actionIndex, localizedName);
76 }
77 
78 /**
79  * Returns key binding object (if any) associated with specified action
80  * key binding is string.
81  * e.g. "alt+d" (like IAccessible::get_accKeyboardShortcut).
82  *
83  * @param    actionIndex    the index of action.
84  * @param    nMaxBinding    the max number of key binding.
85  * @param    keyBinding     the key binding array.
86  * @param    nBinding       the actual number of key binding returned.
87  */
get_keyBinding(long actionIndex,long nMaxBinding,BSTR __RPC_FAR * __RPC_FAR * keyBinding,long __RPC_FAR * nBinding)88 STDMETHODIMP CAccAction::get_keyBinding(
89     /* [in] */ long actionIndex,
90     /* [in] */ long nMaxBinding,
91     /* [length_is][length_is][size_is][size_is][out] */ BSTR __RPC_FAR *__RPC_FAR *keyBinding,
92     /* [retval][out] */ long __RPC_FAR *nBinding)
93 {
94 
95     return CAccActionBase::get_keyBinding(actionIndex, nMaxBinding,	keyBinding, nBinding);
96 }
97 
98 /**
99  * Overide of IUNOXWrapper.
100  *
101  * @param    pXInterface    the pointer of UNO interface.
102  */
put_XInterface(long pXInterface)103 STDMETHODIMP CAccAction::put_XInterface(long pXInterface)
104 {
105 
106     return CAccActionBase::put_XInterface(pXInterface);
107 }
108 /**
109    * Put UNO interface.
110    * @param pXSubInterface XAccessibleHyperlink interface.
111    * @return Result.
112 */
put_XSubInterface(long pXSubInterface)113 STDMETHODIMP CAccAction::put_XSubInterface(long pXSubInterface)
114 {
115 
116 
117     pRXAct = (XAccessibleAction*)pXSubInterface;
118 
119     return S_OK;
120 }
121