[Libreoffice-commits] .: connectivity/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Sep 13 04:33:34 PDT 2012
connectivity/source/drivers/kab/KDatabaseMetaData.hxx | 2 --
connectivity/source/drivers/kab/KPreparedStatement.cxx | 2 +-
connectivity/source/drivers/kab/KResultSet.cxx | 5 ++---
connectivity/source/drivers/kab/KResultSet.hxx | 3 +++
connectivity/source/drivers/kab/KResultSetMetaData.cxx | 4 +---
connectivity/source/drivers/kab/KResultSetMetaData.hxx | 4 +---
connectivity/source/drivers/kab/KStatement.cxx | 4 +---
connectivity/source/drivers/kab/KStatement.hxx | 3 ---
8 files changed, 9 insertions(+), 18 deletions(-)
New commits:
commit 65006ffb0baec2efb06ff7eac59bbef50d232eb6
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Sep 13 13:32:27 2012 +0200
-Werror,-Wunused-private-field (connectivity/source/drivers/kab)
...and some related clean up.
Change-Id: I26a8720fb7f60615f2e348e4728a3abddf6a33cd
diff --git a/connectivity/source/drivers/kab/KDatabaseMetaData.hxx b/connectivity/source/drivers/kab/KDatabaseMetaData.hxx
index c3d4fe7..0e3787b 100644
--- a/connectivity/source/drivers/kab/KDatabaseMetaData.hxx
+++ b/connectivity/source/drivers/kab/KDatabaseMetaData.hxx
@@ -41,8 +41,6 @@ namespace connectivity
public:
- inline KabConnection* getOwnConnection() const { return m_xConnection.get(); }
-
KabDatabaseMetaData(KabConnection* _pCon);
static const ::rtl::OUString & getAddressBookTableName();
virtual ~KabDatabaseMetaData();
diff --git a/connectivity/source/drivers/kab/KPreparedStatement.cxx b/connectivity/source/drivers/kab/KPreparedStatement.cxx
index 26167b3..be7efa0 100644
--- a/connectivity/source/drivers/kab/KPreparedStatement.cxx
+++ b/connectivity/source/drivers/kab/KPreparedStatement.cxx
@@ -115,7 +115,7 @@ Reference< XResultSetMetaData > SAL_CALL KabPreparedStatement::getMetaData() thr
if (!m_xMetaData.is())
{
- m_xMetaData = new KabResultSetMetaData(getOwnConnection());
+ m_xMetaData = new KabResultSetMetaData;
setKabFields();
}
Reference< XResultSetMetaData > xMetaData = m_xMetaData.get();
diff --git a/connectivity/source/drivers/kab/KResultSet.cxx b/connectivity/source/drivers/kab/KResultSet.cxx
index 31bed0f..5841932 100644
--- a/connectivity/source/drivers/kab/KResultSet.cxx
+++ b/connectivity/source/drivers/kab/KResultSet.cxx
@@ -329,8 +329,7 @@ DateTime SAL_CALL KabResultSet::getTimestamp(sal_Int32 columnIndex) throw(SQLExc
if (m_nRowPos != -1 && m_nRowPos != nAddressees && m_xMetaData.is())
{
- KabResultSetMetaData *pMeta = static_cast<KabResultSetMetaData *>(m_xMetaData.get());
- sal_Int32 nFieldNumber = pMeta->fieldAtColumn(columnIndex);
+ sal_Int32 nFieldNumber = m_xMetaData->fieldAtColumn(columnIndex);
if (nFieldNumber == KAB_FIELD_REVISION)
{
@@ -435,7 +434,7 @@ Reference< XResultSetMetaData > SAL_CALL KabResultSet::getMetaData() throw(SQLEx
checkDisposed(KabResultSet_BASE::rBHelper.bDisposed);
if (!m_xMetaData.is())
- m_xMetaData = new KabResultSetMetaData(m_xStatement->getOwnConnection());
+ m_xMetaData = new KabResultSetMetaData;
Reference< XResultSetMetaData > xMetaData = m_xMetaData.get();
return xMetaData;
diff --git a/connectivity/source/drivers/kab/KResultSet.hxx b/connectivity/source/drivers/kab/KResultSet.hxx
index 7a90333..c6413b8 100644
--- a/connectivity/source/drivers/kab/KResultSet.hxx
+++ b/connectivity/source/drivers/kab/KResultSet.hxx
@@ -102,6 +102,9 @@ namespace connectivity
void someKabAddressees(const class KabCondition *pCondition);
void sortKabAddressees(const class KabOrder *pOrder);
+ ::rtl::Reference< KabResultSetMetaData > getKabMetaData() const
+ { return m_xMetaData; }
+
// ::cppu::OComponentHelper
virtual void SAL_CALL disposing(void);
diff --git a/connectivity/source/drivers/kab/KResultSetMetaData.cxx b/connectivity/source/drivers/kab/KResultSetMetaData.cxx
index 2ed2fae..14fc352 100644
--- a/connectivity/source/drivers/kab/KResultSetMetaData.cxx
+++ b/connectivity/source/drivers/kab/KResultSetMetaData.cxx
@@ -28,9 +28,7 @@ using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::sdbc;
-KabResultSetMetaData::KabResultSetMetaData(KabConnection* _pConnection)
- : m_pConnection(_pConnection),
- m_aKabFields()
+KabResultSetMetaData::KabResultSetMetaData()
{
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/kab/KResultSetMetaData.hxx b/connectivity/source/drivers/kab/KResultSetMetaData.hxx
index 5e91e49..4738106 100644
--- a/connectivity/source/drivers/kab/KResultSetMetaData.hxx
+++ b/connectivity/source/drivers/kab/KResultSetMetaData.hxx
@@ -20,7 +20,6 @@
#ifndef _CONNECTIVITY_KAB_RESULTSETMETADATA_HXX_
#define _CONNECTIVITY_KAB_RESULTSETMETADATA_HXX_
-#include "KConnection.hxx"
#include <connectivity/CommonTools.hxx>
#include <com/sun/star/sdbc/XResultSetMetaData.hpp>
#include <cppuhelper/implbase1.hxx>
@@ -37,7 +36,6 @@ namespace connectivity
class KabResultSetMetaData : public KabResultSetMetaData_BASE
{
- KabConnection* m_pConnection;
::std::vector<sal_Int32> m_aKabFields; // for each selected column, contains the number
// of the corresponding KAddressBook field
@@ -45,7 +43,7 @@ namespace connectivity
virtual ~KabResultSetMetaData();
public:
- KabResultSetMetaData(KabConnection* _pConnection);
+ KabResultSetMetaData();
// avoid ambigous cast error from the compiler
inline operator ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > () throw()
diff --git a/connectivity/source/drivers/kab/KStatement.cxx b/connectivity/source/drivers/kab/KStatement.cxx
index a84d476..e898ee4 100644
--- a/connectivity/source/drivers/kab/KStatement.cxx
+++ b/connectivity/source/drivers/kab/KStatement.cxx
@@ -301,15 +301,13 @@ sal_Bool KabCommonStatement::isTableKnown(KabResultSet *pResult) const
void KabCommonStatement::setKabFields(KabResultSet *pResult) const throw(SQLException)
{
::rtl::Reference<connectivity::OSQLColumns> xColumns; // selected columns
- KabResultSetMetaData *pMeta; // meta information - holds the list of KAddressBook fields
xColumns = m_aSQLIterator.getSelectColumns();
if (!xColumns.is())
{
lcl_throwError(STR_INVALID_COLUMN_SELECTION);
}
- pMeta = static_cast<KabResultSetMetaData *>(pResult->getMetaData().get());
- pMeta->setKabFields(xColumns);
+ pResult->getKabMetaData()->setKabFields(xColumns);
}
// -------------------------------------------------------------------------
void KabCommonStatement::selectAddressees(KabResultSet *pResult) const throw(SQLException)
diff --git a/connectivity/source/drivers/kab/KStatement.hxx b/connectivity/source/drivers/kab/KStatement.hxx
index 8348cdc..62a1b27 100644
--- a/connectivity/source/drivers/kab/KStatement.hxx
+++ b/connectivity/source/drivers/kab/KStatement.hxx
@@ -137,9 +137,6 @@ namespace connectivity
// XCloseable
virtual void SAL_CALL close(
) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
-
- // other methods
- inline KabConnection* getOwnConnection() const { return m_pConnection; }
};
//**************************************************************
More information about the Libreoffice-commits
mailing list