summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorGabor Kelemen <kelemen.gabor2@nisz.hu>2020-01-06 23:52:01 +0100
committerMiklos Vajna <vmiklos@collabora.com>2020-01-14 10:21:47 +0100
commit1dd9200be9f167dc802b04529a54604691fe050e (patch)
treee6a8a26b7795872275d2ac991f3ee53635eb08bb /connectivity
parentea10986a0939cacd34e8d3e026579c8ce3e6ac6c (diff)
tdf#42949 Fix IWYU warnings in connectivity/*/*cxx
Except for platform specific drivers/ado and drivers/macab dirs Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I24b741cded8995e29ac3d518aeaa0d60b3c55b56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86317 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/IwyuFilter_connectivity.yaml71
-rw-r--r--connectivity/qa/connectivity/mork/DriverTest.cxx4
-rw-r--r--connectivity/source/commontools/CommonTools.cxx7
-rw-r--r--connectivity/source/commontools/ConnectionWrapper.cxx4
-rw-r--r--connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx9
-rw-r--r--connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx5
-rw-r--r--connectivity/source/commontools/FValue.cxx1
-rw-r--r--connectivity/source/commontools/RowFunctionParser.cxx2
-rw-r--r--connectivity/source/commontools/TColumnsHelper.cxx5
-rw-r--r--connectivity/source/commontools/TConnection.cxx1
-rw-r--r--connectivity/source/commontools/TIndexColumns.cxx2
-rw-r--r--connectivity/source/commontools/TKeyColumns.cxx2
-rw-r--r--connectivity/source/commontools/TTableHelper.cxx4
-rw-r--r--connectivity/source/commontools/dbconversion.cxx1
-rw-r--r--connectivity/source/commontools/dbexception.cxx1
-rw-r--r--connectivity/source/commontools/dbmetadata.cxx1
-rw-r--r--connectivity/source/commontools/dbtools.cxx2
-rw-r--r--connectivity/source/commontools/dbtools2.cxx2
-rw-r--r--connectivity/source/commontools/filtermanager.cxx1
-rw-r--r--connectivity/source/commontools/formattedcolumnvalue.cxx1
-rw-r--r--connectivity/source/commontools/parameters.cxx2
-rw-r--r--connectivity/source/commontools/sqlerror.cxx1
-rw-r--r--connectivity/source/cpool/ZConnectionPool.cxx2
-rw-r--r--connectivity/source/cpool/ZConnectionWrapper.cxx4
-rw-r--r--connectivity/source/cpool/ZPooledConnection.cxx3
-rw-r--r--connectivity/source/drivers/calc/CConnection.cxx2
-rw-r--r--connectivity/source/drivers/calc/CDatabaseMetaData.cxx7
-rw-r--r--connectivity/source/drivers/calc/CTable.cxx10
-rw-r--r--connectivity/source/drivers/calc/CTables.cxx1
-rw-r--r--connectivity/source/drivers/component/CColumns.cxx1
-rw-r--r--connectivity/source/drivers/component/CDatabaseMetaData.cxx6
-rw-r--r--connectivity/source/drivers/component/CResultSet.cxx1
-rw-r--r--connectivity/source/drivers/component/CTable.cxx26
-rw-r--r--connectivity/source/drivers/dbase/DColumns.cxx1
-rw-r--r--connectivity/source/drivers/dbase/DConnection.cxx1
-rw-r--r--connectivity/source/drivers/dbase/DDatabaseMetaData.cxx3
-rw-r--r--connectivity/source/drivers/dbase/DIndex.cxx4
-rw-r--r--connectivity/source/drivers/dbase/DIndexColumns.cxx1
-rw-r--r--connectivity/source/drivers/dbase/DResultSet.cxx1
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx7
-rw-r--r--connectivity/source/drivers/dbase/DTables.cxx5
-rw-r--r--connectivity/source/drivers/dbase/dindexnode.cxx2
-rw-r--r--connectivity/source/drivers/evoab2/NColumns.cxx2
-rw-r--r--connectivity/source/drivers/evoab2/NConnection.cxx1
-rw-r--r--connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx4
-rw-r--r--connectivity/source/drivers/evoab2/NDriver.cxx5
-rw-r--r--connectivity/source/drivers/evoab2/NPreparedStatement.cxx4
-rw-r--r--connectivity/source/drivers/evoab2/NResultSet.cxx7
-rw-r--r--connectivity/source/drivers/evoab2/NResultSetMetaData.cxx1
-rw-r--r--connectivity/source/drivers/evoab2/NStatement.cxx1
-rw-r--r--connectivity/source/drivers/evoab2/NTable.cxx2
-rw-r--r--connectivity/source/drivers/evoab2/NTables.cxx8
-rw-r--r--connectivity/source/drivers/file/FColumns.cxx2
-rw-r--r--connectivity/source/drivers/file/FConnection.cxx4
-rw-r--r--connectivity/source/drivers/file/FDatabaseMetaData.cxx5
-rw-r--r--connectivity/source/drivers/file/FDriver.cxx1
-rw-r--r--connectivity/source/drivers/file/FPreparedStatement.cxx2
-rw-r--r--connectivity/source/drivers/file/FResultSet.cxx8
-rw-r--r--connectivity/source/drivers/file/FStatement.cxx2
-rw-r--r--connectivity/source/drivers/file/FTable.cxx2
-rw-r--r--connectivity/source/drivers/file/FTables.cxx7
-rw-r--r--connectivity/source/drivers/file/fanalyzer.cxx1
-rw-r--r--connectivity/source/drivers/file/fcode.cxx3
-rw-r--r--connectivity/source/drivers/file/fcomp.cxx1
-rw-r--r--connectivity/source/drivers/firebird/Blob.cxx3
-rw-r--r--connectivity/source/drivers/firebird/Clob.cxx4
-rw-r--r--connectivity/source/drivers/firebird/Column.cxx1
-rw-r--r--connectivity/source/drivers/firebird/Columns.cxx2
-rw-r--r--connectivity/source/drivers/firebird/Connection.cxx7
-rw-r--r--connectivity/source/drivers/firebird/DatabaseMetaData.cxx1
-rw-r--r--connectivity/source/drivers/firebird/PreparedStatement.cxx3
-rw-r--r--connectivity/source/drivers/firebird/ResultSet.cxx5
-rw-r--r--connectivity/source/drivers/firebird/Statement.cxx8
-rw-r--r--connectivity/source/drivers/firebird/StatementCommonBase.cxx1
-rw-r--r--connectivity/source/drivers/firebird/Users.cxx4
-rw-r--r--connectivity/source/drivers/firebird/Util.cxx1
-rw-r--r--connectivity/source/drivers/flat/EColumns.cxx1
-rw-r--r--connectivity/source/drivers/flat/EConnection.cxx1
-rw-r--r--connectivity/source/drivers/flat/EDatabaseMetaData.cxx5
-rw-r--r--connectivity/source/drivers/flat/EResultSet.cxx1
-rw-r--r--connectivity/source/drivers/flat/ETable.cxx9
-rw-r--r--connectivity/source/drivers/flat/ETables.cxx6
-rw-r--r--connectivity/source/drivers/hsqldb/HConnection.cxx1
-rw-r--r--connectivity/source/drivers/hsqldb/HDriver.cxx4
-rw-r--r--connectivity/source/drivers/hsqldb/HStorageAccess.cxx2
-rw-r--r--connectivity/source/drivers/hsqldb/HStorageMap.cxx1
-rw-r--r--connectivity/source/drivers/hsqldb/HTable.cxx11
-rw-r--r--connectivity/source/drivers/hsqldb/HTables.cxx5
-rw-r--r--connectivity/source/drivers/hsqldb/HUsers.cxx4
-rw-r--r--connectivity/source/drivers/hsqldb/HView.cxx1
-rw-r--r--connectivity/source/drivers/hsqldb/HViews.cxx8
-rw-r--r--connectivity/source/drivers/hsqldb/StorageFileAccess.cxx2
-rw-r--r--connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx5
-rw-r--r--connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx10
-rw-r--r--connectivity/source/drivers/jdbc/Array.cxx2
-rw-r--r--connectivity/source/drivers/jdbc/Blob.cxx1
-rw-r--r--connectivity/source/drivers/jdbc/Class.cxx1
-rw-r--r--connectivity/source/drivers/jdbc/DatabaseMetaData.cxx1
-rw-r--r--connectivity/source/drivers/jdbc/Date.cxx2
-rw-r--r--connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx5
-rw-r--r--connectivity/source/drivers/jdbc/InputStream.cxx1
-rw-r--r--connectivity/source/drivers/jdbc/JConnection.cxx3
-rw-r--r--connectivity/source/drivers/jdbc/JDriver.cxx5
-rw-r--r--connectivity/source/drivers/jdbc/JStatement.cxx1
-rw-r--r--connectivity/source/drivers/jdbc/Object.cxx3
-rw-r--r--connectivity/source/drivers/jdbc/Ref.cxx2
-rw-r--r--connectivity/source/drivers/jdbc/ResultSetMetaData.cxx1
-rw-r--r--connectivity/source/drivers/jdbc/SQLException.cxx3
-rw-r--r--connectivity/source/drivers/jdbc/Throwable.cxx2
-rw-r--r--connectivity/source/drivers/jdbc/tools.cxx3
-rw-r--r--connectivity/source/drivers/mork/MColumnAlias.cxx4
-rw-r--r--connectivity/source/drivers/mork/MColumns.cxx1
-rw-r--r--connectivity/source/drivers/mork/MDatabaseMetaData.cxx2
-rw-r--r--connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx9
-rw-r--r--connectivity/source/drivers/mork/MQueryHelper.cxx3
-rw-r--r--connectivity/source/drivers/mork/MResultSetMetaData.cxx2
-rw-r--r--connectivity/source/drivers/mork/MorkParser.cxx3
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx1
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx2
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx2
-rw-r--r--connectivity/source/drivers/mysql_jdbc/YTable.cxx9
-rw-r--r--connectivity/source/drivers/mysql_jdbc/YTables.cxx5
-rw-r--r--connectivity/source/drivers/mysql_jdbc/YUsers.cxx4
-rw-r--r--connectivity/source/drivers/mysql_jdbc/YViews.cxx8
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_connection.cxx13
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx11
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_driver.cxx2
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_general.cxx3
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx5
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx2
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx9
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.cxx2
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_services.cxx1
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_statement.cxx9
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_types.cxx1
-rw-r--r--connectivity/source/drivers/odbc/OConnection.cxx4
-rw-r--r--connectivity/source/drivers/odbc/ODatabaseMetaData.cxx2
-rw-r--r--connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx5
-rw-r--r--connectivity/source/drivers/odbc/ODriver.cxx1
-rw-r--r--connectivity/source/drivers/odbc/OFunctions.cxx1
-rw-r--r--connectivity/source/drivers/odbc/OPreparedStatement.cxx4
-rw-r--r--connectivity/source/drivers/odbc/OResultSet.cxx2
-rw-r--r--connectivity/source/drivers/odbc/OStatement.cxx1
-rw-r--r--connectivity/source/drivers/odbc/OTools.cxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_array.cxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_baseresultset.cxx10
-rw-r--r--connectivity/source/drivers/postgresql/pq_connection.cxx3
-rw-r--r--connectivity/source/drivers/postgresql/pq_databasemetadata.cxx3
-rw-r--r--connectivity/source/drivers/postgresql/pq_preparedstatement.cxx4
-rw-r--r--connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.cxx1
-rw-r--r--connectivity/source/drivers/postgresql/pq_statement.cxx6
-rw-r--r--connectivity/source/drivers/postgresql/pq_statics.cxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_tools.cxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_updateableresultset.cxx1
-rw-r--r--connectivity/source/drivers/postgresql/pq_xbase.cxx3
-rw-r--r--connectivity/source/drivers/postgresql/pq_xcolumn.cxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_xcolumns.cxx3
-rw-r--r--connectivity/source/drivers/postgresql/pq_xcontainer.cxx1
-rw-r--r--connectivity/source/drivers/postgresql/pq_xindex.cxx4
-rw-r--r--connectivity/source/drivers/postgresql/pq_xindexcolumn.cxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx4
-rw-r--r--connectivity/source/drivers/postgresql/pq_xindexes.cxx3
-rw-r--r--connectivity/source/drivers/postgresql/pq_xkey.cxx5
-rw-r--r--connectivity/source/drivers/postgresql/pq_xkeycolumn.cxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx4
-rw-r--r--connectivity/source/drivers/postgresql/pq_xkeys.cxx1
-rw-r--r--connectivity/source/drivers/postgresql/pq_xtable.cxx1
-rw-r--r--connectivity/source/drivers/postgresql/pq_xtables.cxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_xuser.cxx1
-rw-r--r--connectivity/source/drivers/postgresql/pq_xusers.cxx1
-rw-r--r--connectivity/source/drivers/postgresql/pq_xview.cxx1
-rw-r--r--connectivity/source/manager/mdrivermanager.cxx1
-rw-r--r--connectivity/source/parse/PColumn.cxx2
-rw-r--r--connectivity/source/parse/internalnode.cxx2
-rw-r--r--connectivity/source/resource/sharedresources.cxx5
-rw-r--r--connectivity/source/sdbcx/VCatalog.cxx1
-rw-r--r--connectivity/source/sdbcx/VCollection.cxx1
-rw-r--r--connectivity/source/sdbcx/VColumn.cxx1
-rw-r--r--connectivity/source/sdbcx/VDescriptor.cxx1
-rw-r--r--connectivity/source/sdbcx/VGroup.cxx3
-rw-r--r--connectivity/source/sdbcx/VIndex.cxx2
-rw-r--r--connectivity/source/sdbcx/VKey.cxx2
-rw-r--r--connectivity/source/sdbcx/VTable.cxx4
-rw-r--r--connectivity/source/sdbcx/VUser.cxx4
-rw-r--r--connectivity/source/sdbcx/VView.cxx1
185 files changed, 91 insertions, 591 deletions
diff --git a/connectivity/IwyuFilter_connectivity.yaml b/connectivity/IwyuFilter_connectivity.yaml
index 422a7e44ca06..7b5cba571001 100644
--- a/connectivity/IwyuFilter_connectivity.yaml
+++ b/connectivity/IwyuFilter_connectivity.yaml
@@ -1,2 +1,73 @@
---
assumeFilename: connectivity/source/commontools/dbtools.cxx
+blacklist:
+ connectivity/source/commontools/ConnectionWrapper.cxx:
+ # Actually used
+ - com/sun/star/beans/PropertyValue.hpp
+ - com/sun/star/sdbc/XConnection.hpp
+ connectivity/source/commontools/RowFunctionParser.cxx:
+ # Boost header needed
+ - boost/spirit/include/classic_core.hpp
+ connectivity/source/commontools/conncleanup.cxx:
+ # Actually used
+ - com/sun/star/sdbc/XRowSet.hpp
+ - com/sun/star/sdbc/XConnection.hpp
+ connectivity/source/commontools/dbconversion.cxx:
+ # Needed for rtl::math::round
+ - rtl/math.hxx
+ connectivity/source/commontools/dbexception.cxx:
+ # Actually used
+ - com/sun/star/sdb/SQLErrorEvent.hpp
+ connectivity/source/commontools/paramwrapper.cxx:
+ # Actually used
+ - com/sun/star/sdbc/XParameters.hpp
+ connectivity/source/commontools/warningscontainer.cxx:
+ # Actually used
+ - com/sun/star/sdb/SQLContext.hpp
+ - com/sun/star/sdbc/XWarningsSupplier.hpp
+ connectivity/source/commontools/predicateinput.cxx:
+ # Actually used
+ - com/sun/star/sdbc/XConnection.hpp
+ connectivity/source/commontools/statementcomposer.cxx:
+ # Actually used
+ - com/sun/star/sdbc/XConnection.hpp
+ connectivity/source/commontools/parameters.cxx:
+ # Actually used
+ - com/sun/star/form/XDatabaseParameterListener.hpp
+ - com/sun/star/sdbc/XParameters.hpp
+ - com/sun/star/task/XInteractionHandler.hpp
+ connectivity/source/cpool/ZPoolCollection.cxx:
+ # Actually used
+ - com/sun/star/beans/PropertyValue.hpp
+ connectivity/source/parse/PColumn.cxx:
+ # Actually used
+ - com/sun/star/sdbc/XResultSetMetaData.hpp
+ connectivity/source/drivers/file/FCatalog.cxx:
+ # Actually used
+ - com/sun/star/sdbc/XRow.hpp
+ connectivity/source/drivers/hsqldb/HStorageAccess.cxx:
+ # Needed for HSQLDB_DBG
+ - accesslog.hxx
+ connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx:
+ # Needed for HSQLDB_DBG
+ - accesslog.hxx
+ connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx:
+ # Needed for HSQLDB_DBG
+ - accesslog.hxx
+ connectivity/source/drivers/jdbc/ConnectionLog.cxx:
+ # Actually used
+ - com/sun/star/util/Date.hpp
+ - com/sun/star/util/Time.hpp
+ - com/sun/star/util/DateTime.hpp
+ connectivity/source/drivers/mork/MorkParser.cxx:
+ # Needed for std::ifstream
+ - fstream
+ connectivity/source/drivers/mork/MDriver.cxx:
+ # Actually used
+ - com/sun/star/uno/XComponentContext.hpp
+ connectivity/source/drivers/mysql_jdbc/YDriver.cxx:
+ # Actually used
+ - com/sun/star/uno/XComponentContext.hpp
+ connectivity/source/drivers/odbc/OTools.cxx:
+ # OSL_BIGENDIAN is being checked
+ - osl/endian.h
diff --git a/connectivity/qa/connectivity/mork/DriverTest.cxx b/connectivity/qa/connectivity/mork/DriverTest.cxx
index f76c05e6d8ba..1ce3b981a238 100644
--- a/connectivity/qa/connectivity/mork/DriverTest.cxx
+++ b/connectivity/qa/connectivity/mork/DriverTest.cxx
@@ -9,10 +9,6 @@
#include <test/bootstrapfixture.hxx>
-#include <MColumnAlias.hxx>
-#include <MQueryHelper.hxx>
-#include <MConnection.hxx>
-
#include <com/sun/star/sdbc/XDriver.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
diff --git a/connectivity/source/commontools/CommonTools.cxx b/connectivity/source/commontools/CommonTools.cxx
index 615cfe6c582f..a2aeb06af173 100644
--- a/connectivity/source/commontools/CommonTools.cxx
+++ b/connectivity/source/commontools/CommonTools.cxx
@@ -21,17 +21,12 @@
#include <connectivity/CommonTools.hxx>
#include <connectivity/dbtools.hxx>
-#include <com/sun/star/util/Date.hpp>
-#include <com/sun/star/util/Time.hpp>
-#include <com/sun/star/util/DateTime.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
-#include <cppuhelper/interfacecontainer.h>
-#include <TConnection.hxx>
#include <com/sun/star/java/JavaVirtualMachine.hpp>
#if HAVE_FEATURE_JAVA
#include <jvmaccess/virtualmachine.hxx>
#endif
+#include <osl/diagnose.h>
#include <rtl/character.hxx>
#include <rtl/process.h>
diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx b/connectivity/source/commontools/ConnectionWrapper.cxx
index fba26d8937ae..d7d999058a24 100644
--- a/connectivity/source/commontools/ConnectionWrapper.cxx
+++ b/connectivity/source/commontools/ConnectionWrapper.cxx
@@ -19,10 +19,7 @@
#include <connectivity/ConnectionWrapper.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
-#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/XConnection.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <comphelper/uno3.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/servicehelper.hxx>
@@ -31,7 +28,6 @@
#include <cppuhelper/typeprovider.hxx>
#include <com/sun/star/reflection/ProxyFactory.hpp>
#include <algorithm>
-#include <string.h>
using namespace connectivity;
diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
index 98bc649dd320..d30bd85b4fab 100644
--- a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
@@ -21,15 +21,7 @@
#include <ParameterSubstitution.hxx>
#include <FDatabaseMetaDataResultSet.hxx>
#include <FDatabaseMetaDataResultSetMetaData.hxx>
-#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/ColumnSearch.hpp>
-#include <com/sun/star/sdbc/KeyRule.hpp>
-#include <com/sun/star/sdbc/ProcedureResult.hpp>
-#include <com/sun/star/sdbc/IndexType.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
-#include <com/sun/star/sdbc/ResultSetType.hpp>
-#include <com/sun/star/sdbc/FetchDirection.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/sequence.hxx>
@@ -37,7 +29,6 @@
#include <cppuhelper/implementationentry.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <connectivity/dbexception.hxx>
-#include <strings.hrc>
#include <TConnection.hxx>
using namespace connectivity;
diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx b/connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx
index 0d0249f69140..612aee377686 100644
--- a/connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx
+++ b/connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx
@@ -18,17 +18,12 @@
*/
#include <FDatabaseMetaDataResultSetMetaData.hxx>
-#include <FDatabaseMetaDataResultSet.hxx>
#include <com/sun/star/sdbc/DataType.hpp>
-#include <com/sun/star/sdbc/ProcedureResult.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
using namespace connectivity;
-using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::sdbc;
-using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
ODatabaseMetaDataResultSetMetaData::~ODatabaseMetaDataResultSetMetaData()
diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx
index 69f0933ef7cb..828419b3efff 100644
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -20,7 +20,6 @@
#include <string.h>
#include <connectivity/FValue.hxx>
-#include <connectivity/CommonTools.hxx>
#include <connectivity/dbconversion.hxx>
#include <comphelper/extract.hxx>
#include <com/sun/star/io/XInputStream.hpp>
diff --git a/connectivity/source/commontools/RowFunctionParser.cxx b/connectivity/source/commontools/RowFunctionParser.cxx
index b970d93f5a9a..e63e0e4a63b7 100644
--- a/connectivity/source/commontools/RowFunctionParser.cxx
+++ b/connectivity/source/commontools/RowFunctionParser.cxx
@@ -31,13 +31,11 @@
#include <boost/spirit/include/classic_core.hpp>
#include <RowFunctionParser.hxx>
#include <rtl/ustring.hxx>
-#include <tools/fract.hxx>
#if (OSL_DEBUG_LEVEL > 0)
#include <iostream>
#endif
-#include <functional>
#include <algorithm>
#include <stack>
diff --git a/connectivity/source/commontools/TColumnsHelper.cxx b/connectivity/source/commontools/TColumnsHelper.cxx
index b5f6eba0e160..36061dc2fe3d 100644
--- a/connectivity/source/commontools/TColumnsHelper.cxx
+++ b/connectivity/source/commontools/TColumnsHelper.cxx
@@ -19,13 +19,8 @@
#include <connectivity/TColumnsHelper.hxx>
#include <connectivity/sdbcx/VColumn.hxx>
-#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/sdbc/XResultSet.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
-#include <com/sun/star/sdbcx/KeyType.hpp>
-#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#include <com/sun/star/sdbcx/XKeysSupplier.hpp>
#include <comphelper/types.hxx>
#include <connectivity/dbtools.hxx>
#include <TConnection.hxx>
diff --git a/connectivity/source/commontools/TConnection.cxx b/connectivity/source/commontools/TConnection.cxx
index 255776a3ceb4..134aa5960115 100644
--- a/connectivity/source/commontools/TConnection.cxx
+++ b/connectivity/source/commontools/TConnection.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <string.h>
#include <TConnection.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/servicehelper.hxx>
diff --git a/connectivity/source/commontools/TIndexColumns.cxx b/connectivity/source/commontools/TIndexColumns.cxx
index 966db4fc141c..d69358e35489 100644
--- a/connectivity/source/commontools/TIndexColumns.cxx
+++ b/connectivity/source/commontools/TIndexColumns.cxx
@@ -21,8 +21,6 @@
#include <connectivity/sdbcx/VIndexColumn.hxx>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/XResultSet.hpp>
-#include <com/sun/star/sdbc/DataType.hpp>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <connectivity/TIndex.hxx>
#include <connectivity/TTableHelper.hxx>
#include <TConnection.hxx>
diff --git a/connectivity/source/commontools/TKeyColumns.cxx b/connectivity/source/commontools/TKeyColumns.cxx
index 682114e13e34..8c4d36a8cbc9 100644
--- a/connectivity/source/commontools/TKeyColumns.cxx
+++ b/connectivity/source/commontools/TKeyColumns.cxx
@@ -23,8 +23,6 @@
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/XResultSet.hpp>
-#include <com/sun/star/sdbc/DataType.hpp>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <TConnection.hxx>
#include <connectivity/TTableHelper.hxx>
diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx
index 5086f7e8500a..95ec25398600 100644
--- a/connectivity/source/commontools/TTableHelper.cxx
+++ b/connectivity/source/commontools/TTableHelper.cxx
@@ -29,12 +29,8 @@
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/XResultSet.hpp>
#include <com/sun/star/sdbcx/KeyType.hpp>
-#include <com/sun/star/sdbc/KeyRule.hpp>
#include <cppuhelper/implbase.hxx>
-#include <cppuhelper/typeprovider.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <comphelper/types.hxx>
#include <connectivity/dbtools.hxx>
#include <connectivity/sdbcx/VCollection.hxx>
diff --git a/connectivity/source/commontools/dbconversion.cxx b/connectivity/source/commontools/dbconversion.cxx
index 77e7c871123c..3dd42e9cadee 100644
--- a/connectivity/source/commontools/dbconversion.cxx
+++ b/connectivity/source/commontools/dbconversion.cxx
@@ -18,7 +18,6 @@
*/
#include <connectivity/dbconversion.hxx>
-#include <connectivity/dbcharset.hxx>
#include <osl/diagnose.h>
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/util/Date.hpp>
diff --git a/connectivity/source/commontools/dbexception.cxx b/connectivity/source/commontools/dbexception.cxx
index 9d4d9e7a83d3..f15237d82c88 100644
--- a/connectivity/source/commontools/dbexception.cxx
+++ b/connectivity/source/commontools/dbexception.cxx
@@ -25,7 +25,6 @@
#include <com/sun/star/sdb/SQLContext.hpp>
#include <com/sun/star/sdbc/SQLWarning.hpp>
#include <com/sun/star/sdb/SQLErrorEvent.hpp>
-#include <TConnection.hxx>
#include <strings.hrc>
#include <resource/sharedresources.hxx>
diff --git a/connectivity/source/commontools/dbmetadata.cxx b/connectivity/source/commontools/dbmetadata.cxx
index 3d0a6f562223..cec1ec418f5c 100644
--- a/connectivity/source/commontools/dbmetadata.cxx
+++ b/connectivity/source/commontools/dbmetadata.cxx
@@ -36,7 +36,6 @@
#include <tools/diagnose_ex.h>
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/processfactory.hxx>
-#include <sal/macros.h>
#include <sal/log.hxx>
#include <o3tl/optional.hxx>
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 0bf66b360378..48384ef5e565 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -48,7 +48,6 @@
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/XConnection.hpp>
#include <com/sun/star/sdbc/XDataSource.hpp>
-#include <com/sun/star/sdbc/XDriverManager.hpp>
#include <com/sun/star/sdbc/XParameters.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/XRowSet.hpp>
@@ -61,7 +60,6 @@
#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/task/XInteractionRequest.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
-#include <com/sun/star/uno/XNamingService.hpp>
#include <com/sun/star/util/NumberFormat.hpp>
#include <com/sun/star/util/NumberFormatsSupplier.hpp>
#include <com/sun/star/util/XNumberFormatTypes.hpp>
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index 5986595517fc..a5e438f3cb77 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -32,11 +32,9 @@
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
#include <com/sun/star/sdbcx/XKeysSupplier.hpp>
-#include <com/sun/star/sdbc/XDriverAccess.hpp>
#include <com/sun/star/sdbcx/XDataDefinitionSupplier.hpp>
#include <com/sun/star/sdbcx/Privilege.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
-#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <com/sun/star/sdbc/KeyRule.hpp>
#include <com/sun/star/sdbcx/KeyType.hpp>
#include <TConnection.hxx>
diff --git a/connectivity/source/commontools/filtermanager.cxx b/connectivity/source/commontools/filtermanager.cxx
index 08489cf8024a..a6180dd00666 100644
--- a/connectivity/source/commontools/filtermanager.cxx
+++ b/connectivity/source/commontools/filtermanager.cxx
@@ -22,7 +22,6 @@
#include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp>
#include <TConnection.hxx>
#include <osl/diagnose.h>
-#include <connectivity/dbtools.hxx>
#include <tools/diagnose_ex.h>
#include <rtl/ustrbuf.hxx>
diff --git a/connectivity/source/commontools/formattedcolumnvalue.cxx b/connectivity/source/commontools/formattedcolumnvalue.cxx
index 0bc5c91abd4d..de317c43b4ab 100644
--- a/connectivity/source/commontools/formattedcolumnvalue.cxx
+++ b/connectivity/source/commontools/formattedcolumnvalue.cxx
@@ -35,7 +35,6 @@
#include <i18nlangtag/mslangid.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <comphelper/numbers.hxx>
-#include <unotools/sharedunocomponent.hxx>
namespace dbtools
diff --git a/connectivity/source/commontools/parameters.cxx b/connectivity/source/commontools/parameters.cxx
index 3862ebf0ff08..f7a2d73e109b 100644
--- a/connectivity/source/commontools/parameters.cxx
+++ b/connectivity/source/commontools/parameters.cxx
@@ -24,9 +24,7 @@
#include <com/sun/star/sdbc/XParameters.hpp>
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <com/sun/star/sdb/XParametersSupplier.hpp>
-#include <com/sun/star/sdb/XInteractionSupplyParameters.hpp>
#include <com/sun/star/sdb/ParametersRequest.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/task/XInteractionHandler.hpp>
diff --git a/connectivity/source/commontools/sqlerror.cxx b/connectivity/source/commontools/sqlerror.cxx
index 33e0913e3ea1..f5dd3def56cd 100644
--- a/connectivity/source/commontools/sqlerror.cxx
+++ b/connectivity/source/commontools/sqlerror.cxx
@@ -23,7 +23,6 @@
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdb/ErrorCondition.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/exc_hlp.hxx>
#include <rtl/ustrbuf.hxx>
diff --git a/connectivity/source/cpool/ZConnectionPool.cxx b/connectivity/source/cpool/ZConnectionPool.cxx
index c347e5ad84c9..d233599a4227 100644
--- a/connectivity/source/cpool/ZConnectionPool.cxx
+++ b/connectivity/source/cpool/ZConnectionPool.cxx
@@ -19,8 +19,6 @@
#include "ZConnectionPool.hxx"
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include <com/sun/star/container/ElementExistException.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include "ZPooledConnection.hxx"
#include "ZPoolCollection.hxx"
diff --git a/connectivity/source/cpool/ZConnectionWrapper.cxx b/connectivity/source/cpool/ZConnectionWrapper.cxx
index 46ed4bfb32c3..dd4519859f21 100644
--- a/connectivity/source/cpool/ZConnectionWrapper.cxx
+++ b/connectivity/source/cpool/ZConnectionWrapper.cxx
@@ -18,10 +18,6 @@
*/
#include "ZConnectionWrapper.hxx"
-#include <com/sun/star/sdbc/ColumnValue.hpp>
-#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <cppuhelper/typeprovider.hxx>
using namespace connectivity;
diff --git a/connectivity/source/cpool/ZPooledConnection.cxx b/connectivity/source/cpool/ZPooledConnection.cxx
index 8bbde8889ec9..2d0b83707905 100644
--- a/connectivity/source/cpool/ZPooledConnection.cxx
+++ b/connectivity/source/cpool/ZPooledConnection.cxx
@@ -19,10 +19,7 @@
#include "ZPooledConnection.hxx"
#include "ZConnectionWrapper.hxx"
-#include <connectivity/ConnectionWrapper.hxx>
-#include <com/sun/star/sdbc/XCloseable.hpp>
#include <comphelper/types.hxx>
-#include <cppuhelper/component.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
diff --git a/connectivity/source/drivers/calc/CConnection.cxx b/connectivity/source/drivers/calc/CConnection.cxx
index f3dc9f2ee733..9b03d473bda1 100644
--- a/connectivity/source/drivers/calc/CConnection.cxx
+++ b/connectivity/source/drivers/calc/CConnection.cxx
@@ -22,7 +22,6 @@
#include <calc/CCatalog.hxx>
#include <calc/CDriver.hxx>
#include <resource/sharedresources.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <tools/urlobj.hxx>
@@ -31,7 +30,6 @@
#include <unotools/pathoptions.hxx>
#include <connectivity/dbexception.hxx>
#include <cppuhelper/exc_hlp.hxx>
-#include <comphelper/processfactory.hxx>
#include <strings.hrc>
using namespace connectivity::calc;
diff --git a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx
index 04b60da887fb..cea1b32c7a94 100644
--- a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx
@@ -19,22 +19,15 @@
#include <calc/CDatabaseMetaData.hxx>
#include <calc/CConnection.hxx>
-#include <com/sun/star/sdbc/DataType.hpp>
-#include <com/sun/star/sdbc/ResultSetType.hpp>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#include <com/sun/star/sdbcx/XIndexesSupplier.hpp>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/sheet/XSpreadsheet.hpp>
-#include <com/sun/star/sheet/XCellRangesQuery.hpp>
#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
#include <com/sun/star/sheet/XDatabaseRanges.hpp>
#include <com/sun/star/sheet/XDatabaseRange.hpp>
#include <FDatabaseMetaDataResultSet.hxx>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
using namespace connectivity::calc;
using namespace connectivity::file;
diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx
index bcdc12486b09..f22db852d77d 100644
--- a/connectivity/source/drivers/calc/CTable.cxx
+++ b/connectivity/source/drivers/calc/CTable.cxx
@@ -21,7 +21,6 @@
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
-#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/sheet/XSpreadsheet.hpp>
#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
@@ -35,20 +34,13 @@
#include <com/sun/star/util/NumberFormat.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
#include <com/sun/star/text/XText.hpp>
-#include <svl/converter.hxx>
#include <calc/CConnection.hxx>
-#include <component/CColumns.hxx>
#include <connectivity/sdbcx/VColumn.hxx>
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
-#include <osl/thread.h>
-#include <cppuhelper/queryinterface.hxx>
-#include <svl/zforlist.hxx>
#include <rtl/math.hxx>
-#include <connectivity/dbexception.hxx>
-#include <connectivity/dbconversion.hxx>
+#include <tools/time.hxx>
#include <comphelper/servicehelper.hxx>
-#include <comphelper/types.hxx>
#include <cppuhelper/typeprovider.hxx>
using namespace connectivity;
diff --git a/connectivity/source/drivers/calc/CTables.cxx b/connectivity/source/drivers/calc/CTables.cxx
index 943732fdbb36..703ab27120c5 100644
--- a/connectivity/source/drivers/calc/CTables.cxx
+++ b/connectivity/source/drivers/calc/CTables.cxx
@@ -24,7 +24,6 @@
#include <calc/CTable.hxx>
#include <file/FCatalog.hxx>
#include <file/FConnection.hxx>
-#include <calc/CCatalog.hxx>
using namespace ::comphelper;
using namespace connectivity;
diff --git a/connectivity/source/drivers/component/CColumns.cxx b/connectivity/source/drivers/component/CColumns.cxx
index 7eb63af23cba..244b6623d460 100644
--- a/connectivity/source/drivers/component/CColumns.cxx
+++ b/connectivity/source/drivers/component/CColumns.cxx
@@ -19,7 +19,6 @@
#include <component/CColumns.hxx>
#include <file/FTable.hxx>
-#include <connectivity/sdbcx/VColumn.hxx>
using namespace connectivity::component;
using namespace connectivity;
diff --git a/connectivity/source/drivers/component/CDatabaseMetaData.cxx b/connectivity/source/drivers/component/CDatabaseMetaData.cxx
index 4e43a6c76cff..f225747a6486 100644
--- a/connectivity/source/drivers/component/CDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/component/CDatabaseMetaData.cxx
@@ -18,18 +18,14 @@
*/
#include <component/CDatabaseMetaData.hxx>
-#include <connectivity/sqliterator.hxx>
#include <file/FConnection.hxx>
#include <com/sun/star/sdbc/ColumnSearch.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
-#include <com/sun/star/sdbc/ResultSetType.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
+#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#include <com/sun/star/sdbcx/XIndexesSupplier.hpp>
#include <FDatabaseMetaDataResultSet.hxx>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <comphelper/types.hxx>
using namespace connectivity::component;
diff --git a/connectivity/source/drivers/component/CResultSet.cxx b/connectivity/source/drivers/component/CResultSet.cxx
index 6c3e463d2012..9ff212a8911e 100644
--- a/connectivity/source/drivers/component/CResultSet.cxx
+++ b/connectivity/source/drivers/component/CResultSet.cxx
@@ -19,7 +19,6 @@
#include <com/sun/star/sdbcx/CompareBookmark.hpp>
#include <component/CResultSet.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <comphelper/sequence.hxx>
#include <comphelper/types.hxx>
diff --git a/connectivity/source/drivers/component/CTable.cxx b/connectivity/source/drivers/component/CTable.cxx
index 2bc92ecfae6d..14b167347d09 100644
--- a/connectivity/source/drivers/component/CTable.cxx
+++ b/connectivity/source/drivers/component/CTable.cxx
@@ -18,32 +18,8 @@
*/
#include <component/CTable.hxx>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
-#include <com/sun/star/sdbc/DataType.hpp>
-#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
-#include <com/sun/star/sheet/XSpreadsheet.hpp>
-#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
-#include <com/sun/star/sheet/XCellRangesQuery.hpp>
-#include <com/sun/star/sheet/XDatabaseRanges.hpp>
-#include <com/sun/star/sheet/XDatabaseRange.hpp>
-#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
-#include <com/sun/star/sheet/XUsedAreaCursor.hpp>
-#include <com/sun/star/sheet/CellFlags.hpp>
-#include <com/sun/star/sheet/FormulaResult.hpp>
-#include <com/sun/star/util/NumberFormat.hpp>
-#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
-#include <com/sun/star/text/XText.hpp>
-#include <svl/converter.hxx>
#include <component/CColumns.hxx>
-#include <connectivity/sdbcx/VColumn.hxx>
-#include <rtl/ustrbuf.hxx>
-#include <osl/thread.h>
#include <cppuhelper/queryinterface.hxx>
-#include <svl/zforlist.hxx>
-#include <rtl/math.hxx>
-#include <connectivity/dbexception.hxx>
-#include <connectivity/dbconversion.hxx>
using namespace connectivity;
using namespace connectivity::component;
@@ -57,8 +33,6 @@ using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::sheet;
-using namespace ::com::sun::star::table;
-using namespace ::com::sun::star::text;
using namespace ::com::sun::star::util;
diff --git a/connectivity/source/drivers/dbase/DColumns.cxx b/connectivity/source/drivers/dbase/DColumns.cxx
index b06bdd99173c..6f884dca8572 100644
--- a/connectivity/source/drivers/dbase/DColumns.cxx
+++ b/connectivity/source/drivers/dbase/DColumns.cxx
@@ -20,7 +20,6 @@
#include <dbase/DColumns.hxx>
#include <dbase/DTable.hxx>
#include <connectivity/sdbcx/VColumn.hxx>
-#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
using namespace connectivity::dbase;
using namespace connectivity;
diff --git a/connectivity/source/drivers/dbase/DConnection.cxx b/connectivity/source/drivers/dbase/DConnection.cxx
index c9881aed6f92..7c577b7c9541 100644
--- a/connectivity/source/drivers/dbase/DConnection.cxx
+++ b/connectivity/source/drivers/dbase/DConnection.cxx
@@ -22,7 +22,6 @@
#include <dbase/DDatabaseMetaData.hxx>
#include <dbase/DCatalog.hxx>
#include <dbase/DDriver.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <dbase/DPreparedStatement.hxx>
#include <dbase/DStatement.hxx>
#include <connectivity/dbexception.hxx>
diff --git a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
index 5aad3708e908..b896e942cb01 100644
--- a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
@@ -21,14 +21,11 @@
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/sdbc/ColumnSearch.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
-#include <com/sun/star/sdbc/ResultSetType.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/sdbcx/XIndexesSupplier.hpp>
#include <FDatabaseMetaDataResultSet.hxx>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <dbase/DIndex.hxx>
#include <connectivity/FValue.hxx>
#include <comphelper/processfactory.hxx>
diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx
index 5e4afbc94eb8..0dae008f981f 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -19,17 +19,13 @@
#include <dbase/DIndex.hxx>
#include <dbase/DIndexColumns.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <connectivity/sdbcx/VColumn.hxx>
#include <dbase/DTable.hxx>
#include <dbase/DIndexIter.hxx>
#include <osl/file.hxx>
#include <sal/log.hxx>
#include <tools/config.hxx>
#include <connectivity/CommonTools.hxx>
-#include <com/sun/star/sdbc/XResultSetMetaData.hpp>
#include <com/sun/star/sdbc/XResultSet.hpp>
-#include <com/sun/star/sdbcx/XRowLocate.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <unotools/ucbhelper.hxx>
#include <comphelper/servicehelper.hxx>
diff --git a/connectivity/source/drivers/dbase/DIndexColumns.cxx b/connectivity/source/drivers/dbase/DIndexColumns.cxx
index 533a6023ef2a..2ad8c3aa8987 100644
--- a/connectivity/source/drivers/dbase/DIndexColumns.cxx
+++ b/connectivity/source/drivers/dbase/DIndexColumns.cxx
@@ -21,7 +21,6 @@
#include <dbase/DTable.hxx>
#include <connectivity/sdbcx/VIndexColumn.hxx>
#include <comphelper/types.hxx>
-#include <connectivity/dbexception.hxx>
using namespace ::comphelper;
diff --git a/connectivity/source/drivers/dbase/DResultSet.cxx b/connectivity/source/drivers/dbase/DResultSet.cxx
index 22826ec2fd0f..2ca942fecdc8 100644
--- a/connectivity/source/drivers/dbase/DResultSet.cxx
+++ b/connectivity/source/drivers/dbase/DResultSet.cxx
@@ -19,7 +19,6 @@
#include <com/sun/star/sdbcx/CompareBookmark.hpp>
#include <dbase/DResultSet.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <comphelper/sequence.hxx>
#include <comphelper/servicehelper.hxx>
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 56f9f8d5eee1..06d0fdf7d576 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -26,18 +26,14 @@
#include <svl/converter.hxx>
#include <dbase/DConnection.hxx>
#include <dbase/DColumns.hxx>
-#include <osl/thread.h>
#include <tools/config.hxx>
#include <dbase/DIndex.hxx>
#include <dbase/DIndexes.hxx>
#include <comphelper/processfactory.hxx>
-#include <svl/zforlist.hxx>
-#include <unotools/syslocale.hxx>
#include <rtl/math.hxx>
#include <ucbhelper/content.hxx>
#include <com/sun/star/ucb/ContentCreationException.hpp>
#include <connectivity/dbexception.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <comphelper/property.hxx>
#include <comphelper/servicehelper.hxx>
@@ -48,13 +44,14 @@
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <cppuhelper/queryinterface.hxx>
-#include <connectivity/PColumn.hxx>
#include <connectivity/dbtools.hxx>
#include <connectivity/FValue.hxx>
#include <connectivity/dbconversion.hxx>
+#include <connectivity/sdbcx/VColumn.hxx>
#include <strings.hrc>
#include <rtl/strbuf.hxx>
#include <sal/log.hxx>
+#include <tools/date.hxx>
#include <algorithm>
#include <cassert>
diff --git a/connectivity/source/drivers/dbase/DTables.cxx b/connectivity/source/drivers/dbase/DTables.cxx
index 8f218811037b..1d922969493f 100644
--- a/connectivity/source/drivers/dbase/DTables.cxx
+++ b/connectivity/source/drivers/dbase/DTables.cxx
@@ -23,11 +23,6 @@
#include <dbase/DTables.hxx>
#include <dbase/DTable.hxx>
#include <com/sun/star/sdbc/SQLException.hpp>
-#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/sdbc/XResultSet.hpp>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
-#include <com/sun/star/sdbc/KeyRule.hpp>
-#include <com/sun/star/sdbcx/KeyType.hpp>
#include <file/FCatalog.hxx>
#include <file/FConnection.hxx>
#include <com/sun/star/lang/XUnoTunnel.hpp>
diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx
index 251563e4d1d5..43db753bdaf9 100644
--- a/connectivity/source/drivers/dbase/dindexnode.cxx
+++ b/connectivity/source/drivers/dbase/dindexnode.cxx
@@ -18,8 +18,6 @@
*/
#include <dbase/dindexnode.hxx>
-#include <connectivity/CommonTools.hxx>
-#include <osl/thread.h>
#include <dbase/DIndex.hxx>
#include <tools/debug.hxx>
#include <tools/stream.hxx>
diff --git a/connectivity/source/drivers/evoab2/NColumns.cxx b/connectivity/source/drivers/evoab2/NColumns.cxx
index c74751628f84..378e2af77634 100644
--- a/connectivity/source/drivers/evoab2/NColumns.cxx
+++ b/connectivity/source/drivers/evoab2/NColumns.cxx
@@ -20,8 +20,6 @@
#include "NColumns.hxx"
#include "NTable.hxx"
-#include "NTables.hxx"
-#include "NCatalog.hxx"
#include <connectivity/sdbcx/VColumn.hxx>
#include <com/sun/star/sdbc/XRow.hpp>
diff --git a/connectivity/source/drivers/evoab2/NConnection.cxx b/connectivity/source/drivers/evoab2/NConnection.cxx
index 5355a55b786d..d586d6ba2df1 100644
--- a/connectivity/source/drivers/evoab2/NConnection.cxx
+++ b/connectivity/source/drivers/evoab2/NConnection.cxx
@@ -20,7 +20,6 @@
#include "NConnection.hxx"
#include "NDatabaseMetaData.hxx"
#include "NCatalog.hxx"
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/sdbc/TransactionIsolation.hpp>
#include "NPreparedStatement.hxx"
#include "NStatement.hxx"
diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
index 4ec577c5874c..85673db40afe 100644
--- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
@@ -19,16 +19,12 @@
#include "NDatabaseMetaData.hxx"
#include <com/sun/star/sdbc/DataType.hpp>
-#include <com/sun/star/sdbc/ResultSetType.hpp>
-#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
#include <com/sun/star/sdbc/TransactionIsolation.hpp>
#include <connectivity/dbexception.hxx>
#include <connectivity/FValue.hxx>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/sdbc/ColumnSearch.hpp>
#include <cstddef>
-#include <vector>
#include <string.h>
#include "EApi.h"
diff --git a/connectivity/source/drivers/evoab2/NDriver.cxx b/connectivity/source/drivers/evoab2/NDriver.cxx
index fdbebf0000f4..d7f4e376a9ab 100644
--- a/connectivity/source/drivers/evoab2/NDriver.cxx
+++ b/connectivity/source/drivers/evoab2/NDriver.cxx
@@ -21,13 +21,8 @@
#include "NConnection.hxx"
#include <com/sun/star/lang/DisposedException.hpp>
#include <connectivity/dbexception.hxx>
-#include <osl/file.hxx>
-#include <osl/security.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/ucb/XContentAccess.hpp>
-#include <com/sun/star/ucb/XCommandEnvironment.hpp>
-#include <ucbhelper/content.hxx>
-#include <signal.h>
#include <strings.hrc>
#include <resource/sharedresources.hxx>
diff --git a/connectivity/source/drivers/evoab2/NPreparedStatement.cxx b/connectivity/source/drivers/evoab2/NPreparedStatement.cxx
index 1f4f04a63150..57981e95e82d 100644
--- a/connectivity/source/drivers/evoab2/NPreparedStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NPreparedStatement.cxx
@@ -19,10 +19,6 @@
#include "NPreparedStatement.hxx"
-#include <com/sun/star/sdbc/DataType.hpp>
-#include <cppuhelper/typeprovider.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <propertyids.hxx>
#include <connectivity/dbexception.hxx>
#include <connectivity/dbtools.hxx>
#include <tools/diagnose_ex.h>
diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx
index 1341e5a33c68..3768c09dd3ad 100644
--- a/connectivity/source/drivers/evoab2/NResultSet.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSet.cxx
@@ -23,23 +23,17 @@
#include "NResultSet.hxx"
#include <propertyids.hxx>
#include <strings.hrc>
-#include <TSortIndex.hxx>
-#include <algorithm>
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/sdb/ErrorCondition.hpp>
-#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/FetchDirection.hpp>
#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
#include <com/sun/star/sdbc/ResultSetType.hpp>
#include <comphelper/sequence.hxx>
-#include <comphelper/types.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <connectivity/dbexception.hxx>
#include <connectivity/sqlerror.hxx>
-#include <cppuhelper/typeprovider.hxx>
#include <rtl/string.hxx>
#include <sal/log.hxx>
#include <tools/diagnose_ex.h>
@@ -48,7 +42,6 @@
#include <unotools/collatorwrapper.hxx>
#include <cstring>
-#include <vector>
namespace connectivity { namespace evoab {
diff --git a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
index 7d9f0d152d76..9bbff49ccc7b 100644
--- a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
@@ -20,7 +20,6 @@
#include "NResultSetMetaData.hxx"
#include "NDatabaseMetaData.hxx"
#include <connectivity/dbexception.hxx>
-#include <com/sun/star/sdbc/DataType.hpp>
#include <strings.hrc>
using namespace connectivity::evoab;
diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx
index dc39832c1bd9..94f50e7177c1 100644
--- a/connectivity/source/drivers/evoab2/NStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NStatement.cxx
@@ -18,7 +18,6 @@
*/
#include <osl/diagnose.h>
-#include <osl/thread.h>
#include <rtl/ustring.hxx>
#include <sal/log.hxx>
#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
diff --git a/connectivity/source/drivers/evoab2/NTable.cxx b/connectivity/source/drivers/evoab2/NTable.cxx
index 1e18b8a1f6cd..b5c652a8ff67 100644
--- a/connectivity/source/drivers/evoab2/NTable.cxx
+++ b/connectivity/source/drivers/evoab2/NTable.cxx
@@ -19,9 +19,7 @@
#include "NTable.hxx"
-#include "NTables.hxx"
#include "NColumns.hxx"
-#include "NCatalog.hxx"
#include <com/sun/star/sdbc/XRow.hpp>
diff --git a/connectivity/source/drivers/evoab2/NTables.cxx b/connectivity/source/drivers/evoab2/NTables.cxx
index 757445866f40..b7a844fac15d 100644
--- a/connectivity/source/drivers/evoab2/NTables.cxx
+++ b/connectivity/source/drivers/evoab2/NTables.cxx
@@ -20,15 +20,7 @@
#include "NTables.hxx"
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/XResultSet.hpp>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
-#include <com/sun/star/sdbc/KeyRule.hpp>
-#include <com/sun/star/sdbcx/KeyType.hpp>
-#include <connectivity/sdbcx/VTable.hxx>
#include "NCatalog.hxx"
-#include "NConnection.hxx"
-#include <connectivity/dbtools.hxx>
-#include <connectivity/dbexception.hxx>
-#include <cppuhelper/interfacecontainer.h>
#include <comphelper/types.hxx>
#include "NTable.hxx"
using namespace ::comphelper;
diff --git a/connectivity/source/drivers/file/FColumns.cxx b/connectivity/source/drivers/file/FColumns.cxx
index 4fe835fc921b..e703112f71c4 100644
--- a/connectivity/source/drivers/file/FColumns.cxx
+++ b/connectivity/source/drivers/file/FColumns.cxx
@@ -21,8 +21,6 @@
#include <connectivity/sdbcx/VColumn.hxx>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/XResultSet.hpp>
-#include <com/sun/star/sdbc/DataType.hpp>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <file/FTable.hxx>
using namespace connectivity::file;
diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx
index 3eeea6735f1e..5c56ce4d5e5d 100644
--- a/connectivity/source/drivers/file/FConnection.cxx
+++ b/connectivity/source/drivers/file/FConnection.cxx
@@ -27,9 +27,6 @@
#include <file/FDriver.hxx>
#include <file/FStatement.hxx>
#include <file/FPreparedStatement.hxx>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
-#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/ucb/ContentCreationException.hpp>
#include <com/sun/star/ucb/XContent.hpp>
@@ -42,7 +39,6 @@
#include <connectivity/dbexception.hxx>
#include <o3tl/any.hxx>
#include <osl/thread.h>
-#include <osl/nlsupport.h>
#include <strings.hrc>
using namespace connectivity::file;
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index 44404f98267a..3d01216a39fd 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -19,14 +19,9 @@
#include <file/FDatabaseMetaData.hxx>
#include <FDatabaseMetaDataResultSet.hxx>
-#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/ResultSetType.hpp>
-#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
-#include <com/sun/star/ucb/SearchRecursion.hpp>
-#include <com/sun/star/ucb/SearchCommandArgument.hpp>
#include <com/sun/star/ucb/UniversalContentBroker.hpp>
#include <com/sun/star/ucb/SortedDynamicResultSetFactory.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <tools/urlobj.hxx>
#include <sal/log.hxx>
#include <file/FDriver.hxx>
diff --git a/connectivity/source/drivers/file/FDriver.cxx b/connectivity/source/drivers/file/FDriver.cxx
index 367fd1f3416c..c2956adc279b 100644
--- a/connectivity/source/drivers/file/FDriver.cxx
+++ b/connectivity/source/drivers/file/FDriver.cxx
@@ -20,7 +20,6 @@
#include <file/FDriver.hxx>
#include <file/FConnection.hxx>
#include <file/fcode.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <comphelper/types.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <connectivity/dbexception.hxx>
diff --git a/connectivity/source/drivers/file/FPreparedStatement.cxx b/connectivity/source/drivers/file/FPreparedStatement.cxx
index b82a702a7c95..9cf70d452c10 100644
--- a/connectivity/source/drivers/file/FPreparedStatement.cxx
+++ b/connectivity/source/drivers/file/FPreparedStatement.cxx
@@ -18,7 +18,6 @@
*/
-#include <connectivity/sdbcx/VColumn.hxx>
#include <osl/diagnose.h>
#include <file/FPreparedStatement.hxx>
#include <com/sun/star/sdbc/DataType.hpp>
@@ -26,7 +25,6 @@
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/sequence.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <connectivity/dbconversion.hxx>
#include <connectivity/dbexception.hxx>
#include <connectivity/dbtools.hxx>
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx
index 29c2d1caeb95..adcbb0897197 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -18,23 +18,15 @@
*/
-#ifdef __GNUC__
-#include <iostream>
-#endif
-#include <connectivity/sdbcx/VColumn.hxx>
#include <file/FResultSet.hxx>
#include <sqlbison.hxx>
#include <file/FResultSetMetaData.hxx>
#include <com/sun/star/sdbc/DataType.hpp>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
-#include <comphelper/property.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <comphelper/sequence.hxx>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/typeprovider.hxx>
-#include <connectivity/dbconversion.hxx>
#include <connectivity/dbtools.hxx>
#include <cppuhelper/propshlp.hxx>
#include <sal/log.hxx>
diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx
index 3d45af9f3648..24e176d140c2 100644
--- a/connectivity/source/drivers/file/FStatement.cxx
+++ b/connectivity/source/drivers/file/FStatement.cxx
@@ -23,13 +23,11 @@
#include <sqlbison.hxx>
#include <file/FDriver.hxx>
#include <file/FResultSet.hxx>
-#include <osl/thread.h>
#include <sal/log.hxx>
#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
#include <com/sun/star/sdbc/ResultSetType.hpp>
#include <com/sun/star/sdbc/FetchDirection.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
-#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/types.hxx>
diff --git a/connectivity/source/drivers/file/FTable.cxx b/connectivity/source/drivers/file/FTable.cxx
index 11c46f73f455..b47bfb811a1f 100644
--- a/connectivity/source/drivers/file/FTable.cxx
+++ b/connectivity/source/drivers/file/FTable.cxx
@@ -24,8 +24,6 @@
#include <com/sun/star/sdbc/XResultSet.hpp>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/typeprovider.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <unotools/ucbstreamhelper.hxx>
using namespace connectivity;
diff --git a/connectivity/source/drivers/file/FTables.cxx b/connectivity/source/drivers/file/FTables.cxx
index 9ccf5f35903e..c063f4a890e6 100644
--- a/connectivity/source/drivers/file/FTables.cxx
+++ b/connectivity/source/drivers/file/FTables.cxx
@@ -18,14 +18,7 @@
*/
#include <file/FTables.hxx>
-#include <file/FTable.hxx>
-#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/sdbc/XResultSet.hpp>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
-#include <com/sun/star/sdbc/KeyRule.hpp>
-#include <com/sun/star/sdbcx/KeyType.hpp>
#include <file/FCatalog.hxx>
-#include <file/FConnection.hxx>
using namespace connectivity;
using namespace connectivity::file;
diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx
index 93b728827d9a..9764b14f853d 100644
--- a/connectivity/source/drivers/file/fanalyzer.cxx
+++ b/connectivity/source/drivers/file/fanalyzer.cxx
@@ -21,7 +21,6 @@
#include <connectivity/sqlparse.hxx>
#include <tools/debug.hxx>
#include <connectivity/sqlnode.hxx>
-#include <connectivity/dbexception.hxx>
#include <file/FConnection.hxx>
#include <strings.hrc>
diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx
index c4bebbfd7cca..2950b113d839 100644
--- a/connectivity/source/drivers/file/fcode.cxx
+++ b/connectivity/source/drivers/file/fcode.cxx
@@ -22,10 +22,7 @@
#include <sal/log.hxx>
#include <connectivity/sqlparse.hxx>
#include <sqlbison.hxx>
-#include <i18nlangtag/mslangid.hxx>
-#include <TConnection.hxx>
#include <com/sun/star/sdb/SQLFilterOperator.hpp>
-#include <comphelper/types.hxx>
using namespace ::comphelper;
using namespace connectivity;
diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx
index 7de9c5fb60dc..134565e3e3de 100644
--- a/connectivity/source/drivers/file/fcomp.cxx
+++ b/connectivity/source/drivers/file/fcomp.cxx
@@ -19,7 +19,6 @@
#include <file/fcomp.hxx>
#include <tools/debug.hxx>
-#include <TConnection.hxx>
#include <connectivity/sqlparse.hxx>
#include <file/fanalyzer.hxx>
#include <com/sun/star/sdbc/XColumnLocate.hpp>
diff --git a/connectivity/source/drivers/firebird/Blob.cxx b/connectivity/source/drivers/firebird/Blob.cxx
index 02f94ef0c0b1..3468a50ce3f4 100644
--- a/connectivity/source/drivers/firebird/Blob.cxx
+++ b/connectivity/source/drivers/firebird/Blob.cxx
@@ -8,7 +8,6 @@
*/
#include "Blob.hxx"
-#include "Connection.hxx"
#include "Util.hxx"
#include <com/sun/star/io/BufferSizeExceededException.hpp>
@@ -17,9 +16,9 @@
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
+#include <connectivity/CommonTools.hxx>
#include <connectivity/dbexception.hxx>
#include <cppuhelper/exc_hlp.hxx>
-#include <sal/log.hxx>
#include <tools/diagnose_ex.h>
using namespace ::connectivity::firebird;
diff --git a/connectivity/source/drivers/firebird/Clob.cxx b/connectivity/source/drivers/firebird/Clob.cxx
index 5f73f8150727..2038dfc11350 100644
--- a/connectivity/source/drivers/firebird/Clob.cxx
+++ b/connectivity/source/drivers/firebird/Clob.cxx
@@ -13,11 +13,9 @@
#include "Clob.hxx"
#include "Blob.hxx"
-#include "Connection.hxx"
-#include "Util.hxx"
+#include <connectivity/CommonTools.hxx>
#include <connectivity/dbexception.hxx>
-#include <cppuhelper/exc_hlp.hxx>
using namespace ::connectivity::firebird;
diff --git a/connectivity/source/drivers/firebird/Column.cxx b/connectivity/source/drivers/firebird/Column.cxx
index 9c13499f8772..31767bf9c4b5 100644
--- a/connectivity/source/drivers/firebird/Column.cxx
+++ b/connectivity/source/drivers/firebird/Column.cxx
@@ -7,7 +7,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include "Columns.hxx"
#include "Column.hxx"
#include <TConnection.hxx>
diff --git a/connectivity/source/drivers/firebird/Columns.cxx b/connectivity/source/drivers/firebird/Columns.cxx
index 38c40820ca60..293dac97dc5b 100644
--- a/connectivity/source/drivers/firebird/Columns.cxx
+++ b/connectivity/source/drivers/firebird/Columns.cxx
@@ -10,8 +10,6 @@
#include "Columns.hxx"
#include "Column.hxx"
-#include <com/sun/star/sdbc/XRow.hpp>
-
using namespace ::connectivity;
using namespace ::connectivity::firebird;
using namespace ::connectivity::sdbcx;
diff --git a/connectivity/source/drivers/firebird/Connection.cxx b/connectivity/source/drivers/firebird/Connection.cxx
index df278084c178..58aad4e1939e 100644
--- a/connectivity/source/drivers/firebird/Connection.cxx
+++ b/connectivity/source/drivers/firebird/Connection.cxx
@@ -25,26 +25,21 @@
#include "Driver.hxx"
#include "PreparedStatement.hxx"
#include "Statement.hxx"
-#include "Tables.hxx"
#include "Util.hxx"
#include <stdexcept>
#include <com/sun/star/document/XDocumentEventBroadcaster.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
-#include <com/sun/star/io/TempFile.hpp>
#include <com/sun/star/io/XStream.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <com/sun/star/lang/EventObject.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
+#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/TransactionIsolation.hpp>
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <com/sun/star/ucb/XSimpleFileAccess2.hpp>
#include <connectivity/dbexception.hxx>
-#include <connectivity/sqlparse.hxx>
#include <strings.hrc>
#include <resource/sharedresources.hxx>
diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
index e77322e86f6e..3fa2c613cb04 100644
--- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
+++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
@@ -33,7 +33,6 @@
#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdbc/TransactionIsolation.hpp>
-#include <com/sun/star/sdbc/XParameters.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/KeyRule.hpp>
#include <com/sun/star/sdbc/Deferrability.hpp>
diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx
index 4586cc4a3ba4..002723d9a697 100644
--- a/connectivity/source/drivers/firebird/PreparedStatement.cxx
+++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx
@@ -30,14 +30,11 @@
#include <comphelper/sequence.hxx>
#include <connectivity/dbexception.hxx>
-#include <cppuhelper/typeprovider.hxx>
#include <propertyids.hxx>
-#include <time.h>
#include <connectivity/dbtools.hxx>
#include <sal/log.hxx>
#include <com/sun/star/sdbc/DataType.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
using namespace connectivity::firebird;
diff --git a/connectivity/source/drivers/firebird/ResultSet.cxx b/connectivity/source/drivers/firebird/ResultSet.cxx
index 257ff0675c80..9409701d431f 100644
--- a/connectivity/source/drivers/firebird/ResultSet.cxx
+++ b/connectivity/source/drivers/firebird/ResultSet.cxx
@@ -22,24 +22,19 @@
#include "Util.hxx"
#include <comphelper/sequence.hxx>
-#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <connectivity/dbexception.hxx>
#include <propertyids.hxx>
-#include <rtl/string.hxx>
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
-#include <time.h>
#include <TConnection.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/FetchDirection.hpp>
#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
#include <com/sun/star/sdbc/ResultSetType.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
-#include <com/sun/star/sdbcx/CompareBookmark.hpp>
using namespace ::comphelper;
using namespace ::connectivity;
diff --git a/connectivity/source/drivers/firebird/Statement.cxx b/connectivity/source/drivers/firebird/Statement.cxx
index 285f68257074..418c66a7d0cd 100644
--- a/connectivity/source/drivers/firebird/Statement.cxx
+++ b/connectivity/source/drivers/firebird/Statement.cxx
@@ -18,22 +18,14 @@
*/
#include "Connection.hxx"
-#include "Driver.hxx"
#include "ResultSet.hxx"
#include "Statement.hxx"
#include "Util.hxx"
#include <comphelper/sequence.hxx>
#include <cppuhelper/queryinterface.hxx>
-#include <osl/thread.h>
-#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
-#include <com/sun/star/sdbc/ResultSetType.hpp>
-#include <com/sun/star/sdbc/FetchDirection.hpp>
-
using namespace connectivity::firebird;
using namespace com::sun::star;
diff --git a/connectivity/source/drivers/firebird/StatementCommonBase.cxx b/connectivity/source/drivers/firebird/StatementCommonBase.cxx
index 097234e9f1e2..c1219d74b8ed 100644
--- a/connectivity/source/drivers/firebird/StatementCommonBase.cxx
+++ b/connectivity/source/drivers/firebird/StatementCommonBase.cxx
@@ -18,7 +18,6 @@
*/
#include "Driver.hxx"
-#include "ResultSet.hxx"
#include "StatementCommonBase.hxx"
#include "Util.hxx"
diff --git a/connectivity/source/drivers/firebird/Users.cxx b/connectivity/source/drivers/firebird/Users.cxx
index 0423d9c33181..4225b490aa8c 100644
--- a/connectivity/source/drivers/firebird/Users.cxx
+++ b/connectivity/source/drivers/firebird/Users.cxx
@@ -10,10 +10,6 @@
#include "User.hxx"
#include "Users.hxx"
-#include <connectivity/dbtools.hxx>
-
-#include <com/sun/star/sdbc/XRow.hpp>
-
using namespace ::connectivity;
using namespace ::connectivity::firebird;
using namespace ::connectivity::sdbcx;
diff --git a/connectivity/source/drivers/firebird/Util.cxx b/connectivity/source/drivers/firebird/Util.cxx
index c89540c1d90b..020dffbf2076 100644
--- a/connectivity/source/drivers/firebird/Util.cxx
+++ b/connectivity/source/drivers/firebird/Util.cxx
@@ -9,7 +9,6 @@
#include "Util.hxx"
#include <rtl/ustrbuf.hxx>
-#include <rtl/strbuf.hxx>
#include <sal/log.hxx>
#include <com/sun/star/sdbc/DataType.hpp>
diff --git a/connectivity/source/drivers/flat/EColumns.cxx b/connectivity/source/drivers/flat/EColumns.cxx
index 6336753d30d9..3aae644f2e99 100644
--- a/connectivity/source/drivers/flat/EColumns.cxx
+++ b/connectivity/source/drivers/flat/EColumns.cxx
@@ -19,7 +19,6 @@
#include <flat/EColumns.hxx>
#include <flat/ETable.hxx>
-#include <connectivity/sdbcx/VColumn.hxx>
using namespace connectivity::flat;
using namespace connectivity;
diff --git a/connectivity/source/drivers/flat/EConnection.cxx b/connectivity/source/drivers/flat/EConnection.cxx
index 8091c435ac4c..5127d903cc6d 100644
--- a/connectivity/source/drivers/flat/EConnection.cxx
+++ b/connectivity/source/drivers/flat/EConnection.cxx
@@ -21,7 +21,6 @@
#include <flat/EDatabaseMetaData.hxx>
#include <flat/ECatalog.hxx>
#include <flat/EDriver.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <flat/EPreparedStatement.hxx>
#include <flat/EStatement.hxx>
#include <connectivity/dbexception.hxx>
diff --git a/connectivity/source/drivers/flat/EDatabaseMetaData.cxx b/connectivity/source/drivers/flat/EDatabaseMetaData.cxx
index 76a19797bfa7..b69b34e363c3 100644
--- a/connectivity/source/drivers/flat/EDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/flat/EDatabaseMetaData.cxx
@@ -20,15 +20,10 @@
#include <flat/EDatabaseMetaData.hxx>
#include <com/sun/star/sdbc/ColumnSearch.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
-#include <com/sun/star/sdbc/ResultSetType.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
-#include <com/sun/star/beans/XFastPropertySet.hpp>
-#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#include <com/sun/star/sdbcx/XIndexesSupplier.hpp>
#include <FDatabaseMetaDataResultSet.hxx>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <comphelper/types.hxx>
using namespace ::comphelper;
diff --git a/connectivity/source/drivers/flat/EResultSet.cxx b/connectivity/source/drivers/flat/EResultSet.cxx
index 6247e2759b51..150c7971b1c9 100644
--- a/connectivity/source/drivers/flat/EResultSet.cxx
+++ b/connectivity/source/drivers/flat/EResultSet.cxx
@@ -20,7 +20,6 @@
#include <com/sun/star/sdbcx/CompareBookmark.hpp>
#include <com/sun/star/sdbcx/XDeleteRows.hpp>
#include <flat/EResultSet.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <comphelper/sequence.hxx>
#include <comphelper/types.hxx>
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index 450383cbb0a1..2da5d6ab8570 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -22,11 +22,8 @@
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/ucb/XContentAccess.hpp>
-#include <svl/converter.hxx>
#include <flat/EConnection.hxx>
#include <flat/EColumns.hxx>
-#include <osl/thread.h>
-#include <svl/zforlist.hxx>
#include <rtl/math.hxx>
#include <sal/log.hxx>
#include <tools/solar.h>
@@ -34,18 +31,15 @@
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/numbers.hxx>
-#include <comphelper/processfactory.hxx>
#include <comphelper/servicehelper.hxx>
-#include <comphelper/types.hxx>
-#include <flat/EDriver.hxx>
#include <com/sun/star/util/NumberFormat.hpp>
#include <com/sun/star/util/NumberFormatter.hpp>
#include <com/sun/star/util/NumberFormatsSupplier.hpp>
-#include <unotools/configmgr.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <connectivity/dbconversion.hxx>
#include <connectivity/sdbcx/VColumn.hxx>
#include <file/quotedstring.hxx>
+#include <file/FDriver.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/charclass.hxx>
@@ -54,7 +48,6 @@ using namespace connectivity;
using namespace connectivity::flat;
using namespace connectivity::file;
using namespace ::cppu;
-using namespace utl;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::ucb;
using namespace ::com::sun::star::beans;
diff --git a/connectivity/source/drivers/flat/ETables.cxx b/connectivity/source/drivers/flat/ETables.cxx
index f38b73e81167..81f366a9e7d0 100644
--- a/connectivity/source/drivers/flat/ETables.cxx
+++ b/connectivity/source/drivers/flat/ETables.cxx
@@ -19,13 +19,7 @@
#include <flat/ETables.hxx>
#include <flat/ETable.hxx>
-#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/sdbc/XResultSet.hpp>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
-#include <com/sun/star/sdbc/KeyRule.hpp>
-#include <com/sun/star/sdbcx/KeyType.hpp>
#include <file/FCatalog.hxx>
-#include <file/FConnection.hxx>
using namespace connectivity;
using namespace ::comphelper;
diff --git a/connectivity/source/drivers/hsqldb/HConnection.cxx b/connectivity/source/drivers/hsqldb/HConnection.cxx
index af6f49afee17..497b2cec2fa1 100644
--- a/connectivity/source/drivers/hsqldb/HConnection.cxx
+++ b/connectivity/source/drivers/hsqldb/HConnection.cxx
@@ -29,7 +29,6 @@
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/graphic/GraphicProvider.hpp>
#include <com/sun/star/graphic/XGraphicProvider.hpp>
-#include <com/sun/star/graphic/GraphicColorMode.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/sdbc/XDatabaseMetaData2.hpp>
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx
index de64ef4a14ef..7e006ecb61a2 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <config_folders.h>
-
#include <hsqldb/HDriver.hxx>
#include <hsqldb/HConnection.hxx>
#include <osl/diagnose.h>
@@ -26,7 +24,6 @@
#include <connectivity/dbexception.hxx>
#include <com/sun/star/configuration/theDefaultProvider.hpp>
#include <com/sun/star/sdbc/DriverManager.hpp>
-#include <com/sun/star/sdbc/XDriverAccess.hpp>
#include <com/sun/star/sdbc/XResultSet.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/embed/XTransactionBroadcaster.hpp>
@@ -37,7 +34,6 @@
#include <com/sun/star/reflection/XProxyFactory.hpp>
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/frame/Desktop.hpp>
-#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/util/XFlushable.hpp>
#include "HTerminateListener.hxx"
#include <hsqldb/HCatalog.hxx>
diff --git a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
index bdb3ec58df0a..f5d4110a36f0 100644
--- a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
@@ -19,8 +19,6 @@
#include <hsqldb/HStorageAccess.hxx>
#include <com/sun/star/embed/XStorage.hpp>
-#include <com/sun/star/embed/ElementModes.hpp>
-#include <com/sun/star/io/XStream.hpp>
#include <hsqldb/HStorageMap.hxx>
#include "accesslog.hxx"
#include <osl/diagnose.h>
diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
index 04116d02f036..3d6afc05b310 100644
--- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
@@ -24,7 +24,6 @@
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <osl/diagnose.h>
-#include <osl/thread.h>
#include <sal/log.hxx>
#include <uno/mapping.hxx>
#include <algorithm>
diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx
index ab7d95812f40..f8dee57c510c 100644
--- a/connectivity/source/drivers/hsqldb/HTable.cxx
+++ b/connectivity/source/drivers/hsqldb/HTable.cxx
@@ -17,27 +17,16 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <string.h>
#include <hsqldb/HTable.hxx>
-#include <hsqldb/HTables.hxx>
-#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/sdbc/XResultSet.hpp>
-#include <com/sun/star/sdbcx/KeyType.hpp>
-#include <com/sun/star/sdbc/KeyRule.hpp>
#include <cppuhelper/typeprovider.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/sdbcx/Privilege.hpp>
#include <comphelper/property.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/types.hxx>
#include <connectivity/dbtools.hxx>
-#include <connectivity/sdbcx/VColumn.hxx>
#include <connectivity/TKeys.hxx>
#include <connectivity/TIndexes.hxx>
-#include <connectivity/TColumnsHelper.hxx>
-#include <hsqldb/HCatalog.hxx>
#include <hsqldb/HColumns.hxx>
#include <TConnection.hxx>
diff --git a/connectivity/source/drivers/hsqldb/HTables.cxx b/connectivity/source/drivers/hsqldb/HTables.cxx
index c2b13cfe79ca..b98d57c774ab 100644
--- a/connectivity/source/drivers/hsqldb/HTables.cxx
+++ b/connectivity/source/drivers/hsqldb/HTables.cxx
@@ -22,14 +22,9 @@
#include <hsqldb/HTable.hxx>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/XResultSet.hpp>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/sdbcx/Privilege.hpp>
-#include <com/sun/star/sdbc/KeyRule.hpp>
-#include <com/sun/star/sdbcx/KeyType.hpp>
#include <hsqldb/HCatalog.hxx>
#include <connectivity/dbtools.hxx>
-#include <connectivity/dbexception.hxx>
-#include <cppuhelper/interfacecontainer.h>
#include <comphelper/types.hxx>
#include <TConnection.hxx>
diff --git a/connectivity/source/drivers/hsqldb/HUsers.cxx b/connectivity/source/drivers/hsqldb/HUsers.cxx
index c6992c9328c3..40d1f5243cb6 100644
--- a/connectivity/source/drivers/hsqldb/HUsers.cxx
+++ b/connectivity/source/drivers/hsqldb/HUsers.cxx
@@ -19,12 +19,8 @@
#include <hsqldb/HUsers.hxx>
#include <hsqldb/HUser.hxx>
-#include <hsqldb/HTable.hxx>
-#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/sdbc/XResultSet.hpp>
#include <connectivity/sdbcx/IRefreshable.hxx>
#include <comphelper/types.hxx>
-#include <connectivity/dbexception.hxx>
#include <connectivity/dbtools.hxx>
#include <TConnection.hxx>
diff --git a/connectivity/source/drivers/hsqldb/HView.cxx b/connectivity/source/drivers/hsqldb/HView.cxx
index 0eb3fd9439e4..f0e53e8534fd 100644
--- a/connectivity/source/drivers/hsqldb/HView.cxx
+++ b/connectivity/source/drivers/hsqldb/HView.cxx
@@ -23,7 +23,6 @@
#include <propertyids.hxx>
-#include <connectivity/dbexception.hxx>
#include <connectivity/dbtools.hxx>
#include <com/sun/star/lang/WrappedTargetException.hpp>
diff --git a/connectivity/source/drivers/hsqldb/HViews.cxx b/connectivity/source/drivers/hsqldb/HViews.cxx
index 8914d4e5b945..e67a9fa14f86 100644
--- a/connectivity/source/drivers/hsqldb/HViews.cxx
+++ b/connectivity/source/drivers/hsqldb/HViews.cxx
@@ -21,16 +21,8 @@
#include <hsqldb/HTables.hxx>
#include <hsqldb/HViews.hxx>
#include <hsqldb/HView.hxx>
-#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/sdbc/XResultSet.hpp>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
-#include <com/sun/star/sdbc/KeyRule.hpp>
-#include <com/sun/star/sdbcx/KeyType.hpp>
-#include <com/sun/star/sdbcx/CheckOption.hpp>
#include <hsqldb/HCatalog.hxx>
#include <connectivity/dbtools.hxx>
-#include <connectivity/dbexception.hxx>
-#include <cppuhelper/interfacecontainer.h>
#include <comphelper/types.hxx>
#include <TConnection.hxx>
diff --git a/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx b/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx
index 756b2d008da9..b8b698f50254 100644
--- a/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx
+++ b/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx
@@ -21,12 +21,10 @@
#if defined(HAVE_CONFIG_H) && HAVE_CONFIG_H
#include <config.h>
#endif
-#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <hsqldb/HStorageMap.hxx>
#include <osl/diagnose.h>
-#include <sal/log.hxx>
#include <tools/diagnose_ex.h>
using namespace ::com::sun::star::container;
diff --git a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
index e6a84d46bed5..28221925dcc2 100644
--- a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
+++ b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
@@ -22,15 +22,10 @@
#include <config.h>
#endif
#include <com/sun/star/io/XStream.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/document/XDocumentSubStorageSupplier.hpp>
-#include <com/sun/star/embed/XStorage.hpp>
-#include <com/sun/star/embed/ElementModes.hpp>
#include <hsqldb/HStorageAccess.hxx>
#include <hsqldb/HStorageMap.hxx>
-#include <jvmaccess/virtualmachine.hxx>
-#include <com/sun/star/lang/XSingleComponentFactory.hpp>
#include <osl/diagnose.h>
#include "accesslog.hxx"
diff --git a/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx
index bd6229d0566e..7a4f2b7aa50c 100644
--- a/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx
+++ b/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx
@@ -21,23 +21,15 @@
#include <config.h>
#endif
-#include <uno/mapping.hxx>
-#include <uno/environment.hxx>
#include <cppuhelper/bootstrap.hxx>
-#include <cppuhelper/component_context.hxx>
+#include <osl/diagnose.h>
#include "accesslog.hxx"
#include <com/sun/star/embed/XTransactedObject.hpp>
#include <com/sun/star/io/XStream.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/document/XDocumentSubStorageSupplier.hpp>
-#include <com/sun/star/embed/XStorage.hpp>
-#include <com/sun/star/embed/ElementModes.hpp>
#include <hsqldb/HStorageAccess.hxx>
#include <hsqldb/HStorageMap.hxx>
-#include <jvmaccess/virtualmachine.hxx>
-#include <com/sun/star/lang/XSingleComponentFactory.hpp>
-
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::document;
diff --git a/connectivity/source/drivers/jdbc/Array.cxx b/connectivity/source/drivers/jdbc/Array.cxx
index a45961ff8cae..d03b019283d2 100644
--- a/connectivity/source/drivers/jdbc/Array.cxx
+++ b/connectivity/source/drivers/jdbc/Array.cxx
@@ -19,7 +19,7 @@
#include <java/sql/Array.hxx>
#include <java/tools.hxx>
-#include <java/sql/ResultSet.hxx>
+#include <osl/diagnose.h>
using namespace connectivity;
diff --git a/connectivity/source/drivers/jdbc/Blob.cxx b/connectivity/source/drivers/jdbc/Blob.cxx
index 22436a3dc282..adacd5d7c166 100644
--- a/connectivity/source/drivers/jdbc/Blob.cxx
+++ b/connectivity/source/drivers/jdbc/Blob.cxx
@@ -18,7 +18,6 @@
*/
#include <java/sql/Blob.hxx>
-#include <java/tools.hxx>
#include <java/io/InputStream.hxx>
#include <connectivity/dbexception.hxx>
#include <osl/diagnose.h>
diff --git a/connectivity/source/drivers/jdbc/Class.cxx b/connectivity/source/drivers/jdbc/Class.cxx
index c4dc3f4b5286..98d37fbcc99f 100644
--- a/connectivity/source/drivers/jdbc/Class.cxx
+++ b/connectivity/source/drivers/jdbc/Class.cxx
@@ -18,7 +18,6 @@
*/
#include <java/lang/Class.hxx>
-#include <java/tools.hxx>
#include <rtl/ustring.hxx>
using namespace connectivity;
diff --git a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
index 28ca22893e62..e1918d11c58d 100644
--- a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
+++ b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
@@ -24,7 +24,6 @@
#include <java/sql/SQLException.hxx>
#include <java/tools.hxx>
#include <java/lang/String.hxx>
-#include <connectivity/CommonTools.hxx>
#include <FDatabaseMetaDataResultSet.hxx>
#include <comphelper/types.hxx>
#include <TPrivilegesResultSet.hxx>
diff --git a/connectivity/source/drivers/jdbc/Date.cxx b/connectivity/source/drivers/jdbc/Date.cxx
index 72efea3c89c1..8adaf455aeb0 100644
--- a/connectivity/source/drivers/jdbc/Date.cxx
+++ b/connectivity/source/drivers/jdbc/Date.cxx
@@ -18,7 +18,7 @@
*/
#include <java/util/Date.hxx>
-#include <java/tools.hxx>
+
using namespace connectivity;
//************ Class: java.util.Date
diff --git a/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx b/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx
index b6dc17062cf6..9c33eeb605d0 100644
--- a/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx
+++ b/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx
@@ -18,14 +18,9 @@
*/
#include <java/sql/DriverPropertyInfo.hxx>
-#include <java/lang/Boolean.hxx>
-#include <java/tools.hxx>
-#include <java/lang/String.hxx>
using namespace connectivity;
using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
diff --git a/connectivity/source/drivers/jdbc/InputStream.cxx b/connectivity/source/drivers/jdbc/InputStream.cxx
index d21792e2c830..c384760b3a26 100644
--- a/connectivity/source/drivers/jdbc/InputStream.cxx
+++ b/connectivity/source/drivers/jdbc/InputStream.cxx
@@ -22,7 +22,6 @@
#include <com/sun/star/io/BufferSizeExceededException.hpp>
#include <java/io/InputStream.hxx>
-#include <java/tools.hxx>
#include <osl/diagnose.h>
#include <string.h>
diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx
index bc2e2ad18d66..6def8948abee 100644
--- a/connectivity/source/drivers/jdbc/JConnection.cxx
+++ b/connectivity/source/drivers/jdbc/JConnection.cxx
@@ -29,10 +29,8 @@
#include <java/sql/PreparedStatement.hxx>
#include <java/sql/CallableStatement.hxx>
#include <java/sql/SQLWarning.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/sdbc/SQLWarning.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
-#include <connectivity/sqlparse.hxx>
#include <connectivity/dbexception.hxx>
#include <java/util/Property.hxx>
#include <java/LocalRef.hxx>
@@ -40,7 +38,6 @@
#include <jvmaccess/classpath.hxx>
#include <comphelper/namedvaluecollection.hxx>
#include <cppuhelper/exc_hlp.hxx>
-#include <rtl/ustrbuf.hxx>
#include <jni.h>
#include <strings.hrc>
#include <unotools/confignode.hxx>
diff --git a/connectivity/source/drivers/jdbc/JDriver.cxx b/connectivity/source/drivers/jdbc/JDriver.cxx
index 4934deb0d199..3ec181bb305d 100644
--- a/connectivity/source/drivers/jdbc/JDriver.cxx
+++ b/connectivity/source/drivers/jdbc/JDriver.cxx
@@ -18,12 +18,7 @@
*/
#include <java/sql/Driver.hxx>
-#include <java/lang/Object.hxx>
-#include <java/lang/Class.hxx>
-#include <java/sql/DriverPropertyInfo.hxx>
#include <java/sql/Connection.hxx>
-#include <java/util/Property.hxx>
-#include <java/tools.hxx>
#include <sal/log.hxx>
#include <connectivity/dbexception.hxx>
#include <jvmfwk/framework.hxx>
diff --git a/connectivity/source/drivers/jdbc/JStatement.cxx b/connectivity/source/drivers/jdbc/JStatement.cxx
index 72f205995639..32ffe22a4897 100644
--- a/connectivity/source/drivers/jdbc/JStatement.cxx
+++ b/connectivity/source/drivers/jdbc/JStatement.cxx
@@ -34,7 +34,6 @@
#include <tools/diagnose_ex.h>
#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
#include <com/sun/star/sdbc/ResultSetType.hpp>
-#include <com/sun/star/sdbc/FetchDirection.hpp>
#include <strings.hxx>
diff --git a/connectivity/source/drivers/jdbc/Object.cxx b/connectivity/source/drivers/jdbc/Object.cxx
index 7b452a1947d9..479699750e07 100644
--- a/connectivity/source/drivers/jdbc/Object.cxx
+++ b/connectivity/source/drivers/jdbc/Object.cxx
@@ -17,15 +17,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <java/lang/Class.hxx>
#include <connectivity/CommonTools.hxx>
-#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/logging/LogLevel.hpp>
#include <java/tools.hxx>
#include <java/sql/SQLException.hxx>
#include <osl/diagnose.h>
-#include <osl/thread.h>
#include <java/LocalRef.hxx>
#include <strings.hxx>
diff --git a/connectivity/source/drivers/jdbc/Ref.cxx b/connectivity/source/drivers/jdbc/Ref.cxx
index bde596267d04..ca8e2e112815 100644
--- a/connectivity/source/drivers/jdbc/Ref.cxx
+++ b/connectivity/source/drivers/jdbc/Ref.cxx
@@ -18,7 +18,7 @@
*/
#include <java/sql/Ref.hxx>
-#include <java/tools.hxx>
+
using namespace connectivity;
//************ Class: java.sql.Ref
diff --git a/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx b/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx
index 691a136e4a2f..fdf5bfe69c29 100644
--- a/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx
+++ b/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx
@@ -19,7 +19,6 @@
#include <java/sql/ResultSetMetaData.hxx>
#include <java/sql/Connection.hxx>
-#include <java/tools.hxx>
using namespace connectivity;
using namespace ::com::sun::star::uno;
diff --git a/connectivity/source/drivers/jdbc/SQLException.cxx b/connectivity/source/drivers/jdbc/SQLException.cxx
index 0bff0890572d..55bf0996c941 100644
--- a/connectivity/source/drivers/jdbc/SQLException.cxx
+++ b/connectivity/source/drivers/jdbc/SQLException.cxx
@@ -18,13 +18,10 @@
*/
#include <java/sql/SQLException.hxx>
-#include <java/tools.hxx>
using namespace connectivity;
using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::sdbc;
-using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
//************ Class: java.sql.SQLException
diff --git a/connectivity/source/drivers/jdbc/Throwable.cxx b/connectivity/source/drivers/jdbc/Throwable.cxx
index e732d56b2892..c96f5532f38d 100644
--- a/connectivity/source/drivers/jdbc/Throwable.cxx
+++ b/connectivity/source/drivers/jdbc/Throwable.cxx
@@ -18,7 +18,7 @@
*/
#include <java/lang/Throwable.hxx>
-#include <java/tools.hxx>
+
using namespace connectivity;
//************ Class: java.lang.Throwable
diff --git a/connectivity/source/drivers/jdbc/tools.cxx b/connectivity/source/drivers/jdbc/tools.cxx
index 1d737600024c..5021d653a889 100644
--- a/connectivity/source/drivers/jdbc/tools.cxx
+++ b/connectivity/source/drivers/jdbc/tools.cxx
@@ -19,10 +19,7 @@
#include <string.h>
-#include <cstdarg>
#include <java/tools.hxx>
-#include <java/lang/String.hxx>
-#include <java/lang/Class.hxx>
#include <java/util/Property.hxx>
#include <com/sun/star/sdbc/DriverPropertyInfo.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
diff --git a/connectivity/source/drivers/mork/MColumnAlias.cxx b/connectivity/source/drivers/mork/MColumnAlias.cxx
index 9a716e3d7c34..e56c9a8442c0 100644
--- a/connectivity/source/drivers/mork/MColumnAlias.cxx
+++ b/connectivity/source/drivers/mork/MColumnAlias.cxx
@@ -19,15 +19,13 @@
#include "MColumnAlias.hxx"
-#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <officecfg/Office/DataAccess.hxx>
-#include <tools/diagnose_ex.h>
+#include <osl/diagnose.h>
#include <sal/log.hxx>
#include <algorithm>
-#include <functional>
using namespace ::connectivity::mork;
using namespace ::com::sun::star::uno;
diff --git a/connectivity/source/drivers/mork/MColumns.cxx b/connectivity/source/drivers/mork/MColumns.cxx
index 6b0b70842298..c9163a6ab96b 100644
--- a/connectivity/source/drivers/mork/MColumns.cxx
+++ b/connectivity/source/drivers/mork/MColumns.cxx
@@ -20,7 +20,6 @@
#include "MColumns.hxx"
#include <com/sun/star/sdbc/XRow.hpp>
#include <connectivity/sdbcx/VColumn.hxx>
-#include <connectivity/dbtools.hxx>
using namespace connectivity::mork;
using namespace connectivity::sdbcx;
diff --git a/connectivity/source/drivers/mork/MDatabaseMetaData.cxx b/connectivity/source/drivers/mork/MDatabaseMetaData.cxx
index 490688df3c91..d832533ec07b 100644
--- a/connectivity/source/drivers/mork/MDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/mork/MDatabaseMetaData.cxx
@@ -13,11 +13,9 @@
#include <com/sun/star/sdbc/TransactionIsolation.hpp>
#include <com/sun/star/sdbc/ColumnSearch.hpp>
#include <sal/log.hxx>
-#include <strings.hrc>
#include <vector>
#include "MDatabaseMetaDataHelper.hxx"
-#include <connectivity/dbtools.hxx>
using namespace connectivity::mork;
using namespace connectivity;
diff --git a/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx b/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx
index c8d2c15abe2c..ca699bafaefd 100644
--- a/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx
+++ b/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx
@@ -13,15 +13,6 @@
// do we need it?
static ::osl::Mutex m_aMetaMutex;
-#include <com/sun/star/uno/XInterface.hpp>
-#include <com/sun/star/uno/Exception.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/beans/Property.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/beans/XPropertySetInfo.hpp>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <com/sun/star/sdb/ErrorCondition.hpp>
-
#include <sal/log.hxx>
#include "MorkParser.hxx"
diff --git a/connectivity/source/drivers/mork/MQueryHelper.cxx b/connectivity/source/drivers/mork/MQueryHelper.cxx
index 9077f49f7cc1..aaf8cac6a682 100644
--- a/connectivity/source/drivers/mork/MQueryHelper.cxx
+++ b/connectivity/source/drivers/mork/MQueryHelper.cxx
@@ -23,12 +23,9 @@
#include "MConnection.hxx"
#include "MorkParser.hxx"
-#include <stdlib.h>
-#include <sstream>
#include <string>
#include <vector>
#include <algorithm>
-#include <string.h>
#include <strings.hrc>
diff --git a/connectivity/source/drivers/mork/MResultSetMetaData.cxx b/connectivity/source/drivers/mork/MResultSetMetaData.cxx
index d7a82dd95034..032d4d5d4494 100644
--- a/connectivity/source/drivers/mork/MResultSetMetaData.cxx
+++ b/connectivity/source/drivers/mork/MResultSetMetaData.cxx
@@ -18,10 +18,8 @@
*/
#include <connectivity/dbexception.hxx>
-#include <connectivity/dbtools.hxx>
#include <comphelper/types.hxx>
#include <comphelper/extract.hxx>
-#include <cppuhelper/typeprovider.hxx>
#include <tools/diagnose_ex.h>
#include "MResultSetMetaData.hxx"
#include <com/sun/star/sdbc/DataType.hpp>
diff --git a/connectivity/source/drivers/mork/MorkParser.cxx b/connectivity/source/drivers/mork/MorkParser.cxx
index 4d4c9a3bf6db..188f8e6fb492 100644
--- a/connectivity/source/drivers/mork/MorkParser.cxx
+++ b/connectivity/source/drivers/mork/MorkParser.cxx
@@ -35,13 +35,10 @@
#include "MorkParser.hxx"
#include <boost/io/ios_state.hpp>
#include <stdlib.h>
-#include <sstream>
#include <string>
#include <string.h>
-#include <stdexcept>
#include <fstream>
#include <iostream>
-#include <algorithm>
std::string const g_Empty = "";
diff --git a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx
index a5cffdaa2d3e..8dc7768778af 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx
@@ -22,7 +22,6 @@
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <cppuhelper/supportsservice.hxx>
#include "MMozillaBootstrap.hxx"
-#include "MNSFolders.hxx"
#include "MNSProfileDiscover.hxx"
using namespace com::sun::star::uno;
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
index 07376ab262f7..8e96aca34d8e 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
@@ -20,8 +20,6 @@
#include "MNSFolders.hxx"
#ifdef UNIX
-#include <sys/types.h>
-#include <strings.h>
#include <string.h>
#endif // End UNIX
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx
index 8d9277f99ed8..ae775b6fca01 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx
@@ -19,7 +19,7 @@
#include "MNSINIParser.hxx"
#include <com/sun/star/io/IOException.hpp>
-#include <osl/process.h>
+#include <osl/file.h>
#include <rtl/byteseq.hxx>
#include <sal/log.hxx>
diff --git a/connectivity/source/drivers/mysql_jdbc/YTable.cxx b/connectivity/source/drivers/mysql_jdbc/YTable.cxx
index 0db740478993..6603238ea6dc 100644
--- a/connectivity/source/drivers/mysql_jdbc/YTable.cxx
+++ b/connectivity/source/drivers/mysql_jdbc/YTable.cxx
@@ -17,17 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <string.h>
#include <mysql/YTable.hxx>
#include <mysql/YTables.hxx>
-#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/sdbc/XResultSet.hpp>
-#include <com/sun/star/sdbcx/KeyType.hpp>
-#include <com/sun/star/sdbc/KeyRule.hpp>
#include <cppuhelper/typeprovider.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/sdbcx/Privilege.hpp>
#include <comphelper/property.hxx>
#include <comphelper/servicehelper.hxx>
@@ -36,8 +29,6 @@
#include <connectivity/sdbcx/VColumn.hxx>
#include <connectivity/TKeys.hxx>
#include <connectivity/TIndexes.hxx>
-#include <connectivity/TColumnsHelper.hxx>
-#include <mysql/YCatalog.hxx>
#include <mysql/YColumns.hxx>
#include <TConnection.hxx>
diff --git a/connectivity/source/drivers/mysql_jdbc/YTables.cxx b/connectivity/source/drivers/mysql_jdbc/YTables.cxx
index 0ef8fff9033d..83b60fff5f15 100644
--- a/connectivity/source/drivers/mysql_jdbc/YTables.cxx
+++ b/connectivity/source/drivers/mysql_jdbc/YTables.cxx
@@ -22,14 +22,9 @@
#include <mysql/YTable.hxx>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/XResultSet.hpp>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/sdbcx/Privilege.hpp>
-#include <com/sun/star/sdbc/KeyRule.hpp>
-#include <com/sun/star/sdbcx/KeyType.hpp>
#include <mysql/YCatalog.hxx>
#include <connectivity/dbtools.hxx>
-#include <connectivity/dbexception.hxx>
-#include <cppuhelper/interfacecontainer.h>
#include <comphelper/types.hxx>
#include <TConnection.hxx>
diff --git a/connectivity/source/drivers/mysql_jdbc/YUsers.cxx b/connectivity/source/drivers/mysql_jdbc/YUsers.cxx
index 5b29ce4ee7c9..17fc788179c1 100644
--- a/connectivity/source/drivers/mysql_jdbc/YUsers.cxx
+++ b/connectivity/source/drivers/mysql_jdbc/YUsers.cxx
@@ -19,12 +19,8 @@
#include <mysql/YUsers.hxx>
#include <mysql/YUser.hxx>
-#include <mysql/YTable.hxx>
-#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/sdbc/XResultSet.hpp>
#include <connectivity/sdbcx/IRefreshable.hxx>
#include <comphelper/types.hxx>
-#include <connectivity/dbexception.hxx>
#include <connectivity/dbtools.hxx>
#include <TConnection.hxx>
diff --git a/connectivity/source/drivers/mysql_jdbc/YViews.cxx b/connectivity/source/drivers/mysql_jdbc/YViews.cxx
index 96a5c7db9e2c..4393ba0a566b 100644
--- a/connectivity/source/drivers/mysql_jdbc/YViews.cxx
+++ b/connectivity/source/drivers/mysql_jdbc/YViews.cxx
@@ -19,16 +19,8 @@
#include <mysql/YViews.hxx>
#include <mysql/YTables.hxx>
-#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/sdbc/XResultSet.hpp>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
-#include <com/sun/star/sdbc/KeyRule.hpp>
-#include <com/sun/star/sdbcx/KeyType.hpp>
-#include <com/sun/star/sdbcx/CheckOption.hpp>
#include <mysql/YCatalog.hxx>
#include <connectivity/dbtools.hxx>
-#include <connectivity/dbexception.hxx>
-#include <cppuhelper/interfacecontainer.h>
#include <connectivity/sdbcx/VView.hxx>
#include <comphelper/types.hxx>
#include <TConnection.hxx>
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx b/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx
index 6513f4f94129..1070dd1fd68f 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <memory>
#include "mysqlc_connection.hxx"
#include "mysqlc_databasemetadata.hxx"
@@ -26,25 +25,13 @@
#include "mysqlc_preparedstatement.hxx"
#include "mysqlc_general.hxx"
-#include <com/sun/star/sdbc/ColumnValue.hpp>
-#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/sdbc/TransactionIsolation.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
-#include <osl/module.hxx>
-#include <osl/thread.h>
-#include <osl/file.h>
-#include <sal/log.hxx>
#include <osl/diagnose.h>
-#include <rtl/uri.hxx>
-#include <rtl/ustrbuf.hxx>
#include <cppuhelper/supportsservice.hxx>
using namespace connectivity::mysqlc;
-#include <stdio.h>
-
using namespace com::sun::star::uno;
using namespace com::sun::star::container;
using namespace com::sun::star::lang;
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx b/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx
index d9c7f81f9139..c9814a9da659 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx
@@ -17,29 +17,18 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "mysqlc_databasemetadata.hxx"
-#include <memory>
-#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/ResultSetType.hpp>
-#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
#include <com/sun/star/sdbc/TransactionIsolation.hpp>
-#include <com/sun/star/sdbc/KeyRule.hpp>
#include <com/sun/star/sdbc/Deferrability.hpp>
-#include <com/sun/star/sdbc/IndexType.hpp>
-#include <com/sun/star/sdbc/BestRowScope.hpp>
-#include <com/sun/star/sdbc/ColumnType.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <comphelper/sequence.hxx>
#include <sal/log.hxx>
#include <rtl/ustrbuf.hxx>
#include "mysqlc_general.hxx"
-#include "mysqlc_statement.hxx"
#include "mysqlc_driver.hxx"
#include "mysqlc_preparedstatement.hxx"
-#include <stdio.h>
-#include <sal/macros.h>
-
using namespace connectivity::mysqlc;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_driver.cxx b/connectivity/source/drivers/mysqlc/mysqlc_driver.cxx
index 44a4367a793d..10ca352eb10f 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_driver.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_driver.cxx
@@ -18,7 +18,6 @@
*/
#include "mysqlc_driver.hxx"
#include "mysqlc_connection.hxx"
-#include "mysqlc_general.hxx"
using namespace css::uno;
using namespace css::lang;
@@ -27,7 +26,6 @@ using namespace css::sdbc;
using namespace connectivity::mysqlc;
#include <cppuhelper/supportsservice.hxx>
-#include <stdio.h>
MysqlCDriver::MysqlCDriver(const Reference<XMultiServiceFactory>& _rxFactory)
: ODriver_BASE(m_aMutex)
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_general.cxx b/connectivity/source/drivers/mysqlc/mysqlc_general.cxx
index ace91d112210..90995ad31315 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_general.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_general.cxx
@@ -17,11 +17,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "mysqlc_general.hxx"
-#include "mysqlc_resultsetmetadata.hxx"
#include <sal/log.hxx>
#include <rtl/ustring.hxx>
+#include <com/sun/star/sdbc/DataType.hpp>
+
using com::sun::star::sdbc::SQLException;
using com::sun::star::uno::Any;
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
index bfba7745856e..c26a84145a0c 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
@@ -23,8 +23,6 @@
#include "mysqlc_resultsetmetadata.hxx"
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
#include <com/sun/star/sdbc/ResultSetType.hpp>
#include <com/sun/star/sdbc/FetchDirection.hpp>
@@ -34,7 +32,6 @@
#include <sal/log.hxx>
using namespace rtl;
-#include <comphelper/string.hxx>
#include <cstdlib>
@@ -52,8 +49,6 @@ using namespace com::sun::star::util;
using namespace ::comphelper;
using ::osl::MutexGuard;
-#include <stdio.h>
-#include <typeinfo>
#include <typeindex>
namespace
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx b/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx
index 68911564e1ec..d105365e39b1 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx
@@ -25,9 +25,7 @@
#include <sal/log.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
-#include <cppuhelper/typeprovider.hxx>
#include <stdio.h>
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx b/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
index 8e2dc3f1144e..1168d79470cb 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
@@ -23,8 +23,6 @@
#include "mysqlc_resultsetmetadata.hxx"
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
#include <com/sun/star/sdbc/ResultSetType.hpp>
#include <com/sun/star/sdbc/FetchDirection.hpp>
@@ -33,12 +31,7 @@
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/seqstream.hxx>
-#include <sal/log.hxx>
-
using namespace rtl;
-#include <comphelper/string.hxx>
-
-#include <cstdlib>
using namespace connectivity::mysqlc;
using namespace cppu;
@@ -54,8 +47,6 @@ using namespace com::sun::star::util;
using namespace ::comphelper;
using ::osl::MutexGuard;
-#include <stdio.h>
-
namespace
{
// copied from string misc, it should be replaced when library is not an
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.cxx b/connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.cxx
index 3edcaeaab5de..ab9c2fb39992 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.cxx
@@ -18,12 +18,10 @@
*/
#include "mysqlc_resultsetmetadata.hxx"
-#include "mysqlc_resultset.hxx"
#include "mysqlc_general.hxx"
#include <com/sun/star/sdbc/XRow.hpp>
#include <rtl/ustrbuf.hxx>
-#include <sal/log.hxx>
using namespace connectivity::mysqlc;
using namespace com::sun::star::uno;
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_services.cxx b/connectivity/source/drivers/mysqlc/mysqlc_services.cxx
index b0f7d0adc7c1..de611375c371 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_services.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_services.cxx
@@ -20,7 +20,6 @@
#include "mysqlc_driver.hxx"
#include <cppuhelper/factory.hxx>
-#include <rtl/ustrbuf.hxx>
#include <uno/lbnames.h>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx b/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx
index edea5b82a03e..5444389ec17a 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx
@@ -19,24 +19,15 @@
#include <sal/config.h>
-#include <memory>
-#include <stdio.h>
-
#include "mysqlc_connection.hxx"
#include "mysqlc_propertyids.hxx"
#include "mysqlc_resultset.hxx"
#include "mysqlc_statement.hxx"
#include "mysqlc_general.hxx"
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <com/sun/star/sdbc/FetchDirection.hpp>
-#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
-#include <com/sun/star/sdbc/ResultSetType.hpp>
-
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/supportsservice.hxx>
-#include <osl/thread.h>
using namespace connectivity::mysqlc;
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_types.cxx b/connectivity/source/drivers/mysqlc/mysqlc_types.cxx
index 9639a4a6f381..219e0d553d41 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_types.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_types.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <stdio.h>
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/sdbc/ColumnSearch.hpp>
diff --git a/connectivity/source/drivers/odbc/OConnection.cxx b/connectivity/source/drivers/odbc/OConnection.cxx
index 4017a0c66041..04bb0e1a51a2 100644
--- a/connectivity/source/drivers/odbc/OConnection.cxx
+++ b/connectivity/source/drivers/odbc/OConnection.cxx
@@ -24,11 +24,7 @@
#include <odbc/ODriver.hxx>
#include <odbc/OStatement.hxx>
#include <odbc/OPreparedStatement.hxx>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
-#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <connectivity/dbcharset.hxx>
-#include <connectivity/FValue.hxx>
#include <connectivity/dbexception.hxx>
#include <sal/log.hxx>
diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx
index 1f2ba68b02a0..c9ed165a8c26 100644
--- a/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx
+++ b/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx
@@ -25,9 +25,7 @@
#include <com/sun/star/sdbc/ResultSetType.hpp>
#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
#include <com/sun/star/sdbc/TransactionIsolation.hpp>
-#include <connectivity/odbc.hxx>
#include <TPrivilegesResultSet.hxx>
-#include <connectivity/dbexception.hxx>
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
index fe3cd5646cee..7afd4bed54f9 100644
--- a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
@@ -21,17 +21,12 @@
#include <odbc/ODatabaseMetaDataResultSet.hxx>
#include <com/sun/star/sdbc/DataType.hpp>
-#include <com/sun/star/sdbc/KeyRule.hpp>
-#include <com/sun/star/sdbc/ProcedureResult.hpp>
-#include <com/sun/star/sdbc/IndexType.hpp>
#include <comphelper/property.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/sequence.hxx>
#include <odbc/OResultSetMetaData.hxx>
#include <odbc/OTools.hxx>
#include <comphelper/types.hxx>
-#include <FDatabaseMetaDataResultSetMetaData.hxx>
#include <connectivity/dbexception.hxx>
using namespace ::comphelper;
diff --git a/connectivity/source/drivers/odbc/ODriver.cxx b/connectivity/source/drivers/odbc/ODriver.cxx
index 81eecfa10ff1..376946d026f7 100644
--- a/connectivity/source/drivers/odbc/ODriver.cxx
+++ b/connectivity/source/drivers/odbc/ODriver.cxx
@@ -19,7 +19,6 @@
#include <odbc/ODriver.hxx>
#include <odbc/OConnection.hxx>
-#include <odbc/OFunctions.hxx>
#include <odbc/OTools.hxx>
#include <connectivity/dbexception.hxx>
#include <cppuhelper/supportsservice.hxx>
diff --git a/connectivity/source/drivers/odbc/OFunctions.cxx b/connectivity/source/drivers/odbc/OFunctions.cxx
index 9e3c1893b8c7..5b6138d6a7e6 100644
--- a/connectivity/source/drivers/odbc/OFunctions.cxx
+++ b/connectivity/source/drivers/odbc/OFunctions.cxx
@@ -18,7 +18,6 @@
*/
#include <odbc/OFunctions.hxx>
-#include <osl/process.h>
// Implib definitions for ODBC-DLL/shared library:
diff --git a/connectivity/source/drivers/odbc/OPreparedStatement.cxx b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
index 94fb54f670a9..65cfbf5e7b5f 100644
--- a/connectivity/source/drivers/odbc/OPreparedStatement.cxx
+++ b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
@@ -25,17 +25,13 @@
#include <com/sun/star/io/IOException.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
#include <odbc/OTools.hxx>
-#include <odbc/ODriver.hxx>
#include <odbc/OResultSet.hxx>
#include <odbc/OResultSetMetaData.hxx>
-#include <cppuhelper/typeprovider.hxx>
#include <comphelper/sequence.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <connectivity/dbtools.hxx>
#include <comphelper/types.hxx>
#include <connectivity/FValue.hxx>
#include <strings.hrc>
-#include <connectivity/sqlparse.hxx>
#include <memory>
#include <type_traits>
diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx
index cd323f7b4a46..e9345aeae6c9 100644
--- a/connectivity/source/drivers/odbc/OResultSet.cxx
+++ b/connectivity/source/drivers/odbc/OResultSet.cxx
@@ -25,13 +25,11 @@
#include <com/sun/star/beans/PropertyVetoException.hpp>
#include <com/sun/star/sdbcx/CompareBookmark.hpp>
#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
-#include <com/sun/star/sdbc/FetchDirection.hpp>
#include <com/sun/star/sdbc/ResultSetType.hpp>
#include <comphelper/property.hxx>
#include <comphelper/sequence.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/supportsservice.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <comphelper/types.hxx>
#include <connectivity/dbtools.hxx>
#include <connectivity/dbexception.hxx>
diff --git a/connectivity/source/drivers/odbc/OStatement.cxx b/connectivity/source/drivers/odbc/OStatement.cxx
index 5797ec6e436a..6e0a37169064 100644
--- a/connectivity/source/drivers/odbc/OStatement.cxx
+++ b/connectivity/source/drivers/odbc/OStatement.cxx
@@ -24,7 +24,6 @@
#include <odbc/OResultSet.hxx>
#include <comphelper/property.hxx>
#include <odbc/OTools.hxx>
-#include <osl/thread.h>
#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
#include <com/sun/star/sdbc/ResultSetType.hpp>
#include <com/sun/star/sdbc/FetchDirection.hpp>
diff --git a/connectivity/source/drivers/odbc/OTools.cxx b/connectivity/source/drivers/odbc/OTools.cxx
index a5395aaf7ff3..fb0dc71d716f 100644
--- a/connectivity/source/drivers/odbc/OTools.cxx
+++ b/connectivity/source/drivers/odbc/OTools.cxx
@@ -27,8 +27,6 @@
#include <sal/log.hxx>
#include <string.h>
-#include <string>
-#include <algorithm>
using namespace connectivity::odbc;
using namespace com::sun::star::uno;
diff --git a/connectivity/source/drivers/postgresql/pq_array.cxx b/connectivity/source/drivers/postgresql/pq_array.cxx
index 12bc4bbea0c7..5ae646f230e3 100644
--- a/connectivity/source/drivers/postgresql/pq_array.cxx
+++ b/connectivity/source/drivers/postgresql/pq_array.cxx
@@ -34,9 +34,7 @@
*
************************************************************************/
-#include <rtl/ustrbuf.hxx>
#include <com/sun/star/sdbc/SQLException.hpp>
-#include <com/sun/star/sdbc/XArray.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
#include <comphelper/sequence.hxx>
diff --git a/connectivity/source/drivers/postgresql/pq_baseresultset.cxx b/connectivity/source/drivers/postgresql/pq_baseresultset.cxx
index d1c833dc1f62..bfe59284efe9 100644
--- a/connectivity/source/drivers/postgresql/pq_baseresultset.cxx
+++ b/connectivity/source/drivers/postgresql/pq_baseresultset.cxx
@@ -34,22 +34,12 @@
*
************************************************************************/
-#include <osl/thread.h>
-
-#include <rtl/ustrbuf.hxx>
-
-#include <cppuhelper/typeprovider.hxx>
-#include <cppuhelper/queryinterface.hxx>
-
#include <comphelper/sequence.hxx>
#include "pq_tools.hxx"
#include "pq_array.hxx"
-#include "pq_statement.hxx"
#include "pq_baseresultset.hxx"
-#include "pq_resultsetmetadata.hxx"
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/script/CannotConvertException.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
#include <connectivity/dbconversion.hxx>
diff --git a/connectivity/source/drivers/postgresql/pq_connection.cxx b/connectivity/source/drivers/postgresql/pq_connection.cxx
index 5664a182af31..81a34f2bee9a 100644
--- a/connectivity/source/drivers/postgresql/pq_connection.cxx
+++ b/connectivity/source/drivers/postgresql/pq_connection.cxx
@@ -44,13 +44,10 @@
#include "pq_statement.hxx"
#include "pq_preparedstatement.hxx"
#include "pq_databasemetadata.hxx"
-#include "pq_xcontainer.hxx"
-#include "pq_statics.hxx"
#include "pq_xtables.hxx"
#include "pq_xviews.hxx"
#include "pq_xusers.hxx"
-#include <rtl/strbuf.hxx>
#include <rtl/uuid.h>
#include <rtl/bootstrap.hxx>
#include <sal/log.hxx>
diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
index 2f704c4e5fb1..98b15bfd64bc 100644
--- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
@@ -75,14 +75,11 @@
#include <sal/macros.h>
#include <com/sun/star/sdbc/TransactionIsolation.hpp>
#include <com/sun/star/sdbc/ResultSetType.hpp>
-#include <com/sun/star/sdbc/XPreparedStatement.hpp>
#include <com/sun/star/sdbc/XParameters.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/IndexType.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/sdbc/ColumnSearch.hpp>
-#include <com/sun/star/sdbc/KeyRule.hpp>
-#include <com/sun/star/sdbc/Deferrability.hpp>
using ::osl::MutexGuard;
diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
index e1946abc2b77..5df56cc8a39c 100644
--- a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
@@ -35,7 +35,6 @@
************************************************************************/
#include "pq_preparedstatement.hxx"
-#include "pq_resultset.hxx"
#include "pq_tools.hxx"
#include "pq_statics.hxx"
#include "pq_statement.hxx"
@@ -44,10 +43,7 @@
#include <rtl/ustrbuf.hxx>
-#include <cppuhelper/typeprovider.hxx>
-#include <cppuhelper/queryinterface.hxx>
#include <comphelper/sequence.hxx>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
diff --git a/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.cxx b/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.cxx
index 188f69c06df5..d45ffc0a614a 100644
--- a/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.cxx
@@ -37,7 +37,6 @@
#include "pq_sequenceresultsetmetadata.hxx"
#include <com/sun/star/sdbc/SQLException.hpp>
-#include <rtl/ustrbuf.hxx>
using com::sun::star::uno::Any;
diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx
index ae17e3bb5c81..4a68cd5697dc 100644
--- a/connectivity/source/drivers/postgresql/pq_statement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statement.cxx
@@ -40,19 +40,13 @@
#include "pq_tools.hxx"
#include "pq_statics.hxx"
-#include <osl/thread.h>
#include <osl/time.h>
#include <rtl/ustrbuf.hxx>
#include <rtl/strbuf.hxx>
-#include <cppuhelper/typeprovider.hxx>
-#include <cppuhelper/queryinterface.hxx>
-
#include <comphelper/sequence.hxx>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
-
#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
#include <com/sun/star/sdbc/ResultSetType.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
diff --git a/connectivity/source/drivers/postgresql/pq_statics.cxx b/connectivity/source/drivers/postgresql/pq_statics.cxx
index d320a7c16b52..a68242e2c55d 100644
--- a/connectivity/source/drivers/postgresql/pq_statics.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statics.cxx
@@ -39,8 +39,6 @@
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <string.h>
-
using com::sun::star::uno::Sequence;
using com::sun::star::uno::Any;
using com::sun::star::uno::Type;
diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx
index 20fa3b4bb215..558fd6d6a739 100644
--- a/connectivity/source/drivers/postgresql/pq_tools.cxx
+++ b/connectivity/source/drivers/postgresql/pq_tools.cxx
@@ -42,6 +42,7 @@
#include <sal/log.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
@@ -51,7 +52,6 @@
#include <com/sun/star/sdbcx/KeyType.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#include "pq_xcontainer.hxx"
#include "pq_tools.hxx"
#include "pq_statics.hxx"
diff --git a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
index a8c2aa57ea4b..409aca958f2b 100644
--- a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
+++ b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
@@ -35,7 +35,6 @@
************************************************************************/
#include <rtl/ustrbuf.hxx>
-#include <rtl/strbuf.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/typeprovider.hxx>
diff --git a/connectivity/source/drivers/postgresql/pq_xbase.cxx b/connectivity/source/drivers/postgresql/pq_xbase.cxx
index e27719b52c59..377b3dd4b99b 100644
--- a/connectivity/source/drivers/postgresql/pq_xbase.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xbase.cxx
@@ -34,10 +34,7 @@
*
************************************************************************/
-#include <rtl/ustrbuf.hxx>
#include <cppuhelper/supportsservice.hxx>
-#include <cppuhelper/typeprovider.hxx>
-#include <cppuhelper/queryinterface.hxx>
#include <comphelper/sequence.hxx>
#include "pq_tools.hxx"
diff --git a/connectivity/source/drivers/postgresql/pq_xcolumn.cxx b/connectivity/source/drivers/postgresql/pq_xcolumn.cxx
index d02a2696f616..c6d98b0fcb85 100644
--- a/connectivity/source/drivers/postgresql/pq_xcolumn.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xcolumn.cxx
@@ -34,8 +34,6 @@
*
************************************************************************/
-#include <cppuhelper/typeprovider.hxx>
-
#include "pq_xcolumn.hxx"
using com::sun::star::uno::Reference;
diff --git a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
index 95332e360522..8b716cb61c4c 100644
--- a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
@@ -35,16 +35,13 @@
************************************************************************/
#include <rtl/ustrbuf.hxx>
-#include <rtl/strbuf.hxx>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <cppuhelper/exc_hlp.hxx>
-#include <cppuhelper/implbase.hxx>
#include "pq_xcolumns.hxx"
#include "pq_xcolumn.hxx"
diff --git a/connectivity/source/drivers/postgresql/pq_xcontainer.cxx b/connectivity/source/drivers/postgresql/pq_xcontainer.cxx
index 147f5c17a465..b7c1537eed04 100644
--- a/connectivity/source/drivers/postgresql/pq_xcontainer.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xcontainer.cxx
@@ -34,7 +34,6 @@
*
************************************************************************/
-#include <rtl/ustrbuf.hxx>
#include <com/sun/star/container/ElementExistException.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <cppuhelper/implbase.hxx>
diff --git a/connectivity/source/drivers/postgresql/pq_xindex.cxx b/connectivity/source/drivers/postgresql/pq_xindex.cxx
index 825950014a2c..c340484a17df 100644
--- a/connectivity/source/drivers/postgresql/pq_xindex.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xindex.cxx
@@ -34,13 +34,9 @@
*
************************************************************************/
-#include <rtl/ustrbuf.hxx>
-
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/queryinterface.hxx>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
-
#include "pq_xindex.hxx"
#include "pq_xindexcolumns.hxx"
#include "pq_tools.hxx"
diff --git a/connectivity/source/drivers/postgresql/pq_xindexcolumn.cxx b/connectivity/source/drivers/postgresql/pq_xindexcolumn.cxx
index 02488a6339a8..58b36234b1fb 100644
--- a/connectivity/source/drivers/postgresql/pq_xindexcolumn.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xindexcolumn.cxx
@@ -34,8 +34,6 @@
*
************************************************************************/
-#include <cppuhelper/typeprovider.hxx>
-
#include "pq_xindexcolumn.hxx"
using com::sun::star::uno::Reference;
diff --git a/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx
index a80c3952b255..40b410920fc8 100644
--- a/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx
@@ -36,13 +36,9 @@
#include <vector>
-#include <rtl/ustrbuf.hxx>
-#include <rtl/strbuf.hxx>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/sdbc/DataType.hpp>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <cppuhelper/exc_hlp.hxx>
#include "pq_xcolumns.hxx"
diff --git a/connectivity/source/drivers/postgresql/pq_xindexes.cxx b/connectivity/source/drivers/postgresql/pq_xindexes.cxx
index aa8d3036b9a9..f03295a4925d 100644
--- a/connectivity/source/drivers/postgresql/pq_xindexes.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xindexes.cxx
@@ -35,14 +35,11 @@
************************************************************************/
#include <rtl/ustrbuf.hxx>
-#include <rtl/strbuf.hxx>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/XParameters.hpp>
-#include <com/sun/star/sdbc/KeyRule.hpp>
-#include <com/sun/star/sdbcx/KeyType.hpp>
#include <cppuhelper/exc_hlp.hxx>
#include "pq_xindexes.hxx"
diff --git a/connectivity/source/drivers/postgresql/pq_xkey.cxx b/connectivity/source/drivers/postgresql/pq_xkey.cxx
index 67ba1d5cc18e..ed0b2669e894 100644
--- a/connectivity/source/drivers/postgresql/pq_xkey.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xkey.cxx
@@ -34,16 +34,11 @@
*
************************************************************************/
-#include <rtl/ustrbuf.hxx>
-
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/queryinterface.hxx>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
-
#include "pq_xkey.hxx"
#include "pq_xkeycolumns.hxx"
-#include "pq_tools.hxx"
#include "pq_statics.hxx"
using com::sun::star::container::XNameAccess;
diff --git a/connectivity/source/drivers/postgresql/pq_xkeycolumn.cxx b/connectivity/source/drivers/postgresql/pq_xkeycolumn.cxx
index fac03bd3df7a..9eea45204f3d 100644
--- a/connectivity/source/drivers/postgresql/pq_xkeycolumn.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xkeycolumn.cxx
@@ -34,8 +34,6 @@
*
************************************************************************/
-#include <cppuhelper/typeprovider.hxx>
-
#include "pq_xkeycolumn.hxx"
using com::sun::star::uno::Reference;
diff --git a/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx b/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx
index 39a2c292da33..561b5421e074 100644
--- a/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx
@@ -34,13 +34,9 @@
*
************************************************************************/
-#include <rtl/ustrbuf.hxx>
-#include <rtl/strbuf.hxx>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/sdbc/DataType.hpp>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <cppuhelper/exc_hlp.hxx>
#include "pq_xcolumns.hxx"
diff --git a/connectivity/source/drivers/postgresql/pq_xkeys.cxx b/connectivity/source/drivers/postgresql/pq_xkeys.cxx
index 78dc2cd4fa9b..892252a5252f 100644
--- a/connectivity/source/drivers/postgresql/pq_xkeys.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xkeys.cxx
@@ -35,7 +35,6 @@
************************************************************************/
#include <rtl/ustrbuf.hxx>
-#include <rtl/strbuf.hxx>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
diff --git a/connectivity/source/drivers/postgresql/pq_xtable.cxx b/connectivity/source/drivers/postgresql/pq_xtable.cxx
index 5dee7f799b91..82b66a316a3f 100644
--- a/connectivity/source/drivers/postgresql/pq_xtable.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xtable.cxx
@@ -39,7 +39,6 @@
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/queryinterface.hxx>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
#include "pq_xtable.hxx"
diff --git a/connectivity/source/drivers/postgresql/pq_xtables.cxx b/connectivity/source/drivers/postgresql/pq_xtables.cxx
index e15dc478e210..1d9b9fd3b13c 100644
--- a/connectivity/source/drivers/postgresql/pq_xtables.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xtables.cxx
@@ -40,8 +40,6 @@
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbcx/Privilege.hpp>
-#include <com/sun/star/sdbcx/KeyType.hpp>
-#include <com/sun/star/sdbc/KeyRule.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
#include <cppuhelper/exc_hlp.hxx>
diff --git a/connectivity/source/drivers/postgresql/pq_xuser.cxx b/connectivity/source/drivers/postgresql/pq_xuser.cxx
index e37d71ea062a..6040b2fbcadf 100644
--- a/connectivity/source/drivers/postgresql/pq_xuser.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xuser.cxx
@@ -39,7 +39,6 @@
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/queryinterface.hxx>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
#include "pq_xuser.hxx"
diff --git a/connectivity/source/drivers/postgresql/pq_xusers.cxx b/connectivity/source/drivers/postgresql/pq_xusers.cxx
index 5b50fc802c63..a6fe3489fa7f 100644
--- a/connectivity/source/drivers/postgresql/pq_xusers.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xusers.cxx
@@ -39,7 +39,6 @@
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/sdbcx/Privilege.hpp>
#include <cppuhelper/exc_hlp.hxx>
#include "pq_xusers.hxx"
diff --git a/connectivity/source/drivers/postgresql/pq_xview.cxx b/connectivity/source/drivers/postgresql/pq_xview.cxx
index 97d2b0548493..1b00b9b5d326 100644
--- a/connectivity/source/drivers/postgresql/pq_xview.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xview.cxx
@@ -39,7 +39,6 @@
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/queryinterface.hxx>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
#include "pq_xview.hxx"
diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx
index b3291cf89f5f..f624f72ff3f8 100644
--- a/connectivity/source/manager/mdrivermanager.cxx
+++ b/connectivity/source/manager/mdrivermanager.cxx
@@ -30,7 +30,6 @@
#include <comphelper/processfactory.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
-#include <cppuhelper/weakref.hxx>
#include <osl/diagnose.h>
#include <algorithm>
diff --git a/connectivity/source/parse/PColumn.cxx b/connectivity/source/parse/PColumn.cxx
index 1db5ba45da8b..3091613fc867 100644
--- a/connectivity/source/parse/PColumn.cxx
+++ b/connectivity/source/parse/PColumn.cxx
@@ -19,11 +19,9 @@
#include <connectivity/PColumn.hxx>
-#include <connectivity/dbtools.hxx>
#include <TConnection.hxx>
#include <comphelper/types.hxx>
-#include <tools/diagnose_ex.h>
#include <com/sun/star/sdbc/XResultSetMetaData.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
diff --git a/connectivity/source/parse/internalnode.cxx b/connectivity/source/parse/internalnode.cxx
index b831b4a01088..ccee05746a17 100644
--- a/connectivity/source/parse/internalnode.cxx
+++ b/connectivity/source/parse/internalnode.cxx
@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <algorithm>
-
#include <connectivity/sqlparse.hxx>
#include <connectivity/internalnode.hxx>
diff --git a/connectivity/source/resource/sharedresources.cxx b/connectivity/source/resource/sharedresources.cxx
index d2aba18aaaf0..3f7062f6be52 100644
--- a/connectivity/source/resource/sharedresources.cxx
+++ b/connectivity/source/resource/sharedresources.cxx
@@ -17,14 +17,11 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <memory>
#include <resource/sharedresources.hxx>
-#include <com/sun/star/uno/XComponentContext.hpp>
-
-#include <tools/diagnose_ex.h>
#include <unotools/resmgr.hxx>
#include <osl/diagnose.h>
+#include <osl/mutex.hxx>
#include <sal/log.hxx>
namespace connectivity
diff --git a/connectivity/source/sdbcx/VCatalog.cxx b/connectivity/source/sdbcx/VCatalog.cxx
index b075c9ae0dff..dc5decfbf573 100644
--- a/connectivity/source/sdbcx/VCatalog.cxx
+++ b/connectivity/source/sdbcx/VCatalog.cxx
@@ -21,7 +21,6 @@
#include <connectivity/sdbcx/VCatalog.hxx>
#include <connectivity/sdbcx/VCollection.hxx>
#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <connectivity/sdbcx/VDescriptor.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <TConnection.hxx>
diff --git a/connectivity/source/sdbcx/VCollection.cxx b/connectivity/source/sdbcx/VCollection.cxx
index 56060cb2ea9a..d7a716a59839 100644
--- a/connectivity/source/sdbcx/VCollection.cxx
+++ b/connectivity/source/sdbcx/VCollection.cxx
@@ -31,7 +31,6 @@
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <TConnection.hxx>
-#include <rtl/ustrbuf.hxx>
#include <strings.hrc>
#include <resource/sharedresources.hxx>
diff --git a/connectivity/source/sdbcx/VColumn.cxx b/connectivity/source/sdbcx/VColumn.cxx
index ad26e76a6754..23993453101a 100644
--- a/connectivity/source/sdbcx/VColumn.cxx
+++ b/connectivity/source/sdbcx/VColumn.cxx
@@ -18,7 +18,6 @@
*/
#include <connectivity/sdbcx/VColumn.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <comphelper/sequence.hxx>
#include <cppuhelper/supportsservice.hxx>
diff --git a/connectivity/source/sdbcx/VDescriptor.cxx b/connectivity/source/sdbcx/VDescriptor.cxx
index 7b56d400c878..b7d9411bbce1 100644
--- a/connectivity/source/sdbcx/VDescriptor.cxx
+++ b/connectivity/source/sdbcx/VDescriptor.cxx
@@ -24,7 +24,6 @@
#include <cppuhelper/typeprovider.hxx>
#include <algorithm>
-#include <string.h>
namespace connectivity
{
diff --git a/connectivity/source/sdbcx/VGroup.cxx b/connectivity/source/sdbcx/VGroup.cxx
index 8ca532323067..9bb92592d5f4 100644
--- a/connectivity/source/sdbcx/VGroup.cxx
+++ b/connectivity/source/sdbcx/VGroup.cxx
@@ -19,9 +19,6 @@
#include <connectivity/sdbcx/VGroup.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <com/sun/star/sdbcx/Privilege.hpp>
-#include <com/sun/star/sdbcx/PrivilegeObject.hpp>
#include <comphelper/sequence.hxx>
#include <connectivity/dbexception.hxx>
diff --git a/connectivity/source/sdbcx/VIndex.cxx b/connectivity/source/sdbcx/VIndex.cxx
index 6ea44120307e..a274aaa6c102 100644
--- a/connectivity/source/sdbcx/VIndex.cxx
+++ b/connectivity/source/sdbcx/VIndex.cxx
@@ -18,9 +18,7 @@
*/
#include <connectivity/sdbcx/VIndex.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <connectivity/sdbcx/VColumn.hxx>
#include <connectivity/dbexception.hxx>
#include <comphelper/sequence.hxx>
#include <connectivity/sdbcx/VCollection.hxx>
diff --git a/connectivity/source/sdbcx/VKey.cxx b/connectivity/source/sdbcx/VKey.cxx
index 25d0526875e4..d6ad5ebf1ac2 100644
--- a/connectivity/source/sdbcx/VKey.cxx
+++ b/connectivity/source/sdbcx/VKey.cxx
@@ -18,12 +18,10 @@
*/
#include <connectivity/sdbcx/VKey.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/sdbc/KeyRule.hpp>
#include <comphelper/sequence.hxx>
#include <cppuhelper/supportsservice.hxx>
-#include <connectivity/sdbcx/VColumn.hxx>
#include <connectivity/sdbcx/VCollection.hxx>
#include <TConnection.hxx>
diff --git a/connectivity/source/sdbcx/VTable.cxx b/connectivity/source/sdbcx/VTable.cxx
index 70e9c75d4ee5..90c7427823c0 100644
--- a/connectivity/source/sdbcx/VTable.cxx
+++ b/connectivity/source/sdbcx/VTable.cxx
@@ -18,14 +18,10 @@
*/
#include <connectivity/sdbcx/VTable.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <connectivity/sdbcx/VIndex.hxx>
#include <comphelper/sequence.hxx>
#include <connectivity/sdbcx/VCollection.hxx>
#include <TConnection.hxx>
-#include <connectivity/sdbcx/VColumn.hxx>
-#include <connectivity/sdbcx/VKey.hxx>
#include <connectivity/dbtools.hxx>
#include <connectivity/dbexception.hxx>
#include <cppuhelper/supportsservice.hxx>
diff --git a/connectivity/source/sdbcx/VUser.cxx b/connectivity/source/sdbcx/VUser.cxx
index 87b450951121..26ef01f4b614 100644
--- a/connectivity/source/sdbcx/VUser.cxx
+++ b/connectivity/source/sdbcx/VUser.cxx
@@ -19,10 +19,6 @@
#include <connectivity/sdbcx/VUser.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <com/sun/star/sdbcx/Privilege.hpp>
-#include <com/sun/star/sdbcx/PrivilegeObject.hpp>
-#include <TConnection.hxx>
#include <connectivity/sdbcx/VCollection.hxx>
#include <connectivity/dbexception.hxx>
#include <comphelper/sequence.hxx>
diff --git a/connectivity/source/sdbcx/VView.cxx b/connectivity/source/sdbcx/VView.cxx
index 08c41a6f7934..317e985b5199 100644
--- a/connectivity/source/sdbcx/VView.cxx
+++ b/connectivity/source/sdbcx/VView.cxx
@@ -18,7 +18,6 @@
*/
#include <connectivity/sdbcx/VView.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <comphelper/sequence.hxx>
#include <connectivity/dbtools.hxx>