Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / winaccessibility / source / UAccCOM / AccText.cxx
blob39bce542e36da33a2a11a2405aed5baecd345624
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include "stdafx.h"
21 #include "AccText.h"
23 #if defined __clang__
24 #pragma clang diagnostic push
25 #pragma clang diagnostic ignored "-Wnon-virtual-dtor"
26 #endif
27 #include "UAccCOM.h"
28 #if defined __clang__
29 #pragma clang diagnostic pop
30 #endif
32 using namespace com::sun::star::accessibility;
33 using namespace com::sun::star::uno;
35 /**
36 * Get special selection.
37 * @param startOffset Start selection offset.
38 * @param endOffset End selection offset.
39 * @param success Variant to accept the result of if the method call is successful.
40 * @return Result.
42 STDMETHODIMP CAccText::addSelection(long startOffset, long endOffset)//, unsigned char * success)
45 return CAccTextBase::get_addSelection(startOffset, endOffset);//, success);
48 /**
49 * Get special attributes.
50 * @param offset Offset.
51 * @param startOffset Variant to accept start offset.
52 * @param endOffset Variant to accept end offset.
53 * @param textAttributes Variant to accept attributes.
54 * @return Result.
56 STDMETHODIMP CAccText::get_attributes(long offset, long * startOffset, long * endOffset, BSTR * textAttributes)
59 return CAccTextBase::get_attributes(offset, startOffset, endOffset, textAttributes);
62 /**
63 * Get caret position.
64 * @param offset Variant to accept caret offset.
65 * @return Result.
67 STDMETHODIMP CAccText::get_caretOffset(long * offset)
70 return CAccTextBase::get_caretOffset(offset);
73 /**
74 * Get character count.
75 * @param nCharacters Variant to accept character count.
76 * @return Result.
78 STDMETHODIMP CAccText::get_characterCount(long * nCharacters)
81 return CAccTextBase::get_characterCount(nCharacters);
84 /**
85 * Get character extents.
86 * @param offset Offset.
87 * @param x Variant to accept x position.
88 * @param y Variant to accept y position.
89 * @param width Variant to accept width.
90 * @param Height Variant to accept height.
91 * @return Result.
93 STDMETHODIMP CAccText::get_characterExtents(long offset, IA2CoordinateType coordType, long * x, long * y, long * width, long * height)
96 return CAccTextBase::get_characterExtents(offset, coordType, x, y, width, height);
99 /**
100 * Get selections count.
101 * @param nSelections Variant to accept selections count.
102 * @return Result.
104 STDMETHODIMP CAccText::get_nSelections(long * nSelections)
107 return CAccTextBase::get_nSelections(nSelections);
111 * Get offset of some special point.
112 * @param x X position of one point.
113 * @param x Y position of one point.
114 * @param coordType Type.
115 * @param offset Variant to accept offset.
116 * @return Result.
119 STDMETHODIMP CAccText::get_offsetAtPoint(long x, long y, IA2CoordinateType coordType, long * offset)
122 return CAccTextBase::get_offsetAtPoint(x, y, coordType, offset);
126 * Get selection range.
127 * @param selection selection count.
128 * @param startOffset Variant to accept the start offset of special selection.
129 * @param endOffset Variant to accept the end offset of special selection.
130 * @return Result.
132 STDMETHODIMP CAccText::get_selection(long selection, long * startOffset, long * endOffset)
135 return CAccTextBase::get_selection(selection, startOffset, endOffset);
139 * Get special text.
140 * @param startOffset Start position of special range.
141 * @param endOffset End position of special range.
142 * @param text Variant to accept the text of special range.
143 * @return Result.
145 STDMETHODIMP CAccText::get_text(long startOffset, long endOffset, BSTR * text)
148 return CAccTextBase::get_text(startOffset, endOffset, text);
152 * Get special text before some position.
153 * @param offset Special position.
154 * @param boundaryType Boundary type.
155 * @param startOffset Variant to accept the start offset.
156 * @param endOffset Variant to accept the end offset.
157 * @param text Variant to accept the special text.
158 * @return Result.
160 STDMETHODIMP CAccText::get_textBeforeOffset(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text)
163 return CAccTextBase::get_textBeforeOffset(offset, boundaryType,
164 startOffset, endOffset, text);
168 * Get special text after some position.
169 * @param offset Special position.
170 * @param boundaryType Boundary type.
171 * @param startOffset Variant to accept the start offset.
172 * @param endOffset Variant to accept the end offset.
173 * @param text Variant to accept the special text.
174 * @return Result.
176 STDMETHODIMP CAccText::get_textAfterOffset(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text)
179 return CAccTextBase::get_textAfterOffset(offset, boundaryType,
180 startOffset, endOffset, text);
184 * Get special text at some position.
185 * @param offset Special position.
186 * @param boundaryType Boundary type.
187 * @param startOffset Variant to accept the start offset.
188 * @param endOffset Variant to accept the end offset.
189 * @param text Variant to accept the special text.
190 * @return Result.
192 STDMETHODIMP CAccText::get_textAtOffset(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text)
195 return CAccTextBase::get_textAtOffset(offset, boundaryType,
196 startOffset, endOffset, text);
200 * Remove selection.
201 * @param selectionIndex Special selection index
202 * @param success Variant to accept the memthod called result.
203 * @return Result.
205 STDMETHODIMP CAccText::removeSelection(long selectionIndex)//, unsigned char * success)
208 return CAccTextBase::removeSelection(selectionIndex);//, success);
212 * Set caret position.
213 * @param offset Special position.
214 * @param success Variant to accept the memthod called result.
215 * @return Result.
217 STDMETHODIMP CAccText::setCaretOffset(long offset)
220 return CAccTextBase::setCaretOffset(offset);
224 * Set special selection.
225 * @param selectionIndex Special selection index.
226 * @param startOffset start position.
227 * @param endOffset end position.
228 * @param success Variant to accept the memthod called result.
229 * @return Result.
232 STDMETHODIMP CAccText::setSelection(long selectionIndex, long startOffset, long endOffset)
235 return CAccTextBase::setSelection(selectionIndex, startOffset,
236 endOffset);
240 * Get characters count.
241 * @param nCharacters Variant to accept the characters count.
242 * @return Result.
244 STDMETHODIMP CAccText::get_nCharacters(long * nCharacters)
247 return CAccTextBase::get_nCharacters(nCharacters);
250 STDMETHODIMP CAccText::get_newText( IA2TextSegment *newText)
252 return CAccTextBase::get_newText(newText);
255 STDMETHODIMP CAccText::get_oldText( IA2TextSegment *oldText)
257 return CAccTextBase::get_oldText(oldText);
261 * Scroll to special sub-string .
262 * @param startIndex Start index of sub string.
263 * @param endIndex End index of sub string.
264 * @return Result.
266 STDMETHODIMP CAccText::scrollSubstringToPoint(long startIndex, long endIndex,enum IA2CoordinateType coordinateType, long x, long y )
269 return CAccTextBase::scrollSubstringToPoint(startIndex, endIndex, coordinateType, x, y);
272 STDMETHODIMP CAccText::scrollSubstringTo(long startIndex, long endIndex,enum IA2ScrollType scrollType)
275 return CAccTextBase::scrollSubstringTo(startIndex, endIndex,scrollType);
279 * Put UNO interface.
280 * @param pXInterface UNO interface.
281 * @return Result.
283 STDMETHODIMP CAccText::put_XInterface(hyper pXInterface)
286 return CAccTextBase::put_XInterface(pXInterface);
289 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */