diff options
author | Santiago Martinez <smvarela@gmail.com> | 2012-03-28 21:28:07 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-03-29 13:16:12 +0100 |
commit | 10e92b820d80df6e46fc6c9aeef25bb4bb93920c (patch) | |
tree | d29f084260cf372a410b543ae6d3a9cc957ef3df | |
parent | 31d26fb9b85cd54267e1a5c0d5a3595e8bb4884c (diff) |
Remove unused code in sqlnode
-rw-r--r-- | connectivity/inc/connectivity/sqlnode.hxx | 2 | ||||
-rw-r--r-- | connectivity/source/parse/sqlnode.cxx | 41 | ||||
-rwxr-xr-x | unusedcode.easy | 3 |
3 files changed, 0 insertions, 46 deletions
diff --git a/connectivity/inc/connectivity/sqlnode.hxx b/connectivity/inc/connectivity/sqlnode.hxx index 4f8385a8c0f4..8874ed0fd7e2 100644 --- a/connectivity/inc/connectivity/sqlnode.hxx +++ b/connectivity/inc/connectivity/sqlnode.hxx @@ -278,11 +278,9 @@ namespace connectivity void append(OSQLParseNode* pNewSubTree); void insert(sal_uInt32 nPos, OSQLParseNode* pNewSubTree); - OSQLParseNode* replaceAt(sal_uInt32 nPos, OSQLParseNode* pNewSubTree); OSQLParseNode* replace(OSQLParseNode* pOldSubTree, OSQLParseNode* pNewSubTree); OSQLParseNode* removeAt(sal_uInt32 nPos); - OSQLParseNode* remove(OSQLParseNode* pSubTree); void replaceNodeValue(const ::rtl::OUString& rTableAlias,const ::rtl::OUString& rColumnName); diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index 4580bba0dc53..d69f8c8ffb33 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -2383,45 +2383,9 @@ OSQLParseNode* OSQLParseNode::removeAt(sal_uInt32 nPos) m_aChildren.erase(aPos); return pNode; } -//----------------------------------------------------------------------------- -OSQLParseNode* OSQLParseNode::remove(OSQLParseNode* pSubTree) -{ - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseNode::remove" ); - OSL_ENSURE(pSubTree != NULL, "OSQLParseNode: invalid SubTree"); - OSQLParseNodes::iterator aPos = ::std::find(m_aChildren.begin(), m_aChildren.end(), pSubTree); - if (aPos != m_aChildren.end()) - { - // Set the getParent of the removed node to NULL - pSubTree->setParent( NULL ); - m_aChildren.erase(aPos); - return pSubTree; - } - else - return NULL; -} // Replace methods //----------------------------------------------------------------------------- -OSQLParseNode* OSQLParseNode::replaceAt(sal_uInt32 nPos, OSQLParseNode* pNewSubNode) -{ - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseNode::replaceAt" ); - OSL_ENSURE(pNewSubNode != NULL, "OSQLParseNode: invalid nodes"); - OSL_ENSURE(pNewSubNode->getParent() == NULL, "OSQLParseNode: node already has getParent"); - OSL_ENSURE(nPos < m_aChildren.size(), "OSQLParseNode: invalid position"); - OSL_ENSURE(::std::find(m_aChildren.begin(), m_aChildren.end(), pNewSubNode) == m_aChildren.end(), - "OSQLParseNode::Replace() Node already element of parent"); - - OSQLParseNode* pOldSubNode = m_aChildren[nPos]; - - // Create connection to getParent - pNewSubNode->setParent( this ); - pOldSubNode->setParent( NULL ); - - m_aChildren[nPos] = pNewSubNode; - return pOldSubNode; -} - -//----------------------------------------------------------------------------- OSQLParseNode* OSQLParseNode::replace (OSQLParseNode* pOldSubNode, OSQLParseNode* pNewSubNode ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseNode::replace " ); @@ -2788,11 +2752,6 @@ void OSQLParseNodesContainer::erase(OSQLParseNode* _pNode) } } // ----------------------------------------------------------------------------- -bool OSQLParseNodesContainer::empty() const -{ - return m_aNodes.empty(); -} -// ----------------------------------------------------------------------------- void OSQLParseNodesContainer::clear() { ::osl::MutexGuard aGuard(m_aMutex); diff --git a/unusedcode.easy b/unusedcode.easy index ecbba19f3454..09d09240ee19 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -772,9 +772,6 @@ comphelper::findProperty(com::sun::star::beans::Property&, com::sun::star::uno:: connectivity::OKeyValue::OKeyValue() connectivity::ORowSetValue::setFromDouble(double const&, int) connectivity::OSQLInternalNode::OSQLInternalNode(unsigned short const*, connectivity::SQLNodeType, unsigned int) -connectivity::OSQLParseNode::remove(connectivity::OSQLParseNode*) -connectivity::OSQLParseNode::replaceAt(unsigned int, connectivity::OSQLParseNode*) -connectivity::OSQLParseNodesContainer::empty() const connectivity::OSQLScanner::GetCurrentRule() const connectivity::OSortIndex::GetValue(int) const connectivity::SQLError::getSQLState(int) const |