summaryrefslogtreecommitdiff
path: root/sw/inc/docary.hxx
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-09-04 18:55:13 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2018-09-19 10:18:30 +0200
commit471212d464f54054f7419ef1890267d0def852d9 (patch)
tree16b90833fc4f410f2d3a8fc6601cf492f0fcfda7 /sw/inc/docary.hxx
parent12a841e1f102ff7f47a7281120fe777bf440d2fd (diff)
sw: SwRedlineTable::DeleteAndDestroy() is surprisingly dangerous
At least with the randomised test, it can happen that deleting one redline will recursively delete other redlines that are located in the hidden content section of the redline, or at least try to and crash because those have already been deleted before. The callers will either delete 1 redline, or delete all of them via DeleteAndDestroyAll(), so put a safer loop into DeleteAndDestroyAll() and have DeleteAndDestroy() only delete 1. Change-Id: I9c4225544a43a4a03f4eb7b6f56e7fe848c8ca54
Diffstat (limited to 'sw/inc/docary.hxx')
-rw-r--r--sw/inc/docary.hxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx
index 20871385fa97..940789ad262e 100644
--- a/sw/inc/docary.hxx
+++ b/sw/inc/docary.hxx
@@ -345,7 +345,7 @@ public:
void Remove( size_type nPos );
void Remove( const SwRangeRedline* p );
- void DeleteAndDestroy( size_type nPos, size_type nLen = 1 );
+ void DeleteAndDestroy(size_type nPos);
void DeleteAndDestroyAll();
void dumpAsXml(struct _xmlTextWriter* pWriter) const;
@@ -389,7 +389,7 @@ public:
void Insert( SwExtraRedline* p );
- void DeleteAndDestroy( sal_uInt16 nPos, sal_uInt16 nLen = 1 );
+ void DeleteAndDestroy( sal_uInt16 nPos);
void DeleteAndDestroyAll();
void dumpAsXml(struct _xmlTextWriter* pWriter) const;