summaryrefslogtreecommitdiffstats
path: root/connectivity/source/drivers/evoab2
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/evoab2')
-rw-r--r--connectivity/source/drivers/evoab2/EApi.cxx1
-rw-r--r--connectivity/source/drivers/evoab2/EApi.h2
-rw-r--r--connectivity/source/drivers/evoab2/NCatalog.cxx3
-rw-r--r--connectivity/source/drivers/evoab2/NColumns.cxx4
-rw-r--r--connectivity/source/drivers/evoab2/NConnection.cxx1
-rw-r--r--connectivity/source/drivers/evoab2/NConnection.hxx1
-rw-r--r--connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx15
-rw-r--r--connectivity/source/drivers/evoab2/NDriver.cxx2
-rw-r--r--connectivity/source/drivers/evoab2/NDriver.hxx2
-rw-r--r--connectivity/source/drivers/evoab2/NPreparedStatement.cxx3
-rw-r--r--connectivity/source/drivers/evoab2/NResultSet.cxx16
-rw-r--r--connectivity/source/drivers/evoab2/NResultSet.hxx2
-rw-r--r--connectivity/source/drivers/evoab2/NResultSetMetaData.cxx6
-rw-r--r--connectivity/source/drivers/evoab2/NResultSetMetaData.hxx2
-rw-r--r--connectivity/source/drivers/evoab2/NStatement.cxx7
-rw-r--r--connectivity/source/drivers/evoab2/NTable.cxx5
-rw-r--r--connectivity/source/drivers/evoab2/NTables.cxx5
-rw-r--r--connectivity/source/drivers/evoab2/NTables.hxx5
18 files changed, 28 insertions, 54 deletions
diff --git a/connectivity/source/drivers/evoab2/EApi.cxx b/connectivity/source/drivers/evoab2/EApi.cxx
index 8f6a6f7083d0..9ec8e0d44e32 100644
--- a/connectivity/source/drivers/evoab2/EApi.cxx
+++ b/connectivity/source/drivers/evoab2/EApi.cxx
@@ -21,6 +21,7 @@
#define DECLARE_FN_POINTERS 1
#include "EApi.h"
static const char *eBookLibNames[] = {
+ "libebook-1.2.so.21", // evolution-data-server 3.45.2+
"libebook-1.2.so.20", // evolution-data-server 3.33.2+
"libebook-1.2.so.19", // evolution-data-server 3.24+
"libebook-1.2.so.16"
diff --git a/connectivity/source/drivers/evoab2/EApi.h b/connectivity/source/drivers/evoab2/EApi.h
index 9a2138eb2a26..a33bf9721de6 100644
--- a/connectivity/source/drivers/evoab2/EApi.h
+++ b/connectivity/source/drivers/evoab2/EApi.h
@@ -157,4 +157,6 @@ bool isSourceBackend(ESource *pSource, const char *backendname);
G_END_DECLS
+inline void object_unref(gpointer data, gpointer) { g_object_unref(data); }
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab2/NCatalog.cxx b/connectivity/source/drivers/evoab2/NCatalog.cxx
index 6b409ce66d65..d16a6377d1d1 100644
--- a/connectivity/source/drivers/evoab2/NCatalog.cxx
+++ b/connectivity/source/drivers/evoab2/NCatalog.cxx
@@ -26,11 +26,8 @@
using namespace connectivity::evoab;
using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::container;
-using namespace ::com::sun::star::lang;
OEvoabCatalog::OEvoabCatalog(OEvoabConnection* _pCon) :
connectivity::sdbcx::OCatalog(_pCon)
diff --git a/connectivity/source/drivers/evoab2/NColumns.cxx b/connectivity/source/drivers/evoab2/NColumns.cxx
index 5b2b64d5d58b..99fce8f3bf46 100644
--- a/connectivity/source/drivers/evoab2/NColumns.cxx
+++ b/connectivity/source/drivers/evoab2/NColumns.cxx
@@ -25,12 +25,8 @@
using namespace connectivity::sdbcx;
using namespace connectivity;
-using namespace ::comphelper;
using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::sdbc;
-using namespace ::com::sun::star::container;
-using namespace ::com::sun::star::lang;
using namespace connectivity::evoab;
diff --git a/connectivity/source/drivers/evoab2/NConnection.cxx b/connectivity/source/drivers/evoab2/NConnection.cxx
index 02e8d476dd6e..66fc7ecb6511 100644
--- a/connectivity/source/drivers/evoab2/NConnection.cxx
+++ b/connectivity/source/drivers/evoab2/NConnection.cxx
@@ -36,7 +36,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::sdbc;
-using namespace ::com::sun::star::lang;
OEvoabConnection::OEvoabConnection(OEvoabDriver const & _rDriver)
: m_rDriver(_rDriver)
diff --git a/connectivity/source/drivers/evoab2/NConnection.hxx b/connectivity/source/drivers/evoab2/NConnection.hxx
index 4d6604f0975c..8dd8714bc2fe 100644
--- a/connectivity/source/drivers/evoab2/NConnection.hxx
+++ b/connectivity/source/drivers/evoab2/NConnection.hxx
@@ -60,7 +60,6 @@ namespace connectivity::evoab {
/// @throws css::sdbc::SQLException
void construct(const OUString& _rUrl,const css::uno::Sequence< css::beans::PropertyValue >& _rInfo );
- OString const & getPassword() const { return m_aPassword; }
void setPassword( OString const & aStr ) { m_aPassword = aStr; }
// own methods
const OEvoabDriver& getDriver() const { return m_rDriver; }
diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
index b3a10c016bce..110d01feb213 100644
--- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
@@ -34,10 +34,7 @@
using namespace connectivity::evoab;
using namespace connectivity;
using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::beans;
using namespace com::sun::star::sdbc;
-using namespace com::sun::star::sdbcx;
namespace
{
@@ -300,7 +297,7 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getColumns(
::osl::MutexGuard aGuard( m_aMutex );
initFields();
- for (sal_Int32 i = 0; i < static_cast<sal_Int32>(nFields); i++)
+ for (guint i = 0; i < nFields; i++)
{
if( match( columnNamePattern, getFieldName( i ), '\0' ) )
{
@@ -310,7 +307,7 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getColumns(
// COLUMN_NAME
aRow[4] = new ORowSetValueDecorator( getFieldName( i ) );
// ORDINAL_POSITION
- aRow[17] = new ORowSetValueDecorator( i );
+ aRow[17] = new ORowSetValueDecorator( sal_Int32(i) );
aRows.push_back( aRow );
}
}
@@ -996,7 +993,7 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTableTypes( )
rtl::Reference<::connectivity::ODatabaseMetaDataResultSet> pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTableTypes);
// here we fill the rows which should be visible when ask for data from the resultset returned here
- auto nNbTypes = SAL_N_ELEMENTS(sTableTypes);
+ auto nNbTypes = std::size(sTableTypes);
ODatabaseMetaDataResultSet::ORows aRows;
for(std::size_t i=0;i < nNbTypes;++i)
{
@@ -1069,12 +1066,12 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables(
{
::osl::MutexGuard aGuard( m_aMutex );
- rtl::Reference<ODatabaseMetaDataResultSet> pResult = new ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::eTableTypes);
+ rtl::Reference<ODatabaseMetaDataResultSet> pResult = new ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::eTables);
// check if any type is given
// when no types are given then we have to return all tables e.g. TABLE
- static const OUStringLiteral aTable(u"TABLE");
+ static constexpr OUString aTable(u"TABLE"_ustr);
bool bTableFound = true;
sal_Int32 nLength = types.getLength();
@@ -1139,7 +1136,7 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables(
aRows.push_back(aRow);
}
- g_list_foreach (pSources, reinterpret_cast<GFunc>(g_object_unref), nullptr);
+ g_list_foreach (pSources, object_unref, nullptr);
g_list_free (pSources);
pResult->setRows(std::move(aRows));
diff --git a/connectivity/source/drivers/evoab2/NDriver.cxx b/connectivity/source/drivers/evoab2/NDriver.cxx
index d1b7746f47c5..c72d9b1a189f 100644
--- a/connectivity/source/drivers/evoab2/NDriver.cxx
+++ b/connectivity/source/drivers/evoab2/NDriver.cxx
@@ -31,10 +31,8 @@ using namespace osl;
using namespace connectivity::evoab;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::ucb;
OEvoabDriver::OEvoabDriver(const Reference< XComponentContext >& _rxContext) :
diff --git a/connectivity/source/drivers/evoab2/NDriver.hxx b/connectivity/source/drivers/evoab2/NDriver.hxx
index 9d3b57fa7988..b505bb9db5fd 100644
--- a/connectivity/source/drivers/evoab2/NDriver.hxx
+++ b/connectivity/source/drivers/evoab2/NDriver.hxx
@@ -28,7 +28,7 @@
#include <cppuhelper/compbase.hxx>
#include <connectivity/CommonTools.hxx>
-inline constexpr OUStringLiteral EVOAB_DRIVER_IMPL_NAME = u"com.sun.star.comp.sdbc.evoab.OEvoabDriver";
+inline constexpr OUString EVOAB_DRIVER_IMPL_NAME = u"com.sun.star.comp.sdbc.evoab.OEvoabDriver"_ustr;
namespace connectivity::evoab
{
diff --git a/connectivity/source/drivers/evoab2/NPreparedStatement.cxx b/connectivity/source/drivers/evoab2/NPreparedStatement.cxx
index 7b6172ac6cf9..2ed8b0f166b9 100644
--- a/connectivity/source/drivers/evoab2/NPreparedStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NPreparedStatement.cxx
@@ -22,14 +22,13 @@
#include <connectivity/dbexception.hxx>
#include <connectivity/dbtools.hxx>
#include <rtl/ref.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <strings.hrc>
using namespace connectivity::evoab;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
-using namespace com::sun::star::beans;
using namespace com::sun::star::sdbc;
using namespace com::sun::star::container;
using namespace com::sun::star::io;
diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx
index e6a43dab7687..bc9656337097 100644
--- a/connectivity/source/drivers/evoab2/NResultSet.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSet.cxx
@@ -36,7 +36,7 @@
#include <connectivity/sqlerror.hxx>
#include <rtl/string.hxx>
#include <sal/log.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/intlwrapper.hxx>
#include <unotools/collatorwrapper.hxx>
@@ -51,7 +51,6 @@ using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::beans;
using namespace com::sun::star::sdbc;
-using namespace com::sun::star::sdbcx;
using namespace com::sun::star::container;
using namespace com::sun::star::io;
namespace ErrorCondition = ::com::sun::star::sdb::ErrorCondition;
@@ -88,7 +87,7 @@ static OUString
valueToOUString( GValue& _rValue )
{
const char *pStr = g_value_get_string( &_rValue );
- OString aStr( pStr ? pStr : "" );
+ std::string_view aStr( pStr ? pStr : "" );
OUString sResult( OStringToOUString( aStr, RTL_TEXTENCODING_UTF8 ) );
g_value_unset( &_rValue );
return sResult;
@@ -402,7 +401,7 @@ public:
break;
}
}
- g_list_foreach (pSources, reinterpret_cast<GFunc>(g_object_unref), nullptr);
+ g_list_foreach (pSources, object_unref, nullptr);
g_list_free (pSources);
if (!id)
return nullptr;
@@ -435,7 +434,7 @@ public:
m_pContacts = nullptr;
}
- virtual void executeQuery (EBook* pBook, EBookQuery* pQuery, OString &/*rPassword*/) override
+ virtual void executeQuery (EBook* pBook, EBookQuery* pQuery) override
{
freeContacts();
char *sexp = e_book_query_to_string( pQuery );
@@ -570,9 +569,7 @@ void OEvoabResultSet::construct( const QueryData& _rData )
}
if ( bExecuteQuery )
{
- OString aPassword = m_pConnection->getPassword();
- m_pVersionHelper->executeQuery(pBook, _rData.getQuery(), aPassword);
- m_pConnection->setPassword( aPassword );
+ m_pVersionHelper->executeQuery(pBook, _rData.getQuery());
if ( m_pVersionHelper->hasContacts() && !_rData.aSortOrder.empty() )
{
@@ -914,8 +911,7 @@ Reference< XInterface > SAL_CALL OEvoabResultSet::getStatement( )
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- css::uno::WeakReferenceHelper aStatement(static_cast<OWeakObject*>(m_pStatement));
- return aStatement.get();
+ return cppu::getXWeak(m_pStatement);
}
diff --git a/connectivity/source/drivers/evoab2/NResultSet.hxx b/connectivity/source/drivers/evoab2/NResultSet.hxx
index 74a5e40dda1f..3eeeab244ab3 100644
--- a/connectivity/source/drivers/evoab2/NResultSet.hxx
+++ b/connectivity/source/drivers/evoab2/NResultSet.hxx
@@ -49,7 +49,7 @@ namespace connectivity::evoab
{
public:
virtual EBook* openBook(const char *abname) = 0;
- virtual void executeQuery (EBook* pBook, EBookQuery* pQuery, OString &rPassword) = 0;
+ virtual void executeQuery (EBook* pBook, EBookQuery* pQuery) = 0;
virtual void freeContacts() = 0;
virtual bool isLDAP( EBook *pBook ) = 0;
virtual bool isLocal( EBook *pBook ) = 0;
diff --git a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
index a2ce922ff193..a828b127fe68 100644
--- a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
@@ -21,14 +21,14 @@
#include "NDatabaseMetaData.hxx"
#include <connectivity/dbexception.hxx>
#include <strings.hrc>
+#include <utility>
using namespace connectivity::evoab;
using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
using namespace com::sun::star::sdbc;
-OEvoabResultSetMetaData::OEvoabResultSetMetaData(const OUString& _aTableName)
- : m_aTableName(_aTableName)
+OEvoabResultSetMetaData::OEvoabResultSetMetaData(OUString _aTableName)
+ : m_aTableName(std::move(_aTableName))
{
}
diff --git a/connectivity/source/drivers/evoab2/NResultSetMetaData.hxx b/connectivity/source/drivers/evoab2/NResultSetMetaData.hxx
index 66fffb984e4f..e79d347b1c4d 100644
--- a/connectivity/source/drivers/evoab2/NResultSetMetaData.hxx
+++ b/connectivity/source/drivers/evoab2/NResultSetMetaData.hxx
@@ -40,7 +40,7 @@ namespace connectivity::evoab
protected:
virtual ~OEvoabResultSetMetaData() override;
public:
- explicit OEvoabResultSetMetaData(const OUString& _aTableName);
+ explicit OEvoabResultSetMetaData(OUString _aTableName);
/// @throws css::sdbc::SQLException
void setEvoabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns);
sal_uInt32 fieldAtColumn(sal_Int32 columnIndex) const
diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx
index 1f3e21a2ef90..91ebdda56c70 100644
--- a/connectivity/source/drivers/evoab2/NStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NStatement.cxx
@@ -38,7 +38,7 @@
#include <sqlbison.hxx>
#include <strings.hrc>
#include <connectivity/dbexception.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
namespace connectivity::evoab {
@@ -49,7 +49,6 @@ using namespace com::sun::star::beans;
using namespace com::sun::star::sdbc;
using namespace com::sun::star::sdbcx;
using namespace com::sun::star::container;
-using namespace com::sun::star::io;
using namespace com::sun::star::util;
namespace {
@@ -549,7 +548,7 @@ Any SAL_CALL OCommonStatement::getWarnings( )
checkDisposed(OCommonStatement_IBase::rBHelper.bDisposed);
- return makeAny(SQLWarning());
+ return Any(SQLWarning());
}
@@ -614,7 +613,7 @@ Reference< XResultSet > OCommonStatement::impl_executeQuery_throw( const QueryDa
pResult->construct( _rQueryData );
// done
- m_xResultSet = pResult;
+ m_xResultSet = Reference<XWeak>(pResult);
return pResult;
}
diff --git a/connectivity/source/drivers/evoab2/NTable.cxx b/connectivity/source/drivers/evoab2/NTable.cxx
index 208c52747768..631c27db244d 100644
--- a/connectivity/source/drivers/evoab2/NTable.cxx
+++ b/connectivity/source/drivers/evoab2/NTable.cxx
@@ -24,13 +24,8 @@
#include <com/sun/star/sdbc/XRow.hpp>
using namespace connectivity;
-using namespace ::comphelper;
using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::sdbc;
-using namespace ::com::sun::star::container;
-using namespace ::com::sun::star::lang;
using namespace connectivity::evoab;
OEvoabTable::OEvoabTable( sdbcx::OCollection* _pTables,
diff --git a/connectivity/source/drivers/evoab2/NTables.cxx b/connectivity/source/drivers/evoab2/NTables.cxx
index 69b54ba70759..3be63e1e1049 100644
--- a/connectivity/source/drivers/evoab2/NTables.cxx
+++ b/connectivity/source/drivers/evoab2/NTables.cxx
@@ -29,12 +29,7 @@ using namespace ::cppu;
using namespace connectivity::evoab;
using namespace connectivity::sdbcx;
using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::sdbc;
-using namespace ::com::sun::star::container;
-using namespace ::com::sun::star::lang;
-using namespace dbtools;
ObjectType OEvoabTables::createObject(const OUString& aName)
{
diff --git a/connectivity/source/drivers/evoab2/NTables.hxx b/connectivity/source/drivers/evoab2/NTables.hxx
index 7e200ff6aee2..e5d454729431 100644
--- a/connectivity/source/drivers/evoab2/NTables.hxx
+++ b/connectivity/source/drivers/evoab2/NTables.hxx
@@ -20,6 +20,7 @@
#include <connectivity/sdbcx/VCollection.hxx>
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
+#include <utility>
namespace connectivity::evoab
{
@@ -30,11 +31,11 @@ namespace connectivity::evoab
virtual sdbcx::ObjectType createObject(const OUString& _rName) override;
virtual void impl_refresh() override;
public:
- OEvoabTables(const css::uno::Reference< css::sdbc::XDatabaseMetaData >& _rMetaData,
+ OEvoabTables(css::uno::Reference< css::sdbc::XDatabaseMetaData > _xMetaData,
::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex,
const ::std::vector< OUString> &_rVector) :
sdbcx::OCollection(_rParent,true,_rMutex,_rVector),
- m_xMetaData(_rMetaData)
+ m_xMetaData(std::move(_xMetaData))
{}
virtual void disposing() override;
};