19 #ifndef INCLUDED_SW_INC_PAM_HXX
20 #define INCLUDED_SW_INC_PAM_HXX
50 SwDoc& GetDoc()
const;
78 const T& rStt1,
const T& rEnd1,
79 const T& rStt2,
const T& rEnd2 )
92 else if( rEnd1 == rStt2 )
97 else if( rEnd2 > rStt1 )
101 if( rEnd2 == rEnd1 && rStt2 == rStt1 )
114 else if( rEnd2 == rStt1 )
156 const SwNode& rPt, sal_Int32 nPtContent,
SwPaM* pRing =
nullptr );
159 virtual ~
SwPaM()
override;
175 virtual void SetMark();
179 if (m_pMark != m_pPoint)
193 if (m_pPoint != m_pMark)
205 bool HasMark()
const {
return m_pPoint != m_pMark; }
213 {
return (*m_pPoint) <= (*m_pMark) ? m_pPoint : m_pMark; }
215 {
return (*m_pPoint) <= (*m_pMark) ? m_pPoint : m_pMark; }
218 {
return (*m_pPoint) > (*m_pMark) ? m_pPoint : m_pMark; }
220 {
return (*m_pPoint) > (*m_pMark) ? m_pPoint : m_pMark; }
225 return ( bPoint ? m_pPoint->
nNode : m_pMark->
nNode ).GetNode();
240 void Normalize(
bool bPointFirst =
true);
246 {
return bOne ? m_Bound1 : m_Bound2; }
248 {
return bOne ? m_Bound1 : m_Bound2; }
251 sal_uInt16 GetPageNum(
bool bAtPoint =
true,
const Point* pLayPos =
nullptr );
255 bool HasReadonlySel(
bool bFormView )
const;
259 return *
Start() <= rPos && rPos <= *
End();
262 OUString GetText()
const;
263 void InvalidatePaM();
282 #endif // INCLUDED_SW_INC_PAM_HXX
bool operator<(const SwTextGlyphsKey &l, const SwTextGlyphsKey &r)
SwNode & GetNode(bool bPoint=true) const
Marks a position in the document model.
bool IsMultiSelection() const
SwContentNode * GetNode(SwPaM &rPam, bool &rbFirst, SwMoveFnCollection const &fnMove, bool const bInReadOnly, SwRootFrame const *const i_pLayout)
This function returns the next node in direction of search.
SW_DLLPUBLIC bool GoInNode(SwPaM &, SwMoveFnCollection const &)
SwComparePosition ComparePosition(const T &rStt1, const T &rEnd1, const T &rStt2, const T &rEnd2)
Pos1 is as large as Pos2.
const SwPosition * GetMark() const
const SwPaM * GetPrev() const
Pos1 completely contained in Pos2.
SW_DLLPUBLIC SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
SwPosition * m_pPoint
points at either m_Bound1 or m_Bound2
SW_DLLPUBLIC bool GoInDoc(SwPaM &, SwMoveFnCollection const &)
SwPosition & GetBound(bool bOne=true)
SW_DLLPUBLIC bool GoInContent(SwPaM &, SwMoveFnCollection const &)
SwPosition * m_pMark
points at either m_Bound1 or m_Bound2
SwContentNode * GetContentNode(bool bPoint=true) const
Pos1 end touches at Pos2 start.
auto(*)(SwPaM &rPam, SwMoveFnCollection const &fnMove) -> bool SwGoInDoc
bool GoInContentCells(SwPaM &, SwMoveFnCollection const &)
Pos2 completely contained in Pos1.
value_type * GetPrevInRing()
bool GoInContentSkipHidden(SwPaM &, SwMoveFnCollection const &)
const SwPaM * GetNext() const
bool ContainsPosition(const SwPosition &rPos) const
bool CheckNodesRange(const SwNodeIndex &, const SwNodeIndex &, bool bChkSection)
Check if the given range is inside one of the defined top-level sections.
PaM is Point and Mark: a selection of the document model.
struct _xmlTextWriter * xmlTextWriterPtr
const SwPosition * GetPoint() const
Pos1 start touches at Pos2 end.
const SwPosition & GetBound(bool bOne=true) const
SwContentNode * GetContentNode()
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
value_type * GetNextInRing()
Marks a character position inside a document model node.
Marks a node in the document model.
const SwPosition * Start() const
bool GoInSection(SwPaM &, SwMoveFnCollection const &)
SW_DLLPUBLIC std::ostream & operator<<(std::ostream &s, const SwPosition &position)
Pos1 overlaps Pos2 at the end.
const SwPosition * End() const
SW_DLLPUBLIC SwMoveFnCollection const & fnMoveBackward
void SetInFrontOfLabel_(bool bNew)
bool GoInContentCellsSkipHidden(SwPaM &, SwMoveFnCollection const &)
Pos1 overlaps Pos2 at the beginning.
bool IsInFrontOfLabel() const
Base class of the Writer document model elements.