Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


This patch removes unused code as listed in unusedcode.easy
From 75344c3cb19be787fce45bd06ad93a971e0b5292 Mon Sep 17 00:00:00 2001
From: Santiago Martinez <smvarela@gmail.com>
Date: Wed, 28 Mar 2012 21:28:07 +0200
Subject: [PATCH] Remove unused code in sqlnode

---
 connectivity/inc/connectivity/sqlnode.hxx |    2 -
 connectivity/source/parse/sqlnode.cxx     |   41 -----------------------------
 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 4f8385a..8874ed0 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 7b4e4dd..5341a26 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -2386,45 +2386,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 
" );
@@ -2791,11 +2755,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 61a0856..f791255 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
-- 
1.7.7.6


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.