[Libreoffice-commits] .: connectivity/source unusedcode.easy

Caolán McNamara caolan at kemper.freedesktop.org
Tue Mar 20 06:00:53 PDT 2012


 connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx |    7 -
 connectivity/source/drivers/evoab2/NDatabaseMetaData.hxx |    1 
 connectivity/source/drivers/evoab2/NStatement.cxx        |   12 --
 connectivity/source/drivers/evoab2/NStatement.hxx        |    1 
 connectivity/source/drivers/file/FNoException.cxx        |    5 -
 connectivity/source/drivers/file/fanalyzer.cxx           |   61 ---------------
 connectivity/source/inc/file/fanalyzer.hxx               |    2 
 unusedcode.easy                                          |    4 
 8 files changed, 93 deletions(-)

New commits:
commit 33a805ebcf1fa1e86854a0af4f90834a31e4ec0d
Author: Santiago Martinez <smvarela at gmail.com>
Date:   Fri Mar 16 20:12:53 2012 +0100

    Remove unused code as listed in unusedcode.easy

diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
index 929150a..0a89e58 100644
--- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
@@ -147,13 +147,6 @@ namespace connectivity
     }
 
 
-    guint
-    getFieldCount()
-    {
-        initFields();
-        return nFields;
-    }
-
     const ColumnProperty *
     getField(guint n)
     {
diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.hxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.hxx
index 45f93b9..2cb7207 100644
--- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.hxx
+++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.hxx
@@ -64,7 +64,6 @@ namespace connectivity
         const SplitEvoColumns* get_evo_addr();
 
         const ColumnProperty *getField(guint n);
-        guint                 getFieldCount() ;
         GType                 getGFieldType(guint nCol) ;
         sal_Int32             getFieldType(guint nCol) ;
         rtl::OUString         getFieldTypeName(guint nCol) ;
diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx
index 36786a4..81beb26 100644
--- a/connectivity/source/drivers/evoab2/NStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NStatement.cxx
@@ -163,18 +163,6 @@ void SAL_CALL OCommonStatement::close(  ) throw(SQLException, RuntimeException)
 }
 // -------------------------------------------------------------------------
 
-void OCommonStatement::reset() throw (SQLException)
-{
-    ::osl::MutexGuard aGuard( m_aMutex );
-    checkDisposed(OCommonStatement_IBase::rBHelper.bDisposed);
-
-
-    clearWarnings ();
-
-    if (m_xResultSet.get().is())
-        clearMyResultSet();
-}
-
 void OCommonStatement::clearMyResultSet () throw (SQLException)
 {
     ::osl::MutexGuard aGuard( m_aMutex );
diff --git a/connectivity/source/drivers/evoab2/NStatement.hxx b/connectivity/source/drivers/evoab2/NStatement.hxx
index d12956e..3d6d923 100644
--- a/connectivity/source/drivers/evoab2/NStatement.hxx
+++ b/connectivity/source/drivers/evoab2/NStatement.hxx
@@ -190,7 +190,6 @@ namespace connectivity
             virtual ~OCommonStatement();
 
         protected:
-            void         reset () throw( ::com::sun::star::sdbc::SQLException);
             void         clearMyResultSet () throw( ::com::sun::star::sdbc::SQLException);
             void         parseSql( const ::rtl::OUString& sql, QueryData& _out_rQueryData );
             EBookQuery  *whereAnalysis( const OSQLParseNode*  parseTree );
diff --git a/connectivity/source/drivers/file/FNoException.cxx b/connectivity/source/drivers/file/FNoException.cxx
index 8090295..67599cb 100644
--- a/connectivity/source/drivers/file/FNoException.cxx
+++ b/connectivity/source/drivers/file/FNoException.cxx
@@ -66,11 +66,6 @@ void OPredicateCompiler::Clean()
     m_aCodeList.clear();
 }
 // -----------------------------------------------------------------------------
-void OSQLAnalyzer::clean()
-{
-    m_aCompiler->Clean();
-}
-// -----------------------------------------------------------------------------
 void OSQLAnalyzer::bindParameterRow(OValueRefRow& _pRow)
 {
     OCodeList& rCodeList    = m_aCompiler->m_aCodeList;
diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx
index d5f327d..fcaba19 100644
--- a/connectivity/source/drivers/file/fanalyzer.cxx
+++ b/connectivity/source/drivers/file/fanalyzer.cxx
@@ -212,67 +212,6 @@ void OSQLAnalyzer::bindSelectRow(const OValueRefRow& _pRow)
     return pKeySet;
 }
 
-//------------------------------------------------------------------
-void OSQLAnalyzer::describeParam(::rtl::Reference<OSQLColumns> rParameterColumns)
-{
-    OCodeList& rCodeList    = m_aCompiler->m_aCodeList;
-    OCodeStack aCodeStack;
-
-    if (!rCodeList.size())
-        return;     // no predicate
-    if (!rParameterColumns->get().size())
-        return; // no parameters
-
-    // Create columns, that have a more precise description for the included
-    ::rtl::Reference<OSQLColumns> aNewParamColumns = new OSQLColumns(*rParameterColumns);
-
-
-    // Create a Test-row, is needed to describe the parameters
-    OValueRefRow aParameterRow  = new OValueRefVector(rParameterColumns->get().size());
-    bindParameterRow(aParameterRow);
-
-    OValueRefRow aTestRow = new OValueRefVector(Reference< XIndexAccess>(m_aCompiler->getOrigColumns(),UNO_QUERY)->getCount());
-    delete bindEvaluationRow(aTestRow);                 // Bind the attributes to the values
-
-    for(OCodeList::iterator aIter = rCodeList.begin(); aIter != rCodeList.end(); ++aIter)
-    {
-        OOperand* pOperand = PTR_CAST(OOperand,(*aIter));
-        OOperator* pOperator = PTR_CAST(OOperator,(*aIter));
-        if (pOperand)
-            aCodeStack.push(pOperand);
-        else
-        {
-            if (pOperator->getRequestedOperands() == 2)     // with two Operands it is possible
-            {                                               // to specify one parameter better
-                OOperandParam *pParam  = PTR_CAST(OOperandParam,aCodeStack.top());
-                if (pParam)  // adjust the Parameter-types, if the left Operand is an attribute
-                {
-                    OOperandAttr *pLeft  = PTR_CAST(OOperandAttr,*(rCodeList.end() - 2));
-                    if (pLeft)
-                    {
-                        Reference< XPropertySet> xCol;
-                        Reference< XIndexAccess>(m_aCompiler->getOrigColumns(),UNO_QUERY)->getByIndex(pLeft->getRowPos()) >>= xCol;
-                        OSL_ENSURE(xCol.is(), "Ungueltige Struktur");
-                        pParam->describe(xCol, aNewParamColumns);
-                    }
-                }
-            }
-            pOperator->Exec(aCodeStack);
-        }
-    }
-    OOperand* pOperand = aCodeStack.top();
-    aCodeStack.pop();
-
-    OSL_ENSURE(aCodeStack.empty(), "StackFehler");
-    OSL_ENSURE(pOperand, "StackFehler");
-    if (IS_TYPE(OOperandResult,pOperand))
-        delete pOperand;
-    else
-        OSL_FAIL("Illegal here!");
-
-    rParameterColumns = aNewParamColumns;
-}
-
 // -----------------------------------------------------------------------------
 OOperandAttr* OSQLAnalyzer::createOperandAttr(sal_Int32 _nPos,
                                               const Reference< XPropertySet>& _xCol,
diff --git a/connectivity/source/inc/file/fanalyzer.hxx b/connectivity/source/inc/file/fanalyzer.hxx
index 5faf61a..9b9b001 100644
--- a/connectivity/source/inc/file/fanalyzer.hxx
+++ b/connectivity/source/inc/file/fanalyzer.hxx
@@ -65,7 +65,6 @@ namespace connectivity
                 {  }
 
             OConnection* getConnection() const { return m_pConnection; }
-            void describeParam(::rtl::Reference<OSQLColumns> rParameterColumns); // More detailed description of parameters
             ::std::vector<sal_Int32>* bindEvaluationRow(OValueRefRow& _pRow); // Bind an evaluation row to the restriction
             /** bind the select columns if they contain a function which needs a row value
                 @param  _pRow   the result row
@@ -81,7 +80,6 @@ namespace connectivity
 
             void dispose();
             void start(OSQLParseNode* pSQLParseNode);
-            void clean();
             virtual sal_Bool hasRestriction() const;
             virtual sal_Bool hasFunctions() const;
             inline sal_Bool evaluateRestriction()   { return m_aInterpreter->start(); }
diff --git a/unusedcode.easy b/unusedcode.easy
index bf5cbbc..1377bba 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -809,10 +809,6 @@ connectivity::OSQLParseNodesContainer::empty() const
 connectivity::OSQLScanner::GetCurrentRule() const
 connectivity::OSortIndex::GetValue(int) const
 connectivity::SQLError::getSQLState(int) const
-connectivity::evoab::OCommonStatement::reset()
-connectivity::evoab::getFieldCount()
-connectivity::file::OSQLAnalyzer::clean()
-connectivity::file::OSQLAnalyzer::describeParam(rtl::Reference<connectivity::ORefVector<com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> > >)
 connectivity::file::OStatement_Base::reset()
 connectivity::file::OStatement_Base::setWarning(com::sun::star::sdbc::SQLWarning const&)
 connectivity::mozab::MQuery::getAddressbook() const


More information about the Libreoffice-commits mailing list