1*3a700b0aSSteve Yin /************************************************************** 25fdc4257SSteve Yin * 3*3a700b0aSSteve Yin * Licensed to the Apache Software Foundation (ASF) under one 4*3a700b0aSSteve Yin * or more contributor license agreements. See the NOTICE file 5*3a700b0aSSteve Yin * distributed with this work for additional information 6*3a700b0aSSteve Yin * regarding copyright ownership. The ASF licenses this file 7*3a700b0aSSteve Yin * to you under the Apache License, Version 2.0 (the 8*3a700b0aSSteve Yin * "License"); you may not use this file except in compliance 9*3a700b0aSSteve Yin * with the License. You may obtain a copy of the License at 105fdc4257SSteve Yin * 11*3a700b0aSSteve Yin * http://www.apache.org/licenses/LICENSE-2.0 125fdc4257SSteve Yin * 13*3a700b0aSSteve Yin * Unless required by applicable law or agreed to in writing, 14*3a700b0aSSteve Yin * software distributed under the License is distributed on an 15*3a700b0aSSteve Yin * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*3a700b0aSSteve Yin * KIND, either express or implied. See the License for the 17*3a700b0aSSteve Yin * specific language governing permissions and limitations 18*3a700b0aSSteve Yin * under the License. 195fdc4257SSteve Yin * 20*3a700b0aSSteve Yin *************************************************************/ 215fdc4257SSteve Yin 225fdc4257SSteve Yin /** 235fdc4257SSteve Yin * AccAction.cpp : Implementation of CAccAction 245fdc4257SSteve Yin */ 255fdc4257SSteve Yin #include "stdafx.h" 265fdc4257SSteve Yin #include "UAccCOM2.h" 275fdc4257SSteve Yin #include "AccAction.h" 285fdc4257SSteve Yin 295fdc4257SSteve Yin using namespace com::sun::star::accessibility; 305fdc4257SSteve Yin using namespace com::sun::star::uno; 315fdc4257SSteve Yin 325fdc4257SSteve Yin /** 335fdc4257SSteve Yin * Returns the number of action. 345fdc4257SSteve Yin * 355fdc4257SSteve Yin * @param nActions the number of action. 365fdc4257SSteve Yin */ 375fdc4257SSteve Yin STDMETHODIMP CAccAction::nActions(/*[out,retval]*/long* nActions) 385fdc4257SSteve Yin { 395fdc4257SSteve Yin 405fdc4257SSteve Yin return CAccActionBase::nActions(nActions); 415fdc4257SSteve Yin } 425fdc4257SSteve Yin 435fdc4257SSteve Yin /** 445fdc4257SSteve Yin * Performs specified action on the object. 455fdc4257SSteve Yin * 465fdc4257SSteve Yin * @param actionIndex the index of action. 475fdc4257SSteve Yin */ 485fdc4257SSteve Yin STDMETHODIMP CAccAction::doAction(/* [in] */ long actionIndex) 495fdc4257SSteve Yin { 505fdc4257SSteve Yin 515fdc4257SSteve Yin return CAccActionBase::doAction(actionIndex); 525fdc4257SSteve Yin } 535fdc4257SSteve Yin 545fdc4257SSteve Yin /** 555fdc4257SSteve Yin * Gets description of specified action. 565fdc4257SSteve Yin * 575fdc4257SSteve Yin * @param actionIndex the index of action. 585fdc4257SSteve Yin * @param description the description string of the specified action. 595fdc4257SSteve Yin */ 605fdc4257SSteve Yin STDMETHODIMP CAccAction::get_description(long actionIndex,BSTR __RPC_FAR *description) 615fdc4257SSteve Yin { 625fdc4257SSteve Yin 635fdc4257SSteve Yin return CAccActionBase::get_description(actionIndex, description); 645fdc4257SSteve Yin } 655fdc4257SSteve Yin 665fdc4257SSteve Yin STDMETHODIMP CAccAction::get_name( long actionIndex, BSTR __RPC_FAR *name) 675fdc4257SSteve Yin { 685fdc4257SSteve Yin 695fdc4257SSteve Yin return CAccActionBase::get_name(actionIndex, name); 705fdc4257SSteve Yin } 715fdc4257SSteve Yin 725fdc4257SSteve Yin STDMETHODIMP CAccAction::get_localizedName( long actionIndex, BSTR __RPC_FAR *localizedName) 735fdc4257SSteve Yin { 745fdc4257SSteve Yin 755fdc4257SSteve Yin return CAccActionBase::get_localizedName(actionIndex, localizedName); 765fdc4257SSteve Yin } 775fdc4257SSteve Yin 785fdc4257SSteve Yin /** 795fdc4257SSteve Yin * Returns key binding object (if any) associated with specified action 805fdc4257SSteve Yin * key binding is string. 815fdc4257SSteve Yin * e.g. "alt+d" (like IAccessible::get_accKeyboardShortcut). 825fdc4257SSteve Yin * 835fdc4257SSteve Yin * @param actionIndex the index of action. 845fdc4257SSteve Yin * @param nMaxBinding the max number of key binding. 855fdc4257SSteve Yin * @param keyBinding the key binding array. 865fdc4257SSteve Yin * @param nBinding the actual number of key binding returned. 875fdc4257SSteve Yin */ 885fdc4257SSteve Yin STDMETHODIMP CAccAction::get_keyBinding( 895fdc4257SSteve Yin /* [in] */ long actionIndex, 905fdc4257SSteve Yin /* [in] */ long nMaxBinding, 915fdc4257SSteve Yin /* [length_is][length_is][size_is][size_is][out] */ BSTR __RPC_FAR *__RPC_FAR *keyBinding, 925fdc4257SSteve Yin /* [retval][out] */ long __RPC_FAR *nBinding) 935fdc4257SSteve Yin { 945fdc4257SSteve Yin 955fdc4257SSteve Yin return CAccActionBase::get_keyBinding(actionIndex, nMaxBinding, keyBinding, nBinding); 965fdc4257SSteve Yin } 975fdc4257SSteve Yin 985fdc4257SSteve Yin /** 995fdc4257SSteve Yin * Overide of IUNOXWrapper. 1005fdc4257SSteve Yin * 1015fdc4257SSteve Yin * @param pXInterface the pointer of UNO interface. 1025fdc4257SSteve Yin */ 1035fdc4257SSteve Yin STDMETHODIMP CAccAction::put_XInterface(long pXInterface) 1045fdc4257SSteve Yin { 1055fdc4257SSteve Yin 1065fdc4257SSteve Yin return CAccActionBase::put_XInterface(pXInterface); 1075fdc4257SSteve Yin } 1085fdc4257SSteve Yin /** 1095fdc4257SSteve Yin * Put UNO interface. 1105fdc4257SSteve Yin * @param pXSubInterface XAccessibleHyperlink interface. 1115fdc4257SSteve Yin * @return Result. 1125fdc4257SSteve Yin */ 1135fdc4257SSteve Yin STDMETHODIMP CAccAction::put_XSubInterface(long pXSubInterface) 1145fdc4257SSteve Yin { 1155fdc4257SSteve Yin 1165fdc4257SSteve Yin 1175fdc4257SSteve Yin pRXAct = (XAccessibleAction*)pXSubInterface; 1185fdc4257SSteve Yin 1195fdc4257SSteve Yin return S_OK; 1205fdc4257SSteve Yin } 121