19#ifndef INCLUDED_SW_SOURCE_UI_VBA_VBARANGEHELPER_HXX
20#define INCLUDED_SW_SOURCE_UI_VBA_VBARANGEHELPER_HXX
22#include <com/sun/star/text/XText.hpp>
23#include <com/sun/star/text/XTextRange.hpp>
24#include <com/sun/star/text/XTextDocument.hpp>
30 static css::uno::Reference< css::text::XTextRange >
getRangeByPosition(
const css::uno::Reference< css::text::XText >& rText, sal_Int32 _position );
32 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 );
35 static css::uno::Reference< css::text::XTextCursor >
initCursor(
const css::uno::Reference< css::text::XTextRange >& rTextRange,
const css::uno::Reference< css::text::XText >& rText );
37 static sal_Int32
getPosition(
const css::uno::Reference< css::text::XText >& rText,
const css::uno::Reference< css::text::XTextRange >& rTextRange );
39 static css::uno::Reference< css::text::XTextContent >
findBookmarkByPosition(
const css::uno::Reference< css::text::XTextDocument >& xTextDoc,
const css::uno::Reference< css::text::XTextRange >& xTextRange );
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 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::XTextCursor > initCursor(const css::uno::Reference< css::text::XTextRange > &rTextRange, const css::uno::Reference< css::text::XText > &rText)
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.
static css::uno::Reference< css::text::XTextContent > findBookmarkByPosition(const css::uno::Reference< css::text::XTextDocument > &xTextDoc, const css::uno::Reference< css::text::XTextRange > &xTextRange)