include/IwyuFilter_include.yaml                 |    3 +++
 include/tools/GenericTypeSerializer.hxx         |   12 ++++++++----
 include/tools/datetimeutils.hxx                 |    7 ++++++-
 include/tools/globname.hxx                      |    5 ++++-
 include/tools/poly.hxx                          |    4 +++-
 sfx2/source/doc/oleprops.cxx                    |    2 ++
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx        |    2 ++
 sw/source/uibase/config/modcfg.cxx              |    2 ++
 tools/qa/cppunit/test_GenericTypeSerializer.cxx |    1 +
 tools/qa/cppunit/test_poly.cxx                  |    1 +
 tools/source/datetime/datetimeutils.cxx         |    1 +
 tools/source/ref/globname.cxx                   |    2 ++
 tools/source/stream/GenericTypeSerializer.cxx   |    4 ++++
 vcl/source/filter/bmp/BmpReader.cxx             |    1 +
 vcl/source/filter/svm/SvmWriter.cxx             |    1 +
 vcl/source/gdi/TypeSerializer.cxx               |    2 ++
 vcl/source/treelist/imap.cxx                    |    1 +
 writerperfect/inc/WPXSvInputStream.hxx          |    2 ++
 18 files changed, 46 insertions(+), 7 deletions(-)

New commits:
commit c511c654344ad8fdde7321e525c1273e4913ee8c
Author:     Gabor Kelemen <[email protected]>
AuthorDate: Sat Jan 24 00:23:41 2026 +0100
Commit:     Gabor Kelemen <[email protected]>
CommitDate: Sun Feb 1 09:23:01 2026 +0100

    tdf#146619 Use more forward declarations in include/tools
    
    Change-Id: Iab2938f82a9fd7ef3334d69c4fd07a9d963a9e24
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198237
    Tested-by: Jenkins
    Reviewed-by: Gabor Kelemen <[email protected]>

diff --git a/include/IwyuFilter_include.yaml b/include/IwyuFilter_include.yaml
index 5448cc31cf35..43d45de66879 100644
--- a/include/IwyuFilter_include.yaml
+++ b/include/IwyuFilter_include.yaml
@@ -305,6 +305,9 @@ excludelist:
     include/tools/simdsupport.hxx:
     # Needed for CPU intrinsics detection to work
     - emmintrin.h
+    include/tools/XmlWriter.hxx:
+    # Not to be confused with std <concepts>
+    - o3tl/concepts.hxx
     include/unotest/bootstrapfixturebase.hxx:
     # These are used in virtually all test files, too much work to move them 
everywhere
     - cppunit/TestAssert.h
diff --git a/include/tools/GenericTypeSerializer.hxx 
b/include/tools/GenericTypeSerializer.hxx
index f67d92c845c5..04c478fbc89b 100644
--- a/include/tools/GenericTypeSerializer.hxx
+++ b/include/tools/GenericTypeSerializer.hxx
@@ -20,13 +20,17 @@
 #define INCLUDED_TOOLS_GENERICTYPESERIALIZER_HXX
 
 #include <tools/toolsdllapi.h>
-#include <tools/color.hxx>
-#include <tools/gen.hxx>
-#include <tools/stream.hxx>
-#include <tools/fract.hxx>
+
+class Color;
+class Fraction;
+class Point;
+class Size;
+class SvStream;
 
 namespace tools
 {
+class Rectangle;
+
 class TOOLS_DLLPUBLIC GenericTypeSerializer
 {
 public:
diff --git a/include/tools/datetimeutils.hxx b/include/tools/datetimeutils.hxx
index deb7d7ee4f4c..4bdabceb412a 100644
--- a/include/tools/datetimeutils.hxx
+++ b/include/tools/datetimeutils.hxx
@@ -10,7 +10,12 @@
 #ifndef INCLUDED_TOOLS_DATETIMEUTILS_HXX
 #define INCLUDED_TOOLS_DATETIMEUTILS_HXX
 
-#include <tools/datetime.hxx>
+//#include <tools/datetime.hxx>
+#include <rtl/ustring.hxx>
+#include <tools/toolsdllapi.h>
+
+class Date;
+class DateTime;
 
 // This function converts a 'DateTime' object to an 'OString' object
 TOOLS_DLLPUBLIC OString DateTimeToOString(const DateTime& rDateTime);
diff --git a/include/tools/globname.hxx b/include/tools/globname.hxx
index 9d0bde090315..c2b13d4805eb 100644
--- a/include/tools/globname.hxx
+++ b/include/tools/globname.hxx
@@ -20,7 +20,10 @@
 #define INCLUDED_TOOLS_GLOBNAME_HXX
 
 #include <tools/toolsdllapi.h>
-#include <com/sun/star/uno/Sequence.hxx>
+
+#include <rtl/ustring.hxx>
+
+namespace com::sun::star::uno { template <class E> class Sequence; }
 
 struct SAL_WARN_UNUSED SvGUID
 {
diff --git a/include/tools/poly.hxx b/include/tools/poly.hxx
index 8d9fbeea8e8c..46284c136be8 100644
--- a/include/tools/poly.hxx
+++ b/include/tools/poly.hxx
@@ -21,8 +21,8 @@
 
 #include <rtl/ustring.hxx>
 #include <tools/toolsdllapi.h>
-#include <tools/gen.hxx>
 #include <tools/degree.hxx>
+#include <tools/long.hxx>
 #include <o3tl/typed_flags_set.hxx>
 #include <o3tl/cow_wrapper.hxx>
 
@@ -57,8 +57,10 @@ enum class PolyFlags : sal_uInt8
     Symmetric // smooth and symmetrical transition between curves
 };
 
+class Point;
 class SvStream;
 class ImplPolygon;
+namespace tools { class Rectangle; }
 struct ImplPolyPolygon;
 
 namespace basegfx
diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx
index 09ab312a5652..b7716aa7c0e1 100644
--- a/sfx2/source/doc/oleprops.cxx
+++ b/sfx2/source/doc/oleprops.cxx
@@ -27,6 +27,8 @@
 #include <sal/log.hxx>
 #include <utility>
 
+#include <com/sun/star/uno/Sequence.hxx>
+
 
 #define STREAM_BUFFER_SIZE 2048
 
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx 
b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 05353b3a3a2c..c31961af4cb0 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -57,6 +57,8 @@
 
 #include <o3tl/cppunittraitshelper.hxx>
 #include <tools/datetimeutils.hxx>
+#include <tools/datetime.hxx>
+#include <tools/time.hxx>
 #include <officecfg/Office/Common.hxx>
 #include <oox/drawingml/drawingmltypes.hxx>
 #include <unotools/streamwrap.hxx>
diff --git a/sw/source/uibase/config/modcfg.cxx 
b/sw/source/uibase/config/modcfg.cxx
index b8d166b68fb1..446c393819c7 100644
--- a/sw/source/uibase/config/modcfg.cxx
+++ b/sw/source/uibase/config/modcfg.cxx
@@ -34,6 +34,8 @@
 #include <modcfg.hxx>
 #include <caption.hxx>
 
+#include <com/sun/star/uno/Sequence.hxx>
+
 using namespace com::sun::star::uno;
 
 #define GLOB_NAME_CALC      0
diff --git a/tools/qa/cppunit/test_GenericTypeSerializer.cxx 
b/tools/qa/cppunit/test_GenericTypeSerializer.cxx
index d378dd7c304d..a1fd7784a985 100644
--- a/tools/qa/cppunit/test_GenericTypeSerializer.cxx
+++ b/tools/qa/cppunit/test_GenericTypeSerializer.cxx
@@ -23,6 +23,7 @@
 #include <cppunit/extensions/HelperMacros.h>
 
 #include <tools/GenericTypeSerializer.hxx>
+#include <tools/fract.hxx>
 #include <tools/stream.hxx>
 #include <tools/gen.hxx>
 
diff --git a/tools/qa/cppunit/test_poly.cxx b/tools/qa/cppunit/test_poly.cxx
index f966f5317a48..e30ad7409708 100644
--- a/tools/qa/cppunit/test_poly.cxx
+++ b/tools/qa/cppunit/test_poly.cxx
@@ -11,6 +11,7 @@
 #include <cppunit/TestFixture.h>
 #include <cppunit/extensions/HelperMacros.h>
 
+#include <tools/gen.hxx>
 #include <tools/poly.hxx>
 
 namespace
diff --git a/tools/source/datetime/datetimeutils.cxx 
b/tools/source/datetime/datetimeutils.cxx
index 345e18f4a721..50a073fe4807 100644
--- a/tools/source/datetime/datetimeutils.cxx
+++ b/tools/source/datetime/datetimeutils.cxx
@@ -8,6 +8,7 @@
  */
 
 #include <tools/datetimeutils.hxx>
+#include <tools/datetime.hxx>
 #include <rtl/strbuf.hxx>
 #include <rtl/ustrbuf.hxx>
 
diff --git a/tools/source/ref/globname.cxx b/tools/source/ref/globname.cxx
index 4ae220659e3c..dbe015d1d069 100644
--- a/tools/source/ref/globname.cxx
+++ b/tools/source/ref/globname.cxx
@@ -26,6 +26,8 @@
 #include <tools/stream.hxx>
 #include <tools/globname.hxx>
 
+#include <com/sun/star/uno/Sequence.hxx>
+
 // SvGlobalName 
----------------------------------------------------------------
 
 SvGlobalName::SvGlobalName( const css::uno::Sequence < sal_Int8 >& aSeq )
diff --git a/tools/source/stream/GenericTypeSerializer.cxx 
b/tools/source/stream/GenericTypeSerializer.cxx
index c946e310e6b5..4af31eee741f 100644
--- a/tools/source/stream/GenericTypeSerializer.cxx
+++ b/tools/source/stream/GenericTypeSerializer.cxx
@@ -20,6 +20,10 @@
 #include <tools/GenericTypeSerializer.hxx>
 #include <sal/config.h>
 #include <sal/log.hxx>
+#include <tools/color.hxx>
+#include <tools/fract.hxx>
+#include <tools/gen.hxx>
+#include <tools/stream.hxx>
 #include <vector>
 
 namespace tools
diff --git a/vcl/source/filter/bmp/BmpReader.cxx 
b/vcl/source/filter/bmp/BmpReader.cxx
index 3d2b6a463c46..fdf5253e78f8 100644
--- a/vcl/source/filter/bmp/BmpReader.cxx
+++ b/vcl/source/filter/bmp/BmpReader.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <filter/BmpReader.hxx>
+#include <tools/stream.hxx>
 #include <vcl/TypeSerializer.hxx>
 
 bool BmpReader(SvStream& rStream, Graphic& rGraphic)
diff --git a/vcl/source/filter/svm/SvmWriter.cxx 
b/vcl/source/filter/svm/SvmWriter.cxx
index 647d30893a54..b6f3cee62138 100644
--- a/vcl/source/filter/svm/SvmWriter.cxx
+++ b/vcl/source/filter/svm/SvmWriter.cxx
@@ -24,6 +24,7 @@
 #include <vcl/metaactiontypes.hxx>
 #include <rtl/crc.h>
 #include <tools/solar.h>
+#include <tools/stream.hxx>
 #include <tools/vcompat.hxx>
 
 #include <osl/thread.h>
diff --git a/vcl/source/gdi/TypeSerializer.cxx 
b/vcl/source/gdi/TypeSerializer.cxx
index f366cebdf5c6..a8e7b17a5332 100644
--- a/vcl/source/gdi/TypeSerializer.cxx
+++ b/vcl/source/gdi/TypeSerializer.cxx
@@ -20,9 +20,11 @@
 #include <vcl/TypeSerializer.hxx>
 #include <vcl/animate/Animation.hxx>
 #include <vcl/BinaryDataContainer.hxx>
+#include <tools/color.hxx>
 #include <tools/mapunit.hxx>
 #include <tools/vcompat.hxx>
 #include <tools/fract.hxx>
+#include <tools/stream.hxx>
 #include <sal/log.hxx>
 #include <comphelper/fileformat.h>
 #include <vcl/filter/SvmReader.hxx>
diff --git a/vcl/source/treelist/imap.cxx b/vcl/source/treelist/imap.cxx
index 3d604110b5b1..dcd09942b861 100644
--- a/vcl/source/treelist/imap.cxx
+++ b/vcl/source/treelist/imap.cxx
@@ -22,6 +22,7 @@
 #include <tools/fract.hxx>
 #include <tools/GenericTypeSerializer.hxx>
 #include <tools/mapunit.hxx>
+#include <tools/stream.hxx>
 #include <utility>
 #include <vcl/outdev.hxx>
 #include <vcl/svapp.hxx>
diff --git a/writerperfect/inc/WPXSvInputStream.hxx 
b/writerperfect/inc/WPXSvInputStream.hxx
index b7e6a7a04484..6edfa68b00bc 100644
--- a/writerperfect/inc/WPXSvInputStream.hxx
+++ b/writerperfect/inc/WPXSvInputStream.hxx
@@ -17,6 +17,8 @@
 #include <tools/stream.hxx>
 #include <sot/storage.hxx>
 
+#include <com/sun/star/uno/Sequence.hxx>
+
 namespace com::sun::star::io
 {
 class XInputStream;

Reply via email to