diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-29 16:08:30 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-30 10:58:56 +0200 |
commit | 008199ee75ed4edc250270628f6e6cb1677dbbc9 (patch) | |
tree | dc2c46faa050fee4c74a1a7ec2a398273f54c7c1 /sc | |
parent | da8cf43b4f2af008df231f5e0629c71bd7f2b762 (diff) |
loplugin:constparam in various
Change-Id: I6821a3946f2e8fabf26558a84370c16ac8827fed
Reviewed-on: https://gerrit.libreoffice.org/41721
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/filters-test.cxx | 6 | ||||
-rw-r--r-- | sc/qa/unit/helper/qahelper.cxx | 6 | ||||
-rw-r--r-- | sc/qa/unit/helper/qahelper.hxx | 6 | ||||
-rw-r--r-- | sc/qa/unit/helper/shared_test_impl.hxx | 6 | ||||
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 10 | ||||
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 10 | ||||
-rw-r--r-- | sc/qa/unit/tiledrendering/tiledrendering.cxx | 2 | ||||
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/datatableview.cxx | 4 |
9 files changed, 26 insertions, 26 deletions
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx index 2b926251affb..3b93603c16eb 100644 --- a/sc/qa/unit/filters-test.cxx +++ b/sc/qa/unit/filters-test.cxx @@ -159,7 +159,7 @@ void ScFiltersTest::testCVEs() namespace { -void testRangeNameImpl(ScDocument& rDoc) +void testRangeNameImpl(const ScDocument& rDoc) { //check one range data per sheet and one global more detailed //add some more checks here @@ -434,7 +434,7 @@ void ScFiltersTest::testSheetNamesXLSX() xDocSh->DoClose(); } -void impl_testLegacyCellAnchoredRotatedShape( ScDocument& rDoc, tools::Rectangle& aRect, ScDrawObjData& aAnchor, long TOLERANCE = 30 /* 30 hmm */ ) +void impl_testLegacyCellAnchoredRotatedShape( ScDocument& rDoc, tools::Rectangle& aRect, const ScDrawObjData& aAnchor, long TOLERANCE = 30 /* 30 hmm */ ) { ScDrawLayer* pDrawLayer = rDoc.GetDrawLayer(); CPPUNIT_ASSERT_MESSAGE("No drawing layer.", pDrawLayer); @@ -548,7 +548,7 @@ void ScFiltersTest::testLegacyCellAnchoredRotatedShape() } } -void testEnhancedProtectionImpl( ScDocument& rDoc ) +void testEnhancedProtectionImpl( const ScDocument& rDoc ) { const ScTableProtection* pProt = rDoc.GetTabProtection(0); diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx index 668b388f55a1..0bd525c3c20f 100644 --- a/sc/qa/unit/helper/qahelper.cxx +++ b/sc/qa/unit/helper/qahelper.cxx @@ -118,7 +118,7 @@ void loadFile(const OUString& aFileName, std::string& aContent) aContent = aOStream.str(); } -void testFile(OUString& aFileName, ScDocument& rDoc, SCTAB nTab, StringType aStringFormat) +void testFile(const OUString& aFileName, ScDocument& rDoc, SCTAB nTab, StringType aStringFormat) { csv_handler aHandler(&rDoc, nTab, aStringFormat); orcus::csv::parser_config aConfig; @@ -143,7 +143,7 @@ void testFile(OUString& aFileName, ScDocument& rDoc, SCTAB nTab, StringType aStr } } -void testCondFile(OUString& aFileName, ScDocument* pDoc, SCTAB nTab) +void testCondFile(const OUString& aFileName, ScDocument* pDoc, SCTAB nTab) { conditional_format_handler aHandler(pDoc, nTab); orcus::csv::parser_config aConfig; @@ -486,7 +486,7 @@ ScTokenArray* compileFormula( } bool checkOutput( - ScDocument* pDoc, const ScRange& aOutRange, + const ScDocument* pDoc, const ScRange& aOutRange, const std::vector<std::vector<const char*>>& aCheck, const char* pCaption ) { bool bResult = true; diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx index 3d2a62f0d9bc..b677f014d47e 100644 --- a/sc/qa/unit/helper/qahelper.hxx +++ b/sc/qa/unit/helper/qahelper.hxx @@ -121,10 +121,10 @@ SCQAHELPER_DLLPUBLIC std::ostream& operator<<(std::ostream& rStrm, const OpCode& SCQAHELPER_DLLPUBLIC void loadFile(const OUString& aFileName, std::string& aContent); -SCQAHELPER_DLLPUBLIC void testFile(OUString& aFileName, ScDocument& rDoc, SCTAB nTab, StringType aStringFormat = StringType::StringValue); +SCQAHELPER_DLLPUBLIC void testFile(const OUString& aFileName, ScDocument& rDoc, SCTAB nTab, StringType aStringFormat = StringType::StringValue); //need own handler because conditional formatting strings must be generated -SCQAHELPER_DLLPUBLIC void testCondFile(OUString& aFileName, ScDocument* pDoc, SCTAB nTab); +SCQAHELPER_DLLPUBLIC void testCondFile(const OUString& aFileName, ScDocument* pDoc, SCTAB nTab); SCQAHELPER_DLLPUBLIC const SdrOle2Obj* getSingleChartObject(ScDocument& rDoc, sal_uInt16 nPage); @@ -143,7 +143,7 @@ SCQAHELPER_DLLPUBLIC ScTokenArray* compileFormula( formula::FormulaGrammar::Grammar eGram = formula::FormulaGrammar::GRAM_NATIVE ); SCQAHELPER_DLLPUBLIC bool checkOutput( - ScDocument* pDoc, const ScRange& aOutRange, + const ScDocument* pDoc, const ScRange& aOutRange, const std::vector<std::vector<const char*>>& aCheck, const char* pCaption ); template<size_t Size> diff --git a/sc/qa/unit/helper/shared_test_impl.hxx b/sc/qa/unit/helper/shared_test_impl.hxx index 00bc6c65a2dd..b997a8a28ce4 100644 --- a/sc/qa/unit/helper/shared_test_impl.hxx +++ b/sc/qa/unit/helper/shared_test_impl.hxx @@ -51,7 +51,7 @@ DataBarData aData[] = { { ScRange(1,9,0,1,12,0), COLORSCALE_AUTO, COLORSCALE_AUTO, databar::MIDDLE } }; -void testDataBar_Impl(ScDocument& rDoc) +void testDataBar_Impl(const ScDocument& rDoc) { ScConditionalFormatList* pList = rDoc.GetCondFormList(0); CPPUNIT_ASSERT(pList); @@ -88,7 +88,7 @@ ColorScale2EntryData aData2Entry[] = { { ScRange(5,2,0,5,5,0), COLORSCALE_VALUE, COLORSCALE_FORMULA } }; -void testColorScale2Entry_Impl(ScDocument& rDoc) +void testColorScale2Entry_Impl(const ScDocument& rDoc) { const ScConditionalFormatList* pList = rDoc.GetCondFormList(0); CPPUNIT_ASSERT(pList); @@ -127,7 +127,7 @@ ColorScale3EntryData aData3Entry[] = { { ScRange(5,1,1,5,6,1), COLORSCALE_VALUE, COLORSCALE_VALUE, COLORSCALE_FORMULA } }; -void testColorScale3Entry_Impl(ScDocument& rDoc) +void testColorScale3Entry_Impl(const ScDocument& rDoc) { ScConditionalFormatList* pList = rDoc.GetCondFormList(1); CPPUNIT_ASSERT(pList); diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index c07f28af1f26..60e870412c5b 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -2388,7 +2388,7 @@ void ScExportTest::testTrackChangesSimpleXLSX() return aExpected == aActual; } - bool check( ScDocument& rDoc ) + bool check( const ScDocument& rDoc ) { CheckItem aChecks[] = { @@ -2578,7 +2578,7 @@ void ScExportTest::testSheetTabColorsXLSX() { struct { - bool checkContent( ScDocument& rDoc ) + bool checkContent( const ScDocument& rDoc ) { std::vector<OUString> aTabNames = rDoc.GetAllTableNames(); @@ -2737,7 +2737,7 @@ void ScExportTest::testSharedFormulaExportXLSX() { struct { - bool checkContent( ScDocument& rDoc ) + bool checkContent( const ScDocument& rDoc ) { SCTAB nTabCount = rDoc.GetTableCount(); if (nTabCount != 2) @@ -2832,7 +2832,7 @@ void ScExportTest::testSharedFormulaStringResultExportXLSX() { struct { - bool checkContent( ScDocument& rDoc ) + bool checkContent( const ScDocument& rDoc ) { { // B2:B7 should show A,B,....,F. @@ -2982,7 +2982,7 @@ void ScExportTest::testRelativePathsODS() namespace { -void testSheetProtection_Impl(ScDocument& rDoc) +void testSheetProtection_Impl(const ScDocument& rDoc) { CPPUNIT_ASSERT(rDoc.IsTabProtected(0)); ScTableProtection* pTabProtection = rDoc.GetTabProtection(0); diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 43c0664e5245..91f9b962a74f 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -401,7 +401,7 @@ bool ScFiltersTest::load(const OUString &rFilter, const OUString &rURL, namespace { -void testRangeNameImpl(ScDocument& rDoc) +void testRangeNameImpl(const ScDocument& rDoc) { //check one range data per sheet and one global more detailed //add some more checks here @@ -2687,7 +2687,7 @@ void ScFiltersTest::testCondFormatThemeColor2XLSX() namespace { -void checkDatabarPositiveColor(ScConditionalFormat* pFormat, const Color& rColor) +void checkDatabarPositiveColor(const ScConditionalFormat* pFormat, const Color& rColor) { CPPUNIT_ASSERT(pFormat); const ScFormatEntry* pEntry = pFormat->GetEntry(0); @@ -2741,7 +2741,7 @@ void ScFiltersTest::testCondFormatThemeColor3XLSX() namespace { -void testComplexIconSetsXLSX_Impl(ScDocument& rDoc, SCCOL nCol, ScIconSetType eType) +void testComplexIconSetsXLSX_Impl(const ScDocument& rDoc, SCCOL nCol, ScIconSetType eType) { ScConditionalFormat* pFormat = rDoc.GetCondFormat(nCol, 1, 0); CPPUNIT_ASSERT(pFormat); @@ -2753,7 +2753,7 @@ void testComplexIconSetsXLSX_Impl(ScDocument& rDoc, SCCOL nCol, ScIconSetType eT CPPUNIT_ASSERT_EQUAL(eType, pIconSet->GetIconSetData()->eIconSetType); } -void testCustomIconSetsXLSX_Impl(ScDocument& rDoc, SCCOL nCol, SCROW nRow, ScIconSetType eType, sal_Int32 nIndex) +void testCustomIconSetsXLSX_Impl(const ScDocument& rDoc, SCCOL nCol, SCROW nRow, ScIconSetType eType, sal_Int32 nIndex) { ScConditionalFormat* pFormat = rDoc.GetCondFormat(nCol, 1, 1); CPPUNIT_ASSERT(pFormat); @@ -3869,7 +3869,7 @@ void ScFiltersTest::testAutofilterXLSX() namespace { -void checkValidationFormula(const ScAddress& rPos, ScDocument& rDoc, const OUString& rExpectedFormula) +void checkValidationFormula(const ScAddress& rPos, const ScDocument& rDoc, const OUString& rExpectedFormula) { const SfxUInt32Item* pItem = static_cast<const SfxUInt32Item*>(rDoc.GetAttr(rPos, ATTR_VALIDDATA) ); CPPUNIT_ASSERT(pItem); diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx index 3d7aba5d1b26..fd9c71197ded 100644 --- a/sc/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx @@ -686,7 +686,7 @@ void ScTiledRenderingTest::testUndoShells() comphelper::LibreOfficeKit::setActive(false); } -bool lcl_hasEditView(ScViewData& rViewData) +bool lcl_hasEditView(const ScViewData& rViewData) { bool bResult = false; for (unsigned int i=0; i<4; i++) diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 41b6c32038d4..f0ea8169412b 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -299,7 +299,7 @@ void Test::testSharedStringPoolUndoDoc() { struct { - bool check( ScDocument& rSrcDoc, ScDocument& rCopyDoc ) + bool check( const ScDocument& rSrcDoc, ScDocument& rCopyDoc ) { // Copy A1:A4 to the undo document. for (SCROW i = 0; i <= 4; ++i) diff --git a/sc/source/ui/miscdlgs/datatableview.cxx b/sc/source/ui/miscdlgs/datatableview.cxx index 2d8c65267180..d149713ca347 100644 --- a/sc/source/ui/miscdlgs/datatableview.cxx +++ b/sc/source/ui/miscdlgs/datatableview.cxx @@ -174,7 +174,7 @@ void ScDataTableView::MouseButtonDown(const MouseEvent& rMEvt) namespace { -SCCOL findColFromPos(sal_uInt16 nPixelPos, ScDocument* pDoc, SCCOL nStartCol = 0) +SCCOL findColFromPos(sal_uInt16 nPixelPos, const ScDocument* pDoc, SCCOL nStartCol = 0) { nPixelPos -= nRowHeaderWidth; sal_uInt32 nPixelLength = 0; @@ -194,7 +194,7 @@ SCCOL findColFromPos(sal_uInt16 nPixelPos, ScDocument* pDoc, SCCOL nStartCol = 0 return -1; } -SCROW findRowFromPos(sal_uInt16 nPixelPos, ScDocument* pDoc, SCROW nStartRow = 0) +SCROW findRowFromPos(sal_uInt16 nPixelPos, const ScDocument* pDoc, SCROW nStartRow = 0) { nPixelPos -= nColHeaderHeight; sal_uInt32 nPixelLength = 0; |