19#ifndef INCLUDED_SW_INC_PAM_HXX
20#define INCLUDED_SW_INC_PAM_HXX
51 SwDoc& GetDoc()
const;
79 const T& rStt1,
const T& rEnd1,
80 const T& rStt2,
const T& rEnd2 )
93 else if( rEnd1 == rStt2 )
98 else if( rEnd2 > rStt1 )
102 if( rEnd2 == rEnd1 && rStt2 == rStt1 )
115 else if( rEnd2 == rStt1 )
157 const SwNode& rPt, sal_Int32 nPtContent,
SwPaM* pRing =
nullptr );
160 virtual ~SwPaM()
override;
176 virtual void SetMark();
180 if (m_pMark != m_pPoint)
194 if (m_pPoint != m_pMark)
206 bool HasMark()
const {
return m_pPoint != m_pMark; }
214 {
return (*m_pPoint) <= (*m_pMark) ? m_pPoint : m_pMark; }
216 {
return (*m_pPoint) <= (*m_pMark) ? m_pPoint : m_pMark; }
219 {
return (*m_pPoint) > (*m_pMark) ? m_pPoint : m_pMark; }
221 {
return (*m_pPoint) > (*m_pMark) ? m_pPoint : m_pMark; }
226 return ( bPoint ? m_pPoint->
nNode : m_pMark->
nNode ).GetNode();
241 void Normalize(
bool bPointFirst =
true);
247 {
return bOne ? m_Bound1 : m_Bound2; }
249 {
return bOne ? m_Bound1 : m_Bound2; }
252 sal_uInt16 GetPageNum(
bool bAtPoint =
true,
const Point* pLayPos =
nullptr );
256 bool HasReadonlySel(
bool bFormView )
const;
260 return *
Start() <= rPos && rPos <= *
End();
263 OUString GetText()
const;
264 void InvalidatePaM();
266 {
return GetNextInRing(); }
268 {
return GetNextInRing(); }
270 {
return GetPrevInRing(); }
272 {
return GetPrevInRing(); }
274 {
return !unique(); }
struct _xmlTextWriter * xmlTextWriterPtr
Marks a character position inside a document model node.
Marks a node in the document model.
Base class of the Writer document model elements.
SwContentNode * GetContentNode()
PaM is Point and Mark: a selection of the document model.
const SwPosition * GetMark() const
SwContentNode * GetContentNode(bool bPoint=true) const
void SetInFrontOfLabel_(bool bNew)
SwPosition * m_pMark
points at either m_Bound1 or m_Bound2
bool ContainsPosition(const SwPosition &rPos) const
bool IsInFrontOfLabel() const
SwNode & GetNode(bool bPoint=true) const
SwPosition * m_pPoint
points at either m_Bound1 or m_Bound2
bool IsMultiSelection() const
const SwPosition * End() const
SwPaM(SwPaM const &rPaM)=delete
const SwPaM * GetPrev() const
SwPosition & GetBound(bool bOne=true)
const SwPosition * GetPoint() const
const SwPaM * GetNext() const
const SwPosition * Start() const
const SwPosition & GetBound(bool bOne=true) const
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
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.
SwComparePosition ComparePosition(const T &rStt1, const T &rEnd1, const T &rStt2, const T &rEnd2)
auto(*)(SwPaM &rPam, SwMoveFnCollection const &fnMove) -> bool SwGoInDoc
bool GoInContentSkipHidden(SwPaM &, SwMoveFnCollection const &)
SW_DLLPUBLIC SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
SW_DLLPUBLIC bool GoInDoc(SwPaM &, SwMoveFnCollection const &)
SW_DLLPUBLIC bool GoInNode(SwPaM &, SwMoveFnCollection const &)
SW_DLLPUBLIC std::ostream & operator<<(std::ostream &s, const SwPosition &position)
bool GoInContentCells(SwPaM &, SwMoveFnCollection const &)
bool GoInSection(SwPaM &, SwMoveFnCollection const &)
@ OverlapBehind
Pos1 overlaps Pos2 at the end.
@ CollideEnd
Pos1 end touches at Pos2 start.
@ Behind
Pos1 behind Pos2.
@ OverlapBefore
Pos1 overlaps Pos2 at the beginning.
@ Outside
Pos2 completely contained in Pos1.
@ Before
Pos1 before Pos2.
@ Inside
Pos1 completely contained in Pos2.
@ CollideStart
Pos1 start touches at Pos2 end.
@ Equal
Pos1 is as large as Pos2.
SW_DLLPUBLIC bool GoInContent(SwPaM &, SwMoveFnCollection const &)
SW_DLLPUBLIC SwMoveFnCollection const & fnMoveBackward
bool GoInContentCellsSkipHidden(SwPaM &, SwMoveFnCollection const &)
bool CheckNodesRange(const SwNodeIndex &, const SwNodeIndex &, bool bChkSection)
Check if the given range is inside one of the defined top-level sections.
Marks a position in the document model.
bool operator<(const wwFont &r1, const wwFont &r2)