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

CAccHypertext implements IAccessibleHypertext interface. More...

#include <AccHypertext.h>

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

Public Member Functions

 CAccHypertext ()
 
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
 
STDMETHOD() get_nHyperlinks (long *hyperlinkCount) override
 Get hyperlink count. More...
 
STDMETHOD() get_hyperlink (long index, IAccessibleHyperlink **hyperlink) override
 Get special hyperlink. More...
 
STDMETHOD() get_hyperlinkIndex (long charIndex, long *hyperlinkIndex) override
 Returns the index of the hyperlink that is associated with this character index. More...
 
STDMETHOD() put_XInterface (hyper pXInterface) override
 Put UNO interface. More...
 
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)
 

Private Attributes

css::uno::Reference< css::accessibility::XAccessibleHypertext > pHyperText
 

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 IAccessibleHypertext
long nHyperlinks [get]
 Returns the number of links and link groups contained within this hypertext paragraph. More...
 
IAccessibleHyperlink hyperlink ([in] long index) [get]
 Returns the specified link. More...
 
long hyperlinkIndex ([in] long charIndex) [get]
 Returns the index of the hyperlink that is associated with this character index. More...
 
- 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

CAccHypertext implements IAccessibleHypertext interface.

Definition at line 31 of file AccHypertext.h.

Constructor & Destructor Documentation

◆ CAccHypertext()

CAccHypertext::CAccHypertext ( )
inline

Definition at line 38 of file AccHypertext.h.

Member Function Documentation

◆ addSelection()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHypertext::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 40 of file AccHypertext.cxx.

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

◆ get_attributes()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHypertext::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 55 of file AccHypertext.cxx.

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

◆ get_caretOffset()

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

Get caret position.

Parameters
offsetVariant to accept caret offset.
Returns
Result.

Definition at line 66 of file AccHypertext.cxx.

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

◆ get_characterExtents()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHypertext::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 81 of file AccHypertext.cxx.

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

◆ get_hyperlink()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHypertext::get_hyperlink ( long  index,
IAccessibleHyperlink **  hyperlink 
)
override

Get special hyperlink.

Parameters
indexSpecial hyperlink index.
hyperlinkVariant to accept special hyperlink via index.
Returns
Result.

Definition at line 294 of file AccHypertext.cxx.

References hr, IAccessibleHypertext::hyperlink, index, pHyperText, and IUNOXWrapper::put_XSubInterface().

◆ get_hyperlinkIndex()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHypertext::get_hyperlinkIndex ( long  charIndex,
long *  hyperlinkIndex 
)
override

Returns the index of the hyperlink that is associated with this character index.

Parameters
charIndexSpecial char index.
hyperlinkIndexVariant to accept special hyperlink index.
Returns
Result.

Definition at line 342 of file AccHypertext.cxx.

References IAccessibleHypertext::hyperlinkIndex, and pHyperText.

◆ get_nCharacters()

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

Get characters count.

Parameters
nCharactersVariant to accept the characters count.
Returns
Result.

Definition at line 229 of file AccHypertext.cxx.

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

◆ get_newText()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHypertext::get_newText ( IA2TextSegment newText)
override

Definition at line 235 of file AccHypertext.cxx.

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

◆ get_nHyperlinks()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHypertext::get_nHyperlinks ( long *  hyperlinkCount)
override

Get hyperlink count.

Parameters
hyperlinkCountVariant to accept hyperlink count.
Returns
Result.

Definition at line 267 of file AccHypertext.cxx.

References pHyperText.

◆ get_nSelections()

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

Get selections count.

Parameters
nSelectionsVariant to accept selections count.
Returns
Result.

Definition at line 92 of file AccHypertext.cxx.

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

◆ get_offsetAtPoint()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHypertext::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 106 of file AccHypertext.cxx.

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

◆ get_oldText()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHypertext::get_oldText ( IA2TextSegment oldText)
override

Definition at line 240 of file AccHypertext.cxx.

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

◆ get_selection()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHypertext::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 118 of file AccHypertext.cxx.

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

◆ get_text()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHypertext::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 131 of file AccHypertext.cxx.

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

◆ get_textAfterOffset()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHypertext::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 162 of file AccHypertext.cxx.

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

◆ get_textAtOffset()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHypertext::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 178 of file AccHypertext.cxx.

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

◆ get_textBeforeOffset()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHypertext::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 146 of file AccHypertext.cxx.

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

◆ put_XInterface()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHypertext::put_XInterface ( hyper  pXInterface)
override

Put UNO interface.

Parameters
pXInterfaceUNO interface.
Returns
Result.

Implements IUNOXWrapper.

Definition at line 368 of file AccHypertext.cxx.

References pHyperText, CUNOXWrapper::pUNOInterface, and CAccTextBase::put_XInterface().

◆ removeSelection()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHypertext::removeSelection ( long  selectionIndex)
override

Remove selection.

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

Implements IAccessibleText.

Definition at line 191 of file AccHypertext.cxx.

References CAccTextBase::removeSelection().

◆ scrollSubstringTo()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHypertext::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 256 of file AccHypertext.cxx.

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

◆ scrollSubstringToPoint()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHypertext::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 251 of file AccHypertext.cxx.

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

◆ setCaretOffset()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHypertext::setCaretOffset ( long  offset)
override

Set caret position.

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

Implements IAccessibleText.

Definition at line 203 of file AccHypertext.cxx.

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

◆ setSelection()

COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHypertext::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 217 of file AccHypertext.cxx.

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

◆ SmartQI()

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

Definition at line 62 of file AccHypertext.h.

◆ SmartQI_()

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

Definition at line 56 of file AccHypertext.h.

Member Data Documentation

◆ pHyperText

css::uno::Reference<css::accessibility::XAccessibleHypertext> CAccHypertext::pHyperText
private

Definition at line 149 of file AccHypertext.h.

Referenced by get_hyperlink(), get_hyperlinkIndex(), get_nHyperlinks(), and put_XInterface().


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