summaryrefslogtreecommitdiff
path: root/cppu
diff options
context:
space:
mode:
authorGabor Kelemen <kelemen.gabor2@nisz.hu>2019-01-25 00:00:56 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-01-29 13:48:23 +0100
commit2660f132cc98c0fe14d5055a91a7cf126d5139f6 (patch)
tree03260ddac07fe55b5c3f4e6be68712217758a3ff /cppu
parentbdf40cca40ddbea8c5c903f2695d6f958c87bb3b (diff)
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>
Diffstat (limited to 'cppu')
-rw-r--r--cppu/IwyuFilter_cppu.yaml26
-rw-r--r--cppu/qa/cppumaker/test_cppumaker.cxx1
-rw-r--r--cppu/qa/test_any.cxx6
-rw-r--r--cppu/qa/test_reference.cxx4
-rw-r--r--cppu/qa/test_unotype.cxx5
-rw-r--r--cppu/source/LogBridge/LogBridge.cxx4
-rw-r--r--cppu/source/cppu/cppu_opt.cxx1
-rw-r--r--cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx1
-rw-r--r--cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx2
-rw-r--r--cppu/source/threadpool/current.cxx1
-rw-r--r--cppu/source/threadpool/thread.hxx1
-rw-r--r--cppu/source/threadpool/threadident.cxx2
-rw-r--r--cppu/source/threadpool/threadpool.cxx1
-rw-r--r--cppu/source/typelib/static_types.cxx2
-rw-r--r--cppu/source/typelib/typelib.cxx3
-rw-r--r--cppu/source/uno/assign.hxx2
-rw-r--r--cppu/source/uno/constr.hxx2
-rw-r--r--cppu/source/uno/data.cxx4
-rw-r--r--cppu/source/uno/destr.hxx3
-rw-r--r--cppu/source/uno/eq.hxx7
-rw-r--r--cppu/source/uno/lbenv.cxx6
-rw-r--r--cppu/source/uno/lbmap.cxx5
-rw-r--r--cppu/source/uno/loadmodule.cxx2
-rw-r--r--cppu/source/uno/loadmodule.hxx4
-rw-r--r--cppu/source/uno/prim.hxx4
-rw-r--r--cppu/source/uno/sequence.cxx2
26 files changed, 42 insertions, 59 deletions
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 <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 7787176ffd3b..b8a8037f8f48 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 d29fc8da87eb..79ff90ae4101 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 08fa36d05ee6..910afec9db95 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 @@ namespace com { namespace sun { namespace star { namespace uno {
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 4d7b922e50ce..4c83de9f0aa6 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 ad4c5142a08f..b41ecf821cb7 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 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 <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 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 <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 cd769c046d3f..f788e005a031 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 0bdf225d6520..e9258a97b3ed 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 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 <list>
-
#include <osl/thread.hxx>
#include <osl/diagnose.h>
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 <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 e7b6e5257257..f88e642aeb7b 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 98475dc738ff..817601e03d42 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 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 <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 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 <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 dcd2b19ec62e..339e650fe411 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 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 <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 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 <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 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 <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 @@ 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 <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 c72de19be33d..b56c03965518 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 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 <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 105fabf0f0d8..84f96e7fd38f 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 97412ba70d08..43a5bc0d85f9 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"