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

Represents the current text cursor of one opened edit window. More...

#include <viscrs.hxx>

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

Public Member Functions

 SwShellCursor (const SwCursorShell &rCursorSh, const SwPosition &rPos)
 
 SwShellCursor (const SwCursorShell &rCursorSh, const SwPosition &rPos, const Point &rPtPos, SwPaM *pRing)
 
 SwShellCursor (SwShellCursor &)
 
virtual ~SwShellCursor () override
 
virtual void FillRects () override
 
virtual void FillStartEnd (SwRect &rStart, SwRect &rEnd) const override
 
void Show (SfxViewShell const *pViewShell)
 
void Hide ()
 
void Invalidate (const SwRect &rRect)
 
const PointGetPtPos () const
 
PointGetPtPos ()
 
const PointGetMkPos () const
 
PointGetMkPos ()
 
const PointGetSttPos () const
 
PointGetSttPos ()
 
const PointGetEndPos () const
 
PointGetEndPos ()
 
virtual void SetMark () override
 Unless this is called, the getter method of Mark will return Point. More...
 
virtual SwCursorCreate (SwPaM *pRing=nullptr) const override
 
virtual short MaxReplaceArived () override
 
virtual void SaveTableBoxContent (const SwPosition *pPos) override
 
bool UpDown (bool bUp, sal_uInt16 nCnt)
 
virtual bool IsAtValidPos (bool bPoint=true) const override
 Return <true> if cursor can be set to this position. More...
 
virtual bool IsReadOnlyAvailable () const override
 
SwShellCursorGetNext ()
 
const SwShellCursorGetNext () const
 
SwShellCursorGetPrev ()
 
const SwShellCursorGetPrev () const
 
- Public Member Functions inherited from SwCursor
 SwCursor (const SwPosition &rPos, SwPaM *pRing)
 
virtual ~SwCursor () override
 
SwCursoroperator= (SwCursor const &)
 
 SwCursor (SwCursor const &rCursor, SwPaM *pRing)
 this takes a second parameter, which indicates the Ring that the new cursor should be part of (may be null) More...
 
virtual SwCursorCreate (SwPaM *pRing=nullptr) const
 
virtual short MaxReplaceArived ()
 
virtual void SaveTableBoxContent (const SwPosition *pPos)
 
void FillFindPos (SwDocPositions ePos, SwPosition &rPos) const
 
SwMoveFnCollection const & MakeFindRange (SwDocPositions, SwDocPositions, SwPaM *) const
 set range for search in document More...
 
sal_Int32 Find_Text (const i18nutil::SearchOptions2 &rSearchOpt, bool bSearchInNotes, SwDocPositions nStart, SwDocPositions nEnd, bool &bCancel, FindRanges, bool bReplace=false, SwRootFrame const *const pLayout=nullptr)
 
sal_Int32 FindFormat (const SwTextFormatColl &rFormatColl, SwDocPositions nStart, SwDocPositions nEnd, bool &bCancel, FindRanges, const SwTextFormatColl *pReplFormat, SwRootFrame const *const pLayout=nullptr)
 search for Format-Collections More...
 
sal_Int32 FindAttrs (const SfxItemSet &rSet, bool bNoCollections, SwDocPositions nStart, SwDocPositions nEnd, bool &bCancel, FindRanges, const i18nutil::SearchOptions2 *pSearchOpt, const SfxItemSet *rReplSet=nullptr, SwRootFrame const *const pLayout=nullptr)
 search for attributes More...
 
bool IsStartEndSentence (bool bEnd, SwRootFrame const *pLayout) const
 
bool SelectWord (SwViewShell const *pViewShell, const Point *pPt)
 
bool IsStartWordWT (sal_Int16 nWordType, SwRootFrame const *pLayout=nullptr) const
 
bool IsEndWordWT (sal_Int16 nWordType, SwRootFrame const *pLayout=nullptr) const
 
bool IsInWordWT (sal_Int16 nWordType, SwRootFrame const *pLayout=nullptr) const
 
bool GoStartWordWT (sal_Int16 nWordType, SwRootFrame const *pLayout=nullptr)
 
bool GoEndWordWT (sal_Int16 nWordType, SwRootFrame const *pLayout=nullptr)
 
bool GoNextWordWT (sal_Int16 nWordType, SwRootFrame const *pLayout=nullptr)
 
bool GoPrevWordWT (sal_Int16 nWordType, SwRootFrame const *pLayout=nullptr)
 
bool SelectWordWT (SwViewShell const *pViewShell, sal_Int16 nWordType, const Point *pPt)
 
bool GoSentence (SentenceMoveType eMoveType, SwRootFrame const *pLayout=nullptr)
 
void ExpandToSentenceBorders (SwRootFrame const *pLayout)
 
virtual bool LeftRight (bool bLeft, sal_uInt16 nCnt, SwCursorSkipMode nMode, bool bAllowVisual, bool bSkipHidden, bool bInsertCursor, SwRootFrame const *pLayout, bool isFieldNames)
 
bool UpDown (bool bUp, sal_uInt16 nCnt, Point const *pPt, tools::Long nUpDownX, SwRootFrame &rLayout)
 
bool LeftRightMargin (SwRootFrame const &rLayout, bool bLeftMargin, bool bAPI)
 
bool IsAtLeftRightMargin (SwRootFrame const &rLayout, bool bLeftMargin, bool bAPI) const
 
bool SttEndDoc (bool bSttDoc)
 
bool GoPrevNextCell (bool bNext, sal_uInt16 nCnt)
 
bool Left (sal_uInt16 nCnt)
 
bool Right (sal_uInt16 nCnt)
 
bool GoNextCell (sal_uInt16 nCnt=1)
 
bool GoPrevCell (sal_uInt16 nCnt=1)
 
virtual bool GotoTable (const OUString &rName)
 
bool GotoTableBox (const OUString &rName)
 
bool GotoRegion (std::u16string_view rName)
 
bool GotoFootnoteAnchor ()
 
bool GotoFootnoteText ()
 
bool GotoNextFootnoteAnchor ()
 
bool GotoPrevFootnoteAnchor ()
 
bool MovePara (SwWhichPara, SwMoveFnCollection const &)
 
bool MoveSection (SwWhichSection, SwMoveFnCollection const &)
 
bool MoveTable (SwWhichTable, SwMoveFnCollection const &)
 
bool MoveRegion (SwWhichRegion, SwMoveFnCollection const &)
 
virtual bool IsSelOvr (SwCursorSelOverFlags eFlags=SwCursorSelOverFlags::CheckNodeSection|SwCursorSelOverFlags::Toggle|SwCursorSelOverFlags::ChangePos)
 
bool IsInProtectTable (bool bMove=false, bool bChgCursor=true)
 
bool IsNoContent () const
 determine if point is outside of the node-array's content area More...
 
void RestoreSavePos ()
 Restore cursor state to the one saved by SwCursorSaveState. More...
 
virtual bool IsAtValidPos (bool bPoint=true) const
 Return <true> if cursor can be set to this position. More...
 
virtual bool IsReadOnlyAvailable () const
 
virtual bool IsSkipOverProtectSections () const
 
virtual bool IsSkipOverHiddenSections () const
 
sal_uInt8 GetCursorBidiLevel () const
 
void SetCursorBidiLevel (sal_uInt8 nNewLevel)
 
bool IsColumnSelection () const
 
void SetColumnSelection (bool bNew)
 
sal_Int32 GetCursorRowSpanOffset () const
 
SwCursorGetNext ()
 
const SwCursorGetNext () const
 
SwCursorGetPrev ()
 
const SwCursorGetPrev () const
 
- Public Member Functions inherited from SwPaM
 SwPaM (const SwPosition &rPos, SwPaM *pRing=nullptr)
 
 SwPaM (const SwPosition &rMk, const SwPosition &rPt, SwPaM *pRing=nullptr)
 
 SwPaM (const SwNodeIndex &rMk, const SwNodeIndex &rPt, SwNodeOffset nMkOffset=SwNodeOffset(0), SwNodeOffset nPtOffset=SwNodeOffset(0), SwPaM *pRing=nullptr)
 
 SwPaM (const SwNode &rMk, const SwNode &rPt, SwNodeOffset nMkOffset=SwNodeOffset(0), SwNodeOffset nPtOffset=SwNodeOffset(0), SwPaM *pRing=nullptr)
 
 SwPaM (const SwNodeIndex &rMk, sal_Int32 nMkContent, const SwNodeIndex &rPt, sal_Int32 nPtContent, SwPaM *pRing=nullptr)
 
 SwPaM (const SwNode &rMk, sal_Int32 nMkContent, const SwNode &rPt, sal_Int32 nPtContent, SwPaM *pRing=nullptr)
 
 SwPaM (const SwNode &rMk, SwNodeOffset nMkOffset, sal_Int32 nMkContent, const SwNode &rPt, SwNodeOffset nPtOffset, sal_Int32 nPtContent, SwPaM *pRing=nullptr)
 
 SwPaM (const SwNode &rNd, SwNodeOffset nNdOffset, sal_Int32 nContent=0, SwPaM *pRing=nullptr)
 
 SwPaM (const SwNode &rNd, sal_Int32 nContent=0, SwPaM *pRing=nullptr)
 
 SwPaM (const SwNodeIndex &rNd, sal_Int32 nContent=0, SwPaM *pRing=nullptr)
 
 SwPaM (SwNodes &rNds, SwNodeOffset nMkOffset=SwNodeOffset(0), SwPaM *pRing=nullptr)
 
virtual ~SwPaM () override
 
 SwPaM (SwPaM const &rPaM, SwPaM *pRing)
 this takes a second parameter, which indicates the Ring that the new PaM should be part of (may be null) More...
 
SwPaMoperator= (const SwPaM &)
 @@ semantic: no copy assignment for super class Ring. More...
 
bool Move (SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
 Movement of cursor. More...
 
bool IsInFrontOfLabel () const
 
void SetInFrontOfLabel_ (bool bNew)
 
virtual void SetMark ()
 Unless this is called, the getter method of Mark will return Point. More...
 
void DeleteMark ()
 
void Exchange ()
 
bool HasMark () const
 A PaM marks a selection if Point and Mark are distinct positions. More...
 
const SwPositionGetPoint () const
 
SwPositionGetPoint ()
 
const SwPositionGetMark () const
 
SwPositionGetMark ()
 
const SwPositionStart () const
 
SwPositionStart ()
 
const SwPositionEnd () const
 
SwPositionEnd ()
 
std::pair< const SwPosition *, const SwPosition * > StartEnd () const
 Because sometimes the cost of the operator<= can add up. More...
 
std::pair< SwPosition *, SwPosition * > StartEnd ()
 
SwNodeGetPointNode () const
 
SwNodeGetMarkNode () const
 
SwContentNodeGetPointContentNode () const
 
SwContentNodeGetMarkContentNode () const
 
void Normalize (bool bPointFirst=true)
 Normalizes PaM, i.e. More...
 
SwDocGetDoc () const
 
SwPositionGetBound (bool bOne=true)
 
const SwPositionGetBound (bool bOne=true) const
 
sal_uInt16 GetPageNum (bool bAtPoint=true, const Point *pLayPos=nullptr)
 Get number of page which contains cursor. More...
 
bool HasReadonlySel (bool bFormView, bool isReplace) const
 Is in something protected (readonly) or selection contains something protected. More...
 
bool HasHiddenSections () const
 Is there hidden sections in the selected area. More...
 
bool ContainsPosition (const SwPosition &rPos) const
 
OUString GetText () const
 
void InvalidatePaM ()
 
SwPaMGetNext ()
 
const SwPaMGetNext () const
 
SwPaMGetPrev ()
 
const SwPaMGetPrev () const
 
bool IsMultiSelection () const
 
void dumpAsXml (xmlTextWriterPtr pWriter) const
 
- Public Member Functions inherited from sw::Ring< SwPaM >
virtual ~Ring () COVERITY_NOEXCEPT_FALSE
 
void unlink ()
 algo::unlink is buggy! don't call it directly! More...
 
void MoveTo (SwPaM *pDestRing)
 Removes this item from its current ring container and adds it to another ring container. More...
 
ring_container GetRingContainer ()
 
const_ring_container GetRingContainer () const
 
- Public Member Functions inherited from SwSelPaintRects
 SwSelPaintRects (const SwCursorShell &rCSh)
 
virtual ~SwSelPaintRects ()
 
virtual void FillRects ()=0
 
virtual void FillStartEnd (SwRect &rStart, SwRect &rEnd) const =0
 Fill rStart and rEnd with a rectangle that represents the start and end for selection handles. More...
 
void swapContent (SwSelPaintRects &rSwap)
 
void Show (std::vector< OString > *pSelectionRectangles=nullptr)
 
void Hide ()
 
void Invalidate (const SwRect &rRect)
 
void SetShowTextInputFieldOverlay (const bool bShow)
 
void SetShowContentControlOverlay (const bool bShow)
 
const VclPtr< SwContentControlButton > & GetContentControlButton () const
 
const SwCursorShellGetShell () const
 
std::optional< OString > getLOKPayload (int nType, int nViewId) const
 

Private Member Functions

bool UpDown (bool bUp, sal_uInt16 nCnt, Point const *pPt, tools::Long nUpDownX, SwRootFrame &rLayout)
 

Private Attributes

Point m_MarkPt
 
Point m_PointPt
 
const SwPositionm_pInitialPoint
 

Additional Inherited Members

- Public Types inherited from SwCursor
enum  SentenceMoveType {
  NEXT_SENT ,
  PREV_SENT ,
  START_SENT ,
  END_SENT
}
 
- Public Types inherited from sw::Ring< SwPaM >
typedef std::add_const< SwPaM >::type const_value_type
 
typedef RingContainer< SwPaMring_container
 
typedef RingContainer< const_value_typeconst_ring_container
 
- Static Public Member Functions inherited from SwSelPaintRects
static void Get1PixelInLogic (const SwViewShell &rSh, tools::Long *pX=nullptr, tools::Long *pY=nullptr)
 
- Protected Member Functions inherited from SwCursor
void SaveState ()
 
void RestoreState ()
 
const SwCursor_SavePosGetSavePos () const
 
virtual const SwContentFrameDoSetBidiLevelLeftRight (bool &io_rbLeft, bool bVisualAllowed, bool bInsertCursor)
 
virtual void DoSetBidiLevelUpDown ()
 
virtual bool IsSelOvrCheck (SwCursorSelOverFlags eFlags)
 
- Protected Member Functions inherited from sw::Ring< SwPaM >
 Ring ()
 Creates a new item in a ring container all by itself. More...
 
 Ring (SwPaM *pRing)
 Creates a new item and add it to an existing ring container. More...
 
SwPaMGetNextInRing ()
 
const_value_typeGetNextInRing () const
 
SwPaMGetPrevInRing ()
 
const_value_typeGetPrevInRing () const
 
bool unique () const
 

Detailed Description

Represents the current text cursor of one opened edit window.

See SwShellTableCursor for a table cursor that extends this class.

Definition at line 139 of file viscrs.hxx.

Constructor & Destructor Documentation

◆ SwShellCursor() [1/3]

SwShellCursor::SwShellCursor ( const SwCursorShell rCursorSh,
const SwPosition rPos 
)

Definition at line 903 of file viscrs.cxx.

Referenced by Create().

◆ SwShellCursor() [2/3]

SwShellCursor::SwShellCursor ( const SwCursorShell rCursorSh,
const SwPosition rPos,
const Point rPtPos,
SwPaM pRing 
)

Definition at line 911 of file viscrs.cxx.

◆ SwShellCursor() [3/3]

SwShellCursor::SwShellCursor ( SwShellCursor rICursor)

Definition at line 923 of file viscrs.cxx.

References GetShell().

◆ ~SwShellCursor()

SwShellCursor::~SwShellCursor ( )
overridevirtual

Definition at line 931 of file viscrs.cxx.

Member Function Documentation

◆ Create()

SwCursor * SwShellCursor::Create ( SwPaM pRing = nullptr) const
overridevirtual

Reimplemented from SwCursor.

Reimplemented in SwShellTableCursor.

Definition at line 1018 of file viscrs.cxx.

References SwPaM::GetPoint(), GetPtPos(), SwSelPaintRects::GetShell(), and SwShellCursor().

Referenced by SwShellTableCursor::Create().

◆ FillRects()

void SwShellCursor::FillRects ( )
overridevirtual

◆ FillStartEnd()

void SwShellCursor::FillStartEnd ( SwRect rStart,
SwRect rEnd 
) const
overridevirtual

◆ GetEndPos() [1/2]

Point & SwShellCursor::GetEndPos ( )
inline

Definition at line 172 of file viscrs.hxx.

References SwPaM::End().

◆ GetEndPos() [2/2]

const Point & SwShellCursor::GetEndPos ( ) const
inline

Definition at line 171 of file viscrs.hxx.

References SwPaM::End().

Referenced by SwRootFrame::CalcFrameRects(), and FillStartEnd().

◆ GetMkPos() [1/2]

Point & SwShellCursor::GetMkPos ( )
inline

Definition at line 168 of file viscrs.hxx.

References SwPaM::GetMark().

◆ GetMkPos() [2/2]

const Point & SwShellCursor::GetMkPos ( ) const
inline

◆ GetNext() [1/2]

SwShellCursor * SwShellCursor::GetNext ( )
inline

◆ GetNext() [2/2]

const SwShellCursor * SwShellCursor::GetNext ( ) const
inline

Definition at line 189 of file viscrs.hxx.

◆ GetPrev() [1/2]

SwShellCursor * SwShellCursor::GetPrev ( )
inline

Definition at line 190 of file viscrs.hxx.

Referenced by SwViewShell::FillPrtDoc(), and SwCursorShell::GoPrevCursor().

◆ GetPrev() [2/2]

const SwShellCursor * SwShellCursor::GetPrev ( ) const
inline

Definition at line 191 of file viscrs.hxx.

◆ GetPtPos() [1/2]

Point & SwShellCursor::GetPtPos ( )
inline

Definition at line 166 of file viscrs.hxx.

References SwPaM::GetPoint().

◆ GetPtPos() [2/2]

const Point & SwShellCursor::GetPtPos ( ) const
inline

◆ GetSttPos() [1/2]

Point & SwShellCursor::GetSttPos ( )
inline

Definition at line 170 of file viscrs.hxx.

References SwPaM::Start().

◆ GetSttPos() [2/2]

const Point & SwShellCursor::GetSttPos ( ) const
inline

◆ Hide()

void SwShellCursor::Hide ( )

◆ Invalidate()

void SwShellCursor::Invalidate ( const SwRect rRect)

Definition at line 996 of file viscrs.cxx.

References sw::Ring< SwPaM >::GetRingContainer().

Referenced by SwCursorShell::Paint().

◆ IsAtValidPos()

bool SwShellCursor::IsAtValidPos ( bool  bPoint = true) const
overridevirtual

Return <true> if cursor can be set to this position.

Reimplemented from SwCursor.

Reimplemented in SwShellTableCursor.

Definition at line 1103 of file viscrs.cxx.

References SwSelPaintRects::GetShell(), and SwCursor::IsAtValidPos().

Referenced by SwShellTableCursor::IsAtValidPos().

◆ IsReadOnlyAvailable()

bool SwShellCursor::IsReadOnlyAvailable ( ) const
overridevirtual

Reimplemented from SwCursor.

Definition at line 934 of file viscrs.cxx.

References SwSelPaintRects::GetShell(), and SwCursorShell::IsReadOnlyAvailable().

◆ MaxReplaceArived()

short SwShellCursor::MaxReplaceArived ( )
overridevirtual

◆ SaveTableBoxContent()

void SwShellCursor::SaveTableBoxContent ( const SwPosition pPos)
overridevirtual

Reimplemented from SwCursor.

Reimplemented in SwShellTableCursor.

Definition at line 1063 of file viscrs.cxx.

References SwSelPaintRects::GetShell(), and SaveTableBoxContent().

Referenced by SaveTableBoxContent(), and SwShellTableCursor::SaveTableBoxContent().

◆ SetMark()

void SwShellCursor::SetMark ( )
overridevirtual

◆ Show()

void SwShellCursor::Show ( SfxViewShell const *  pViewShell)

◆ UpDown() [1/2]

bool SwShellCursor::UpDown ( bool  bUp,
sal_uInt16  nCnt 
)

◆ UpDown() [2/2]

bool SwCursor::UpDown ( bool  bUp,
sal_uInt16  nCnt,
Point const *  pPt,
tools::Long  nUpDownX,
SwRootFrame rLayout 
)
private

Definition at line 166 of file swcrsr.cxx.

Member Data Documentation

◆ m_MarkPt

Point SwShellCursor::m_MarkPt
private

Definition at line 143 of file viscrs.hxx.

Referenced by SetMark().

◆ m_pInitialPoint

const SwPosition* SwShellCursor::m_pInitialPoint
private

Definition at line 145 of file viscrs.hxx.

Referenced by SetMark().

◆ m_PointPt

Point SwShellCursor::m_PointPt
private

Definition at line 144 of file viscrs.hxx.

Referenced by SetMark().


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