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