From 0dbf528c2927bf15db6cabbb0b7c26b69b071152 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 28 Apr 2017 13:44:18 +0200 Subject: loplugin:checkunusedparams in cppcanvas and dbaccess Change-Id: Ia66e6326f3d1750b4e46a3f9f7127e7ed4aa99ca Reviewed-on: https://gerrit.libreoffice.org/37068 Tested-by: Jenkins Reviewed-by: Noel Grandin --- cppcanvas/source/mtfrenderer/emfplus.cxx | 2 +- cppcanvas/source/mtfrenderer/emfppen.cxx | 2 +- cppcanvas/source/mtfrenderer/emfppen.hxx | 2 +- dbaccess/source/core/api/RowSet.cxx | 4 ++-- dbaccess/source/core/api/RowSetCache.cxx | 2 +- dbaccess/source/core/api/RowSetCache.hxx | 2 +- dbaccess/source/filter/xml/xmlQuery.cxx | 2 +- dbaccess/source/filter/xml/xmlTable.cxx | 8 +++----- dbaccess/source/filter/xml/xmlTable.hxx | 6 ++---- dbaccess/source/ui/control/RelationControl.cxx | 6 +++--- dbaccess/source/ui/tabledesign/TEditControl.cxx | 14 +++++++------- dbaccess/source/ui/tabledesign/TEditControl.hxx | 6 +++--- 12 files changed, 26 insertions(+), 30 deletions(-) diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index cdead7a030ff..fdcd7e031f4d 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -716,7 +716,7 @@ namespace cppcanvas { EMFPPen *pen; aObjects [index] = pen = new EMFPPen (); - pen->Read (rObjectStream, *this, nHDPI, nVDPI); + pen->Read (rObjectStream, *this); break; } diff --git a/cppcanvas/source/mtfrenderer/emfppen.cxx b/cppcanvas/source/mtfrenderer/emfppen.cxx index 12f08610a0c7..b74f3a289e29 100755 --- a/cppcanvas/source/mtfrenderer/emfppen.cxx +++ b/cppcanvas/source/mtfrenderer/emfppen.cxx @@ -153,7 +153,7 @@ namespace cppcanvas } } - void EMFPPen::Read(SvStream& s, ImplRenderer& rR, sal_Int32, sal_Int32) + void EMFPPen::Read(SvStream& s, ImplRenderer& rR) { sal_uInt32 header, unknown, penFlags, unknown2; int i; diff --git a/cppcanvas/source/mtfrenderer/emfppen.hxx b/cppcanvas/source/mtfrenderer/emfppen.hxx index 98ec4468dd68..48e1119eadbd 100755 --- a/cppcanvas/source/mtfrenderer/emfppen.hxx +++ b/cppcanvas/source/mtfrenderer/emfppen.hxx @@ -65,7 +65,7 @@ namespace cppcanvas void SetStrokeAttributes(com::sun::star::rendering::StrokeAttributes& rStrokeAttributes); - void Read(SvStream& s, ImplRenderer& rR, sal_Int32, sal_Int32); + void Read(SvStream& s, ImplRenderer& rR); static sal_Int8 lcl_convertStrokeCap(sal_uInt32 nEmfStroke); static sal_Int8 lcl_convertLineJoinType(sal_uInt32 nEmfLineJoin); diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index aaaaab135f97..1e47c56cbdc6 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -849,7 +849,7 @@ void SAL_CALL ORowSet::updateObject( sal_Int32 columnIndex, const Any& x ) } } -void SAL_CALL ORowSet::updateNumericObject( sal_Int32 columnIndex, const Any& x, sal_Int32 scale ) +void SAL_CALL ORowSet::updateNumericObject( sal_Int32 columnIndex, const Any& x, sal_Int32 /*scale*/ ) { ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed); ::osl::MutexGuard aGuard( *m_pMutex ); @@ -857,7 +857,7 @@ void SAL_CALL ORowSet::updateNumericObject( sal_Int32 columnIndex, const Any& x, checkUpdateIterator(); ORowSetValueVector::Vector& rRow = ((*m_aCurrentRow)->get()); ORowSetNotifier aNotify(this,rRow); - m_pCache->updateNumericObject(columnIndex,x,scale,rRow,aNotify.getChangedColumns()); + m_pCache->updateNumericObject(columnIndex,x,rRow,aNotify.getChangedColumns()); m_bModified = m_bModified || !aNotify.getChangedColumns().empty(); aNotify.firePropertyChange(); } diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index b48af131c7e1..0bdfad2377e0 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -634,7 +634,7 @@ void ORowSetCache::updateObject( sal_Int32 columnIndex, const Any& x } } -void ORowSetCache::updateNumericObject( sal_Int32 columnIndex, const Any& x, sal_Int32 /*scale*/ +void ORowSetCache::updateNumericObject( sal_Int32 columnIndex, const Any& x ,ORowSetValueVector::Vector& io_aRow ,std::vector& o_ChangedColumns ) diff --git a/dbaccess/source/core/api/RowSetCache.hxx b/dbaccess/source/core/api/RowSetCache.hxx index 363731ad65aa..d0fb4f3882d2 100644 --- a/dbaccess/source/core/api/RowSetCache.hxx +++ b/dbaccess/source/core/api/RowSetCache.hxx @@ -163,7 +163,7 @@ namespace dbaccess void updateCharacterStream( sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream >& x, sal_Int32 length,ORowSetValueVector::Vector& io_aRow,std::vector& o_ChangedColumns ); void updateObject( sal_Int32 columnIndex, const css::uno::Any& x,ORowSetValueVector::Vector& io_aRow ,std::vector& o_ChangedColumns); - void updateNumericObject( sal_Int32 columnIndex, const css::uno::Any& x, sal_Int32 scale,ORowSetValueVector::Vector& io_aRow ,std::vector& o_ChangedColumns); + void updateNumericObject( sal_Int32 columnIndex, const css::uno::Any& x, ORowSetValueVector::Vector& io_aRow ,std::vector& o_ChangedColumns); void updateNull(sal_Int32 columnIndex ,ORowSetValueVector::Vector& io_aRow ,std::vector& o_ChangedColumns diff --git a/dbaccess/source/filter/xml/xmlQuery.cxx b/dbaccess/source/filter/xml/xmlQuery.cxx index 997df7dc8ec1..2594214ec879 100644 --- a/dbaccess/source/filter/xml/xmlQuery.cxx +++ b/dbaccess/source/filter/xml/xmlQuery.cxx @@ -92,7 +92,7 @@ SvXMLImportContext* OXMLQuery::CreateChildContext( { GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); OUString s1; - fillAttributes(nPrefix, rLocalName,xAttrList,s1,m_sTable,m_sSchema,m_sCatalog); + fillAttributes(xAttrList,s1,m_sTable,m_sSchema,m_sCatalog); } break; } diff --git a/dbaccess/source/filter/xml/xmlTable.cxx b/dbaccess/source/filter/xml/xmlTable.cxx index b2aadfa6fd00..6a40e6a35bd7 100644 --- a/dbaccess/source/filter/xml/xmlTable.cxx +++ b/dbaccess/source/filter/xml/xmlTable.cxx @@ -121,14 +121,14 @@ SvXMLImportContext* OXMLTable::CreateChildContext( { GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); OUString s1,s2,s3; - fillAttributes(nPrefix, rLocalName,xAttrList,m_sFilterStatement,s1,s2,s3); + fillAttributes(xAttrList,m_sFilterStatement,s1,s2,s3); } break; case XML_TOK_ORDER_STATEMENT: { GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); OUString s1,s2,s3; - fillAttributes(nPrefix, rLocalName,xAttrList,m_sOrderStatement,s1,s2,s3); + fillAttributes(xAttrList,m_sOrderStatement,s1,s2,s3); } break; @@ -212,9 +212,7 @@ void OXMLTable::EndElement() } -void OXMLTable::fillAttributes(sal_uInt16 /*nPrfx*/ - ,const OUString& /*_sLocalName*/ - ,const uno::Reference< XAttributeList > & _xAttrList +void OXMLTable::fillAttributes(const uno::Reference< XAttributeList > & _xAttrList ,OUString& _rsCommand ,OUString& _rsTableName ,OUString& _rsTableSchema diff --git a/dbaccess/source/filter/xml/xmlTable.hxx b/dbaccess/source/filter/xml/xmlTable.hxx index bb96d14246aa..601fbec12677 100644 --- a/dbaccess/source/filter/xml/xmlTable.hxx +++ b/dbaccess/source/filter/xml/xmlTable.hxx @@ -43,10 +43,8 @@ namespace dbaxml ODBFilter& GetOwnImport(); - void fillAttributes( sal_uInt16 nPrfx - ,const OUString& _sLocalName - ,const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList - , OUString& _rsCommand + void fillAttributes( const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList + ,OUString& _rsCommand ,OUString& _rsTableName ,OUString& _rsTableSchema ,OUString& _rsTableCatalog diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx index 39ada9ecf47e..0a6ce4981b70 100644 --- a/dbaccess/source/ui/control/RelationControl.cxx +++ b/dbaccess/source/ui/control/RelationControl.cxx @@ -68,7 +68,7 @@ namespace dbaui typedef list< pair < opcode, pair < OConnectionLineDataVec::size_type, OConnectionLineDataVec::size_type> > > ops_type; ops_type m_ops; - void fillListBox(const Reference< XPropertySet>& _xDest,long nRow,sal_uInt16 nColumnId); + void fillListBox(const Reference< XPropertySet>& _xDest); /** returns the column id for the editbrowsebox @param _nColId the column id SOURCE_COLUMN or DEST_COLUMN @@ -311,7 +311,7 @@ namespace dbaui if ( xDef.is() ) { - fillListBox(xDef,nRow,nColumnId); + fillListBox(xDef); OUString sName = GetCellText( nRow, nColumnId ); m_pListCell->SelectEntry( sName ); if ( m_pListCell->GetSelectEntry() != sName ) @@ -353,7 +353,7 @@ namespace dbaui if( rDev.IsClipRegion() ) rDev.SetClipRegion(); } - void ORelationControl::fillListBox(const Reference< XPropertySet>& _xDest,long /*_nRow*/,sal_uInt16 /*nColumnId*/) + void ORelationControl::fillListBox(const Reference< XPropertySet>& _xDest) { m_pListCell->Clear(); try diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index 93f38932fdd8..a3effadf3b35 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -1085,7 +1085,7 @@ OFieldDescription* OTableEditorCtrl::GetFieldDescr( long nRow ) return pRow->GetActFieldDescr(); } -bool OTableEditorCtrl::IsCutAllowed( long nRow ) +bool OTableEditorCtrl::IsCutAllowed() { bool bIsCutAllowed = (GetView()->getController().isAddAllowed() && GetView()->getController().isDropAllowed()) || GetView()->getController().isAlterAllowed(); @@ -1104,7 +1104,7 @@ bool OTableEditorCtrl::IsCutAllowed( long nRow ) bIsCutAllowed = !pNameCell->GetSelected().isEmpty(); break; case ROW: - bIsCutAllowed = IsCopyAllowed(nRow); + bIsCutAllowed = IsCopyAllowed(); break; default: bIsCutAllowed = false; @@ -1115,7 +1115,7 @@ bool OTableEditorCtrl::IsCutAllowed( long nRow ) return bIsCutAllowed; } -bool OTableEditorCtrl::IsCopyAllowed( long /*nRow*/ ) +bool OTableEditorCtrl::IsCopyAllowed() { bool bIsCopyAllowed = false; if(m_eChildFocus == DESCRIPTION ) @@ -1148,7 +1148,7 @@ bool OTableEditorCtrl::IsCopyAllowed( long /*nRow*/ ) return bIsCopyAllowed; } -bool OTableEditorCtrl::IsPasteAllowed( long /*nRow*/ ) +bool OTableEditorCtrl::IsPasteAllowed() { bool bAllowed = GetView()->getController().isAddAllowed(); if ( bAllowed ) @@ -1375,9 +1375,9 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt) VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "dbaccess/ui/tabledesignrowmenu.ui", ""); VclPtr aContextMenu(aBuilder.get_menu("menu")); - aContextMenu->EnableItem(aContextMenu->GetItemId("cut"), IsCutAllowed(nRow)); - aContextMenu->EnableItem(aContextMenu->GetItemId("copy"), IsCopyAllowed(nRow)); - aContextMenu->EnableItem(aContextMenu->GetItemId("paste"), IsPasteAllowed(nRow)); + aContextMenu->EnableItem(aContextMenu->GetItemId("cut"), IsCutAllowed()); + aContextMenu->EnableItem(aContextMenu->GetItemId("copy"), IsCopyAllowed()); + aContextMenu->EnableItem(aContextMenu->GetItemId("paste"), IsPasteAllowed()); aContextMenu->EnableItem(aContextMenu->GetItemId("delete"), IsDeleteAllowed(nRow)); aContextMenu->EnableItem(aContextMenu->GetItemId("primarykey"), IsPrimaryKeyAllowed(nRow)); aContextMenu->EnableItem(aContextMenu->GetItemId("insert"), IsInsertNewAllowed(nRow)); diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx index 28bb1acc977e..e6ee1332318f 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.hxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx @@ -152,9 +152,9 @@ namespace dbaui virtual void Init() override; virtual void DeactivateCell(bool bUpdate = true) override; - bool IsCutAllowed( long nRow = -1 ); - bool IsCopyAllowed( long nRow = -1 ); - bool IsPasteAllowed( long nRow = -1 ); + bool IsCutAllowed(); + bool IsCopyAllowed(); + bool IsPasteAllowed(); bool IsReadOnly() { return bReadOnly;} OFieldDescription* GetFieldDescr( long nRow ); -- cgit