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

#include <vbarangehelper.hxx>

Static Public Member Functions

static css::uno::Reference< css::text::XTextRange > getRangeByPosition (const css::uno::Reference< css::text::XText > &rText, sal_Int32 _position)
 get a range in a xText by creating a cursor that iterates over the text. More...
 
static void insertString (css::uno::Reference< css::text::XTextRange > const &rTextRange, css::uno::Reference< css::text::XText > const &rText, std::u16string_view aStr, bool _bAbsorb)
 
static css::uno::Reference< css::text::XTextCursor > initCursor (const css::uno::Reference< css::text::XTextRange > &rTextRange, const css::uno::Reference< css::text::XText > &rText)
 
static sal_Int32 getPosition (const css::uno::Reference< css::text::XText > &rText, const css::uno::Reference< css::text::XTextRange > &rTextRange)
 
static css::uno::Reference< css::text::XTextContent > findBookmarkByPosition (const css::uno::Reference< css::text::XTextDocument > &xTextDoc, const css::uno::Reference< css::text::XTextRange > &xTextRange)
 

Detailed Description

Definition at line 26 of file vbarangehelper.hxx.

Member Function Documentation

◆ findBookmarkByPosition()

uno::Reference< text::XTextContent > SwVbaRangeHelper::findBookmarkByPosition ( const css::uno::Reference< css::text::XTextDocument > &  xTextDoc,
const css::uno::Reference< css::text::XTextRange > &  xTextRange 
)
static
Exceptions
css::uno::RuntimeException

Definition at line 166 of file vbarangehelper.cxx.

References index.

Referenced by SwVbaRange::setText().

◆ getPosition()

sal_Int32 SwVbaRangeHelper::getPosition ( const css::uno::Reference< css::text::XText > &  rText,
const css::uno::Reference< css::text::XTextRange > &  rTextRange 
)
static
Exceptions
css::uno::RuntimeException

Definition at line 136 of file vbarangehelper.cxx.

Referenced by SwVbaRange::getEnd(), and SwVbaRange::getStart().

◆ getRangeByPosition()

uno::Reference< text::XTextRange > SwVbaRangeHelper::getRangeByPosition ( const css::uno::Reference< css::text::XText > &  rText,
sal_Int32  _position 
)
static

get a range in a xText by creating a cursor that iterates over the text.

Exceptions
css::uno::RuntimeException

If the iterating cursor is equal to the desired position, the range equivalent is returned. Some special cases are tables that are inside of the text, because the position has to be adjusted.

Parameters
xTexta text where a range position is searched
positiona position inside o the text
Returns
a range for the position; null is returned if no range can be constructed.

Definition at line 39 of file vbarangehelper.cxx.

References nPos.

Referenced by SwVbaDocument::Range(), SwVbaRange::setEnd(), and SwVbaRange::setStart().

◆ initCursor()

uno::Reference< text::XTextCursor > SwVbaRangeHelper::initCursor ( const css::uno::Reference< css::text::XTextRange > &  rTextRange,
const css::uno::Reference< css::text::XText > &  rText 
)
static
Exceptions
css::uno::RuntimeException
css::script::BasicErrorException

Definition at line 92 of file vbarangehelper.cxx.

Referenced by SwVbaRange::initialize().

◆ insertString()

void SwVbaRangeHelper::insertString ( css::uno::Reference< css::text::XTextRange > const &  rTextRange,
css::uno::Reference< css::text::XText > const &  rText,
std::u16string_view  aStr,
bool  _bAbsorb 
)
static
Exceptions
css::uno::RuntimeException

Definition at line 64 of file vbarangehelper.cxx.

References aStr, and nIndex.

Referenced by SwVbaRange::setText().


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