summaryrefslogtreecommitdiff
path: root/sw/inc/IDocumentMarkAccess.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-05-26 15:15:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-05-26 18:01:53 +0200
commit8ce36e943f0e50970925b2dd77729ef6036b4a49 (patch)
tree3d5ebcf4831630da873b5d3b0856657bbe998830 /sw/inc/IDocumentMarkAccess.hxx
parent72ba558eb9e827e0fb2c98cc6c06b25aaf9cc8b6 (diff)
move some searching inside IDocumentMarkAccess
to make followup improvements easier Change-Id: I2b0ab30589bc19a3e6c80228ab037745c7781292 Reviewed-on: https://gerrit.libreoffice.org/72978 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/inc/IDocumentMarkAccess.hxx')
-rw-r--r--sw/inc/IDocumentMarkAccess.hxx23
1 files changed, 22 insertions, 1 deletions
diff --git a/sw/inc/IDocumentMarkAccess.hxx b/sw/inc/IDocumentMarkAccess.hxx
index d7111112612f..19431c67a343 100644
--- a/sw/inc/IDocumentMarkAccess.hxx
+++ b/sw/inc/IDocumentMarkAccess.hxx
@@ -130,7 +130,7 @@ class IDocumentMarkAccess
@returns false, if renaming failed (because the name is already in use)
*/
- virtual bool renameMark(::sw::mark::IMark* io_pMark,
+ virtual bool renameMark(::sw::mark::IMark* io_pMark,
const OUString& rNewName) =0;
/** Corrects marks (absolute)
@@ -224,6 +224,13 @@ class IDocumentMarkAccess
*/
virtual const_iterator_t findMark(const OUString& rMark) const =0;
+ /** Find the first Mark that does not start before.
+
+ @returns
+ an iterator pointing to the mark, or pointing to getAllMarksEnd() if nothing was found.
+ */
+ virtual const_iterator_t findFirstMarkStartsBefore(const SwPosition& rPos) const =0;
+
// interface IBookmarks (BOOKMARK, CROSSREF_NUMITEM_BOOKMARK, CROSSREF_HEADING_BOOKMARK )
/** returns a STL-like random access iterator to the begin of the sequence the IBookmarks.
@@ -248,6 +255,14 @@ class IDocumentMarkAccess
*/
virtual const_iterator_t findBookmark(const OUString& rMark) const =0;
+ /** Finds the first mark that is starting after.
+
+ @returns
+ an iterator pointing to the mark, or pointing to getBookmarksEnd() if nothing was found.
+ */
+ virtual const_iterator_t findFirstBookmarkStartsAfter(const SwPosition& rPos) const =0;
+
+
// Fieldmarks
virtual ::sw::mark::IFieldmark* getFieldmarkFor(const SwPosition& pos) const =0;
virtual ::sw::mark::IFieldmark* getFieldmarkBefore(const SwPosition& pos) const =0;
@@ -268,6 +283,12 @@ class IDocumentMarkAccess
virtual sal_Int32 getAnnotationMarksCount() const = 0;
virtual const_iterator_t findAnnotationMark( const OUString& rName ) const = 0;
virtual sw::mark::IMark* getAnnotationMarkFor(const SwPosition& rPosition) const = 0;
+ /** Finds the first mark that is starting after.
+
+ @returns
+ an iterator pointing to the mark, or pointing to getAnnotationMarksEnd() if nothing was found.
+ */
+ virtual const_iterator_t findFirstAnnotationStartsAfter(const SwPosition& rPos) const =0;
/** Returns the MarkType used to create the mark
*/