From 2660f132cc98c0fe14d5055a91a7cf126d5139f6 Mon Sep 17 00:00:00 2001 From: Gabor Kelemen Date: Fri, 25 Jan 2019 00:00:56 +0100 Subject: tdf#42949 Fix IWYU warnings in cppu/ Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ia1b2f0a9c99acc7ac538f3b41c1b6757d414db35 Reviewed-on: https://gerrit.libreoffice.org/66970 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- cppu/IwyuFilter_cppu.yaml | 26 ++++++++++++++++++++++ cppu/qa/cppumaker/test_cppumaker.cxx | 1 - cppu/qa/test_any.cxx | 6 ----- cppu/qa/test_reference.cxx | 4 ---- cppu/qa/test_unotype.cxx | 5 ++--- cppu/source/LogBridge/LogBridge.cxx | 4 ---- cppu/source/cppu/cppu_opt.cxx | 1 - .../helper/purpenv/helper_purpenv_Mapping.cxx | 1 - .../source/helper/purpenv/helper_purpenv_Proxy.cxx | 2 -- cppu/source/threadpool/current.cxx | 1 - cppu/source/threadpool/thread.hxx | 1 - cppu/source/threadpool/threadident.cxx | 2 -- cppu/source/threadpool/threadpool.cxx | 1 - cppu/source/typelib/static_types.cxx | 2 -- cppu/source/typelib/typelib.cxx | 3 --- cppu/source/uno/assign.hxx | 2 -- cppu/source/uno/constr.hxx | 2 +- cppu/source/uno/data.cxx | 4 ---- cppu/source/uno/destr.hxx | 3 ++- cppu/source/uno/eq.hxx | 7 ++++-- cppu/source/uno/lbenv.cxx | 6 +---- cppu/source/uno/lbmap.cxx | 5 +---- cppu/source/uno/loadmodule.cxx | 2 +- cppu/source/uno/loadmodule.hxx | 4 ++-- cppu/source/uno/prim.hxx | 4 +--- cppu/source/uno/sequence.cxx | 2 -- 26 files changed, 42 insertions(+), 59 deletions(-) create mode 100644 cppu/IwyuFilter_cppu.yaml (limited to 'cppu') diff --git a/cppu/IwyuFilter_cppu.yaml b/cppu/IwyuFilter_cppu.yaml new file mode 100644 index 000000000000..453e57e876af --- /dev/null +++ b/cppu/IwyuFilter_cppu.yaml @@ -0,0 +1,26 @@ +--- +assumeFilename: cppu/source/uno/data.cxx +blacklist: + cppu/qa/test_any.cxx: + # No hpp -> hdl replacement needed + - Enum1.hpp + - Enum2.hpp + - Interface1.hpp + - Interface2.hpp + - Interface2a.hpp + - Interface2b.hpp + - Interface3.hpp + cppu/source/cppu/cppu_opt.cxx: + # Unit test fails without uno/Any.hxx + - com/sun/star/uno/Any.hxx + cppu/source/helper/purpenv/helper_purpenv_Environment.cxx: + # Needed by the implementation of Environment_initWithEnterable + - cppu/helper/purpenv/Environment.hxx + cppu/source/threadpool/current.cxx: + # FIXME removing this make linking fail in binaryurp + - uno/current_context.h + cppu/source/threadpool/threadident.cxx: + # Don't replace hxx -> h in URE API + - rtl/byteseq.hxx + # FIXME removing this make linking fail in binaryurp + - uno/threadpool.h diff --git a/cppu/qa/cppumaker/test_cppumaker.cxx b/cppu/qa/cppumaker/test_cppumaker.cxx index cc310188b105..3ea46f5c93ce 100644 --- a/cppu/qa/cppumaker/test_cppumaker.cxx +++ b/cppu/qa/cppumaker/test_cppumaker.cxx @@ -363,7 +363,6 @@ #include #include -#include namespace test { namespace codemaker { namespace cppumaker { diff --git a/cppu/qa/test_any.cxx b/cppu/qa/test_any.cxx index 7787176ffd3b..b8a8037f8f48 100644 --- a/cppu/qa/test_any.cxx +++ b/cppu/qa/test_any.cxx @@ -22,9 +22,7 @@ #include #include -#include #include -#include #include #include @@ -46,13 +44,9 @@ #include #include #include -#include #include #include -#include #include -#include -#include #include namespace { diff --git a/cppu/qa/test_reference.cxx b/cppu/qa/test_reference.cxx index d29fc8da87eb..79ff90ae4101 100644 --- a/cppu/qa/test_reference.cxx +++ b/cppu/qa/test_reference.cxx @@ -19,16 +19,12 @@ #include -#include #include -#include #include #include #include -#include - namespace { diff --git a/cppu/qa/test_unotype.cxx b/cppu/qa/test_unotype.cxx index 08fa36d05ee6..910afec9db95 100644 --- a/cppu/qa/test_unotype.cxx +++ b/cppu/qa/test_unotype.cxx @@ -19,9 +19,7 @@ #include -#include #include -#include #include #include @@ -31,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -45,6 +42,8 @@ namespace com { namespace sun { namespace star { namespace uno { class Any; } } } } +namespace com { namespace sun { namespace star { namespace uno { template class Reference; } } } } + namespace { struct DerivedStruct1: css::lang::EventObject {}; diff --git a/cppu/source/LogBridge/LogBridge.cxx b/cppu/source/LogBridge/LogBridge.cxx index 4d7b922e50ce..4c83de9f0aa6 100644 --- a/cppu/source/LogBridge/LogBridge.cxx +++ b/cppu/source/LogBridge/LogBridge.cxx @@ -22,13 +22,9 @@ #include #include #include -#include -#include #include #include #include -#include -#include #include #include diff --git a/cppu/source/cppu/cppu_opt.cxx b/cppu/source/cppu/cppu_opt.cxx index ad4c5142a08f..b41ecf821cb7 100644 --- a/cppu/source/cppu/cppu_opt.cxx +++ b/cppu/source/cppu/cppu_opt.cxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx b/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx index ea935424abab..19c341f15d34 100644 --- a/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx +++ b/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx @@ -26,7 +26,6 @@ #include #include #include -#include using namespace com::sun::star; diff --git a/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx b/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx index a781ff1d7796..b6f5ffbe31aa 100644 --- a/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx +++ b/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx @@ -20,11 +20,9 @@ #include "Proxy.hxx" -#include #include #include #include -#include using namespace com::sun::star; diff --git a/cppu/source/threadpool/current.cxx b/cppu/source/threadpool/current.cxx index cd769c046d3f..f788e005a031 100644 --- a/cppu/source/threadpool/current.cxx +++ b/cppu/source/threadpool/current.cxx @@ -20,7 +20,6 @@ #include #include -#include #include #include diff --git a/cppu/source/threadpool/thread.hxx b/cppu/source/threadpool/thread.hxx index 0bdf225d6520..e9258a97b3ed 100644 --- a/cppu/source/threadpool/thread.hxx +++ b/cppu/source/threadpool/thread.hxx @@ -23,7 +23,6 @@ #include #include -#include "jobqueue.hxx" #include "threadpool.hxx" namespace cppu_threadpool { diff --git a/cppu/source/threadpool/threadident.cxx b/cppu/source/threadpool/threadident.cxx index 4b9ef7c25b57..544acc7af520 100644 --- a/cppu/source/threadpool/threadident.cxx +++ b/cppu/source/threadpool/threadident.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include - #include #include diff --git a/cppu/source/threadpool/threadpool.cxx b/cppu/source/threadpool/threadpool.cxx index dcbe2ae0734d..2490e1c1e50c 100644 --- a/cppu/source/threadpool/threadpool.cxx +++ b/cppu/source/threadpool/threadpool.cxx @@ -26,7 +26,6 @@ #include #include -#include #include #include diff --git a/cppu/source/typelib/static_types.cxx b/cppu/source/typelib/static_types.cxx index e7b6e5257257..f88e642aeb7b 100644 --- a/cppu/source/typelib/static_types.cxx +++ b/cppu/source/typelib/static_types.cxx @@ -21,10 +21,8 @@ #include #include -#include #include -#include #include #include #include diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx index 98475dc738ff..817601e03d42 100644 --- a/cppu/source/typelib/typelib.cxx +++ b/cppu/source/typelib/typelib.cxx @@ -25,16 +25,13 @@ #include #include -#include #include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/cppu/source/uno/assign.hxx b/cppu/source/uno/assign.hxx index 8ee7010972d2..97ee9cd5b9db 100644 --- a/cppu/source/uno/assign.hxx +++ b/cppu/source/uno/assign.hxx @@ -19,8 +19,6 @@ #ifndef INCLUDED_CPPU_SOURCE_UNO_ASSIGN_HXX #define INCLUDED_CPPU_SOURCE_UNO_ASSIGN_HXX -#include - #include "prim.hxx" #include "destr.hxx" #include "constr.hxx" diff --git a/cppu/source/uno/constr.hxx b/cppu/source/uno/constr.hxx index dd68c0437806..73d89b915d1f 100644 --- a/cppu/source/uno/constr.hxx +++ b/cppu/source/uno/constr.hxx @@ -19,8 +19,8 @@ #ifndef INCLUDED_CPPU_SOURCE_UNO_CONSTR_HXX #define INCLUDED_CPPU_SOURCE_UNO_CONSTR_HXX -#include #include "prim.hxx" +#include namespace cppu { diff --git a/cppu/source/uno/data.cxx b/cppu/source/uno/data.cxx index dcd2b19ec62e..339e650fe411 100644 --- a/cppu/source/uno/data.cxx +++ b/cppu/source/uno/data.cxx @@ -18,9 +18,6 @@ */ -#include - -#include #include #include @@ -31,7 +28,6 @@ #include "eq.hxx" using namespace ::cppu; -using namespace ::osl; namespace cppu { diff --git a/cppu/source/uno/destr.hxx b/cppu/source/uno/destr.hxx index 2a6f0de62000..1b964e36a698 100644 --- a/cppu/source/uno/destr.hxx +++ b/cppu/source/uno/destr.hxx @@ -20,12 +20,13 @@ #define INCLUDED_CPPU_SOURCE_UNO_DESTR_HXX #include +#include #include +#include #include "prim.hxx" - namespace cppu { diff --git a/cppu/source/uno/eq.hxx b/cppu/source/uno/eq.hxx index a2191a34222f..59401ad34b3c 100644 --- a/cppu/source/uno/eq.hxx +++ b/cppu/source/uno/eq.hxx @@ -19,10 +19,13 @@ #ifndef INCLUDED_CPPU_SOURCE_UNO_EQ_HXX #define INCLUDED_CPPU_SOURCE_UNO_EQ_HXX -#include +#include +#include + +#include +#include #include "prim.hxx" -#include "destr.hxx" namespace cppu diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx index a336dd33eaf8..7ad96d5a9110 100644 --- a/cppu/source/uno/lbenv.cxx +++ b/cppu/source/uno/lbenv.cxx @@ -17,15 +17,13 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include - #include #include #include #include #include -#include +#include #include #include #include @@ -37,7 +35,6 @@ #include #include #include "prim.hxx" -#include "destr.hxx" #include "loadmodule.hxx" #include @@ -59,7 +56,6 @@ bool td_equals( typelib_InterfaceTypeDescription const * pTD1, pTD2->aBase.pTypeName->buffer ) == 0)); } -struct ObjectEntry; struct uno_DefaultEnvironment; diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx index f9e2a7825834..bba5756c0bd5 100644 --- a/cppu/source/uno/lbmap.cxx +++ b/cppu/source/uno/lbmap.cxx @@ -17,18 +17,15 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include - #include "IdentityMapping.hxx" -#include #include #include #include #include #include -#include +#include #include #include #include diff --git a/cppu/source/uno/loadmodule.cxx b/cppu/source/uno/loadmodule.cxx index c72de19be33d..b56c03965518 100644 --- a/cppu/source/uno/loadmodule.cxx +++ b/cppu/source/uno/loadmodule.cxx @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include diff --git a/cppu/source/uno/loadmodule.hxx b/cppu/source/uno/loadmodule.hxx index 8a964e088174..df24890ba3f3 100644 --- a/cppu/source/uno/loadmodule.hxx +++ b/cppu/source/uno/loadmodule.hxx @@ -21,9 +21,9 @@ #define INCLUDED_CPPU_SOURCE_UNO_LOADMODULE_HXX #include -#include +#include -namespace rtl { class OUString; } +namespace osl { class Module; } namespace cppu { namespace detail { diff --git a/cppu/source/uno/prim.hxx b/cppu/source/uno/prim.hxx index 105fabf0f0d8..84f96e7fd38f 100644 --- a/cppu/source/uno/prim.hxx +++ b/cppu/source/uno/prim.hxx @@ -28,9 +28,7 @@ #include #include -#include -#include -#include +#include namespace cppu { diff --git a/cppu/source/uno/sequence.cxx b/cppu/source/uno/sequence.cxx index 97412ba70d08..43a5bc0d85f9 100644 --- a/cppu/source/uno/sequence.cxx +++ b/cppu/source/uno/sequence.cxx @@ -22,12 +22,10 @@ #include #include -#include #include #include #include #include -#include #include #include "constr.hxx" -- cgit