LibreOffice Module sw (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SwXTextCursor Class Referencefinal

#include <unotextcursor.hxx>

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

Public Member Functions

 SwXTextCursor (SwDoc &rDoc, css::uno::Reference< css::text::XText > xParent, const CursorType eType, SwPosition const &rPos, SwPosition const *const pMark=nullptr)
 
 SwXTextCursor (css::uno::Reference< css::text::XText > xParent, SwPaM const &rSourceCursor, const CursorType eType=CursorType::All)
 
SwUnoCursorGetCursor ()
 
bool IsAtEndOfMeta () const
 
bool IsAtEndOfContentControl () const
 
void DeleteAndInsert (std::u16string_view aText, ::sw::DeleteAndInsertMode eMode)
 
virtual const SwPaMGetPaM () const override
 
virtual SwPaMGetPaM () override
 
virtual const SwDocGetDoc () const override
 
virtual SwDocGetDoc () override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &rServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo () override
 
virtual void SAL_CALL setPropertyValue (const OUString &rPropertyName, const css::uno::Any &rValue) override
 
virtual css::uno::Any SAL_CALL getPropertyValue (const OUString &rPropertyName) override
 
virtual void SAL_CALL addPropertyChangeListener (const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
 
virtual void SAL_CALL removePropertyChangeListener (const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
 
virtual void SAL_CALL addVetoableChangeListener (const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
 
virtual void SAL_CALL removeVetoableChangeListener (const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
 
virtual css::beans::PropertyState SAL_CALL getPropertyState (const OUString &rPropertyName) override
 
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates (const css::uno::Sequence< OUString > &rPropertyNames) override
 
virtual void SAL_CALL setPropertyToDefault (const OUString &rPropertyName) override
 
virtual css::uno::Any SAL_CALL getPropertyDefault (const OUString &rPropertyName) override
 
virtual void SAL_CALL setPropertyValues (const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Sequence< css::uno::Any > &aValues) override
 
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues (const css::uno::Sequence< OUString > &aPropertyNames) override
 
virtual void SAL_CALL addPropertiesChangeListener (const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
 
virtual void SAL_CALL removePropertiesChangeListener (const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
 
virtual void SAL_CALL firePropertiesChangeEvent (const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
 
virtual void SAL_CALL setAllPropertiesToDefault () override
 
virtual void SAL_CALL setPropertiesToDefault (const css::uno::Sequence< OUString > &rPropertyNames) override
 
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyDefaults (const css::uno::Sequence< OUString > &rPropertyNames) override
 
virtual css::uno::Type SAL_CALL getElementType () override
 
virtual sal_Bool SAL_CALL hasElements () override
 
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration () override
 
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createContentEnumeration (const OUString &rServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames () override
 
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL createSortDescriptor () override
 
virtual void SAL_CALL sort (const css::uno::Sequence< css::beans::PropertyValue > &xDescriptor) override
 
virtual void SAL_CALL insertDocumentFromURL (const OUString &rURL, const css::uno::Sequence< css::beans::PropertyValue > &rOptions) override
 
virtual css::uno::Reference< css::text::XText > SAL_CALL getText () override
 
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getStart () override
 
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getEnd () override
 
virtual OUString SAL_CALL getString () override
 
virtual void SAL_CALL setString (const OUString &rString) override
 
virtual void SAL_CALL collapseToStart () override
 
virtual void SAL_CALL collapseToEnd () override
 
virtual sal_Bool SAL_CALL isCollapsed () override
 
virtual sal_Bool SAL_CALL goLeft (sal_Int16 nCount, sal_Bool bExpand) override
 
virtual sal_Bool SAL_CALL goRight (sal_Int16 nCount, sal_Bool bExpand) override
 
virtual void SAL_CALL gotoStart (sal_Bool bExpand) override
 
virtual void SAL_CALL gotoEnd (sal_Bool bExpand) override
 
virtual void SAL_CALL gotoRange (const css::uno::Reference< css::text::XTextRange > &xRange, sal_Bool bExpand) override
 
virtual sal_Bool SAL_CALL isStartOfWord () override
 
virtual sal_Bool SAL_CALL isEndOfWord () override
 
virtual sal_Bool SAL_CALL gotoNextWord (sal_Bool bExpand) override
 
virtual sal_Bool SAL_CALL gotoPreviousWord (sal_Bool bExpand) override
 
virtual sal_Bool SAL_CALL gotoEndOfWord (sal_Bool bExpand) override
 
virtual sal_Bool SAL_CALL gotoStartOfWord (sal_Bool bExpand) override
 
virtual sal_Bool SAL_CALL isStartOfSentence () override
 
virtual sal_Bool SAL_CALL isEndOfSentence () override
 
virtual sal_Bool SAL_CALL gotoNextSentence (sal_Bool Expand) override
 
virtual sal_Bool SAL_CALL gotoPreviousSentence (sal_Bool Expand) override
 
virtual sal_Bool SAL_CALL gotoStartOfSentence (sal_Bool Expand) override
 
virtual sal_Bool SAL_CALL gotoEndOfSentence (sal_Bool Expand) override
 
virtual sal_Bool SAL_CALL isStartOfParagraph () override
 
virtual sal_Bool SAL_CALL isEndOfParagraph () override
 
virtual sal_Bool SAL_CALL gotoStartOfParagraph (sal_Bool Expand) override
 
virtual sal_Bool SAL_CALL gotoEndOfParagraph (sal_Bool Expand) override
 
virtual sal_Bool SAL_CALL gotoNextParagraph (sal_Bool Expand) override
 
virtual sal_Bool SAL_CALL gotoPreviousParagraph (sal_Bool Expand) override
 
virtual void SAL_CALL makeRedline (const OUString &rRedlineType, const css::uno::Sequence< css::beans::PropertyValue > &RedlineProperties) override
 
virtual void SAL_CALL invalidateMarkings (::sal_Int32 nType) override
 

Private Member Functions

SwUnoCursorGetCursorOrThrow ()
 
virtual ~SwXTextCursor () override
 

Private Attributes

const SfxItemPropertySetm_rPropSet
 
const CursorType m_eType
 
const css::uno::Reference< css::text::XText > m_xParentText
 
sw::UnoCursorPointer m_pUnoCursor
 
SetAttrMode m_nAttrMode = SetAttrMode::DEFAULT
 

Detailed Description

Definition at line 68 of file unotextcursor.hxx.

Constructor & Destructor Documentation

◆ ~SwXTextCursor()

SwXTextCursor::~SwXTextCursor ( )
overrideprivatevirtual

Definition at line 723 of file unoobj.cxx.

References m_pUnoCursor, and sw::UnoCursorPointer::reset().

◆ SwXTextCursor() [1/2]

SwXTextCursor::SwXTextCursor ( SwDoc rDoc,
css::uno::Reference< css::text::XText >  xParent,
const CursorType  eType,
SwPosition const &  rPos,
SwPosition const *const  pMark = nullptr 
)

Referenced by getEnd(), and getStart().

◆ SwXTextCursor() [2/2]

SwXTextCursor::SwXTextCursor ( css::uno::Reference< css::text::XText >  xParent,
SwPaM const &  rSourceCursor,
const CursorType  eType = CursorType::All 
)

Member Function Documentation

◆ addPropertiesChangeListener()

void SAL_CALL SwXTextCursor::addPropertiesChangeListener ( const css::uno::Sequence< OUString > &  aPropertyNames,
const css::uno::Reference< css::beans::XPropertiesChangeListener > &  xListener 
)
overridevirtual

Definition at line 2483 of file unoobj.cxx.

◆ addPropertyChangeListener()

void SAL_CALL SwXTextCursor::addPropertyChangeListener ( const OUString &  rPropertyName,
const css::uno::Reference< css::beans::XPropertyChangeListener > &  xListener 
)
overridevirtual

Definition at line 2360 of file unoobj.cxx.

◆ addVetoableChangeListener()

void SAL_CALL SwXTextCursor::addVetoableChangeListener ( const OUString &  rPropertyName,
const css::uno::Reference< css::beans::XVetoableChangeListener > &  xListener 
)
overridevirtual

Definition at line 2376 of file unoobj.cxx.

◆ collapseToEnd()

void SAL_CALL SwXTextCursor::collapseToEnd ( )
overridevirtual

◆ collapseToStart()

void SAL_CALL SwXTextCursor::collapseToStart ( )
overridevirtual

◆ createContentEnumeration()

uno::Reference< container::XEnumeration > SAL_CALL SwXTextCursor::createContentEnumeration ( const OUString &  rServiceName)
overridevirtual

◆ createEnumeration()

uno::Reference< container::XEnumeration > SAL_CALL SwXTextCursor::createEnumeration ( )
overridevirtual

◆ createSortDescriptor()

uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextCursor::createSortDescriptor ( )
overridevirtual

Definition at line 2772 of file unoobj.cxx.

References SwUnoCursorHelper::CreateSortDescriptor().

◆ DeleteAndInsert()

void SwXTextCursor::DeleteAndInsert ( std::u16string_view  aText,
::sw::DeleteAndInsertMode  eMode 
)

◆ firePropertiesChangeEvent()

void SAL_CALL SwXTextCursor::firePropertiesChangeEvent ( const css::uno::Sequence< OUString > &  aPropertyNames,
const css::uno::Reference< css::beans::XPropertiesChangeListener > &  xListener 
)
overridevirtual

Definition at line 2495 of file unoobj.cxx.

◆ getAvailableServiceNames()

uno::Sequence< OUString > SAL_CALL SwXTextCursor::getAvailableServiceNames ( )
overridevirtual

Definition at line 3121 of file unoobj.cxx.

◆ GetCursor()

SwUnoCursor & SwXTextCursor::GetCursor ( )

Definition at line 676 of file unoobj.cxx.

References m_pUnoCursor.

◆ GetCursorOrThrow()

SwUnoCursor & SwXTextCursor::GetCursorOrThrow ( )
inlineprivate

◆ GetDoc() [1/2]

SwDoc const * SwXTextCursor::GetDoc ( ) const
overridevirtual

Definition at line 685 of file unoobj.cxx.

References SwPaM::GetDoc(), and m_pUnoCursor.

Referenced by gotoRange(), and gotoStart().

◆ GetDoc() [2/2]

SwDoc * SwXTextCursor::GetDoc ( )
overridevirtual

Definition at line 688 of file unoobj.cxx.

References SwPaM::GetDoc(), and m_pUnoCursor.

◆ getElementType()

uno::Type SAL_CALL SwXTextCursor::getElementType ( )
overridevirtual

Definition at line 3110 of file unoobj.cxx.

References cppu::UnoType< typename T >::get().

◆ getEnd()

uno::Reference< text::XTextRange > SAL_CALL SwXTextCursor::getEnd ( )
overridevirtual

◆ getImplementationName()

OUString SwXTextCursor::getImplementationName ( )
overridevirtual

Definition at line 942 of file unoobj.cxx.

◆ GetPaM() [1/2]

SwPaM const * SwXTextCursor::GetPaM ( ) const
overridevirtual

Definition at line 679 of file unoobj.cxx.

References sw::UnoCursorPointer::get(), and m_pUnoCursor.

Referenced by setString().

◆ GetPaM() [2/2]

SwPaM * SwXTextCursor::GetPaM ( )
overridevirtual

Definition at line 682 of file unoobj.cxx.

References sw::UnoCursorPointer::get(), and m_pUnoCursor.

◆ getPropertyDefault()

uno::Any SAL_CALL SwXTextCursor::getPropertyDefault ( const OUString &  rPropertyName)
overridevirtual

Definition at line 2424 of file unoobj.cxx.

References getPropertyDefaults().

◆ getPropertyDefaults()

uno::Sequence< uno::Any > SAL_CALL SwXTextCursor::getPropertyDefaults ( const css::uno::Sequence< OUString > &  rPropertyNames)
overridevirtual

◆ getPropertySetInfo()

uno::Reference< beans::XPropertySetInfo > SAL_CALL SwXTextCursor::getPropertySetInfo ( )
overridevirtual

◆ getPropertyState()

beans::PropertyState SAL_CALL SwXTextCursor::getPropertyState ( const OUString &  rPropertyName)
overridevirtual

◆ getPropertyStates()

uno::Sequence< beans::PropertyState > SAL_CALL SwXTextCursor::getPropertyStates ( const css::uno::Sequence< OUString > &  rPropertyNames)
overridevirtual

◆ getPropertyValue()

uno::Any SAL_CALL SwXTextCursor::getPropertyValue ( const OUString &  rPropertyName)
overridevirtual

◆ getPropertyValues()

uno::Sequence< uno::Any > SAL_CALL SwXTextCursor::getPropertyValues ( const css::uno::Sequence< OUString > &  aPropertyNames)
overridevirtual

Definition at line 2474 of file unoobj.cxx.

◆ getStart()

uno::Reference< text::XTextRange > SAL_CALL SwXTextCursor::getStart ( )
overridevirtual

◆ getString()

OUString SAL_CALL SwXTextCursor::getString ( )
overridevirtual

Definition at line 1829 of file unoobj.cxx.

References GetCursorOrThrow(), and SwUnoCursorHelper::GetTextFromPam().

◆ getSupportedServiceNames()

uno::Sequence< OUString > SAL_CALL SwXTextCursor::getSupportedServiceNames ( )
overridevirtual

Definition at line 953 of file unoobj.cxx.

◆ getText()

uno::Reference< text::XText > SAL_CALL SwXTextCursor::getText ( )
overridevirtual

Definition at line 1770 of file unoobj.cxx.

References m_xParentText.

Referenced by getEnd(), and getStart().

◆ goLeft()

sal_Bool SAL_CALL SwXTextCursor::goLeft ( sal_Int16  nCount,
sal_Bool  bExpand 
)
overridevirtual

◆ goRight()

sal_Bool SAL_CALL SwXTextCursor::goRight ( sal_Int16  nCount,
sal_Bool  bExpand 
)
overridevirtual

◆ gotoEnd()

void SAL_CALL SwXTextCursor::gotoEnd ( sal_Bool  bExpand)
overridevirtual

◆ gotoEndOfParagraph()

sal_Bool SAL_CALL SwXTextCursor::gotoEndOfParagraph ( sal_Bool  Expand)
overridevirtual

◆ gotoEndOfSentence()

sal_Bool SAL_CALL SwXTextCursor::gotoEndOfSentence ( sal_Bool  Expand)
overridevirtual

◆ gotoEndOfWord()

sal_Bool SAL_CALL SwXTextCursor::gotoEndOfWord ( sal_Bool  bExpand)
overridevirtual

◆ gotoNextParagraph()

sal_Bool SAL_CALL SwXTextCursor::gotoNextParagraph ( sal_Bool  Expand)
overridevirtual

◆ gotoNextSentence()

sal_Bool SAL_CALL SwXTextCursor::gotoNextSentence ( sal_Bool  Expand)
overridevirtual

◆ gotoNextWord()

sal_Bool SAL_CALL SwXTextCursor::gotoNextWord ( sal_Bool  bExpand)
overridevirtual

◆ gotoPreviousParagraph()

sal_Bool SAL_CALL SwXTextCursor::gotoPreviousParagraph ( sal_Bool  Expand)
overridevirtual

◆ gotoPreviousSentence()

sal_Bool SAL_CALL SwXTextCursor::gotoPreviousSentence ( sal_Bool  Expand)
overridevirtual

◆ gotoPreviousWord()

sal_Bool SAL_CALL SwXTextCursor::gotoPreviousWord ( sal_Bool  bExpand)
overridevirtual

◆ gotoRange()

void SAL_CALL SwXTextCursor::gotoRange ( const css::uno::Reference< css::text::XTextRange > &  xRange,
sal_Bool  bExpand 
)
overridevirtual

◆ gotoStart()

void SAL_CALL SwXTextCursor::gotoStart ( sal_Bool  bExpand)
overridevirtual

◆ gotoStartOfParagraph()

sal_Bool SAL_CALL SwXTextCursor::gotoStartOfParagraph ( sal_Bool  Expand)
overridevirtual

◆ gotoStartOfSentence()

sal_Bool SAL_CALL SwXTextCursor::gotoStartOfSentence ( sal_Bool  Expand)
overridevirtual

◆ gotoStartOfWord()

sal_Bool SAL_CALL SwXTextCursor::gotoStartOfWord ( sal_Bool  bExpand)
overridevirtual

◆ hasElements()

sal_Bool SAL_CALL SwXTextCursor::hasElements ( )
overridevirtual

Definition at line 3115 of file unoobj.cxx.

◆ insertDocumentFromURL()

void SAL_CALL SwXTextCursor::insertDocumentFromURL ( const OUString &  rURL,
const css::uno::Sequence< css::beans::PropertyValue > &  rOptions 
)
overridevirtual

Definition at line 2711 of file unoobj.cxx.

References GetCursorOrThrow(), and SwUnoCursorHelper::InsertFile().

◆ invalidateMarkings()

void SAL_CALL SwXTextCursor::invalidateMarkings ( ::sal_Int32  nType)
overridevirtual

◆ IsAtEndOfContentControl()

bool SwXTextCursor::IsAtEndOfContentControl ( ) const

Definition at line 906 of file unoobj.cxx.

References ContentControl, end, m_eType, m_pUnoCursor, m_xParentText, and SAL_WARN.

Referenced by SwXContentControl::AttachImpl().

◆ IsAtEndOfMeta()

bool SwXTextCursor::IsAtEndOfMeta ( ) const

◆ isCollapsed()

sal_Bool SAL_CALL SwXTextCursor::isCollapsed ( )
overridevirtual

Definition at line 999 of file unoobj.cxx.

References m_pUnoCursor.

◆ isEndOfParagraph()

sal_Bool SAL_CALL SwXTextCursor::isEndOfParagraph ( )
overridevirtual

Definition at line 1677 of file unoobj.cxx.

References GetCursorOrThrow(), and SwUnoCursorHelper::IsEndOfPara().

◆ isEndOfSentence()

sal_Bool SAL_CALL SwXTextCursor::isEndOfSentence ( )
overridevirtual

◆ isEndOfWord()

sal_Bool SAL_CALL SwXTextCursor::isEndOfWord ( )
overridevirtual

Definition at line 1304 of file unoobj.cxx.

References GetCursorOrThrow(), and SwCursor::IsEndWordWT().

◆ isStartOfParagraph()

sal_Bool SAL_CALL SwXTextCursor::isStartOfParagraph ( )
overridevirtual

Definition at line 1666 of file unoobj.cxx.

References GetCursorOrThrow(), and SwUnoCursorHelper::IsStartOfPara().

◆ isStartOfSentence()

sal_Bool SAL_CALL SwXTextCursor::isStartOfSentence ( )
overridevirtual

◆ isStartOfWord()

sal_Bool SAL_CALL SwXTextCursor::isStartOfWord ( )
overridevirtual

Definition at line 1293 of file unoobj.cxx.

References GetCursorOrThrow(), and SwCursor::IsStartWordWT().

◆ makeRedline()

void SAL_CALL SwXTextCursor::makeRedline ( const OUString &  rRedlineType,
const css::uno::Sequence< css::beans::PropertyValue > &  RedlineProperties 
)
overridevirtual

Definition at line 2700 of file unoobj.cxx.

References GetCursorOrThrow(), and SwUnoCursorHelper::makeRedline().

◆ removePropertiesChangeListener()

void SAL_CALL SwXTextCursor::removePropertiesChangeListener ( const css::uno::Reference< css::beans::XPropertiesChangeListener > &  xListener)
overridevirtual

Definition at line 2489 of file unoobj.cxx.

◆ removePropertyChangeListener()

void SAL_CALL SwXTextCursor::removePropertyChangeListener ( const OUString &  rPropertyName,
const css::uno::Reference< css::beans::XPropertyChangeListener > &  xListener 
)
overridevirtual

Definition at line 2368 of file unoobj.cxx.

◆ removeVetoableChangeListener()

void SAL_CALL SwXTextCursor::removeVetoableChangeListener ( const OUString &  rPropertyName,
const css::uno::Reference< css::beans::XVetoableChangeListener > &  xListener 
)
overridevirtual

Definition at line 2384 of file unoobj.cxx.

◆ setAllPropertiesToDefault()

void SAL_CALL SwXTextCursor::setAllPropertiesToDefault ( )
overridevirtual

◆ setPropertiesToDefault()

void SAL_CALL SwXTextCursor::setPropertiesToDefault ( const css::uno::Sequence< OUString > &  rPropertyNames)
overridevirtual

◆ setPropertyToDefault()

void SAL_CALL SwXTextCursor::setPropertyToDefault ( const OUString &  rPropertyName)
overridevirtual

Definition at line 2416 of file unoobj.cxx.

References setPropertiesToDefault().

◆ setPropertyValue()

void SAL_CALL SwXTextCursor::setPropertyValue ( const OUString &  rPropertyName,
const css::uno::Any &  rValue 
)
overridevirtual

◆ setPropertyValues()

void SAL_CALL SwXTextCursor::setPropertyValues ( const css::uno::Sequence< OUString > &  aPropertyNames,
const css::uno::Sequence< css::uno::Any > &  aValues 
)
overridevirtual

◆ setString()

void SAL_CALL SwXTextCursor::setString ( const OUString &  rString)
overridevirtual

◆ sort()

void SAL_CALL SwXTextCursor::sort ( const css::uno::Sequence< css::beans::PropertyValue > &  xDescriptor)
overridevirtual

◆ supportsService()

sal_Bool SAL_CALL SwXTextCursor::supportsService ( const OUString &  rServiceName)
overridevirtual

Definition at line 947 of file unoobj.cxx.

References cppu::supportsService().

Member Data Documentation

◆ m_eType

const CursorType SwXTextCursor::m_eType
private

◆ m_nAttrMode

SetAttrMode SwXTextCursor::m_nAttrMode = SetAttrMode::DEFAULT
private

Definition at line 79 of file unotextcursor.hxx.

Referenced by setPropertyValue().

◆ m_pUnoCursor

sw::UnoCursorPointer SwXTextCursor::m_pUnoCursor
private

◆ m_rPropSet

const SfxItemPropertySet& SwXTextCursor::m_rPropSet
private

◆ m_xParentText

const css::uno::Reference< css::text::XText > SwXTextCursor::m_xParentText
private

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