summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Kelemen <kelemeng@ubuntu.com>2018-10-15 21:44:22 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-10-17 12:30:05 +0200
commitf3b34508682c829abd697c66917b8e46e9e8266c (patch)
treee5e4be8b4b86a39ef9e7738c2084d5df90d90527
parentSilence more Clang trunk -Wdefaulted-function-deleted (diff)
downloadcore-f3b34508682c829abd697c66917b8e46e9e8266c.tar.gz
core-f3b34508682c829abd697c66917b8e46e9e8266c.zip
tdf#42949 Fix IWYU warnings in include/tools/*
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I9dc920e9388f9e2aa4dcae1f0b3f7562d08f7f70 Reviewed-on: https://gerrit.libreoffice.org/61809 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--forms/source/xforms/convert.cxx1
-rw-r--r--idl/source/prj/globals.cxx1
-rw-r--r--include/IwyuFilter_include.yaml23
-rw-r--r--include/svx/svdobj.hxx1
-rw-r--r--include/tools/XmlWalker.hxx4
-rw-r--r--include/tools/XmlWriter.hxx4
-rw-r--r--include/tools/b3dtrans.hxx4
-rw-r--r--include/tools/bigint.hxx6
-rw-r--r--include/tools/contnr.hxx2
-rw-r--r--include/tools/date.hxx5
-rw-r--r--include/tools/debug.hxx1
-rw-r--r--include/tools/diagnose_ex.h1
-rw-r--r--include/tools/gen.hxx1
-rw-r--r--include/tools/globname.hxx2
-rw-r--r--include/tools/inetmime.hxx1
-rw-r--r--include/tools/inetmsg.hxx1
-rw-r--r--include/tools/inetstrm.hxx1
-rw-r--r--include/tools/poly.hxx2
-rw-r--r--include/tools/stream.hxx1
-rw-r--r--include/tools/svborder.hxx3
-rw-r--r--include/tools/time.hxx4
-rw-r--r--include/tools/urlobj.hxx4
-rw-r--r--include/tools/weakbase.h1
-rw-r--r--oox/source/crypto/AgileEngine.cxx1
-rw-r--r--sc/inc/chgtrack.hxx1
-rw-r--r--tools/source/datetime/tdate.cxx1
-rw-r--r--tools/source/datetime/ttime.cxx1
-rw-r--r--tools/source/generic/svborder.cxx1
-rw-r--r--tools/source/xml/XmlWalker.cxx1
-rw-r--r--tools/source/xml/XmlWriter.cxx1
-rw-r--r--unotools/source/i18n/localedatawrapper.cxx1
-rw-r--r--unotools/source/misc/datetime.cxx1
32 files changed, 51 insertions, 32 deletions
diff --git a/forms/source/xforms/convert.cxx b/forms/source/xforms/convert.cxx
index 50a57ff53fce..f82dfd9e0a7d 100644
--- a/forms/source/xforms/convert.cxx
+++ b/forms/source/xforms/convert.cxx
@@ -23,6 +23,7 @@
#include "unohelper.hxx"
#include <algorithm>
#include <functional>
+#include <sstream>
#include <o3tl/functional.hxx>
#include <rtl/math.hxx>
#include <rtl/ustrbuf.hxx>
diff --git a/idl/source/prj/globals.cxx b/idl/source/prj/globals.cxx
index 27abf60928e1..5231076e4e28 100644
--- a/idl/source/prj/globals.cxx
+++ b/idl/source/prj/globals.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <rtl/instance.hxx>
#include <globals.hxx>
#include <database.hxx>
diff --git a/include/IwyuFilter_include.yaml b/include/IwyuFilter_include.yaml
index d9b864fd6fb4..f31831b9298c 100644
--- a/include/IwyuFilter_include.yaml
+++ b/include/IwyuFilter_include.yaml
@@ -209,3 +209,26 @@ blacklist:
- com/sun/star/lang/XServiceInfo.hpp
- com/sun/star/rendering/XBezierPolyPolygon2D.hpp
- com/sun/star/rendering/XLinePolyPolygon2D.hpp
+ include/tools/debug.hxx:
+ # Used behind #ifndef
+ - tools/toolsdllapi.h
+ include/tools/diagnose_ex.h:
+ # Needed for macros
+ - com/sun/star/lang/IllegalArgumentException.hpp
+ - com/sun/star/uno/RuntimeException.hpp
+ - rtl/ustring.hxx
+ include/tools/fontenum.hxx:
+ # Needed for template
+ - o3tl/typed_flags_set.hxx
+ include/tools/svlibrary.h:
+ # Used behind #ifndef
+ - osl/module.h
+ include/tools/poly.hxx:
+ # Needed for template
+ - o3tl/typed_flags_set.hxx
+ include/tools/stream.hxx:
+ # Needed for template
+ - o3tl/typed_flags_set.hxx
+ include/tools/urlobj.hxx:
+ # Needed for template
+ - o3tl/typed_flags_set.hxx
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index 028ee80bb2b0..630e8694f0d0 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -36,6 +36,7 @@
#include <tools/weakbase.hxx>
#include <tools/mapunit.hxx>
#include <tools/gen.hxx>
+#include <osl/diagnose.h>
#include <typeinfo>
#include <functional>
diff --git a/include/tools/XmlWalker.hxx b/include/tools/XmlWalker.hxx
index 28dddcb51778..204d71b5f48c 100644
--- a/include/tools/XmlWalker.hxx
+++ b/include/tools/XmlWalker.hxx
@@ -11,9 +11,11 @@
#define INCLUDED_TOOLS_XMLWALKER_HXX
#include <tools/toolsdllapi.h>
-#include <tools/stream.hxx>
+#include <rtl/string.hxx>
#include <memory>
+class SvStream;
+
namespace tools
{
struct XmlWalkerImpl;
diff --git a/include/tools/XmlWriter.hxx b/include/tools/XmlWriter.hxx
index 6095d1379bfe..150bcffe0bf3 100644
--- a/include/tools/XmlWriter.hxx
+++ b/include/tools/XmlWriter.hxx
@@ -11,10 +11,12 @@
#define INCLUDED_TOOLS_XMLWRITER_HXX
#include <tools/toolsdllapi.h>
-#include <tools/stream.hxx>
+#include <rtl/ustring.hxx>
#include <memory>
#include <vector>
+class SvStream;
+
namespace tools
{
struct XmlWriterImpl;
diff --git a/include/tools/b3dtrans.hxx b/include/tools/b3dtrans.hxx
index 181f43ca7bce..e42c7efbb76a 100644
--- a/include/tools/b3dtrans.hxx
+++ b/include/tools/b3dtrans.hxx
@@ -23,10 +23,10 @@
#define ZBUFFER_DEPTH_RANGE (double(256L * 256L * 256L))
#include <basegfx/matrix/b3dhommatrix.hxx>
-#include <basegfx/range/b3drange.hxx>
#include <tools/gen.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <basegfx/point/b2dpoint.hxx>
+#include <basegfx/point/b3dpoint.hxx>
+#include <basegfx/vector/b3dvector.hxx>
#include <tools/toolsdllapi.h>
/// Transformation sets for 3D output
diff --git a/include/tools/bigint.hxx b/include/tools/bigint.hxx
index 90fe56c8abce..66ce1dd3b1b8 100644
--- a/include/tools/bigint.hxx
+++ b/include/tools/bigint.hxx
@@ -19,17 +19,11 @@
#ifndef INCLUDED_TOOLS_BIGINT_HXX
#define INCLUDED_TOOLS_BIGINT_HXX
-#include <climits>
#include <rtl/ustring.hxx>
#include <tools/toolsdllapi.h>
-#include <tools/solar.h>
-
-class SvStream;
#define MAX_DIGITS 8
-class Fraction;
-
class SAL_WARN_UNUSED TOOLS_DLLPUBLIC BigInt
{
private:
diff --git a/include/tools/contnr.hxx b/include/tools/contnr.hxx
index 5b04ea7bc820..716cbf242bd1 100644
--- a/include/tools/contnr.hxx
+++ b/include/tools/contnr.hxx
@@ -19,8 +19,6 @@
#ifndef INCLUDED_TOOLS_CONTNR_HXX
#define INCLUDED_TOOLS_CONTNR_HXX
-#include <tools/toolsdllapi.h>
-
#include <limits.h>
#define TREELIST_APPEND (ULONG_MAX)
diff --git a/include/tools/date.hxx b/include/tools/date.hxx
index 69d9e3d03ea3..03f0057c27c8 100644
--- a/include/tools/date.hxx
+++ b/include/tools/date.hxx
@@ -19,14 +19,13 @@
#ifndef INCLUDED_TOOLS_DATE_HXX
#define INCLUDED_TOOLS_DATE_HXX
-#include <sal/log.hxx>
-
#include <tools/toolsdllapi.h>
#include <ostream>
#include <com/sun/star/util/Date.hpp>
-#include <com/sun/star/util/DateTime.hpp>
+
+namespace com { namespace sun { namespace star { namespace util { struct DateTime; } } } }
enum DayOfWeek { MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY,
SATURDAY, SUNDAY };
diff --git a/include/tools/debug.hxx b/include/tools/debug.hxx
index 3fa2d5f9460a..b66a9b2866ef 100644
--- a/include/tools/debug.hxx
+++ b/include/tools/debug.hxx
@@ -22,7 +22,6 @@
#include <tools/toolsdllapi.h>
#include <sal/detail/log.h>
-#include <sal/types.h>
/** The facilities provided by this header are deprecated. True assertions
(that detect broken program logic) should use standard assert (which aborts
diff --git a/include/tools/diagnose_ex.h b/include/tools/diagnose_ex.h
index 0f924fc20988..6d63c215dedc 100644
--- a/include/tools/diagnose_ex.h
+++ b/include/tools/diagnose_ex.h
@@ -27,7 +27,6 @@
#include <tools/toolsdllapi.h>
#include <cppuhelper/exc_hlp.hxx>
-#include <osl/thread.h>
TOOLS_DLLPUBLIC void DbgUnhandledException(const css::uno::Any& caughtException,
const char* currentFunction, const char* fileAndLineNo,
diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx
index 90486536c401..5d6ff5ea66b8 100644
--- a/include/tools/gen.hxx
+++ b/include/tools/gen.hxx
@@ -24,7 +24,6 @@
#include <limits.h>
#include <algorithm>
#include <ostream>
-#include <cstdlib>
class SvStream;
namespace rtl
diff --git a/include/tools/globname.hxx b/include/tools/globname.hxx
index 1a9a19e42fca..3280cb69a2f6 100644
--- a/include/tools/globname.hxx
+++ b/include/tools/globname.hxx
@@ -19,8 +19,6 @@
#ifndef INCLUDED_TOOLS_GLOBNAME_HXX
#define INCLUDED_TOOLS_GLOBNAME_HXX
-#include <vector>
-
#include <tools/toolsdllapi.h>
#include <com/sun/star/uno/Sequence.hxx>
#include <o3tl/cow_wrapper.hxx>
diff --git a/include/tools/inetmime.hxx b/include/tools/inetmime.hxx
index 11208eae50ef..80820a2b722a 100644
--- a/include/tools/inetmime.hxx
+++ b/include/tools/inetmime.hxx
@@ -22,7 +22,6 @@
#include <tools/toolsdllapi.h>
#include <rtl/character.hxx>
#include <rtl/string.hxx>
-#include <rtl/strbuf.hxx>
#include <rtl/ustring.hxx>
#include <tools/debug.hxx>
diff --git a/include/tools/inetmsg.hxx b/include/tools/inetmsg.hxx
index 445c3a60922c..ed0e074fb167 100644
--- a/include/tools/inetmsg.hxx
+++ b/include/tools/inetmsg.hxx
@@ -21,7 +21,6 @@
#include <tools/toolsdllapi.h>
#include <rtl/string.hxx>
-#include <rtl/textenc.h>
#include <rtl/ustring.hxx>
#include <tools/inetmime.hxx>
#include <tools/stream.hxx>
diff --git a/include/tools/inetstrm.hxx b/include/tools/inetstrm.hxx
index 765474ef8248..8c74b9703d08 100644
--- a/include/tools/inetstrm.hxx
+++ b/include/tools/inetstrm.hxx
@@ -26,7 +26,6 @@
#include <memory>
class INetMIMEMessage;
-class SvStream;
class TOOLS_DLLPUBLIC INetMIMEMessageStream
{
diff --git a/include/tools/poly.hxx b/include/tools/poly.hxx
index 1a0926ecfff3..17503b02bb09 100644
--- a/include/tools/poly.hxx
+++ b/include/tools/poly.hxx
@@ -21,7 +21,6 @@
#include <tools/toolsdllapi.h>
#include <tools/gen.hxx>
-#include <tools/debug.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <o3tl/cow_wrapper.hxx>
@@ -61,7 +60,6 @@ enum class PolyFlags : sal_uInt8
class SvStream;
class ImplPolygon;
struct ImplPolyPolygon;
-namespace tools { class PolyPolygon; }
namespace basegfx
{
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index f6dc99155a1c..ccd9d349540b 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -19,7 +19,6 @@
#ifndef INCLUDED_TOOLS_STREAM_HXX
#define INCLUDED_TOOLS_STREAM_HXX
-#include <limits>
#include <tools/toolsdllapi.h>
#include <tools/lineend.hxx>
#include <tools/ref.hxx>
diff --git a/include/tools/svborder.hxx b/include/tools/svborder.hxx
index 856efecfdbe7..61e1270e1ccd 100644
--- a/include/tools/svborder.hxx
+++ b/include/tools/svborder.hxx
@@ -21,7 +21,8 @@
#define INCLUDED_TOOLS_SVBORDER_HXX
#include <tools/toolsdllapi.h>
-#include <tools/gen.hxx>
+
+namespace tools { class Rectangle; }
class SAL_WARN_UNUSED TOOLS_DLLPUBLIC SvBorder
{
diff --git a/include/tools/time.hxx b/include/tools/time.hxx
index 9c137e5b9196..bada8bd5a2d0 100644
--- a/include/tools/time.hxx
+++ b/include/tools/time.hxx
@@ -20,9 +20,9 @@
#define INCLUDED_TOOLS_TIME_HXX
#include <tools/toolsdllapi.h>
-#include <tools/solar.h>
#include <com/sun/star/util/Time.hpp>
-#include <com/sun/star/util/DateTime.hpp>
+
+namespace com { namespace sun { namespace star { namespace util { struct DateTime; } } } }
/**
@WARNING: This class can serve both as wall clock time and time duration, and
diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx
index 94e22af5a159..84556aa4a609 100644
--- a/include/tools/urlobj.hxx
+++ b/include/tools/urlobj.hxx
@@ -20,8 +20,6 @@
#define INCLUDED_TOOLS_URLOBJ_HXX
#include <tools/toolsdllapi.h>
-#include <com/sun/star/uno/Reference.hxx>
-#include <rtl/string.h>
#include <rtl/ustrbuf.hxx>
#include <rtl/textenc.h>
#include <sal/types.h>
@@ -36,6 +34,8 @@ namespace com { namespace sun { namespace star { namespace util {
class XStringWidth;
} } } }
+namespace com { namespace sun { namespace star { namespace uno { template <typename > class Reference; } } } }
+
// Common URL prefixes for various schemes:
#define INET_FTP_SCHEME "ftp://"
#define INET_HTTP_SCHEME "http://"
diff --git a/include/tools/weakbase.h b/include/tools/weakbase.h
index 82c16773e33c..458381e47fff 100644
--- a/include/tools/weakbase.h
+++ b/include/tools/weakbase.h
@@ -20,7 +20,6 @@
#define INCLUDED_TOOLS_WEAKBASE_H
#include <sal/types.h>
-#include <osl/diagnose.h>
#include <rtl/ref.hxx>
#include <tools/toolsdllapi.h>
diff --git a/oox/source/crypto/AgileEngine.cxx b/oox/source/crypto/AgileEngine.cxx
index 172f3b1f2120..f4feeda99764 100644
--- a/oox/source/crypto/AgileEngine.cxx
+++ b/oox/source/crypto/AgileEngine.cxx
@@ -23,6 +23,7 @@
#include <comphelper/sequence.hxx>
#include <filter/msfilter/mscodec.hxx>
+#include <tools/stream.hxx>
#include <tools/XmlWriter.hxx>
#include <com/sun/star/io/XSeekable.hpp>
diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx
index 83caceac4262..ed15612eccd3 100644
--- a/sc/inc/chgtrack.hxx
+++ b/sc/inc/chgtrack.hxx
@@ -29,6 +29,7 @@
#include <tools/color.hxx>
#include <tools/datetime.hxx>
#include <tools/link.hxx>
+#include <tools/solar.h>
#include <unotools/options.hxx>
#include "global.hxx"
#include "bigrange.hxx"
diff --git a/tools/source/datetime/tdate.cxx b/tools/source/datetime/tdate.cxx
index fde579b8b56a..51c6b53bd0a3 100644
--- a/tools/source/datetime/tdate.cxx
+++ b/tools/source/datetime/tdate.cxx
@@ -18,6 +18,7 @@
*/
#include <tools/date.hxx>
#include <sal/log.hxx>
+#include <com/sun/star/util/DateTime.hpp>
#include <systemdatetime.hxx>
diff --git a/tools/source/datetime/ttime.cxx b/tools/source/datetime/ttime.cxx
index 5a677b9b0dbf..a843949ee3f0 100644
--- a/tools/source/datetime/ttime.cxx
+++ b/tools/source/datetime/ttime.cxx
@@ -44,6 +44,7 @@
#include <rtl/math.hxx>
#include <tools/time.hxx>
#include <osl/diagnose.h>
+#include <com/sun/star/util/DateTime.hpp>
#include <systemdatetime.hxx>
diff --git a/tools/source/generic/svborder.cxx b/tools/source/generic/svborder.cxx
index f9145dc21233..78238b480508 100644
--- a/tools/source/generic/svborder.cxx
+++ b/tools/source/generic/svborder.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <tools/svborder.hxx>
+#include <tools/gen.hxx>
tools::Rectangle & operator += ( tools::Rectangle & rRect, const SvBorder & rBorder )
{
diff --git a/tools/source/xml/XmlWalker.cxx b/tools/source/xml/XmlWalker.cxx
index 3deae82288b9..7e6d282918d4 100644
--- a/tools/source/xml/XmlWalker.cxx
+++ b/tools/source/xml/XmlWalker.cxx
@@ -7,6 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <tools/stream.hxx>
#include <tools/XmlWalker.hxx>
#include <o3tl/make_unique.hxx>
diff --git a/tools/source/xml/XmlWriter.cxx b/tools/source/xml/XmlWriter.cxx
index 58c4a26f2cb5..f7b288d835f9 100644
--- a/tools/source/xml/XmlWriter.cxx
+++ b/tools/source/xml/XmlWriter.cxx
@@ -7,6 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <tools/stream.hxx>
#include <tools/XmlWriter.hxx>
#include <o3tl/make_unique.hxx>
diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx
index a17c81f2ca8a..8b4782730784 100644
--- a/unotools/source/i18n/localedatawrapper.cxx
+++ b/unotools/source/i18n/localedatawrapper.cxx
@@ -26,6 +26,7 @@
#include <unotools/calendarwrapper.hxx>
#include <unotools/digitgroupingiterator.hxx>
#include <tools/debug.hxx>
+#include <tools/solar.h>
#include <i18nlangtag/languagetag.hxx>
#include <com/sun/star/i18n/KNumberFormatUsage.hpp>
diff --git a/unotools/source/misc/datetime.cxx b/unotools/source/misc/datetime.cxx
index b2b25d6df1b5..3a56465fbae3 100644
--- a/unotools/source/misc/datetime.cxx
+++ b/unotools/source/misc/datetime.cxx
@@ -24,6 +24,7 @@
#include <rtl/ustrbuf.hxx>
#include <rtl/math.hxx>
#include <osl/diagnose.h>
+#include <sstream>
namespace
{