loplugin:virtualdead unused params in OCacheSet

these methods do nothing except forward to their similar named variants,
so just remove them

Change-Id: I28d31bbe2c1e39fe5a9c2d7eaa9e14006213ab27
Reviewed-on: https://gerrit.libreoffice.org/81247
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2019-10-22 08:13:45 +02:00
parent 964ffdc068
commit db90e072fa
6 changed files with 9 additions and 56 deletions
@@ -37,15 +37,6 @@ chart2/source/controller/dialogs/ChangingResource.hxx:30
chart2/source/controller/dialogs/ChartTypeDialogController.hxx:105
void chart::ChartTypeDialogController::fillExtraControls(const class chart::ChartTypeParameter &,const class com::sun::star::uno::Reference<class com::sun::star::chart2::XChartDocument> &,const class com::sun::star::uno::Reference<class com::sun::star::beans::XPropertySet> &,)const
011
dbaccess/source/core/api/CacheSet.hxx:174
_Bool dbaccess::OCacheSet::previous_checked(_Bool,)
0
dbaccess/source/core/api/CacheSet.hxx:175
_Bool dbaccess::OCacheSet::absolute_checked(int,_Bool,)
10
dbaccess/source/core/api/CacheSet.hxx:176
_Bool dbaccess::OCacheSet::last_checked(_Bool,)
0
desktop/source/deployment/registry/inc/dp_backend.h:84
void dp_registry::backend::Package::processPackage_(class osl::ResettableGuard<class osl::Mutex> &,_Bool,_Bool,const class rtl::Reference<class dp_misc::AbortChannel> &,const class com::sun::star::uno::Reference<class com::sun::star::ucb::XCommandEnvironment> &,)
01111
-15
View File
@@ -540,21 +540,6 @@ bool OCacheSet::previous( )
return m_xDriverSet->previous();
}
bool OCacheSet::last_checked( bool /*i_bFetchRow*/)
{
return last();
}
bool OCacheSet::previous_checked( bool /*i_bFetchRow*/ )
{
return previous();
}
bool OCacheSet::absolute_checked( sal_Int32 row,bool /*i_bFetchRow*/ )
{
return absolute(row);
}
void OCacheSet::refreshRow( )
{
m_xDriverSet->refreshRow();
-3
View File
@@ -171,9 +171,6 @@ namespace dbaccess
virtual bool columnValuesUpdated(ORowSetValueVector::Vector& o_aCachedRow,const ORowSetValueVector::Vector& i_aRow);
virtual bool updateColumnValues(const ORowSetValueVector::Vector& io_aCachedRow,ORowSetValueVector::Vector& io_aRow,const std::vector<sal_Int32>& i_aChangedColumns);
virtual void fillMissingValues(ORowSetValueVector::Vector& io_aRow) const;
virtual bool previous_checked( bool i_bFetchRow );
virtual bool absolute_checked( sal_Int32 row,bool i_bFetchRow );
virtual bool last_checked( bool i_bFetchRow);
};
}
#endif // INCLUDED_DBACCESS_SOURCE_CORE_API_CACHESET_HXX
+1 -16
View File
@@ -1039,11 +1039,6 @@ bool OKeySet::first()
}
bool OKeySet::last( )
{
return last_checked(true);
}
bool OKeySet::last_checked( bool /* i_bFetchRow */ )
{
m_bInserted = m_bUpdated = m_bDeleted = false;
bool bFetchedRow = fillAllRows();
@@ -1066,11 +1061,6 @@ sal_Int32 OKeySet::getRow( )
}
bool OKeySet::absolute( sal_Int32 row )
{
return absolute_checked(row,true);
}
bool OKeySet::absolute_checked( sal_Int32 row, bool /* i_bFetchRow */ )
{
m_bInserted = m_bUpdated = m_bDeleted = false;
OSL_ENSURE(row,"absolute(0) isn't allowed!");
@@ -1127,7 +1117,7 @@ bool OKeySet::absolute_checked( sal_Int32 row, bool /* i_bFetchRow */ )
return m_aKeyIter != m_aKeyMap.end() && m_aKeyIter != m_aKeyMap.begin();
}
bool OKeySet::previous_checked( bool /* i_bFetchRow */ )
bool OKeySet::previous()
{
m_bInserted = m_bUpdated = m_bDeleted = false;
if(m_aKeyIter != m_aKeyMap.begin())
@@ -1138,11 +1128,6 @@ bool OKeySet::previous_checked( bool /* i_bFetchRow */ )
return m_aKeyIter != m_aKeyMap.begin();
}
bool OKeySet::previous( )
{
return previous_checked(true);
}
bool OKeySet::doTryRefetch_throw()
{
ensureStatement( );
-5
View File
@@ -215,11 +215,6 @@ namespace dbaccess
virtual void updateRow(const ORowSetRow& _rInsertRow,const ORowSetRow& _rOriginalRow,const connectivity::OSQLTable& _xTable ) override;
virtual void deleteRow(const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& _xTable ) override;
virtual void insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& _xTable ) override;
virtual bool previous_checked( bool i_bFetchRow ) override;
virtual bool absolute_checked( sal_Int32 row,bool i_bFetchRow ) override;
virtual bool last_checked( bool i_bFetchRow) override;
};
}
#endif // INCLUDED_DBACCESS_SOURCE_CORE_API_KEYSET_HXX
+8 -8
View File
@@ -705,7 +705,7 @@ void ORowSetCache::afterLast( )
if(!m_bRowCountFinal)
{
m_xCacheSet->last_checked(false);
m_xCacheSet->last();
m_bRowCountFinal = true;
m_nRowCount = m_xCacheSet->getRow();// + 1 removed
}
@@ -757,7 +757,7 @@ bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos, sal_Int32 &_nNewEndPos)
if(!m_bRowCountFinal)
{
if(m_xCacheSet->previous_checked(false)) // because we stand after the last row
if(m_xCacheSet->previous()) // because we stand after the last row
m_nRowCount = m_xCacheSet->getRow(); // here we have the row count
if(!m_nRowCount)
m_nRowCount = i-1; // it can be that getRow return zero
@@ -798,7 +798,7 @@ bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos, sal_Int32 &_nNewEndPos)
{
if(!m_xCacheSet->next())
{
if(m_xCacheSet->previous_checked(false)) // because we stand after the last row
if(m_xCacheSet->previous()) // because we stand after the last row
m_nRowCount = m_xCacheSet->getRow(); // here we have the row count
m_bRowCountFinal = true;
}
@@ -836,7 +836,7 @@ void ORowSetCache::moveWindow()
// but only when we don't know it already
if ( !m_bRowCountFinal )
{
bOk = m_xCacheSet->absolute_checked( m_nPosition + 1,false );
bOk = m_xCacheSet->absolute( m_nPosition + 1 );
if ( bOk )
m_nRowCount = std::max(sal_Int32(m_nPosition+1),m_nRowCount);
}
@@ -844,7 +844,7 @@ void ORowSetCache::moveWindow()
if(!bOk && !m_bRowCountFinal)
{
// because we stand after the last row
m_nRowCount = m_xCacheSet->previous_checked(false) ? m_xCacheSet->getRow() : 0;
m_nRowCount = m_xCacheSet->previous() ? m_xCacheSet->getRow() : 0;
m_bRowCountFinal = true;
}
}
@@ -1000,7 +1000,7 @@ void ORowSetCache::moveWindow()
bOk = m_xCacheSet->next();
if(!bOk)
{
m_xCacheSet->previous_checked(false); // because we stand after the last row
m_xCacheSet->previous(); // because we stand after the last row
m_nRowCount = nPos; // here we have the row count
OSL_ENSURE(nPos == m_xCacheSet->getRow(),"nPos is not valid!");
m_bRowCountFinal = true;
@@ -1027,7 +1027,7 @@ void ORowSetCache::moveWindow()
if ( !m_bRowCountFinal )
{
m_xCacheSet->previous_checked(false); // because we stand after the last row
m_xCacheSet->previous(); // because we stand after the last row
m_nRowCount = std::max(m_nRowCount, nPos); // here we have the row count
OSL_ENSURE(nPos == m_xCacheSet->getRow(),"nPos isn't valid!");
m_bRowCountFinal = true;
@@ -1040,7 +1040,7 @@ void ORowSetCache::moveWindow()
aIter = m_pMatrix->begin();
nPos = m_nStartPos + 1;
bCheck = m_xCacheSet->absolute_checked(nPos, true);
bCheck = m_xCacheSet->absolute(nPos);
for(; !aIter->is() && bCheck;++aIter, ++nPos)
{
OSL_ENSURE(aIter != m_pMatrix->end(),"Invalid iterator");