tdf#42949 Fix IWYU warnings in io/
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I16dfde335816053e5821d5e975b27b6e4819b1a8
Reviewed-on: https://gerrit.libreoffice.org/71135
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
diff --git a/io/IwyuFilter_io.yaml b/io/IwyuFilter_io.yaml
new file mode 100644
index 0000000..9d46098
--- /dev/null
+++ b/io/IwyuFilter_io.yaml
@@ -0,0 +1,36 @@
---
assumeFilename: io/source/services.cxx
blacklist:
io/source/acceptor/acceptor.cxx:
# Avoid loplugin:unreffun error
- services.hxx
io/source/connector/connector.hxx:
# Base class needs full type
- com/sun/star/connection/XConnection.hpp
- com/sun/star/connection/XConnectionBroadcaster.hpp
# Don't replace with impl. detail
- osl/socket.hxx
- osl/pipe.hxx
io/source/connector/connector.cxx:
# Avoid loplugin:unreffun error
- services.hxx
io/source/TextInputStream/TextInputStream.cxx:
# Avoid loplugin:unreffun error
- services.hxx
io/source/TextOutputStream/TextOutputStream.cxx:
# Avoid loplugin:unreffun error
- services.hxx
io/source/stm/odata.cxx:
# Avoid loplugin:unreffun error
- services.hxx
io/source/stm/opipe.cxx:
# Avoid loplugin:unreffun error
- services.hxx
io/source/stm/opump.cxx:
# Avoid loplugin:unreffun error
- services.hxx
# Don't replace with URE API impl. detail
- cppuhelper/interfacecontainer.hxx
io/source/stm/omark.cxx:
# Avoid loplugin:unreffun error
- services.hxx
diff --git a/io/qa/textinputstream.cxx b/io/qa/textinputstream.cxx
index 6e67f5e..dfeb478 100644
--- a/io/qa/textinputstream.cxx
+++ b/io/qa/textinputstream.cxx
@@ -12,17 +12,13 @@
#include <algorithm>
#include <cassert>
#include <cstring>
#include <exception>
#include <com/sun/star/io/BufferSizeExceededException.hpp>
#include <com/sun/star/io/IOException.hpp>
#include <com/sun/star/io/NotConnectedException.hpp>
#include <com/sun/star/io/TextInputStream.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XTextInputStream2.hpp>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/RuntimeException.hpp>
#include <cppuhelper/implbase.hxx>
#include <cppunit/TestAssert.h>
#include <cppunit/extensions/HelperMacros.h>
diff --git a/io/source/TextInputStream/TextInputStream.cxx b/io/source/TextInputStream/TextInputStream.cxx
index 3594d00..06b8753 100644
--- a/io/source/TextInputStream/TextInputStream.cxx
+++ b/io/source/TextInputStream/TextInputStream.cxx
@@ -19,11 +19,7 @@
#include <string.h>
#include <uno/mapping.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/implementationentry.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <rtl/textenc.h>
@@ -39,6 +35,8 @@
#include <vector>
namespace com::sun::star::uno { class XComponentContext; }
#define IMPLEMENTATION_NAME "com.sun.star.comp.io.TextInputStream"
#define SERVICE_NAME "com.sun.star.io.TextInputStream"
@@ -47,7 +45,6 @@
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::io;
using namespace ::com::sun::star::registry;
namespace io_TextInputStream
{
diff --git a/io/source/TextOutputStream/TextOutputStream.cxx b/io/source/TextOutputStream/TextOutputStream.cxx
index 4caef34..ce911ce 100644
--- a/io/source/TextOutputStream/TextOutputStream.cxx
+++ b/io/source/TextOutputStream/TextOutputStream.cxx
@@ -19,11 +19,7 @@
#include <uno/mapping.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/implementationentry.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <rtl/textenc.h>
@@ -35,6 +31,8 @@
#include <services.hxx>
namespace com::sun::star::uno { class XComponentContext; }
#define IMPLEMENTATION_NAME "com.sun.star.comp.io.TextOutputStream"
#define SERVICE_NAME "com.sun.star.io.TextOutputStream"
@@ -43,7 +41,6 @@
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::io;
using namespace ::com::sun::star::registry;
namespace io_TextOutputStream
{
diff --git a/io/source/acceptor/acc_pipe.cxx b/io/source/acceptor/acc_pipe.cxx
index 50a9939..ad9ce09 100644
--- a/io/source/acceptor/acc_pipe.cxx
+++ b/io/source/acceptor/acc_pipe.cxx
@@ -19,6 +19,7 @@
#include <osl/security.hxx>
#include "acceptor.hxx"
#include <com/sun/star/connection/XConnection.hpp>
#include <com/sun/star/connection/ConnectionSetupException.hpp>
#include <com/sun/star/io/IOException.hpp>
diff --git a/io/source/acceptor/acc_socket.cxx b/io/source/acceptor/acc_socket.cxx
index a998ccd..b070761 100644
--- a/io/source/acceptor/acc_socket.cxx
+++ b/io/source/acceptor/acc_socket.cxx
@@ -19,11 +19,11 @@
#include "acceptor.hxx"
#include <exception>
#include <unordered_set>
#include <osl/mutex.hxx>
#include <rtl/ustrbuf.hxx>
#include <com/sun/star/connection/XConnection.hpp>
#include <com/sun/star/connection/XConnectionBroadcaster.hpp>
#include <com/sun/star/connection/ConnectionSetupException.hpp>
#include <com/sun/star/io/IOException.hpp>
diff --git a/io/source/acceptor/acceptor.cxx b/io/source/acceptor/acceptor.cxx
index d0bbc49f..00013a9 100644
--- a/io/source/acceptor/acceptor.cxx
+++ b/io/source/acceptor/acceptor.cxx
@@ -19,11 +19,7 @@
#include <osl/mutex.hxx>
#include <uno/mapping.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/implementationentry.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/unourl.hxx>
#include <rtl/malformeduriexception.hxx>
@@ -46,7 +42,6 @@
using namespace ::cppu;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::registry;
using namespace ::com::sun::star::connection;
namespace io_acceptor
diff --git a/io/source/acceptor/acceptor.hxx b/io/source/acceptor/acceptor.hxx
index 704529f..a88f372 100644
--- a/io/source/acceptor/acceptor.hxx
+++ b/io/source/acceptor/acceptor.hxx
@@ -24,7 +24,9 @@
#include <osl/socket.hxx>
#include <osl/mutex.hxx>
#include <com/sun/star/connection/XConnection.hpp>
#include <com/sun/star/uno/Reference.hxx>
namespace com::sun::star::connection { class XConnection; }
namespace io_acceptor {
diff --git a/io/source/connector/connector.cxx b/io/source/connector/connector.cxx
index c95219d..cee4600 100644
--- a/io/source/connector/connector.cxx
+++ b/io/source/connector/connector.cxx
@@ -20,17 +20,12 @@
#include <osl/security.hxx>
#include <sal/log.hxx>
#include <uno/mapping.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/implementationentry.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/unourl.hxx>
#include <rtl/malformeduriexception.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/connection/ConnectionSetupException.hpp>
#include <com/sun/star/connection/NoConnectException.hpp>
#include <com/sun/star/connection/XConnector.hpp>
@@ -46,7 +41,6 @@
using namespace ::cppu;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::registry;
using namespace ::com::sun::star::connection;
namespace stoc_connector
diff --git a/io/source/connector/ctr_pipe.cxx b/io/source/connector/ctr_pipe.cxx
index 9938362..8d66dea 100644
--- a/io/source/connector/ctr_pipe.cxx
+++ b/io/source/connector/ctr_pipe.cxx
@@ -22,6 +22,7 @@
#include <com/sun/star/io/IOException.hpp>
#include "connector.hxx"
#include <osl/pipe.hxx>
using namespace ::osl;
using namespace ::com::sun::star::uno;
diff --git a/io/source/connector/ctr_socket.cxx b/io/source/connector/ctr_socket.cxx
index 901f120..ab2eefd 100644
--- a/io/source/connector/ctr_socket.cxx
+++ b/io/source/connector/ctr_socket.cxx
@@ -21,7 +21,6 @@
#include "connector.hxx"
#include <com/sun/star/io/IOException.hpp>
#include <rtl/ustrbuf.hxx>
#include <exception>
using namespace ::osl;
using namespace ::com::sun::star::uno;
diff --git a/io/source/services.cxx b/io/source/services.cxx
index f285400..557712d 100644
--- a/io/source/services.cxx
+++ b/io/source/services.cxx
@@ -20,8 +20,6 @@
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implementationentry.hxx>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include "services.hxx"
using namespace ::cppu;
diff --git a/io/source/services.hxx b/io/source/services.hxx
index a7bed25..119f6e2 100644
--- a/io/source/services.hxx
+++ b/io/source/services.hxx
@@ -27,9 +27,9 @@
#include <rtl/ustring.hxx>
#include <sal/types.h>
namespace com::sun::star::uno { class XComponentContext; }
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::registry;
namespace io_acceptor{
Reference< XInterface > acceptor_CreateInstance( const Reference< XComponentContext > & xCtx);
diff --git a/io/source/stm/odata.cxx b/io/source/stm/odata.cxx
index f942c5d..e174bd1 100644
--- a/io/source/stm/odata.cxx
+++ b/io/source/stm/odata.cxx
@@ -22,7 +22,6 @@
#include <vector>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <osl/endian.h>
diff --git a/io/source/stm/omark.cxx b/io/source/stm/omark.cxx
index 1be2c58..cf2dcb9 100644
--- a/io/source/stm/omark.cxx
+++ b/io/source/stm/omark.cxx
@@ -20,8 +20,8 @@
#include <map>
#include <memory>
#include <vector>
#include <com/sun/star/io/BufferSizeExceededException.hpp>
#include <com/sun/star/io/NotConnectedException.hpp>
#include <com/sun/star/io/XMarkableStream.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
@@ -32,17 +32,13 @@
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <osl/mutex.hxx>
#include <rtl/ustrbuf.hxx>
#include <osl/diagnose.h>
#include <string.h>
using namespace ::std;
using namespace ::cppu;
diff --git a/io/source/stm/opipe.cxx b/io/source/stm/opipe.cxx
index 1065629..238c732 100644
--- a/io/source/stm/opipe.cxx
+++ b/io/source/stm/opipe.cxx
@@ -19,15 +19,13 @@
#include <sal/config.h>
#include <com/sun/star/io/BufferSizeExceededException.hpp>
#include <com/sun/star/io/NotConnectedException.hpp>
#include <com/sun/star/io/XPipe.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/io/XConnectable.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
@@ -47,6 +45,8 @@
#include <services.hxx>
#include "streamhelper.hxx"
namespace com::sun::star::uno { class XComponentContext; }
// Implementation and service names
#define IMPLEMENTATION_NAME "com.sun.star.comp.io.stm.Pipe"
diff --git a/io/source/stm/opump.cxx b/io/source/stm/opump.cxx
index e1b4fe0..90edc35 100644
--- a/io/source/stm/opump.cxx
+++ b/io/source/stm/opump.cxx
@@ -18,8 +18,6 @@
*/
#include <stdio.h>
#include <sal/log.hxx>
#include <com/sun/star/io/IOException.hpp>
@@ -28,15 +26,9 @@
#include <com/sun/star/io/XActiveDataSink.hpp>
#include <com/sun/star/io/XActiveDataControl.hpp>
#include <com/sun/star/io/XConnectable.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <uno/dispatcher.h>
#include <uno/mapping.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <osl/mutex.hxx>
@@ -48,7 +40,6 @@
using namespace cppu;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::registry;
using namespace com::sun::star::io;
#include <services.hxx>
diff --git a/io/source/stm/streamhelper.cxx b/io/source/stm/streamhelper.cxx
index 00ef1b5..20280b8 100644
--- a/io/source/stm/streamhelper.cxx
+++ b/io/source/stm/streamhelper.cxx
@@ -17,14 +17,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <rtl/alloc.h>
#include <limits>
#include <string.h>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/io/BufferSizeExceededException.hpp>
using namespace ::com::sun::star::uno;
diff --git a/io/source/stm/streamhelper.hxx b/io/source/stm/streamhelper.hxx
index 94d7c60..c1bb1b7 100644
--- a/io/source/stm/streamhelper.hxx
+++ b/io/source/stm/streamhelper.hxx
@@ -20,10 +20,12 @@
#ifndef INCLUDED_IO_SOURCE_STM_STREAMHELPER_HXX
#define INCLUDED_IO_SOURCE_STM_STREAMHELPER_HXX
#include <com/sun/star/io/BufferSizeExceededException.hpp>
#include <com/sun/star/uno/Sequence.hxx>
#include <assert.h>
using namespace com::sun::star::uno;
namespace io_stm
{