LibreOffice Module sw (master)  1
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
IDocumentMarkAccess Class Referenceabstract

Provides access to the marks of a document. More...

#include <IDocumentMarkAccess.hxx>

Inheritance diagram for IDocumentMarkAccess:
[legend]

Classes

struct  ILazyDeleter
 To avoid recursive calls of deleteMark, the removal of dummy characters of fieldmarks has to be delayed; this is the baseclass that can be subclassed for that purpose. More...
 
class  iterator
 wrapper iterator: wraps iterator of implementation while hiding MarkBase class; only IMark instances can be retrieved directly. More...
 

Public Types

enum  MarkType {
  MarkType::UNO_BOOKMARK,
  MarkType::DDE_BOOKMARK,
  MarkType::BOOKMARK,
  MarkType::CROSSREF_HEADING_BOOKMARK,
  MarkType::CROSSREF_NUMITEM_BOOKMARK,
  MarkType::ANNOTATIONMARK,
  MarkType::TEXT_FIELDMARK,
  MarkType::CHECKBOX_FIELDMARK,
  MarkType::DROPDOWN_FIELDMARK,
  MarkType::DATE_FIELDMARK,
  MarkType::NAVIGATOR_REMINDER
}
 
typedef iterator const_iterator_t
 

Public Member Functions

virtual ::sw::mark::IMarkmakeMark (const SwPaM &rPaM, const OUString &rProposedName, MarkType eMark,::sw::mark::InsertMode eMode)=0
 Generates a new mark in the document for a certain selection. More...
 
virtual sw::mark::IFieldmarkmakeFieldBookmark (const SwPaM &rPaM, const OUString &rName, const OUString &rType)=0
 
virtual sw::mark::IFieldmarkmakeNoTextFieldBookmark (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 SwNodeIndex &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 SwNodeIndex &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 SwNodeIndex &rStt, const SwNodeIndex &rEnd, std::vector< ::sw::mark::SaveBookmark > *pSaveBkmk, const SwIndex *pSttIdx, const SwIndex *pEndIdx)=0
 Deletes marks in a range. More...
 
virtual std::unique_ptr< ILazyDeleterdeleteMark (const IDocumentMarkAccess::const_iterator_t &ppMark)=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 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::IFieldmarkgetFieldmarkFor (const SwPosition &pos) const =0
 
virtual ::sw::mark::IFieldmarkgetFieldmarkBefore (const SwPosition &pos) const =0
 
virtual ::sw::mark::IFieldmarkgetFieldmarkAfter (const SwPosition &pos) const =0
 
virtual ::sw::mark::IFieldmarkgetDropDownFor (const SwPosition &pos) const =0
 
virtual std::vector< ::sw::mark::IFieldmark * > getDropDownsFor (const SwPaM &rPaM) const =0
 
virtual void deleteFieldmarkAt (const SwPosition &rPos)=0
 
virtual ::sw::mark::IFieldmarkchangeFormFieldmarkType (::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 const_iterator_t findFirstAnnotationStartsAfter (const SwPosition &rPos) const =0
 Finds the first mark that is starting after. More...
 

Static Public Member Functions

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)
 

Protected Member Functions

virtual ~IDocumentMarkAccess ()
 

Detailed Description

Provides access to the marks of a document.

Definition at line 39 of file IDocumentMarkAccess.hxx.

Member Typedef Documentation

Definition at line 109 of file IDocumentMarkAccess.hxx.

Member Enumeration Documentation

Enumerator
UNO_BOOKMARK 
DDE_BOOKMARK 
BOOKMARK 
CROSSREF_HEADING_BOOKMARK 
CROSSREF_NUMITEM_BOOKMARK 
ANNOTATIONMARK 
TEXT_FIELDMARK 
CHECKBOX_FIELDMARK 
DROPDOWN_FIELDMARK 
DATE_FIELDMARK 
NAVIGATOR_REMINDER 

Definition at line 42 of file IDocumentMarkAccess.hxx.

Constructor & Destructor Documentation

virtual IDocumentMarkAccess::~IDocumentMarkAccess ( )
inlineprotectedvirtual

Definition at line 343 of file IDocumentMarkAccess.hxx.

Member Function Documentation

virtual void IDocumentMarkAccess::assureSortedMarkContainers ( ) const
pure virtual

Implemented in sw::mark::MarkManager.

Referenced by SwTextNode::Update().

virtual ::sw::mark::IFieldmark* IDocumentMarkAccess::changeFormFieldmarkType ( ::sw::mark::IFieldmark pFieldmark,
const OUString &  rNewType 
)
pure virtual

Implemented in sw::mark::MarkManager.

virtual void IDocumentMarkAccess::clearAllMarks ( )
pure virtual

Clear (deletes) all marks.

Implemented in sw::mark::MarkManager.

virtual void IDocumentMarkAccess::ClearFieldActivation ( )
pure virtual
virtual void IDocumentMarkAccess::correctMarksAbsolute ( const SwNodeIndex rOldNode,
const SwPosition rNewPos,
const sal_Int32  nOffset 
)
pure virtual

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

Implemented in sw::mark::MarkManager.

Referenced by SwDoc::CorrAbs().

virtual void IDocumentMarkAccess::correctMarksRelative ( const SwNodeIndex rOldNode,
const SwPosition rNewPos,
const sal_Int32  nOffset 
)
pure virtual

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

Implemented in sw::mark::MarkManager.

Referenced by SwDoc::CorrRel().

virtual void IDocumentMarkAccess::deleteFieldmarkAt ( const SwPosition rPos)
pure virtual
virtual std::unique_ptr<ILazyDeleter> IDocumentMarkAccess::deleteMark ( const IDocumentMarkAccess::const_iterator_t ppMark)
pure virtual
virtual void IDocumentMarkAccess::deleteMark ( const ::sw::mark::IMark *const  pMark)
pure virtual

Deletes a mark.

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

Implemented in sw::mark::MarkManager.

virtual void IDocumentMarkAccess::deleteMarks ( const SwNodeIndex rStt,
const SwNodeIndex rEnd,
std::vector< ::sw::mark::SaveBookmark > *  pSaveBkmk,
const SwIndex pSttIdx,
const SwIndex pEndIdx 
)
pure virtual

Deletes marks in a range.

Note: navigator reminders are excluded

Implemented in sw::mark::MarkManager.

Referenced by SwHTMLParser::ClearFootnotesMarksInRange(), and DelBookmarks().

virtual const_iterator_t IDocumentMarkAccess::findAnnotationMark ( const OUString &  rName) const
pure virtual
virtual const_iterator_t IDocumentMarkAccess::findBookmark ( const OUString &  rMark) const
pure virtual

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.

Implemented in sw::mark::MarkManager.

Referenced by SwWW8ImplReader::CoreLoad(), SwXBookmarks::getByName(), SwXBookmarks::hasByName(), and SwEditWin::RequestHelp().

virtual const_iterator_t IDocumentMarkAccess::findFirstAnnotationStartsAfter ( const SwPosition rPos) const
pure virtual

Finds the first mark that is starting after.

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

Implemented in sw::mark::MarkManager.

virtual const_iterator_t IDocumentMarkAccess::findFirstBookmarkStartsAfter ( const SwPosition rPos) const
pure virtual

Finds the first mark that is starting after.

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

Implemented in sw::mark::MarkManager.

Referenced by Writer::FindPos_Bkmk(), SwCursorShell::GoNextBookmark(), and SwCursorShell::GoPrevBookmark().

virtual const_iterator_t IDocumentMarkAccess::findMark ( const OUString &  rMark) const
pure virtual
virtual const_iterator_t IDocumentMarkAccess::getAllMarksBegin ( ) const
pure virtual
virtual sal_Int32 IDocumentMarkAccess::getAllMarksCount ( ) const
pure virtual
virtual const_iterator_t IDocumentMarkAccess::getAllMarksEnd ( ) const
pure virtual
virtual sw::mark::IMark* IDocumentMarkAccess::getAnnotationMarkFor ( const SwPosition rPosition) const
pure virtual

Implemented in sw::mark::MarkManager.

Referenced by SwCursor::SelectWordWT().

virtual const_iterator_t IDocumentMarkAccess::getAnnotationMarksBegin ( ) const
pure virtual
virtual sal_Int32 IDocumentMarkAccess::getAnnotationMarksCount ( ) const
pure virtual
virtual const_iterator_t IDocumentMarkAccess::getAnnotationMarksEnd ( ) const
pure virtual
virtual const_iterator_t IDocumentMarkAccess::getBookmarksBegin ( ) const
pure virtual
virtual sal_Int32 IDocumentMarkAccess::getBookmarksCount ( ) const
pure virtual
virtual const_iterator_t IDocumentMarkAccess::getBookmarksEnd ( ) const
pure virtual
OUString IDocumentMarkAccess::GetCrossRefHeadingBookmarkNamePrefix ( )
static
virtual ::sw::mark::IFieldmark* IDocumentMarkAccess::getDropDownFor ( const SwPosition pos) const
pure virtual

Implemented in sw::mark::MarkManager.

Referenced by SwSpellIter::AddPortion().

virtual std::vector< ::sw::mark::IFieldmark* > IDocumentMarkAccess::getDropDownsFor ( const SwPaM rPaM) const
pure virtual
virtual ::sw::mark::IFieldmark* IDocumentMarkAccess::getFieldmarkAfter ( const SwPosition pos) const
pure virtual

Implemented in sw::mark::MarkManager.

virtual ::sw::mark::IFieldmark* IDocumentMarkAccess::getFieldmarkBefore ( const SwPosition pos) const
pure virtual

Implemented in sw::mark::MarkManager.

virtual ::sw::mark::IFieldmark* IDocumentMarkAccess::getFieldmarkFor ( const SwPosition pos) const
pure virtual
virtual ::sw::mark::IMark* IDocumentMarkAccess::getMarkForTextNode ( const SwTextNode rTextNode,
MarkType  eMark 
)
pure virtual

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).

Implemented in sw::mark::MarkManager.

Referenced by SwFieldRefPage::FillItemSet(), SwTOXPara::GetURL(), and SwTOXPara::SwTOXPara().

IDocumentMarkAccess::MarkType IDocumentMarkAccess::GetType ( const ::sw::mark::IMark rMark)
static
bool IDocumentMarkAccess::IsLegalPaMForCrossRefHeadingBookmark ( const SwPaM rPaM)
static
virtual sw::mark::IMark* IDocumentMarkAccess::makeAnnotationMark ( const SwPaM rPaM,
const OUString &  rName 
)
pure virtual
virtual sw::mark::IFieldmark* IDocumentMarkAccess::makeFieldBookmark ( const SwPaM rPaM,
const OUString &  rName,
const OUString &  rType 
)
pure virtual
virtual ::sw::mark::IMark* IDocumentMarkAccess::makeMark ( const SwPaM rPaM,
const OUString &  rProposedName,
MarkType  eMark,
::sw::mark::InsertMode  eMode 
)
pure virtual

Generates a new mark in the document for a certain selection.

Parameters
rPaM[in] the selection being marked.
rProposedName[in] the proposed name of the new mark.
eMark[in] the type of the new mark.
eMode[in] is the new mark part of a text copy operation
Returns
a pointer to the new mark (name might have changed).

Referenced by SwDBManager::MergeMailFiles(), sw::DocumentContentOperationsManager::ReplaceRangeImpl(), SwFltControlStack::SetAttrInDoc(), sw::mark::SaveBookmark::SetInDoc(), SwHistoryBookmark::SetInDoc(), SwXTextRange::SetPositions(), and SwTransferDdeLink::WriteData().

virtual sw::mark::IFieldmark* IDocumentMarkAccess::makeNoTextFieldBookmark ( const SwPaM rPaM,
const OUString &  rName,
const OUString &  rType 
)
pure virtual
virtual void IDocumentMarkAccess::NotifyCursorUpdate ( const SwCursorShell rCursorShell)
pure virtual

Implemented in sw::mark::MarkManager.

virtual bool IDocumentMarkAccess::renameMark ( ::sw::mark::IMark io_pMark,
const OUString &  rNewName 
)
pure virtual

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)

Implemented in sw::mark::MarkManager.

Referenced by SwUndoRenameBookmark::Rename(), and SwXBookmark::setName().

virtual void IDocumentMarkAccess::repositionMark ( ::sw::mark::IMark io_pMark,
const SwPaM rPaM 
)
pure virtual

Moves an existing mark to a new selection and performs needed updates.

Parameters
io_pMark[in/out] the mark to be moved
rPaM[in] new selection to be marked

Implemented in sw::mark::MarkManager.

Referenced by SwDoc::AppendDoc(), and SwHTMLParser::StripTrailingPara().


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