LibreOffice Module winaccessibility (master) 1
Public Member Functions | Static Public Member Functions | List of all members
CAccText Class Reference

CAccText implements IAccessibleText interface. More...

#include <AccText.h>

Inheritance diagram for CAccText:
[legend]
Collaboration diagram for CAccText:
[legend]

Public Member Functions

 CAccText ()
 
HRESULT SmartQI (REFIID iid, void **ppvObject)
 
STDMETHOD() addSelection (long startOffset, long endOffset) override
 Get special selection. More...
 
STDMETHOD() get_attributes (long offset, long *startOffset, long *endOffset, BSTR *textAttributes) override
 Get special attributes. More...
 
STDMETHOD() get_caretOffset (long *offset) override
 Get caret position. More...
 
STDMETHOD() get_characterExtents (long offset, IA2CoordinateType coordType, long *x, long *y, long *width, long *height) override
 Get character extents. More...
 
STDMETHOD() get_nSelections (long *nSelections) override
 Get selections count. More...
 
STDMETHOD() get_offsetAtPoint (long x, long y, IA2CoordinateType coordType, long *offset) override
 Get offset of some special point. More...
 
STDMETHOD() get_selection (long selection, long *startOffset, long *endOffset) override
 Get selection range. More...
 
STDMETHOD() get_text (long startOffset, long endOffset, BSTR *text) override
 Get special text. More...
 
STDMETHOD() get_textBeforeOffset (long offset, IA2TextBoundaryType boundaryType, long *startOffset, long *endOffset, BSTR *text) override
 Get special text before some position. More...
 
STDMETHOD() get_textAfterOffset (long offset, IA2TextBoundaryType boundaryType, long *startOffset, long *endOffset, BSTR *text) override
 Get special text after some position. More...
 
STDMETHOD() get_textAtOffset (long offset, IA2TextBoundaryType boundaryType, long *startOffset, long *endOffset, BSTR *text) override
 Get special text at some position. More...
 
STDMETHOD() removeSelection (long selectionIndex) override
 Remove selection. More...
 
STDMETHOD() setCaretOffset (long offset) override
 Set caret position. More...
 
STDMETHOD() setSelection (long selectionIndex, long startOffset, long endOffset) override
 Set special selection. More...
 
STDMETHOD() get_nCharacters (long *nCharacters) override
 Get characters count. More...
 
STDMETHOD() scrollSubstringTo (long startIndex, long endIndex, enum IA2ScrollType scrollType) override
 Makes a specific part of string visible on screen. More...
 
STDMETHOD() scrollSubstringToPoint (long startIndex, long endIndex, enum IA2CoordinateType coordinateType, long x, long y) override
 Scroll to special sub-string . More...
 
STDMETHOD() get_newText (IA2TextSegment *newText) override
 
STDMETHOD() get_oldText (IA2TextSegment *oldText) override
 
HRESULT addSelection ([in] long startOffset, [in] long endOffset)
 Adds a text selection. More...
 
HRESULT removeSelection ([in] long selectionIndex)
 Unselects a range of text. More...
 
HRESULT setCaretOffset ([in] long offset)
 Sets the position of the caret. More...
 
HRESULT setSelection ([in] long selectionIndex, [in] long startOffset, [in] long endOffset)
 Changes the bounds of an existing selection. More...
 
HRESULT scrollSubstringTo ([in] long startIndex, [in] long endIndex, [in] enum IA2ScrollType scrollType)
 Makes a specific part of string visible on screen. More...
 
HRESULT scrollSubstringToPoint ([in] long startIndex, [in] long endIndex, [in] enum IA2CoordinateType coordinateType, [in] long x, [in] long y)
 Moves the top left of a substring to a specified location. More...
 
- Public Member Functions inherited from CAccTextBase
 CAccTextBase ()
 
virtual ~CAccTextBase ()
 
STDMETHOD() get_addSelection (long startOffset, long endOffset)
 Get special selection. More...
 
STDMETHOD() get_caretOffset (long *offset)
 Get caret position. More...
 
STDMETHOD() get_characterCount (long *nCharacters)
 Get character count. More...
 
STDMETHOD() get_nSelections (long *nSelections)
 Get selections count. More...
 
STDMETHOD() get_offsetAtPoint (long x, long y, IA2CoordinateType coordType, long *offset)
 Get offset of some special point. More...
 
STDMETHOD() get_selection (long selectionIndex, long *startOffset, long *endOffset)
 Get selection range. More...
 
STDMETHOD() get_text (long startOffset, long endOffset, BSTR *text)
 Get special text. More...
 
STDMETHOD() removeSelection (long selectionIndex)
 Remove selection. More...
 
STDMETHOD() setCaretOffset (long offset)
 Set caret position. More...
 
STDMETHOD() setSelection (long selectionIndex, long startOffset, long endOffset)
 Set special selection. More...
 
STDMETHOD() get_nCharacters (long *nCharacters)
 Get characters count. More...
 
STDMETHOD() get_newText (IA2TextSegment *newText)
 
STDMETHOD() get_oldText (IA2TextSegment *oldText)
 
STDMETHOD() scrollSubstringTo (long startIndex, long endIndex, enum IA2ScrollType scrollType)
 
STDMETHOD() put_XInterface (hyper pXInterface) override
 Put UNO interface. More...
 
- Public Member Functions inherited from CUNOXWrapper
 CUNOXWrapper ()
 
STDMETHOD() put_XInterface (hyper pXInterface) override
 
STDMETHOD() put_XSubInterface (hyper) override
 
HRESULT put_XInterface (hyper pXInterface)
 
HRESULT put_XSubInterface (hyper pXSubInterface)
 

Static Public Member Functions

static HRESULT WINAPI SmartQI_ (void *pv, REFIID iid, void **ppvObject, DWORD_PTR)
 

Additional Inherited Members

- Public Attributes inherited from CAccTextBase
long offset
 
long long * startOffset
 
long long long * endOffset
 
long long long BSTR * textAttributes
 
long IA2CoordinateType coordType
 
long IA2CoordinateType long * x
 
long IA2CoordinateType long long * y
 
long IA2CoordinateType long long long * width
 
long IA2CoordinateType long long long long * height
 
long IA2TextBoundaryType boundaryType
 
long IA2TextBoundaryType long * startOffset
 
long IA2TextBoundaryType long long * endOffset
 
long IA2TextBoundaryType long long BSTR * text
 
long startIndex
 
long long endIndex
 
long long enum IA2CoordinateType coordinateType long x long y
 
- Protected Member Functions inherited from CUNOXWrapper
 ~CUNOXWrapper ()
 
- Protected Attributes inherited from CUNOXWrapper
css::accessibility::XAccessible * pUNOInterface
 
- Properties inherited from IAccessibleText
BSTR attributes ([in] long offset,[out] long startOffset,[out] long endOffset) [get]
 Returns text attributes. More...
 
long caretOffset [get]
 Returns the position of the caret. More...
 
long characterExtents ([in] long offset,[in] IA2CoordinateType coordType,[out] long x,[out] long y,[out] long width) [get]
 Returns the bounding box of the specified position. More...
 
long nSelections [get]
 Returns the number of active non-contiguous selections. More...
 
long offsetAtPoint ([in] long x,[in] long y,[in] IA2CoordinateType coordType) [get]
 Returns the text position for the specified screen position. More...
 
long selection ([in] long selectionIndex,[out] long startOffset) [get]
 Returns the character offsets of Nth active text selection. More...
 
BSTR text ([in] long startOffset,[in] long endOffset) [get]
 Returns the substring between the two given indices. More...
 
BSTR textBeforeOffset ([in] long offset,[in] IA2TextBoundaryType boundaryType,[out] long startOffset,[out] long endOffset) [get]
 Returns a text portion before the given position. More...
 
BSTR textAfterOffset ([in] long offset,[in] IA2TextBoundaryType boundaryType,[out] long startOffset,[out] long endOffset) [get]
 Returns a text portion after the given position. More...
 
BSTR textAtOffset ([in] long offset,[in] IA2TextBoundaryType boundaryType,[out] long startOffset,[out] long endOffset) [get]
 Returns a text portion that spans the given position. More...
 
long nCharacters [get]
 Returns total number of characters. More...
 
IA2TextSegment newText [get]
 Returns any inserted text. More...
 
IA2TextSegment oldText [get]
 Returns any removed text. More...
 

Detailed Description

CAccText implements IAccessibleText interface.

Definition at line 29 of file AccText.h.

Constructor & Destructor Documentation

◆ CAccText()

CAccText::CAccText ( )
inline

Definition at line 36 of file AccText.h.

Member Function Documentation

◆ addSelection()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccText::addSelection ( long  startOffset,
long  endOffset 
)
override

Get special selection.

Parameters
startOffsetStart selection offset.
endOffsetEnd selection offset.
successVariant to accept the result of if the method call is successful.
Returns
Result.

Implements IAccessibleText.

Definition at line 34 of file AccText.cxx.

References CAccTextBase::endOffset, CAccTextBase::get_addSelection(), and CAccTextBase::startOffset.

◆ get_attributes()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccText::get_attributes ( long  offset,
long *  startOffset,
long *  endOffset,
BSTR *  textAttributes 
)
override

Get special attributes.

Parameters
offsetOffset.
startOffsetVariant to accept start offset.
endOffsetVariant to accept end offset.
textAttributesVariant to accept attributes.
Returns
Result.

Definition at line 48 of file AccText.cxx.

References CAccTextBase::endOffset, CAccTextBase::offset, CAccTextBase::startOffset, and CAccTextBase::textAttributes.

◆ get_caretOffset()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccText::get_caretOffset ( long *  offset)
override

Get caret position.

Parameters
offsetVariant to accept caret offset.
Returns
Result.

Definition at line 59 of file AccText.cxx.

References CAccTextBase::get_caretOffset(), and CAccTextBase::offset.

◆ get_characterExtents()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccText::get_characterExtents ( long  offset,
IA2CoordinateType  coordType,
long *  x,
long *  y,
long *  width,
long *  height 
)
override

Get character extents.

Parameters
offsetOffset.
xVariant to accept x position.
yVariant to accept y position.
widthVariant to accept width.
HeightVariant to accept height.
Returns
Result.

Definition at line 74 of file AccText.cxx.

References CAccTextBase::coordType, CAccTextBase::height, CAccTextBase::offset, CAccTextBase::width, CAccTextBase::x, and CAccTextBase::y.

◆ get_nCharacters()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccText::get_nCharacters ( long *  nCharacters)
override

Get characters count.

Parameters
nCharactersVariant to accept the characters count.
Returns
Result.

Definition at line 225 of file AccText.cxx.

References CAccTextBase::get_nCharacters(), and IAccessibleText::nCharacters.

◆ get_newText()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccText::get_newText ( IA2TextSegment newText)
override

Definition at line 231 of file AccText.cxx.

References CAccTextBase::get_newText(), and IAccessibleText::newText.

◆ get_nSelections()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccText::get_nSelections ( long *  nSelections)
override

Get selections count.

Parameters
nSelectionsVariant to accept selections count.
Returns
Result.

Definition at line 85 of file AccText.cxx.

References CAccTextBase::get_nSelections(), and IAccessibleText::nSelections.

◆ get_offsetAtPoint()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccText::get_offsetAtPoint ( long  x,
long  y,
IA2CoordinateType  coordType,
long *  offset 
)
override

Get offset of some special point.

Parameters
xX position of one point.
xY position of one point.
coordTypeType.
offsetVariant to accept offset.
Returns
Result.

Definition at line 100 of file AccText.cxx.

References CAccTextBase::coordType, CAccTextBase::get_offsetAtPoint(), CAccTextBase::offset, CAccTextBase::x, and CAccTextBase::y.

◆ get_oldText()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccText::get_oldText ( IA2TextSegment oldText)
override

Definition at line 236 of file AccText.cxx.

References CAccTextBase::get_oldText(), and IAccessibleText::oldText.

◆ get_selection()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccText::get_selection ( long  selection,
long *  startOffset,
long *  endOffset 
)
override

Get selection range.

Parameters
selectionselection count.
startOffsetVariant to accept the start offset of special selection.
endOffsetVariant to accept the end offset of special selection.
Returns
Result.

Definition at line 113 of file AccText.cxx.

References CAccTextBase::endOffset, CAccTextBase::get_selection(), IAccessibleText::selection, and CAccTextBase::startOffset.

◆ get_text()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccText::get_text ( long  startOffset,
long  endOffset,
BSTR *  text 
)
override

Get special text.

Parameters
startOffsetStart position of special range.
endOffsetEnd position of special range.
textVariant to accept the text of special range.
Returns
Result.

Definition at line 126 of file AccText.cxx.

References CAccTextBase::endOffset, CAccTextBase::get_text(), CAccTextBase::startOffset, and CAccTextBase::text.

◆ get_textAfterOffset()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccText::get_textAfterOffset ( long  offset,
IA2TextBoundaryType  boundaryType,
long *  startOffset,
long *  endOffset,
BSTR *  text 
)
override

Get special text after some position.

Parameters
offsetSpecial position.
boundaryTypeBoundary type.
startOffsetVariant to accept the start offset.
endOffsetVariant to accept the end offset.
textVariant to accept the special text.
Returns
Result.

Definition at line 157 of file AccText.cxx.

References CAccTextBase::boundaryType, CAccTextBase::endOffset, CAccTextBase::offset, CAccTextBase::startOffset, and CAccTextBase::text.

◆ get_textAtOffset()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccText::get_textAtOffset ( long  offset,
IA2TextBoundaryType  boundaryType,
long *  startOffset,
long *  endOffset,
BSTR *  text 
)
override

Get special text at some position.

Parameters
offsetSpecial position.
boundaryTypeBoundary type.
startOffsetVariant to accept the start offset.
endOffsetVariant to accept the end offset.
textVariant to accept the special text.
Returns
Result.

Definition at line 173 of file AccText.cxx.

References CAccTextBase::boundaryType, CAccTextBase::endOffset, CAccTextBase::offset, CAccTextBase::startOffset, and CAccTextBase::text.

◆ get_textBeforeOffset()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccText::get_textBeforeOffset ( long  offset,
IA2TextBoundaryType  boundaryType,
long *  startOffset,
long *  endOffset,
BSTR *  text 
)
override

Get special text before some position.

Parameters
offsetSpecial position.
boundaryTypeBoundary type.
startOffsetVariant to accept the start offset.
endOffsetVariant to accept the end offset.
textVariant to accept the special text.
Returns
Result.

Definition at line 141 of file AccText.cxx.

References CAccTextBase::boundaryType, CAccTextBase::endOffset, CAccTextBase::offset, CAccTextBase::startOffset, and CAccTextBase::text.

◆ removeSelection()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccText::removeSelection ( long  selectionIndex)
override

Remove selection.

Parameters
selectionIndexSpecial selection index
successVariant to accept the method called result.
Returns
Result.

Implements IAccessibleText.

Definition at line 186 of file AccText.cxx.

References CAccTextBase::removeSelection().

◆ scrollSubstringTo()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccText::scrollSubstringTo ( long  startIndex,
long  endIndex,
enum IA2ScrollType  scrollType 
)
override

Makes a specific part of string visible on screen.

Parameters
[in]startIndex0 based character offset.
[in]endIndex0 based character offset - the offset of the character just past the last character of the string.
[in]scrollTypeDefines where the object should be placed on the screen.
Return values
S_OK
E_INVALIDARGif bad [in] passed
Note
Refer to Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods for information about special offsets that can be used in IAccessibleText methods.

Implements IAccessibleText.

Definition at line 253 of file AccText.cxx.

References CAccTextBase::endIndex, CAccTextBase::scrollSubstringTo(), and CAccTextBase::startIndex.

◆ scrollSubstringToPoint()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccText::scrollSubstringToPoint ( long  startIndex,
long  endIndex,
enum IA2CoordinateType  coordinateType,
long  x,
long  y 
)
override

Scroll to special sub-string .

Parameters
startIndexStart index of sub string.
endIndexEnd index of sub string.
Returns
Result.

Implements IAccessibleText.

Definition at line 247 of file AccText.cxx.

References CAccTextBase::endIndex, CAccTextBase::startIndex, CAccTextBase::x, and CAccTextBase::y.

◆ setCaretOffset()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccText::setCaretOffset ( long  offset)
override

Set caret position.

Parameters
offsetSpecial position.
successVariant to accept the method called result.
Returns
Result.

Implements IAccessibleText.

Definition at line 198 of file AccText.cxx.

References CAccTextBase::offset, and CAccTextBase::setCaretOffset().

◆ setSelection()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccText::setSelection ( long  selectionIndex,
long  startOffset,
long  endOffset 
)
override

Set special selection.

Parameters
selectionIndexSpecial selection index.
startOffsetstart position.
endOffsetend position.
successVariant to accept the method called result.
Returns
Result.

Implements IAccessibleText.

Definition at line 213 of file AccText.cxx.

References CAccTextBase::endOffset, CAccTextBase::setSelection(), and CAccTextBase::startOffset.

◆ SmartQI()

HRESULT CAccText::SmartQI ( REFIID  iid,
void **  ppvObject 
)
inline

Definition at line 59 of file AccText.h.

◆ SmartQI_()

static HRESULT WINAPI CAccText::SmartQI_ ( void *  pv,
REFIID  iid,
void **  ppvObject,
DWORD_PTR   
)
inlinestatic

Definition at line 53 of file AccText.h.


The documentation for this class was generated from the following files: