LibreOffice Module sw (master) 1
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
sw::mark::MarkManager Class Referencefinal

#include <MarkManager.hxx>

Inheritance diagram for sw::mark::MarkManager:
[legend]
Collaboration diagram for sw::mark::MarkManager:
[legend]

Public Types

typedef std::vector< sw::mark::MarkBase * > container_t
 
- Public Types inherited from IDocumentMarkAccess
enum class  MarkType {
  UNO_BOOKMARK ,
  DDE_BOOKMARK ,
  BOOKMARK ,
  CROSSREF_HEADING_BOOKMARK ,
  CROSSREF_NUMITEM_BOOKMARK ,
  ANNOTATIONMARK ,
  TEXT_FIELDMARK ,
  CHECKBOX_FIELDMARK ,
  DROPDOWN_FIELDMARK ,
  DATE_FIELDMARK ,
  NAVIGATOR_REMINDER
}
 
typedef iterator const_iterator_t
 

Public Member Functions

 MarkManager (SwDoc &rDoc)
 
virtual ::sw::mark::IMarkmakeMark (const SwPaM &rPaM, const OUString &rName, IDocumentMarkAccess::MarkType eMark, sw::mark::InsertMode eMode, SwPosition const *pSepPos=nullptr) override
 
virtual sw::mark::IFieldmark * makeFieldBookmark (const SwPaM &rPaM, const OUString &rName, const OUString &rType, SwPosition const *pSepPos=nullptr) override
 
virtual sw::mark::IFieldmark * makeNoTextFieldBookmark (const SwPaM &rPaM, const OUString &rName, const OUString &rType) override
 
virtual ::sw::mark::IMarkgetMarkForTextNode (const SwTextNode &rTextNode, IDocumentMarkAccess::MarkType eMark) override
 Returns a mark in the document for a paragraph. More...
 
virtual sw::mark::IMarkmakeAnnotationMark (const SwPaM &rPaM, const OUString &rName) override
 
virtual void repositionMark (::sw::mark::IMark *io_pMark, const SwPaM &rPaM) override
 Moves an existing mark to a new selection and performs needed updates. More...
 
virtual bool renameMark (::sw::mark::IMark *io_pMark, const OUString &rNewName) override
 Renames an existing Mark, if possible. More...
 
virtual void correctMarksAbsolute (const SwNode &rOldNode, const SwPosition &rNewPos, const sal_Int32 nOffset) override
 Corrects marks (absolute) This method ignores the previous position of the mark in the paragraph. More...
 
virtual void correctMarksRelative (const SwNode &rOldNode, const SwPosition &rNewPos, const sal_Int32 nOffset) override
 Corrects marks (relative) This method uses the previous position of the mark in the paragraph as offset. More...
 
virtual void deleteMarks (const SwNode &rStt, const SwNode &rEnd, std::vector< ::sw::mark::SaveBookmark > *pSaveBkmk, std::optional< sal_Int32 > oStartContentIdx, std::optional< sal_Int32 > oEndContentIdx) override
 Deletes marks in a range. More...
 
virtual std::unique_ptr< ILazyDeleterdeleteMark (const const_iterator_t &ppMark, bool isMoveNodes) override
 Deletes a mark. More...
 
virtual void deleteMark (const ::sw::mark::IMark *const pMark) override
 Deletes a mark. More...
 
virtual void clearAllMarks () override
 Clear (deletes) all marks. More...
 
virtual const_iterator_t getAllMarksBegin () const override
 returns a STL-like random access iterator to the begin of the sequence of marks. More...
 
virtual const_iterator_t getAllMarksEnd () const override
 returns a STL-like random access iterator to the end of the sequence of marks. More...
 
virtual sal_Int32 getAllMarksCount () const override
 returns the number of marks. More...
 
virtual const_iterator_t findMark (const OUString &rName) const override
 Finds a mark by name. More...
 
virtual bool isBookmarkDeleted (SwPaM const &rPaM, bool isReplace) const override
 check if the selection would delete a BOOKMARK More...
 
virtual const_iterator_t getBookmarksBegin () const override
 returns a STL-like random access iterator to the begin of the sequence the IBookmarks. More...
 
virtual const_iterator_t getBookmarksEnd () const override
 returns a STL-like random access iterator to the end of the sequence of IBookmarks. More...
 
virtual sal_Int32 getBookmarksCount () const override
 returns the number of IBookmarks. More...
 
virtual const_iterator_t findBookmark (const OUString &rName) const override
 Finds a bookmark by name. More...
 
virtual const_iterator_t findFirstBookmarkStartsAfter (const SwPosition &rPos) const override
 Finds the first mark that is starting after. More...
 
virtual ::sw::mark::IMarkgetOneInnermostBookmarkFor (const SwPosition &rPos) const override
 Get the innermost bookmark that contains rPos. More...
 
virtual const_iterator_t getFieldmarksBegin () const override
 returns a STL-like random access iterator to the begin of the sequence of fieldmarks. More...
 
virtual const_iterator_t getFieldmarksEnd () const override
 returns a STL-like random access iterator to the end of the sequence of fieldmarks. More...
 
virtual sal_Int32 getFieldmarksCount () const override
 returns the number of IFieldmarks. More...
 
virtual ::sw::mark::IFieldmark * getFieldmarkAt (const SwPosition &rPos) const override
 get Fieldmark for CH_TXT_ATR_FIELDSTART/CH_TXT_ATR_FIELDEND at rPos More...
 
virtual sw::mark::IFieldmark * getInnerFieldmarkFor (const SwPosition &rPos) const override
 
virtual sw::mark::IFieldmark * getFieldmarkBefore (const SwPosition &rPos, bool bLoop) const override
 
virtual sw::mark::IFieldmark * getFieldmarkAfter (const SwPosition &rPos, bool bLoop) const override
 
virtual ::sw::mark::IFieldmark * getDropDownFor (const SwPosition &rPos) const override
 
virtual std::vector<::sw::mark::IFieldmark * > getNoTextFieldmarksIn (const SwPaM &rPaM) const override
 
virtual void deleteFieldmarkAt (const SwPosition &rPos) override
 
virtual ::sw::mark::IFieldmark * changeFormFieldmarkType (::sw::mark::IFieldmark *pFieldmark, const OUString &rNewType) override
 
virtual void NotifyCursorUpdate (const SwCursorShell &rCursorShell) override
 
virtual void ClearFieldActivation () override
 
void LOKUpdateActiveField (const SfxViewShell *pViewShell)
 
void dumpAsXml (xmlTextWriterPtr pWriter) const
 
virtual const_iterator_t getAnnotationMarksBegin () const override
 
virtual const_iterator_t getAnnotationMarksEnd () const override
 
virtual sal_Int32 getAnnotationMarksCount () const override
 
virtual const_iterator_t findAnnotationMark (const OUString &rName) const override
 
virtual sw::mark::IMarkgetAnnotationMarkFor (const SwPosition &rPos) const override
 
virtual const_iterator_t findFirstAnnotationStartsAfter (const SwPosition &rPos) const override
 Finds the first mark that is starting after. More...
 
virtual void assureSortedMarkContainers () const override
 
virtual ::sw::mark::IMarkmakeAnnotationBookmark (const SwPaM &rPaM, const OUString &rName, IDocumentMarkAccess::MarkType eMark, sw::mark::InsertMode eMode, SwPosition const *pSepPos=nullptr) override
 
virtual const_iterator_t findAnnotationBookmark (const OUString &rName) const override
 
virtual void restoreAnnotationMarks (bool bDelete=true) override
 
- Public Member Functions inherited from IDocumentMarkAccess
virtual ::sw::mark::IMarkmakeMark (const SwPaM &rPaM, const OUString &rProposedName, MarkType eMark, ::sw::mark::InsertMode eMode, SwPosition const *pSepPos=nullptr)=0
 Generates a new mark in the document for a certain selection. More...
 
virtual sw::mark::IFieldmark * makeFieldBookmark (const SwPaM &rPaM, const OUString &rName, const OUString &rType, SwPosition const *pSepPos=nullptr)=0
 
virtual sw::mark::IFieldmark * makeNoTextFieldBookmark (const SwPaM &rPaM, const OUString &rName, const OUString &rType)=0
 
virtual sw::mark::IMarkmakeAnnotationMark (const SwPaM &rPaM, const OUString &rName)=0
 
virtual ::sw::mark::IMarkgetMarkForTextNode (const SwTextNode &rTextNode, MarkType eMark)=0
 Returns a mark in the document for a paragraph. More...
 
virtual void repositionMark (::sw::mark::IMark *io_pMark, const SwPaM &rPaM)=0
 Moves an existing mark to a new selection and performs needed updates. More...
 
virtual bool renameMark (::sw::mark::IMark *io_pMark, const OUString &rNewName)=0
 Renames an existing Mark, if possible. More...
 
virtual void correctMarksAbsolute (const SwNode &rOldNode, const SwPosition &rNewPos, const sal_Int32 nOffset)=0
 Corrects marks (absolute) This method ignores the previous position of the mark in the paragraph. More...
 
virtual void correctMarksRelative (const SwNode &rOldNode, const SwPosition &rNewPos, const sal_Int32 nOffset)=0
 Corrects marks (relative) This method uses the previous position of the mark in the paragraph as offset. More...
 
virtual void deleteMarks (const SwNode &rStt, const SwNode &rEnd, std::vector< ::sw::mark::SaveBookmark > *pSaveBkmk, std::optional< sal_Int32 > oStartContentIdx, std::optional< sal_Int32 > oEndContentIdx)=0
 Deletes marks in a range. More...
 
virtual std::unique_ptr< ILazyDeleterdeleteMark (const IDocumentMarkAccess::const_iterator_t &ppMark, bool isMoveNodes)=0
 Deletes a mark. More...
 
virtual void deleteMark (const ::sw::mark::IMark *const pMark)=0
 Deletes a mark. More...
 
virtual void clearAllMarks ()=0
 Clear (deletes) all marks. More...
 
virtual void assureSortedMarkContainers () const =0
 
virtual const_iterator_t getAllMarksBegin () const =0
 returns a STL-like random access iterator to the begin of the sequence of marks. More...
 
virtual const_iterator_t getAllMarksEnd () const =0
 returns a STL-like random access iterator to the end of the sequence of marks. More...
 
virtual sal_Int32 getAllMarksCount () const =0
 returns the number of marks. More...
 
virtual const_iterator_t findMark (const OUString &rMark) const =0
 Finds a mark by name. More...
 
virtual bool isBookmarkDeleted (SwPaM const &rPaM, bool isReplace) const =0
 check if the selection would delete a BOOKMARK More...
 
virtual const_iterator_t getBookmarksBegin () const =0
 returns a STL-like random access iterator to the begin of the sequence the IBookmarks. More...
 
virtual const_iterator_t getBookmarksEnd () const =0
 returns a STL-like random access iterator to the end of the sequence of IBookmarks. More...
 
virtual sal_Int32 getBookmarksCount () const =0
 returns the number of IBookmarks. More...
 
virtual const_iterator_t findBookmark (const OUString &rMark) const =0
 Finds a bookmark by name. More...
 
virtual const_iterator_t findFirstBookmarkStartsAfter (const SwPosition &rPos) const =0
 Finds the first mark that is starting after. More...
 
virtual sw::mark::IMarkgetOneInnermostBookmarkFor (const SwPosition &rPos) const =0
 Get the innermost bookmark that contains rPos. More...
 
virtual const_iterator_t getFieldmarksBegin () const =0
 returns a STL-like random access iterator to the begin of the sequence of fieldmarks. More...
 
virtual const_iterator_t getFieldmarksEnd () const =0
 returns a STL-like random access iterator to the end of the sequence of fieldmarks. More...
 
virtual sal_Int32 getFieldmarksCount () const =0
 returns the number of IFieldmarks. More...
 
virtual ::sw::mark::IFieldmark * getFieldmarkAt (const SwPosition &rPos) const =0
 get Fieldmark for CH_TXT_ATR_FIELDSTART/CH_TXT_ATR_FIELDEND at rPos More...
 
virtual sw::mark::IFieldmark * getInnerFieldmarkFor (const SwPosition &pos) const =0
 
virtual sw::mark::IFieldmark * getFieldmarkBefore (const SwPosition &pos, bool bLoop) const =0
 
virtual sw::mark::IFieldmark * getFieldmarkAfter (const SwPosition &pos, bool bLoop) const =0
 
virtual ::sw::mark::IFieldmark * getDropDownFor (const SwPosition &pos) const =0
 
virtual std::vector<::sw::mark::IFieldmark * > getNoTextFieldmarksIn (const SwPaM &rPaM) const =0
 
virtual void deleteFieldmarkAt (const SwPosition &rPos)=0
 
virtual ::sw::mark::IFieldmark * changeFormFieldmarkType (::sw::mark::IFieldmark *pFieldmark, const OUString &rNewType)=0
 
virtual void NotifyCursorUpdate (const SwCursorShell &rCursorShell)=0
 
virtual void ClearFieldActivation ()=0
 
virtual const_iterator_t getAnnotationMarksBegin () const =0
 
virtual const_iterator_t getAnnotationMarksEnd () const =0
 
virtual sal_Int32 getAnnotationMarksCount () const =0
 
virtual const_iterator_t findAnnotationMark (const OUString &rName) const =0
 
virtual sw::mark::IMarkgetAnnotationMarkFor (const SwPosition &rPosition) const =0
 
virtual ::sw::mark::IMarkmakeAnnotationBookmark (const SwPaM &rPaM, const OUString &rProposedName, MarkType eMark, ::sw::mark::InsertMode eMode, SwPosition const *pSepPos=nullptr)=0
 
virtual const_iterator_t findAnnotationBookmark (const OUString &rName) const =0
 
virtual void restoreAnnotationMarks (bool bDelete=true)=0
 
virtual const_iterator_t findFirstAnnotationStartsAfter (const SwPosition &rPos) const =0
 Finds the first mark that is starting after. More...
 

Private Member Functions

 MarkManager (MarkManager const &)=delete
 
MarkManageroperator= (MarkManager const &)=delete
 
OUString getUniqueMarkName (const OUString &rName) const
 
void sortSubsetMarks ()
 
void sortMarks ()
 

Private Attributes

container_t m_vAllMarks
 
container_t m_vBookmarks
 
container_t m_vFieldmarks
 
MarkBasenameMapUniqueOffset_t m_aMarkBasenameMapUniqueOffset
 
container_t m_vAnnotationMarks
 
SwDocm_rDoc
 
sw::mark::FieldmarkWithDropDownButtonm_pLastActiveFieldmark
 

Additional Inherited Members

- Static Public Member Functions inherited from IDocumentMarkAccess
static SW_DLLPUBLIC MarkType GetType (const ::sw::mark::IMark &rMark)
 Returns the MarkType used to create the mark. More...
 
static SW_DLLPUBLIC OUString GetCrossRefHeadingBookmarkNamePrefix ()
 
static SW_DLLPUBLIC bool IsLegalPaMForCrossRefHeadingBookmark (const SwPaM &rPaM)
 
static void DeleteFieldmarkCommand (::sw::mark::IFieldmark const &rMark)
 
- Protected Member Functions inherited from IDocumentMarkAccess
virtual ~IDocumentMarkAccess ()
 

Detailed Description

Definition at line 36 of file MarkManager.hxx.

Member Typedef Documentation

◆ container_t

Definition at line 124 of file MarkManager.hxx.

Constructor & Destructor Documentation

◆ MarkManager() [1/2]

sw::mark::MarkManager::MarkManager ( SwDoc rDoc)

Definition at line 563 of file docbm.cxx.

◆ MarkManager() [2/2]

sw::mark::MarkManager::MarkManager ( MarkManager const &  )
privatedelete

Member Function Documentation

◆ assureSortedMarkContainers()

void sw::mark::MarkManager::assureSortedMarkContainers ( ) const
overridevirtual

Implements IDocumentMarkAccess.

Definition at line 1831 of file docbm.cxx.

References sortMarks().

◆ changeFormFieldmarkType()

sw::mark::IFieldmark * sw::mark::MarkManager::changeFormFieldmarkType ( ::sw::mark::IFieldmark *  pFieldmark,
const OUString &  rNewType 
)
overridevirtual

◆ clearAllMarks()

void sw::mark::MarkManager::clearAllMarks ( )
overridevirtual

Clear (deletes) all marks.

Implements IDocumentMarkAccess.

Definition at line 1388 of file docbm.cxx.

References ClearFieldActivation(), m_vAllMarks, m_vAnnotationMarks, m_vBookmarks, m_vFieldmarks, and p.

◆ ClearFieldActivation()

void sw::mark::MarkManager::ClearFieldActivation ( )
overridevirtual

◆ correctMarksAbsolute()

void sw::mark::MarkManager::correctMarksAbsolute ( const SwNode rOldNode,
const SwPosition rNewPos,
const sal_Int32  nOffset 
)
overridevirtual

Corrects marks (absolute) This method ignores the previous position of the mark in the paragraph.

Parameters
rOldNode[in] the node from which nodes should be moved
rNewPos[in] new position to which marks will be moved, if nOffset == 0
nOffset[in] the offset by which the mark gets positioned of rNewPos

Implements IDocumentMarkAccess.

Definition at line 905 of file docbm.cxx.

References SwPosition::AdjustContent(), sw::mark::MarkBase::GetMarkPos(), SwPosition::GetNode(), sw::mark::MarkBase::GetOtherMarkPos(), sw::mark::MarkBase::IsExpanded(), m_vAllMarks, SAL_INFO, sw::mark::MarkBase::SetMarkPos(), sw::mark::MarkBase::SetOtherMarkPos(), and sortMarks().

◆ correctMarksRelative()

void sw::mark::MarkManager::correctMarksRelative ( const SwNode rOldNode,
const SwPosition rNewPos,
const sal_Int32  nOffset 
)
overridevirtual

Corrects marks (relative) This method uses the previous position of the mark in the paragraph as offset.

Parameters
rOldNode[in] the node from which nodes should be moved
rNewPos[in] new position to which marks from the start of the paragraph will be moved, if nOffset == 0
nOffset[in] the offset by which the mark gets positioned of rNewPos in addition to its old position in the paragraph

Implements IDocumentMarkAccess.

Definition at line 951 of file docbm.cxx.

References SwPosition::AdjustContent(), SwPosition::GetContentIndex(), sw::mark::MarkBase::GetMarkPos(), SwPosition::GetNode(), sw::mark::MarkBase::GetOtherMarkPos(), sw::mark::MarkBase::IsExpanded(), m_vAllMarks, SAL_INFO, SwPosition::SetContent(), sw::mark::MarkBase::SetMarkPos(), sw::mark::MarkBase::SetOtherMarkPos(), and sortMarks().

◆ deleteFieldmarkAt()

void sw::mark::MarkManager::deleteFieldmarkAt ( const SwPosition rPos)
overridevirtual

Implements IDocumentMarkAccess.

Definition at line 1516 of file docbm.cxx.

References deleteMark(), getFieldmarkAt(), and m_vAllMarks.

Referenced by changeFormFieldmarkType().

◆ deleteMark() [1/2]

virtual void sw::mark::MarkManager::deleteMark ( const ::sw::mark::IMark *const  pMark)
overridevirtual

Deletes a mark.

Parameters
ppMark[in] the name of the mark to be deleted.

Implements IDocumentMarkAccess.

◆ deleteMark() [2/2]

std::unique_ptr< IDocumentMarkAccess::ILazyDeleter > sw::mark::MarkManager::deleteMark ( const const_iterator_t ppMark,
bool  isMoveNodes 
)
overridevirtual

◆ deleteMarks()

void sw::mark::MarkManager::deleteMarks ( const SwNode rStt,
const SwNode rEnd,
std::vector< ::sw::mark::SaveBookmark > *  pSaveBkmk,
std::optional< sal_Int32 >  oStartContentIdx,
std::optional< sal_Int32 >  oEndContentIdx 
)
overridevirtual

◆ dumpAsXml()

void sw::mark::MarkManager::dumpAsXml ( xmlTextWriterPtr  pWriter) const

Definition at line 1849 of file docbm.cxx.

References m_vAllMarks, m_vAnnotationMarks, m_vBookmarks, m_vFieldmarks, and pName.

◆ findAnnotationBookmark()

IDocumentMarkAccess::const_iterator_t sw::mark::MarkManager::findAnnotationBookmark ( const OUString &  rName) const
overridevirtual

Implements IDocumentMarkAccess.

Definition at line 1752 of file docbm.cxx.

References findBookmark(), and S_ANNOTATION_BOOKMARK.

◆ findAnnotationMark()

IDocumentMarkAccess::const_iterator_t sw::mark::MarkManager::findAnnotationMark ( const OUString &  rName) const
overridevirtual

Implements IDocumentMarkAccess.

Definition at line 1713 of file docbm.cxx.

References m_vAnnotationMarks.

Referenced by restoreAnnotationMarks().

◆ findBookmark()

IDocumentMarkAccess::const_iterator_t sw::mark::MarkManager::findBookmark ( const OUString &  rMark) const
overridevirtual

Finds a bookmark by name.

Parameters
rName[in] the name of the bookmark to find.
Returns
an iterator pointing to the bookmark, or getBookmarksEnd() if nothing was found.

Implements IDocumentMarkAccess.

Definition at line 1405 of file docbm.cxx.

References m_vBookmarks.

Referenced by findAnnotationBookmark().

◆ findFirstAnnotationStartsAfter()

IDocumentMarkAccess::const_iterator_t sw::mark::MarkManager::findFirstAnnotationStartsAfter ( const SwPosition rPos) const
overridevirtual

Finds the first mark that is starting after.

Returns
an iterator pointing to the mark, or pointing to getAnnotationMarksEnd() if nothing was found.

Implements IDocumentMarkAccess.

Definition at line 1731 of file docbm.cxx.

References m_vAnnotationMarks.

◆ findFirstBookmarkStartsAfter()

IDocumentMarkAccess::const_iterator_t sw::mark::MarkManager::findFirstBookmarkStartsAfter ( const SwPosition rPos) const
overridevirtual

Finds the first mark that is starting after.

Returns
an iterator pointing to the mark, or pointing to getBookmarksEnd() if nothing was found.

Implements IDocumentMarkAccess.

Definition at line 1439 of file docbm.cxx.

References m_vBookmarks.

◆ findMark()

IDocumentMarkAccess::const_iterator_t sw::mark::MarkManager::findMark ( const OUString &  rMark) const
overridevirtual

Finds a mark by name.

Parameters
rName[in] the name of the mark to find.
Returns
an iterator pointing to the mark, or pointing to getAllMarksEnd() if nothing was found.

Implements IDocumentMarkAccess.

Definition at line 1399 of file docbm.cxx.

References m_vAllMarks.

◆ getAllMarksBegin()

IDocumentMarkAccess::const_iterator_t sw::mark::MarkManager::getAllMarksBegin ( ) const
overridevirtual

returns a STL-like random access iterator to the begin of the sequence of marks.

Implements IDocumentMarkAccess.

Definition at line 1411 of file docbm.cxx.

References m_vAllMarks.

◆ getAllMarksCount()

sal_Int32 sw::mark::MarkManager::getAllMarksCount ( ) const
overridevirtual

returns the number of marks.

Note: annotation marks are excluded

Implements IDocumentMarkAccess.

Definition at line 1417 of file docbm.cxx.

References m_vAllMarks.

◆ getAllMarksEnd()

IDocumentMarkAccess::const_iterator_t sw::mark::MarkManager::getAllMarksEnd ( ) const
overridevirtual

returns a STL-like random access iterator to the end of the sequence of marks.

Implements IDocumentMarkAccess.

Definition at line 1414 of file docbm.cxx.

References m_vAllMarks.

◆ getAnnotationMarkFor()

IMark * sw::mark::MarkManager::getAnnotationMarkFor ( const SwPosition rPos) const
overridevirtual

Implements IDocumentMarkAccess.

Definition at line 1719 of file docbm.cxx.

References m_vAnnotationMarks.

◆ getAnnotationMarksBegin()

IDocumentMarkAccess::const_iterator_t sw::mark::MarkManager::getAnnotationMarksBegin ( ) const
overridevirtual

Implements IDocumentMarkAccess.

Definition at line 1698 of file docbm.cxx.

References m_vAnnotationMarks.

◆ getAnnotationMarksCount()

sal_Int32 sw::mark::MarkManager::getAnnotationMarksCount ( ) const
overridevirtual

Implements IDocumentMarkAccess.

Definition at line 1708 of file docbm.cxx.

References m_vAnnotationMarks.

◆ getAnnotationMarksEnd()

IDocumentMarkAccess::const_iterator_t sw::mark::MarkManager::getAnnotationMarksEnd ( ) const
overridevirtual

Implements IDocumentMarkAccess.

Definition at line 1703 of file docbm.cxx.

References m_vAnnotationMarks.

Referenced by restoreAnnotationMarks().

◆ getBookmarksBegin()

IDocumentMarkAccess::const_iterator_t sw::mark::MarkManager::getBookmarksBegin ( ) const
overridevirtual

returns a STL-like random access iterator to the begin of the sequence the IBookmarks.

Implements IDocumentMarkAccess.

Definition at line 1420 of file docbm.cxx.

References m_vBookmarks.

Referenced by restoreAnnotationMarks().

◆ getBookmarksCount()

sal_Int32 sw::mark::MarkManager::getBookmarksCount ( ) const
overridevirtual

returns the number of IBookmarks.

Implements IDocumentMarkAccess.

Definition at line 1426 of file docbm.cxx.

References m_vBookmarks.

◆ getBookmarksEnd()

IDocumentMarkAccess::const_iterator_t sw::mark::MarkManager::getBookmarksEnd ( ) const
overridevirtual

returns a STL-like random access iterator to the end of the sequence of IBookmarks.

Implements IDocumentMarkAccess.

Definition at line 1423 of file docbm.cxx.

References m_vBookmarks.

Referenced by restoreAnnotationMarks().

◆ getDropDownFor()

IFieldmark * sw::mark::MarkManager::getDropDownFor ( const SwPosition rPos) const
overridevirtual

Implements IDocumentMarkAccess.

Definition at line 1659 of file docbm.cxx.

References getFieldmarkAt(), and ODF_FORMDROPDOWN.

◆ getFieldmarkAfter()

IFieldmark * sw::mark::MarkManager::getFieldmarkAfter ( const SwPosition rPos,
bool  bLoop 
) const
overridevirtual

Implements IDocumentMarkAccess.

Definition at line 1692 of file docbm.cxx.

References m_vFieldmarks.

◆ getFieldmarkAt()

IFieldmark * sw::mark::MarkManager::getFieldmarkAt ( const SwPosition rPos) const
overridevirtual

get Fieldmark for CH_TXT_ATR_FIELDSTART/CH_TXT_ATR_FIELDEND at rPos

Implements IDocumentMarkAccess.

Definition at line 1448 of file docbm.cxx.

References m_vFieldmarks.

Referenced by deleteFieldmarkAt(), and getDropDownFor().

◆ getFieldmarkBefore()

IFieldmark * sw::mark::MarkManager::getFieldmarkBefore ( const SwPosition rPos,
bool  bLoop 
) const
overridevirtual

Implements IDocumentMarkAccess.

Definition at line 1695 of file docbm.cxx.

References m_vFieldmarks.

◆ getFieldmarksBegin()

IDocumentMarkAccess::const_iterator_t sw::mark::MarkManager::getFieldmarksBegin ( ) const
overridevirtual

returns a STL-like random access iterator to the begin of the sequence of fieldmarks.

Implements IDocumentMarkAccess.

Definition at line 1429 of file docbm.cxx.

References m_vFieldmarks.

◆ getFieldmarksCount()

sal_Int32 sw::mark::MarkManager::getFieldmarksCount ( ) const
overridevirtual

returns the number of IFieldmarks.

Implements IDocumentMarkAccess.

Definition at line 1435 of file docbm.cxx.

References m_vFieldmarks.

◆ getFieldmarksEnd()

IDocumentMarkAccess::const_iterator_t sw::mark::MarkManager::getFieldmarksEnd ( ) const
overridevirtual

returns a STL-like random access iterator to the end of the sequence of fieldmarks.

Implements IDocumentMarkAccess.

Definition at line 1432 of file docbm.cxx.

References m_vFieldmarks.

◆ getInnerFieldmarkFor()

IFieldmark * sw::mark::MarkManager::getInnerFieldmarkFor ( const SwPosition rPos) const
overridevirtual

Implements IDocumentMarkAccess.

Definition at line 1464 of file docbm.cxx.

References m_vFieldmarks.

Referenced by NotifyCursorUpdate().

◆ getMarkForTextNode()

sw::mark::IMark * sw::mark::MarkManager::getMarkForTextNode ( const SwTextNode rTextNode,
IDocumentMarkAccess::MarkType  eMark 
)
overridevirtual

Returns a mark in the document for a paragraph.

If there is none, a mark will be created.

Parameters
rTextNode[in] the paragraph being marked (a selection over the paragraph is marked)
eMark[in] the type of the new mark.
Returns
a pointer to the new mark (name might have changed).

Implements IDocumentMarkAccess.

Definition at line 829 of file docbm.cxx.

References eType, m_vBookmarks, makeMark(), and sw::mark::New.

◆ getNoTextFieldmarksIn()

std::vector< IFieldmark * > sw::mark::MarkManager::getNoTextFieldmarksIn ( const SwPaM rPaM) const
overridevirtual

◆ getOneInnermostBookmarkFor()

IMark * sw::mark::MarkManager::getOneInnermostBookmarkFor ( const SwPosition rPos) const
overridevirtual

Get the innermost bookmark that contains rPos.

Implements IDocumentMarkAccess.

Definition at line 1489 of file docbm.cxx.

References sw::mark::IMark::GetMarkEnd(), sw::mark::IMark::GetMarkStart(), and m_vBookmarks.

◆ getUniqueMarkName()

OUString sw::mark::MarkManager::getUniqueMarkName ( const OUString &  rName) const
private

◆ isBookmarkDeleted()

bool sw::mark::MarkManager::isBookmarkDeleted ( SwPaM const &  rPaM,
bool  isReplace 
) const
overridevirtual

◆ LOKUpdateActiveField()

void sw::mark::MarkManager::LOKUpdateActiveField ( const SfxViewShell pViewShell)

◆ makeAnnotationBookmark()

sw::mark::IMark * sw::mark::MarkManager::makeAnnotationBookmark ( const SwPaM rPaM,
const OUString &  rName,
IDocumentMarkAccess::MarkType  eMark,
sw::mark::InsertMode  eMode,
SwPosition const *  pSepPos = nullptr 
)
override

Definition at line 1741 of file docbm.cxx.

References eMode, eType, makeMark(), and S_ANNOTATION_BOOKMARK.

◆ makeAnnotationMark()

sw::mark::IMark * sw::mark::MarkManager::makeAnnotationMark ( const SwPaM rPaM,
const OUString &  rName 
)
overridevirtual

Implements IDocumentMarkAccess.

Definition at line 841 of file docbm.cxx.

References IDocumentMarkAccess::ANNOTATIONMARK, makeMark(), and sw::mark::New.

◆ makeFieldBookmark()

sw::mark::IFieldmark * sw::mark::MarkManager::makeFieldBookmark ( const SwPaM rPaM,
const OUString &  rName,
const OUString &  rType,
SwPosition const *  pSepPos = nullptr 
)
overridevirtual

◆ makeMark()

sw::mark::IMark * sw::mark::MarkManager::makeMark ( const SwPaM rPaM,
const OUString &  rName,
IDocumentMarkAccess::MarkType  eMark,
sw::mark::InsertMode  eMode,
SwPosition const *  pSepPos = nullptr 
)
override

◆ makeNoTextFieldBookmark()

sw::mark::IFieldmark * sw::mark::MarkManager::makeNoTextFieldBookmark ( const SwPaM rPaM,
const OUString &  rName,
const OUString &  rType 
)
overridevirtual

◆ NotifyCursorUpdate()

void sw::mark::MarkManager::NotifyCursorUpdate ( const SwCursorShell rCursorShell)
overridevirtual

◆ operator=()

MarkManager & sw::mark::MarkManager::operator= ( MarkManager const &  )
privatedelete

◆ renameMark()

bool sw::mark::MarkManager::renameMark ( ::sw::mark::IMark io_pMark,
const OUString &  rNewName 
)
overridevirtual

Renames an existing Mark, if possible.

Parameters
io_pMark[in/out] the mark to be renamed
rNewName[in] new name for the mark
Returns
false, if renaming failed (because the name is already in use)

Implements IDocumentMarkAccess.

Definition at line 876 of file docbm.cxx.

References SwPosition::GetDoc(), SwDoc::getIDocumentState(), SwDoc::GetIDocumentUndoRedo(), sw::mark::IMark::GetMarkPos(), sw::mark::IMark::GetName(), m_rDoc, m_vAllMarks, and IDocumentState::SetModified().

◆ repositionMark()

void sw::mark::MarkManager::repositionMark ( ::sw::mark::IMark io_pMark,
const SwPaM rPaM 
)
overridevirtual

◆ restoreAnnotationMarks()

void sw::mark::MarkManager::restoreAnnotationMarks ( bool  bDelete = true)
overridevirtual

◆ sortMarks()

void sw::mark::MarkManager::sortMarks ( )
private

◆ sortSubsetMarks()

void sw::mark::MarkManager::sortSubsetMarks ( )
private

Definition at line 1836 of file docbm.cxx.

References m_vAnnotationMarks, m_vBookmarks, and m_vFieldmarks.

Referenced by deleteMarks(), and sortMarks().

Member Data Documentation

◆ m_aMarkBasenameMapUniqueOffset

MarkBasenameMapUniqueOffset_t sw::mark::MarkManager::m_aMarkBasenameMapUniqueOffset
mutableprivate

Definition at line 153 of file MarkManager.hxx.

Referenced by getUniqueMarkName().

◆ m_pLastActiveFieldmark

sw::mark::FieldmarkWithDropDownButton* sw::mark::MarkManager::m_pLastActiveFieldmark
private

◆ m_rDoc

SwDoc& sw::mark::MarkManager::m_rDoc
private

◆ m_vAllMarks

container_t sw::mark::MarkManager::m_vAllMarks
private

◆ m_vAnnotationMarks

container_t sw::mark::MarkManager::m_vAnnotationMarks
private

◆ m_vBookmarks

container_t sw::mark::MarkManager::m_vBookmarks
private

◆ m_vFieldmarks

container_t sw::mark::MarkManager::m_vFieldmarks
private

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