summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-03-29 10:45:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-03-29 10:47:00 +0000
commit42eb843bda1a71db91e6ede0cbb4052f5bc0bb3c (patch)
treedf94e4cbae5ff8b1eee98611df66ca48ee6704aa /svl
parent5f2d57fb32bc47dad8ec38287db6627ea6273527 (diff)
convert SearchBehavior to scoped enum
Change-Id: I57f03fc43aff838c7066556319a3a5a187e46ad3 Reviewed-on: https://gerrit.libreoffice.org/35831 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r--svl/qa/unit/items/test_IndexedStyleSheets.cxx2
-rw-r--r--svl/source/items/IndexedStyleSheets.cxx2
-rw-r--r--svl/source/items/style.cxx2
3 files changed, 3 insertions, 3 deletions
diff --git a/svl/qa/unit/items/test_IndexedStyleSheets.cxx b/svl/qa/unit/items/test_IndexedStyleSheets.cxx
index da86044d2fe3..6560e7de6832 100644
--- a/svl/qa/unit/items/test_IndexedStyleSheets.cxx
+++ b/svl/qa/unit/items/test_IndexedStyleSheets.cxx
@@ -203,7 +203,7 @@ void IndexedStyleSheetsTest::OnlyOneStyleSheetIsReturnedWhenReturnFirstIsUsed()
DummyPredicate predicate; // returns always true, i.e., all style sheets match the predicate.
std::vector<unsigned> v = iss.FindPositionsByNameAndPredicate(name, predicate,
- IndexedStyleSheets::RETURN_FIRST);
+ IndexedStyleSheets::SearchBehavior::ReturnFirst);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Only one style sheet is returned.", static_cast<size_t>(1), v.size());
std::vector<unsigned> w = iss.FindPositionsByNameAndPredicate(name, predicate);
diff --git a/svl/source/items/IndexedStyleSheets.cxx b/svl/source/items/IndexedStyleSheets.cxx
index 6bc4ad0a56d1..b327315b8a2c 100644
--- a/svl/source/items/IndexedStyleSheets.cxx
+++ b/svl/source/items/IndexedStyleSheets.cxx
@@ -142,7 +142,7 @@ IndexedStyleSheets::FindPositionsByNameAndPredicate(const rtl::OUString& name,
SfxStyleSheetBase *ssheet = mStyleSheets.at(pos).get();
if (predicate.Check(*ssheet)) {
r.push_back(pos);
- if (behavior == RETURN_FIRST) {
+ if (behavior == SearchBehavior::ReturnFirst) {
break;
}
}
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index 8ec244c2c014..e71f9375493c 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -541,7 +541,7 @@ SfxStyleSheetBase* SfxStyleSheetIterator::Find(const OUString& rStr)
std::vector<unsigned> positions =
pBasePool->pImpl->mxIndexedStyleSheets->FindPositionsByNameAndPredicate(rStr, predicate,
- svl::IndexedStyleSheets::RETURN_FIRST);
+ svl::IndexedStyleSheets::SearchBehavior::ReturnFirst);
if (positions.empty()) {
return nullptr;
}