diff options
author | Gabor Kelemen <kelemen.gabor2@nisz.hu> | 2019-03-09 17:28:06 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-04-26 14:54:54 +0200 |
commit | ae381d9c95c1097922051a6abb0b2e573e3522b3 (patch) | |
tree | 5937993be10c31b8c8751dc9da1525ae26a55230 | |
parent | e80de5c8fb38f9af58aa7147169a9cd6ec443151 (diff) |
tdf#42949 Fix IWYU warnings in jvmfwk/ & jvmaccess/
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I6c1041f261ba5a6f81efd3dcbc12baf2746e1839
Reviewed-on: https://gerrit.libreoffice.org/71217
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
27 files changed, 66 insertions, 58 deletions
diff --git a/jvmaccess/IwyuFilter_jvmaccess.yaml b/jvmaccess/IwyuFilter_jvmaccess.yaml new file mode 100644 index 000000000000..43e850e12f8f --- /dev/null +++ b/jvmaccess/IwyuFilter_jvmaccess.yaml @@ -0,0 +1,6 @@ +--- +assumeFilename: jvmaccess/source/classpath.cxx +blacklist: + jvmaccess/source/classpath.cxx: + # Needed to inherit linker visibility from function declaration + - jvmaccess/classpath.hxx diff --git a/jvmaccess/source/classpath.cxx b/jvmaccess/source/classpath.cxx index c1a0d165f397..b4d0ef3d6bfa 100644 --- a/jvmaccess/source/classpath.cxx +++ b/jvmaccess/source/classpath.cxx @@ -27,8 +27,6 @@ #include <com/sun/star/lang/IllegalArgumentException.hpp> #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> #include <com/sun/star/uno/Reference.hxx> -#include <com/sun/star/uno/RuntimeException.hpp> -#include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/uno/XInterface.hpp> #include <com/sun/star/uri/UriReferenceFactory.hpp> #include <com/sun/star/uri/XVndSunStarExpandUrlReference.hpp> @@ -39,6 +37,8 @@ #include <jni.h> +namespace com::sun::star::uno { class XComponentContext; } + jobjectArray jvmaccess::ClassPath::translateToUrls( css::uno::Reference< css::uno::XComponentContext > const & context, JNIEnv * environment, OUString const & classPath) diff --git a/jvmfwk/IwyuFilter_jvmfwk.yaml b/jvmfwk/IwyuFilter_jvmfwk.yaml new file mode 100644 index 000000000000..13097cc8e6dc --- /dev/null +++ b/jvmfwk/IwyuFilter_jvmfwk.yaml @@ -0,0 +1,33 @@ +--- +assumeFilename: jvmfwk/source/fwkbase.cxx +blacklist: + jvmfwk/inc/fwkutil.hxx: + # Needed on MACOSX + - config_folders.h + # Don't replace with URE impl. detail + - rtl/byteseq.hxx + jvmfwk/inc/vendorbase.hxx: + # OSL_BIGENDIAN is being checked + - osl/endian.h + jvmfwk/source/framework.cxx: + # Don't replace with URE impl. detail + - osl/thread.hxx + jvmfwk/source/fwkbase.cxx: + # Don't replace with URE impl. detail + - osl/thread.hxx + jvmfwk/source/fwkutil.cxx: + # Needed on WIN32 + - sal/log.hxx + jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx: + # Don't replace with URE impl. detail + - rtl/byteseq.hxx + jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx: + # Needed on WIN32 + - o3tl/char16_t2wchar_t.hxx + # Don't replace with URE impl. detail + - osl/thread.hxx + # Don't replace with bits/types, needed for sig_atomic_t + - signal.h + jvmfwk/plugins/sunmajor/pluginlib/util.cxx: + # Needed on MACOSX + - config_folders.h diff --git a/jvmfwk/inc/elements.hxx b/jvmfwk/inc/elements.hxx index 88a785a381fb..2bdaf4a7033a 100644 --- a/jvmfwk/inc/elements.hxx +++ b/jvmfwk/inc/elements.hxx @@ -23,13 +23,14 @@ #include <memory> #include <vector> -#include <jvmfwk/framework.hxx> #include "fwkutil.hxx" #include <rtl/ustring.hxx> #include <rtl/byteseq.hxx> #include <libxml/parser.h> #include <boost/optional.hpp> +struct JavaInfo; + #define NS_JAVA_FRAMEWORK "http://openoffice.org/2004/java/framework/1.0" #define NS_SCHEMA_INSTANCE "http://www.w3.org/2001/XMLSchema-instance" diff --git a/jvmfwk/inc/fwkbase.hxx b/jvmfwk/inc/fwkbase.hxx index 8d9ae93a995e..790b9a40d8f7 100644 --- a/jvmfwk/inc/fwkbase.hxx +++ b/jvmfwk/inc/fwkbase.hxx @@ -24,12 +24,13 @@ #include <boost/optional.hpp> #include <rtl/ustring.hxx> -#include "elements.hxx" #include "libxmlutil.hxx" namespace jfw { +struct VersionInfo; + class VendorSettings { OUString m_xmlDocVendorSettingsFileUrl; diff --git a/jvmfwk/inc/fwkutil.hxx b/jvmfwk/inc/fwkutil.hxx index 890ccb15bbcc..f2f6fcbdfb30 100644 --- a/jvmfwk/inc/fwkutil.hxx +++ b/jvmfwk/inc/fwkutil.hxx @@ -19,17 +19,16 @@ #ifndef INCLUDED_JVMFWK_SOURCE_FWKUTIL_HXX #define INCLUDED_JVMFWK_SOURCE_FWKUTIL_HXX -#include <config_features.h> #include <config_folders.h> #include <sal/config.h> #include <sal/log.hxx> -#include <osl/mutex.hxx> #include <rtl/bootstrap.hxx> #include <rtl/instance.hxx> #include <rtl/ustrbuf.hxx> #include <rtl/byteseq.hxx> -#include <osl/thread.hxx> + +namespace osl { class Mutex; } namespace jfw { diff --git a/jvmfwk/inc/vendorbase.hxx b/jvmfwk/inc/vendorbase.hxx index 02684a62b675..c510a0cb866e 100644 --- a/jvmfwk/inc/vendorbase.hxx +++ b/jvmfwk/inc/vendorbase.hxx @@ -20,8 +20,6 @@ #ifndef INCLUDED_JVMFWK_PLUGINS_SUNMAJOR_PLUGINLIB_VENDORBASE_HXX #define INCLUDED_JVMFWK_PLUGINS_SUNMAJOR_PLUGINLIB_VENDORBASE_HXX -#include <config_java.h> - #include <rtl/ustring.hxx> #include <rtl/ref.hxx> #include <osl/endian.h> diff --git a/jvmfwk/inc/vendorplugin.hxx b/jvmfwk/inc/vendorplugin.hxx index 0aa6d84276e3..4c24903baa19 100644 --- a/jvmfwk/inc/vendorplugin.hxx +++ b/jvmfwk/inc/vendorplugin.hxx @@ -21,14 +21,16 @@ #ifndef INCLUDED_JVMFWK_INC_VENDORPLUGIN_HXX #define INCLUDED_JVMFWK_INC_VENDORPLUGIN_HXX -#include <jvmfwk/framework.hxx> -#include <rtl/ref.hxx> -#include <rtl/ustring.h> +#include <rtl/ustring.hxx> #include <jni.h> #include <memory> #include <vector> -#include "vendorbase.hxx" + +namespace jfw_plugin { class VendorBase; } +namespace rtl { template <class reference_type> class Reference; } + +struct JavaInfo; namespace jfw { class VendorSettings; } diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx index 2a1a6b13baf2..f7c295ec1728 100644 --- a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx +++ b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx @@ -22,7 +22,6 @@ #include <memory> #include <stdio.h> -#include <stdlib.h> #include <string.h> #include <iostream> #include <sal/main.h> diff --git a/jvmfwk/plugins/sunmajor/pluginlib/diagnostics.h b/jvmfwk/plugins/sunmajor/pluginlib/diagnostics.h index 20e3f4bfea2e..599c40438535 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/diagnostics.h +++ b/jvmfwk/plugins/sunmajor/pluginlib/diagnostics.h @@ -22,7 +22,6 @@ #include <sal/config.h> -#include <rtl/ustring.hxx> #include <sal/log.hxx> #define JFW_ENSURE(c, m) SAL_WARN_IF(!(c), "jfw", m) diff --git a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx index ce4bc77bc69c..199b3fcb67d0 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx @@ -19,7 +19,6 @@ #include <osl/file.hxx> -#include <osl/thread.h> #include "gnujre.hxx" #include "util.hxx" diff --git a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.hxx b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.hxx index c9835ce8a743..4826ea720d7f 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.hxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.hxx @@ -21,7 +21,6 @@ #define INCLUDED_JVMFWK_PLUGINS_SUNMAJOR_PLUGINLIB_GNUJRE_HXX #include <vendorbase.hxx> -#include "vendorlist.hxx" namespace jfw_plugin { diff --git a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx index 14faf56762d7..8a10d39a89e3 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx @@ -18,7 +18,6 @@ */ -#include <osl/thread.h> #include "otherjre.hxx" using namespace std; diff --git a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.hxx b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.hxx index 986040962045..57b3a5e39639 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.hxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.hxx @@ -21,7 +21,6 @@ #define INCLUDED_JVMFWK_PLUGINS_SUNMAJOR_PLUGINLIB_OTHERJRE_HXX #include <vendorbase.hxx> -#include "vendorlist.hxx" namespace jfw_plugin { diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx index 395ef332e0e8..5981e325f080 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx @@ -49,19 +49,19 @@ #include <osl/file.hxx> #include <rtl/instance.hxx> #include <sal/log.hxx> -#include <osl/getglobalmutex.hxx> #include <o3tl/char16_t2wchar_t.hxx> #include <setjmp.h> #include <signal.h> -#include <stack> #include <jni.h> #include <rtl/byteseq.hxx> #include <fwkbase.hxx> +#include <elements.hxx> +#include <vendorbase.hxx> #include <vendorplugin.hxx> +#include <jvmfwk/framework.hxx> #include "util.hxx" #include "sunversion.hxx" -#include "vendorlist.hxx" #include "diagnostics.h" #ifdef MACOSX diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx index 1e833a9faeef..89731ad15ddc 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx @@ -18,7 +18,6 @@ */ -#include <osl/thread.h> #include "sunjre.hxx" #include "sunversion.hxx" #include "diagnostics.h" diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.hxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.hxx index a334fc8d3778..781e2dd782b4 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.hxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.hxx @@ -21,7 +21,6 @@ #define INCLUDED_JVMFWK_PLUGINS_SUNMAJOR_PLUGINLIB_SUNJRE_HXX #include <vendorbase.hxx> -#include "vendorlist.hxx" namespace jfw_plugin { diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx index 9a5c7c28a25c..09c75f9a3064 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx @@ -19,14 +19,9 @@ #include "sunversion.hxx" -#include <osl/diagnose.h> #include <osl/thread.h> -#include <osl/process.h> -#include <osl/security.hxx> #include <rtl/character.hxx> #include <string.h> -#include "diagnostics.h" -using namespace osl; namespace jfw_plugin { //stoc_javadetect diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx index a21aa4ff933f..5824448b51d7 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx @@ -17,18 +17,16 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <config_features.h> #include <config_folders.h> #include "util.hxx" #include <osl/process.h> -#include <osl/security.hxx> #include <osl/file.hxx> #include <osl/module.hxx> #include <osl/diagnose.h> #include <osl/getglobalmutex.hxx> -#include <rtl/byteseq.hxx> +#include <rtl/bootstrap.hxx> #include <rtl/ustrbuf.hxx> #include <rtl/instance.hxx> #include <sal/log.hxx> diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.hxx b/jvmfwk/plugins/sunmajor/pluginlib/util.hxx index 56e487b45b76..7f10e2748f7a 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.hxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.hxx @@ -20,14 +20,14 @@ #define INCLUDED_JVMFWK_PLUGINS_SUNMAJOR_PLUGINLIB_UTIL_HXX #include <rtl/ustring.hxx> -#include <rtl/bootstrap.hxx> #include <vector> #include <vendorbase.hxx> +namespace rtl { class Bootstrap; } + namespace jfw_plugin { -class VendorBase; std::vector<OUString> getVectorFromCharArray(char const * const * ar, int size); /* The function uses the relative paths, such as "bin/java.exe" and the provided diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx index 254f17e16de9..efd6b92d550f 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx @@ -22,7 +22,6 @@ #include <vendorbase.hxx> #include "util.hxx" -#include "sunjre.hxx" using namespace std; using namespace osl; diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx index a0e682a9e09b..e10958d24cb7 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx @@ -20,7 +20,8 @@ #define INCLUDED_JVMFWK_PLUGINS_SUNMAJOR_PLUGINLIB_VENDORLIST_HXX #include <rtl/ref.hxx> -#include <vendorbase.hxx> + +namespace jfw_plugin { class VendorBase; } namespace jfw_plugin { diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx index 57134e19b35d..27de3532d70c 100644 --- a/jvmfwk/source/elements.cxx +++ b/jvmfwk/source/elements.cxx @@ -30,12 +30,10 @@ #include <fwkbase.hxx> #include "framework.hxx" #include <libxmlutil.hxx> -#include <osl/thread.hxx> #include <algorithm> #include <libxml/parser.h> #include <libxml/xpath.h> #include <libxml/xpathInternals.h> -#include <rtl/bootstrap.hxx> #include <boost/optional.hpp> #include <string.h> diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx index 8d870fd335ae..32120308f932 100644 --- a/jvmfwk/source/framework.cxx +++ b/jvmfwk/source/framework.cxx @@ -22,13 +22,13 @@ #include <cassert> #include <memory> -#include <utility> +#include <rtl/ref.hxx> #include <rtl/ustring.hxx> -#include <rtl/bootstrap.hxx> +#include <osl/diagnose.h> #include <osl/thread.hxx> -#include <osl/file.hxx> #include <jvmfwk/framework.hxx> +#include <vendorbase.hxx> #include <vendorplugin.hxx> #include <vector> #include <algorithm> diff --git a/jvmfwk/source/framework.hxx b/jvmfwk/source/framework.hxx index f45965095068..39bda148b24a 100644 --- a/jvmfwk/source/framework.hxx +++ b/jvmfwk/source/framework.hxx @@ -19,10 +19,7 @@ #ifndef INCLUDED_JVMFWK_SOURCE_FRAMEWORK_HXX #define INCLUDED_JVMFWK_SOURCE_FRAMEWORK_HXX -#include <rtl/ustring.hxx> -#include <rtl/byteseq.hxx> #include <jvmfwk/framework.hxx> -#include <vendorplugin.hxx> namespace jfw { diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx index 0aed9857c966..1d0657a5a051 100644 --- a/jvmfwk/source/fwkbase.cxx +++ b/jvmfwk/source/fwkbase.cxx @@ -19,13 +19,10 @@ #include <rtl/ustring.hxx> #include <rtl/ustrbuf.hxx> -#include <rtl/uri.hxx> #include <sal/log.hxx> -#include <osl/thread.hxx> -#include <osl/process.h> #include <libxml/xpathInternals.h> #include <osl/file.hxx> -#include <osl/module.hxx> +#include <osl/thread.hxx> #include "framework.hxx" #include <fwkutil.hxx> #include <elements.hxx> diff --git a/jvmfwk/source/fwkutil.cxx b/jvmfwk/source/fwkutil.cxx index 14cb3024e01b..e14057999208 100644 --- a/jvmfwk/source/fwkutil.cxx +++ b/jvmfwk/source/fwkutil.cxx @@ -23,23 +23,14 @@ # define WIN32_LEAN_AND_MEAN #endif #include <windows.h> +#include <algorithm> #endif -#include <string> -#include <string.h> #include <osl/module.hxx> -#include <osl/thread.hxx> #include <rtl/ustring.hxx> -#include <rtl/ustrbuf.hxx> #include <rtl/bootstrap.hxx> #include <osl/file.hxx> -#include <osl/process.h> -#include <rtl/instance.hxx> -#include <rtl/uri.hxx> #include <sal/log.hxx> -#include <osl/getglobalmutex.hxx> -#include <com/sun/star/lang/IllegalArgumentException.hpp> -#include <cppuhelper/bootstrap.hxx> #include "framework.hxx" #include <fwkutil.hxx> |