diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-02-28 13:14:45 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-02-28 14:02:41 +0100 |
commit | 5bf6797e81d54177508d3eb370e8242e3b58a3f8 (patch) | |
tree | 6ffc971e8e91bfb6486f17787bfd1ba33e52eca2 /sw/inc/IDocumentMarkAccess.hxx | |
parent | dbb74ee9950dc706ea4fde3397a4c1d19b172fa9 (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
Diffstat (limited to 'sw/inc/IDocumentMarkAccess.hxx')
-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. |