sc/inc/document.hxx | 9 ++++----- sc/source/core/data/column4.cxx | 4 ++-- sc/source/core/data/documen8.cxx | 2 +- sc/source/core/data/documen9.cxx | 2 +- sc/source/core/data/document.cxx | 3 +-- sc/source/core/data/drwlayer.cxx | 2 +- sc/source/filter/dif/difimp.cxx | 2 +- sc/source/filter/excel/impop.cxx | 2 +- sc/source/filter/qpro/qpro.cxx | 2 +- sc/source/filter/starcalc/scflt.cxx | 2 +- sc/source/filter/xml/XMLTableSourceContext.cxx | 2 +- sc/source/ui/app/transobj.cxx | 2 +- sc/source/ui/docshell/docfunc.cxx | 2 +- sc/source/ui/docshell/docsh.cxx | 4 ++-- sc/source/ui/docshell/docsh5.cxx | 2 +- sc/source/ui/docshell/tablink.cxx | 2 +- sc/source/ui/undo/undotab.cxx | 4 ++-- sc/source/ui/unoobj/cellsuno.cxx | 2 +- sc/source/ui/view/tabview5.cxx | 2 +- sc/source/ui/view/tabvwsh4.cxx | 2 +- sc/source/ui/view/viewfun2.cxx | 5 ++--- 21 files changed, 28 insertions(+), 31 deletions(-)
New commits: commit 8b9f0a5a5cba5051d90c693ded950c40cfa7ee12 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Tue May 9 15:26:29 2017 +0200 loplugin:checkunusedparams in sc(part1) Change-Id: I8c4fca704fe8ed6f861728cc3f3782c676aba67c Reviewed-on: https://gerrit.libreoffice.org/37435 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index cd4c5a237e04..27bb73d9ea29 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -803,15 +803,14 @@ public: void SetTabNameOnLoad(SCTAB nTab, const OUString& rName); void InvalidateStreamOnSave(); - SC_DLLPUBLIC bool InsertTab( SCTAB nPos, const OUString& rName, - bool bExternalDocument = false, bool bUndoDeleteTab = false ); + SC_DLLPUBLIC bool InsertTab( SCTAB nPos, const OUString& rName, + bool bExternalDocument = false, bool bUndoDeleteTab = false ); SC_DLLPUBLIC bool InsertTabs( SCTAB nPos, const std::vector<OUString>& rNames, bool bNamesValid = false ); SC_DLLPUBLIC bool DeleteTabs( SCTAB nTab, SCTAB nSheets ); SC_DLLPUBLIC bool DeleteTab( SCTAB nTab ); SC_DLLPUBLIC bool RenameTab( SCTAB nTab, const OUString& rName, - bool bUpdateRef = true, bool bExternalDocument = false ); bool MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgress = nullptr ); bool CopyTab( SCTAB nOldPos, SCTAB nNewPos, @@ -940,7 +939,7 @@ public: void SetChartRangeList( const OUString& rChartName, const ScRangeListRef& rNewRangeListRef ); - void StartAnimations( SCTAB nTab, vcl::Window* pWin ); + void StartAnimations( SCTAB nTab ); bool HasBackgroundDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const; bool HasAnyDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const; @@ -2177,7 +2176,7 @@ public: SCTAB nTab, SCCOL nCol, SCROW nRowStart, SCROW nRowEnd ) const; - void KeyInput( const KeyEvent& rKEvt ); // TimerDelays etc. + void KeyInput(); // TimerDelays etc. ScChangeTrack* GetChangeTrack() const { return pChangeTrack; } diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx index 71a33b3cd338..16dd00574ee1 100644 --- a/sc/source/core/data/column4.cxx +++ b/sc/source/core/data/column4.cxx @@ -386,7 +386,7 @@ class ConvertFormulaToValueHandler bool mbModified; public: - ConvertFormulaToValueHandler( SCTAB, SCCOL ) : + ConvertFormulaToValueHandler() : mbModified(false) { maResValues.reset(MAXROWCOUNT); @@ -434,7 +434,7 @@ void ScColumn::ConvertFormulaToValue( sc::SharedFormulaUtil::splitFormulaCellGroups(maCells, aBounds); // Parse all formulas within the range and store their results into temporary storage. - ConvertFormulaToValueHandler aFunc(nTab, nCol); + ConvertFormulaToValueHandler aFunc; sc::ParseFormula(maCells.begin(), maCells, nRow1, nRow2, aFunc); if (!aFunc.isModified()) // No formula cells encountered. diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index e49a8cd2ca45..4c6b9b51a19b 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -1152,7 +1152,7 @@ void ScDocument::UpdateRefAreaLinks( UpdateRefMode eUpdateRefMode, } // TimerDelays etc. -void ScDocument::KeyInput( const KeyEvent& ) +void ScDocument::KeyInput() { if ( pChartListenerCollection->hasListeners() ) pChartListenerCollection->StartTimer(); diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx index 3373d16fdf84..60928ff8ae4b 100644 --- a/sc/source/core/data/documen9.cxx +++ b/sc/source/core/data/documen9.cxx @@ -319,7 +319,7 @@ bool ScDocument::HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* p return false; } -void ScDocument::StartAnimations( SCTAB nTab, vcl::Window* /*pWin*/ ) +void ScDocument::StartAnimations( SCTAB nTab ) { if (!pDrawLayer) return; diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 92c9645cf03c..49f976a237e5 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -870,8 +870,7 @@ bool ScDocument::DeleteTabs( SCTAB nTab, SCTAB nSheets ) return bValid; } -bool ScDocument::RenameTab( SCTAB nTab, const OUString& rName, bool /* bUpdateRef */, - bool bExternalDocument ) +bool ScDocument::RenameTab( SCTAB nTab, const OUString& rName, bool bExternalDocument ) { bool bValid = false; SCTAB i; diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 64e655b0a7f3..2591334b6cfc 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -1514,7 +1514,7 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const if( !aSourceTabName.equals(aDestTabName) && pDoc->ValidNewTabName(aSourceTabName) ) { - bRestoreDestTabName = pDoc->RenameTab( nDestTab, aSourceTabName ); //sal_Bool bUpdateRef = sal_True, sal_Bool bExternalDocument = sal_False + bRestoreDestTabName = pDoc->RenameTab( nDestTab, aSourceTabName ); } } } diff --git a/sc/source/filter/dif/difimp.cxx b/sc/source/filter/dif/difimp.cxx index 75013ba00a0c..c133ecb4c544 100644 --- a/sc/source/filter/dif/difimp.cxx +++ b/sc/source/filter/dif/difimp.cxx @@ -79,7 +79,7 @@ FltError ScFormatFilterPluginImpl::ScImportDif(SvStream& rIn, ScDocument* pDoc, if( aDifParser.nVector != 0 || aDifParser.nVal != 1 ) bSyntErrWarn = true; if( bData ) - pDoc->RenameTab( nBaseTab, aData ); + pDoc->RenameTab( nBaseTab, aData); } break; case T_VECTORS: diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx index 32aaba1276dd..51a401db0a26 100644 --- a/sc/source/filter/excel/impop.cxx +++ b/sc/source/filter/excel/impop.cxx @@ -1214,7 +1214,7 @@ void ImportExcel::NewTable() // For Excel 2.1 Worksheet file, we need to set the file name as the // sheet name. INetURLObject aURL(GetDocUrl()); - pD->RenameTab(0, aURL.getBase(), false); + pD->RenameTab(0, aURL.getBase()); } pExcRoot->pShrfmlaBuff->Clear(); diff --git a/sc/source/filter/qpro/qpro.cxx b/sc/source/filter/qpro/qpro.cxx index b0810e7c69e1..07adc4d4ccfd 100644 --- a/sc/source/filter/qpro/qpro.cxx +++ b/sc/source/filter/qpro/qpro.cxx @@ -180,7 +180,7 @@ FltError ScQProReader::import( ScDocument *pDoc ) OUString aName; aName += OUStringLiteral1( 'A' + nTab ); if (!nTab) - pDoc->RenameTab( nTab, aName, false ); + pDoc->RenameTab( nTab, aName ); else pDoc->InsertTab( nTab, aName ); } diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx index c6b66a50fb71..ee51bf140481 100644 --- a/sc/source/filter/starcalc/scflt.cxx +++ b/sc/source/filter/starcalc/scflt.cxx @@ -1468,7 +1468,7 @@ void Sc10Import::LoadTables() if (nError != 0) return; if (TabNo == 0) - pDoc->RenameTab(static_cast<SCTAB> (TabNo), SC10TOSTRING( TabName ), false); + pDoc->RenameTab(static_cast<SCTAB> (TabNo), SC10TOSTRING( TabName )); else pDoc->InsertTab(SC_TAB_APPEND, SC10TOSTRING( TabName ) ); diff --git a/sc/source/filter/xml/XMLTableSourceContext.cxx b/sc/source/filter/xml/XMLTableSourceContext.cxx index c3f3cf70b8b4..8909adb7f0b4 100644 --- a/sc/source/filter/xml/XMLTableSourceContext.cxx +++ b/sc/source/filter/xml/XMLTableSourceContext.cxx @@ -100,7 +100,7 @@ void ScXMLTableSourceContext::EndElement() { ScXMLImport::MutexGuard aGuard(GetScImport()); if (pDoc->RenameTab( GetScImport().GetTables().GetCurrentSheet(), - GetScImport().GetTables().GetCurrentSheetName(), false, true)) + GetScImport().GetTables().GetCurrentSheetName(), true/*bExternalDocument*/)) { sLink = ScGlobal::GetAbsDocName( sLink, pDoc->GetDocumentShell() ); if (sFilterName.isEmpty()) diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx index 04364d2ef5f6..1ec4aa38909c 100644 --- a/sc/source/ui/app/transobj.cxx +++ b/sc/source/ui/app/transobj.cxx @@ -627,7 +627,7 @@ void ScTransferObj::InitDocShell(bool bLimitToPageSize) OUString aTabName; pDoc->GetName( aBlock.aStart.Tab(), aTabName ); - rDestDoc.RenameTab( 0, aTabName, false ); // no UpdateRef (empty) + rDestDoc.RenameTab( 0, aTabName ); rDestDoc.CopyStdStylesFrom( pDoc ); diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 800692cd32ef..b9f4e59de321 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -3133,7 +3133,7 @@ bool ScDocFunc::DeleteTable( SCTAB nTab, bool bRecord, bool /* bApi */ ) rDoc.CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, InsertDeleteFlags::ALL,false, *pUndoDoc ); OUString aOldName; rDoc.GetName( nTab, aOldName ); - pUndoDoc->RenameTab( nTab, aOldName, false ); + pUndoDoc->RenameTab( nTab, aOldName ); if (bWasLinked) pUndoDoc->SetLink( nTab, rDoc.GetLinkMode(nTab), rDoc.GetLinkDoc(nTab), rDoc.GetLinkFlt(nTab), rDoc.GetLinkOpt(nTab), diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index fec3e7f473bf..c00d5ef1ff31 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -322,7 +322,7 @@ void ScDocShell::AfterXMLLoading(bool bRet) !aINetURLObject.HasError()) // the docname should be a valid URL { aName = ScGlobal::GetDocTabName( aDocument.GetLinkDoc( i ), aDocument.GetLinkTab( i ) ); - aDocument.RenameTab(i, aName, true, true); + aDocument.RenameTab(i, aName, true/*bExternalDocument*/); } // else; nothing has to happen, because it is a user given name } @@ -1236,7 +1236,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) // corresponding places of the external references // manager/cache. Likely then we'd also need a method to // compose a name excluding such characters. - aDocument.RenameTab( 0, INetURLObject( rMedium.GetName()).GetBase(), true, true); + aDocument.RenameTab( 0, INetURLObject( rMedium.GetName()).GetBase(), true/*bExternalDocument*/); bOverflowRow = aImpEx.IsOverflowRow(); bOverflowCol = aImpEx.IsOverflowCol(); diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx index 8c65cbe41054..3189ef191073 100644 --- a/sc/source/ui/docshell/docsh5.cxx +++ b/sc/source/ui/docshell/docsh5.cxx @@ -799,7 +799,7 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const OUString& rName, const OUStrin rName, rComment, rColor, nFlags, rMark )); } - aDocument.RenameTab( nNewTab, rName, false ); // without formula update + aDocument.RenameTab( nNewTab, rName); aDocument.SetScenario( nNewTab, true ); aDocument.SetScenarioData( nNewTab, rComment, rColor, nFlags ); diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx index 805aca1b4641..11fdce37cf2d 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -255,7 +255,7 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilter, { rDoc.RenameTab( nTab, ScGlobal::GetDocTabName( aNewUrl, aTabName ), - false, true ); // no RefUpdate, no ValidTabName + true/*bExternalDocument*/ ); } } diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx index 49129b128b9b..e0da8f95128e 100644 --- a/sc/source/ui/undo/undotab.cxx +++ b/sc/source/ui/undo/undotab.cxx @@ -313,7 +313,7 @@ void ScUndoDeleteTab::Undo() OUString aOldName; pRefUndoDoc->GetName( nTab, aOldName ); - rDoc.RenameTab( nTab, aOldName, false ); + rDoc.RenameTab( nTab, aOldName ); if (pRefUndoDoc->IsLinked(nTab)) { rDoc.SetLink( nTab, pRefUndoDoc->GetLinkMode(nTab), pRefUndoDoc->GetLinkDoc(nTab), @@ -917,7 +917,7 @@ void ScUndoImportTab::Undo() rDoc.CopyToDocument(0,0,nTabPos, MAXCOL,MAXROW,nTabPos, InsertDeleteFlags::ALL,false, *xRedoDoc); rDoc.GetName( nTabPos, aOldName ); - xRedoDoc->RenameTab(nTabPos, aOldName, false); + xRedoDoc->RenameTab(nTabPos, aOldName); xRedoDoc->SetTabBgColor(nTabPos, rDoc.GetTabBgColor(nTabPos)); if ( rDoc.IsScenario(nTabPos) ) diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 58aed9b24727..2975450d8fb0 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -7924,7 +7924,7 @@ void ScTableSheetObj::setExternalName( const OUString& aUrl, const OUString& aSh const SCTAB nTab = GetTab_Impl(); const OUString aAbsDocName( ScGlobal::GetAbsDocName( aUrl, pDocSh ) ); const OUString aDocTabName( ScGlobal::GetDocTabName( aAbsDocName, aSheetName ) ); - if ( !rDoc.RenameTab( nTab, aDocTabName, false /*bUpdateRef*/, true /*bExternalDocument*/ ) ) + if ( !rDoc.RenameTab( nTab, aDocTabName, true /*bExternalDocument*/ ) ) { throw container::ElementExistException( OUString(), *this ); } diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx index feb9ab575e0b..663b1923af91 100644 --- a/sc/source/ui/view/tabview5.cxx +++ b/sc/source/ui/view/tabview5.cxx @@ -499,7 +499,7 @@ void ScTabView::DrawEnableAnim(bool bSet) ScDocument* pDoc = aViewData.GetDocument(); for (i=0; i<4; i++) if ( pGridWin[i] && pGridWin[i]->IsVisible() ) - pDoc->StartAnimations( aViewData.GetTabNo(), pGridWin[i] ); + pDoc->StartAnimations( aViewData.GetTabNo() ); } } else diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index b24e950bd61f..a38a87f1dd81 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -1205,7 +1205,7 @@ bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) ScDocument* pDoc = GetViewData().GetDocument(); if ( pDoc ) - pDoc->KeyInput( rKEvt ); // TimerDelays etc. + pDoc->KeyInput(); // TimerDelays etc. if( bInPlace ) { diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 09ec6c8eae51..dbc801c119e8 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -2281,7 +2281,7 @@ bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, bool bRecord ) rDoc.CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, InsertDeleteFlags::ALL,false, *pUndoDoc ); rDoc.GetName( nTab, aOldName ); - pUndoDoc->RenameTab( nTab, aOldName, false ); + pUndoDoc->RenameTab( nTab, aOldName ); if (rDoc.IsLinked(nTab)) { bWasLinked = true; @@ -2640,8 +2640,7 @@ void ScViewFunc::MoveTable( { while (pDestDoc->GetTableCount() > 1) pDestDoc->DeleteTab(0); - pDestDoc->RenameTab( 0, "______42_____", - false ); + pDestDoc->RenameTab( 0, "______42_____" ); } SCTAB nTabCount = pDoc->GetTableCount(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits