diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-07-07 15:59:48 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-07-07 18:59:55 +0200 |
commit | 2ed35ad17e4f5dd8a329681a92b896fd14850465 (patch) | |
tree | e7d14a16b68441b68902e0e5db87e339bc994b6b /test | |
parent | 9f7f7d6cfa379a25730bfe8fb2d4638c08e59b90 (diff) |
loplugin:passstuffbyref also for {css::uno,rtl}::Reference
Change-Id: If18ea216cc3416e4a7e2041e50b5a64b1e90886a
Diffstat (limited to 'test')
-rw-r--r-- | test/source/sheet/xdatapilotdescriptor.cxx | 4 | ||||
-rw-r--r-- | test/source/sheet/xdatapilottable2.cxx | 10 | ||||
-rw-r--r-- | test/source/sheet/xspreadsheets2.cxx | 2 | ||||
-rw-r--r-- | test/source/sheet/xstyleloader.cxx | 2 | ||||
-rw-r--r-- | test/source/unoapi_test.cxx | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/test/source/sheet/xdatapilotdescriptor.cxx b/test/source/sheet/xdatapilotdescriptor.cxx index d8f409f63205..7fd5b4f772ae 100644 --- a/test/source/sheet/xdatapilotdescriptor.cxx +++ b/test/source/sheet/xdatapilotdescriptor.cxx @@ -67,7 +67,7 @@ void XDataPilotDescriptor::testGetFilterDescriptor() CPPUNIT_ASSERT(xSheetFilterDescr.is()); } -void XDataPilotDescriptor::testGetDataPilotFields_Impl( uno::Reference< sheet::XDataPilotDescriptor > xDescr) +void XDataPilotDescriptor::testGetDataPilotFields_Impl( uno::Reference< sheet::XDataPilotDescriptor > const & xDescr) { //this method should only be called once but needs to be called before any of the other tests static bool bCalled = false; @@ -185,7 +185,7 @@ void XDataPilotDescriptor::testGetHiddenFields() checkName( xIndex, 3 ); } -void XDataPilotDescriptor::checkName( uno::Reference< container::XIndexAccess > xIndex, sal_Int32 nIndex ) +void XDataPilotDescriptor::checkName( uno::Reference< container::XIndexAccess > const & xIndex, sal_Int32 nIndex ) { CPPUNIT_ASSERT(xIndex.is()); CPPUNIT_ASSERT(maFieldNames.size() >= static_cast<size_t>(nIndex)); diff --git a/test/source/sheet/xdatapilottable2.cxx b/test/source/sheet/xdatapilottable2.cxx index fad98fd63036..7be89cbd6883 100644 --- a/test/source/sheet/xdatapilottable2.cxx +++ b/test/source/sheet/xdatapilottable2.cxx @@ -185,7 +185,7 @@ void XDataPilotTable2::testInsertDrillDownSheet() } } -void XDataPilotTable2::buildResultCells( uno::Reference< sheet::XDataPilotTable2 > xDPTable) +void XDataPilotTable2::buildResultCells( uno::Reference< sheet::XDataPilotTable2 > const & xDPTable) { getOutputRanges(xDPTable); maResultCells.clear(); @@ -208,14 +208,14 @@ void XDataPilotTable2::buildResultCells( uno::Reference< sheet::XDataPilotTable2 } } -void XDataPilotTable2::getOutputRanges( uno::Reference< sheet::XDataPilotTable2 > xDPTable) +void XDataPilotTable2::getOutputRanges( uno::Reference< sheet::XDataPilotTable2 > const & xDPTable) { maRangeWhole = xDPTable->getOutputRangeByType(sheet::DataPilotOutputRangeType::WHOLE); maRangeTable = xDPTable->getOutputRangeByType(sheet::DataPilotOutputRangeType::TABLE); maRangeResult = xDPTable->getOutputRangeByType(sheet::DataPilotOutputRangeType::RESULT); } -void XDataPilotTable2::buildDataFields( uno::Reference< sheet::XDataPilotTable2 > xDPTable ) +void XDataPilotTable2::buildDataFields( uno::Reference< sheet::XDataPilotTable2 > const & xDPTable ) { uno::Reference< sheet::XDataPilotDescriptor > xDesc(xDPTable, UNO_QUERY_THROW); uno::Reference< container::XIndexAccess > xIndex(xDesc->getDataPilotFields(), UNO_QUERY_THROW); @@ -237,7 +237,7 @@ void XDataPilotTable2::buildDataFields( uno::Reference< sheet::XDataPilotTable2 namespace { -table::CellAddress getLastUsedCellAddress( uno::Reference< sheet::XSpreadsheet > xSheet, sal_Int32 nCol, sal_Int32 nRow ) +table::CellAddress getLastUsedCellAddress( uno::Reference< sheet::XSpreadsheet > const & xSheet, sal_Int32 nCol, sal_Int32 nRow ) { uno::Reference< sheet::XSheetCellRange > xSheetRange( xSheet->getCellRangeByPosition(nCol, nRow, nCol, nRow), UNO_QUERY_THROW); uno::Reference< sheet::XSheetCellCursor > xCursor = xSheet->createCursorByRange(xSheetRange); @@ -250,7 +250,7 @@ table::CellAddress getLastUsedCellAddress( uno::Reference< sheet::XSpreadsheet > } -bool XDataPilotTable2::checkDrillDownSheetContent(uno::Reference< sheet::XSpreadsheet > xSheet, const uno::Sequence< uno::Sequence< Any > >& aData) +bool XDataPilotTable2::checkDrillDownSheetContent(uno::Reference< sheet::XSpreadsheet > const & xSheet, const uno::Sequence< uno::Sequence< Any > >& aData) { table::CellAddress aLastCell = getLastUsedCellAddress(xSheet, 0, 0); CPPUNIT_ASSERT(aData.getLength() > 0); diff --git a/test/source/sheet/xspreadsheets2.cxx b/test/source/sheet/xspreadsheets2.cxx index 75332d5b0ee4..2c831c447174 100644 --- a/test/source/sheet/xspreadsheets2.cxx +++ b/test/source/sheet/xspreadsheets2.cxx @@ -293,7 +293,7 @@ uno::Reference< sheet::XSpreadsheetDocument> XSpreadsheets2::getDoc(const OUStri return xDoc; } -uno::Reference< sheet::XNamedRanges> XSpreadsheets2::getNamedRanges(uno::Reference< sheet::XSpreadsheetDocument> xDoc) +uno::Reference< sheet::XNamedRanges> XSpreadsheets2::getNamedRanges(uno::Reference< sheet::XSpreadsheetDocument> const & xDoc) { uno::Reference< beans::XPropertySet > xPropSet (xDoc, UNO_QUERY_THROW); OUString NamedRangesPropertyString("NamedRanges"); diff --git a/test/source/sheet/xstyleloader.cxx b/test/source/sheet/xstyleloader.cxx index 01ed053b712b..717f3e4a90f0 100644 --- a/test/source/sheet/xstyleloader.cxx +++ b/test/source/sheet/xstyleloader.cxx @@ -64,7 +64,7 @@ void XStyleLoader::testLoadStylesFromDocument() } -void XStyleLoader::checkStyleProperties( uno::Reference< style::XStyleFamiliesSupplier > xFamilySupplier) +void XStyleLoader::checkStyleProperties( uno::Reference< style::XStyleFamiliesSupplier > const & xFamilySupplier) { // check if targetDocument has myStyle uno::Reference< container::XNameAccess > xFamilies(xFamilySupplier->getStyleFamilies(), UNO_QUERY_THROW); diff --git a/test/source/unoapi_test.cxx b/test/source/unoapi_test.cxx index ece8785b6ea5..c66d487da5c7 100644 --- a/test/source/unoapi_test.cxx +++ b/test/source/unoapi_test.cxx @@ -39,7 +39,7 @@ void UnoApiTest::createFileURL(const OUString& aFileBase, OUString& rFilePath) rFilePath = m_directories.getSrcRootURL() + m_aBaseString + "/" + aFileBase; } -void UnoApiTest::closeDocument( uno::Reference< lang::XComponent > xDocument ) +void UnoApiTest::closeDocument( uno::Reference< lang::XComponent > const & xDocument ) { uno::Reference< util::XCloseable > xCloseable(xDocument, UNO_QUERY_THROW); xCloseable->close(false); |