summaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
authorGabor Kelemen <kelemen.gabor2@nisz.hu>2019-03-19 01:54:54 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-04-25 11:28:15 +0200
commitf9b8c2d57b10de6344ff5555c0b09947484a586b (patch)
treed9144cfe83ad88a62752503ef71c903e93fe6b7b /io
parent5a2aba31867e0912700f6c976f152116d902fe21 (diff)
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>
Diffstat (limited to 'io')
-rw-r--r--io/IwyuFilter_io.yaml36
-rw-r--r--io/qa/textinputstream.cxx4
-rw-r--r--io/source/TextInputStream/TextInputStream.cxx7
-rw-r--r--io/source/TextOutputStream/TextOutputStream.cxx7
-rw-r--r--io/source/acceptor/acc_pipe.cxx1
-rw-r--r--io/source/acceptor/acc_socket.cxx2
-rw-r--r--io/source/acceptor/acceptor.cxx5
-rw-r--r--io/source/acceptor/acceptor.hxx4
-rw-r--r--io/source/connector/connector.cxx6
-rw-r--r--io/source/connector/ctr_pipe.cxx1
-rw-r--r--io/source/connector/ctr_socket.cxx1
-rw-r--r--io/source/services.cxx2
-rw-r--r--io/source/services.hxx4
-rw-r--r--io/source/stm/odata.cxx1
-rw-r--r--io/source/stm/omark.cxx6
-rw-r--r--io/source/stm/opipe.cxx6
-rw-r--r--io/source/stm/opump.cxx9
-rw-r--r--io/source/stm/streamhelper.cxx4
-rw-r--r--io/source/stm/streamhelper.hxx4
19 files changed, 56 insertions, 54 deletions
diff --git a/io/IwyuFilter_io.yaml b/io/IwyuFilter_io.yaml
new file mode 100644
index 000000000000..9d4609898341
--- /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 6e67f5e986ed..dfeb478f975c 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 3594d0008119..06b8753f6999 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 ::cppu;
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 4caef34cd5c2..ce911ce318bc 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 ::cppu;
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 50a9939a2144..ad9ce09a20cb 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 a998ccd582e3..b070761b2b60 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 d0bbc49f1856..00013a90bf31 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 ::osl;
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 704529f57aae..a88f3728f5e7 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 c95219d53ab9..cee46004506d 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 ::osl;
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 993836236d90..8d66dea7b901 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 901f1206a78e..ab2eefd87872 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 f28540058b0d..557712dbf493 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 a7bed2533ac8..119f6e29feac 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 f942c5d89ccd..e174bd1ec4ab 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 1be2c58f053a..cf2dcb99f02d 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 1065629f91f9..238c73292274 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 @@ using namespace ::com::sun::star::lang;
#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 e1b4fe043d5c..90edc35d16d7 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 std;
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 00ef1b50ec9f..20280b850563 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 94d7c60a75bc..c1bb1b7db748 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
{