summaryrefslogtreecommitdiff
path: root/svl/qa
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2020-10-08 10:21:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-08 18:45:29 +0200
commit592ad72ae178bc9018354ab37224666293ecbe81 (patch)
tree60954e07087ff8ee053e29e62d72ec1c281caa04 /svl/qa
parent9b6fb8bf3d8e622bd2d013744a591ff32287d3de (diff)
use sal_Int32 for style-sheet index
instead of a mix of unsigned and sal_uInt16. Change-Id: Ice56d58d22856daa6645577610368ba19a849176 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104076 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl/qa')
-rw-r--r--svl/qa/unit/items/test_IndexedStyleSheets.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/svl/qa/unit/items/test_IndexedStyleSheets.cxx b/svl/qa/unit/items/test_IndexedStyleSheets.cxx
index 50fd4d1ed42c..5c12acc250a5 100644
--- a/svl/qa/unit/items/test_IndexedStyleSheets.cxx
+++ b/svl/qa/unit/items/test_IndexedStyleSheets.cxx
@@ -91,9 +91,9 @@ void IndexedStyleSheetsTest::AddingSameStylesheetTwiceHasNoEffect()
rtl::Reference<SfxStyleSheetBase> sheet1(new MockedStyleSheet("sheet1"));
IndexedStyleSheets iss;
iss.AddStyleSheet(sheet1);
- CPPUNIT_ASSERT_EQUAL(1u, iss.GetNumberOfStyleSheets());
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), iss.GetNumberOfStyleSheets());
iss.AddStyleSheet(sheet1);
- CPPUNIT_ASSERT_EQUAL(1u, iss.GetNumberOfStyleSheets());
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), iss.GetNumberOfStyleSheets());
}
void IndexedStyleSheetsTest::RemovedStyleSheetIsNotFound()
@@ -114,9 +114,9 @@ void IndexedStyleSheetsTest::RemovingStyleSheetWhichIsNotAvailableHasNoEffect()
rtl::Reference<SfxStyleSheetBase> sheet2(new MockedStyleSheet("sheet2"));
IndexedStyleSheets iss;
iss.AddStyleSheet(sheet1);
- CPPUNIT_ASSERT_EQUAL(1u, iss.GetNumberOfStyleSheets());
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), iss.GetNumberOfStyleSheets());
iss.RemoveStyleSheet(sheet2);
- CPPUNIT_ASSERT_EQUAL(1u, iss.GetNumberOfStyleSheets());
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), iss.GetNumberOfStyleSheets());
}
void IndexedStyleSheetsTest::StyleSheetsCanBeRetrievedByTheirName()
@@ -131,17 +131,17 @@ void IndexedStyleSheetsTest::StyleSheetsCanBeRetrievedByTheirName()
iss.AddStyleSheet(sheet2);
iss.AddStyleSheet(sheet3);
- std::vector<unsigned> r = iss.FindPositionsByName(name1);
+ std::vector<sal_Int32> r = iss.FindPositionsByName(name1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Two style sheets are found by 'name1'",
2u, static_cast<unsigned>(r.size()));
std::sort (r.begin(), r.end());
- CPPUNIT_ASSERT_EQUAL(0u, r.at(0));
- CPPUNIT_ASSERT_EQUAL(2u, r.at(1));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), r.at(0));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), r.at(1));
r = iss.FindPositionsByName(name2);
CPPUNIT_ASSERT_EQUAL_MESSAGE("One style sheets is found by 'name2'",
1u, static_cast<unsigned>(r.size()));
- CPPUNIT_ASSERT_EQUAL(1u, r.at(0));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), r.at(0));
}
void IndexedStyleSheetsTest::KnowsThatItStoresAStyleSheet()
@@ -176,10 +176,10 @@ void IndexedStyleSheetsTest::PositionCanBeQueriedByFamily()
iss.AddStyleSheet(sheet2);
iss.AddStyleSheet(sheet3);
- const std::vector<unsigned>& v = iss.GetStyleSheetPositionsByFamily(SfxStyleFamily::Char);
+ const std::vector<sal_Int32>& v = iss.GetStyleSheetPositionsByFamily(SfxStyleFamily::Char);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Separation by family works.", static_cast<size_t>(2), v.size());
- const std::vector<unsigned>& w = iss.GetStyleSheetPositionsByFamily(SfxStyleFamily::All);
+ const std::vector<sal_Int32>& w = iss.GetStyleSheetPositionsByFamily(SfxStyleFamily::All);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wildcard works for family queries.", static_cast<size_t>(3), w.size());
}
@@ -197,11 +197,11 @@ void IndexedStyleSheetsTest::OnlyOneStyleSheetIsReturnedWhenReturnFirstIsUsed()
DummyPredicate predicate; // returns always true, i.e., all style sheets match the predicate.
- std::vector<unsigned> v = iss.FindPositionsByNameAndPredicate(name, predicate,
+ std::vector<sal_Int32> v = iss.FindPositionsByNameAndPredicate(name, predicate,
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);
+ std::vector<sal_Int32> w = iss.FindPositionsByNameAndPredicate(name, predicate);
CPPUNIT_ASSERT_EQUAL_MESSAGE("All style sheets are returned.", static_cast<size_t>(3), w.size());
}