connectivity/IwyuFilter_connectivity.yaml                          |    3 +++
 connectivity/source/commontools/BlobHelper.cxx                     |    1 -
 connectivity/source/commontools/CommonTools.cxx                    |    1 -
 connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx     |    2 --
 connectivity/source/commontools/RowFunctionParser.cxx              |    1 -
 connectivity/source/commontools/TDatabaseMetaDataBase.cxx          |    1 -
 connectivity/source/commontools/TPrivilegesResultSet.cxx           |    1 -
 connectivity/source/commontools/dbconversion.cxx                   |    1 -
 connectivity/source/commontools/dbtools.cxx                        |    1 -
 connectivity/source/commontools/filtermanager.cxx                  |    1 -
 connectivity/source/cpool/ZConnectionPool.hxx                      |    1 -
 connectivity/source/cpool/ZConnectionWrapper.cxx                   |    1 -
 connectivity/source/cpool/ZConnectionWrapper.hxx                   |    3 ---
 connectivity/source/cpool/ZPoolCollection.hxx                      |    1 -
 connectivity/source/cpool/ZPooledConnection.hxx                    |    6 
++++--
 connectivity/source/drivers/calc/CDatabaseMetaData.cxx             |    1 -
 connectivity/source/drivers/calc/CTable.cxx                        |    1 -
 connectivity/source/drivers/calc/CTables.cxx                       |    1 -
 connectivity/source/drivers/component/CTable.cxx                   |    1 -
 connectivity/source/drivers/dbase/DDatabaseMetaData.cxx            |    1 -
 connectivity/source/drivers/dbase/DIndex.cxx                       |    1 -
 connectivity/source/drivers/dbase/DIndexes.cxx                     |    1 -
 connectivity/source/drivers/dbase/DResultSet.cxx                   |    1 -
 connectivity/source/drivers/dbase/DTable.cxx                       |    2 --
 connectivity/source/drivers/dbase/DTables.cxx                      |    2 --
 connectivity/source/drivers/evoab2/NCatalog.cxx                    |    1 -
 connectivity/source/drivers/evoab2/NDriver.cxx                     |    2 --
 connectivity/source/drivers/evoab2/NPreparedStatement.cxx          |    3 ---
 connectivity/source/drivers/evoab2/NResultSet.cxx                  |    1 -
 connectivity/source/drivers/evoab2/NStatement.cxx                  |    1 -
 connectivity/source/drivers/file/FDatabaseMetaData.cxx             |    1 -
 connectivity/source/drivers/file/FDriver.cxx                       |    1 -
 connectivity/source/drivers/file/FResultSet.cxx                    |    1 -
 connectivity/source/drivers/file/FStatement.cxx                    |    1 -
 connectivity/source/drivers/file/FTable.cxx                        |    1 -
 connectivity/source/drivers/firebird/Table.cxx                     |    1 -
 connectivity/source/drivers/firebird/View.cxx                      |    2 ++
 connectivity/source/drivers/firebird/View.hxx                      |    1 -
 connectivity/source/drivers/flat/ETable.cxx                        |    2 --
 connectivity/source/drivers/hsqldb/HDriver.cxx                     |    1 -
 connectivity/source/drivers/hsqldb/HStorageAccess.cxx              |    1 -
 connectivity/source/drivers/hsqldb/HTable.cxx                      |    1 -
 connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx    |    1 -
 connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx   |    4 ----
 connectivity/source/drivers/jdbc/CallableStatement.cxx             |    2 --
 connectivity/source/drivers/jdbc/DatabaseMetaData.cxx              |    1 -
 connectivity/source/drivers/jdbc/JConnection.cxx                   |    1 -
 connectivity/source/drivers/jdbc/JDriver.cxx                       |    1 -
 connectivity/source/drivers/jdbc/JStatement.cxx                    |    1 -
 connectivity/source/drivers/jdbc/PreparedStatement.cxx             |    1 -
 connectivity/source/drivers/jdbc/ResultSet.cxx                     |    1 -
 connectivity/source/drivers/jdbc/tools.cxx                         |    1 -
 connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx  |    2 --
 connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx |    1 -
 connectivity/source/drivers/mysql_jdbc/YTable.cxx                  |    1 -
 connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx    |    1 -
 connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.cxx    |    1 -
 connectivity/source/drivers/mysqlc/mysqlc_statement.cxx            |    2 +-
 connectivity/source/drivers/mysqlc/mysqlc_tables.cxx               |    3 ---
 connectivity/source/drivers/mysqlc/mysqlc_users.cxx                |    2 --
 connectivity/source/drivers/mysqlc/mysqlc_view.cxx                 |    2 ++
 connectivity/source/drivers/mysqlc/mysqlc_view.hxx                 |    1 -
 connectivity/source/drivers/odbc/OConnection.cxx                   |    2 --
 connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx    |    1 -
 connectivity/source/drivers/odbc/OPreparedStatement.cxx            |    1 -
 connectivity/source/drivers/odbc/OResultSet.cxx                    |    1 -
 connectivity/source/drivers/odbc/OStatement.cxx                    |    2 --
 connectivity/source/drivers/postgresql/pq_driver.cxx               |    1 -
 connectivity/source/inc/FDatabaseMetaDataResultSetMetaData.hxx     |    1 -
 connectivity/source/inc/file/FPreparedStatement.hxx                |    1 -
 connectivity/source/inc/hsqldb/HConnection.hxx                     |    3 ---
 connectivity/source/manager/mdrivermanager.cxx                     |    2 --
 connectivity/source/sdbcx/VCollection.cxx                          |    2 --
 connectivity/source/sdbcx/VDescriptor.cxx                          |    2 --
 connectivity/source/sdbcx/VIndex.cxx                               |    1 -
 connectivity/source/sdbcx/VKey.cxx                                 |    1 -
 connectivity/source/sdbcx/VUser.cxx                                |    1 -
 77 files changed, 12 insertions(+), 99 deletions(-)

New commits:
commit 2c0c0ff155454eacd6cb821881c4cb76da047e1f
Author:     Gabor Kelemen <gabor.kele...@collabora.com>
AuthorDate: Tue Aug 5 15:54:37 2025 +0200
Commit:     Gabor Kelemen <gabor.kelemen.ext...@allotropia.de>
CommitDate: Sat Sep 13 00:04:41 2025 +0200

    tdf#146619 Run IWYU on connectivity/
    
    Note: the --ns mode gives a lot of false positives on cxx files,
    the script needs improvements here
    
    Change-Id: Ie9181da8a1b8525f6bb8d85c25ecefc4814b39d6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189787
    Tested-by: Jenkins
    Reviewed-by: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de>

diff --git a/connectivity/IwyuFilter_connectivity.yaml 
b/connectivity/IwyuFilter_connectivity.yaml
index 79403230c41c..7e59ebe06fe5 100644
--- a/connectivity/IwyuFilter_connectivity.yaml
+++ b/connectivity/IwyuFilter_connectivity.yaml
@@ -71,6 +71,9 @@ excludelist:
     connectivity/source/drivers/mysql_jdbc/YDriver.cxx:
     # Actually used
     - com/sun/star/uno/XComponentContext.hpp
+    connectivity/source/drivers/mysqlc/mysqlc_statement.cxx:
+    # Needed to avoid "member access into incomplete type 
'connectivity::mysqlc::OResultSetMetaData'" error
+    - mysqlc_resultsetmetadata.hxx
     connectivity/source/drivers/postgresql/pq_connection.cxx:
     # Needed for using deleter_from_fn
     - pq_tools.hxx
diff --git a/connectivity/source/commontools/BlobHelper.cxx 
b/connectivity/source/commontools/BlobHelper.cxx
index 844299e20a49..031469fed8f9 100644
--- a/connectivity/source/commontools/BlobHelper.cxx
+++ b/connectivity/source/commontools/BlobHelper.cxx
@@ -20,7 +20,6 @@
 #include <comphelper/seqstream.hxx>
 #include <connectivity/dbexception.hxx>
 #include <com/sun/star/sdbc/SQLException.hpp>
-#include <o3tl/unreachable.hxx>
 
 using namespace connectivity;
 using namespace dbtools;
diff --git a/connectivity/source/commontools/CommonTools.cxx 
b/connectivity/source/commontools/CommonTools.cxx
index cae16e17eb6e..53fdff0bed8f 100644
--- a/connectivity/source/commontools/CommonTools.cxx
+++ b/connectivity/source/commontools/CommonTools.cxx
@@ -21,7 +21,6 @@
 
 #include <connectivity/CommonTools.hxx>
 #include <connectivity/dbtools.hxx>
-#include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/java/JavaVirtualMachine.hpp>
 #if HAVE_FEATURE_JAVA
 #include <jvmaccess/virtualmachine.hxx>
diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx 
b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
index 67d6bd871756..69d868c9bb40 100644
--- a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
@@ -18,7 +18,6 @@
  */
 
 
-#include <ParameterSubstitution.hxx>
 #include <FDatabaseMetaDataResultSet.hxx>
 #include <FDatabaseMetaDataResultSetMetaData.hxx>
 #include <com/sun/star/sdbc/ColumnSearch.hpp>
@@ -28,7 +27,6 @@
 #include <cppuhelper/supportsservice.hxx>
 #include <connectivity/dbexception.hxx>
 #include <o3tl/safeint.hxx>
-#include <o3tl/unreachable.hxx>
 #include <TConnection.hxx>
 
 using namespace connectivity;
diff --git a/connectivity/source/commontools/RowFunctionParser.cxx 
b/connectivity/source/commontools/RowFunctionParser.cxx
index 51c75a44dc1c..8ba927b52e96 100644
--- a/connectivity/source/commontools/RowFunctionParser.cxx
+++ b/connectivity/source/commontools/RowFunctionParser.cxx
@@ -36,7 +36,6 @@
 #if (OSL_DEBUG_LEVEL > 0)
 #include <iostream>
 #endif
-#include <algorithm>
 #include <stack>
 #include <utility>
 
diff --git a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx 
b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx
index 9918c7612903..6611b5ff08af 100644
--- a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx
+++ b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx
@@ -31,7 +31,6 @@
 #include <resource/sharedresources.hxx>
 #include <strings.hrc>
 #include <connectivity/dbexception.hxx>
-#include <sal/macros.h>
 
 using namespace com::sun::star::uno;
 using namespace com::sun::star::lang;
diff --git a/connectivity/source/commontools/TPrivilegesResultSet.cxx 
b/connectivity/source/commontools/TPrivilegesResultSet.cxx
index 28f361a7def5..db6a7dc6bd6c 100644
--- a/connectivity/source/commontools/TPrivilegesResultSet.cxx
+++ b/connectivity/source/commontools/TPrivilegesResultSet.cxx
@@ -24,7 +24,6 @@ using namespace connectivity;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::sdbc;
 using namespace ::com::sun::star::container;
-using namespace ::com::sun::star::lang;
 
 OResultSetPrivileges::OResultSetPrivileges( const Reference< 
XDatabaseMetaData>& _rxMeta
                                            , const Any& catalog
diff --git a/connectivity/source/commontools/dbconversion.cxx 
b/connectivity/source/commontools/dbconversion.cxx
index 4420a63e38d9..304bca1c757e 100644
--- a/connectivity/source/commontools/dbconversion.cxx
+++ b/connectivity/source/commontools/dbconversion.cxx
@@ -18,7 +18,6 @@
  */
 
 #include <connectivity/dbconversion.hxx>
-#include <com/sun/star/sdbc/SQLException.hpp>
 #include <com/sun/star/util/Date.hpp>
 #include <com/sun/star/util/Time.hpp>
 #include <com/sun/star/util/DateTime.hpp>
diff --git a/connectivity/source/commontools/dbtools.cxx 
b/connectivity/source/commontools/dbtools.cxx
index f9d54236e4b4..28d0158aee71 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -39,7 +39,6 @@
 #include <com/sun/star/sdb/RowSetVetoException.hpp>
 #include <com/sun/star/sdb/SQLContext.hpp>
 #include <com/sun/star/sdb/XCompletedConnection.hpp>
-#include <com/sun/star/sdb/XInteractionSupplyParameters.hpp>
 #include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
 #include <com/sun/star/sdb/XParametersSupplier.hpp>
 #include <com/sun/star/sdb/XQueriesSupplier.hpp>
diff --git a/connectivity/source/commontools/filtermanager.cxx 
b/connectivity/source/commontools/filtermanager.cxx
index fa9fc7116d92..248b56383cf6 100644
--- a/connectivity/source/commontools/filtermanager.cxx
+++ b/connectivity/source/commontools/filtermanager.cxx
@@ -19,7 +19,6 @@
 
 #include <connectivity/filtermanager.hxx>
 
-#include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp>
 #include <TConnection.hxx>
 #include <osl/diagnose.h>
 #include <comphelper/diagnose_ex.hxx>
diff --git a/connectivity/source/cpool/ZConnectionPool.hxx 
b/connectivity/source/cpool/ZConnectionPool.hxx
index c5938f133f3c..27695e33be2c 100644
--- a/connectivity/source/cpool/ZConnectionPool.hxx
+++ b/connectivity/source/cpool/ZConnectionPool.hxx
@@ -29,7 +29,6 @@
 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
 #include <com/sun/star/reflection/XProxyFactory.hpp>
 #include <cppuhelper/implbase.hxx>
-#include <osl/mutex.hxx>
 #include <salhelper/timer.hxx>
 #include <rtl/ref.hxx>
 #include <rtl/digest.h>
diff --git a/connectivity/source/cpool/ZConnectionWrapper.cxx 
b/connectivity/source/cpool/ZConnectionWrapper.cxx
index 685f70bcdc52..e3402e731318 100644
--- a/connectivity/source/cpool/ZConnectionWrapper.cxx
+++ b/connectivity/source/cpool/ZConnectionWrapper.cxx
@@ -22,7 +22,6 @@
 using namespace connectivity;
 
 using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
 using namespace com::sun::star::sdbc;
 
 OConnectionWeakWrapper::OConnectionWeakWrapper(Reference< XAggregation >& 
_xConnection)
diff --git a/connectivity/source/cpool/ZConnectionWrapper.hxx 
b/connectivity/source/cpool/ZConnectionWrapper.hxx
index aec2087f37a4..c67715e96eab 100644
--- a/connectivity/source/cpool/ZConnectionWrapper.hxx
+++ b/connectivity/source/cpool/ZConnectionWrapper.hxx
@@ -19,10 +19,7 @@
 
 #pragma once
 
-#include <cppuhelper/compbase.hxx>
-#include <cppuhelper/basemutex.hxx>
 #include <com/sun/star/sdbc/XConnection.hpp>
-#include <comphelper/uno3.hxx>
 #include <connectivity/ConnectionWrapper.hxx>
 
 namespace connectivity
diff --git a/connectivity/source/cpool/ZPoolCollection.hxx 
b/connectivity/source/cpool/ZPoolCollection.hxx
index 3fdade8a9db6..2344aba92097 100644
--- a/connectivity/source/cpool/ZPoolCollection.hxx
+++ b/connectivity/source/cpool/ZPoolCollection.hxx
@@ -28,7 +28,6 @@
 #include <com/sun/star/sdbc/XDriver.hpp>
 #include <com/sun/star/sdbc/XDriverManager2.hpp>
 #include <com/sun/star/sdbc/XConnectionPool.hpp>
-#include <com/sun/star/sdbc/XConnection.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
diff --git a/connectivity/source/cpool/ZPooledConnection.hxx 
b/connectivity/source/cpool/ZPooledConnection.hxx
index 0f5506f4f3b1..07bb56d117ec 100644
--- a/connectivity/source/cpool/ZPooledConnection.hxx
+++ b/connectivity/source/cpool/ZPooledConnection.hxx
@@ -17,17 +17,19 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 #pragma once
+
 #include <cppuhelper/compbase.hxx>
 #include <cppuhelper/basemutex.hxx>
 #include <com/sun/star/sdbc/XPooledConnection.hpp>
 #include <com/sun/star/lang/XEventListener.hpp>
 #include <com/sun/star/reflection/XProxyFactory.hpp>
+
+#include "ZConnectionWrapper.hxx"
+
 #include <rtl/ref.hxx>
 
 namespace connectivity
 {
-    class OConnectionWeakWrapper;
-
     // OPooledConnection -
     // allows to pool a real connection
 
diff --git a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx 
b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx
index 4c642e66f2e7..9cb015aa32e4 100644
--- a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx
@@ -21,7 +21,6 @@
 #include <calc/CConnection.hxx>
 #include <com/sun/star/sdbc/SQLException.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
 #include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
 #include <com/sun/star/sheet/XSpreadsheet.hpp>
 #include <com/sun/star/sheet/XCellRangeAddressable.hpp>
diff --git a/connectivity/source/drivers/calc/CTable.cxx 
b/connectivity/source/drivers/calc/CTable.cxx
index da7e74542af3..614fd217e0ff 100644
--- a/connectivity/source/drivers/calc/CTable.cxx
+++ b/connectivity/source/drivers/calc/CTable.cxx
@@ -40,7 +40,6 @@
 #include <sal/log.hxx>
 #include <rtl/math.hxx>
 #include <tools/time.hxx>
-#include <comphelper/servicehelper.hxx>
 
 using namespace connectivity;
 using namespace connectivity::calc;
diff --git a/connectivity/source/drivers/calc/CTables.cxx 
b/connectivity/source/drivers/calc/CTables.cxx
index 87fb959fbda6..d1c344a4907c 100644
--- a/connectivity/source/drivers/calc/CTables.cxx
+++ b/connectivity/source/drivers/calc/CTables.cxx
@@ -23,7 +23,6 @@
 #include <calc/CTables.hxx>
 #include <calc/CTable.hxx>
 #include <file/FCatalog.hxx>
-#include <file/FConnection.hxx>
 
 using namespace connectivity;
 using namespace connectivity::calc;
diff --git a/connectivity/source/drivers/component/CTable.cxx 
b/connectivity/source/drivers/component/CTable.cxx
index 6fe82dc830bb..e9d540152db2 100644
--- a/connectivity/source/drivers/component/CTable.cxx
+++ b/connectivity/source/drivers/component/CTable.cxx
@@ -19,7 +19,6 @@
 
 #include <component/CTable.hxx>
 #include <component/CColumns.hxx>
-#include <cppuhelper/queryinterface.hxx>
 
 using namespace connectivity;
 using namespace connectivity::component;
diff --git a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx 
b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
index f34d90fdcaa5..032f58841d6a 100644
--- a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
@@ -29,7 +29,6 @@
 #include <dbase/DIndex.hxx>
 #include <connectivity/FValue.hxx>
 #include <comphelper/processfactory.hxx>
-#include <comphelper/servicehelper.hxx>
 #include <comphelper/types.hxx>
 #include <ucbhelper/content.hxx>
 
diff --git a/connectivity/source/drivers/dbase/DIndex.cxx 
b/connectivity/source/drivers/dbase/DIndex.cxx
index 1c32440e6b89..35a4087c0482 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -28,7 +28,6 @@
 #include <com/sun/star/sdbc/XResultSet.hpp>
 #include <com/sun/star/sdbc/XRow.hpp>
 #include <unotools/ucbhelper.hxx>
-#include <comphelper/servicehelper.hxx>
 #include <comphelper/types.hxx>
 #include <connectivity/dbexception.hxx>
 #include <dbase/DResultSet.hxx>
diff --git a/connectivity/source/drivers/dbase/DIndexes.cxx 
b/connectivity/source/drivers/dbase/DIndexes.cxx
index 1ade0679216c..bde61ccbb015 100644
--- a/connectivity/source/drivers/dbase/DIndexes.cxx
+++ b/connectivity/source/drivers/dbase/DIndexes.cxx
@@ -19,7 +19,6 @@
 
 #include <dbase/DIndexes.hxx>
 #include <dbase/DIndex.hxx>
-#include <comphelper/servicehelper.hxx>
 #include <connectivity/dbexception.hxx>
 #include <unotools/ucbhelper.hxx>
 #include <strings.hrc>
diff --git a/connectivity/source/drivers/dbase/DResultSet.cxx 
b/connectivity/source/drivers/dbase/DResultSet.cxx
index 99357a01fcc8..d5768b32b72a 100644
--- a/connectivity/source/drivers/dbase/DResultSet.cxx
+++ b/connectivity/source/drivers/dbase/DResultSet.cxx
@@ -21,7 +21,6 @@
 #include <dbase/DResultSet.hxx>
 #include <com/sun/star/beans/PropertyAttribute.hpp>
 #include <comphelper/sequence.hxx>
-#include <comphelper/servicehelper.hxx>
 #include <cppuhelper/supportsservice.hxx>
 #include <dbase/DIndex.hxx>
 #include <dbase/DIndexIter.hxx>
diff --git a/connectivity/source/drivers/dbase/DTable.cxx 
b/connectivity/source/drivers/dbase/DTable.cxx
index a3d68bffb2ce..a9130096b185 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -38,7 +38,6 @@
 #include <connectivity/dbexception.hxx>
 #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
 #include <comphelper/property.hxx>
-#include <comphelper/servicehelper.hxx>
 #include <o3tl/string_view.hxx>
 #include <comphelper/string.hxx>
 #include <comphelper/configuration.hxx>
@@ -46,7 +45,6 @@
 #include <unotools/ucbhelper.hxx>
 #include <comphelper/types.hxx>
 #include <cppuhelper/exc_hlp.hxx>
-#include <cppuhelper/queryinterface.hxx>
 #include <connectivity/dbtools.hxx>
 #include <connectivity/FValue.hxx>
 #include <connectivity/dbconversion.hxx>
diff --git a/connectivity/source/drivers/dbase/DTables.cxx 
b/connectivity/source/drivers/dbase/DTables.cxx
index d43bfb31356a..822b8b5d2ea8 100644
--- a/connectivity/source/drivers/dbase/DTables.cxx
+++ b/connectivity/source/drivers/dbase/DTables.cxx
@@ -25,9 +25,7 @@
 #include <com/sun/star/sdbc/SQLException.hpp>
 #include <file/FCatalog.hxx>
 #include <file/FConnection.hxx>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
 #include <dbase/DCatalog.hxx>
-#include <comphelper/servicehelper.hxx>
 #include <cppuhelper/exc_hlp.hxx>
 #include <strings.hrc>
 #include <connectivity/dbexception.hxx>
diff --git a/connectivity/source/drivers/evoab2/NCatalog.cxx 
b/connectivity/source/drivers/evoab2/NCatalog.cxx
index 42c66f7f4542..8b4b4a9327bd 100644
--- a/connectivity/source/drivers/evoab2/NCatalog.cxx
+++ b/connectivity/source/drivers/evoab2/NCatalog.cxx
@@ -27,7 +27,6 @@
 using namespace connectivity::evoab;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::sdbc;
-using namespace ::com::sun::star::container;
 
 OEvoabCatalog::OEvoabCatalog(OEvoabConnection* _pCon) :
     connectivity::sdbcx::OCatalog(_pCon)
diff --git a/connectivity/source/drivers/evoab2/NDriver.cxx 
b/connectivity/source/drivers/evoab2/NDriver.cxx
index 83934b6b3e1a..262750f24cd5 100644
--- a/connectivity/source/drivers/evoab2/NDriver.cxx
+++ b/connectivity/source/drivers/evoab2/NDriver.cxx
@@ -22,7 +22,6 @@
 #include <com/sun/star/lang/DisposedException.hpp>
 #include <connectivity/dbexception.hxx>
 #include <cppuhelper/supportsservice.hxx>
-#include <com/sun/star/ucb/XContentAccess.hpp>
 #include <rtl/ref.hxx>
 #include <strings.hrc>
 #include <resource/sharedresources.hxx>
@@ -30,7 +29,6 @@
 using namespace osl;
 using namespace connectivity::evoab;
 using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::sdbc;
 using namespace ::com::sun::star::lang;
 
diff --git a/connectivity/source/drivers/evoab2/NPreparedStatement.cxx 
b/connectivity/source/drivers/evoab2/NPreparedStatement.cxx
index f518122ebfcd..98a76633c05a 100644
--- a/connectivity/source/drivers/evoab2/NPreparedStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NPreparedStatement.cxx
@@ -30,9 +30,6 @@ using namespace connectivity::evoab;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::lang;
 using namespace com::sun::star::sdbc;
-using namespace com::sun::star::container;
-using namespace com::sun::star::io;
-using namespace com::sun::star::util;
 
 
IMPLEMENT_SERVICE_INFO(OEvoabPreparedStatement,u"com.sun.star.sdbcx.evoab.PreparedStatement"_ustr,u"com.sun.star.sdbc.PreparedStatement"_ustr);
 
diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx 
b/connectivity/source/drivers/evoab2/NResultSet.cxx
index 95a25d664602..8cad6e63b75f 100644
--- a/connectivity/source/drivers/evoab2/NResultSet.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSet.cxx
@@ -51,7 +51,6 @@ using namespace com::sun::star::uno;
 using namespace com::sun::star::lang;
 using namespace com::sun::star::beans;
 using namespace com::sun::star::sdbc;
-using namespace com::sun::star::container;
 using namespace com::sun::star::io;
 namespace ErrorCondition = ::com::sun::star::sdb::ErrorCondition;
 
diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx 
b/connectivity/source/drivers/evoab2/NStatement.cxx
index 8fee66699b3d..e8f134b0629a 100644
--- a/connectivity/source/drivers/evoab2/NStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NStatement.cxx
@@ -28,7 +28,6 @@
 #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 <cppuhelper/typeprovider.hxx>
 #include <propertyids.hxx>
 #include "NStatement.hxx"
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx 
b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index 533b5c15e658..acbf88b00c9e 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -29,7 +29,6 @@
 #include <file/FDriver.hxx>
 #include <file/FTable.hxx>
 #include <comphelper/processfactory.hxx>
-#include <comphelper/servicehelper.hxx>
 #include <comphelper/diagnose_ex.hxx>
 #include <ucbhelper/content.hxx>
 
diff --git a/connectivity/source/drivers/file/FDriver.cxx 
b/connectivity/source/drivers/file/FDriver.cxx
index e5788a257ddb..61caaa5522c9 100644
--- a/connectivity/source/drivers/file/FDriver.cxx
+++ b/connectivity/source/drivers/file/FDriver.cxx
@@ -35,7 +35,6 @@ using namespace com::sun::star::lang;
 using namespace com::sun::star::beans;
 using namespace com::sun::star::sdbc;
 using namespace com::sun::star::sdbcx;
-using namespace com::sun::star::container;
 
 OFileDriver::OFileDriver(css::uno::Reference< css::uno::XComponentContext > 
_xContext)
     : ODriver_BASE(m_aMutex)
diff --git a/connectivity/source/drivers/file/FResultSet.cxx 
b/connectivity/source/drivers/file/FResultSet.cxx
index 56ca7ed0063a..ad365d6c949e 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -25,7 +25,6 @@
 #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/dbtools.hxx>
 #include <cppuhelper/propshlp.hxx>
diff --git a/connectivity/source/drivers/file/FStatement.cxx 
b/connectivity/source/drivers/file/FStatement.cxx
index ee260fdb33e5..e72d2db6671e 100644
--- a/connectivity/source/drivers/file/FStatement.cxx
+++ b/connectivity/source/drivers/file/FStatement.cxx
@@ -32,7 +32,6 @@
 #include <com/sun/star/sdbc/FetchDirection.hpp>
 #include <com/sun/star/lang/DisposedException.hpp>
 #include <comphelper/sequence.hxx>
-#include <comphelper/servicehelper.hxx>
 #include <cppuhelper/typeprovider.hxx>
 #include <comphelper/types.hxx>
 #include <connectivity/dbexception.hxx>
diff --git a/connectivity/source/drivers/file/FTable.cxx 
b/connectivity/source/drivers/file/FTable.cxx
index 120af8a61a11..d4f4db1ac8fe 100644
--- a/connectivity/source/drivers/file/FTable.cxx
+++ b/connectivity/source/drivers/file/FTable.cxx
@@ -22,7 +22,6 @@
 #include <file/FColumns.hxx>
 #include <com/sun/star/sdbc/XRow.hpp>
 #include <com/sun/star/sdbc/XResultSet.hpp>
-#include <comphelper/servicehelper.hxx>
 #include <unotools/ucbstreamhelper.hxx>
 
 using namespace connectivity;
diff --git a/connectivity/source/drivers/firebird/Table.cxx 
b/connectivity/source/drivers/firebird/Table.cxx
index c12ea8439333..701b6c8134cc 100644
--- a/connectivity/source/drivers/firebird/Table.cxx
+++ b/connectivity/source/drivers/firebird/Table.cxx
@@ -15,7 +15,6 @@
 #include <TConnection.hxx>
 
 #include <sal/log.hxx>
-#include <comphelper/sequence.hxx>
 #include <connectivity/dbtools.hxx>
 
 #include <com/sun/star/sdbc/ColumnValue.hpp>
diff --git a/connectivity/source/drivers/firebird/View.cxx 
b/connectivity/source/drivers/firebird/View.cxx
index 6dcbf6bce2b2..ff7865a9fbae 100644
--- a/connectivity/source/drivers/firebird/View.cxx
+++ b/connectivity/source/drivers/firebird/View.cxx
@@ -12,6 +12,8 @@
 
 #include <com/sun/star/sdbc/XRow.hpp>
 
+#include <comphelper/sequence.hxx>
+
 namespace connectivity::firebird
 {
 View::View(const css::uno::Reference<css::sdbc::XConnection>& _rxConnection, 
bool _bCaseSensitive,
diff --git a/connectivity/source/drivers/firebird/View.hxx 
b/connectivity/source/drivers/firebird/View.hxx
index 2b300a8d06d9..90c60735563b 100644
--- a/connectivity/source/drivers/firebird/View.hxx
+++ b/connectivity/source/drivers/firebird/View.hxx
@@ -13,7 +13,6 @@
 #include <com/sun/star/sdbcx/XAlterView.hpp>
 #include <com/sun/star/sdbc/XConnection.hpp>
 
-#include <comphelper/sequence.hxx>
 #include <cppuhelper/implbase1.hxx>
 
 namespace connectivity::firebird
diff --git a/connectivity/source/drivers/flat/ETable.cxx 
b/connectivity/source/drivers/flat/ETable.cxx
index cbf2f1805be5..a248d0775bab 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -28,9 +28,7 @@
 #include <rtl/math.hxx>
 #include <sal/log.hxx>
 #include <tools/urlobj.hxx>
-#include <cppuhelper/queryinterface.hxx>
 #include <comphelper/numbers.hxx>
-#include <comphelper/servicehelper.hxx>
 #include <com/sun/star/util/NumberFormat.hpp>
 #include <com/sun/star/util/NumberFormatter.hpp>
 #include <com/sun/star/util/NumberFormatsSupplier.hpp>
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx 
b/connectivity/source/drivers/hsqldb/HDriver.cxx
index 96e3b5215e97..9827553408fc 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -31,7 +31,6 @@
 #include <TConnection.hxx>
 #include <hsqldb/HStorageMap.hxx>
 #include <jvmfwk/framework.hxx>
-#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/util/XFlushable.hpp>
diff --git a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx 
b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
index 3e874dbbeddc..ceafe7b1e091 100644
--- a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
@@ -18,7 +18,6 @@
  */
 
 #include <hsqldb/HStorageAccess.hxx>
-#include <com/sun/star/embed/XStorage.hpp>
 #include <hsqldb/HStorageMap.hxx>
 #include "accesslog.hxx"
 #include <osl/diagnose.h>
diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx 
b/connectivity/source/drivers/hsqldb/HTable.cxx
index 05338f21aef2..bb8281991bf1 100644
--- a/connectivity/source/drivers/hsqldb/HTable.cxx
+++ b/connectivity/source/drivers/hsqldb/HTable.cxx
@@ -21,7 +21,6 @@
 #include <com/sun/star/beans/PropertyAttribute.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/TKeys.hxx>
diff --git a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx 
b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
index 3336c7f78bb0..ae4a0aeadc60 100644
--- a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
+++ b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
@@ -21,7 +21,6 @@
 #if defined(HAVE_CONFIG_H) && HAVE_CONFIG_H
 #include <config.h>
 #endif
-#include <com/sun/star/io/XStream.hpp>
 #include <com/sun/star/document/XDocumentSubStorageSupplier.hpp>
 #include <hsqldb/HStorageAccess.hxx>
 #include <hsqldb/HStorageMap.hxx>
diff --git a/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx 
b/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx
index bccbec20fcd2..a69143fa5ef1 100644
--- a/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx
+++ b/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx
@@ -21,12 +21,8 @@
 #include <config.h>
 #endif
 
-#include <cppuhelper/bootstrap.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/document/XDocumentSubStorageSupplier.hpp>
 #include <hsqldb/HStorageAccess.hxx>
 #include <hsqldb/HStorageMap.hxx>
 
diff --git a/connectivity/source/drivers/jdbc/CallableStatement.cxx 
b/connectivity/source/drivers/jdbc/CallableStatement.cxx
index 6c1714e06352..95a7229afbdb 100644
--- a/connectivity/source/drivers/jdbc/CallableStatement.cxx
+++ b/connectivity/source/drivers/jdbc/CallableStatement.cxx
@@ -25,7 +25,6 @@
 #include <java/sql/Connection.hxx>
 #include <java/sql/Ref.hxx>
 #include <java/sql/Timestamp.hxx>
-#include <cppuhelper/typeprovider.hxx>
 #include <cppuhelper/queryinterface.hxx>
 #include <comphelper/sequence.hxx>
 
@@ -34,7 +33,6 @@
 using namespace connectivity;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::sdbc;
-using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::lang;
 
 
diff --git a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx 
b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
index e2553f47c020..18a5929e7287 100644
--- a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
+++ b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
@@ -21,7 +21,6 @@
 
 #include <string_view>
 
-#include <sal/macros.h>
 #include <java/sql/DatabaseMetaData.hxx>
 #include <java/sql/Connection.hxx>
 #include <java/sql/ResultSet.hxx>
diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx 
b/connectivity/source/drivers/jdbc/JConnection.cxx
index f99737c8ddfc..fcc058b7a826 100644
--- a/connectivity/source/drivers/jdbc/JConnection.cxx
+++ b/connectivity/source/drivers/jdbc/JConnection.cxx
@@ -52,7 +52,6 @@ using namespace connectivity::jdbc;
 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;
 
 namespace {
diff --git a/connectivity/source/drivers/jdbc/JDriver.cxx 
b/connectivity/source/drivers/jdbc/JDriver.cxx
index efbe25272bea..0ed32e6deb43 100644
--- a/connectivity/source/drivers/jdbc/JDriver.cxx
+++ b/connectivity/source/drivers/jdbc/JDriver.cxx
@@ -31,7 +31,6 @@ 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;
 
 
diff --git a/connectivity/source/drivers/jdbc/JStatement.cxx 
b/connectivity/source/drivers/jdbc/JStatement.cxx
index da53ee7f50bb..ef174289d484 100644
--- a/connectivity/source/drivers/jdbc/JStatement.cxx
+++ b/connectivity/source/drivers/jdbc/JStatement.cxx
@@ -47,7 +47,6 @@ using namespace ::cppu;
 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;
 
 
diff --git a/connectivity/source/drivers/jdbc/PreparedStatement.cxx 
b/connectivity/source/drivers/jdbc/PreparedStatement.cxx
index 65ff309c019c..5c8f792a50fc 100644
--- a/connectivity/source/drivers/jdbc/PreparedStatement.cxx
+++ b/connectivity/source/drivers/jdbc/PreparedStatement.cxx
@@ -41,7 +41,6 @@
 using namespace connectivity;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::sdbc;
-using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::lang;
 
 
diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx 
b/connectivity/source/drivers/jdbc/ResultSet.cxx
index e88fb9600138..c604ddd0ad80 100644
--- a/connectivity/source/drivers/jdbc/ResultSet.cxx
+++ b/connectivity/source/drivers/jdbc/ResultSet.cxx
@@ -55,7 +55,6 @@ 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;
 
 
IMPLEMENT_SERVICE_INFO(java_sql_ResultSet,u"com.sun.star.sdbcx.JResultSet"_ustr,u"com.sun.star.sdbc.ResultSet"_ustr);
diff --git a/connectivity/source/drivers/jdbc/tools.cxx 
b/connectivity/source/drivers/jdbc/tools.cxx
index ad133ee5726d..eaf13ebb30ac 100644
--- a/connectivity/source/drivers/jdbc/tools.cxx
+++ b/connectivity/source/drivers/jdbc/tools.cxx
@@ -21,7 +21,6 @@
 #include <string.h>
 #include <java/tools.hxx>
 #include <java/util/Property.hxx>
-#include <com/sun/star/sdbc/DriverPropertyInfo.hpp>
 #include <com/sun/star/sdbc/SQLException.hpp>
 #include <com/sun/star/container/XNameAccess.hpp>
 #include <connectivity/dbexception.hxx>
diff --git a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx 
b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx
index 37cfb087a70f..f80506455306 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx
@@ -17,9 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <cppuhelper/factory.hxx>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
 #include <cppuhelper/supportsservice.hxx>
 #include <cppuhelper/weak.hxx>
 #include "MMozillaBootstrap.hxx"
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx 
b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx
index 5c60dc87e544..529062afc8f0 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx
@@ -24,7 +24,6 @@
 #include <com/sun/star/uno/Sequence.hxx>
 #include <rtl/ustring.hxx>
 
-#include <vector>
 #include <map>
 
 using namespace com::sun::star::mozilla;
diff --git a/connectivity/source/drivers/mysql_jdbc/YTable.cxx 
b/connectivity/source/drivers/mysql_jdbc/YTable.cxx
index dfb3e37a186f..dff616660589 100644
--- a/connectivity/source/drivers/mysql_jdbc/YTable.cxx
+++ b/connectivity/source/drivers/mysql_jdbc/YTable.cxx
@@ -22,7 +22,6 @@
 #include <com/sun/star/beans/PropertyAttribute.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>
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx 
b/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx
index 0c54630f25f2..6af532a92d91 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx
@@ -33,7 +33,6 @@
 using namespace connectivity::mysqlc;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::sdbc;
-using namespace com::sun::star::container;
 using namespace com::sun::star::io;
 using namespace com::sun::star::util;
 using ::osl::MutexGuard;
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.cxx 
b/connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.cxx
index 21dd0fafc686..aa7c73c88b5a 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.cxx
@@ -21,7 +21,6 @@
 #include "mysqlc_general.hxx"
 
 #include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
 #include <o3tl/safeint.hxx>
 
 using namespace connectivity::mysqlc;
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx 
b/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx
index 2d8deaebdec1..1b1a496071fc 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx
@@ -22,6 +22,7 @@
 #include "mysqlc_connection.hxx"
 #include "mysqlc_propertyids.hxx"
 #include "mysqlc_resultset.hxx"
+#include "mysqlc_resultsetmetadata.hxx"
 #include "mysqlc_statement.hxx"
 #include "mysqlc_general.hxx"
 
@@ -34,7 +35,6 @@ using namespace com::sun::star::uno;
 using namespace com::sun::star::lang;
 using namespace com::sun::star::beans;
 using namespace com::sun::star::sdbc;
-using namespace com::sun::star::container;
 using namespace com::sun::star::util;
 using ::osl::MutexGuard;
 
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_tables.cxx 
b/connectivity/source/drivers/mysqlc/mysqlc_tables.cxx
index dd59963075ea..62d6ef224091 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_tables.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_tables.cxx
@@ -11,12 +11,9 @@
 #include "mysqlc_tables.hxx"
 #include "mysqlc_catalog.hxx"
 
-#include <TConnection.hxx>
-
 #include <connectivity/dbtools.hxx>
 
 #include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/sdbc/ColumnValue.hpp>
 #include <comphelper/types.hxx>
 
 //----- OCollection -----------------------------------------------------------
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_users.cxx 
b/connectivity/source/drivers/mysqlc/mysqlc_users.cxx
index e2149d532d04..6a720cdbe3b7 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_users.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_users.cxx
@@ -7,8 +7,6 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include <utility>
-
 #include "mysqlc_user.hxx"
 #include "mysqlc_users.hxx"
 #include <comphelper/types.hxx>
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_view.cxx 
b/connectivity/source/drivers/mysqlc/mysqlc_view.cxx
index 86837381d2bc..b3601a5b2759 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_view.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_view.cxx
@@ -23,6 +23,8 @@
 
 #include <com/sun/star/sdbc/XRow.hpp>
 
+#include <comphelper/sequence.hxx>
+
 namespace connectivity::mysqlc
 {
 View::View(const css::uno::Reference<css::sdbc::XConnection>& _rxConnection, 
bool _bCaseSensitive,
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_view.hxx 
b/connectivity/source/drivers/mysqlc/mysqlc_view.hxx
index 8450152499c0..3a227fd074e0 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_view.hxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_view.hxx
@@ -24,7 +24,6 @@
 #include <com/sun/star/sdbcx/XAlterView.hpp>
 #include <com/sun/star/sdbc/XConnection.hpp>
 
-#include <comphelper/sequence.hxx>
 #include <cppuhelper/implbase1.hxx>
 
 namespace connectivity::mysqlc
diff --git a/connectivity/source/drivers/odbc/OConnection.cxx 
b/connectivity/source/drivers/odbc/OConnection.cxx
index 57b3891958fa..ea42757cdac9 100644
--- a/connectivity/source/drivers/odbc/OConnection.cxx
+++ b/connectivity/source/drivers/odbc/OConnection.cxx
@@ -29,8 +29,6 @@
 
 #include <sal/log.hxx>
 
-#include <string.h>
-
 using namespace connectivity::odbc;
 using namespace connectivity;
 using namespace dbtools;
diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx 
b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
index bc5b08f5550d..3516571c55cb 100644
--- a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
@@ -27,7 +27,6 @@
 #include <comphelper/stl_types.hxx>
 #include <odbc/OResultSetMetaData.hxx>
 #include <odbc/OTools.hxx>
-#include <comphelper/types.hxx>
 #include <connectivity/dbexception.hxx>
 
 using namespace ::comphelper;
diff --git a/connectivity/source/drivers/odbc/OPreparedStatement.cxx 
b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
index e0225e0f6407..0d22ba3abeaa 100644
--- a/connectivity/source/drivers/odbc/OPreparedStatement.cxx
+++ b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
@@ -41,7 +41,6 @@ using namespace connectivity::odbc;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::lang;
 using namespace com::sun::star::sdbc;
-using namespace com::sun::star::container;
 using namespace com::sun::star::io;
 using namespace com::sun::star::util;
 
diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx 
b/connectivity/source/drivers/odbc/OResultSet.cxx
index 1603f4396749..a0e25e9b583f 100644
--- a/connectivity/source/drivers/odbc/OResultSet.cxx
+++ b/connectivity/source/drivers/odbc/OResultSet.cxx
@@ -31,7 +31,6 @@
 #include <cppuhelper/typeprovider.hxx>
 #include <cppuhelper/supportsservice.hxx>
 #include <comphelper/types.hxx>
-#include <comphelper/scopeguard.hxx>
 #include <connectivity/dbtools.hxx>
 #include <connectivity/dbexception.hxx>
 #include <o3tl/safeint.hxx>
diff --git a/connectivity/source/drivers/odbc/OStatement.cxx 
b/connectivity/source/drivers/odbc/OStatement.cxx
index 989db77ce462..3fde457cc8f5 100644
--- a/connectivity/source/drivers/odbc/OStatement.cxx
+++ b/connectivity/source/drivers/odbc/OStatement.cxx
@@ -32,7 +32,6 @@
 #include <cppuhelper/typeprovider.hxx>
 #include <cppuhelper/queryinterface.hxx>
 #include <comphelper/types.hxx>
-#include <rtl/strbuf.hxx>
 #include <algorithm>
 #include <strings.hrc>
 #include <connectivity/dbexception.hxx>
@@ -49,7 +48,6 @@ using namespace com::sun::star::uno;
 using namespace com::sun::star::lang;
 using namespace com::sun::star::beans;
 using namespace com::sun::star::sdbc;
-using namespace com::sun::star::container;
 using namespace com::sun::star::util;
 
 OStatement_Base::OStatement_Base(OConnection* _pConnection )
diff --git a/connectivity/source/drivers/postgresql/pq_driver.cxx 
b/connectivity/source/drivers/postgresql/pq_driver.cxx
index a1025017d8c7..211460a95587 100644
--- a/connectivity/source/drivers/postgresql/pq_driver.cxx
+++ b/connectivity/source/drivers/postgresql/pq_driver.cxx
@@ -36,7 +36,6 @@
 
 #include <cppuhelper/supportsservice.hxx>
 #include <cppuhelper/weak.hxx>
-#include <com/sun/star/lang/XSingleComponentFactory.hpp>
 
 #include "pq_driver.hxx"
 
diff --git a/connectivity/source/inc/FDatabaseMetaDataResultSetMetaData.hxx 
b/connectivity/source/inc/FDatabaseMetaDataResultSetMetaData.hxx
index 9de12267229c..b48fa7d3a033 100644
--- a/connectivity/source/inc/FDatabaseMetaDataResultSetMetaData.hxx
+++ b/connectivity/source/inc/FDatabaseMetaDataResultSetMetaData.hxx
@@ -22,7 +22,6 @@
 #include <com/sun/star/sdbc/XResultSetMetaData.hpp>
 #include <cppuhelper/implbase.hxx>
 #include <map>
-#include <vector>
 #include "OColumn.hxx"
 
 namespace connectivity
diff --git a/connectivity/source/inc/file/FPreparedStatement.hxx 
b/connectivity/source/inc/file/FPreparedStatement.hxx
index 822278eb02d2..296556b5e06a 100644
--- a/connectivity/source/inc/file/FPreparedStatement.hxx
+++ b/connectivity/source/inc/file/FPreparedStatement.hxx
@@ -24,7 +24,6 @@
 #include <com/sun/star/sdbc/XPreparedStatement.hpp>
 #include <com/sun/star/sdbc/XParameters.hpp>
 #include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
-#include <com/sun/star/io/XInputStream.hpp>
 #include <file/FResultSet.hxx>
 
 namespace connectivity::file
diff --git a/connectivity/source/inc/hsqldb/HConnection.hxx 
b/connectivity/source/inc/hsqldb/HConnection.hxx
index 29763b433ccf..4ca3f683f784 100644
--- a/connectivity/source/inc/hsqldb/HConnection.hxx
+++ b/connectivity/source/inc/hsqldb/HConnection.hxx
@@ -23,9 +23,6 @@
 #include <com/sun/star/util/XFlushable.hpp>
 #include <com/sun/star/sdbc/XDriver.hpp>
 #include <com/sun/star/sdb/application/XTableUIProvider.hpp>
-#include <cppuhelper/compbase.hxx>
-#include <cppuhelper/basemutex.hxx>
-#include <comphelper/uno3.hxx>
 #include <comphelper/interfacecontainer2.hxx>
 
 namespace connectivity::hsqldb
diff --git a/connectivity/source/manager/mdrivermanager.cxx 
b/connectivity/source/manager/mdrivermanager.cxx
index a7d62a34e949..ef4ec524b0d6 100644
--- a/connectivity/source/manager/mdrivermanager.cxx
+++ b/connectivity/source/manager/mdrivermanager.cxx
@@ -20,11 +20,9 @@
 #include <config_fuzzers.h>
 
 #include "mdrivermanager.hxx"
-#include <com/sun/star/configuration/theDefaultProvider.hpp>
 #include <com/sun/star/sdbc/XDriver.hpp>
 #include <com/sun/star/container/XContentEnumerationAccess.hpp>
 #include <com/sun/star/container/ElementExistException.hpp>
-#include <com/sun/star/beans/NamedValue.hpp>
 #include <com/sun/star/logging/LogLevel.hpp>
 
 #include <comphelper/diagnose_ex.hxx>
diff --git a/connectivity/source/sdbcx/VCollection.cxx 
b/connectivity/source/sdbcx/VCollection.cxx
index b5564f90930e..cbd2cdb54813 100644
--- a/connectivity/source/sdbcx/VCollection.cxx
+++ b/connectivity/source/sdbcx/VCollection.cxx
@@ -28,9 +28,7 @@
 #include <comphelper/enumhelper.hxx>
 #include <comphelper/types.hxx>
 #include <comphelper/property.hxx>
-#include <comphelper/servicehelper.hxx>
 #include <cppuhelper/exc_hlp.hxx>
-#include <o3tl/unreachable.hxx>
 #include <TConnection.hxx>
 #include <strings.hrc>
 #include <resource/sharedresources.hxx>
diff --git a/connectivity/source/sdbcx/VDescriptor.cxx 
b/connectivity/source/sdbcx/VDescriptor.cxx
index d6ceabc96837..fab0291dea20 100644
--- a/connectivity/source/sdbcx/VDescriptor.cxx
+++ b/connectivity/source/sdbcx/VDescriptor.cxx
@@ -19,8 +19,6 @@
 
 #include <connectivity/sdbcx/VDescriptor.hxx>
 #include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <comphelper/servicehelper.hxx>
-#include <cppuhelper/queryinterface.hxx>
 #include <cppuhelper/typeprovider.hxx>
 
 #include <algorithm>
diff --git a/connectivity/source/sdbcx/VIndex.cxx 
b/connectivity/source/sdbcx/VIndex.cxx
index b69c1414d9f7..3eb5456a381e 100644
--- a/connectivity/source/sdbcx/VIndex.cxx
+++ b/connectivity/source/sdbcx/VIndex.cxx
@@ -19,7 +19,6 @@
 
 #include <sdbcx/VIndex.hxx>
 #include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <connectivity/dbexception.hxx>
 #include <comphelper/sequence.hxx>
 #include <connectivity/sdbcx/VCollection.hxx>
 #include <cppuhelper/supportsservice.hxx>
diff --git a/connectivity/source/sdbcx/VKey.cxx 
b/connectivity/source/sdbcx/VKey.cxx
index 0780d13fc944..e102f6f0d22c 100644
--- a/connectivity/source/sdbcx/VKey.cxx
+++ b/connectivity/source/sdbcx/VKey.cxx
@@ -19,7 +19,6 @@
 
 #include <sdbcx/VKey.hxx>
 #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/VCollection.hxx>
diff --git a/connectivity/source/sdbcx/VUser.cxx 
b/connectivity/source/sdbcx/VUser.cxx
index 0e897260e032..31069d1b7021 100644
--- a/connectivity/source/sdbcx/VUser.cxx
+++ b/connectivity/source/sdbcx/VUser.cxx
@@ -22,7 +22,6 @@
 #include <connectivity/sdbcx/VCollection.hxx>
 #include <connectivity/dbexception.hxx>
 #include <comphelper/sequence.hxx>
-#include <o3tl/unreachable.hxx>
 
 
 using namespace connectivity;

Reply via email to