From 284d80825ec7cf3c39af91959e4bf3d539b066f4 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 20 Mar 2024 14:43:44 +0200 Subject: tdf#158556 speed up SwNodes::RemoveNode Change-Id: I49daf93793c67da6261081fce92e1fed1a71248b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165139 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/inc/bparr.hxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sw/inc') diff --git a/sw/inc/bparr.hxx b/sw/inc/bparr.hxx index 9f3e17f8d140..4f831c8bab19 100644 --- a/sw/inc/bparr.hxx +++ b/sw/inc/bparr.hxx @@ -91,6 +91,11 @@ public: void Move( sal_Int32 from, sal_Int32 to ); void Replace( sal_Int32 pos, BigPtrEntry* p); + /** Speed up the complicated removal logic in SwNodes::RemoveNode. + Returns the entry before pNotTheOne. + */ + BigPtrEntry* ReplaceTheOneAfter( BigPtrEntry* pNotTheOne, BigPtrEntry* pNewEntry); + SW_DLLPUBLIC BigPtrEntry* operator[]( sal_Int32 ) const; }; -- cgit