Kaydet (Commit) 0dbf528c authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:checkunusedparams in cppcanvas and dbaccess

Change-Id: Ia66e6326f3d1750b4e46a3f9f7127e7ed4aa99ca
Reviewed-on: https://gerrit.libreoffice.org/37068Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst db4802de
...@@ -716,7 +716,7 @@ namespace cppcanvas ...@@ -716,7 +716,7 @@ namespace cppcanvas
{ {
EMFPPen *pen; EMFPPen *pen;
aObjects [index] = pen = new EMFPPen (); aObjects [index] = pen = new EMFPPen ();
pen->Read (rObjectStream, *this, nHDPI, nVDPI); pen->Read (rObjectStream, *this);
break; break;
} }
......
...@@ -153,7 +153,7 @@ namespace cppcanvas ...@@ -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; sal_uInt32 header, unknown, penFlags, unknown2;
int i; int i;
......
...@@ -65,7 +65,7 @@ namespace cppcanvas ...@@ -65,7 +65,7 @@ namespace cppcanvas
void SetStrokeAttributes(com::sun::star::rendering::StrokeAttributes& rStrokeAttributes); 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_convertStrokeCap(sal_uInt32 nEmfStroke);
static sal_Int8 lcl_convertLineJoinType(sal_uInt32 nEmfLineJoin); static sal_Int8 lcl_convertLineJoinType(sal_uInt32 nEmfLineJoin);
......
...@@ -849,7 +849,7 @@ void SAL_CALL ORowSet::updateObject( sal_Int32 columnIndex, const Any& x ) ...@@ -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); ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
::osl::MutexGuard aGuard( *m_pMutex ); ::osl::MutexGuard aGuard( *m_pMutex );
...@@ -857,7 +857,7 @@ void SAL_CALL ORowSet::updateNumericObject( sal_Int32 columnIndex, const Any& x, ...@@ -857,7 +857,7 @@ void SAL_CALL ORowSet::updateNumericObject( sal_Int32 columnIndex, const Any& x,
checkUpdateIterator(); checkUpdateIterator();
ORowSetValueVector::Vector& rRow = ((*m_aCurrentRow)->get()); ORowSetValueVector::Vector& rRow = ((*m_aCurrentRow)->get());
ORowSetNotifier aNotify(this,rRow); 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(); m_bModified = m_bModified || !aNotify.getChangedColumns().empty();
aNotify.firePropertyChange(); aNotify.firePropertyChange();
} }
......
...@@ -634,7 +634,7 @@ void ORowSetCache::updateObject( sal_Int32 columnIndex, const Any& x ...@@ -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 ,ORowSetValueVector::Vector& io_aRow
,std::vector<sal_Int32>& o_ChangedColumns ,std::vector<sal_Int32>& o_ChangedColumns
) )
......
...@@ -163,7 +163,7 @@ namespace dbaccess ...@@ -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<sal_Int32>& o_ChangedColumns void updateCharacterStream( sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream >& x, sal_Int32 length,ORowSetValueVector::Vector& io_aRow,std::vector<sal_Int32>& o_ChangedColumns
); );
void updateObject( sal_Int32 columnIndex, const css::uno::Any& x,ORowSetValueVector::Vector& io_aRow ,std::vector<sal_Int32>& o_ChangedColumns); void updateObject( sal_Int32 columnIndex, const css::uno::Any& x,ORowSetValueVector::Vector& io_aRow ,std::vector<sal_Int32>& o_ChangedColumns);
void updateNumericObject( sal_Int32 columnIndex, const css::uno::Any& x, sal_Int32 scale,ORowSetValueVector::Vector& io_aRow ,std::vector<sal_Int32>& o_ChangedColumns); void updateNumericObject( sal_Int32 columnIndex, const css::uno::Any& x, ORowSetValueVector::Vector& io_aRow ,std::vector<sal_Int32>& o_ChangedColumns);
void updateNull(sal_Int32 columnIndex void updateNull(sal_Int32 columnIndex
,ORowSetValueVector::Vector& io_aRow ,ORowSetValueVector::Vector& io_aRow
,std::vector<sal_Int32>& o_ChangedColumns ,std::vector<sal_Int32>& o_ChangedColumns
......
...@@ -92,7 +92,7 @@ SvXMLImportContext* OXMLQuery::CreateChildContext( ...@@ -92,7 +92,7 @@ SvXMLImportContext* OXMLQuery::CreateChildContext(
{ {
GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
OUString s1; OUString s1;
fillAttributes(nPrefix, rLocalName,xAttrList,s1,m_sTable,m_sSchema,m_sCatalog); fillAttributes(xAttrList,s1,m_sTable,m_sSchema,m_sCatalog);
} }
break; break;
} }
......
...@@ -121,14 +121,14 @@ SvXMLImportContext* OXMLTable::CreateChildContext( ...@@ -121,14 +121,14 @@ SvXMLImportContext* OXMLTable::CreateChildContext(
{ {
GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
OUString s1,s2,s3; OUString s1,s2,s3;
fillAttributes(nPrefix, rLocalName,xAttrList,m_sFilterStatement,s1,s2,s3); fillAttributes(xAttrList,m_sFilterStatement,s1,s2,s3);
} }
break; break;
case XML_TOK_ORDER_STATEMENT: case XML_TOK_ORDER_STATEMENT:
{ {
GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
OUString s1,s2,s3; OUString s1,s2,s3;
fillAttributes(nPrefix, rLocalName,xAttrList,m_sOrderStatement,s1,s2,s3); fillAttributes(xAttrList,m_sOrderStatement,s1,s2,s3);
} }
break; break;
...@@ -212,9 +212,7 @@ void OXMLTable::EndElement() ...@@ -212,9 +212,7 @@ void OXMLTable::EndElement()
} }
void OXMLTable::fillAttributes(sal_uInt16 /*nPrfx*/ void OXMLTable::fillAttributes(const uno::Reference< XAttributeList > & _xAttrList
,const OUString& /*_sLocalName*/
,const uno::Reference< XAttributeList > & _xAttrList
,OUString& _rsCommand ,OUString& _rsCommand
,OUString& _rsTableName ,OUString& _rsTableName
,OUString& _rsTableSchema ,OUString& _rsTableSchema
......
...@@ -43,10 +43,8 @@ namespace dbaxml ...@@ -43,10 +43,8 @@ namespace dbaxml
ODBFilter& GetOwnImport(); ODBFilter& GetOwnImport();
void fillAttributes( sal_uInt16 nPrfx void fillAttributes( const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList
,const OUString& _sLocalName ,OUString& _rsCommand
,const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList
, OUString& _rsCommand
,OUString& _rsTableName ,OUString& _rsTableName
,OUString& _rsTableSchema ,OUString& _rsTableSchema
,OUString& _rsTableCatalog ,OUString& _rsTableCatalog
......
...@@ -68,7 +68,7 @@ namespace dbaui ...@@ -68,7 +68,7 @@ namespace dbaui
typedef list< pair < opcode, pair < OConnectionLineDataVec::size_type, OConnectionLineDataVec::size_type> > > ops_type; typedef list< pair < opcode, pair < OConnectionLineDataVec::size_type, OConnectionLineDataVec::size_type> > > ops_type;
ops_type m_ops; 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 /** returns the column id for the editbrowsebox
@param _nColId @param _nColId
the column id SOURCE_COLUMN or DEST_COLUMN the column id SOURCE_COLUMN or DEST_COLUMN
...@@ -311,7 +311,7 @@ namespace dbaui ...@@ -311,7 +311,7 @@ namespace dbaui
if ( xDef.is() ) if ( xDef.is() )
{ {
fillListBox(xDef,nRow,nColumnId); fillListBox(xDef);
OUString sName = GetCellText( nRow, nColumnId ); OUString sName = GetCellText( nRow, nColumnId );
m_pListCell->SelectEntry( sName ); m_pListCell->SelectEntry( sName );
if ( m_pListCell->GetSelectEntry() != sName ) if ( m_pListCell->GetSelectEntry() != sName )
...@@ -353,7 +353,7 @@ namespace dbaui ...@@ -353,7 +353,7 @@ namespace dbaui
if( rDev.IsClipRegion() ) if( rDev.IsClipRegion() )
rDev.SetClipRegion(); rDev.SetClipRegion();
} }
void ORelationControl::fillListBox(const Reference< XPropertySet>& _xDest,long /*_nRow*/,sal_uInt16 /*nColumnId*/) void ORelationControl::fillListBox(const Reference< XPropertySet>& _xDest)
{ {
m_pListCell->Clear(); m_pListCell->Clear();
try try
......
...@@ -1085,7 +1085,7 @@ OFieldDescription* OTableEditorCtrl::GetFieldDescr( long nRow ) ...@@ -1085,7 +1085,7 @@ OFieldDescription* OTableEditorCtrl::GetFieldDescr( long nRow )
return pRow->GetActFieldDescr(); return pRow->GetActFieldDescr();
} }
bool OTableEditorCtrl::IsCutAllowed( long nRow ) bool OTableEditorCtrl::IsCutAllowed()
{ {
bool bIsCutAllowed = (GetView()->getController().isAddAllowed() && GetView()->getController().isDropAllowed()) || bool bIsCutAllowed = (GetView()->getController().isAddAllowed() && GetView()->getController().isDropAllowed()) ||
GetView()->getController().isAlterAllowed(); GetView()->getController().isAlterAllowed();
...@@ -1104,7 +1104,7 @@ bool OTableEditorCtrl::IsCutAllowed( long nRow ) ...@@ -1104,7 +1104,7 @@ bool OTableEditorCtrl::IsCutAllowed( long nRow )
bIsCutAllowed = !pNameCell->GetSelected().isEmpty(); bIsCutAllowed = !pNameCell->GetSelected().isEmpty();
break; break;
case ROW: case ROW:
bIsCutAllowed = IsCopyAllowed(nRow); bIsCutAllowed = IsCopyAllowed();
break; break;
default: default:
bIsCutAllowed = false; bIsCutAllowed = false;
...@@ -1115,7 +1115,7 @@ bool OTableEditorCtrl::IsCutAllowed( long nRow ) ...@@ -1115,7 +1115,7 @@ bool OTableEditorCtrl::IsCutAllowed( long nRow )
return bIsCutAllowed; return bIsCutAllowed;
} }
bool OTableEditorCtrl::IsCopyAllowed( long /*nRow*/ ) bool OTableEditorCtrl::IsCopyAllowed()
{ {
bool bIsCopyAllowed = false; bool bIsCopyAllowed = false;
if(m_eChildFocus == DESCRIPTION ) if(m_eChildFocus == DESCRIPTION )
...@@ -1148,7 +1148,7 @@ bool OTableEditorCtrl::IsCopyAllowed( long /*nRow*/ ) ...@@ -1148,7 +1148,7 @@ bool OTableEditorCtrl::IsCopyAllowed( long /*nRow*/ )
return bIsCopyAllowed; return bIsCopyAllowed;
} }
bool OTableEditorCtrl::IsPasteAllowed( long /*nRow*/ ) bool OTableEditorCtrl::IsPasteAllowed()
{ {
bool bAllowed = GetView()->getController().isAddAllowed(); bool bAllowed = GetView()->getController().isAddAllowed();
if ( bAllowed ) if ( bAllowed )
...@@ -1375,9 +1375,9 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt) ...@@ -1375,9 +1375,9 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt)
VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "dbaccess/ui/tabledesignrowmenu.ui", ""); VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "dbaccess/ui/tabledesignrowmenu.ui", "");
VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu")); VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu"));
aContextMenu->EnableItem(aContextMenu->GetItemId("cut"), IsCutAllowed(nRow)); aContextMenu->EnableItem(aContextMenu->GetItemId("cut"), IsCutAllowed());
aContextMenu->EnableItem(aContextMenu->GetItemId("copy"), IsCopyAllowed(nRow)); aContextMenu->EnableItem(aContextMenu->GetItemId("copy"), IsCopyAllowed());
aContextMenu->EnableItem(aContextMenu->GetItemId("paste"), IsPasteAllowed(nRow)); aContextMenu->EnableItem(aContextMenu->GetItemId("paste"), IsPasteAllowed());
aContextMenu->EnableItem(aContextMenu->GetItemId("delete"), IsDeleteAllowed(nRow)); aContextMenu->EnableItem(aContextMenu->GetItemId("delete"), IsDeleteAllowed(nRow));
aContextMenu->EnableItem(aContextMenu->GetItemId("primarykey"), IsPrimaryKeyAllowed(nRow)); aContextMenu->EnableItem(aContextMenu->GetItemId("primarykey"), IsPrimaryKeyAllowed(nRow));
aContextMenu->EnableItem(aContextMenu->GetItemId("insert"), IsInsertNewAllowed(nRow)); aContextMenu->EnableItem(aContextMenu->GetItemId("insert"), IsInsertNewAllowed(nRow));
......
...@@ -152,9 +152,9 @@ namespace dbaui ...@@ -152,9 +152,9 @@ namespace dbaui
virtual void Init() override; virtual void Init() override;
virtual void DeactivateCell(bool bUpdate = true) override; virtual void DeactivateCell(bool bUpdate = true) override;
bool IsCutAllowed( long nRow = -1 ); bool IsCutAllowed();
bool IsCopyAllowed( long nRow = -1 ); bool IsCopyAllowed();
bool IsPasteAllowed( long nRow = -1 ); bool IsPasteAllowed();
bool IsReadOnly() { return bReadOnly;} bool IsReadOnly() { return bReadOnly;}
OFieldDescription* GetFieldDescr( long nRow ); OFieldDescription* GetFieldDescr( long nRow );
......
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