Hi,
Please see attached.
Best Regards,
Kate Goss
From 099415fb77eddd7d211ae6ed547cb31b10484a37 Mon Sep 17 00:00:00 2001
From: Kate Goss <katherine.goss@gmail.com>
Date: Sun, 12 Feb 2012 13:57:46 +0000
Subject: [PATCH 1/2] Remove unused method
ODatabaseMetaDataResultSet::openTablesTypes( )
---
.../odbcbase/ODatabaseMetaDataResultSet.cxx | 17 -----------------
.../source/inc/odbc/ODatabaseMetaDataResultSet.hxx | 1 -
unusedcode.easy | 1 -
3 files changed, 0 insertions(+), 19 deletions(-)
diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
index 6dd7881..64e9409 100644
--- a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
@@ -896,24 +896,7 @@ void ODatabaseMetaDataResultSet::openTables(const Any& catalog, const
::rtl::OUS
checkColumnCount();
}
-//-----------------------------------------------------------------------------
-void ODatabaseMetaDataResultSet::openTablesTypes( ) throw(SQLException, RuntimeException)
-{
- m_bFreeHandle = sal_True;
- SQLRETURN nRetcode = N3SQLTables(m_aStatementHandle,
- 0,0,
- 0,0,
- 0,0,
- (SDB_ODBC_CHAR *) SQL_ALL_TABLE_TYPES,SQL_NTS);
- OTools::ThrowException(m_pConnection,nRetcode,m_aStatementHandle,SQL_HANDLE_STMT,*this);
- m_aColMapping.clear();
- m_aColMapping.push_back(-1);
- m_aColMapping.push_back(4);
- m_xMetaData = new OResultSetMetaData(m_pConnection,m_aStatementHandle,m_aColMapping);
- checkColumnCount();
-}
-// -------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::openCatalogs() throw(SQLException, RuntimeException)
{
m_bFreeHandle = sal_True;
diff --git a/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx
b/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx
index 7a17249..56130be 100644
--- a/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx
+++ b/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx
@@ -204,7 +204,6 @@ namespace connectivity
const ::connectivity::TIntVector& getColumnMapping() { return m_aColMapping; }
- void openTablesTypes( ) throw(::com::sun::star::sdbc::SQLException,
::com::sun::star::uno::RuntimeException);
void openTypeInfo() throw(::com::sun::star::sdbc::SQLException,
::com::sun::star::uno::RuntimeException);
void openCatalogs() throw(::com::sun::star::sdbc::SQLException,
::com::sun::star::uno::RuntimeException);
void openSchemas() throw(::com::sun::star::sdbc::SQLException,
::com::sun::star::uno::RuntimeException);
diff --git a/unusedcode.easy b/unusedcode.easy
index 9a40c2f..e4e6714 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -1175,7 +1175,6 @@ connectivity::mozab::OCatalog::getDot()
connectivity::mozab::OPreparedStatement::checkParameterIndex(int)
connectivity::mozab::OResultSet::initializeRow(rtl::Reference<connectivity::ODeleteVector<connectivity::ORowSetValue>
&, int)
connectivity::mozab::OTable::OTable(connectivity::sdbcx::OCollection*,
connectivity::mozab::OConnection*)
-connectivity::odbc::ODatabaseMetaDataResultSet::openTablesTypes()
connectivity::odbc::OPreparedStatement::getDataBuf(int)
connectivity::odbc::OPreparedStatement::getParamLength(int)
connectivity::odbc::OPreparedStatement::getPrecision(int)
--
1.7.9
From 43f49e146696d38358891638c53a95de4e7667de Mon Sep 17 00:00:00 2001
From: Kate Goss <katherine.goss@gmail.com>
Date: Mon, 13 Feb 2012 21:53:08 +0000
Subject: [PATCH 2/2] Remove unused code from
connectivity::odbc::OPreparedStatement
Remove methods getDataBuf(int), getParamLength(int), getPrecision(int).
---
.../source/drivers/odbcbase/OPreparedStatement.cxx | 77 --------------------
.../source/inc/odbc/OPreparedStatement.hxx | 4 -
unusedcode.easy | 3 -
3 files changed, 0 insertions(+), 84 deletions(-)
diff --git a/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx
b/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx
index 2dbde52..b47fe2f1 100644
--- a/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx
+++ b/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx
@@ -675,27 +675,6 @@ sal_Int8* OPreparedStatement::allocBindBuf( sal_Int32 index,sal_Int32 bufLen)
// -------------------------------------------------------------------------
//--------------------------------------------------------------------
-// getDataBuf
-// Gets the data buffer for the given parameter index
-//--------------------------------------------------------------------
-
-sal_Int8* OPreparedStatement::getDataBuf (sal_Int32 index)
-{
- sal_Int8* b = NULL;
-
- // Sanity check the parameter number
-
- if ((index >= 1) &&
- (index <= numParams))
- {
- b = boundParams[index - 1].getBindDataBuffer ();
- }
-
- return b;
-}
-// -------------------------------------------------------------------------
-
-//--------------------------------------------------------------------
// getLengthBuf
// Gets the length buffer for the given parameter index
//--------------------------------------------------------------------
@@ -717,34 +696,6 @@ sal_Int8* OPreparedStatement::getLengthBuf (sal_Int32 index)
// -------------------------------------------------------------------------
//--------------------------------------------------------------------
-// getParamLength
-// Returns the length of the given parameter number. When each
-// parameter was bound, a 4-sal_Int8 buffer was given to hold the
-// length (stored in native format). Get the buffer, convert the
-// buffer from native format, and return it. If the length is -1,
-// the column is considered to be NULL.
-//--------------------------------------------------------------------
-
-sal_Int32 OPreparedStatement::getParamLength ( sal_Int32 index)
-{
- sal_Int32 paramLen = SQL_NULL_DATA;
-
- // Sanity check the parameter number
-
- if ((index >= 1) &&
- (index <= numParams)) {
-
- // Now get the length of the parameter from the
- // bound param array. -1 is returned if it is NULL.
- long n = 0;
- memcpy (&n, boundParams[index -1].getBindLengthBuffer (), sizeof (n));
- paramLen = n;
- }
- return paramLen;
-}
-// -------------------------------------------------------------------------
-
-//--------------------------------------------------------------------
// putParamData
// Puts parameter data from a previously bound input stream. The
// input stream was bound using SQL_LEN_DATA_AT_EXEC.
@@ -811,34 +762,6 @@ void OPreparedStatement::putParamData (sal_Int32 index) throw(SQLException)
}
}
// -------------------------------------------------------------------------
-//--------------------------------------------------------------------
-// getPrecision
-// Given a SQL type, return the maximum precision for the column.
-// Returns -1 if not known
-//--------------------------------------------------------------------
-
-sal_Int32 OPreparedStatement::getPrecision ( sal_Int32 sqlType)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
- sal_Int32 prec = -1;
- const TTypeInfoVector& rTypeInfo = m_pConnection->getTypeInfo();
- if ( !rTypeInfo.empty() )
- {
- m_pConnection->buildTypeInfo();
- }
-
- if ( !rTypeInfo.empty() )
- {
- OTypeInfo aInfo;
- aInfo.nType = (sal_Int16)sqlType;
- TTypeInfoVector::const_iterator aIter =
::std::find(rTypeInfo.begin(),rTypeInfo.end(),aInfo);
- if(aIter != rTypeInfo.end())
- prec = (*aIter).nPrecision;
- }
- return prec;
-}
//--------------------------------------------------------------------
// setStream
diff --git a/connectivity/source/inc/odbc/OPreparedStatement.hxx
b/connectivity/source/inc/odbc/OPreparedStatement.hxx
index 8c41355..076c9e05 100644
--- a/connectivity/source/inc/odbc/OPreparedStatement.hxx
+++ b/connectivity/source/inc/odbc/OPreparedStatement.hxx
@@ -88,15 +88,11 @@ namespace connectivity
void putParamData (sal_Int32 index) throw(::com::sun::star::sdbc::SQLException);
void setStream (sal_Int32 ParameterIndex,const ::com::sun::star::uno::Reference<
::com::sun::star::io::XInputStream>& x,
SQLLEN length,sal_Int32 SQLtype)
throw(::com::sun::star::sdbc::SQLException);
- sal_Int32 getParamLength ( sal_Int32 index);
sal_Int8* getLengthBuf (sal_Int32 index);
- sal_Int8* getDataBuf (sal_Int32 index);
sal_Int8* allocBindBuf ( sal_Int32 index, sal_Int32 bufLen);
void initBoundParam () throw(::com::sun::star::sdbc::SQLException);
void setParameter(sal_Int32 parameterIndex,sal_Int32 _nType,sal_Int32 _nSize,void*
_pData);
- sal_Int32 getPrecision ( sal_Int32 sqlType);
-
sal_Bool isPrepared() const { return m_bPrepared;}
void prepareStatement();
void checkParameterIndex(sal_Int32 _parameterIndex);
diff --git a/unusedcode.easy b/unusedcode.easy
index e4e6714..7e270bd 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -1175,9 +1175,6 @@ connectivity::mozab::OCatalog::getDot()
connectivity::mozab::OPreparedStatement::checkParameterIndex(int)
connectivity::mozab::OResultSet::initializeRow(rtl::Reference<connectivity::ODeleteVector<connectivity::ORowSetValue>
&, int)
connectivity::mozab::OTable::OTable(connectivity::sdbcx::OCollection*,
connectivity::mozab::OConnection*)
-connectivity::odbc::OPreparedStatement::getDataBuf(int)
-connectivity::odbc::OPreparedStatement::getParamLength(int)
-connectivity::odbc::OPreparedStatement::getPrecision(int)
connectivity::sdbcx::OGroup::OGroup(rtl::OUString const&, unsigned char)
connectivity::sdbcx::OGroup::OGroup(unsigned char)
connectivity::toString(com::sun::star::uno::Any const&)
--
1.7.9
Context
- [PATCH] Remove unused code from connectivity::odbc · Kate Goss
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.