From a627b737642874326cd30c83c56f3b795c35edac Mon Sep 17 00:00:00 2001 From: Svante Schubert Date: Thu, 13 Jul 2023 13:13:21 +0200 Subject: [PATCH] Adding an unregisterAll() function to the SelectionManager --- .../odfdom/incubator/search/SelectionManager.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/odfdom/src/main/java/org/odftoolkit/odfdom/incubator/search/SelectionManager.java b/odfdom/src/main/java/org/odftoolkit/odfdom/incubator/search/SelectionManager.java index 35cc4751b..a9f40fc65 100644 --- a/odfdom/src/main/java/org/odftoolkit/odfdom/incubator/search/SelectionManager.java +++ b/odfdom/src/main/java/org/odftoolkit/odfdom/incubator/search/SelectionManager.java @@ -137,6 +137,13 @@ public void unregisterItem(Selection item) { selections.remove(item); } } + + /** + * Removes all selections from the SelectionManager. + */ + public void unregisterAll() { + repository.clear(); + } /** * A direct method to update all the selections contained in a mElement after a certain position.