summaryrefslogtreecommitdiff
path: root/sw/source/core/inc
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2020-01-31 12:05:43 +0100
committerMichael Stahl <michael.stahl@cib.de>2020-02-03 12:05:56 +0100
commit9e7b5c74b484fcfd3317db56745b26b10897047d (patch)
treee26ab6e413481e55e9a69468196fc90c3861bf06 /sw/source/core/inc
parent249b10c22f4a35672a7388d34b2ded1b76054dac (diff)
sw: implement protection of bookmarks and fields
SwPaM::HasReadonlySel() checks PROTECT_BOOKMARKS / PROTECT_FIELDS setting and checks if bookmarks or fields are selected for deletion. This should already be called by the UI code in all the right places, for the other content protection features, and cause a dialog to pop up. What's not ideal about this is that it's impossible to delete a character immediately before or after a point bookmark because that would delete the point bookmark too. The bookmark check is done by extracting a function out of MarkManager::deleteMarks() so both will use the same logic. The problem of DelContentIndex() duplicating that logic remains... Apparently the status bar at the bottom already displays "read-only" for such a selection. Change-Id: Id87999198a03ba847ef0eff5651fef3bd2517fae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87778 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'sw/source/core/inc')
-rw-r--r--sw/source/core/inc/MarkManager.hxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/sw/source/core/inc/MarkManager.hxx b/sw/source/core/inc/MarkManager.hxx
index edf8121836b6..a9457f916763 100644
--- a/sw/source/core/inc/MarkManager.hxx
+++ b/sw/source/core/inc/MarkManager.hxx
@@ -78,6 +78,7 @@ namespace sw {
virtual const_iterator_t findMark(const OUString& rName) const override;
// bookmarks
+ virtual bool isBookmarkDeleted(SwPaM const& rPaM) const override;
virtual const_iterator_t getBookmarksBegin() const override;
virtual const_iterator_t getBookmarksEnd() const override;
virtual sal_Int32 getBookmarksCount() const override;