Kaydet (Commit) 2ed35ad1 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:passstuffbyref also for {css::uno,rtl}::Reference

Change-Id: If18ea216cc3416e4a7e2041e50b5a64b1e90886a
üst 9f7f7d6c
...@@ -39,9 +39,9 @@ protected: ...@@ -39,9 +39,9 @@ protected:
~XDataPilotDescriptor() {} ~XDataPilotDescriptor() {}
private: private:
static void testGetDataPilotFields_Impl( css::uno::Reference< css::sheet::XDataPilotDescriptor > xDescr ); static void testGetDataPilotFields_Impl( css::uno::Reference< css::sheet::XDataPilotDescriptor > const & xDescr );
static void checkName( css::uno::Reference< css::container::XIndexAccess > xIndex, sal_Int32 nIndex ); static void checkName( css::uno::Reference< css::container::XIndexAccess > const & xIndex, sal_Int32 nIndex );
static std::vector<OUString> maFieldNames; static std::vector<OUString> maFieldNames;
}; };
......
...@@ -38,11 +38,11 @@ public: ...@@ -38,11 +38,11 @@ public:
protected: protected:
private: private:
static bool checkDrillDownSheetContent(css::uno::Reference< css::sheet::XSpreadsheet >, const css::uno::Sequence< css::uno::Sequence < css::uno::Any > >& aData); static bool checkDrillDownSheetContent(css::uno::Reference< css::sheet::XSpreadsheet > const & xSheet, const css::uno::Sequence< css::uno::Sequence < css::uno::Any > >& aData);
void getOutputRanges(css::uno::Reference< css::sheet::XDataPilotTable2 >); void getOutputRanges(css::uno::Reference< css::sheet::XDataPilotTable2 > const &);
void buildDataFields(css::uno::Reference< css::sheet::XDataPilotTable2 >); void buildDataFields(css::uno::Reference< css::sheet::XDataPilotTable2 > const &);
void buildResultCells(css::uno::Reference< css::sheet::XDataPilotTable2 >); void buildResultCells(css::uno::Reference< css::sheet::XDataPilotTable2 > const &);
std::vector< css::table::CellAddress > maResultCells; std::vector< css::table::CellAddress > maResultCells;
std::vector< sal_Int32 > maDataFieldDims; std::vector< sal_Int32 > maDataFieldDims;
......
...@@ -47,7 +47,7 @@ protected: ...@@ -47,7 +47,7 @@ protected:
private: private:
css::uno::Reference< css::sheet::XSpreadsheetDocument> getDoc(const OUString&, css::uno::Reference< css::lang::XComponent >&); css::uno::Reference< css::sheet::XSpreadsheetDocument> getDoc(const OUString&, css::uno::Reference< css::lang::XComponent >&);
static css::uno::Reference< css::sheet::XNamedRanges> getNamedRanges(css::uno::Reference< css::sheet::XSpreadsheetDocument >); static css::uno::Reference< css::sheet::XNamedRanges> getNamedRanges(css::uno::Reference< css::sheet::XSpreadsheetDocument > const &);
void importSheetToCopy(); void importSheetToCopy();
bool isExternalReference(const OUString& aDestContent, const OUString& aSrcContent ); bool isExternalReference(const OUString& aDestContent, const OUString& aSrcContent );
......
...@@ -33,7 +33,7 @@ public: ...@@ -33,7 +33,7 @@ public:
void testLoadStylesFromDocument(); void testLoadStylesFromDocument();
private: private:
static void checkStyleProperties(css::uno::Reference< css::style::XStyleFamiliesSupplier > xFamilySupplier); static void checkStyleProperties(css::uno::Reference< css::style::XStyleFamiliesSupplier > const & xFamilySupplier);
protected: protected:
~XStyleLoader() {} ~XStyleLoader() {}
......
...@@ -29,7 +29,7 @@ public: ...@@ -29,7 +29,7 @@ public:
virtual void tearDown() override; virtual void tearDown() override;
protected: protected:
void closeDocument( css::uno::Reference< css::lang::XComponent > xDocument ); void closeDocument( css::uno::Reference< css::lang::XComponent > const & xDocument );
private: private:
......
...@@ -67,7 +67,7 @@ void XDataPilotDescriptor::testGetFilterDescriptor() ...@@ -67,7 +67,7 @@ void XDataPilotDescriptor::testGetFilterDescriptor()
CPPUNIT_ASSERT(xSheetFilterDescr.is()); 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 //this method should only be called once but needs to be called before any of the other tests
static bool bCalled = false; static bool bCalled = false;
...@@ -185,7 +185,7 @@ void XDataPilotDescriptor::testGetHiddenFields() ...@@ -185,7 +185,7 @@ void XDataPilotDescriptor::testGetHiddenFields()
checkName( xIndex, 3 ); 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(xIndex.is());
CPPUNIT_ASSERT(maFieldNames.size() >= static_cast<size_t>(nIndex)); CPPUNIT_ASSERT(maFieldNames.size() >= static_cast<size_t>(nIndex));
......
...@@ -185,7 +185,7 @@ void XDataPilotTable2::testInsertDrillDownSheet() ...@@ -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); getOutputRanges(xDPTable);
maResultCells.clear(); maResultCells.clear();
...@@ -208,14 +208,14 @@ void XDataPilotTable2::buildResultCells( uno::Reference< sheet::XDataPilotTable2 ...@@ -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); maRangeWhole = xDPTable->getOutputRangeByType(sheet::DataPilotOutputRangeType::WHOLE);
maRangeTable = xDPTable->getOutputRangeByType(sheet::DataPilotOutputRangeType::TABLE); maRangeTable = xDPTable->getOutputRangeByType(sheet::DataPilotOutputRangeType::TABLE);
maRangeResult = xDPTable->getOutputRangeByType(sheet::DataPilotOutputRangeType::RESULT); 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< sheet::XDataPilotDescriptor > xDesc(xDPTable, UNO_QUERY_THROW);
uno::Reference< container::XIndexAccess > xIndex(xDesc->getDataPilotFields(), UNO_QUERY_THROW); uno::Reference< container::XIndexAccess > xIndex(xDesc->getDataPilotFields(), UNO_QUERY_THROW);
...@@ -237,7 +237,7 @@ void XDataPilotTable2::buildDataFields( uno::Reference< sheet::XDataPilotTable2 ...@@ -237,7 +237,7 @@ void XDataPilotTable2::buildDataFields( uno::Reference< sheet::XDataPilotTable2
namespace { 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::XSheetCellRange > xSheetRange( xSheet->getCellRangeByPosition(nCol, nRow, nCol, nRow), UNO_QUERY_THROW);
uno::Reference< sheet::XSheetCellCursor > xCursor = xSheet->createCursorByRange(xSheetRange); uno::Reference< sheet::XSheetCellCursor > xCursor = xSheet->createCursorByRange(xSheetRange);
...@@ -250,7 +250,7 @@ table::CellAddress getLastUsedCellAddress( uno::Reference< sheet::XSpreadsheet > ...@@ -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); table::CellAddress aLastCell = getLastUsedCellAddress(xSheet, 0, 0);
CPPUNIT_ASSERT(aData.getLength() > 0); CPPUNIT_ASSERT(aData.getLength() > 0);
......
...@@ -293,7 +293,7 @@ uno::Reference< sheet::XSpreadsheetDocument> XSpreadsheets2::getDoc(const OUStri ...@@ -293,7 +293,7 @@ uno::Reference< sheet::XSpreadsheetDocument> XSpreadsheets2::getDoc(const OUStri
return xDoc; 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); uno::Reference< beans::XPropertySet > xPropSet (xDoc, UNO_QUERY_THROW);
OUString NamedRangesPropertyString("NamedRanges"); OUString NamedRangesPropertyString("NamedRanges");
......
...@@ -64,7 +64,7 @@ void XStyleLoader::testLoadStylesFromDocument() ...@@ -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 // check if targetDocument has myStyle
uno::Reference< container::XNameAccess > xFamilies(xFamilySupplier->getStyleFamilies(), UNO_QUERY_THROW); uno::Reference< container::XNameAccess > xFamilies(xFamilySupplier->getStyleFamilies(), UNO_QUERY_THROW);
......
...@@ -39,7 +39,7 @@ void UnoApiTest::createFileURL(const OUString& aFileBase, OUString& rFilePath) ...@@ -39,7 +39,7 @@ void UnoApiTest::createFileURL(const OUString& aFileBase, OUString& rFilePath)
rFilePath = m_directories.getSrcRootURL() + m_aBaseString + "/" + aFileBase; 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); uno::Reference< util::XCloseable > xCloseable(xDocument, UNO_QUERY_THROW);
xCloseable->close(false); xCloseable->close(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment