From 1a6a7947452fa833cf4fdbe1cc6775d2146cc6a1 Mon Sep 17 00:00:00 2001 From: Gabor Kelemen Date: Sun, 7 Jun 2020 11:39:39 +0200 Subject: tdf#42949 Fix IWYU warnings in shell/ Except for MAC/WIN specific parts (i.e. most of it) Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ia14fb27c047e0e69f81386212aa25344f1297e05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95663 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- shell/IwyuFilter_shell.yaml | 31 ++++++++++++++++++++++ shell/inc/xml_parser.hxx | 2 -- shell/inc/zipfile.hxx | 2 -- shell/source/backends/desktopbe/desktopbackend.cxx | 6 ----- shell/source/backends/kf5be/kf5access.cxx | 2 -- shell/source/backends/kf5be/kf5backend.cxx | 6 ----- shell/source/backends/localebe/localebackend.cxx | 3 --- shell/source/backends/localebe/localebackend.hxx | 1 - shell/source/cmdmail/cmdmailentry.cxx | 2 -- shell/source/cmdmail/cmdmailmsg.hxx | 2 -- shell/source/cmdmail/cmdmailsuppl.cxx | 6 ----- .../sessioninstall/SyncDbusSessionHelper.hxx | 1 - shell/source/sessioninstall/services.cxx | 1 - shell/source/tools/lngconvex/cmdline.hxx | 2 -- shell/source/tools/lngconvex/lngconvex.cxx | 2 -- shell/source/unix/exec/shellexec.cxx | 10 +------ .../win32/shlxthandler/propsheets/propsheets.cxx | 2 ++ shell/source/win32/zipfile/zipfile.cxx | 2 ++ 18 files changed, 36 insertions(+), 47 deletions(-) create mode 100644 shell/IwyuFilter_shell.yaml (limited to 'shell') diff --git a/shell/IwyuFilter_shell.yaml b/shell/IwyuFilter_shell.yaml new file mode 100644 index 000000000000..02604d921d5d --- /dev/null +++ b/shell/IwyuFilter_shell.yaml @@ -0,0 +1,31 @@ +--- +assumeFilename: shell/source/unix/exec/shellexec.cxx +blacklist: + shell/source/sessioninstall/SyncDbusSessionHelper.hxx: + # No hpp->hdl replacement + - org/freedesktop/PackageKit/SyncDbusSessionHelper.hpp + shell/source/backends/kf5be/kf5access.cxx: + # Keep abstract QT headers + - QtCore/QDir + - QtCore/QStandardPaths + - QtCore/QString + - QtCore/QUrl + - QtGui/QFont + - QtGui/QFontDatabase + shell/source/backends/kf5be/kf5backend.cxx: + # Keep abstract QT headers + - QtWidgets/QApplication + # Keep abstract boost headers + - boost/noncopyable.hpp + shell/source/backends/localebe/localebackend.cxx: + # Needed on WIN for toU + - o3tl/char16_t2wchar_t.hxx + shell/source/cmdmail/cmdmailsuppl.cxx: + # Actually used + - com/sun/star/uno/XComponentContext.hpp + shell/source/tools/lngconvex/lngconvex.cxx: + # Needed for std::ifstream + - fstream + shell/source/unix/exec/shellexec.cxx: + # Needed on MAC + - osl/file.hxx diff --git a/shell/inc/xml_parser.hxx b/shell/inc/xml_parser.hxx index aea4240b5c3e..37c44781cc5a 100644 --- a/shell/inc/xml_parser.hxx +++ b/shell/inc/xml_parser.hxx @@ -23,8 +23,6 @@ #include #include -#include - class xml_parser_exception final : public std::runtime_error { public: diff --git a/shell/inc/zipfile.hxx b/shell/inc/zipfile.hxx index 1b4a2770628b..1d774f77362a 100644 --- a/shell/inc/zipfile.hxx +++ b/shell/inc/zipfile.hxx @@ -20,8 +20,6 @@ #ifndef INCLUDED_SHELL_INC_INTERNAL_ZIPFILE_HXX #define INCLUDED_SHELL_INC_INTERNAL_ZIPFILE_HXX -#include - #include #include #include diff --git a/shell/source/backends/desktopbe/desktopbackend.cxx b/shell/source/backends/desktopbe/desktopbackend.cxx index 001adefd2e4d..5f024f0679e8 100644 --- a/shell/source/backends/desktopbe/desktopbackend.cxx +++ b/shell/source/backends/desktopbe/desktopbackend.cxx @@ -21,14 +21,12 @@ #include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -45,15 +43,11 @@ #include #include #include -#include -#include -#include #include #include #include #include #include -#include namespace { diff --git a/shell/source/backends/kf5be/kf5access.cxx b/shell/source/backends/kf5be/kf5access.cxx index 00db5c5448b4..d983b6d308ca 100644 --- a/shell/source/backends/kf5be/kf5access.cxx +++ b/shell/source/backends/kf5be/kf5access.cxx @@ -34,10 +34,8 @@ // #include #include -#include #include #include -#include #include namespace kf5access diff --git a/shell/source/backends/kf5be/kf5backend.cxx b/shell/source/backends/kf5be/kf5backend.cxx index f55a5150bd3f..cb3f382b8cdd 100644 --- a/shell/source/backends/kf5be/kf5backend.cxx +++ b/shell/source/backends/kf5be/kf5backend.cxx @@ -23,19 +23,15 @@ #include #include -#include #include #include #include #include #include #include -#include -#include #include #include #include -#include #include #include #include @@ -43,8 +39,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/shell/source/backends/localebe/localebackend.cxx b/shell/source/backends/localebe/localebackend.cxx index 263b039e9219..f78c5253739b 100644 --- a/shell/source/backends/localebe/localebackend.cxx +++ b/shell/source/backends/localebe/localebackend.cxx @@ -26,14 +26,11 @@ #include "localebackend.hxx" #include #include -#include #include #include #include #include -#include - #ifdef _WIN32 #if !defined WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN diff --git a/shell/source/backends/localebe/localebackend.hxx b/shell/source/backends/localebe/localebackend.hxx index 006d669db0ee..53abdcb91cd0 100644 --- a/shell/source/backends/localebe/localebackend.hxx +++ b/shell/source/backends/localebe/localebackend.hxx @@ -26,7 +26,6 @@ #include #include #include -#include namespace uno = css::uno ; diff --git a/shell/source/cmdmail/cmdmailentry.cxx b/shell/source/cmdmail/cmdmailentry.cxx index c82f67493226..750277d1fe6f 100644 --- a/shell/source/cmdmail/cmdmailentry.cxx +++ b/shell/source/cmdmail/cmdmailentry.cxx @@ -18,12 +18,10 @@ */ #include -#include #include #include "cmdmailsuppl.hxx" using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::registry; using namespace ::cppu; diff --git a/shell/source/cmdmail/cmdmailmsg.hxx b/shell/source/cmdmail/cmdmailmsg.hxx index 09e1aeaa92e3..43e40c1abf77 100644 --- a/shell/source/cmdmail/cmdmailmsg.hxx +++ b/shell/source/cmdmail/cmdmailmsg.hxx @@ -21,11 +21,9 @@ #define INCLUDED_SHELL_SOURCE_CMDMAIL_CMDMAILMSG_HXX #include -#include #include #include -#include diff --git a/shell/source/cmdmail/cmdmailsuppl.cxx b/shell/source/cmdmail/cmdmailsuppl.cxx index 415a6c4d0051..2867eae63d7c 100644 --- a/shell/source/cmdmail/cmdmailsuppl.cxx +++ b/shell/source/cmdmail/cmdmailsuppl.cxx @@ -25,22 +25,16 @@ #include #include -#include #include "cmdmailsuppl.hxx" #include "cmdmailmsg.hxx" #include #include #include #include -#include #include #include #include -#include -#include -#include - using com::sun::star::beans::PropertyValue; using com::sun::star::system::XSimpleMailClientSupplier; using com::sun::star::system::XSimpleMailClient; diff --git a/shell/source/sessioninstall/SyncDbusSessionHelper.hxx b/shell/source/sessioninstall/SyncDbusSessionHelper.hxx index 0db9a1d8e93e..8a8dd3bf235f 100644 --- a/shell/source/sessioninstall/SyncDbusSessionHelper.hxx +++ b/shell/source/sessioninstall/SyncDbusSessionHelper.hxx @@ -10,7 +10,6 @@ #ifndef INCLUDED_SHELL_SOURCE_SESSIONINSTALL_SYNCDBUSSESSIONHELPER_HXX #define INCLUDED_SHELL_SOURCE_SESSIONINSTALL_SYNCDBUSSESSIONHELPER_HXX -#include #include #include #include diff --git a/shell/source/sessioninstall/services.cxx b/shell/source/sessioninstall/services.cxx index 4b72bff193f9..69a7b2e4924e 100644 --- a/shell/source/sessioninstall/services.cxx +++ b/shell/source/sessioninstall/services.cxx @@ -9,7 +9,6 @@ #include "SyncDbusSessionHelper.hxx" #include -#include namespace sdecl = ::comphelper::service_decl; diff --git a/shell/source/tools/lngconvex/cmdline.hxx b/shell/source/tools/lngconvex/cmdline.hxx index f36c6be46f58..bbf5afa5b0e5 100644 --- a/shell/source/tools/lngconvex/cmdline.hxx +++ b/shell/source/tools/lngconvex/cmdline.hxx @@ -24,8 +24,6 @@ #include -#include - /** Simple command line abstraction */ diff --git a/shell/source/tools/lngconvex/lngconvex.cxx b/shell/source/tools/lngconvex/lngconvex.cxx index 8711b1ca15e2..7385ad25b531 100644 --- a/shell/source/tools/lngconvex/lngconvex.cxx +++ b/shell/source/tools/lngconvex/lngconvex.cxx @@ -49,9 +49,7 @@ typedef unsigned short WORD; #include #include #include -#include #include -#include #include #ifndef _WIN32 diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx index 58c5ef4661d8..0bcec84297e1 100644 --- a/shell/source/unix/exec/shellexec.cxx +++ b/shell/source/unix/exec/shellexec.cxx @@ -17,31 +17,23 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include - #include -#include #include #include -#include #include -#include #include "shellexec.hxx" #include #include -#include +#include #include #include #include #include -#include - #include #include -#include #if defined MACOSX #include diff --git a/shell/source/win32/shlxthandler/propsheets/propsheets.cxx b/shell/source/win32/shlxthandler/propsheets/propsheets.cxx index 12985d71f4b6..a14d49915a8b 100644 --- a/shell/source/win32/shlxthandler/propsheets/propsheets.cxx +++ b/shell/source/win32/shlxthandler/propsheets/propsheets.cxx @@ -27,6 +27,8 @@ #include +#include + #include #include #include diff --git a/shell/source/win32/zipfile/zipfile.cxx b/shell/source/win32/zipfile/zipfile.cxx index a1b2b40e628c..78c140dbce2a 100644 --- a/shell/source/win32/zipfile/zipfile.cxx +++ b/shell/source/win32/zipfile/zipfile.cxx @@ -31,6 +31,8 @@ #include +#include + namespace { -- cgit