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 <vmiklos@collabora.com>
diff --git a/cppu/IwyuFilter_cppu.yaml b/cppu/IwyuFilter_cppu.yaml
new file mode 100644
index 0000000..453e57e
--- /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 cc31018..3ea46f5 100644
--- a/cppu/qa/cppumaker/test_cppumaker.cxx
+++ b/cppu/qa/cppumaker/test_cppumaker.cxx
@@ -363,7 +363,6 @@
#include <rtl/ustring.hxx>

#include <cstddef>
#include <iostream>

namespace test { namespace codemaker { namespace cppumaker {

diff --git a/cppu/qa/test_any.cxx b/cppu/qa/test_any.cxx
index 7787176..b8a8037f 100644
--- a/cppu/qa/test_any.cxx
+++ b/cppu/qa/test_any.cxx
@@ -22,9 +22,7 @@
#include <stdlib.h>
#include <type_traits>

#include <cppunit/TestSuite.h>
#include <cppunit/TestFixture.h>
#include <cppunit/TestCase.h>
#include <cppunit/plugin/TestPlugIn.h>
#include <cppunit/extensions/HelperMacros.h>

@@ -46,13 +44,9 @@
#include <Struct2b.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/Type.hxx>
#include <com/sun/star/uno/XInterface.hpp>
#include <osl/interlck.h>
#include <rtl/string.h>
#include <rtl/ustring.h>
#include <rtl/ustring.hxx>

namespace {
diff --git a/cppu/qa/test_reference.cxx b/cppu/qa/test_reference.cxx
index d29fc8d..79ff90a 100644
--- a/cppu/qa/test_reference.cxx
+++ b/cppu/qa/test_reference.cxx
@@ -19,16 +19,12 @@

#include <sal/types.h>

#include <cppunit/TestSuite.h>
#include <cppunit/TestFixture.h>
#include <cppunit/TestCase.h>
#include <cppunit/plugin/TestPlugIn.h>
#include <cppunit/extensions/HelperMacros.h>

#include <Interface1.hpp>

#include <rtl/ustring.hxx>

namespace
{

diff --git a/cppu/qa/test_unotype.cxx b/cppu/qa/test_unotype.cxx
index 08fa36d..910afec 100644
--- a/cppu/qa/test_unotype.cxx
+++ b/cppu/qa/test_unotype.cxx
@@ -19,9 +19,7 @@

#include <sal/types.h>

#include <cppunit/TestSuite.h>
#include <cppunit/TestFixture.h>
#include <cppunit/TestCase.h>
#include <cppunit/plugin/TestPlugIn.h>
#include <cppunit/extensions/HelperMacros.h>

@@ -31,7 +29,6 @@
#include <com/sun/star/beans/PropertyChangeEvent.hpp>
#include <com/sun/star/lang/EventObject.hpp>
#include <com/sun/star/uno/Exception.hpp>
#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/Type.hxx>
@@ -45,6 +42,8 @@
    class Any;
} } } }

namespace com { namespace sun { namespace star { namespace uno { template <class interface_type> class Reference; } } } }

namespace {

struct DerivedStruct1: css::lang::EventObject {};
diff --git a/cppu/source/LogBridge/LogBridge.cxx b/cppu/source/LogBridge/LogBridge.cxx
index 4d7b922..4c83de9 100644
--- a/cppu/source/LogBridge/LogBridge.cxx
+++ b/cppu/source/LogBridge/LogBridge.cxx
@@ -22,13 +22,9 @@
#include <osl/thread.h>
#include <osl/thread.hxx>
#include <osl/diagnose.h>
#include <uno/dispatcher.h>
#include <typelib/typedescription.hxx>
#include <cppu/Enterable.hxx>
#include <cppu/helper/purpenv/Environment.hxx>
#include <cppu/helper/purpenv/Mapping.hxx>
#include <cppu/EnvDcp.hxx>
#include <uno/environment.hxx>
#include <com/sun/star/uno/Type.hxx>
#include <sal/log.hxx>

diff --git a/cppu/source/cppu/cppu_opt.cxx b/cppu/source/cppu/cppu_opt.cxx
index ad4c514..b41ecf8 100644
--- a/cppu/source/cppu/cppu_opt.cxx
+++ b/cppu/source/cppu/cppu_opt.cxx
@@ -20,7 +20,6 @@
#include <sal/config.h>

#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <typelib/typedescription.h>
#include <uno/any2.h>
#include <rtl/ustrbuf.hxx>
diff --git a/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx b/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx
index ea93542..19c341f 100644
--- a/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx
+++ b/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx
@@ -26,7 +26,6 @@
#include <sal/log.hxx>
#include <uno/environment.hxx>
#include <uno/dispatcher.h>
#include <typelib/typedescription.h>

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 a781ff1..b6f5ffb 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 <sal/alloca.h>
#include <sal/log.hxx>
#include <uno/dispatcher.h>
#include <typelib/typedescription.hxx>
#include <cppu/EnvDcp.hxx>

using namespace com::sun::star;

diff --git a/cppu/source/threadpool/current.cxx b/cppu/source/threadpool/current.cxx
index cd769c0..f788e00 100644
--- a/cppu/source/threadpool/current.cxx
+++ b/cppu/source/threadpool/current.cxx
@@ -20,7 +20,6 @@
#include <sal/config.h>

#include <rtl/byteseq.h>
#include <rtl/uuid.h>
#include <osl/thread.h>
#include <osl/mutex.hxx>

diff --git a/cppu/source/threadpool/thread.hxx b/cppu/source/threadpool/thread.hxx
index 0bdf225..e9258a9 100644
--- a/cppu/source/threadpool/thread.hxx
+++ b/cppu/source/threadpool/thread.hxx
@@ -23,7 +23,6 @@
#include <sal/types.h>
#include <salhelper/simplereferenceobject.hxx>

#include "jobqueue.hxx"
#include "threadpool.hxx"

namespace cppu_threadpool {
diff --git a/cppu/source/threadpool/threadident.cxx b/cppu/source/threadpool/threadident.cxx
index 4b9ef7c..544acc7 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 <list>

#include <osl/thread.hxx>
#include <osl/diagnose.h>

diff --git a/cppu/source/threadpool/threadpool.cxx b/cppu/source/threadpool/threadpool.cxx
index dcbe2ae..2490e1c 100644
--- a/cppu/source/threadpool/threadpool.cxx
+++ b/cppu/source/threadpool/threadpool.cxx
@@ -26,7 +26,6 @@

#include <osl/diagnose.h>
#include <osl/mutex.hxx>
#include <osl/thread.h>
#include <rtl/instance.hxx>
#include <sal/log.hxx>

diff --git a/cppu/source/typelib/static_types.cxx b/cppu/source/typelib/static_types.cxx
index e7b6e52..f88e642 100644
--- a/cppu/source/typelib/static_types.cxx
+++ b/cppu/source/typelib/static_types.cxx
@@ -21,10 +21,8 @@

#include <algorithm>
#include <cassert>
#include <stdarg.h>

#include <osl/mutex.hxx>
#include <osl/interlck.h>
#include <rtl/ustring.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/instance.hxx>
diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index 98475dc..817601e 100644
--- a/cppu/source/typelib/typelib.cxx
+++ b/cppu/source/typelib/typelib.cxx
@@ -25,16 +25,13 @@
#include <vector>
#include <memory>

#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <new>
#include <sal/log.hxx>
#include <osl/interlck.h>
#include <osl/mutex.hxx>
#include <rtl/ustring.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/alloc.h>
#include <rtl/instance.hxx>
#include <osl/diagnose.h>
#include <typelib/typedescription.h>
diff --git a/cppu/source/uno/assign.hxx b/cppu/source/uno/assign.hxx
index 8ee70109..97ee9cd 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 <string.h>

#include "prim.hxx"
#include "destr.hxx"
#include "constr.hxx"
diff --git a/cppu/source/uno/constr.hxx b/cppu/source/uno/constr.hxx
index dd68c04..73d89b9 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 <string.h>
#include "prim.hxx"
#include <osl/diagnose.h>

namespace cppu
{
diff --git a/cppu/source/uno/data.cxx b/cppu/source/uno/data.cxx
index dcd2b19..339e650 100644
--- a/cppu/source/uno/data.cxx
+++ b/cppu/source/uno/data.cxx
@@ -18,9 +18,6 @@
 */


#include <cstddef>

#include <osl/mutex.hxx>
#include <sal/log.hxx>
#include <uno/data.h>

@@ -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 2a6f0de..1b964e3 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 <sal/config.h>
#include <osl/diagnose.h>

#include <cassert>
#include <cstdlib>

#include "prim.hxx"


namespace cppu
{

diff --git a/cppu/source/uno/eq.hxx b/cppu/source/uno/eq.hxx
index a2191a3..59401ad 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 <math.h>
#include <cmath>
#include <string.h>

#include <osl/diagnose.h>
#include <rtl/ustring.hxx>

#include "prim.hxx"
#include "destr.hxx"


namespace cppu
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index a336dd3..7ad96d5 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 <config_java.h>

#include <cppu/EnvDcp.hxx>

#include <sal/log.hxx>
#include <osl/diagnose.h>
#include <osl/interlck.h>
#include <osl/mutex.hxx>
#include <osl/module.h>
#include <osl/module.hxx>
#include <osl/process.h>
#include <rtl/process.h>
#include <rtl/string.hxx>
@@ -37,7 +35,6 @@
#include <uno/environment.h>
#include <uno/lbnames.h>
#include "prim.hxx"
#include "destr.hxx"
#include "loadmodule.hxx"

#include <unordered_map>
@@ -59,7 +56,6 @@
                 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 f9e2a78..bba5756 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 <config_java.h>

#include "IdentityMapping.hxx"

#include <algorithm>
#include <cassert>
#include <set>
#include <unordered_map>

#include <rtl/ustring.hxx>
#include <rtl/ustrbuf.hxx>
#include <osl/module.h>
#include <osl/module.hxx>
#include <osl/diagnose.h>
#include <osl/mutex.hxx>
#include <osl/interlck.h>
diff --git a/cppu/source/uno/loadmodule.cxx b/cppu/source/uno/loadmodule.cxx
index c72de19..b56c039 100644
--- a/cppu/source/uno/loadmodule.cxx
+++ b/cppu/source/uno/loadmodule.cxx
@@ -21,7 +21,7 @@
#include <sal/config.h>

#include <osl/module.h>
#include <rtl/string.h>
#include <osl/module.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/ustring.hxx>

diff --git a/cppu/source/uno/loadmodule.hxx b/cppu/source/uno/loadmodule.hxx
index 8a964e0..df24890 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 <sal/config.h>
#include <osl/module.hxx>
#include <rtl/ustring.hxx>

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 105fabf..84f96e7 100644
--- a/cppu/source/uno/prim.hxx
+++ b/cppu/source/uno/prim.hxx
@@ -28,9 +28,7 @@
#include <uno/dispatcher.h>

#include <osl/interlck.h>
#include <osl/diagnose.h>
#include <rtl/ustring.hxx>
#include <rtl/alloc.h>
#include <stdint.h>

namespace cppu
{
diff --git a/cppu/source/uno/sequence.cxx b/cppu/source/uno/sequence.cxx
index 97412ba..43a5bc0 100644
--- a/cppu/source/uno/sequence.cxx
+++ b/cppu/source/uno/sequence.cxx
@@ -22,12 +22,10 @@
#include <cassert>
#include <string.h>

#include <rtl/alloc.h>
#include <osl/diagnose.h>
#include <osl/interlck.h>
#include <typelib/typedescription.h>
#include <uno/data.h>
#include <uno/dispatcher.h>
#include <uno/sequence2.h>

#include "constr.hxx"