diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-21 14:26:56 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-21 18:44:29 +0200 |
commit | 4c945b22fc42eb7a52864018cbca88358e71fd4d (patch) | |
tree | 582dad7232dcd43e00029f5573f9896a93c71ca8 /connectivity | |
parent | 893f2128ed451120e41dba1ee4c2f512ec6bb20e (diff) |
new loplugin:methodcycles
look for closed cycles of methods i.e. unused code that would not
otherwise be found by the unusedmethods loplugin
Change-Id: I3fb052132d97aabca573bb8e9fc424201b1e2042
Reviewed-on: https://gerrit.libreoffice.org/60875
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/parse/sqliterator.cxx | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx index 5ba5c11325be..dcca0fc9db4a 100644 --- a/connectivity/source/parse/sqliterator.cxx +++ b/connectivity/source/parse/sqliterator.cxx @@ -780,73 +780,6 @@ void OSQLParseTreeIterator::getColumnRange( const OSQLParseNode* _pColumnRef, } -bool OSQLParseTreeIterator::getColumnTableRange(const OSQLParseNode* pNode, OUString &rTableRange) const -{ - OUString tmp; - if(impl_getColumnTableRange(pNode, tmp)) - { - rTableRange = tmp; - return true; - } - else - return false; -} - -bool OSQLParseTreeIterator::impl_getColumnTableRange(const OSQLParseNode* pNode, OUString &rTableRange) const -{ - // See if all columns belong to one table - if (SQL_ISRULE(pNode,column_ref)) - { - OUString aColName, aTableRange; - getColumnRange(pNode, aColName, aTableRange); - if (aTableRange.isEmpty()) // None found - { - // Look for the columns in the tables - for (auto const& table : *m_pImpl->m_pTables) - { - if (table.second.is()) - { - try - { - Reference< XNameAccess > xColumns = table.second->getColumns(); - if(xColumns->hasByName(aColName)) - { - Reference< XPropertySet > xColumn; - if (xColumns->getByName(aColName) >>= xColumn) - { - OSL_ENSURE(xColumn.is(),"Column isn't a propertyset!"); - aTableRange = table.first; - break; - } - } - } - catch(Exception&) - { - } - } - } - if (aTableRange.isEmpty()) - return false; - } - - - if (rTableRange.isEmpty()) - rTableRange = aTableRange; - else if (rTableRange != aTableRange) - return false; - } - else - { - for (sal_uInt32 i = 0, ncount = pNode->count(); i < ncount; i++) - { - if (!getColumnTableRange(pNode->getChild(i), rTableRange)) - return false; - } - } - return true; -} - - void OSQLParseTreeIterator::traverseCreateColumns(const OSQLParseNode* pSelectNode) { // aIteratorStatus.Clear(); |