diff options
author | Tobias Lippert <drtl@fastmail.fm> | 2014-07-15 21:05:20 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-23 11:33:14 +0000 |
commit | 9782ba7f1b7f4d6cc11045b6c953deb6f17f321d (patch) | |
tree | 169715724ebc5153d00f65ca825b60ecfe214cf2 /include | |
parent | 8c6e900e4724dc7c800047099139c080f5f5d564 (diff) |
fdo#76754 Add return first to IndexedStyleSheets to speed up ods writing
Change-Id: I6fc9fe8ce78ad9cc1a7c2fe3e13ed38ce468ce6c
Reviewed-on: https://gerrit.libreoffice.org/10347
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/svl/IndexedStyleSheets.hxx | 4 |
1 files changed, 3 insertions, 1 deletions
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<unsigned> 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<unsigned> - 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. * |