From 9782ba7f1b7f4d6cc11045b6c953deb6f17f321d Mon Sep 17 00:00:00 2001 From: Tobias Lippert Date: Tue, 15 Jul 2014 21:05:20 +0200 Subject: fdo#76754 Add return first to IndexedStyleSheets to speed up ods writing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I6fc9fe8ce78ad9cc1a7c2fe3e13ed38ce468ce6c Reviewed-on: https://gerrit.libreoffice.org/10347 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- include/svl/IndexedStyleSheets.hxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/svl/IndexedStyleSheets.hxx b/include/svl/IndexedStyleSheets.hxx index bc5dea7f37a2..8cd8de46b182 100644 --- a/include/svl/IndexedStyleSheets.hxx +++ b/include/svl/IndexedStyleSheets.hxx @@ -124,12 +124,14 @@ public: std::vector FindPositionsByName(const rtl::OUString& name) const; + enum SearchBehavior { RETURN_ALL, RETURN_FIRST }; /** Obtain the positions of all styles which have a certain name and fulfill a certain condition. * * This method is fast because it can use the name-based index */ std::vector - FindPositionsByNameAndPredicate(const rtl::OUString& name, StyleSheetPredicate& predicate) const; + FindPositionsByNameAndPredicate(const rtl::OUString& name, StyleSheetPredicate& predicate, + SearchBehavior behavior = RETURN_ALL) const; /** Obtain the positions of all styles which fulfill a certain condition. * -- cgit