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.