summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2022-01-30 16:28:32 +0100
committerJulien Nabet <serval2412@yahoo.fr>2022-01-30 19:21:12 +0100
commite5c72fcf22e479871bc5a47f660bc56878db5626 (patch)
treef64752abddbf8b685abe11bc3795a553c9107a8b /connectivity
parent9688e4970eed2b4bb4265df2a5781452a8ef5c52 (diff)
Mysql/MariaDB: remove useless include+using + unused vars in mysqlc_connection
+ replace one time used define MYSQLC_URI_PREFIX Change-Id: Ia2ad5b2883f5f417bdbdcc7b39055bd5454c10f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129174 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_connection.cxx10
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_connection.hxx9
2 files changed, 1 insertions, 18 deletions
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx b/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx
index 1c654c3e24ed..22e5c0ad0c41 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx
@@ -29,25 +29,17 @@
#include <com/sun/star/beans/NamedValue.hpp>
-#include <comphelper/processfactory.hxx>
#include <comphelper/servicehelper.hxx>
-#include <comphelper/storagehelper.hxx>
-
-#include <osl/diagnose.h>
-#include <cppuhelper/supportsservice.hxx>
using namespace connectivity::mysqlc;
using namespace com::sun::star::uno;
using namespace com::sun::star::container;
-using namespace com::sun::star::lang;
using namespace com::sun::star::beans;
using namespace com::sun::star::sdbc;
using namespace com::sun::star::sdbcx;
using ::osl::MutexGuard;
-#define MYSQLC_URI_PREFIX "sdbc:mysqlc:"
-
namespace
{
void lcl_executeUpdate(MYSQL* pMySql, const OString& sql)
@@ -95,7 +87,7 @@ void OConnection::construct(const OUString& url, const Sequence<PropertyValue>&
// parse url. Url has the following format:
// external server: sdbc:mysqlc:[hostname]:[port]/[dbname]
- if (url.startsWith(MYSQLC_URI_PREFIX))
+ if (url.startsWith("sdbc:mysqlc:"))
{
nIndex = 12;
}
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_connection.hxx b/connectivity/source/drivers/mysqlc/mysqlc_connection.hxx
index 5280ecde78f1..d6040ec65b7f 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_connection.hxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_connection.hxx
@@ -24,12 +24,9 @@
#include "mysqlc_types.hxx"
#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <com/sun/star/sdbc/ColumnSearch.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
-#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/SQLWarning.hpp>
#include <com/sun/star/sdbc/XConnection.hpp>
#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
@@ -39,8 +36,6 @@
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/compbase.hxx>
-#include <cppuhelper/weakref.hxx>
-#include <rtl/string.hxx>
#include <rtl/ref.hxx>
#include <mysql.h>
@@ -59,10 +54,6 @@ class ODatabaseMetaData;
namespace mysqlc
{
-using ::com::sun::star::sdbc::SQLException;
-using ::com::sun::star::sdbc::SQLWarning;
-using ::com::sun::star::uno::RuntimeException;
-
typedef ::cppu::WeakComponentImplHelper<css::sdbc::XConnection, css::sdbc::XWarningsSupplier,
css::lang::XUnoTunnel, css::lang::XServiceInfo>
OMetaConnection_BASE;