diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-02-28 13:14:45 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-03-01 08:45:36 +0000 |
commit | 282b920c933337384560b3d2f6a10b156fa5316b (patch) | |
tree | 84270d39c3dc7f3d659962a13a5ecbd6c3ab5092 /sw/inc | |
parent | 0d6df6312d84e1ae2680af78538de94938f94605 (diff) |
fdo#61016: sw::marks::MarkManager: delay deletion of text fieldmarks
There is a STL assertion in deleteMarks because the ReleaseDoc call will
recursively call into deleteMark again and delete marks that are in the
vector vMarksToDelete up the stack.
Change-Id: I9139b174f8a518a551a3ca8520396202c306abcf
(cherry picked from commit 5bf6797e81d54177508d3eb370e8242e3b58a3f8)
Reviewed-on: https://gerrit.libreoffice.org/2466
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/IDocumentMarkAccess.hxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sw/inc/IDocumentMarkAccess.hxx b/sw/inc/IDocumentMarkAccess.hxx index 9b4bbb1d351b..21e2d0c88cbb 100644 --- a/sw/inc/IDocumentMarkAccess.hxx +++ b/sw/inc/IDocumentMarkAccess.hxx @@ -57,6 +57,11 @@ class IDocumentMarkAccess typedef container_t::const_iterator const_iterator_t; typedef container_t::const_reverse_iterator const_reverse_iterator_t; + /// 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. + struct ILazyDeleter { virtual ~ILazyDeleter() { } }; + /** Generates a new mark in the document for a certain selection. @param rPaM @@ -168,7 +173,8 @@ class IDocumentMarkAccess @param ppMark [in] an iterator pointing to the Mark to be deleted. */ - virtual void deleteMark(const IDocumentMarkAccess::const_iterator_t ppMark) =0; + virtual ::boost::shared_ptr<ILazyDeleter> + deleteMark(const IDocumentMarkAccess::const_iterator_t ppMark) =0; /** Deletes a mark. |