diff options
author | Gabor Kelemen <kelemen.gabor2@nisz.hu> | 2019-04-13 21:42:04 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-04-19 11:31:19 +0200 |
commit | 368f20001c0d152f48575335757e3c3c3b7e5750 (patch) | |
tree | 4b31d53a04f5033704962ca513197b2e9274697a /comphelper/source/misc | |
parent | c618b8eae79b8d87ad5002466ef59c5694d4cea0 (diff) |
tdf#42949 Fix IWYU warnings in comphelper
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Also re-evaluate some blacklisted headers and recheck include/comphelper/
Change-Id: Ib7eea5951e849c07cea2e2782be4e8945f71ad96
Reviewed-on: https://gerrit.libreoffice.org/70899
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'comphelper/source/misc')
24 files changed, 14 insertions, 55 deletions
diff --git a/comphelper/source/misc/accessiblecontexthelper.cxx b/comphelper/source/misc/accessiblecontexthelper.cxx index df837e2e946b..1b6d7f59f547 100644 --- a/comphelper/source/misc/accessiblecontexthelper.cxx +++ b/comphelper/source/misc/accessiblecontexthelper.cxx @@ -20,8 +20,6 @@ #include <comphelper/accessiblecontexthelper.hxx> #include <osl/diagnose.h> #include <cppuhelper/weakref.hxx> -#include <com/sun/star/accessibility/AccessibleEventId.hpp> -#include <com/sun/star/accessibility/AccessibleStateType.hpp> #include <com/sun/star/accessibility/IllegalAccessibleComponentStateException.hpp> #include <comphelper/accessibleeventnotifier.hxx> #include <comphelper/solarmutex.hxx> diff --git a/comphelper/source/misc/accessiblewrapper.cxx b/comphelper/source/misc/accessiblewrapper.cxx index 9736b031f618..da86b96bf5d4 100644 --- a/comphelper/source/misc/accessiblewrapper.cxx +++ b/comphelper/source/misc/accessiblewrapper.cxx @@ -18,12 +18,9 @@ */ #include <comphelper/accessiblewrapper.hxx> -#include <com/sun/star/reflection/XProxyFactory.hpp> #include <com/sun/star/accessibility/AccessibleEventId.hpp> #include <com/sun/star/accessibility/AccessibleStateType.hpp> -#include <algorithm> - using namespace ::comphelper; using namespace ::com::sun::star::accessibility; using namespace ::com::sun::star::uno; diff --git a/comphelper/source/misc/accimplaccess.cxx b/comphelper/source/misc/accimplaccess.cxx index 95a36640d7f8..8d06e1b91c6e 100644 --- a/comphelper/source/misc/accimplaccess.cxx +++ b/comphelper/source/misc/accimplaccess.cxx @@ -18,12 +18,9 @@ */ #include <comphelper/accimplaccess.hxx> -#include <com/sun/star/accessibility/XAccessible.hpp> #include <cppuhelper/typeprovider.hxx> -#include <set> #include <string.h> -#include <memory> namespace comphelper diff --git a/comphelper/source/misc/base64.cxx b/comphelper/source/misc/base64.cxx index 8fd02f120f8f..3748f2f1e56b 100644 --- a/comphelper/source/misc/base64.cxx +++ b/comphelper/source/misc/base64.cxx @@ -21,12 +21,8 @@ #include <com/sun/star/uno/Sequence.hxx> -#include <rtl/math.hxx> -#include <sal/log.hxx> #include <osl/diagnose.h> -#include <algorithm> - using namespace com::sun::star; namespace comphelper { diff --git a/comphelper/source/misc/configuration.cxx b/comphelper/source/misc/configuration.cxx index 03396f0bac89..89ce0e3be024 100644 --- a/comphelper/source/misc/configuration.cxx +++ b/comphelper/source/misc/configuration.cxx @@ -21,11 +21,9 @@ #include <com/sun/star/container/XHierarchicalNameReplace.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/container/XNameContainer.hpp> -#include <com/sun/star/lang/Locale.hpp> #include <com/sun/star/lang/XLocalizable.hpp> #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Reference.hxx> -#include <com/sun/star/uno/XComponentContext.hpp> #include <comphelper/solarmutex.hxx> #include <comphelper/configuration.hxx> #include <comphelper/configurationlistener.hxx> @@ -35,6 +33,8 @@ #include <sal/log.hxx> #include <i18nlangtag/languagetag.hxx> +namespace com::sun::star::uno { class XComponentContext; } + namespace { struct TheConfigurationWrapper: diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx index a0d2907c4323..9134e7d050a2 100644 --- a/comphelper/source/misc/docpasswordhelper.cxx +++ b/comphelper/source/misc/docpasswordhelper.cxx @@ -29,7 +29,6 @@ #include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/task/XInteractionHandler.hpp> -#include <com/sun/star/lang/IllegalArgumentException.hpp> #include <osl/diagnose.h> #include <sal/log.hxx> @@ -38,7 +37,6 @@ #include <string.h> #if HAVE_FEATURE_GPGME -# include <gpgme.h> # include <context.h> # include <data.h> # include <decryptionresult.h> diff --git a/comphelper/source/misc/evtmethodhelper.cxx b/comphelper/source/misc/evtmethodhelper.cxx index d02b423bab57..5f60d92d645c 100644 --- a/comphelper/source/misc/evtmethodhelper.cxx +++ b/comphelper/source/misc/evtmethodhelper.cxx @@ -18,7 +18,7 @@ */ #include <comphelper/evtmethodhelper.hxx> -#include <cppuhelper/typeprovider.hxx> +#include <com/sun/star/uno/Sequence.hxx> using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Type; diff --git a/comphelper/source/misc/getexpandeduri.cxx b/comphelper/source/misc/getexpandeduri.cxx index 796400f1da9d..853e5dbd3c06 100644 --- a/comphelper/source/misc/getexpandeduri.cxx +++ b/comphelper/source/misc/getexpandeduri.cxx @@ -10,13 +10,13 @@ #include <sal/config.h> #include <com/sun/star/uno/Reference.hxx> -#include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/uri/UriReferenceFactory.hpp> #include <com/sun/star/uri/XVndSunStarExpandUrlReference.hpp> #include <com/sun/star/util/theMacroExpander.hpp> #include <comphelper/getexpandeduri.hxx> #include <rtl/ustring.hxx> -#include <sal/types.h> + +namespace com::sun::star::uno { class XComponentContext; } OUString comphelper::getExpandedUri( css::uno::Reference<css::uno::XComponentContext> const & context, diff --git a/comphelper/source/misc/graphicmimetype.cxx b/comphelper/source/misc/graphicmimetype.cxx index 8dd188767936..78e216a941ae 100644 --- a/comphelper/source/misc/graphicmimetype.cxx +++ b/comphelper/source/misc/graphicmimetype.cxx @@ -22,7 +22,6 @@ #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/graphic/GraphicProvider.hpp> -#include <com/sun/star/graphic/XGraphic.hpp> #include <com/sun/star/graphic/XGraphicProvider.hpp> #include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/uno/Reference.hxx> diff --git a/comphelper/source/misc/hash.cxx b/comphelper/source/misc/hash.cxx index b7eab08ce033..3db0b3e56616 100644 --- a/comphelper/source/misc/hash.cxx +++ b/comphelper/source/misc/hash.cxx @@ -15,7 +15,6 @@ #if USE_TLS_NSS #include <nss.h> -#include <pk11pub.h> #include <sechash.h> #elif USE_TLS_OPENSSL #include <openssl/evp.h> diff --git a/comphelper/source/misc/instancelocker.cxx b/comphelper/source/misc/instancelocker.cxx index cf7a2cfaf218..21b165fe1d8a 100644 --- a/comphelper/source/misc/instancelocker.cxx +++ b/comphelper/source/misc/instancelocker.cxx @@ -19,8 +19,8 @@ #include <cppuhelper/supportsservice.hxx> +#include <comphelper/interfacecontainer2.hxx> -#include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/util/CloseVetoException.hpp> #include <com/sun/star/util/XCloseBroadcaster.hpp> #include <com/sun/star/util/XCloseable.hpp> @@ -29,10 +29,13 @@ #include <com/sun/star/frame/XDesktop.hpp> #include <com/sun/star/frame/TerminationVetoException.hpp> #include <com/sun/star/frame/DoubleInitializationException.hpp> -#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/embed/Actions.hpp> +#include <com/sun/star/embed/XActionsApproval.hpp> #include "instancelocker.hxx" +namespace com::sun::star::uno { class XComponentContext; } + using namespace ::com::sun::star; diff --git a/comphelper/source/misc/instancelocker.hxx b/comphelper/source/misc/instancelocker.hxx index fb6581317006..ff5cee4f4775 100644 --- a/comphelper/source/misc/instancelocker.hxx +++ b/comphelper/source/misc/instancelocker.hxx @@ -20,21 +20,20 @@ #ifndef INCLUDED_COMPHELPER_SOURCE_MISC_INSTANCELOCKER_HXX #define INCLUDED_COMPHELPER_SOURCE_MISC_INSTANCELOCKER_HXX -#include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/util/XCloseListener.hpp> #include <com/sun/star/frame/XTerminateListener.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/embed/XActionsApproval.hpp> -#include <com/sun/star/embed/Actions.hpp> #include <cppuhelper/weakref.hxx> #include <osl/mutex.hxx> #include <cppuhelper/implbase.hxx> -#include <comphelper/interfacecontainer2.hxx> #include <rtl/ref.hxx> #include <memory> +namespace com::sun::star::embed { class XActionsApproval; } +namespace comphelper { class OInterfaceContainerHelper2; } + class OLockListener; diff --git a/comphelper/source/misc/logging.cxx b/comphelper/source/misc/logging.cxx index 5329e8b7200a..dfd52f8d5bcb 100644 --- a/comphelper/source/misc/logging.cxx +++ b/comphelper/source/misc/logging.cxx @@ -21,10 +21,8 @@ #include <comphelper/logging.hxx> #include <com/sun/star/logging/LoggerPool.hpp> -#include <com/sun/star/logging/LogLevel.hpp> #include <osl/diagnose.h> -#include <rtl/ustrbuf.hxx> namespace comphelper diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx index 2b47c6aa36d0..0ea263f20885 100644 --- a/comphelper/source/misc/lok.cxx +++ b/comphelper/source/misc/lok.cxx @@ -12,7 +12,6 @@ #include <sal/log.hxx> #include <iostream> -#include <sstream> namespace comphelper { diff --git a/comphelper/source/misc/namedvaluecollection.cxx b/comphelper/source/misc/namedvaluecollection.cxx index 42ef768d9297..777e75e57a86 100644 --- a/comphelper/source/misc/namedvaluecollection.cxx +++ b/comphelper/source/misc/namedvaluecollection.cxx @@ -24,7 +24,6 @@ #include <com/sun/star/beans/PropertyState.hpp> #include <com/sun/star/beans/PropertyValue.hpp> -#include <rtl/ustrbuf.hxx> #include <rtl/instance.hxx> #include <sal/log.hxx> diff --git a/comphelper/source/misc/numbers.cxx b/comphelper/source/misc/numbers.cxx index 70eb3f4e8df0..f3b609392ceb 100644 --- a/comphelper/source/misc/numbers.cxx +++ b/comphelper/source/misc/numbers.cxx @@ -22,9 +22,7 @@ #include <sal/log.hxx> #include <com/sun/star/util/NumberFormat.hpp> #include <com/sun/star/util/XNumberFormatter.hpp> -#include <com/sun/star/util/XNumberFormatTypes.hpp> #include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/lang/Locale.hpp> namespace comphelper diff --git a/comphelper/source/misc/officerestartmanager.hxx b/comphelper/source/misc/officerestartmanager.hxx index cfada99c858a..865fc29b23b3 100644 --- a/comphelper/source/misc/officerestartmanager.hxx +++ b/comphelper/source/misc/officerestartmanager.hxx @@ -21,7 +21,6 @@ #define INCLUDED_COMPHELPER_SOURCE_MISC_OFFICERESTARTMANAGER_HXX #include <com/sun/star/task/XRestartManager.hpp> -#include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/awt/XCallback.hpp> diff --git a/comphelper/source/misc/servicedecl.cxx b/comphelper/source/misc/servicedecl.cxx index 063587401434..f37f783b902f 100644 --- a/comphelper/source/misc/servicedecl.cxx +++ b/comphelper/source/misc/servicedecl.cxx @@ -20,7 +20,6 @@ #include <comphelper/servicedecl.hxx> #include <rtl/string.hxx> -#include <rtl/ustrbuf.hxx> #include <cppuhelper/implbase.hxx> #include <comphelper/sequence.hxx> #include <com/sun/star/lang/XSingleComponentFactory.hpp> diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx index 33ae9875da8b..c585e2ba0577 100644 --- a/comphelper/source/misc/storagehelper.cxx +++ b/comphelper/source/misc/storagehelper.cxx @@ -20,7 +20,6 @@ #include <config_gpgme.h> #include <com/sun/star/embed/ElementModes.hpp> -#include <com/sun/star/embed/XEncryptionProtectedSource2.hpp> #include <com/sun/star/embed/XEncryptionProtectedStorage.hpp> #include <com/sun/star/embed/XStorage.hpp> #include <com/sun/star/embed/XTransactedObject.hpp> @@ -36,7 +35,6 @@ #include <com/sun/star/beans/IllegalTypeException.hpp> #include <com/sun/star/xml/crypto/NSSInitializer.hpp> #include <com/sun/star/xml/crypto/XDigestContext.hpp> -#include <com/sun/star/xml/crypto/XDigestContextSupplier.hpp> #include <com/sun/star/xml/crypto/DigestID.hpp> #include <com/sun/star/security/DocumentDigitalSignatures.hpp> #include <com/sun/star/security/XCertificate.hpp> @@ -47,7 +45,6 @@ #include <rtl/random.h> #include <osl/diagnose.h> #include <sal/log.hxx> -#include <sax/tools/converter.hxx> #include <ucbhelper/content.hxx> @@ -60,7 +57,6 @@ #include <cppuhelper/exc_hlp.hxx> #if HAVE_FEATURE_GPGME -# include <gpgme.h> # include <context.h> # include <encryptionresult.h> # include <key.h> diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx index 0822d39d5d78..98fc3d8585a7 100644 --- a/comphelper/source/misc/string.cxx +++ b/comphelper/source/misc/string.cxx @@ -20,7 +20,6 @@ #include <sal/config.h> #include <cstddef> -#include <string.h> #include <string_view> #include <vector> #include <algorithm> diff --git a/comphelper/source/misc/synchronousdispatch.cxx b/comphelper/source/misc/synchronousdispatch.cxx index bec5b021310d..a09f05db8331 100644 --- a/comphelper/source/misc/synchronousdispatch.cxx +++ b/comphelper/source/misc/synchronousdispatch.cxx @@ -21,7 +21,6 @@ #include <com/sun/star/frame/XDispatchProvider.hpp> #include <com/sun/star/frame/XSynchronousDispatch.hpp> #include <com/sun/star/lang/XComponent.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/util/URLTransformer.hpp> #include <comphelper/synchronousdispatch.hxx> diff --git a/comphelper/source/misc/threadpool.cxx b/comphelper/source/misc/threadpool.cxx index f075c0600968..68ff089d270d 100644 --- a/comphelper/source/misc/threadpool.cxx +++ b/comphelper/source/misc/threadpool.cxx @@ -13,7 +13,6 @@ #include <sal/config.h> #include <sal/log.hxx> #include <rtl/instance.hxx> -#include <rtl/string.hxx> #include <salhelper/thread.hxx> #include <algorithm> #include <memory> diff --git a/comphelper/source/misc/types.cxx b/comphelper/source/misc/types.cxx index f5a57410495f..eb5eec0b5343 100644 --- a/comphelper/source/misc/types.cxx +++ b/comphelper/source/misc/types.cxx @@ -19,9 +19,6 @@ #include <comphelper/types.hxx> #include <comphelper/extract.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/awt/FontUnderline.hpp> #include <com/sun/star/awt/FontStrikeout.hpp> #include <com/sun/star/awt/FontDescriptor.hpp> @@ -29,8 +26,6 @@ #include <osl/diagnose.h> #include <typelib/typedescription.hxx> -#include <memory.h> - namespace comphelper { @@ -38,7 +33,6 @@ namespace comphelper using namespace ::com::sun::star::uno; using namespace ::com::sun::star::awt; -using namespace ::com::sun::star::util; using namespace ::com::sun::star::lang; sal_Int64 getINT64(const Any& _rAny) diff --git a/comphelper/source/misc/xmlsechelper.cxx b/comphelper/source/misc/xmlsechelper.cxx index 068134bf47fe..9b3b19249803 100644 --- a/comphelper/source/misc/xmlsechelper.cxx +++ b/comphelper/source/misc/xmlsechelper.cxx @@ -20,13 +20,7 @@ #include <comphelper/xmlsechelper.hxx> -#include <o3tl/deleter.hxx> -#include <vcl/svapp.hxx> -#include <vcl/fixed.hxx> -#include <svl/solar.hrc> -#include <unotools/syslocale.hxx> -#include <rtl/ustring.h> -#include <rtl/ustrbuf.h> +#include <rtl/ustrbuf.hxx> #include <osl/diagnose.h> #include <vector> |