[Libreoffice-commits] core.git: connectivity/source dbaccess/source include/connectivity

Lionel Elie Mamane lionel at mamane.lu
Fri Sep 26 09:29:42 PDT 2014


 connectivity/source/drivers/odbc/ODatabaseMetaData.cxx |    2 
 connectivity/source/inc/odbc/OConnection.hxx           |    2 
 connectivity/source/inc/odbc/ODriver.hxx               |    2 
 connectivity/source/inc/odbc/OFunctiondefs.hxx         |  104 -----------------
 connectivity/source/inc/odbc/OFunctions.hxx            |    2 
 connectivity/source/inc/odbc/OTools.hxx                |    2 
 dbaccess/source/ui/dlg/odbcconfig.cxx                  |   36 -----
 include/connectivity/odbc.hxx                          |  104 +++++++++++++++++
 8 files changed, 110 insertions(+), 144 deletions(-)

New commits:
commit 173e0172092fa87606a80a7b0d6b89323c7166b5
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Fri Sep 26 18:25:56 2014 +0200

    factorise odbc headers inclusion
    
    it is complicated enough that we should implement that logic only once
    
    Change-Id: I0cc5ffb871223b27df825f21612e3c8f6f2febb3

diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx
index 6a98544..56a2467 100644
--- a/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx
+++ b/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx
@@ -25,7 +25,7 @@
 #include <com/sun/star/sdbc/ResultSetType.hpp>
 #include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
 #include <com/sun/star/sdbc/TransactionIsolation.hpp>
-#include "odbc/OFunctiondefs.hxx"
+#include <connectivity/odbc.hxx>
 #include "stdio.h"
 #include "TPrivilegesResultSet.hxx"
 #include <connectivity/dbexception.hxx>
diff --git a/connectivity/source/inc/odbc/OConnection.hxx b/connectivity/source/inc/odbc/OConnection.hxx
index bdf46b6..37f730b 100644
--- a/connectivity/source/inc/odbc/OConnection.hxx
+++ b/connectivity/source/inc/odbc/OConnection.hxx
@@ -21,7 +21,7 @@
 
 #include <com/sun/star/sdbc/SQLWarning.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
-#include "odbc/OFunctiondefs.hxx"
+#include <connectivity/odbc.hxx>
 #include "odbc/odbcbasedllapi.hxx"
 #include <connectivity/OSubComponent.hxx>
 #include <connectivity/CommonTools.hxx>
diff --git a/connectivity/source/inc/odbc/ODriver.hxx b/connectivity/source/inc/odbc/ODriver.hxx
index f225bd0..210a543 100644
--- a/connectivity/source/inc/odbc/ODriver.hxx
+++ b/connectivity/source/inc/odbc/ODriver.hxx
@@ -23,7 +23,7 @@
 #include <com/sun/star/sdbc/XDriver.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <cppuhelper/compbase2.hxx>
-#include "odbc/OFunctiondefs.hxx"
+#include <connectivity/odbc.hxx>
 #include "odbc/odbcbasedllapi.hxx"
 #include <connectivity/CommonTools.hxx>
 #include <osl/module.h>
diff --git a/connectivity/source/inc/odbc/OFunctions.hxx b/connectivity/source/inc/odbc/OFunctions.hxx
index 1ead6bb..feeda59 100644
--- a/connectivity/source/inc/odbc/OFunctions.hxx
+++ b/connectivity/source/inc/odbc/OFunctions.hxx
@@ -20,7 +20,7 @@
 #ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_ODBC_OFUNCTIONS_HXX
 #define INCLUDED_CONNECTIVITY_SOURCE_INC_ODBC_OFUNCTIONS_HXX
 
-#include "odbc/OFunctiondefs.hxx"
+#include <connectivity/odbc.hxx>
 #include <rtl/ustring.hxx>
 #include <osl/module.h>
 
diff --git a/connectivity/source/inc/odbc/OTools.hxx b/connectivity/source/inc/odbc/OTools.hxx
index d9b8127..ff07cd0 100644
--- a/connectivity/source/inc/odbc/OTools.hxx
+++ b/connectivity/source/inc/odbc/OTools.hxx
@@ -19,7 +19,7 @@
 #ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_ODBC_OTOOLS_HXX
 #define INCLUDED_CONNECTIVITY_SOURCE_INC_ODBC_OTOOLS_HXX
 
-#include "odbc/OFunctiondefs.hxx"
+#include <connectivity/odbc.hxx>
 #include "odbc/odbcbasedllapi.hxx"
 #include <com/sun/star/sdbc/SQLException.hpp>
 #include <com/sun/star/util/Date.hpp>
diff --git a/dbaccess/source/ui/dlg/odbcconfig.cxx b/dbaccess/source/ui/dlg/odbcconfig.cxx
index e75b160..c301918 100644
--- a/dbaccess/source/ui/dlg/odbcconfig.cxx
+++ b/dbaccess/source/ui/dlg/odbcconfig.cxx
@@ -20,12 +20,6 @@
 #include <config_folders.h>
 #include "odbcconfig.hxx"
 
-#ifdef SYSTEM_ODBC_HEADERS
-#include <sqltypes.h>
-#else
-#include <odbc/sqltypes.h>
-#endif
-
 #include <rtl/bootstrap.hxx>
 #include <rtl/ustring.hxx>
 #include <rtl/ustrbuf.hxx>
@@ -49,35 +43,7 @@
 #endif
 #endif
 
-// just to go with calling convention of windows
-// so don't touch this
-#if defined(WNT)
-#undef SQL_API
-#define SQL_API __stdcall
-// At least under some circumstances, the below #include <odbc/sqlext.h> re-
-// defines SQL_API to an empty string, leading to a compiler warning on MSC; to
-// not break the current behavior, this is worked around by locally disabling
-// that warning:
-#if defined _MSC_VER
-#pragma warning(push)
-#pragma warning(disable: 4005)
-#endif
-#endif // defined(WNT)
-
-#ifdef SYSTEM_ODBC_HEADERS
-#include <sqlext.h>
-#else
-#include <odbc/sqlext.h>
-#endif
-
-#if defined(WNT)
-#if defined _MSC_VER
-#pragma warning(pop)
-#endif
-#undef SQL_API
-#define SQL_API __stdcall
-#endif // defined(WNT)
-// from here on you can do what you want to
+#include <connectivity/odbc.hxx>
 
 #else
 
diff --git a/connectivity/source/inc/odbc/OFunctiondefs.hxx b/include/connectivity/odbc.hxx
similarity index 100%
rename from connectivity/source/inc/odbc/OFunctiondefs.hxx
rename to include/connectivity/odbc.hxx


More information about the Libreoffice-commits mailing list