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 #include "stdafx.h" 30 #include "UAccCOM2.h" 31 #include "AccText.h" 32 33 using namespace com::sun::star::accessibility; 34 using namespace com::sun::star::uno; 35 36 /** 37 * Get special selection. 38 * @param startOffset Start selection offset. 39 * @param endOffset End selection offset. 40 * @param success Variant to accept the result of if the method call is successful. 41 * @return Result. 42 */ 43 STDMETHODIMP CAccText::addSelection(long startOffset, long endOffset)//, unsigned char * success) 44 { 45 46 return CAccTextBase::get_addSelection(startOffset, endOffset);//, success); 47 } 48 49 /** 50 * Get special attributes. 51 * @param offset Offset. 52 * @param startOffset Variant to accept start offset. 53 * @param endOffset Variant to accept end offset. 54 * @param textAttributes Variant to accept attributes. 55 * @return Result. 56 */ 57 STDMETHODIMP CAccText::get_attributes(long offset, long * startOffset, long * endOffset, BSTR * textAttributes) 58 { 59 60 return CAccTextBase::get_attributes(offset, startOffset, endOffset, textAttributes); 61 } 62 63 /** 64 * Get caret position. 65 * @param offset Variant to accept caret offset. 66 * @return Result. 67 */ 68 STDMETHODIMP CAccText::get_caretOffset(long * offset) 69 { 70 71 return CAccTextBase::get_caretOffset(offset); 72 } 73 74 /** 75 * Get character count. 76 * @param nCharacters Variant to accept character count. 77 * @return Result. 78 */ 79 STDMETHODIMP CAccText::get_characterCount(long * nCharacters) 80 { 81 82 return CAccTextBase::get_characterCount(nCharacters); 83 } 84 85 /** 86 * Get character extents. 87 * @param offset Offset. 88 * @param x Variant to accpet x position. 89 * @param y Variant to accpet y position. 90 * @param width Variant to accpet width. 91 * @param Height Variant to accpet height. 92 * @return Result. 93 */ 94 STDMETHODIMP CAccText::get_characterExtents(long offset, IA2CoordinateType coordType, long * x, long * y, long * width, long * height) 95 { 96 97 return CAccTextBase::get_characterExtents(offset, coordType, x, y, width, height); 98 } 99 100 /** 101 * Get slections count. 102 * @param nSelections Variant to accpet slections count. 103 * @return Result. 104 */ 105 STDMETHODIMP CAccText::get_nSelections(long * nSelections) 106 { 107 108 return CAccTextBase::get_nSelections(nSelections); 109 } 110 111 /** 112 * Get offset of some special point. 113 * @param x X position of one point. 114 * @param x Y position of one point. 115 * @param coordType Type. 116 * @param offset Variant to accept offset. 117 * @return Result. 118 */ 119 120 STDMETHODIMP CAccText::get_offsetAtPoint(long x, long y, IA2CoordinateType coordType, long * offset) 121 { 122 123 return CAccTextBase::get_offsetAtPoint(x, y, coordType, offset); 124 } 125 126 /** 127 * Get selection range. 128 * @param selection selection count. 129 * @param startOffset Variant to accept the start offset of special selection. 130 * @param endOffset Variant to accept the end offset of special selection. 131 * @return Result. 132 */ 133 STDMETHODIMP CAccText::get_selection(long selection, long * startOffset, long * endOffset) 134 { 135 136 return CAccTextBase::get_selection(selection, startOffset, endOffset); 137 } 138 139 /** 140 * Get special text. 141 * @param startOffset Start position of special range. 142 * @param endOffset End position of special range. 143 * @param text Variant to accept the text of special range. 144 * @return Result. 145 */ 146 STDMETHODIMP CAccText::get_text(long startOffset, long endOffset, BSTR * text) 147 { 148 149 return CAccTextBase::get_text(startOffset, endOffset, text); 150 } 151 152 /** 153 * Get special text before some position. 154 * @param offset Special position. 155 * @param boundaryType Boundary type. 156 * @param startOffset Variant to accept the start offset. 157 * @param endOffset Variant to accept the end offset. 158 * @param text Variant to accept the special text. 159 * @return Result. 160 */ 161 STDMETHODIMP CAccText::get_textBeforeOffset(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text) 162 { 163 164 return CAccTextBase::get_textBeforeOffset(offset, boundaryType, 165 startOffset, endOffset, text); 166 } 167 168 /** 169 * Get special text after some position. 170 * @param offset Special position. 171 * @param boundaryType Boundary type. 172 * @param startOffset Variant to accept the start offset. 173 * @param endOffset Variant to accept the end offset. 174 * @param text Variant to accept the special text. 175 * @return Result. 176 */ 177 STDMETHODIMP CAccText::get_textAfterOffset(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text) 178 { 179 180 return CAccTextBase::get_textAfterOffset(offset, boundaryType, 181 startOffset, endOffset, text); 182 } 183 184 /** 185 * Get special text at some position. 186 * @param offset Special position. 187 * @param boundaryType Boundary type. 188 * @param startOffset Variant to accept the start offset. 189 * @param endOffset Variant to accept the end offset. 190 * @param text Variant to accept the special text. 191 * @return Result. 192 */ 193 STDMETHODIMP CAccText::get_textAtOffset(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text) 194 { 195 196 return CAccTextBase::get_textAtOffset(offset, boundaryType, 197 startOffset, endOffset, text); 198 } 199 200 /** 201 * Remove selection. 202 * @param selectionIndex Special selection index 203 * @param success Variant to accept the memthod called result. 204 * @return Result. 205 */ 206 STDMETHODIMP CAccText::removeSelection(long selectionIndex)//, unsigned char * success) 207 { 208 209 return CAccTextBase::removeSelection(selectionIndex);//, success); 210 } 211 212 /** 213 * Set caret position. 214 * @param offset Special position. 215 * @param success Variant to accept the memthod called result. 216 * @return Result. 217 */ 218 STDMETHODIMP CAccText::setCaretOffset(long offset) 219 { 220 221 return CAccTextBase::setCaretOffset(offset); 222 } 223 224 /** 225 * Set special selection. 226 * @param selectionIndex Special selection index. 227 * @param startOffset start position. 228 * @param endOffset end position. 229 * @param success Variant to accept the memthod called result. 230 * @return Result. 231 */ 232 233 STDMETHODIMP CAccText::setSelection(long selectionIndex, long startOffset, long endOffset) 234 { 235 236 return CAccTextBase::setSelection(selectionIndex, startOffset, 237 endOffset); 238 } 239 240 /** 241 * Get characters count. 242 * @param nCharacters Variant to accept the characters count. 243 * @return Result. 244 */ 245 STDMETHODIMP CAccText::get_nCharacters(long * nCharacters) 246 { 247 248 return CAccTextBase::get_nCharacters(nCharacters); 249 } 250 251 STDMETHODIMP CAccText::get_newText( IA2TextSegment *newText) 252 { 253 return CAccTextBase::get_newText(newText); 254 } 255 256 STDMETHODIMP CAccText::get_oldText( IA2TextSegment *oldText) 257 { 258 return CAccTextBase::get_oldText(oldText); 259 } 260 261 /** 262 * Scroll to special sub-string . 263 * @param startIndex Start index of sub string. 264 * @param endIndex End index of sub string. 265 * @return Result. 266 */ 267 STDMETHODIMP CAccText::scrollSubstringToPoint(long startIndex, long endIndex,enum IA2CoordinateType coordinateType, long x, long y ) 268 { 269 270 return CAccTextBase::scrollSubstringToPoint(startIndex, endIndex, coordinateType, x, y); 271 } 272 273 STDMETHODIMP CAccText::scrollSubstringTo(long startIndex, long endIndex,enum IA2ScrollType scrollType) 274 { 275 276 return CAccTextBase::scrollSubstringTo(startIndex, endIndex,scrollType); 277 } 278 279 /** 280 * Put UNO interface. 281 * @param pXInterface UNO interface. 282 * @return Result. 283 */ 284 STDMETHODIMP CAccText::put_XInterface(long pXInterface) 285 { 286 287 return CAccTextBase::put_XInterface(pXInterface); 288 } 289 290