comphelper/IwyuFilter_comphelper.yaml | 8 ++++++++ comphelper/qa/string/NaturalStringSortTest.cxx | 6 ------ comphelper/qa/string/test_string.cxx | 4 ---- comphelper/qa/unit/CryptoTest.cxx | 2 +- comphelper/source/container/embeddedobjectcontainer.cxx | 1 - comphelper/source/container/namecontainer.cxx | 1 - comphelper/source/crypto/Crypto.cxx | 2 -- comphelper/source/crypto/Crypto_NSS.cxx | 1 - comphelper/source/misc/accessibleeventnotifier.cxx | 1 - comphelper/source/misc/anytohash.cxx | 3 +-- comphelper/source/misc/asyncnotification.cxx | 1 - comphelper/source/misc/backupfilehelper.cxx | 3 +-- comphelper/source/misc/date.cxx | 2 -- comphelper/source/misc/diagnose_ex.cxx | 1 - comphelper/source/misc/emscriptenthreading.cxx | 3 ++- comphelper/source/misc/errcode.cxx | 1 - comphelper/source/misc/fileurl.cxx | 1 - comphelper/source/misc/graphicmimetype.cxx | 1 - comphelper/source/misc/random.cxx | 2 -- comphelper/source/misc/solarmutex.cxx | 1 - comphelper/source/misc/storagehelper.cxx | 2 -- comphelper/source/misc/traceevent.cxx | 1 - comphelper/source/processfactory/processfactory.cxx | 2 -- comphelper/source/property/ChainablePropertySet.cxx | 1 - comphelper/source/property/MasterPropertySet.cxx | 1 - comphelper/source/property/genericpropertyset.cxx | 2 +- comphelper/source/property/propertycontainer.cxx | 2 -- comphelper/source/property/propertycontainer2.cxx | 3 --- comphelper/source/property/propertysetinfo.cxx | 1 - comphelper/source/streaming/basicio.cxx | 1 - comphelper/source/streaming/memorystream.cxx | 3 --- 31 files changed, 14 insertions(+), 50 deletions(-)
New commits: commit 2ceebbe54838bc25eeadde872def45d4b5180282 Author: Gabor Kelemen <gabor.kele...@collabora.com> AuthorDate: Fri Aug 1 22:10:54 2025 +0200 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Fri Sep 12 23:56:34 2025 +0200 tdf#146619 Run IWYU on comphelper/ Change-Id: If7c9691b5531d079e80ce3115409e60777bd75f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189789 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> diff --git a/comphelper/IwyuFilter_comphelper.yaml b/comphelper/IwyuFilter_comphelper.yaml index 76008973ab11..f5f0c61c2b7a 100644 --- a/comphelper/IwyuFilter_comphelper.yaml +++ b/comphelper/IwyuFilter_comphelper.yaml @@ -34,9 +34,14 @@ excludelist: comphelper/source/container/enumerablemap.cxx: # Avoid loplugin:unreffun error - comphelper_services.hxx + # Needed for typedef + - com/sun/star/lang/XServiceInfo.hpp comphelper/source/container/namecontainer.cxx: # Needed for NameContainer_createInstance - comphelper/namecontainer.hxx + comphelper/source/crypto/Crypto_NSS.cxx: + # Keep catch-all interface file of NSPR + - nspr.h comphelper/source/eventattachermgr/eventattachermgr.cxx: # Needed for linker visibility - comphelper/eventattachermgr.hxx @@ -52,6 +57,9 @@ excludelist: comphelper/source/misc/graphicmimetype.cxx: # Needed for direct member access - com/sun/star/io/XInputStream.hpp + comphelper/source/misc/hash.cxx: + # Keep catch-all interface file of NSPR + - nspr.h comphelper/source/misc/instancelocker.cxx: # Needed for template - com/sun/star/embed/XActionsApproval.hpp diff --git a/comphelper/qa/string/NaturalStringSortTest.cxx b/comphelper/qa/string/NaturalStringSortTest.cxx index 32519d7534e6..a2c85e8bdfb4 100644 --- a/comphelper/qa/string/NaturalStringSortTest.cxx +++ b/comphelper/qa/string/NaturalStringSortTest.cxx @@ -19,16 +19,10 @@ #include <comphelper/string.hxx> #include <comphelper/processfactory.hxx> -#include <cppuhelper/implbase.hxx> -#include <com/sun/star/i18n/CharType.hpp> -#include <com/sun/star/i18n/XBreakIterator.hpp> -#include <com/sun/star/i18n/XCollator.hpp> #include <unotest/bootstrapfixturebase.hxx> #include <cppunit/TestAssert.h> -#include <cppunit/TestFixture.h> #include <cppunit/extensions/HelperMacros.h> -#include <cppunit/plugin/TestPlugIn.h> #include <rtl/ustring.hxx> using namespace css; diff --git a/comphelper/qa/string/test_string.cxx b/comphelper/qa/string/test_string.cxx index 93d2965941c9..f4c473230a7f 100644 --- a/comphelper/qa/string/test_string.cxx +++ b/comphelper/qa/string/test_string.cxx @@ -22,10 +22,6 @@ #include <iterator> #include <comphelper/string.hxx> -#include <cppuhelper/implbase.hxx> -#include <com/sun/star/i18n/CharType.hpp> -#include <com/sun/star/i18n/XBreakIterator.hpp> -#include <com/sun/star/i18n/XCollator.hpp> #include <cppunit/TestAssert.h> #include <cppunit/TestFixture.h> diff --git a/comphelper/qa/unit/CryptoTest.cxx b/comphelper/qa/unit/CryptoTest.cxx index 95b7a1b11781..dfbd0969236c 100644 --- a/comphelper/qa/unit/CryptoTest.cxx +++ b/comphelper/qa/unit/CryptoTest.cxx @@ -12,7 +12,7 @@ #include <comphelper/crypto/Crypto.hxx> #include <comphelper/hash.hxx> -#include <rtl/ustring.hxx> +#include <rtl/string.hxx> #include <cppunit/TestFixture.h> #include <cppunit/extensions/HelperMacros.h> diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx index 9928e176bfca..16fa2bd97cdb 100644 --- a/comphelper/source/container/embeddedobjectcontainer.cxx +++ b/comphelper/source/container/embeddedobjectcontainer.cxx @@ -28,7 +28,6 @@ #include <com/sun/star/embed/XOptimizedStorage.hpp> #include <com/sun/star/embed/EntryInitModes.hpp> #include <com/sun/star/io/IOException.hpp> -#include <com/sun/star/util/XCloseable.hpp> #include <com/sun/star/util/XModifiable.hpp> #include <com/sun/star/embed/EmbedStates.hpp> #include <com/sun/star/beans/XPropertySetInfo.hpp> diff --git a/comphelper/source/container/namecontainer.cxx b/comphelper/source/container/namecontainer.cxx index 98f0b0b312ce..4c79c79736e5 100644 --- a/comphelper/source/container/namecontainer.cxx +++ b/comphelper/source/container/namecontainer.cxx @@ -25,7 +25,6 @@ #include <comphelper/namecontainer.hxx> #include <comphelper/sequence.hxx> #include <cppuhelper/implbase.hxx> -#include <osl/mutex.hxx> #include <com/sun/star/container/XNameContainer.hpp> typedef std::map<OUString, css::uno::Any> SvGenericNameContainerMapImpl; diff --git a/comphelper/source/crypto/Crypto.cxx b/comphelper/source/crypto/Crypto.cxx index faf1da7307f9..711f2c8453da 100644 --- a/comphelper/source/crypto/Crypto.cxx +++ b/comphelper/source/crypto/Crypto.cxx @@ -8,9 +8,7 @@ */ #include <comphelper/crypto/Crypto.hxx> -#include <com/sun/star/uno/RuntimeException.hpp> #include <sal/types.h> -#include <config_oox.h> namespace comphelper { diff --git a/comphelper/source/crypto/Crypto_NSS.cxx b/comphelper/source/crypto/Crypto_NSS.cxx index 08c8bb85c288..c44ff3bed79a 100644 --- a/comphelper/source/crypto/Crypto_NSS.cxx +++ b/comphelper/source/crypto/Crypto_NSS.cxx @@ -10,7 +10,6 @@ #include <comphelper/crypto/Crypto.hxx> #include <com/sun/star/uno/RuntimeException.hpp> #include <sal/types.h> -#include <config_oox.h> #include <nss.h> #include <nspr.h> diff --git a/comphelper/source/misc/accessibleeventnotifier.cxx b/comphelper/source/misc/accessibleeventnotifier.cxx index 9c3b55126bc6..d4b440ae6db0 100644 --- a/comphelper/source/misc/accessibleeventnotifier.cxx +++ b/comphelper/source/misc/accessibleeventnotifier.cxx @@ -23,7 +23,6 @@ #include <limits> #include <map> -#include <memory> #include <unordered_map> using namespace ::com::sun::star::uno; diff --git a/comphelper/source/misc/anytohash.cxx b/comphelper/source/misc/anytohash.cxx index 4e97ea124d41..d11180359250 100644 --- a/comphelper/source/misc/anytohash.cxx +++ b/comphelper/source/misc/anytohash.cxx @@ -22,8 +22,7 @@ #include <o3tl/hash_combine.hxx> #include <typelib/typedescription.hxx> - -#include <com/sun/star/uno/Sequence.hxx> +#include <com/sun/star/uno/Any.hxx> #include "typedescriptionref.hxx" diff --git a/comphelper/source/misc/asyncnotification.cxx b/comphelper/source/misc/asyncnotification.cxx index a086c56f307d..3ab3c4c0f076 100644 --- a/comphelper/source/misc/asyncnotification.cxx +++ b/comphelper/source/misc/asyncnotification.cxx @@ -25,7 +25,6 @@ #include <cassert> #include <stdexcept> #include <vector> -#include <algorithm> namespace comphelper { diff --git a/comphelper/source/misc/backupfilehelper.cxx b/comphelper/source/misc/backupfilehelper.cxx index cc6c0c7637d9..50212ab0bad3 100644 --- a/comphelper/source/misc/backupfilehelper.cxx +++ b/comphelper/source/misc/backupfilehelper.cxx @@ -25,6 +25,7 @@ #include <comphelper/processfactory.hxx> #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> +#include <com/sun/star/lang/IllegalArgumentException.hpp> #include <com/sun/star/ucb/CommandAbortedException.hpp> #include <com/sun/star/ucb/CommandFailedException.hpp> #include <com/sun/star/uno/Sequence.hxx> @@ -39,10 +40,8 @@ #include <com/sun/star/xml/sax/XSAXSerializable.hpp> #include <com/sun/star/xml/sax/Writer.hpp> #include <com/sun/star/xml/sax/XWriter.hpp> -#include <com/sun/star/io/XStream.hpp> #include <com/sun/star/io/TempFile.hpp> #include <com/sun/star/io/XOutputStream.hpp> -#include <com/sun/star/beans/XPropertySet.hpp> #include <cppuhelper/exc_hlp.hxx> using namespace comphelper; diff --git a/comphelper/source/misc/date.cxx b/comphelper/source/misc/date.cxx index 2625d32c1d2f..6cb53dd30647 100644 --- a/comphelper/source/misc/date.cxx +++ b/comphelper/source/misc/date.cxx @@ -19,8 +19,6 @@ #include <comphelper/date.hxx> -#include <cassert> - namespace comphelper::date { // Once upon a time the number of days we internally handled in tools' class diff --git a/comphelper/source/misc/diagnose_ex.cxx b/comphelper/source/misc/diagnose_ex.cxx index 27d15c930e2e..36bb2e858848 100644 --- a/comphelper/source/misc/diagnose_ex.cxx +++ b/comphelper/source/misc/diagnose_ex.cxx @@ -47,7 +47,6 @@ #include <com/sun/star/xml/sax/SAXException.hpp> #include <com/sun/star/xml/sax/SAXParseException.hpp> #include <comphelper/anytostring.hxx> -#include <sal/log.hxx> #include <osl/thread.h> #include <rtl/strbuf.hxx> diff --git a/comphelper/source/misc/emscriptenthreading.cxx b/comphelper/source/misc/emscriptenthreading.cxx index 0cf905e86170..3c33fc47b5f5 100644 --- a/comphelper/source/misc/emscriptenthreading.cxx +++ b/comphelper/source/misc/emscriptenthreading.cxx @@ -9,12 +9,13 @@ #include <sal/config.h> -#include <comphelper/emscriptenthreading.hxx> #include <config_emscripten.h> #include <config_vclplug.h> #if defined EMSCRIPTEN && ENABLE_QT6 && HAVE_EMSCRIPTEN_JSPI && !HAVE_EMSCRIPTEN_PROXY_TO_PTHREAD +#include <comphelper/emscriptenthreading.hxx> + #include <mutex> #include <thread> diff --git a/comphelper/source/misc/errcode.cxx b/comphelper/source/misc/errcode.cxx index 716daab1793e..707f3949b176 100644 --- a/comphelper/source/misc/errcode.cxx +++ b/comphelper/source/misc/errcode.cxx @@ -18,7 +18,6 @@ */ #include <comphelper/errcode.hxx> -#include <rtl/ustrbuf.hxx> #include <o3tl/runtimetooustring.hxx> UNLESS_MERGELIBS(COMPHELPER_DLLPUBLIC) OUString ErrCode::toString() const diff --git a/comphelper/source/misc/fileurl.cxx b/comphelper/source/misc/fileurl.cxx index 2515b28c5b30..035d31c2abbb 100644 --- a/comphelper/source/misc/fileurl.cxx +++ b/comphelper/source/misc/fileurl.cxx @@ -20,7 +20,6 @@ #include <sal/config.h> #include <comphelper/fileurl.hxx> -#include <rtl/ustring.hxx> #include <o3tl/string_view.hxx> bool comphelper::isFileUrl(std::u16string_view url) diff --git a/comphelper/source/misc/graphicmimetype.cxx b/comphelper/source/misc/graphicmimetype.cxx index 73845d79547a..9803915b6df4 100644 --- a/comphelper/source/misc/graphicmimetype.cxx +++ b/comphelper/source/misc/graphicmimetype.cxx @@ -33,7 +33,6 @@ #include <comphelper/processfactory.hxx> #include <comphelper/propertyvalue.hxx> -#include <frozen/bits/defines.h> #include <frozen/bits/elsa_std.h> #include <frozen/unordered_map.h> diff --git a/comphelper/source/misc/random.cxx b/comphelper/source/misc/random.cxx index 5e763beb6c0a..7ee67ac1a8c2 100644 --- a/comphelper/source/misc/random.cxx +++ b/comphelper/source/misc/random.cxx @@ -11,13 +11,11 @@ */ #include <comphelper/random.hxx> -#include <sal/log.hxx> #include <assert.h> #include <time.h> #include <mutex> #include <random> #include <rtl/random.h> -#include <stdexcept> #if defined HAVE_VALGRIND_HEADERS #include <valgrind/memcheck.h> #endif diff --git a/comphelper/source/misc/solarmutex.cxx b/comphelper/source/misc/solarmutex.cxx index 3e45ae14582d..3243e575626b 100644 --- a/comphelper/source/misc/solarmutex.cxx +++ b/comphelper/source/misc/solarmutex.cxx @@ -20,7 +20,6 @@ #include <sal/config.h> #include <comphelper/solarmutex.hxx> -#include <osl/thread.hxx> #include <assert.h> #include <cstdlib> diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx index 1540b16b8b7b..1948b66ba65e 100644 --- a/comphelper/source/misc/storagehelper.cxx +++ b/comphelper/source/misc/storagehelper.cxx @@ -27,7 +27,6 @@ #include <com/sun/star/embed/FileSystemStorageFactory.hpp> #include <com/sun/star/io/IOException.hpp> #include <com/sun/star/lang/XSingleServiceFactory.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> #include <com/sun/star/beans/XPropertySet.hpp> @@ -41,7 +40,6 @@ #include <rtl/digest.h> #include <rtl/random.h> -#include <osl/diagnose.h> #include <sal/log.hxx> #include <ucbhelper/content.hxx> diff --git a/comphelper/source/misc/traceevent.cxx b/comphelper/source/misc/traceevent.cxx index 1296404ebd32..a1bf09246065 100644 --- a/comphelper/source/misc/traceevent.cxx +++ b/comphelper/source/misc/traceevent.cxx @@ -11,7 +11,6 @@ #include <atomic> #include <mutex> -#include <iostream> #include <comphelper/profilezone.hxx> #include <comphelper/sequence.hxx> diff --git a/comphelper/source/processfactory/processfactory.cxx b/comphelper/source/processfactory/processfactory.cxx index 3312128a32df..15d1181b3a3d 100644 --- a/comphelper/source/processfactory/processfactory.cxx +++ b/comphelper/source/processfactory/processfactory.cxx @@ -25,8 +25,6 @@ #include <com/sun/star/uno/DeploymentException.hpp> #include <com/sun/star/uno/XComponentContext.hpp> -namespace com::sun::star::uno { class XComponentContext; } - using namespace ::com::sun::star; using namespace com::sun::star::uno; using namespace com::sun::star::lang; diff --git a/comphelper/source/property/ChainablePropertySet.cxx b/comphelper/source/property/ChainablePropertySet.cxx index dfb5c2b3f80d..bbaca923d399 100644 --- a/comphelper/source/property/ChainablePropertySet.cxx +++ b/comphelper/source/property/ChainablePropertySet.cxx @@ -22,7 +22,6 @@ #include <comphelper/solarmutex.hxx> -#include <memory> #include <optional> using namespace ::comphelper; diff --git a/comphelper/source/property/MasterPropertySet.cxx b/comphelper/source/property/MasterPropertySet.cxx index bd5ce83eaa16..6c7b9438c2db 100644 --- a/comphelper/source/property/MasterPropertySet.cxx +++ b/comphelper/source/property/MasterPropertySet.cxx @@ -25,7 +25,6 @@ #include <comphelper/solarmutex.hxx> -#include <memory> #include <vector> #include <optional> diff --git a/comphelper/source/property/genericpropertyset.cxx b/comphelper/source/property/genericpropertyset.cxx index c33ed391ec96..9351b1484019 100644 --- a/comphelper/source/property/genericpropertyset.cxx +++ b/comphelper/source/property/genericpropertyset.cxx @@ -23,7 +23,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XTypeProvider.hpp> -#include <cppuhelper/weakagg.hxx> +#include <com/sun/star/uno/XAggregation.hpp> #include <cppuhelper/supportsservice.hxx> #include <comphelper/multiinterfacecontainer4.hxx> #include <comphelper/propertysethelper.hxx> diff --git a/comphelper/source/property/propertycontainer.cxx b/comphelper/source/property/propertycontainer.cxx index 0c17feb50234..2298460e4f91 100644 --- a/comphelper/source/property/propertycontainer.cxx +++ b/comphelper/source/property/propertycontainer.cxx @@ -18,7 +18,6 @@ */ #include <comphelper/propertycontainer.hxx> -#include <cppuhelper/typeprovider.hxx> namespace comphelper @@ -26,7 +25,6 @@ namespace comphelper using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::beans; OPropertyContainer::OPropertyContainer(::cppu::OBroadcastHelper& _rBHelper) :OPropertySetHelper(_rBHelper) diff --git a/comphelper/source/property/propertycontainer2.cxx b/comphelper/source/property/propertycontainer2.cxx index 7a57ed57c03b..aaac2e9707bf 100644 --- a/comphelper/source/property/propertycontainer2.cxx +++ b/comphelper/source/property/propertycontainer2.cxx @@ -18,13 +18,10 @@ */ #include <comphelper/propertycontainer2.hxx> -#include <cppuhelper/typeprovider.hxx> namespace comphelper { using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::beans; OPropertyContainer2::OPropertyContainer2() {} diff --git a/comphelper/source/property/propertysetinfo.cxx b/comphelper/source/property/propertysetinfo.cxx index 2f959d25dfe4..fbd2618b2a1f 100644 --- a/comphelper/source/property/propertysetinfo.cxx +++ b/comphelper/source/property/propertysetinfo.cxx @@ -19,7 +19,6 @@ #include <comphelper/propertysetinfo.hxx> -#include <comphelper/sequence.hxx> using namespace ::comphelper; diff --git a/comphelper/source/streaming/basicio.cxx b/comphelper/source/streaming/basicio.cxx index 534d8b4cd0a1..d8c2d62d9de7 100644 --- a/comphelper/source/streaming/basicio.cxx +++ b/comphelper/source/streaming/basicio.cxx @@ -19,7 +19,6 @@ #include <comphelper/basicio.hxx> #include <comphelper/bytereader.hxx> -#include <comphelper/servicehelper.hxx> #include <com/sun/star/awt/FontDescriptor.hpp> namespace comphelper diff --git a/comphelper/source/streaming/memorystream.cxx b/comphelper/source/streaming/memorystream.cxx index 7031f814d287..af8a6c140238 100644 --- a/comphelper/source/streaming/memorystream.cxx +++ b/comphelper/source/streaming/memorystream.cxx @@ -19,13 +19,10 @@ #include <algorithm> #include <cassert> -#include <memory> #include <com/sun/star/lang/IllegalArgumentException.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> #include <com/sun/star/io/IOException.hpp> -//#include <com/sun/star/uno/XComponentContext.hpp> #include <comphelper/memorystream.hxx> #include <cppuhelper/supportsservice.hxx> #include <o3tl/safeint.hxx>