[Libreoffice-commits] core.git: mysqlc/source

2018-08-27 Thread Libreoffice Gerrit user
 mysqlc/source/mysqlc_databasemetadata.cxx | 1234 --
 mysqlc/source/mysqlc_general.cxx  |  353 
 2 files changed, 1587 deletions(-)

New commits:
commit bce87186e5a67d5e5cf9dc169a67e852ef5f9bec
Author: Tamas Bunth 
AuthorDate: Mon Aug 27 10:16:17 2018 +0200
Commit: Tamás Bunth 
CommitDate: Mon Aug 27 12:57:54 2018 +0200

Delete mysqlc module, mysql cpp connector remains

Change-Id: Ic3536c1dd1e2aa9dd19af66db1b9a50fd8ef90e6
Reviewed-on: https://gerrit.libreoffice.org/59639
Tested-by: Jenkins
Reviewed-by: Tamás Bunth 

diff --git a/mysqlc/source/mysqlc_databasemetadata.cxx 
b/mysqlc/source/mysqlc_databasemetadata.cxx
deleted file mode 100644
index 310ce4c1c678..
--- a/mysqlc/source/mysqlc_databasemetadata.cxx
+++ /dev/null
@@ -1,1234 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#include "mysqlc_databasemetadata.hxx"
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-#include "mysqlc_general.hxx"
-#include "mysqlc_statement.hxx"
-#include "mysqlc_driver.hxx"
-#include "mysqlc_preparedstatement.hxx"
-
-#include 
-
-using namespace connectivity::mysqlc;
-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 mysqlc_sdbc_driver::getStringFromAny;
-
-#include 
-
-static std::string wild("%");
-
-
-void lcl_setRows_throw(const Reference< XResultSet >& _xResultSet,sal_Int32 
_nType,const std::vector< std::vector< Any > >& _rRows)
-{
-Reference< XInitialization> xIni(_xResultSet,UNO_QUERY);
-Sequence< Any > aArgs(2);
-aArgs[0] <<= _nType;
-
-Sequence< Sequence< Any > > aRows(_rRows.size());
-
-std::vector< std::vector< Any > >::const_iterator aIter = _rRows.begin();
-Sequence< Any > * pRowsIter = aRows.getArray();
-Sequence< Any > * pRowsEnd  = pRowsIter + aRows.getLength();
-for (; pRowsIter != pRowsEnd;++pRowsIter,++aIter) {
-if (!aIter->empty()) {
-Sequence aSeq(&(*aIter->begin()),aIter->size());
-(*pRowsIter) = aSeq;
-}
-}
-aArgs[1] <<= aRows;
-xIni->initialize(aArgs);
-}
-
-ODatabaseMetaData::ODatabaseMetaData(OConnection& _rCon, MYSQL* pMySql)
-:m_rConnection(_rCon)
-,m_pMySql(pMySql)
-,identifier_quote_string_set(false)
-{
-}
-
-ODatabaseMetaData::~ODatabaseMetaData()
-{
-}
-
-rtl::OUString SAL_CALL ODatabaseMetaData::getCatalogSeparator()
-{
-return rtl::OUString();
-}
-
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxBinaryLiteralLength()
-{
-return 16777208L;
-}
-
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxRowSize()
-{
-return 2147483647L - 8; // Max buffer size - HEADER
-}
-
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCatalogNameLength()
-{
-return 32;
-}
-
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCharLiteralLength()
-{
-return 16777208;
-}
-
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnNameLength()
-{
-return 64;
-}
-
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInIndex()
-{
-return 16;
-}
-
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCursorNameLength()
-{
-return 64;
-}
-
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxConnections()
-{
-// TODO
-// SELECT @@max_connections
-return 100;
-}
-
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInTable()
-{
-return 512;
-}
-
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxStatementLength()
-{
-// TODO
-// "SHOW VARIABLES LIKE 'max_allowed_packet'"
-return 32767;
-}
-
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTableNameLength()
-{
-return 64;
-}
-
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTablesInSelect()
-{
-return 256;
-}
-
-sal_Bool SAL_CALL ODatabaseMetaData::doesMaxRowSizeIncludeBlobs()
-{
-return true;
-}
-
-sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseQuotedIdentifiers()
-{
-// TODO
-return false;
-}
-
-sal_Bool SAL_CALL 

[Libreoffice-commits] core.git: mysqlc/source vcl/opengl

2018-08-13 Thread Libreoffice Gerrit user
 mysqlc/source/mysqlc_general.cxx   |2 +-
 mysqlc/source/mysqlc_statement.cxx |2 +-
 vcl/opengl/win/gdiimpl.cxx |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit cb2b52e068717b625b0097a44ecd9e7bbfb8962b
Author: Andrea Gelmini 
AuthorDate: Mon Aug 13 14:40:32 2018 +0200
Commit: Julien Nabet 
CommitDate: Mon Aug 13 21:48:32 2018 +0200

Fix typos

Change-Id: I0bcdff1d355f374e9922cf3f318a88f01af86f4f
Reviewed-on: https://gerrit.libreoffice.org/58929
Reviewed-by: Julien Nabet 
Tested-by: Jenkins

diff --git a/mysqlc/source/mysqlc_general.cxx b/mysqlc/source/mysqlc_general.cxx
index 48b68d081ff7..aa6822a6ba49 100644
--- a/mysqlc/source/mysqlc_general.cxx
+++ b/mysqlc/source/mysqlc_general.cxx
@@ -88,7 +88,7 @@ void allocateSqlVar(void** mem, enum_field_types eType, 
unsigned nSize)
 }
 }
 
-/// Use this intead of mysql_real_escape_string, because that one also escapes
+/// Use this instead of mysql_real_escape_string, because that one also escapes
 /// single quote ('), which should not be escaped
 rtl::OString escapeSql( const rtl::OString& from )
 {
diff --git a/mysqlc/source/mysqlc_statement.cxx 
b/mysqlc/source/mysqlc_statement.cxx
index cf13fd0a30af..ce91ed894376 100644
--- a/mysqlc/source/mysqlc_statement.cxx
+++ b/mysqlc/source/mysqlc_statement.cxx
@@ -136,7 +136,7 @@ sal_Bool SAL_CALL OCommonStatement::execute(const 
rtl::OUString& sql)
 
 MYSQL* pMySql = m_xConnection->getMysqlConnection();
 
-// NOTE: differs from mysql c API, wehere mysql_real_escape_string_quote()
+// NOTE: differs from MySQL C API, where mysql_real_escape_string_quote()
 // should be used.
 // toExec = mysqlc_sdbc_driver::escapeSql(toExec);
 int failure = mysql_real_query(pMySql, toExec.getStr(), 
toExec.getLength());
diff --git a/vcl/opengl/win/gdiimpl.cxx b/vcl/opengl/win/gdiimpl.cxx
index 70e20367f27f..0c622bb51d85 100644
--- a/vcl/opengl/win/gdiimpl.cxx
+++ b/vcl/opengl/win/gdiimpl.cxx
@@ -425,7 +425,7 @@ bool tryShaders(const OUString& rVertexShader, const 
OUString& rFragmentShader,
 if (!nId)
 return false;
 
-// We're intersted in the error returned by glDeleteProgram().
+// We're interested in the error returned by glDeleteProgram().
 glGetError();
 
 glDeleteProgram(nId);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: mysqlc/source

2018-08-13 Thread Libreoffice Gerrit user
 mysqlc/source/mysqlc_connection.cxx |4 +-
 mysqlc/source/mysqlc_databasemetadata.cxx   |2 -
 mysqlc/source/mysqlc_general.cxx|2 -
 mysqlc/source/mysqlc_prepared_resultset.cxx |   42 ++--
 mysqlc/source/mysqlc_preparedstatement.cxx  |2 -
 mysqlc/source/mysqlc_resultsetmetadata.cxx  |4 +-
 6 files changed, 28 insertions(+), 28 deletions(-)

New commits:
commit ce24919c01d1ab77f962137ff04a31dd5ec944af
Author: Noel Grandin 
AuthorDate: Mon Aug 13 09:09:18 2018 +0200
Commit: Noel Grandin 
CommitDate: Mon Aug 13 09:51:49 2018 +0200

loplugin, various in mysqlc

including
redundantcast
implicitboolconversion
sallogareas

after
commit 3478d7453a3d65b3d8d164e8f898a0b79f005c58
Date:   Sun Jun 17 18:09:43 2018 +0200
Switch from mysql to MariaDB C API

Change-Id: Ibbb2fccdc8c7837412d878752f7da780140d678c

diff --git a/mysqlc/source/mysqlc_connection.cxx 
b/mysqlc/source/mysqlc_connection.cxx
index 73581734a293..02b6af026534 100644
--- a/mysqlc/source/mysqlc_connection.cxx
+++ b/mysqlc/source/mysqlc_connection.cxx
@@ -79,7 +79,7 @@ OConnection::OConnection(MysqlCDriver& _rDriver)
 
 // use TCP as connection
 mysql_protocol_type protocol = MYSQL_PROTOCOL_TCP;
-mysql_options(_mysql, MYSQL_OPT_PROTOCOL, 
reinterpret_cast());
+mysql_options(_mysql, MYSQL_OPT_PROTOCOL, );
 }
 
 OConnection::~OConnection()
@@ -277,7 +277,7 @@ void SAL_CALL OConnection::setAutoCommit(sal_Bool 
autoCommit)
 {
 MutexGuard aGuard(m_aMutex);
 checkDisposed(OConnection_BASE::rBHelper.bDisposed);
-if(!mysql_autocommit(_mysql, autoCommit))
+if(!mysql_autocommit(_mysql, static_cast(autoCommit)))
 mysqlc_sdbc_driver::throwSQLExceptionWithMsg(mysql_error(_mysql), 
mysql_errno(_mysql), *this, getConnectionEncoding());
 }
 
diff --git a/mysqlc/source/mysqlc_databasemetadata.cxx 
b/mysqlc/source/mysqlc_databasemetadata.cxx
index 0f9e539e6df3..a63a7fe0f5a5 100644
--- a/mysqlc/source/mysqlc_databasemetadata.cxx
+++ b/mysqlc/source/mysqlc_databasemetadata.cxx
@@ -909,7 +909,7 @@ Reference< XResultSet > SAL_CALL 
ODatabaseMetaData::getSchemas()
 for (sal_uInt32 i = 1; i <= columns; i++) {
 rtl::OUString columnStringValue = xRow->getString(i);
 if (i == 1) {   // TABLE_SCHEM
-informationSchema = (0 == 
columnStringValue.equalsIgnoreAsciiCase("information_schema"));
+informationSchema = 
!columnStringValue.equalsIgnoreAsciiCase("information_schema");
 }
 aRow.push_back(makeAny(columnStringValue));
 }
diff --git a/mysqlc/source/mysqlc_general.cxx b/mysqlc/source/mysqlc_general.cxx
index 22e771275328..48b68d081ff7 100644
--- a/mysqlc/source/mysqlc_general.cxx
+++ b/mysqlc/source/mysqlc_general.cxx
@@ -84,7 +84,7 @@ void allocateSqlVar(void** mem, enum_field_types eType, 
unsigned nSize)
 *mem = nullptr;
 break;
 default:
-SAL_WARN("connectivity","unknown enum_field_type");
+SAL_WARN("mysqlc","unknown enum_field_type");
 }
 }
 
diff --git a/mysqlc/source/mysqlc_prepared_resultset.cxx 
b/mysqlc/source/mysqlc_prepared_resultset.cxx
index 6ef50bea7116..d66259d0a9db 100644
--- a/mysqlc/source/mysqlc_prepared_resultset.cxx
+++ b/mysqlc/source/mysqlc_prepared_resultset.cxx
@@ -168,7 +168,7 @@ sal_Bool SAL_CALL OPreparedResultSet::getBoolean(sal_Int32 
column)
 return false;
 }
 m_bWasNull = false;
-return *reinterpret_cast(m_aData[column - 1].buffer);
+return *static_cast(m_aData[column - 1].buffer);
 }
 
 sal_Int8 SAL_CALL OPreparedResultSet::getByte(sal_Int32 column)
@@ -183,7 +183,7 @@ sal_Int8 SAL_CALL OPreparedResultSet::getByte(sal_Int32 
column)
 return 0;
 }
 m_bWasNull = false;
-return *reinterpret_cast(m_aData[column - 1].buffer);
+return *static_cast(m_aData[column - 1].buffer);
 }
 
 uno::Sequence SAL_CALL OPreparedResultSet::getBytes(sal_Int32 column)
@@ -198,7 +198,7 @@ uno::Sequence SAL_CALL 
OPreparedResultSet::getBytes(sal_Int32 column)
 }
 m_bWasNull = false;
 
-return uno::Sequence(reinterpret_cast(m_aData[column - 1].buffer),
+return uno::Sequence(static_cast(m_aData[column 
- 1].buffer),
*m_aData[column - 1].length);
 }
 
@@ -215,7 +215,7 @@ Date SAL_CALL OPreparedResultSet::getDate(sal_Int32 column)
 }
 m_bWasNull = false;
 
-const MYSQL_TIME* pTime = reinterpret_cast(m_aData[column - 
1].buffer);
+const MYSQL_TIME* pTime = static_cast(m_aData[column - 
1].buffer);
 
 assert(pTime != nullptr);
 
@@ -235,14 +235,14 @@ double SAL_CALL OPreparedResultSet::getDouble(sal_Int32 
column)
 if (*m_aData[column - 1].is_null)
 {
 m_bWasNull = true;
-return double{};
+return 0;
 }
 m_bWasNull = false;
 
 if (m_aFields[column - 1].type == MYSQL_TYPE_FLOAT)
-

[Libreoffice-commits] core.git: mysqlc/source

2018-08-12 Thread Libreoffice Gerrit user
 mysqlc/source/mysqlc_general.cxx   |1 +
 mysqlc/source/mysqlc_preparedstatement.cxx |2 ++
 2 files changed, 3 insertions(+)

New commits:
commit 22828c32d1ae379782631a351aac34d0b1df95f4
Author: Rene Engelhard 
AuthorDate: Mon Aug 13 07:30:13 2018 +0200
Commit: Rene Engelhard 
CommitDate: Mon Aug 13 07:30:45 2018 +0200

fix build (missing #include 's)

Change-Id: Idf0b21d41fa0bac0a49c1b28724c487edd336353

diff --git a/mysqlc/source/mysqlc_general.cxx b/mysqlc/source/mysqlc_general.cxx
index 8f3d0ed619d2..22e771275328 100644
--- a/mysqlc/source/mysqlc_general.cxx
+++ b/mysqlc/source/mysqlc_general.cxx
@@ -19,6 +19,7 @@
 #include "mysqlc_general.hxx"
 #include "mysqlc_resultsetmetadata.hxx"
 
+#include 
 #include 
 
 using com::sun::star::sdbc::SQLException;
diff --git a/mysqlc/source/mysqlc_preparedstatement.cxx 
b/mysqlc/source/mysqlc_preparedstatement.cxx
index 9c6da76913e6..40e2ef172d8f 100644
--- a/mysqlc/source/mysqlc_preparedstatement.cxx
+++ b/mysqlc/source/mysqlc_preparedstatement.cxx
@@ -23,6 +23,8 @@
 #include "mysqlc_propertyids.hxx"
 #include "mysqlc_resultsetmetadata.hxx"
 
+#include 
+
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: mysqlc/source

2018-08-12 Thread Libreoffice Gerrit user
 mysqlc/source/mysqlc_prepared_resultset.cxx |3 +++
 mysqlc/source/mysqlc_preparedstatement.cxx  |   21 +++--
 2 files changed, 14 insertions(+), 10 deletions(-)

New commits:
commit aa6859f09068fa0380d0a23db4823f6ca1923037
Author: Tamas Bunth 
AuthorDate: Wed Aug 8 17:08:22 2018 +0200
Commit: Tamás Bunth 
CommitDate: Sun Aug 12 23:16:59 2018 +0200

mysqlc: Fix float, double and numeric types

Change-Id: I9d0b989735e736c9c35d8acf4ea1b072eddf7437
Reviewed-on: https://gerrit.libreoffice.org/58744
Tested-by: Jenkins
Reviewed-by: Tamás Bunth 

diff --git a/mysqlc/source/mysqlc_prepared_resultset.cxx 
b/mysqlc/source/mysqlc_prepared_resultset.cxx
index 3bc6b9424752..6ef50bea7116 100644
--- a/mysqlc/source/mysqlc_prepared_resultset.cxx
+++ b/mysqlc/source/mysqlc_prepared_resultset.cxx
@@ -239,6 +239,9 @@ double SAL_CALL OPreparedResultSet::getDouble(sal_Int32 
column)
 }
 m_bWasNull = false;
 
+if (m_aFields[column - 1].type == MYSQL_TYPE_FLOAT)
+return *reinterpret_cast(m_aData[column - 1].buffer);
+
 return *reinterpret_cast(m_aData[column - 1].buffer);
 }
 
diff --git a/mysqlc/source/mysqlc_preparedstatement.cxx 
b/mysqlc/source/mysqlc_preparedstatement.cxx
index 88b899a55814..9c6da76913e6 100644
--- a/mysqlc/source/mysqlc_preparedstatement.cxx
+++ b/mysqlc/source/mysqlc_preparedstatement.cxx
@@ -439,23 +439,24 @@ void SAL_CALL 
OPreparedStatement::setObjectWithInfo(sal_Int32 parameterIndex, co
 case DataType::DECIMAL:
 case DataType::NUMERIC:
 {
-double nValue(0);
+double nValue(0.0);
+rtl::OUString sValue;
 if ( value >>= nValue )
 {
 setDouble( parameterIndex, nValue );
 break;
 }
-else
+else if ( value >>= sValue )
 {
-rtl::OUString sValue;
-if( value >>= sValue )
-{
-m_binds[nIndex].buffer_type = MYSQL_TYPE_NEWDECIMAL;
-mysqlc_sdbc_driver::resetSqlVar(_binds[nIndex].buffer, 
sValue.getStr(), MYSQL_TYPE_LONGLONG, sValue.getLength());
-m_bindMetas[nIndex].is_null = 0;
-}
-
+rtl::OString sAscii = rtl::OUStringToOString(sValue, 
getOwnConnection()->getConnectionEncoding());
+std::stringstream sStream{sAscii.getStr()};
+sStream >> nValue;
+m_binds[nIndex].buffer_type = MYSQL_TYPE_DOUBLE;
+mysqlc_sdbc_driver::resetSqlVar(_binds[nIndex].buffer, , 
MYSQL_TYPE_DOUBLE, sValue.getLength());
+m_bindMetas[nIndex].is_null = 0;
+break;
 }
+
 #if defined __GNUC__ && __GNUC__ >= 7
 [[fallthrough]];
 #else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: mysqlc/source

2018-03-29 Thread Julien Nabet
 mysqlc/source/mysqlc_connection.cxx |5 +++--
 mysqlc/source/mysqlc_driver.cxx |4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 932c9065ee09d94fa14248f49b2cb1b190a91a1d
Author: Julien Nabet 
Date:   Thu Mar 29 20:44:55 2018 +0200

Use for-range loops in mysqlc

Change-Id: I3ff3fa5dca6b6b9060b0b38d875e1b7dec1f8245
Reviewed-on: https://gerrit.libreoffice.org/52127
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/mysqlc/source/mysqlc_connection.cxx 
b/mysqlc/source/mysqlc_connection.cxx
index e53a3b560cb0..c9b4c6d2e471 100644
--- a/mysqlc/source/mysqlc_connection.cxx
+++ b/mysqlc/source/mysqlc_connection.cxx
@@ -488,8 +488,9 @@ void OConnection::disposing()
 // we noticed that we should be destroyed in near future so we have to 
dispose our statements
 MutexGuard aGuard(m_aMutex);
 
-for (OWeakRefArray::iterator i = m_aStatements.begin(); i != 
m_aStatements.end() ; ++i) {
-Reference< XComponent > xComp(i->get(), UNO_QUERY);
+for (auto const& statement : m_aStatements)
+{
+Reference< XComponent > xComp(statement.get(), UNO_QUERY);
 if (xComp.is()) {
 xComp->dispose();
 }
diff --git a/mysqlc/source/mysqlc_driver.cxx b/mysqlc/source/mysqlc_driver.cxx
index b54463affe6f..18e2db4cb9ae 100644
--- a/mysqlc/source/mysqlc_driver.cxx
+++ b/mysqlc/source/mysqlc_driver.cxx
@@ -57,9 +57,9 @@ void MysqlCDriver::disposing()
 ::osl::MutexGuard aGuard(m_aMutex);
 
 // when driver will be destroyed so all our connections have to be 
destroyed as well
-for (OWeakRefArray::iterator i = m_xConnections.begin(); 
m_xConnections.end() != i; ++i)
+for (auto const& connection : m_xConnections)
 {
-Reference< XComponent > xComp(i->get(), UNO_QUERY);
+Reference< XComponent > xComp(connection.get(), UNO_QUERY);
 if (xComp.is()) {
 xComp->dispose();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: mysqlc/source

2017-11-01 Thread Noel Grandin
 mysqlc/source/mysqlc_connection.hxx|7 +--
 mysqlc/source/mysqlc_databasemetadata.hxx  |4 +---
 mysqlc/source/mysqlc_preparedstatement.hxx |4 +---
 mysqlc/source/mysqlc_resultset.hxx |3 +--
 mysqlc/source/mysqlc_resultsetmetadata.hxx |4 ++--
 mysqlc/source/mysqlc_statement.hxx |3 +--
 6 files changed, 7 insertions(+), 18 deletions(-)

New commits:
commit 6084ca8a637abb57b3d7236c303e22afa6423b43
Author: Noel Grandin 
Date:   Tue Oct 31 14:42:47 2017 +0200

loplugin:finalclasses in mysqlc

Change-Id: I3f0ae04c30e863c123404c6e99f7ae27bc5715c7
Reviewed-on: https://gerrit.libreoffice.org/44134
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/mysqlc/source/mysqlc_connection.hxx 
b/mysqlc/source/mysqlc_connection.hxx
index b3fd5a78bfe9..63c121c99a2e 100644
--- a/mysqlc/source/mysqlc_connection.hxx
+++ b/mysqlc/source/mysqlc_connection.hxx
@@ -82,20 +82,15 @@ namespace connectivity
 
 typedef std::vector< css::uno::WeakReferenceHelper > OWeakRefArray;
 
-class OConnection : public OBase_Mutex,
+class OConnection final : public OBase_Mutex,
 public OConnection_BASE,
 public 
connectivity::mysqlc::OSubComponent
 {
 friend class connectivity::mysqlc::OSubComponent;
 
-private:
 ConnectionSettings  m_settings;
-
-private:
 css::uno::Reference< css::container::XNameAccess > m_typeMap;
 css::uno::Reference< css::util::XStringSubstitution > 
m_xParameterSubstitution;
-protected:
-
 
 // Data attributes
 
diff --git a/mysqlc/source/mysqlc_databasemetadata.hxx 
b/mysqlc/source/mysqlc_databasemetadata.hxx
index 172c5ee364bd..9f09e534215d 100644
--- a/mysqlc/source/mysqlc_databasemetadata.hxx
+++ b/mysqlc/source/mysqlc_databasemetadata.hxx
@@ -39,15 +39,13 @@ namespace connectivity
 
 typedef ::cppu::WeakImplHelper1< css::sdbc::XDatabaseMetaData> 
ODatabaseMetaData_BASE;
 
-class ODatabaseMetaData : public ODatabaseMetaData_BASE
+class ODatabaseMetaData final : public ODatabaseMetaData_BASE
 {
 OConnection&m_rConnection;
-protected:
 sql::DatabaseMetaData * meta;
 rtl::OUString   identifier_quote_string;
 boolidentifier_quote_string_set;
 
-private:
 rtl::OUString impl_getStringMetaData( const sal_Char* _methodName, 
const sql::SQLString& (sql::DatabaseMetaData::*Method)() );
 rtl::OUString impl_getStringMetaData( const sal_Char* _methodName, 
sql::SQLString (sql::DatabaseMetaData::*Method)() );
 sal_Int32 impl_getInt32MetaData( const sal_Char* _methodName, 
unsigned int (sql::DatabaseMetaData::*Method)() );
diff --git a/mysqlc/source/mysqlc_preparedstatement.hxx 
b/mysqlc/source/mysqlc_preparedstatement.hxx
index 652b3558f012..b82f88ecac38 100644
--- a/mysqlc/source/mysqlc_preparedstatement.hxx
+++ b/mysqlc/source/mysqlc_preparedstatement.hxx
@@ -47,16 +47,14 @@ namespace connectivity
 css::sdbc::XResultSetMetaDataSupplier,
 css::lang::XServiceInfo> 
OPreparedStatement_BASE;
 
-class OPreparedStatement :  public OCommonStatement,
+class OPreparedStatement final : public OCommonStatement,
 public OPreparedStatement_BASE
 {
-protected:
 unsigned intm_paramCount;   // number of placeholders
 Reference< XResultSetMetaData > m_xMetaData;
 
 void checkParameterIndex(sal_Int32 parameter);
 
-protected:
 void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, 
const Any& rValue) SAL_OVERRIDE;
 virtual ~OPreparedStatement();
 public:
diff --git a/mysqlc/source/mysqlc_resultset.hxx 
b/mysqlc/source/mysqlc_resultset.hxx
index 5ed4f8c9d0d2..a05cbb88cef6 100644
--- a/mysqlc/source/mysqlc_resultset.hxx
+++ b/mysqlc/source/mysqlc_resultset.hxx
@@ -63,12 +63,11 @@ namespace connectivity
 css::sdbc::XColumnLocate,
 css::lang::XServiceInfo> 
OResultSet_BASE;
 
-class OResultSet :  public  OBase_Mutex,
+class OResultSet final : public  OBase_Mutex,
 public  OResultSet_BASE,
 public  ::cppu::OPropertySetHelper,
 public  OPropertyArrayUsageHelper
 {
-protected:
 css::uno::WeakReferenceHelper  m_aStatement;
 css::uno::Reference< css::sdbc::XResultSetMetaData> m_xMetaData;
 

[Libreoffice-commits] core.git: mysqlc/source

2017-10-06 Thread Noel Grandin
 mysqlc/source/mysqlc_connection.cxx|6 +--
 mysqlc/source/mysqlc_connection.hxx|5 +--
 mysqlc/source/mysqlc_preparedstatement.cxx |   45 ++---
 mysqlc/source/mysqlc_statement.cxx |   34 +
 mysqlc/source/mysqlc_statement.hxx |5 +--
 5 files changed, 45 insertions(+), 50 deletions(-)

New commits:
commit 7af521827e62aec9a695dce944d350fae7625b19
Author: Noel Grandin 
Date:   Fri Oct 6 09:31:05 2017 +0200

use rtl::Reference in mysqlc

instead of manual ref-counting

Change-Id: I7b7c350613976463620a54757add6061cf383a4c
Reviewed-on: https://gerrit.libreoffice.org/43183
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/mysqlc/source/mysqlc_connection.cxx 
b/mysqlc/source/mysqlc_connection.cxx
index 1618bdcd85da..f44fca89e205 100644
--- a/mysqlc/source/mysqlc_connection.cxx
+++ b/mysqlc/source/mysqlc_connection.cxx
@@ -65,10 +65,9 @@ OConnection::OConnection(MysqlCDriver& _rDriver, sql::Driver 
* _cppDriver)
 :OMetaConnection_BASE(m_aMutex)
 ,OSubComponent(static_cast(&_rDriver), this)
 ,m_xMetaData(nullptr)
-,m_rDriver(_rDriver)
+,m_xDriver(&_rDriver)
 ,cppDriver(_cppDriver)
 {
-m_rDriver.acquire();
 }
 
 OConnection::~OConnection()
@@ -76,7 +75,6 @@ OConnection::~OConnection()
 if (!isClosed()) {
 close();
 }
-m_rDriver.release();
 }
 
 void SAL_CALL OConnection::release()
@@ -536,7 +534,7 @@ rtl::OUString OConnection::transFormPreparedStatement(const 
rtl::OUString& _sSQL
 Reference< XConnection> xCon = this;
 aArgs[0] <<= NamedValue(rtl::OUString("ActiveConnection"), 
makeAny(xCon));
 
-
m_xParameterSubstitution.set(m_rDriver.getFactory()->createInstanceWithArguments("org.openoffice.comp.helper.ParameterSubstitution",aArgs),UNO_QUERY);
+
m_xParameterSubstitution.set(m_xDriver->getFactory()->createInstanceWithArguments("org.openoffice.comp.helper.ParameterSubstitution",aArgs),UNO_QUERY);
 } catch(const Exception&) {}
 }
 if ( m_xParameterSubstitution.is() ) {
diff --git a/mysqlc/source/mysqlc_connection.hxx 
b/mysqlc/source/mysqlc_connection.hxx
index 5e62eff048d0..4ef6bb044a45 100644
--- a/mysqlc/source/mysqlc_connection.hxx
+++ b/mysqlc/source/mysqlc_connection.hxx
@@ -41,6 +41,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -104,7 +105,7 @@ namespace connectivity
 // of all the Statement objects
 // for this Connection
 
-MysqlCDriver&   m_rDriver;  // Pointer to the owning driver 
object
+rtl::Reference m_xDriver; // Pointer to the owning 
driver object
 sql::Driver*cppDriver;
 
 public:
@@ -185,7 +186,7 @@ namespace connectivity
 const ConnectionSettings& getConnectionSettings() const { return 
m_settings; }
 rtl::OUString transFormPreparedStatement(const rtl::OUString& 
_sSQL);
 
-const MysqlCDriver&  getDriver() const { return m_rDriver;}
+const MysqlCDriver&  getDriver() const { return 
*m_xDriver.get();}
 
 }; /* OConnection */
 // TODO: Not used.
diff --git a/mysqlc/source/mysqlc_preparedstatement.cxx 
b/mysqlc/source/mysqlc_preparedstatement.cxx
index 84d353ef5873..ec5b6f68bdb0 100644
--- a/mysqlc/source/mysqlc_preparedstatement.cxx
+++ b/mysqlc/source/mysqlc_preparedstatement.cxx
@@ -75,13 +75,12 @@ sal_Bool OPreparedStatement::supportsService(rtl::OUString 
const & ServiceName)
 OPreparedStatement::OPreparedStatement(OConnection* _pConnection, 
sql::PreparedStatement * _cppPrepStmt)
 :OCommonStatement(_pConnection, _cppPrepStmt)
 {
-m_pConnection = _pConnection;
-m_pConnection->acquire();
+m_xConnection = _pConnection;
 
 try {
 m_paramCount = static_cast(cppStatement)->getParameterMetaData()->getParameterCount();
 } catch (const sql::SQLException ) {
-mysqlc_sdbc_driver::translateAndThrow(e, *this, 
m_pConnection->getConnectionEncoding());
+mysqlc_sdbc_driver::translateAndThrow(e, *this, 
m_xConnection->getConnectionEncoding());
 }
 }
 
@@ -130,7 +129,7 @@ Reference< XResultSetMetaData > SAL_CALL 
OPreparedStatement::getMetaData()
 } catch (const sql::MethodNotImplementedException &) {
 
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OPreparedStatement::getMetaData",
 *this);
 } catch (const sql::SQLException ) {
-mysqlc_sdbc_driver::translateAndThrow(e, *this, 
m_pConnection->getConnectionEncoding());
+mysqlc_sdbc_driver::translateAndThrow(e, *this, 
m_xConnection->getConnectionEncoding());
 }
 return m_xMetaData;
 }
@@ -161,7 +160,7 @@ sal_Bool SAL_CALL OPreparedStatement::execute()
 

[Libreoffice-commits] core.git: mysqlc/source

2017-02-03 Thread Noel Grandin
 mysqlc/source/mysqlc_databasemetadata.cxx |   28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

New commits:
commit 29337650a379d1bcfe28bc41182254935f77cacc
Author: Noel Grandin 
Date:   Fri Feb 3 11:10:24 2017 +0200

boost::scoped_ptr -> std::unique_ptr in mysqlc

Change-Id: I4c8d25ed451ab03d2b5d0e9977ab74fd2ea1bb04
Reviewed-on: https://gerrit.libreoffice.org/33870
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/mysqlc/source/mysqlc_databasemetadata.cxx 
b/mysqlc/source/mysqlc_databasemetadata.cxx
index b5bb7dd..b64c87c 100644
--- a/mysqlc/source/mysqlc_databasemetadata.cxx
+++ b/mysqlc/source/mysqlc_databasemetadata.cxx
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 #include "mysqlc_databasemetadata.hxx"
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -946,7 +946,7 @@ Reference< XResultSet > SAL_CALL 
ODatabaseMetaData::getCatalogs()
 
 try {
 rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding();
-boost::scoped_ptr< sql::ResultSet> rset( meta->getCatalogs());
+std::unique_ptr< sql::ResultSet> rset( meta->getCatalogs());
 sql::ResultSetMetaData * rs_meta = rset->getMetaData();
 sal_uInt32 columns = rs_meta->getColumnCount();
 while (rset->next()) {
@@ -975,7 +975,7 @@ Reference< XResultSet > SAL_CALL 
ODatabaseMetaData::getSchemas()
 
 try {
 rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding();
-boost::scoped_ptr< sql::ResultSet> rset( meta->getSchemas());
+std::unique_ptr< sql::ResultSet> rset( meta->getSchemas());
 sql::ResultSetMetaData * rs_meta = rset->getMetaData();
 sal_uInt32 columns = rs_meta->getColumnCount();
 while (rset->next()) {
@@ -1019,7 +1019,7 @@ Reference< XResultSet > SAL_CALL 
ODatabaseMetaData::getColumnPrivileges(
 cNamePattern(rtl::OUStringToOString(columnNamePattern, 
m_rConnection.getConnectionEncoding()).getStr());
 try {
 rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding();
-boost::scoped_ptr< sql::ResultSet> rset( 
meta->getColumnPrivileges(cat, sch, tab, cNamePattern.compare("")? 
cNamePattern:wild));
+std::unique_ptr< sql::ResultSet> rset( meta->getColumnPrivileges(cat, 
sch, tab, cNamePattern.compare("")? cNamePattern:wild));
 
 sql::ResultSetMetaData * rs_meta = rset->getMetaData();
 sal_uInt32 columns = rs_meta->getColumnCount();
@@ -1056,7 +1056,7 @@ Reference< XResultSet > SAL_CALL 
ODatabaseMetaData::getColumns(
 cNamePattern(rtl::OUStringToOString(columnNamePattern, 
m_rConnection.getConnectionEncoding()).getStr());
 
 try {
-boost::scoped_ptr< sql::ResultSet> rset( meta->getColumns(cat,
+std::unique_ptr< sql::ResultSet> rset( meta->getColumns(cat,
 sPattern.compare("")? 
sPattern:wild,
 tNamePattern.compare("")? 
tNamePattern:wild,
 cNamePattern.compare("")? 
cNamePattern:wild));
@@ -1109,7 +1109,7 @@ Reference< XResultSet > SAL_CALL 
ODatabaseMetaData::getTables(
 }
 
 try {
-boost::scoped_ptr< sql::ResultSet> rset( meta->getTables(cat,
+std::unique_ptr< sql::ResultSet> rset( meta->getTables(cat,
sPattern.compare("")? 
sPattern:wild,
tNamePattern.compare("")? 
tNamePattern:wild,
tabTypes));
@@ -1167,7 +1167,7 @@ Reference< XResultSet > SAL_CALL 
ODatabaseMetaData::getProcedures(
 
 
 try {
-boost::scoped_ptr< sql::ResultSet> rset( meta->getProcedures(cat,
+std::unique_ptr< sql::ResultSet> rset( meta->getProcedures(cat,
sPattern.compare("")? 
sPattern:wild,

procNamePattern.compare("")? procNamePattern:wild));
 
@@ -1217,7 +1217,7 @@ Reference< XResultSet > SAL_CALL 
ODatabaseMetaData::getExportedKeys(
 
 try {
 rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding();
-boost::scoped_ptr< sql::ResultSet> rset( meta->getExportedKeys(cat, 
sch, tab));
+std::unique_ptr< sql::ResultSet> rset( meta->getExportedKeys(cat, sch, 
tab));
 sql::ResultSetMetaData * rs_meta = rset->getMetaData();
 sal_uInt32 columns = rs_meta->getColumnCount();
 while (rset->next()) {
@@ -1253,7 +1253,7 @@ Reference< XResultSet > SAL_CALL 
ODatabaseMetaData::getImportedKeys(
 
 try {
 rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding();
-boost::scoped_ptr< sql::ResultSet> rset( meta->getImportedKeys(cat, 
sch, tab));
+

[Libreoffice-commits] core.git: mysqlc/source

2017-01-31 Thread Stephan Bergmann
 mysqlc/source/mysqlc_preparedstatement.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit ccb1b1251cb7289f554df4cabe08b9ee4524a592
Author: Stephan Bergmann 
Date:   Tue Jan 31 10:55:16 2017 +0100

Work around GCC 7 -Werror=implicit-fallthrough=

This is in !LIBO_INTERNAL_ONLY code, so cannot use SAL_FALLTHROUGH.  And 
even on
current  master, BOOST_FALLTHROUGH does 
not
yet support [[fallthrough]] for GCC 7.

Change-Id: I5306c3949b13c517fe8ef643cf98c2021147617e

diff --git a/mysqlc/source/mysqlc_preparedstatement.cxx 
b/mysqlc/source/mysqlc_preparedstatement.cxx
index eff5040..39edb3e 100644
--- a/mysqlc/source/mysqlc_preparedstatement.cxx
+++ b/mysqlc/source/mysqlc_preparedstatement.cxx
@@ -490,7 +490,11 @@ void SAL_CALL 
OPreparedStatement::setObjectWithInfo(sal_Int32 _parameterIndex, c
 setDouble( _parameterIndex, nValue );
 break;
 }
+#if defined __GNUC__ && __GNUC__ >= 7
+[[fallthrough]];
+#else
 BOOST_FALLTHROUGH;
+#endif
 }
 
 case DataType::CHAR:
@@ -517,7 +521,11 @@ void SAL_CALL 
OPreparedStatement::setObjectWithInfo(sal_Int32 _parameterIndex, c
 setFloat(_parameterIndex,nValue);
 break;
 }
+#if defined __GNUC__ && __GNUC__ >= 7
+[[fallthrough]];
+#else
 BOOST_FALLTHROUGH;
+#endif
 }
 
 case DataType::DOUBLE:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: mysqlc/source

2017-01-31 Thread Stephan Bergmann
 mysqlc/source/mysqlc_general.hxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit f6698138359e1f571aa6a464a40fb3bc85412d3a
Author: Stephan Bergmann 
Date:   Tue Jan 31 10:41:35 2017 +0100

Silence GCC 7 warnings in cppconn/exception.h

Change-Id: Ia924473d3dba11babee23f4137c645b9f8d86a8b

diff --git a/mysqlc/source/mysqlc_general.hxx b/mysqlc/source/mysqlc_general.hxx
index 1f60a19..5d0b828 100644
--- a/mysqlc/source/mysqlc_general.hxx
+++ b/mysqlc/source/mysqlc_general.hxx
@@ -25,7 +25,14 @@
 #include 
 #include 
 
+#if defined __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated"
+#endif
 #include 
+#if defined __GNUC__
+#pragma GCC diagnostic pop
+#endif
 
 namespace mysqlc_sdbc_driver
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: mysqlc/source

2016-07-15 Thread Stephan Bergmann
 mysqlc/source/mysqlc_preparedstatement.cxx |   18 --
 mysqlc/source/mysqlc_preparedstatement.hxx |9 +++--
 2 files changed, 3 insertions(+), 24 deletions(-)

New commits:
commit 8be8152bcb7327d046049dee640ca438deaa4dad
Author: Stephan Bergmann 
Date:   Fri Jul 15 12:29:52 2016 +0200

loplugin:unnecessaryoverride in mysqlc

Change-Id: I7c8ecc8f675abf4495c991bdb680e31b59421e26

diff --git a/mysqlc/source/mysqlc_preparedstatement.cxx 
b/mysqlc/source/mysqlc_preparedstatement.cxx
index 5bd8a7e..df384d8 100644
--- a/mysqlc/source/mysqlc_preparedstatement.cxx
+++ b/mysqlc/source/mysqlc_preparedstatement.cxx
@@ -229,24 +229,6 @@ Reference< XConnection > SAL_CALL 
OPreparedStatement::getConnection()
 return m_pConnection;
 }
 
-Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery(const 
rtl::OUString& sql)
-throw(SQLException, RuntimeException, std::exception)
-{
-return OCommonStatement::executeQuery( sql );
-}
-
-sal_Int32 SAL_CALL OPreparedStatement::executeUpdate(const rtl::OUString& sql)
-throw(SQLException, RuntimeException, std::exception)
-{
-return OCommonStatement::executeUpdate( sql );
-}
-
-sal_Bool SAL_CALL OPreparedStatement::execute( const rtl::OUString& sql )
-throw(SQLException, RuntimeException, std::exception)
-{
-return OCommonStatement::execute( sql );
-}
-
 Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery()
 throw(SQLException, RuntimeException, std::exception)
 {
diff --git a/mysqlc/source/mysqlc_preparedstatement.hxx 
b/mysqlc/source/mysqlc_preparedstatement.hxx
index d5c657d..511e89e 100644
--- a/mysqlc/source/mysqlc_preparedstatement.hxx
+++ b/mysqlc/source/mysqlc_preparedstatement.hxx
@@ -90,12 +90,9 @@ namespace connectivity
 Reference< css::sdbc::XConnection > SAL_CALL getConnection() 
throw(SQLException, RuntimeException, std::exception) SAL_OVERRIDE;
 
 // XStatement
-css::uno::Reference< css::sdbc::XResultSet > SAL_CALL 
executeQuery(const rtl::OUString& sql)
-throw(SQLException, 
RuntimeException, std::exception) SAL_OVERRIDE;
-sal_Int32 SAL_CALL executeUpdate(const rtl::OUString& sql)
-throw(SQLException, 
RuntimeException, std::exception) SAL_OVERRIDE;
-sal_Bool SAL_CALL execute( const rtl::OUString& sql )
-throw(SQLException, 
RuntimeException, std::exception) SAL_OVERRIDE;
+using OCommonStatement::executeQuery;
+using OCommonStatement::executeUpdate;
+using OCommonStatement::execute;
 
 // XParameters
 void SAL_CALL setNull(sal_Int32 parameter, sal_Int32 sqlType)  
 throw(SQLException, RuntimeException, std::exception) SAL_OVERRIDE;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: mysqlc/source

2016-06-09 Thread krishna keshav
 mysqlc/source/mysqlc_resultsetmetadata.hxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2d2a33934ecb952433a635ce5dab76cb2837b8a0
Author: krishna keshav 
Date:   Thu Jun 9 00:42:44 2016 +0530

tdf#88206 Change use of cppu::WeakImplHelper*

removed 

Change-Id: I2888e42eec480f0940c3e4f9bcc000c150d1161b
Reviewed-on: https://gerrit.libreoffice.org/26076
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/mysqlc/source/mysqlc_resultsetmetadata.hxx 
b/mysqlc/source/mysqlc_resultsetmetadata.hxx
index 65ea730..494c806 100644
--- a/mysqlc/source/mysqlc_resultsetmetadata.hxx
+++ b/mysqlc/source/mysqlc_resultsetmetadata.hxx
@@ -24,7 +24,7 @@
 
 #include 
 
-#include 
+#include 
 #include 
 
 namespace connectivity
@@ -36,7 +36,7 @@ namespace connectivity
 
 // Class: ResultSetMetaData
 
-typedef ::cppu::WeakImplHelper1< css::sdbc::XResultSetMetaData> 
OResultSetMetaData_BASE;
+typedef ::cppu::WeakImplHelper< css::sdbc::XResultSetMetaData> 
OResultSetMetaData_BASE;
 
 class OResultSetMetaData : public OResultSetMetaData_BASE
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: mysqlc/source

2016-05-30 Thread Stephan Bergmann
 mysqlc/source/mysqlc_preparedstatement.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 336b62080bd06000e5ac3c7687b34bac2afc79a9
Author: Stephan Bergmann 
Date:   Mon May 30 13:33:37 2016 +0200

Missing include

Change-Id: Id61e2de27ec307fa7773d3f0d5a0810005f1c364

diff --git a/mysqlc/source/mysqlc_preparedstatement.cxx 
b/mysqlc/source/mysqlc_preparedstatement.cxx
index 8122424..5bd8a7e 100644
--- a/mysqlc/source/mysqlc_preparedstatement.cxx
+++ b/mysqlc/source/mysqlc_preparedstatement.cxx
@@ -22,9 +22,9 @@
 #include "mysqlc_propertyids.hxx"
 #include "mysqlc_resultsetmetadata.hxx"
 
+#include 
 #include 
 #include 
-
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: mysqlc/source

2016-04-12 Thread Stephan Bergmann
 mysqlc/source/mysqlc_connection.hxx|4 ++--
 mysqlc/source/mysqlc_databasemetadata.hxx  |4 ++--
 mysqlc/source/mysqlc_driver.hxx|4 ++--
 mysqlc/source/mysqlc_preparedstatement.hxx |2 +-
 mysqlc/source/mysqlc_resultset.hxx |4 ++--
 mysqlc/source/mysqlc_resultsetmetadata.hxx |4 ++--
 mysqlc/source/mysqlc_statement.hxx |4 ++--
 7 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 553f7e515d9183d50221bbda9e8e6a023e4d6c57
Author: Stephan Bergmann 
Date:   Tue Apr 12 09:29:59 2016 +0200

Revert "tdf#88206: use variadic variants for cppu helper"

This reverts commit cf1ecad26d22e3dc5f556f976bdc49a31bfa5630. 
Library_mysqlc is
external_code, so cannot use these LIBO_INTERNAL_ONLY features.

diff --git a/mysqlc/source/mysqlc_connection.hxx 
b/mysqlc/source/mysqlc_connection.hxx
index 8d83af7..50ac3c5 100644
--- a/mysqlc/source/mysqlc_connection.hxx
+++ b/mysqlc/source/mysqlc_connection.hxx
@@ -37,7 +37,7 @@
 
 #include 
 
-#include 
+#include 
 #include 
 #include 
 
@@ -61,7 +61,7 @@ namespace connectivity
 using ::com::sun::star::uno::RuntimeException;
 typedef css::uno::Reference< css::container::XNameAccess > 
my_XNameAccessRef;
 
-typedef ::cppu::WeakComponentImplHelper<   css::sdbc::XConnection,
+typedef ::cppu::WeakComponentImplHelper3<   css::sdbc::XConnection,
 
css::sdbc::XWarningsSupplier,
 css::lang::XServiceInfo
 > OMetaConnection_BASE;
diff --git a/mysqlc/source/mysqlc_databasemetadata.hxx 
b/mysqlc/source/mysqlc_databasemetadata.hxx
index bf2bf2e..531ba50 100644
--- a/mysqlc/source/mysqlc_databasemetadata.hxx
+++ b/mysqlc/source/mysqlc_databasemetadata.hxx
@@ -23,7 +23,7 @@
 #include "mysqlc_connection.hxx"
 
 #include 
-#include 
+#include 
 
 #include 
 
@@ -37,7 +37,7 @@ namespace connectivity
 // Class: ODatabaseMetaData
 
 
-typedef ::cppu::WeakImplHelper< css::sdbc::XDatabaseMetaData> 
ODatabaseMetaData_BASE;
+typedef ::cppu::WeakImplHelper1< css::sdbc::XDatabaseMetaData> 
ODatabaseMetaData_BASE;
 
 class ODatabaseMetaData : public ODatabaseMetaData_BASE
 {
diff --git a/mysqlc/source/mysqlc_driver.hxx b/mysqlc/source/mysqlc_driver.hxx
index d0c322c..0d1f3a3 100644
--- a/mysqlc/source/mysqlc_driver.hxx
+++ b/mysqlc/source/mysqlc_driver.hxx
@@ -35,7 +35,7 @@
 #include 
 #include 
 
-#include 
+#include 
 #include 
 #include 
 
@@ -50,7 +50,7 @@ namespace connectivity
 using ::com::sun::star::uno::Sequence;
 Reference< css::uno::XInterface > SAL_CALL 
MysqlCDriver_CreateInstance(const Reference< css::lang::XMultiServiceFactory >& 
_rxFactory) throw(Exception);
 
-typedef ::cppu::WeakComponentImplHelper<   css::sdbc::XDriver,
+typedef ::cppu::WeakComponentImplHelper2<   css::sdbc::XDriver,
 css::lang::XServiceInfo > 
ODriver_BASE;
 
 typedef void* (SAL_CALL * 
OMysqlCConnection_CreateInstanceFunction)(void* _pDriver);
diff --git a/mysqlc/source/mysqlc_preparedstatement.hxx 
b/mysqlc/source/mysqlc_preparedstatement.hxx
index 4a99290..d5c657d 100644
--- a/mysqlc/source/mysqlc_preparedstatement.hxx
+++ b/mysqlc/source/mysqlc_preparedstatement.hxx
@@ -41,7 +41,7 @@ namespace connectivity
 using ::com::sun::star::uno::RuntimeException;
 using ::com::sun::star::sdbc::XResultSetMetaData;
 
-typedef ::cppu::ImplHelper

[Libreoffice-commits] core.git: mysqlc/source

2016-04-11 Thread Stefan Weiberg
 mysqlc/source/mysqlc_connection.hxx|4 ++--
 mysqlc/source/mysqlc_databasemetadata.hxx  |4 ++--
 mysqlc/source/mysqlc_driver.hxx|4 ++--
 mysqlc/source/mysqlc_preparedstatement.hxx |2 +-
 mysqlc/source/mysqlc_resultset.hxx |4 ++--
 mysqlc/source/mysqlc_resultsetmetadata.hxx |4 ++--
 mysqlc/source/mysqlc_statement.hxx |4 ++--
 7 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit cf1ecad26d22e3dc5f556f976bdc49a31bfa5630
Author: Stefan Weiberg 
Date:   Mon Apr 11 14:47:39 2016 +

tdf#88206: use variadic variants for cppu helper

Change-Id: I58a00f721cbb37f97fdbc599d57c26b1e89f4c73
Reviewed-on: https://gerrit.libreoffice.org/23998
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/mysqlc/source/mysqlc_connection.hxx 
b/mysqlc/source/mysqlc_connection.hxx
index 50ac3c5..8d83af7 100644
--- a/mysqlc/source/mysqlc_connection.hxx
+++ b/mysqlc/source/mysqlc_connection.hxx
@@ -37,7 +37,7 @@
 
 #include 
 
-#include 
+#include 
 #include 
 #include 
 
@@ -61,7 +61,7 @@ namespace connectivity
 using ::com::sun::star::uno::RuntimeException;
 typedef css::uno::Reference< css::container::XNameAccess > 
my_XNameAccessRef;
 
-typedef ::cppu::WeakComponentImplHelper3<   css::sdbc::XConnection,
+typedef ::cppu::WeakComponentImplHelper<   css::sdbc::XConnection,
 
css::sdbc::XWarningsSupplier,
 css::lang::XServiceInfo
 > OMetaConnection_BASE;
diff --git a/mysqlc/source/mysqlc_databasemetadata.hxx 
b/mysqlc/source/mysqlc_databasemetadata.hxx
index 531ba50..bf2bf2e 100644
--- a/mysqlc/source/mysqlc_databasemetadata.hxx
+++ b/mysqlc/source/mysqlc_databasemetadata.hxx
@@ -23,7 +23,7 @@
 #include "mysqlc_connection.hxx"
 
 #include 
-#include 
+#include 
 
 #include 
 
@@ -37,7 +37,7 @@ namespace connectivity
 // Class: ODatabaseMetaData
 
 
-typedef ::cppu::WeakImplHelper1< css::sdbc::XDatabaseMetaData> 
ODatabaseMetaData_BASE;
+typedef ::cppu::WeakImplHelper< css::sdbc::XDatabaseMetaData> 
ODatabaseMetaData_BASE;
 
 class ODatabaseMetaData : public ODatabaseMetaData_BASE
 {
diff --git a/mysqlc/source/mysqlc_driver.hxx b/mysqlc/source/mysqlc_driver.hxx
index 0d1f3a3..d0c322c 100644
--- a/mysqlc/source/mysqlc_driver.hxx
+++ b/mysqlc/source/mysqlc_driver.hxx
@@ -35,7 +35,7 @@
 #include 
 #include 
 
-#include 
+#include 
 #include 
 #include 
 
@@ -50,7 +50,7 @@ namespace connectivity
 using ::com::sun::star::uno::Sequence;
 Reference< css::uno::XInterface > SAL_CALL 
MysqlCDriver_CreateInstance(const Reference< css::lang::XMultiServiceFactory >& 
_rxFactory) throw(Exception);
 
-typedef ::cppu::WeakComponentImplHelper2<   css::sdbc::XDriver,
+typedef ::cppu::WeakComponentImplHelper<   css::sdbc::XDriver,
 css::lang::XServiceInfo > 
ODriver_BASE;
 
 typedef void* (SAL_CALL * 
OMysqlCConnection_CreateInstanceFunction)(void* _pDriver);
diff --git a/mysqlc/source/mysqlc_preparedstatement.hxx 
b/mysqlc/source/mysqlc_preparedstatement.hxx
index d5c657d..4a99290 100644
--- a/mysqlc/source/mysqlc_preparedstatement.hxx
+++ b/mysqlc/source/mysqlc_preparedstatement.hxx
@@ -41,7 +41,7 @@ namespace connectivity
 using ::com::sun::star::uno::RuntimeException;
 using ::com::sun::star::sdbc::XResultSetMetaData;
 
-typedef ::cppu::ImplHelper5

[Libreoffice-commits] core.git: mysqlc/source

2016-03-02 Thread Noel Grandin
 mysqlc/source/mysqlc_general.cxx |8 
 mysqlc/source/mysqlc_general.hxx |6 ++
 2 files changed, 6 insertions(+), 8 deletions(-)

New commits:
commit d298cfd9864d5a742f966fa6584b34f3b72cd6a0
Author: Noel Grandin 
Date:   Thu Mar 3 08:13:14 2016 +0200

loplugin:unuseddefaultparams in mysqlc

Change-Id: I83e27ed242b6ec1fbd19e473a4d8c0f4588e6f86

diff --git a/mysqlc/source/mysqlc_general.cxx b/mysqlc/source/mysqlc_general.cxx
index 57683f6..301caa2 100644
--- a/mysqlc/source/mysqlc_general.cxx
+++ b/mysqlc/source/mysqlc_general.cxx
@@ -32,7 +32,7 @@ using com::sun::star::uno::Any;
 namespace mysqlc_sdbc_driver
 {
 
-void throwFeatureNotImplementedException( const sal_Char* _pAsciiFeatureName, 
const Reference< XInterface >& _rxContext, const Any* _pNextException )
+void throwFeatureNotImplementedException( const sal_Char* _pAsciiFeatureName, 
const Reference< XInterface >& _rxContext )
 throw (SQLException)
 {
 const rtl::OUString sMessage = rtl::OUString::createFromAscii( 
_pAsciiFeatureName ) + ": feature not implemented.";
@@ -41,11 +41,11 @@ void throwFeatureNotImplementedException( const sal_Char* 
_pAsciiFeatureName, co
 _rxContext,
 rtl::OUString("HYC00"),
 0,
-_pNextException ? *_pNextException : Any()
+Any()
 );
 }
 
-void throwInvalidArgumentException( const sal_Char* _pAsciiFeatureName, const 
Reference< XInterface >& _rxContext, const Any* _pNextException )
+void throwInvalidArgumentException( const sal_Char* _pAsciiFeatureName, const 
Reference< XInterface >& _rxContext )
 throw (SQLException)
 {
 const rtl::OUString sMessage = rtl::OUString::createFromAscii( 
_pAsciiFeatureName ) + ": invalid arguments.";
@@ -54,7 +54,7 @@ void throwInvalidArgumentException( const sal_Char* 
_pAsciiFeatureName, const Re
 _rxContext,
 rtl::OUString("HYC00"),
 0,
-_pNextException ? *_pNextException : Any()
+Any()
 );
 }
 
diff --git a/mysqlc/source/mysqlc_general.hxx b/mysqlc/source/mysqlc_general.hxx
index d0a9c27..9e4417d 100644
--- a/mysqlc/source/mysqlc_general.hxx
+++ b/mysqlc/source/mysqlc_general.hxx
@@ -33,15 +33,13 @@ namespace mysqlc_sdbc_driver
 
 void throwFeatureNotImplementedException(
 const sal_Char* _pAsciiFeatureName,
-const css::uno::Reference< css::uno::XInterface >& _rxContext,
-const css::uno::Any* _pNextException = nullptr
+const css::uno::Reference< css::uno::XInterface >& _rxContext
 )
 throw (css::sdbc::SQLException);
 
 void throwInvalidArgumentException(
 const sal_Char* _pAsciiFeatureName,
-const css::uno::Reference< css::uno::XInterface >& _rxContext,
-const css::uno::Any* _pNextException = nullptr
+const css::uno::Reference< css::uno::XInterface >& _rxContext
 )
 throw (css::sdbc::SQLException);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: mysqlc/source onlineupdate/source sal/osl sal/workben shell/source ucb/source vcl/ios

2016-01-08 Thread Caolán McNamara
 mysqlc/source/mysqlc_driver.hxx |2 -
 onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.h |2 -
 sal/osl/w32/path_helper.hxx |2 -
 sal/workben/clipboardwben/testcopy/XTDataObject.hxx |4 +--
 shell/source/backends/wininetbe/wininetbackend.cxx  |2 -
 shell/source/win32/SysShExec.hxx|2 -
 shell/source/win32/ooofilereader/autostyletag.hxx   |   10 

 shell/source/win32/ooofilereader/simpletag.hxx  |2 -
 shell/source/win32/shlxthandler/classfactory.hxx|2 -
 shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx |2 -
 shell/source/win32/zipfile/zipexcptn.hxx|   12 
+-
 shell/source/win32/zipfile/zipfile.cxx  |2 -
 ucb/source/core/ucbstore.cxx|2 -
 vcl/ios/iosinst.cxx |5 +++-
 14 files changed, 27 insertions(+), 24 deletions(-)

New commits:
commit 0aa5414015813eda46dbfd7c3bcf259485ac1968
Author: Caolán McNamara 
Date:   Fri Jan 8 09:56:18 2016 +

cppcheck: noExplicitConstructor

Change-Id: If1ddb112c85f127295eb55566360b066e7173ba2
Reviewed-on: https://gerrit.libreoffice.org/21245
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/mysqlc/source/mysqlc_driver.hxx b/mysqlc/source/mysqlc_driver.hxx
index 85f82d2..0d1f3a3 100644
--- a/mysqlc/source/mysqlc_driver.hxx
+++ b/mysqlc/source/mysqlc_driver.hxx
@@ -76,7 +76,7 @@ namespace connectivity
 
 public:
 
-MysqlCDriver(const Reference< css::lang::XMultiServiceFactory >& 
_rxFactory);
+explicit MysqlCDriver(const Reference< 
css::lang::XMultiServiceFactory >& _rxFactory);
 
 // OComponentHelper
 void SAL_CALL disposing() SAL_OVERRIDE;
diff --git 
a/onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.h 
b/onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.h
index a54c7fd..8ece940 100644
--- a/onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.h
+++ b/onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.h
@@ -123,7 +123,7 @@ private:
 #ifdef WNT
 struct VersionW
 {
-  VersionW(const wchar_t* aVersionStringW)
+  explicit VersionW(const wchar_t* aVersionStringW)
   {
 versionContentW =
   reinterpret_cast(wcsdup(aVersionStringW));
diff --git a/sal/osl/w32/path_helper.hxx b/sal/osl/w32/path_helper.hxx
index 6f75fca..ee77791 100644
--- a/sal/osl/w32/path_helper.hxx
+++ b/sal/osl/w32/path_helper.hxx
@@ -74,7 +74,7 @@ class LongPathBuffer
 LongPathBuffer& operator=( const LongPathBuffer& );
 
 public:
-LongPathBuffer( sal_uInt32 nCharNum )
+explicit LongPathBuffer( sal_uInt32 nCharNum )
 : m_pBuffer( reinterpret_cast( rtl_allocateMemory( nCharNum * sizeof( 
T ) ) ) )
 , m_nCharNum( nCharNum )
 {
diff --git a/sal/workben/clipboardwben/testcopy/XTDataObject.hxx 
b/sal/workben/clipboardwben/testcopy/XTDataObject.hxx
index f6eb975..3b71d78 100644
--- a/sal/workben/clipboardwben/testcopy/XTDataObject.hxx
+++ b/sal/workben/clipboardwben/testcopy/XTDataObject.hxx
@@ -35,7 +35,7 @@ class EnumFormatEtc;
 class CXTDataObject : public IDataObject
 {
 public:
-CXTDataObject( LONG nRefCntInitVal = 0);
+explicit CXTDataObject(LONG nRefCntInitVal = 0);
 ~CXTDataObject( );
 
 // ole interface implementation
@@ -80,7 +80,7 @@ private:
 class CEnumFormatEtc : public IEnumFORMATETC
 {
 public:
-CEnumFormatEtc( LPUNKNOWN pUnkDataObj );
+explicit CEnumFormatEtc(LPUNKNOWN pUnkDataObj);
 ~CEnumFormatEtc( );
 
 // IUnknown
diff --git a/shell/source/backends/wininetbe/wininetbackend.cxx 
b/shell/source/backends/wininetbe/wininetbackend.cxx
index e08fc29..1069b64 100644
--- a/shell/source/backends/wininetbe/wininetbackend.cxx
+++ b/shell/source/backends/wininetbe/wininetbackend.cxx
@@ -43,7 +43,7 @@ namespace {
 struct Library {
 HMODULE module;
 
-Library(HMODULE theModule): module(theModule) {}
+explicit Library(HMODULE theModule): module(theModule) {}
 
 ~Library() { if (module) FreeLibrary(module); }
 };
diff --git a/shell/source/win32/SysShExec.hxx b/shell/source/win32/SysShExec.hxx
index 05c78fd..0414139 100644
--- a/shell/source/win32/SysShExec.hxx
+++ b/shell/source/win32/SysShExec.hxx
@@ -46,7 +46,7 @@ class CSysShExec :
 css::uno::Reference< css::uno::XComponentContext > m_xContext;
 
 public:
-CSysShExec(const css::uno::Reference< css::uno::XComponentContext >& 
xContext);
+explicit CSysShExec(const css::uno::Reference< css::uno::XComponentContext 
>& xContext);
 
 
 // 

[Libreoffice-commits] core.git: mysqlc/source

2015-11-15 Thread Noel Grandin
 mysqlc/source/mysqlc_connection.cxx|3 ++-
 mysqlc/source/mysqlc_driver.cxx|3 ++-
 mysqlc/source/mysqlc_preparedstatement.cxx |3 ++-
 mysqlc/source/mysqlc_statement.cxx |3 ++-
 4 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 773a07a94ebc9f578b5bb6a90ddd1974d1577351
Author: Noel Grandin 
Date:   Mon Nov 16 08:34:54 2015 +0200

fix mysqlc build

after my commit 96c26b0d9d10fa9bac3695222980d7145f0342d7
"use initialiser for Sequence"

the mysqlc module is compiled as external code, so it
cannot see the initialiser syntax constructor for Sequence

Change-Id: I072e6271ec33637e28dd8225724296e90967329d

diff --git a/mysqlc/source/mysqlc_connection.cxx 
b/mysqlc/source/mysqlc_connection.cxx
index 44cee42..5c3fd7c 100644
--- a/mysqlc/source/mysqlc_connection.cxx
+++ b/mysqlc/source/mysqlc_connection.cxx
@@ -219,7 +219,8 @@ rtl::OUString OConnection::getImplementationName() throw 
(css::uno::RuntimeExcep
 css::uno::Sequence OConnection::getSupportedServiceNames()
 throw (css::uno::RuntimeException, std::exception)
 {
-css::uno::Sequence s { "com.sun.star.sdbc.Connection" };
+css::uno::Sequence s(1);
+s[0] = "com.sun.star.sdbc.Connection";
 return s;
 }
 
diff --git a/mysqlc/source/mysqlc_driver.cxx b/mysqlc/source/mysqlc_driver.cxx
index ce2c363..3a31685 100644
--- a/mysqlc/source/mysqlc_driver.cxx
+++ b/mysqlc/source/mysqlc_driver.cxx
@@ -85,7 +85,8 @@ Sequence< rtl::OUString > 
MysqlCDriver::getSupportedServiceNames_Static()
 OSL_TRACE("MysqlCDriver::getSupportedServiceNames_Static");
 // which service is supported
 // for more information @see com.sun.star.sdbc.Driver
-Sequence aSNS { "com.sun.star.sdbc.Driver" };
+Sequence< rtl::OUString > aSNS(1);
+aSNS[0] = "com.sun.star.sdbc.Driver";
 return aSNS;
 }
 
diff --git a/mysqlc/source/mysqlc_preparedstatement.cxx 
b/mysqlc/source/mysqlc_preparedstatement.cxx
index cfc3042..96d756f 100644
--- a/mysqlc/source/mysqlc_preparedstatement.cxx
+++ b/mysqlc/source/mysqlc_preparedstatement.cxx
@@ -66,7 +66,8 @@ rtl::OUString OPreparedStatement::getImplementationName()
 css::uno::Sequence 
OPreparedStatement::getSupportedServiceNames()
 throw (css::uno::RuntimeException, std::exception)
 {
-css::uno::Sequence s { "com.sun.star.sdbc.PreparedStatement" };
+css::uno::Sequence s(1);
+s[0] = "com.sun.star.sdbc.PreparedStatement";
 return s;
 }
 
diff --git a/mysqlc/source/mysqlc_statement.cxx 
b/mysqlc/source/mysqlc_statement.cxx
index d9e58b0..859f7a9 100644
--- a/mysqlc/source/mysqlc_statement.cxx
+++ b/mysqlc/source/mysqlc_statement.cxx
@@ -392,7 +392,8 @@ rtl::OUString OStatement::getImplementationName() throw 
(css::uno::RuntimeExcept
 css::uno::Sequence OStatement::getSupportedServiceNames()
 throw (css::uno::RuntimeException, std::exception)
 {
-css::uno::Sequence s { "com.sun.star.sdbc.Statement" };
+css::uno::Sequence s(1);
+s[0] = "com.sun.star.sdbc.Statement";
 return s;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: mysqlc/source

2015-11-05 Thread Michael Stahl
 mysqlc/source/mysqlc_driver.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 8e2852428dd67cea2f09955f175518cd3563498f
Author: Michael Stahl 
Date:   Wed Nov 4 16:29:48 2015 +0100

mysqlc: -Werror=unused-function

Change-Id: I8b1f4b7c78a10ce604a63aff47d2df2d1d10dc26
Reviewed-on: https://gerrit.libreoffice.org/19800
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/mysqlc/source/mysqlc_driver.cxx b/mysqlc/source/mysqlc_driver.cxx
index ed43d27..399d622 100644
--- a/mysqlc/source/mysqlc_driver.cxx
+++ b/mysqlc/source/mysqlc_driver.cxx
@@ -110,7 +110,9 @@ Sequence< rtl::OUString > SAL_CALL 
MysqlCDriver::getSupportedServiceNames()
 return getSupportedServiceNames_Static();
 }
 
+#ifndef SYSTEM_MYSQL_CPPCONN
 extern "C" { static void SAL_CALL thisModule() {} }
+#endif
 
 void MysqlCDriver::impl_initCppConn_lck_throw()
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: mysqlc/source

2015-08-24 Thread Stephan Bergmann
 mysqlc/source/mysqlc_connection.hxx|4 ++--
 mysqlc/source/mysqlc_databasemetadata.hxx  |4 ++--
 mysqlc/source/mysqlc_driver.hxx|4 ++--
 mysqlc/source/mysqlc_resultset.hxx |4 ++--
 mysqlc/source/mysqlc_resultsetmetadata.hxx |4 ++--
 mysqlc/source/mysqlc_statement.hxx |4 ++--
 6 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 112286d2ef68ffb697ca3ce48fc66197ce90c2f0
Author: Stephan Bergmann sberg...@redhat.com
Date:   Mon Aug 24 08:28:57 2015 +0200

Revert mysqlc: tdf#88206 replace cppu::WeakImplHelper* etc.

This reverts commit 7fa5f876fddfd4baeff01d74d26cbf1dc4607d18,
which uses LIBO_INTERNAL_ONLY features in external code.

diff --git a/mysqlc/source/mysqlc_connection.hxx 
b/mysqlc/source/mysqlc_connection.hxx
index 2700c67..aeb9686 100644
--- a/mysqlc/source/mysqlc_connection.hxx
+++ b/mysqlc/source/mysqlc_connection.hxx
@@ -38,7 +38,7 @@
 
 #include cppconn/driver.h
 
-#include cppuhelper/compbase.hxx
+#include cppuhelper/compbase3.hxx
 #include cppuhelper/weakref.hxx
 #include rtl/string.hxx
 
@@ -65,7 +65,7 @@ namespace connectivity
 typedef ::com::sun::star::uno::Reference 
::com::sun::star::container::XNameAccess  my_XNameAccessRef;
 typedef ::com::sun::star::uno::Reference 
::com::sun::star::sdbc::XDatabaseMetaData  my_XDatabaseMetaDataRef;
 
-typedef ::cppu::WeakComponentImplHelper   
::com::sun::star::sdbc::XConnection,
+typedef ::cppu::WeakComponentImplHelper3   
::com::sun::star::sdbc::XConnection,
 
::com::sun::star::sdbc::XWarningsSupplier,
 
::com::sun::star::lang::XServiceInfo
  OMetaConnection_BASE;
diff --git a/mysqlc/source/mysqlc_databasemetadata.hxx 
b/mysqlc/source/mysqlc_databasemetadata.hxx
index e29e356..3dd311f 100644
--- a/mysqlc/source/mysqlc_databasemetadata.hxx
+++ b/mysqlc/source/mysqlc_databasemetadata.hxx
@@ -23,7 +23,7 @@
 #include mysqlc_connection.hxx
 
 #include com/sun/star/sdbc/XDatabaseMetaData.hpp
-#include cppuhelper/implbase.hxx
+#include cppuhelper/implbase1.hxx
 
 #include cppconn/metadata.h
 
@@ -40,7 +40,7 @@ namespace connectivity
 // Class: ODatabaseMetaData
 
 
-typedef ::cppu::WeakImplHelper 
::com::sun::star::sdbc::XDatabaseMetaData ODatabaseMetaData_BASE;
+typedef ::cppu::WeakImplHelper1 
::com::sun::star::sdbc::XDatabaseMetaData ODatabaseMetaData_BASE;
 
 class ODatabaseMetaData : public ODatabaseMetaData_BASE
 {
diff --git a/mysqlc/source/mysqlc_driver.hxx b/mysqlc/source/mysqlc_driver.hxx
index 9f87386..f95e914 100644
--- a/mysqlc/source/mysqlc_driver.hxx
+++ b/mysqlc/source/mysqlc_driver.hxx
@@ -35,7 +35,7 @@
 #include com/sun/star/lang/XServiceInfo.hpp
 #include com/sun/star/lang/XMultiServiceFactory.hpp
 
-#include cppuhelper/compbase.hxx
+#include cppuhelper/compbase2.hxx
 #include cppconn/driver.h
 #include osl/module.h
 
@@ -50,7 +50,7 @@ namespace connectivity
 using ::com::sun::star::uno::Sequence;
 Reference ::com::sun::star::uno::XInterface  SAL_CALL 
MysqlCDriver_CreateInstance(const Reference 
::com::sun::star::lang::XMultiServiceFactory  _rxFactory) throw(Exception);
 
-typedef ::cppu::WeakComponentImplHelper   
::com::sun::star::sdbc::XDriver,
+typedef ::cppu::WeakComponentImplHelper2   
::com::sun::star::sdbc::XDriver,
 
::com::sun::star::lang::XServiceInfo  ODriver_BASE;
 
 typedef void* (SAL_CALL * 
OMysqlCConnection_CreateInstanceFunction)(void* _pDriver);
diff --git a/mysqlc/source/mysqlc_resultset.hxx 
b/mysqlc/source/mysqlc_resultset.hxx
index 567c721..003ca03 100644
--- a/mysqlc/source/mysqlc_resultset.hxx
+++ b/mysqlc/source/mysqlc_resultset.hxx
@@ -36,7 +36,7 @@
 #include com/sun/star/sdbcx/XRowLocate.hpp
 #include com/sun/star/util/XCancellable.hpp
 
-#include cppuhelper/compbase.hxx
+#include cppuhelper/compbase12.hxx
 
 
 namespace connectivity
@@ -52,7 +52,7 @@ namespace connectivity
 /*
 **  OResultSet
 */
-typedef ::cppu::WeakComponentImplHelper  
::com::sun::star::sdbc::XResultSet,
+typedef ::cppu::WeakComponentImplHelper12  
::com::sun::star::sdbc::XResultSet,
 
::com::sun::star::sdbc::XRow,
 
::com::sun::star::sdbc::XResultSetMetaDataSupplier,
 
::com::sun::star::util::XCancellable,
diff --git a/mysqlc/source/mysqlc_resultsetmetadata.hxx 
b/mysqlc/source/mysqlc_resultsetmetadata.hxx
index 8528056..ef4c53e 100644
--- a/mysqlc/source/mysqlc_resultsetmetadata.hxx
+++ b/mysqlc/source/mysqlc_resultsetmetadata.hxx
@@ -24,7 +24,7 @@
 
 #include com/sun/star/sdbc/XResultSetMetaData.hpp
 
-#include 

[Libreoffice-commits] core.git: mysqlc/source

2015-08-22 Thread Takeshi Abe
 mysqlc/source/mysqlc_connection.hxx|4 ++--
 mysqlc/source/mysqlc_databasemetadata.hxx  |4 ++--
 mysqlc/source/mysqlc_driver.hxx|4 ++--
 mysqlc/source/mysqlc_resultset.hxx |4 ++--
 mysqlc/source/mysqlc_resultsetmetadata.hxx |4 ++--
 mysqlc/source/mysqlc_statement.hxx |4 ++--
 6 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 7fa5f876fddfd4baeff01d74d26cbf1dc4607d18
Author: Takeshi Abe t...@fixedpoint.jp
Date:   Sat Aug 22 16:55:44 2015 +0900

mysqlc: tdf#88206 replace cppu::WeakImplHelper* etc.

with the variadic variants.

Change-Id: If0eccdcb56f8196db5eea539eb54dd145ac57a8d
Reviewed-on: https://gerrit.libreoffice.org/17918
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/mysqlc/source/mysqlc_connection.hxx 
b/mysqlc/source/mysqlc_connection.hxx
index aeb9686..2700c67 100644
--- a/mysqlc/source/mysqlc_connection.hxx
+++ b/mysqlc/source/mysqlc_connection.hxx
@@ -38,7 +38,7 @@
 
 #include cppconn/driver.h
 
-#include cppuhelper/compbase3.hxx
+#include cppuhelper/compbase.hxx
 #include cppuhelper/weakref.hxx
 #include rtl/string.hxx
 
@@ -65,7 +65,7 @@ namespace connectivity
 typedef ::com::sun::star::uno::Reference 
::com::sun::star::container::XNameAccess  my_XNameAccessRef;
 typedef ::com::sun::star::uno::Reference 
::com::sun::star::sdbc::XDatabaseMetaData  my_XDatabaseMetaDataRef;
 
-typedef ::cppu::WeakComponentImplHelper3   
::com::sun::star::sdbc::XConnection,
+typedef ::cppu::WeakComponentImplHelper   
::com::sun::star::sdbc::XConnection,
 
::com::sun::star::sdbc::XWarningsSupplier,
 
::com::sun::star::lang::XServiceInfo
  OMetaConnection_BASE;
diff --git a/mysqlc/source/mysqlc_databasemetadata.hxx 
b/mysqlc/source/mysqlc_databasemetadata.hxx
index 3dd311f..e29e356 100644
--- a/mysqlc/source/mysqlc_databasemetadata.hxx
+++ b/mysqlc/source/mysqlc_databasemetadata.hxx
@@ -23,7 +23,7 @@
 #include mysqlc_connection.hxx
 
 #include com/sun/star/sdbc/XDatabaseMetaData.hpp
-#include cppuhelper/implbase1.hxx
+#include cppuhelper/implbase.hxx
 
 #include cppconn/metadata.h
 
@@ -40,7 +40,7 @@ namespace connectivity
 // Class: ODatabaseMetaData
 
 
-typedef ::cppu::WeakImplHelper1 
::com::sun::star::sdbc::XDatabaseMetaData ODatabaseMetaData_BASE;
+typedef ::cppu::WeakImplHelper 
::com::sun::star::sdbc::XDatabaseMetaData ODatabaseMetaData_BASE;
 
 class ODatabaseMetaData : public ODatabaseMetaData_BASE
 {
diff --git a/mysqlc/source/mysqlc_driver.hxx b/mysqlc/source/mysqlc_driver.hxx
index f95e914..9f87386 100644
--- a/mysqlc/source/mysqlc_driver.hxx
+++ b/mysqlc/source/mysqlc_driver.hxx
@@ -35,7 +35,7 @@
 #include com/sun/star/lang/XServiceInfo.hpp
 #include com/sun/star/lang/XMultiServiceFactory.hpp
 
-#include cppuhelper/compbase2.hxx
+#include cppuhelper/compbase.hxx
 #include cppconn/driver.h
 #include osl/module.h
 
@@ -50,7 +50,7 @@ namespace connectivity
 using ::com::sun::star::uno::Sequence;
 Reference ::com::sun::star::uno::XInterface  SAL_CALL 
MysqlCDriver_CreateInstance(const Reference 
::com::sun::star::lang::XMultiServiceFactory  _rxFactory) throw(Exception);
 
-typedef ::cppu::WeakComponentImplHelper2   
::com::sun::star::sdbc::XDriver,
+typedef ::cppu::WeakComponentImplHelper   
::com::sun::star::sdbc::XDriver,
 
::com::sun::star::lang::XServiceInfo  ODriver_BASE;
 
 typedef void* (SAL_CALL * 
OMysqlCConnection_CreateInstanceFunction)(void* _pDriver);
diff --git a/mysqlc/source/mysqlc_resultset.hxx 
b/mysqlc/source/mysqlc_resultset.hxx
index 003ca03..567c721 100644
--- a/mysqlc/source/mysqlc_resultset.hxx
+++ b/mysqlc/source/mysqlc_resultset.hxx
@@ -36,7 +36,7 @@
 #include com/sun/star/sdbcx/XRowLocate.hpp
 #include com/sun/star/util/XCancellable.hpp
 
-#include cppuhelper/compbase12.hxx
+#include cppuhelper/compbase.hxx
 
 
 namespace connectivity
@@ -52,7 +52,7 @@ namespace connectivity
 /*
 **  OResultSet
 */
-typedef ::cppu::WeakComponentImplHelper12  
::com::sun::star::sdbc::XResultSet,
+typedef ::cppu::WeakComponentImplHelper  
::com::sun::star::sdbc::XResultSet,
 
::com::sun::star::sdbc::XRow,
 
::com::sun::star::sdbc::XResultSetMetaDataSupplier,
 
::com::sun::star::util::XCancellable,
diff --git a/mysqlc/source/mysqlc_resultsetmetadata.hxx 
b/mysqlc/source/mysqlc_resultsetmetadata.hxx
index ef4c53e..8528056 100644
--- 

[Libreoffice-commits] core.git: mysqlc/source

2015-05-08 Thread Stephan Bergmann
 mysqlc/source/mysqlc_connection.cxx |6 --
 mysqlc/source/mysqlc_connection.hxx |5 -
 2 files changed, 11 deletions(-)

New commits:
commit ecad097109609ca590f227b09f74fdb679903c77
Author: Stephan Bergmann sberg...@redhat.com
Date:   Fri May 8 14:37:28 2015 +0200

Remove dead code

Change-Id: Id2b755c500c32392cdb5cc84ee901f0737347350

diff --git a/mysqlc/source/mysqlc_connection.cxx 
b/mysqlc/source/mysqlc_connection.cxx
index d26558b..d6a8fe4 100644
--- a/mysqlc/source/mysqlc_connection.cxx
+++ b/mysqlc/source/mysqlc_connection.cxx
@@ -551,12 +551,6 @@ void SAL_CALL OConnection::clearWarnings()
 // you should clear your collected warnings here#
 }
 
-void OConnection::buildTypeInfo()
-throw(SQLException)
-{
-OSL_TRACE(OConnection::buildTypeInfo);
-}
-
 void OConnection::disposing()
 {
 OSL_TRACE(OConnection::disposing);
diff --git a/mysqlc/source/mysqlc_connection.hxx 
b/mysqlc/source/mysqlc_connection.hxx
index 801ba70..aeb9686 100644
--- a/mysqlc/source/mysqlc_connection.hxx
+++ b/mysqlc/source/mysqlc_connection.hxx
@@ -118,8 +118,6 @@ namespace connectivity
 boolm_bUseCatalog;  // should we use the catalog on filebased 
databases
 boolm_bUseOldDateFormat;
 
-
-voidbuildTypeInfo() throw(SQLException);
 public:
 rtl::OUString getMysqlVariable(const char *varname)
 
throw(SQLException, RuntimeException);
@@ -133,9 +131,6 @@ namespace connectivity
 OConnection(MysqlCDriver _rDriver, sql::Driver * cppDriver);
 virtual ~OConnection();
 
-void closeAllStatements ()  
throw(SQLException);
-
-
 rtl_TextEncoding getConnectionEncoding() { return 
m_settings.encoding; }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: mysqlc/source

2015-04-28 Thread Michael Meeks
 mysqlc/source/mysqlc_connection.cxx |2 +-
 mysqlc/source/mysqlc_resultset.cxx  |2 +-
 mysqlc/source/mysqlc_statement.cxx  |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit af48ad2120b3240826edbd0af2a28531adeb5154
Author: Michael Meeks michael.me...@collabora.com
Date:   Tue Apr 28 15:34:17 2015 +0100

fix erroneous disposeOnce calls.

Change-Id: I4ce39e6d6534d1481f7e6b759d61040606da839c

diff --git a/mysqlc/source/mysqlc_connection.cxx 
b/mysqlc/source/mysqlc_connection.cxx
index 47ffd8d..d26558b 100644
--- a/mysqlc/source/mysqlc_connection.cxx
+++ b/mysqlc/source/mysqlc_connection.cxx
@@ -531,7 +531,7 @@ void SAL_CALL OConnection::close()
 MutexGuard aGuard(m_aMutex);
 checkDisposed(OConnection_BASE::rBHelper.bDisposed);
 }
-disposeOnce();
+dispose();
 }
 
 // XWarningsSupplier
diff --git a/mysqlc/source/mysqlc_resultset.cxx 
b/mysqlc/source/mysqlc_resultset.cxx
index 662cd45..2ef646c 100644
--- a/mysqlc/source/mysqlc_resultset.cxx
+++ b/mysqlc/source/mysqlc_resultset.cxx
@@ -615,7 +615,7 @@ void SAL_CALL OResultSet::close() throw(SQLException, 
RuntimeException, std::exc
 mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding);
 }
 
-disposeOnce();
+dispose();
 }
 
 sal_Bool SAL_CALL OResultSet::first() throw(SQLException, RuntimeException, 
std::exception)
diff --git a/mysqlc/source/mysqlc_statement.cxx 
b/mysqlc/source/mysqlc_statement.cxx
index c645a81..f2a15d3 100644
--- a/mysqlc/source/mysqlc_statement.cxx
+++ b/mysqlc/source/mysqlc_statement.cxx
@@ -138,7 +138,7 @@ void SAL_CALL OCommonStatement::close()
 MutexGuard aGuard(m_aMutex);
 checkDisposed(rBHelper.bDisposed);
 }
-disposeOnce();
+dispose();
 }
 
 void SAL_CALL OStatement::clearBatch()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: mysqlc/source

2014-12-04 Thread Stephan Bergmann
 mysqlc/source/mysqlc_databasemetadata.cxx  |2 -
 mysqlc/source/mysqlc_preparedstatement.cxx |   40 ++---
 mysqlc/source/mysqlc_statement.cxx |2 -
 3 files changed, 22 insertions(+), 22 deletions(-)

New commits:
commit 6bca90dd62fd10068ad59302f5d918384d8749d7
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu Dec 4 09:36:32 2014 +0100

mysqlc: loplugin:cstylecast

Change-Id: I293f6fc392f6d081d08d2f53886f534409e38bd5

diff --git a/mysqlc/source/mysqlc_databasemetadata.cxx 
b/mysqlc/source/mysqlc_databasemetadata.cxx
index 4388b61..5fc49b0 100644
--- a/mysqlc/source/mysqlc_databasemetadata.cxx
+++ b/mysqlc/source/mysqlc_databasemetadata.cxx
@@ -1054,7 +1054,7 @@ Reference XConnection  SAL_CALL 
ODatabaseMetaData::getConnection()
 throw(SQLException, RuntimeException, std::exception)
 {
 OSL_TRACE(ODatabaseMetaData::getConnection);
-return (Reference XConnection )m_rConnection;
+return m_rConnection;
 }
 
 /*
diff --git a/mysqlc/source/mysqlc_preparedstatement.cxx 
b/mysqlc/source/mysqlc_preparedstatement.cxx
index 5795f20..6806ac9 100644
--- a/mysqlc/source/mysqlc_preparedstatement.cxx
+++ b/mysqlc/source/mysqlc_preparedstatement.cxx
@@ -85,7 +85,7 @@ OPreparedStatement::OPreparedStatement(OConnection* 
_pConnection, sql::PreparedS
 m_pConnection-acquire();
 
 try {
-m_paramCount = ((sql::PreparedStatement 
*)cppStatement)-getParameterMetaData()-getParameterCount();
+m_paramCount = static_castsql::PreparedStatement 
*(cppStatement)-getParameterMetaData()-getParameterCount();
 } catch (const sql::SQLException e) {
 mysqlc_sdbc_driver::translateAndThrow(e, *this, 
m_pConnection-getConnectionEncoding());
 }
@@ -138,7 +138,7 @@ Reference XResultSetMetaData  SAL_CALL 
OPreparedStatement::getMetaData()
 try {
 if (!m_xMetaData.is()) {
 m_xMetaData = new OResultSetMetaData(
-((sql::PreparedStatement 
*)cppStatement)-getMetaData(),
+static_castsql::PreparedStatement 
*(cppStatement)-getMetaData(),
 getOwnConnection()-getConnectionEncoding()
 );
 }
@@ -179,7 +179,7 @@ sal_Bool SAL_CALL OPreparedStatement::execute()
 
 bool success = false;
 try {
-success = ((sql::PreparedStatement *)cppStatement)-execute()? 
sal_True:sal_False;
+success = static_castsql::PreparedStatement 
*(cppStatement)-execute()? sal_True:sal_False;
 } catch (const sql::SQLException e) {
 mysqlc_sdbc_driver::translateAndThrow(e, *this, 
m_pConnection-getConnectionEncoding());
 }
@@ -195,7 +195,7 @@ sal_Int32 SAL_CALL OPreparedStatement::executeUpdate()
 
 sal_Int32 affectedRows = 0;
 try {
-affectedRows = ((sql::PreparedStatement 
*)cppStatement)-executeUpdate();
+affectedRows = static_castsql::PreparedStatement 
*(cppStatement)-executeUpdate();
 } catch (const sql::SQLException e) {
 mysqlc_sdbc_driver::translateAndThrow(e, *this, 
m_pConnection-getConnectionEncoding());
 }
@@ -212,7 +212,7 @@ void SAL_CALL OPreparedStatement::setString(sal_Int32 
parameter, const OUString
 
 try {
 std::string stringie(OUStringToOString(x, 
m_pConnection-getConnectionEncoding()).getStr());
-((sql::PreparedStatement *)cppStatement)-setString(parameter, 
stringie);
+static_castsql::PreparedStatement 
*(cppStatement)-setString(parameter, stringie);
 } catch (const sql::MethodNotImplementedException ) {
 
mysqlc_sdbc_driver::throwFeatureNotImplementedException(OPreparedStatement::clearParameters,
 *this);
 } catch (const sql::SQLException e) {
@@ -227,7 +227,7 @@ Reference XConnection  SAL_CALL 
OPreparedStatement::getConnection()
 MutexGuard aGuard(m_aMutex);
 checkDisposed(OPreparedStatement::rBHelper.bDisposed);
 
-return (Reference XConnection )m_pConnection;
+return m_pConnection;
 }
 
 Reference XResultSet  SAL_CALL OPreparedStatement::executeQuery(const 
OUString sql)
@@ -257,7 +257,7 @@ Reference XResultSet  SAL_CALL 
OPreparedStatement::executeQuery()
 
 Reference XResultSet  xResultSet;
 try {
-sql::ResultSet * res = ((sql::PreparedStatement 
*)cppStatement)-executeQuery();
+sql::ResultSet * res = static_castsql::PreparedStatement 
*(cppStatement)-executeQuery();
 xResultSet = new OResultSet(this, res, 
getOwnConnection()-getConnectionEncoding());
 } catch (const sql::SQLException e) {
 mysqlc_sdbc_driver::translateAndThrow(e, *this, 
m_pConnection-getConnectionEncoding());
@@ -274,7 +274,7 @@ void SAL_CALL OPreparedStatement::setBoolean(sal_Int32 
parameter, sal_Bool x)
 checkParameterIndex(parameter);
 
 try {
-((sql::PreparedStatement *)cppStatement)-setBoolean(parameter, x);
+static_castsql::PreparedStatement 
*(cppStatement)-setBoolean(parameter, x);
 } catch 

[Libreoffice-commits] core.git: mysqlc/source

2014-11-18 Thread Michael Stahl
 mysqlc/source/mysqlc_driver.hxx|1 +
 mysqlc/source/mysqlc_statement.cxx |1 +
 2 files changed, 2 insertions(+)

New commits:
commit a0eb1be3a934892875926789e9824efeb7da5f7b
Author: Michael Stahl mst...@redhat.com
Date:   Tue Nov 18 23:37:00 2014 +0100

mysqlc: fix build after cppuhelper header cleanup

Change-Id: I8d331914736e17d5aad2ee761fc6d758c2dea1ad

diff --git a/mysqlc/source/mysqlc_driver.hxx b/mysqlc/source/mysqlc_driver.hxx
index 76cc4e5..8d2b95b 100644
--- a/mysqlc/source/mysqlc_driver.hxx
+++ b/mysqlc/source/mysqlc_driver.hxx
@@ -33,6 +33,7 @@
 
 #include com/sun/star/sdbc/XDriver.hpp
 #include com/sun/star/lang/XServiceInfo.hpp
+#include com/sun/star/lang/XMultiServiceFactory.hpp
 
 #include cppuhelper/compbase2.hxx
 #include cppconn/driver.h
diff --git a/mysqlc/source/mysqlc_statement.cxx 
b/mysqlc/source/mysqlc_statement.cxx
index e3184b7..ad3ff54 100644
--- a/mysqlc/source/mysqlc_statement.cxx
+++ b/mysqlc/source/mysqlc_statement.cxx
@@ -37,6 +37,7 @@
 #include cppconn/exception.h
 #include cppconn/statement.h
 #include cppuhelper/typeprovider.hxx
+#include cppuhelper/queryinterface.hxx
 #include osl/diagnose.h
 #include osl/thread.h
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: mysqlc/source

2014-10-23 Thread Vinicius Vendramini
 mysqlc/source/mysqlc_connection.cxx|   27 
 mysqlc/source/mysqlc_databasemetadata.cxx  |  158 -
 mysqlc/source/mysqlc_driver.cxx|1 
 mysqlc/source/mysqlc_general.cxx   |4 
 mysqlc/source/mysqlc_preparedstatement.cxx |   37 --
 mysqlc/source/mysqlc_propertyids.cxx   |2 
 mysqlc/source/mysqlc_resultsetmetadata.cxx |   21 ---
 mysqlc/source/mysqlc_services.cxx  |1 
 mysqlc/source/mysqlc_statement.cxx |   22 
 9 files changed, 273 deletions(-)

New commits:
commit 5c8ea6d943ef37d73069288f9ef7dbd374721a71
Author: Vinicius Vendramini viniven...@gmail.com
Date:   Thu Oct 23 10:37:55 2014 +0100

fdo#83991 - cleanup whitespace after folding comment removal.

Change-Id: I31149484d626013ddcd52356be7d416b435cebcc

diff --git a/mysqlc/source/mysqlc_connection.cxx 
b/mysqlc/source/mysqlc_connection.cxx
index a60e3f2..081b354 100644
--- a/mysqlc/source/mysqlc_connection.cxx
+++ b/mysqlc/source/mysqlc_connection.cxx
@@ -74,7 +74,6 @@ OConnection::OConnection(MysqlCDriver _rDriver, sql::Driver 
* _cppDriver)
 m_rDriver.acquire();
 }
 
-
 OConnection::~OConnection()
 {
 OSL_TRACE(OConnection::~OConnection);
@@ -84,7 +83,6 @@ OConnection::~OConnection()
 m_rDriver.release();
 }
 
-
 void SAL_CALL OConnection::release()
 throw()
 {
@@ -252,7 +250,6 @@ Reference XStatement  SAL_CALL 
OConnection::createStatement()
 return xReturn;
 }
 
-
 Reference XPreparedStatement  SAL_CALL OConnection::prepareStatement(const 
OUString _sSql)
 throw(SQLException, RuntimeException, std::exception)
 {
@@ -274,7 +271,6 @@ Reference XPreparedStatement  SAL_CALL 
OConnection::prepareStatement(const OUS
 return xStatement;
 }
 
-
 Reference XPreparedStatement  SAL_CALL OConnection::prepareCall(const 
OUString /*_sSql*/ )
 throw(SQLException, RuntimeException, std::exception)
 {
@@ -286,7 +282,6 @@ Reference XPreparedStatement  SAL_CALL 
OConnection::prepareCall(const OUString
 return Reference XPreparedStatement ();
 }
 
-
 OUString SAL_CALL OConnection::nativeSQL(const OUString _sSql)
 throw(SQLException, RuntimeException, std::exception)
 {
@@ -304,7 +299,6 @@ OUString SAL_CALL OConnection::nativeSQL(const OUString 
_sSql)
 return sNativeSQL;
 }
 
-
 void SAL_CALL OConnection::setAutoCommit(sal_Bool autoCommit)
 throw(SQLException, RuntimeException, std::exception)
 {
@@ -318,7 +312,6 @@ void SAL_CALL OConnection::setAutoCommit(sal_Bool 
autoCommit)
 }
 }
 
-
 sal_Bool SAL_CALL OConnection::getAutoCommit()
 throw(SQLException, RuntimeException, std::exception)
 {
@@ -338,7 +331,6 @@ sal_Bool SAL_CALL OConnection::getAutoCommit()
 return autoCommit;
 }
 
-
 void SAL_CALL OConnection::commit()
 throw(SQLException, RuntimeException, std::exception)
 {
@@ -352,7 +344,6 @@ void SAL_CALL OConnection::commit()
 }
 }
 
-
 void SAL_CALL OConnection::rollback()
 throw(SQLException, RuntimeException, std::exception)
 {
@@ -366,7 +357,6 @@ void SAL_CALL OConnection::rollback()
 }
 }
 
-
 sal_Bool SAL_CALL OConnection::isClosed()
 throw(SQLException, RuntimeException, std::exception)
 {
@@ -377,7 +367,6 @@ sal_Bool SAL_CALL OConnection::isClosed()
 return (OConnection_BASE::rBHelper.bDisposed);
 }
 
-
 Reference XDatabaseMetaData  SAL_CALL OConnection::getMetaData()
 throw(SQLException, RuntimeException, std::exception)
 {
@@ -398,7 +387,6 @@ Reference XDatabaseMetaData  SAL_CALL 
OConnection::getMetaData()
 return xMetaData;
 }
 
-
 void SAL_CALL OConnection::setReadOnly(sal_Bool readOnly)
 throw(SQLException, RuntimeException, std::exception)
 {
@@ -409,7 +397,6 @@ void SAL_CALL OConnection::setReadOnly(sal_Bool readOnly)
 m_settings.readOnly = readOnly;
 }
 
-
 sal_Bool SAL_CALL OConnection::isReadOnly()
 throw(SQLException, RuntimeException, std::exception)
 {
@@ -421,7 +408,6 @@ sal_Bool SAL_CALL OConnection::isReadOnly()
 return (m_settings.readOnly);
 }
 
-
 void SAL_CALL OConnection::setCatalog(const OUString catalog)
 throw(SQLException, RuntimeException, std::exception)
 {
@@ -437,7 +423,6 @@ void SAL_CALL OConnection::setCatalog(const OUString 
catalog)
 }
 }
 
-
 OUString SAL_CALL OConnection::getCatalog()
 throw(SQLException, RuntimeException, std::exception)
 {
@@ -454,7 +439,6 @@ OUString SAL_CALL OConnection::getCatalog()
 return catalog;
 }
 
-
 void SAL_CALL OConnection::setTransactionIsolation(sal_Int32 level)
 throw(SQLException, RuntimeException, std::exception)
 {
@@ -490,7 +474,6 @@ void SAL_CALL 
OConnection::setTransactionIsolation(sal_Int32 level)
 }
 }
 
-
 sal_Int32 SAL_CALL OConnection::getTransactionIsolation()
 throw(SQLException, RuntimeException, std::exception)
 {
@@ -513,7 +496,6 @@ sal_Int32 SAL_CALL OConnection::getTransactionIsolation()
 return TransactionIsolation::NONE;
 }
 
-
 ReferenceXNameAccess SAL_CALL OConnection::getTypeMap()
 throw(SQLException, 

[Libreoffice-commits] core.git: mysqlc/source

2014-10-01 Thread Stephan Bergmann
 mysqlc/source/mysqlc_preparedstatement.cxx |2 +-
 mysqlc/source/mysqlc_resultset.cxx |6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 2bb99ca189358065104e99fa4933d6b28ab10025
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Oct 1 10:35:19 2014 +0200

mysqlc: These shall be plain Time not tools::Time apparently

Change-Id: Id96a75bb8a07ea3b9701b9fe4692dfc81dbd8295

diff --git a/mysqlc/source/mysqlc_preparedstatement.cxx 
b/mysqlc/source/mysqlc_preparedstatement.cxx
index b3e0bbd..6ec219d 100644
--- a/mysqlc/source/mysqlc_preparedstatement.cxx
+++ b/mysqlc/source/mysqlc_preparedstatement.cxx
@@ -374,7 +374,7 @@ void SAL_CALL OPreparedStatement::setDate(sal_Int32 
parameter, const Date aData
 
 
 /* {{{ OPreparedStatement::setTime() -I- */
-void SAL_CALL OPreparedStatement::setTime(sal_Int32 parameter, const 
tools::Time aVal)
+void SAL_CALL OPreparedStatement::setTime(sal_Int32 parameter, const Time 
aVal)
 throw(SQLException, RuntimeException, std::exception)
 {
 OSL_TRACE(OPreparedStatement::setTime);
diff --git a/mysqlc/source/mysqlc_resultset.cxx 
b/mysqlc/source/mysqlc_resultset.cxx
index 3291600..3541ec2 100644
--- a/mysqlc/source/mysqlc_resultset.cxx
+++ b/mysqlc/source/mysqlc_resultset.cxx
@@ -524,7 +524,7 @@ Time SAL_CALL OResultSet::getTime(sal_Int32 column)
 MutexGuard aGuard(m_aMutex);
 
 checkColumnIndex(column);
-tools::Time t;
+Time t;
 OUString timeString = getString(column);
 OUString token;
 sal_Int32 nIndex, i=0;
@@ -562,7 +562,7 @@ DateTime SAL_CALL OResultSet::getTimestamp(sal_Int32 column)
 checkColumnIndex(column);
 DateTime dt;
 Date d = getDate(column);
-tools::Time t = getTime(column);
+Time t = getTime(column);
 
 dt.Year = d.Year;
 dt.Month = d.Month;
@@ -1088,7 +1088,7 @@ void SAL_CALL OResultSet::updateDate(sal_Int32 column, 
const Date /* x */)
 /* }}} */
 
 /* {{{ OResultSet::updateTime() -U- */
-void SAL_CALL OResultSet::updateTime(sal_Int32 column, const tools::Time /* x 
*/)
+void SAL_CALL OResultSet::updateTime(sal_Int32 column, const Time /* x */)
 throw(SQLException, RuntimeException, std::exception)
 {
 OSL_TRACE(OResultSet::updateTime);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: mysqlc/source

2014-07-02 Thread Stephan Bergmann
 mysqlc/source/mysqlc_connection.cxx|   16 -
 mysqlc/source/mysqlc_connection.hxx|   10 -
 mysqlc/source/mysqlc_databasemetadata.cxx  |   12 -
 mysqlc/source/mysqlc_databasemetadata.hxx  |8 
 mysqlc/source/mysqlc_driver.cxx|2 
 mysqlc/source/mysqlc_preparedstatement.cxx |2 
 mysqlc/source/mysqlc_services.cxx  |2 
 mysqlc/source/mysqlc_statement.cxx |4 
 mysqlc/source/mysqlc_subcomponent.hxx  |2 
 mysqlc/source/mysqlc_types.cxx |  274 ++---
 mysqlc/source/mysqlc_types.hxx |8 
 11 files changed, 170 insertions(+), 170 deletions(-)

New commits:
commit dbf99dfb980f772250e8ec4792c1bf5a1458629b
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Jul 2 08:42:58 2014 +0200

mysqlc: sal_Bool - bool

Change-Id: Ie479e1671b03fbb958886d4c01ecff41b2ad1d23

diff --git a/mysqlc/source/mysqlc_connection.cxx 
b/mysqlc/source/mysqlc_connection.cxx
index f8274f4..9773703 100644
--- a/mysqlc/source/mysqlc_connection.cxx
+++ b/mysqlc/source/mysqlc_connection.cxx
@@ -67,9 +67,9 @@ OConnection::OConnection(MysqlCDriver _rDriver, sql::Driver 
* _cppDriver)
 ,m_xMetaData(NULL)
 ,m_rDriver(_rDriver)
 ,cppDriver(_cppDriver)
-,m_bClosed(sal_False)
-,m_bUseCatalog(sal_False)
-,m_bUseOldDateFormat(sal_False)
+,m_bClosed(false)
+,m_bUseCatalog(false)
+,m_bUseOldDateFormat(false)
 {
 OSL_TRACE(OConnection::OConnection);
 m_rDriver.acquire();
@@ -106,7 +106,7 @@ void OConnection::construct(const OUString url, const 
Sequence PropertyValue 
 MutexGuard aGuard(m_aMutex);
 
 sal_Int32 nIndex;
-sal_Bool  bEmbedded = sal_False;
+bool  bEmbedded = false;
 OUString token;
 OUString aHostName(localhost);
 sal_Int32 nPort = 3306;
@@ -121,7 +121,7 @@ void OConnection::construct(const OUString url, const 
Sequence PropertyValue 
 if (url.startsWith(MYSQLC_URI_PREFIX)) {
 nIndex = 12;
 } else {
-bEmbedded = sal_True;
+bEmbedded = true;
 nIndex = 20;
 
mysqlc_sdbc_driver::throwFeatureNotImplementedException(OConnection::construct 
(embedded MySQL), *this);
 }
@@ -169,7 +169,7 @@ void OConnection::construct(const OUString url, const 
Sequence PropertyValue 
 }
 }
 
-if (bEmbedded == sal_False) {
+if (!bEmbedded) {
 try {
 sql::ConnectOptionsMap connProps;
 std::string host_str = OUStringToOString(aHostName, 
m_settings.encoding).getStr();
@@ -348,7 +348,7 @@ sal_Bool SAL_CALL OConnection::getAutoCommit()
 MutexGuard aGuard(m_aMutex);
 checkDisposed(OConnection_BASE::rBHelper.bDisposed);
 
-sal_Bool autoCommit = sal_False;
+bool autoCommit = false;
 try {
 autoCommit = m_settings.cppConnection-getAutoCommit() == true ? 
sal_True : sal_False;
 } catch (const sql::SQLException  e) {
@@ -651,7 +651,7 @@ void OConnection::disposing()
 }
 m_aStatements.clear();
 
-m_bClosed   = sal_True;
+m_bClosed   = true;
 m_xMetaData = WeakReference XDatabaseMetaData ();
 
 dispose_ChildImpl();
diff --git a/mysqlc/source/mysqlc_connection.hxx 
b/mysqlc/source/mysqlc_connection.hxx
index 3625341..05eb3bd 100644
--- a/mysqlc/source/mysqlc_connection.hxx
+++ b/mysqlc/source/mysqlc_connection.hxx
@@ -77,7 +77,7 @@ namespace connectivity
 OUString schema;
 OUString quoteIdentifier;
 OUString connectionURL;
-sal_Bool readOnly;
+bool readOnly;
 };
 
 class MysqlCDriver;
@@ -115,9 +115,9 @@ namespace connectivity
 MysqlCDriver   m_rDriver;  // Pointer to the owning driver 
object
 sql::Driver*cppDriver;
 
-sal_Boolm_bClosed;
-sal_Boolm_bUseCatalog;  // should we use the catalog on 
filebased databases
-sal_Boolm_bUseOldDateFormat;
+boolm_bClosed;
+boolm_bUseCatalog;  // should we use the catalog on filebased 
databases
+boolm_bUseOldDateFormat;
 
 
 voidbuildTypeInfo() throw(SQLException);
@@ -227,7 +227,7 @@ namespace connectivity
 OUString transFormPreparedStatement(const OUString _sSQL);
 
 // should we use the catalog on filebased databases
-inline sal_Bool isCatalogUsed() const { return 
m_bUseCatalog; }
+inline bool isCatalogUsed() const { return 
m_bUseCatalog; }
 inline OUString getUserName()   const { return 
m_sUser; }
 inline const MysqlCDriver  getDriver() const { return 
m_rDriver;}
 inline rtl_TextEncoding getTextEncoding()   const { return 
m_settings.encoding; }
diff --git a/mysqlc/source/mysqlc_databasemetadata.cxx 
b/mysqlc/source/mysqlc_databasemetadata.cxx
index 01cda36..46a4d87 100644
--- 

[Libreoffice-commits] core.git: mysqlc/source

2014-05-30 Thread Noel Grandin
 mysqlc/source/mysqlc_connection.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6b50e21473e7d2b24b5c609d8a1c31f27644d842
Author: Noel Grandin n...@peralex.com
Date:   Fri May 30 13:02:20 2014 +0200

deb#749592 mysql-connector doesn't work with remote connections

and also
fdo#77584 mysql-connector doesn't work over SSH tunnel

Not sure exactly how this got broken, I suspect that the UI code
has started unconditionally passing down the properties, just filling
them with empty spaces for the unused ones.

Anyhow, this appears to fix the problem.

Change-Id: I7ac2a0d6bae610f47d2a28daa9beb3ef0e2dbb52
Reviewed-on: https://gerrit.libreoffice.org/9565
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/mysqlc/source/mysqlc_connection.cxx 
b/mysqlc/source/mysqlc_connection.cxx
index 9c0b183..f8274f4 100644
--- a/mysqlc/source/mysqlc_connection.cxx
+++ b/mysqlc/source/mysqlc_connection.cxx
@@ -158,10 +158,10 @@ void OConnection::construct(const OUString url, const 
Sequence PropertyValue 
 OSL_VERIFY( pIter-Value = aPass );
 } else if (pIter-Name.equalsAscii(LocalSocket)) {
 OSL_VERIFY( pIter-Value = sUnixSocket );
-unixSocketPassed = true;
+unixSocketPassed = !sUnixSocket.isEmpty();
 } else if (pIter-Name.equalsAscii(NamedPipe)) {
 OSL_VERIFY( pIter-Value = sNamedPipe );
-namedPipePassed = true;
+namedPipePassed = !sNamedPipe.isEmpty();
 } else if ( pIter-Name.equalsAscii(PublicConnectionURL)) {
 OSL_VERIFY( pIter-Value = m_settings.connectionURL );
 } else if ( pIter-Name.equalsAscii(NewURL)) {// legacy name for 
PublicConnectionURL
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: mysqlc/source

2014-05-11 Thread Julien Nabet
 mysqlc/source/mysqlc_propertyids.hxx |   15 ---
 mysqlc/source/mysqlc_resultset.cxx   |   13 -
 mysqlc/source/mysqlc_statement.cxx   |   20 ++--
 3 files changed, 18 insertions(+), 30 deletions(-)

New commits:
commit aa214079b4e9df493b57fbf815460b7164225f2b
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sun May 11 22:50:37 2014 +0200

Kill DECL_PROP1IMPL and related

See 
http://nabble.documentfoundation.org/About-removing-macros-td4106620.html

Change-Id: Ib934eb3f27b656b5b2f8488c2103e8eee73f9623

diff --git a/mysqlc/source/mysqlc_propertyids.hxx 
b/mysqlc/source/mysqlc_propertyids.hxx
index 4e7ac46..35e5502 100644
--- a/mysqlc/source/mysqlc_propertyids.hxx
+++ b/mysqlc/source/mysqlc_propertyids.hxx
@@ -130,21 +130,6 @@ enum
 }/* mysqlc */
 }/* connectivity */
 
-
-#define DECL_PROP1IMPL(varname, type) \
-pProperties[nPos++] = 
Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_##varname), 
PROPERTY_ID_##varname, ::getCppuType(static_cast type*(0)),
-
-#define DECL_PROP0(varname, type)   \
-DECL_PROP1IMPL(varname, type) 0)
-
-#define DECL_BOOL_PROP1IMPL(varname) \
-pProperties[nPos++] = 
Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_##varname), 
PROPERTY_ID_##varname, ::getBooleanCppuType(),
-
-#define DECL_BOOL_PROP0(varname)\
-DECL_BOOL_PROP1IMPL(varname) 0)
-
-
-
 #endif // INCLUDED_MYSQLC_SOURCE_MYSQLC_PROPERTYIDS_HXX
 
 
diff --git a/mysqlc/source/mysqlc_resultset.cxx 
b/mysqlc/source/mysqlc_resultset.cxx
index aa602f6..5942ae7 100644
--- a/mysqlc/source/mysqlc_resultset.cxx
+++ b/mysqlc/source/mysqlc_resultset.cxx
@@ -1269,11 +1269,14 @@ IPropertyArrayHelper * OResultSet::createArrayHelper() 
const
 Sequence Property  aProps(5);
 Property* pProperties = aProps.getArray();
 sal_Int32 nPos = 0;
-DECL_PROP0(FETCHDIRECTION,  sal_Int32);
-DECL_PROP0(FETCHSIZE,   sal_Int32);
-DECL_BOOL_PROP1IMPL(ISBOOKMARKABLE) PropertyAttribute::READONLY);
-DECL_PROP1IMPL(RESULTSETCONCURRENCY,sal_Int32) 
PropertyAttribute::READONLY);
-DECL_PROP1IMPL(RESULTSETTYPE,   sal_Int32) 
PropertyAttribute::READONLY);
+pProperties[nPos++] = 
Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_FETCHDIRECTION), 
PROPERTY_ID_FETCHDIRECTION, cppu::UnoTypesal_Int32::get(), 0);
+pProperties[nPos++] = 
Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_FETCHSIZE), 
PROPERTY_ID_FETCHSIZE, cppu::UnoTypesal_Int32::get(), 0);
+pProperties[nPos++] = 
Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_ISBOOKMARKABLE),
+PROPERTY_ID_ISBOOKMARKABLE, ::getBooleanCppuType(), 
PropertyAttribute::READONLY);
+pProperties[nPos++] = 
Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETCONCURRENCY),
+PROPERTY_ID_RESULTSETCONCURRENCY, cppu::UnoTypesal_Int32::get(), 
PropertyAttribute::READONLY);
+pProperties[nPos++] = 
Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETTYPE),
+PROPERTY_ID_RESULTSETTYPE, cppu::UnoTypesal_Int32::get(), 
PropertyAttribute::READONLY);
 
 return new OPropertyArrayHelper(aProps);
 }
diff --git a/mysqlc/source/mysqlc_statement.cxx 
b/mysqlc/source/mysqlc_statement.cxx
index ca7dd9f..57b051e 100644
--- a/mysqlc/source/mysqlc_statement.cxx
+++ b/mysqlc/source/mysqlc_statement.cxx
@@ -369,16 +369,16 @@ void SAL_CALL OCommonStatement::clearWarnings()
 Sequence Property  aProps(10);
 Property* pProperties = aProps.getArray();
 sal_Int32 nPos = 0;
-DECL_PROP0(CURSORNAME,  OUString);
-DECL_BOOL_PROP0(ESCAPEPROCESSING);
-DECL_PROP0(FETCHDIRECTION,sal_Int32);
-DECL_PROP0(FETCHSIZE,   sal_Int32);
-DECL_PROP0(MAXFIELDSIZE,sal_Int32);
-DECL_PROP0(MAXROWS, sal_Int32);
-DECL_PROP0(QUERYTIMEOUT,sal_Int32);
-DECL_PROP0(RESULTSETCONCURRENCY,sal_Int32);
-DECL_PROP0(RESULTSETTYPE,sal_Int32);
-DECL_BOOL_PROP0(USEBOOKMARKS);
+pProperties[nPos++] = 
Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_CURSORNAME), 
PROPERTY_ID_CURSORNAME, cppu::UnoTypeOUString::get(), 0);
+pProperties[nPos++] = 
Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_ESCAPEPROCESSING),
 PROPERTY_ID_ESCAPEPROCESSING, ::getBooleanCppuType(), 0);
+pProperties[nPos++] = 
Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_FETCHDIRECTION), 
PROPERTY_ID_FETCHDIRECTION, cppu::UnoTypesal_Int32::get(), 0);
+pProperties[nPos++] = 
Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_FETCHSIZE), 
PROPERTY_ID_FETCHSIZE, cppu::UnoTypesal_Int32::get(), 0);
+pProperties[nPos++] = 
Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_MAXFIELDSIZE), 
PROPERTY_ID_MAXFIELDSIZE, cppu::UnoTypesal_Int32::get(), 0);
+pProperties[nPos++] = 
Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_MAXROWS), 
PROPERTY_ID_MAXROWS, cppu::UnoTypesal_Int32::get(), 0);
+

[Libreoffice-commits] core.git: mysqlc/source

2014-04-07 Thread Stephan Bergmann
 mysqlc/source/mysqlc_driver.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit b154c61766b5a5e3f597bad63d799912e5950a02
Author: Stephan Bergmann sberg...@redhat.com
Date:   Mon Apr 7 13:36:33 2014 +0200

Do not use sal/log.hxx in extensions

For now, this functionality should only be used internally within 
LibreOffice.
It may change again in a future version. (sal/log.hxx)

And the condition that was checked already causes a RuntimeException, so was
somewhat redundant anyway.  Thanks to mstahl for spotting this.

Change-Id: I51cc4e75b3d3ffc97943613c61cb93c1fb48e59b

diff --git a/mysqlc/source/mysqlc_driver.cxx b/mysqlc/source/mysqlc_driver.cxx
index 21befa0..1d35539 100644
--- a/mysqlc/source/mysqlc_driver.cxx
+++ b/mysqlc/source/mysqlc_driver.cxx
@@ -217,7 +217,6 @@ Reference XConnection  SAL_CALL 
MysqlCDriver::connect(const OUString url, con
 if ( !cppDriver )
 {
 impl_initCppConn_lck_throw();
-SAL_WARN_IF( !cppDriver, mysqlc, MySQLCDriver::connect: internal 
error. );
 if ( !cppDriver )
 throw RuntimeException(MySQLCDriver::connect: internal error., 
*this );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: mysqlc/source

2014-02-26 Thread Alexander Wilms
 mysqlc/source/mysqlc_connection.hxx|4 ++--
 mysqlc/source/mysqlc_databasemetadata.hxx  |4 ++--
 mysqlc/source/mysqlc_propertyids.cxx   |4 ++--
 mysqlc/source/mysqlc_propertyids.hxx   |8 
 mysqlc/source/mysqlc_resultsetmetadata.hxx |4 ++--
 mysqlc/source/mysqlc_statement.hxx |4 ++--
 6 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit 5d70084bc6277245953f57b6cc7530e48d4a5826
Author: Alexander Wilms f.alexander.wi...@gmail.com
Date:   Tue Feb 25 19:19:41 2014 +0100

Remove visual noise from mysqlc

Change-Id: I5ee918bb193ea887e728e271dd4c0fb49a4dd6e9
Reviewed-on: https://gerrit.libreoffice.org/8282
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/mysqlc/source/mysqlc_connection.hxx 
b/mysqlc/source/mysqlc_connection.hxx
index 0bd1b82..aac93b2 100644
--- a/mysqlc/source/mysqlc_connection.hxx
+++ b/mysqlc/source/mysqlc_connection.hxx
@@ -100,9 +100,9 @@ namespace connectivity
 ::com::sun::star::uno::Reference 
com::sun::star::util::XStringSubstitution  m_xParameterSubstitution;
 protected:
 
-
//
+
 // Data attributes
-
//
+
 ::com::sun::star::uno::WeakReference 
::com::sun::star::sdbc::XDatabaseMetaData  m_xMetaData;
 
 OWeakRefArray   m_aStatements;  // vector containing a list
diff --git a/mysqlc/source/mysqlc_databasemetadata.hxx 
b/mysqlc/source/mysqlc_databasemetadata.hxx
index a6a79e3..f96f142 100644
--- a/mysqlc/source/mysqlc_databasemetadata.hxx
+++ b/mysqlc/source/mysqlc_databasemetadata.hxx
@@ -36,9 +36,9 @@ namespace connectivity
 typedef ::com::sun::star::uno::Reference 
::com::sun::star::sdbc::XResultSet  my_XResultSetRef;
 using ::com::sun::star::uno::Any;
 
-//**
+
 // Class: ODatabaseMetaData
-//**
+
 
 typedef ::cppu::WeakImplHelper1 
::com::sun::star::sdbc::XDatabaseMetaData ODatabaseMetaData_BASE;
 
diff --git a/mysqlc/source/mysqlc_propertyids.cxx 
b/mysqlc/source/mysqlc_propertyids.cxx
index f22d7af..ee59375 100644
--- a/mysqlc/source/mysqlc_propertyids.cxx
+++ b/mysqlc/source/mysqlc_propertyids.cxx
@@ -76,9 +76,9 @@ const sal_Char* getPROPERTY_LOCALE(){ return 
Locale; }
 
 const sal_Char* getPROPERTY_AUTOINCREMENTCREATION() { return 
AutoIncrementCreation; }
 const sal_Char* getPROPERTY_PRIVILEGES(){ return Privileges; }
-//
+
 //= error messages
-//
+
 const sal_Char* getERRORMSG_SEQUENCE()  { return Function 
sequence error; }
 const sal_Char* getSQLSTATE_SEQUENCE()  { return HY010; }
 const sal_Char* getSQLSTATE_GENERAL()   { return HY; }
diff --git a/mysqlc/source/mysqlc_propertyids.hxx 
b/mysqlc/source/mysqlc_propertyids.hxx
index 8b010a6..98ffd07 100644
--- a/mysqlc/source/mysqlc_propertyids.hxx
+++ b/mysqlc/source/mysqlc_propertyids.hxx
@@ -130,16 +130,16 @@ enum
 }/* mysqlc */
 }/* connectivity */
 
-//--
+
 #define DECL_PROP1IMPL(varname, type) \
 pProperties[nPos++] = 
Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_##varname), 
PROPERTY_ID_##varname, ::getCppuType(static_cast type*(0)),
-//--
+
 #define DECL_PROP0(varname, type)   \
 DECL_PROP1IMPL(varname, type) 0)
-//--
+
 #define DECL_BOOL_PROP1IMPL(varname) \
 pProperties[nPos++] = 
Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_##varname), 
PROPERTY_ID_##varname, ::getBooleanCppuType(),
-//--
+
 #define DECL_BOOL_PROP0(varname)\
 DECL_BOOL_PROP1IMPL(varname) 0)
 
diff --git a/mysqlc/source/mysqlc_resultsetmetadata.hxx 
b/mysqlc/source/mysqlc_resultsetmetadata.hxx
index 4bbd720..b92b567 100644
--- a/mysqlc/source/mysqlc_resultsetmetadata.hxx
+++ b/mysqlc/source/mysqlc_resultsetmetadata.hxx
@@ -33,9 +33,9 @@ namespace connectivity
 {
 using ::com::sun::star::sdbc::SQLException;
 using ::com::sun::star::uno::RuntimeException;
-//**
+
 // Class: ResultSetMetaData
-//**
+
 typedef ::cppu::WeakImplHelper1 
::com::sun::star::sdbc::XResultSetMetaData 

[Libreoffice-commits] core.git: mysqlc/source

2014-02-03 Thread Stephan Bergmann
 mysqlc/source/mysqlc_subcomponent.hxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 22c6d5739ece983aacbb2f86a0a25e2e5c7249fe
Author: Stephan Bergmann sberg...@redhat.com
Date:   Mon Feb 3 09:47:44 2014 +0100

Fix typos

Change-Id: I0314d439412e9fcc0fbc6a7702e5ec3cddafc0c5

diff --git a/mysqlc/source/mysqlc_subcomponent.hxx 
b/mysqlc/source/mysqlc_subcomponent.hxx
index 0647501..5aaf5e9 100644
--- a/mysqlc/source/mysqlc_subcomponent.hxx
+++ b/mysqlc/source/mysqlc_subcomponent.hxx
@@ -193,11 +193,12 @@ namespace connectivity
 
 return aReturn;
 }
+}
 
 #define DECLARE_SERVICE_INFO() 
  \
 virtual OUString SAL_CALL getImplementationName() throw 
(::com::sun::star::uno::RuntimeException);  
 \
 virtual sal_Bool SAL_CALL supportsService(const OUString ServiceName) 
throw(::com::sun::star::uno::RuntimeException);   \
-virtual ::com::sun::star::uno::Sequence OUString  SAL_CALL 
getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException)   \
+virtual ::com::sun::star::uno::Sequence OUString  SAL_CALL 
getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException)
 
 #define IMPLEMENT_SERVICE_INFO(classname, implasciiname, serviceasciiname) 
  \
 OUString SAL_CALL classname::getImplementationName() throw 
(::com::sun::star::uno::RuntimeException) \
@@ -212,9 +213,9 @@ namespace connectivity
 }  
  \
 sal_Bool SAL_CALL classname::supportsService(const OUString 
_rServiceName) throw(::com::sun::star::uno::RuntimeException)   \
 {  
  \
-return cppu::supportsService(this, ServiceName);   
  \
-}  
  \
+return cppu::supportsService(this, _rServiceName); 
  \
 }
+
 }
 #endif // _CONNECTIVITY_OSUBCOMPONENT_HXX_
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: mysqlc/source

2013-03-10 Thread Stephan Bergmann
 mysqlc/source/mysqlc_connection.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f3c618e46e92bc906de6452c2889cf8fb42a8015
Author: Stephan Bergmann sberg...@redhat.com
Date:   Sun Mar 10 23:14:27 2013 +0100

Adapt to removed MYSQL_LIB

...from cad422afb7a4dcd7592c502641b41a832703e536 Adding libmariadb module 
for
internal mariadb (work in progress).

Change-Id: Iba803a26be6f62589191122d4defc959cb3248eb

diff --git a/mysqlc/source/mysqlc_connection.cxx 
b/mysqlc/source/mysqlc_connection.cxx
index 717adf9..fe93623 100644
--- a/mysqlc/source/mysqlc_connection.cxx
+++ b/mysqlc/source/mysqlc_connection.cxx
@@ -195,7 +195,7 @@ void OConnection::construct(const OUString url, const 
Sequence PropertyValue 
 }
 
 #ifndef SYSTEM_MARIADB
-::rtl::OUString sMySQLClientLib( MYSQL_LIB  );
+::rtl::OUString sMySQLClientLib( libmariadb SAL_DLLEXTENSION );
 
 ::rtl::OUString moduleBase;
 OSL_VERIFY( ::osl::Module::getUrlFromAddress( thisModule, 
moduleBase ) );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: mysqlc/source

2013-02-07 Thread Michael Stahl
 mysqlc/source/description.xml |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 90d0ebf32bae29ff08b92b857ece5425dd2b
Author: Michael Stahl mst...@redhat.com
Date:   Thu Feb 7 23:45:13 2013 +0100

mysqlc: bump version number to 1.0.2

Also bump minimum OOo version to 3.3 because of passive registration.

Change-Id: I6798f728d19adcc5d30e7d9fe4ae3c62c18876a2

diff --git a/mysqlc/source/description.xml b/mysqlc/source/description.xml
index edd0b4d..7335fb5 100644
--- a/mysqlc/source/description.xml
+++ b/mysqlc/source/description.xml
@@ -20,13 +20,13 @@
 xmlns:xlink=http://www.w3.org/1999/xlink;
 
 identifier value=com.sun.star.mysql-connector-ooo-@PLATFORM@/
-version value=1.0.1 /
+version value=1.0.2 /
 platform value=@PLATFORM@ /
 display-name
 name lang=en-USMySQL Connector/name
 /display-name
 dependencies
- OpenOffice.org-minimal-version value=3.1 d:name=OpenOffice.org 
3.1/
+ OpenOffice.org-minimal-version value=3.3 d:name=OpenOffice.org 
3.3/
 /dependencies
 publisher
 name xlink:href=http://www.documentfoundation.org; lang=en-USThe 
Document Foundation/name
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits