summaryrefslogtreecommitdiff
path: root/test/source/sheet
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-15 15:01:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-15 20:23:50 +0200
commit2dfb192edfd1ab10e9d39e265e26ac6db93ac755 (patch)
tree2b8faf5b57cfeb9ceb636783406caf64694a0ff9 /test/source/sheet
parent3c6cb83b80b502975dce89c02401a064872b5ea3 (diff)
loplugin:sequenceloop in test..toolkit
Change-Id: Ic8dad06c535b0af713bfe7cd46e601c8ea7ba6c7 Reviewed-on: https://gerrit.libreoffice.org/77531 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'test/source/sheet')
-rw-r--r--test/source/sheet/xdatabaserange.cxx2
-rw-r--r--test/source/sheet/xfunctiondescriptions.cxx4
-rw-r--r--test/source/sheet/xsheetcellrangecontainer.cxx4
-rw-r--r--test/source/sheet/xsheetfilterableex.cxx2
-rw-r--r--test/source/sheet/xsheetpagebreak.cxx4
5 files changed, 8 insertions, 8 deletions
diff --git a/test/source/sheet/xdatabaserange.cxx b/test/source/sheet/xdatabaserange.cxx
index 756d204ff597..074f4c178338 100644
--- a/test/source/sheet/xdatabaserange.cxx
+++ b/test/source/sheet/xdatabaserange.cxx
@@ -64,7 +64,7 @@ void XDatabaseRange::testGetSubtotalDescriptor()
void XDatabaseRange::testGetSortDescriptor()
{
uno::Reference< sheet::XDatabaseRange > xDBRange(init("SortDescriptor"), UNO_QUERY_THROW);
- uno::Sequence< beans::PropertyValue > xSortDescr = xDBRange->getSortDescriptor();
+ const uno::Sequence< beans::PropertyValue > xSortDescr = xDBRange->getSortDescriptor();
for (const beans::PropertyValue& aProp : xSortDescr)
{
//std::cout << "Prop " << i << " Name: " << OUString(aProp.Name) << std::endl;
diff --git a/test/source/sheet/xfunctiondescriptions.cxx b/test/source/sheet/xfunctiondescriptions.cxx
index 5c53b52971ac..d8cfd17d28f4 100644
--- a/test/source/sheet/xfunctiondescriptions.cxx
+++ b/test/source/sheet/xfunctiondescriptions.cxx
@@ -42,7 +42,7 @@ void XFunctionDescriptions::testGetById()
OUString aName1;
uno::Sequence<beans::PropertyValue> aProps1;
CPPUNIT_ASSERT(xFD->getByIndex(nNumber) >>= aProps1);
- for (const auto& aProp : aProps1)
+ for (const auto& aProp : std::as_const(aProps1))
{
if (aProp.Name == "Id")
aId1 = aProp.Value.get<sal_Int32>();
@@ -53,7 +53,7 @@ void XFunctionDescriptions::testGetById()
// fetch the same descriptions by its id
sal_Int32 aId2 = 0;
OUString aName2;
- uno::Sequence<beans::PropertyValue> aProps2 = xFD->getById(aId1);
+ const uno::Sequence<beans::PropertyValue> aProps2 = xFD->getById(aId1);
CPPUNIT_ASSERT_MESSAGE("Received empty FunctionDescriptions from getById()",
aProps2.hasElements());
for (const auto& aProp : aProps2)
diff --git a/test/source/sheet/xsheetcellrangecontainer.cxx b/test/source/sheet/xsheetcellrangecontainer.cxx
index be3c7453a2a0..3dfa1a5eecd9 100644
--- a/test/source/sheet/xsheetcellrangecontainer.cxx
+++ b/test/source/sheet/xsheetcellrangecontainer.cxx
@@ -42,7 +42,7 @@ void XSheetCellRangeContainer::testAddRemoveRangeAddress()
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to remove CellRangeAddress (count)", cnt - 1,
xSCRC->getCount());
- uno::Sequence<table::CellRangeAddress> aAfterRemoveAddr = xSCRC->getRangeAddresses();
+ const uno::Sequence<table::CellRangeAddress> aAfterRemoveAddr = xSCRC->getRangeAddresses();
for (auto const& addr : aAfterRemoveAddr)
{
CPPUNIT_ASSERT_MESSAGE("Unable to remove CellRangeAddress (entry)", aAddr[0] != addr);
@@ -71,7 +71,7 @@ void XSheetCellRangeContainer::testAddRemoveRangeAddresses()
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to remove CellRangeAddresses (count)", cnt - 2,
xSCRC->getCount());
- uno::Sequence<table::CellRangeAddress> aAfterRemoveAddr = xSCRC->getRangeAddresses();
+ const uno::Sequence<table::CellRangeAddress> aAfterRemoveAddr = xSCRC->getRangeAddresses();
for (auto const& addr : aAfterRemoveAddr)
{
CPPUNIT_ASSERT_MESSAGE("Unable to remove CellRangeAddresses (entry: first)",
diff --git a/test/source/sheet/xsheetfilterableex.cxx b/test/source/sheet/xsheetfilterableex.cxx
index 46759b224ae3..5730bde11e18 100644
--- a/test/source/sheet/xsheetfilterableex.cxx
+++ b/test/source/sheet/xsheetfilterableex.cxx
@@ -35,7 +35,7 @@ void XSheetFilterableEx::testCreateFilterDescriptorByObject()
uno::Reference<sheet::XSheetFilterDescriptor> xSFD = xSFEx->createFilterDescriptorByObject(xSF);
CPPUNIT_ASSERT_MESSAGE("no XSheetFilterDescriptor", xSFD.is());
- uno::Sequence<sheet::TableFilterField> xTFF = xSFD->getFilterFields();
+ const uno::Sequence<sheet::TableFilterField> xTFF = xSFD->getFilterFields();
CPPUNIT_ASSERT_MESSAGE("The gained XSheetFilterDescriptor is empty", xTFF.hasElements());
for (const auto& field : xTFF)
diff --git a/test/source/sheet/xsheetpagebreak.cxx b/test/source/sheet/xsheetpagebreak.cxx
index 656a33a0cb0b..7f96aa3be557 100644
--- a/test/source/sheet/xsheetpagebreak.cxx
+++ b/test/source/sheet/xsheetpagebreak.cxx
@@ -44,7 +44,7 @@ void XSheetPageBreak::testRemoveAllManualPageBreaks()
xSheetPageBreak->removeAllManualPageBreaks();
- uno::Sequence< sheet::TablePageBreakData > xColPageBreak = xSheetPageBreak->getColumnPageBreaks();
+ const uno::Sequence< sheet::TablePageBreakData > xColPageBreak = xSheetPageBreak->getColumnPageBreaks();
sal_Int32 manualColPageBreaks = 0;
for ( const auto & data : xColPageBreak )
{
@@ -54,7 +54,7 @@ void XSheetPageBreak::testRemoveAllManualPageBreaks()
CPPUNIT_ASSERT_EQUAL_MESSAGE("Found manual column page break",
sal_Int32(0), manualColPageBreaks);
- uno::Sequence< sheet::TablePageBreakData > xRowPageBreak = xSheetPageBreak->getRowPageBreaks();
+ const uno::Sequence< sheet::TablePageBreakData > xRowPageBreak = xSheetPageBreak->getRowPageBreaks();
sal_Int32 manualRowPageBreaks = 0;
for ( const auto & data : xRowPageBreak )
{