diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-07-19 11:04:45 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-07-19 16:33:01 +0200 |
commit | b1668edf7fa3ad8c32bcc4d73821770f2df011ca (patch) | |
tree | cb93a00ca59f770e616668af15fdc6a50e1627a1 /svx/qa | |
parent | 5b3c530016927d3e91e3124e124f7b428ab285ac (diff) |
Move svl::Items to include/svl/whichranges.hxx, and unify its usage
... in WhichRangesContainer and SfxItemSet ctors. Now it's not needed
to explicitly use 'value' in WhichRangesContainer's ctor, or create an
instance for use in SfxItemSet ctor (svl::Items is already defined as
a template value of corresponding type).
Instead of
WhichRangesContainer Foo(svl::Items<1, 2>::value);
SfxItemSet Bar(rItemPool, svl::Items<1, 2>{});
now use:
WhichRangesContainer Foo(svl::Items<1, 2>);
SfxItemSet Bar(rItemPool, svl::Items<1, 2>);
Change-Id: I4681d952b6442732025e5a26768098878907a238
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119157
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svx/qa')
-rw-r--r-- | svx/qa/unit/removewhichrange.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/svx/qa/unit/removewhichrange.cxx b/svx/qa/unit/removewhichrange.cxx index 1c45e2d7874e..7ea534aab96a 100644 --- a/svx/qa/unit/removewhichrange.cxx +++ b/svx/qa/unit/removewhichrange.cxx @@ -34,19 +34,19 @@ class TestRemoveWhichRange : public CppUnit::TestFixture CPPUNIT_ASSERT(out.empty()); } { - WhichRangesContainer in(svl::Items<10, 20, 30, 40>::value); + WhichRangesContainer in(svl::Items<10, 20, 30, 40>); auto const out = RemoveWhichRange(in, 0, 20); CPPUNIT_ASSERT_EQUAL(sal_uInt16(30), out[0].first); CPPUNIT_ASSERT_EQUAL(sal_uInt16(40), out[0].second); } { - WhichRangesContainer in(svl::Items<10, 20, 30, 40>::value); + WhichRangesContainer in(svl::Items<10, 20, 30, 40>); auto const out = RemoveWhichRange(in, 10, 20); CPPUNIT_ASSERT_EQUAL(sal_uInt16(30), out[0].first); CPPUNIT_ASSERT_EQUAL(sal_uInt16(40), out[0].second); } { - WhichRangesContainer in(svl::Items<10, 20, 30, 40>::value); + WhichRangesContainer in(svl::Items<10, 20, 30, 40>); auto const out = RemoveWhichRange(in, 15, 20); CPPUNIT_ASSERT_EQUAL(sal_uInt16(10), out[0].first); CPPUNIT_ASSERT_EQUAL(sal_uInt16(14), out[0].second); @@ -54,19 +54,19 @@ class TestRemoveWhichRange : public CppUnit::TestFixture CPPUNIT_ASSERT_EQUAL(sal_uInt16(40), out[1].second); } { - WhichRangesContainer in(svl::Items<10, 20, 30, 40>::value); + WhichRangesContainer in(svl::Items<10, 20, 30, 40>); auto const out = RemoveWhichRange(in, 30, 40); CPPUNIT_ASSERT_EQUAL(sal_uInt16(10), out[0].first); CPPUNIT_ASSERT_EQUAL(sal_uInt16(20), out[0].second); } { - WhichRangesContainer in(svl::Items<10, 20, 30, 40>::value); + WhichRangesContainer in(svl::Items<10, 20, 30, 40>); auto const out = RemoveWhichRange(in, 30, 50); CPPUNIT_ASSERT_EQUAL(sal_uInt16(10), out[0].first); CPPUNIT_ASSERT_EQUAL(sal_uInt16(20), out[0].second); } { - WhichRangesContainer in(svl::Items<10, 20, 30, 40>::value); + WhichRangesContainer in(svl::Items<10, 20, 30, 40>); auto const out = RemoveWhichRange(in, 30, 35); CPPUNIT_ASSERT_EQUAL(sal_uInt16(10), out[0].first); CPPUNIT_ASSERT_EQUAL(sal_uInt16(20), out[0].second); @@ -74,7 +74,7 @@ class TestRemoveWhichRange : public CppUnit::TestFixture CPPUNIT_ASSERT_EQUAL(sal_uInt16(40), out[1].second); } { - WhichRangesContainer in(svl::Items<10, 20, 30, 40>::value); + WhichRangesContainer in(svl::Items<10, 20, 30, 40>); auto const out = RemoveWhichRange(in, 15, 35); CPPUNIT_ASSERT_EQUAL(sal_uInt16(10), out[0].first); CPPUNIT_ASSERT_EQUAL(sal_uInt16(14), out[0].second); @@ -82,7 +82,7 @@ class TestRemoveWhichRange : public CppUnit::TestFixture CPPUNIT_ASSERT_EQUAL(sal_uInt16(40), out[1].second); } { - WhichRangesContainer in(svl::Items<10, 20, 30, 40>::value); + WhichRangesContainer in(svl::Items<10, 20, 30, 40>); auto const out = RemoveWhichRange(in, 12, 15); CPPUNIT_ASSERT_EQUAL(sal_uInt16(10), out[0].first); CPPUNIT_ASSERT_EQUAL(sal_uInt16(11), out[0].second); @@ -92,12 +92,12 @@ class TestRemoveWhichRange : public CppUnit::TestFixture CPPUNIT_ASSERT_EQUAL(sal_uInt16(40), out[2].second); } { - WhichRangesContainer in(svl::Items<10, 20, 30, 40>::value); + WhichRangesContainer in(svl::Items<10, 20, 30, 40>); auto const out = RemoveWhichRange(in, 0, 100); CPPUNIT_ASSERT(out.empty()); } { - WhichRangesContainer in(svl::Items<10, 20, 40, 50>::value); + WhichRangesContainer in(svl::Items<10, 20, 40, 50>); auto const out = RemoveWhichRange(in, 25, 35); CPPUNIT_ASSERT_EQUAL(sal_uInt16(10), out[0].first); CPPUNIT_ASSERT_EQUAL(sal_uInt16(20), out[0].second); @@ -105,7 +105,7 @@ class TestRemoveWhichRange : public CppUnit::TestFixture CPPUNIT_ASSERT_EQUAL(sal_uInt16(50), out[1].second); } { - WhichRangesContainer in(svl::Items<10, 20, 40, 50>::value); + WhichRangesContainer in(svl::Items<10, 20, 40, 50>); auto const out = RemoveWhichRange(in, 50, 100); CPPUNIT_ASSERT_EQUAL(sal_uInt16(10), out[0].first); CPPUNIT_ASSERT_EQUAL(sal_uInt16(20), out[0].second); |