[Libreoffice-commits] core.git: shell/inc shell/IwyuFilter_shell.yaml shell/source

Gabor Kelemen (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 10 14:34:41 UTC 2020


 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 --
 shell/source/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 ----
 shell/source/win32/shlxthandler/propsheets/propsheets.cxx |    2 
 shell/source/win32/zipfile/zipfile.cxx                    |    2 
 18 files changed, 36 insertions(+), 47 deletions(-)

New commits:
commit 1a6a7947452fa833cf4fdbe1cc6775d2146cc6a1
Author:     Gabor Kelemen <kelemen.gabor2 at nisz.hu>
AuthorDate: Sun Jun 7 11:39:39 2020 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Jun 10 16:34:06 2020 +0200

    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 <vmiklos at collabora.com>

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 <expat.h>
 #include <stdexcept>
 
-#include <sal/types.h>
-
 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 <zlib.h>
-
 #include <string>
 #include <vector>
 #include <memory>
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 <sal/log.hxx>
 
 #include <com/sun/star/beans/Optional.hpp>
-#include <com/sun/star/beans/PropertyVetoException.hpp>
 #include <com/sun/star/beans/UnknownPropertyException.hpp>
 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/beans/XPropertySetInfo.hpp>
 #include <com/sun/star/beans/XVetoableChangeListener.hpp>
 #include <com/sun/star/lang/IllegalArgumentException.hpp>
-#include <com/sun/star/lang/WrappedTargetException.hpp>
 #include <com/sun/star/lang/XMultiComponentFactory.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/uno/Any.hxx>
@@ -45,15 +43,11 @@
 #include <osl/file.hxx>
 #include <osl/security.hxx>
 #include <rtl/byteseq.hxx>
-#include <rtl/string.h>
-#include <rtl/textenc.h>
-#include <rtl/ustring.h>
 #include <rtl/ustrbuf.hxx>
 #include <rtl/ustring.hxx>
 #include <sal/types.h>
 #include <tools/diagnose_ex.h>
 #include <uno/current_context.hxx>
-#include <vcl/svapp.hxx>
 
 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 <kglobalsettings.h>
 
 #include <com/sun/star/uno/Any.hxx>
-#include <cppu/unotype.hxx>
 #include <osl/diagnose.h>
 #include <osl/file.h>
-#include <rtl/string.h>
 #include <rtl/ustring.hxx>
 
 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 <boost/noncopyable.hpp>
 #include <com/sun/star/beans/Optional.hpp>
-#include <com/sun/star/beans/PropertyVetoException.hpp>
 #include <com/sun/star/beans/UnknownPropertyException.hpp>
 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/beans/XPropertySetInfo.hpp>
 #include <com/sun/star/beans/XVetoableChangeListener.hpp>
 #include <com/sun/star/lang/IllegalArgumentException.hpp>
-#include <com/sun/star/lang/WrappedTargetException.hpp>
-#include <com/sun/star/lang/XMultiComponentFactory.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/uno/Any.hxx>
 #include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/uno/RuntimeException.hpp>
 #include <com/sun/star/uno/Sequence.hxx>
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include <com/sun/star/uno/XCurrentContext.hpp>
@@ -43,8 +39,6 @@
 #include <cppuhelper/implbase.hxx>
 #include <cppuhelper/implementationentry.hxx>
 #include <cppuhelper/weak.hxx>
-#include <rtl/string.h>
-#include <rtl/ustring.h>
 #include <rtl/ustring.hxx>
 #include <sal/types.h>
 #include <uno/current_context.hxx>
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 <com/sun/star/beans/Optional.hpp>
 #include <cppuhelper/supportsservice.hxx>
-#include <osl/time.h>
 #include <rtl/character.hxx>
 #include <o3tl/char16_t2wchar_t.hxx>
 #include <i18nlangtag/languagetag.hxx>
 #include <i18nlangtag/mslangid.hxx>
 
-#include <stdio.h>
-
 #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 <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <cppuhelper/implbase.hxx>
-#include <rtl/string.hxx>
 
 
 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 <cppuhelper/factory.hxx>
-#include <com/sun/star/container/XSet.hpp>
 #include <com/sun/star/lang/XSingleComponentFactory.hpp>
 #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 <cppuhelper/implbase.hxx>
-#include <com/sun/star/lang/IllegalArgumentException.hpp>
 #include <com/sun/star/container/XNameAccess.hpp>
 
 #include <com/sun/star/system/XSimpleMailMessage2.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
 
 
 
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 <osl/file.hxx>
 #include <rtl/strbuf.hxx>
-#include <sal/log.hxx>
 #include "cmdmailsuppl.hxx"
 #include "cmdmailmsg.hxx"
 #include <com/sun/star/system/SimpleMailClientFlags.hpp>
 #include <com/sun/star/container/XNameAccess.hpp>
 #include <com/sun/star/configuration/theDefaultProvider.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include <cppuhelper/supportsservice.hxx>
 #include <tools/diagnose_ex.h>
 
-#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-
 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 <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include <org/freedesktop/PackageKit/SyncDbusSessionHelper.hpp>
 #include <cppuhelper/implbase.hxx>
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 <comphelper/servicedecl.hxx>
-#include <uno/environment.h>
 
 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 <sal/config.h>
 
-#include <sal/types.h>
-
 
 /** 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 <iostream>
 #include <fstream>
 #include <map>
-#include <sstream>
 #include <iterator>
-#include <algorithm>
 #include <string>
 
 #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 <config_folders.h>
-
 #include <osl/thread.h>
-#include <osl/process.h>
 #include <osl/file.hxx>
 #include <rtl/strbuf.hxx>
-#include <rtl/ustrbuf.hxx>
 #include <sal/log.hxx>
 
-#include <rtl/uri.hxx>
 #include "shellexec.hxx"
 #include <com/sun/star/system/SystemShellExecuteException.hpp>
 #include <com/sun/star/system/SystemShellExecuteFlags.hpp>
 
-#include <com/sun/star/util/theMacroExpander.hpp>
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
 #include <com/sun/star/uri/ExternalUriReferenceTranslator.hpp>
 #include <com/sun/star/uri/UriReferenceFactory.hpp>
 #include <cppuhelper/supportsservice.hxx>
 #include <comphelper/lok.hxx>
 
-#include <uno/current_context.hxx>
-
 #include <string.h>
 #include <errno.h>
-#include <unistd.h>
 
 #if defined MACOSX
 #include <sys/stat.h>
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 <shellapi.h>
 
+#include <sal/macros.h>
+
 #include <memory>
 #include <string>
 #include <vector>
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 <o3tl/safeint.hxx>
 
+#include <zlib.h>
+
 namespace
 {
 


More information about the Libreoffice-commits mailing list