svl/source/items/IndexedStyleSheets.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 362082b57b2d6e9119acb3fb033aefcbce8cf8bb
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Wed Mar 13 22:44:44 2019 +0100
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Thu Mar 14 06:16:23 2019 +0100

    Only return elements with both name and predicate matching arguments
    
    ... otherwise, after first stylesheet with matching name but failing
    predicate, next stylesheet that matches predicate is returned, regardless
    what is its name.
    
    See commit b37b299d5228beeecb913980780f463756c5a878.
    
    Change-Id: I965ddcd0f8f578b60a46b3c7412d33973aa7a2aa
    Reviewed-on: https://gerrit.libreoffice.org/69228
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/svl/source/items/IndexedStyleSheets.cxx 
b/svl/source/items/IndexedStyleSheets.cxx
index c3b8ad6706c2..233c10e56093 100644
--- a/svl/source/items/IndexedStyleSheets.cxx
+++ b/svl/source/items/IndexedStyleSheets.cxx
@@ -127,8 +127,8 @@ IndexedStyleSheets::FindPositionsByNameAndPredicate(const 
OUString& name,
         StyleSheetPredicate& predicate, SearchBehavior behavior) const
 {
     std::vector<unsigned> r;
-    MapType::const_iterator it = mPositionsByName.find(name);
-    for (/**/; it != mPositionsByName.end(); ++it) {
+    auto range = mPositionsByName.equal_range(name);
+    for (auto it = range.first; it != range.second; ++it) {
         unsigned pos = it->second;
         SfxStyleSheetBase *ssheet = mStyleSheets.at(pos).get();
         if (predicate.Check(*ssheet)) {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to