o3tl/IwyuFilter_o3tl.yaml                                   |    2 +
 o3tl/qa/cow_wrapper_clients.hxx                             |    2 -
 o3tl/qa/test-enumarray.cxx                                  |    2 -
 o3tl/qa/test-lru_map.cxx                                    |    1 
 o3tl/qa/test-string_view.cxx                                |    2 -
 o3tl/qa/test-vector_pool.cxx                                |    1 
 oox/IwyuFilter_oox.yaml                                     |    9 ++++
 oox/inc/drawingml/chart/datasourcecontext.hxx               |    1 
 oox/inc/drawingml/textliststyle.hxx                         |    1 
 oox/source/core/fragmenthandler2.cxx                        |    1 
 oox/source/docprop/ooxmldocpropimport.cxx                   |    1 
 oox/source/drawingml/chart/seriesconverter.cxx              |    1 
 oox/source/drawingml/chart/titleconverter.cxx               |    1 
 oox/source/drawingml/chart/typegroupconverter.cxx           |    1 
 oox/source/drawingml/drawingmltypes.cxx                     |    1 
 oox/source/drawingml/lineproperties.cxx                     |    1 
 oox/source/drawingml/shape.cxx                              |    7 +--
 oox/source/drawingml/table/tableproperties.cxx              |    2 -
 oox/source/drawingml/textcharacterpropertiescontext.cxx     |    1 
 oox/source/drawingml/textparagraphpropertiescontext.cxx     |    2 -
 oox/source/export/chartexport.cxx                           |    1 
 oox/source/export/drawingml.cxx                             |    2 -
 oox/source/export/shapes.cxx                                |    2 -
 oox/source/helper/binarystreambase.cxx                      |    1 
 oox/source/helper/graphichelper.cxx                         |    5 --
 oox/source/ppt/pptshape.cxx                                 |    1 
 oox/source/ppt/presPropsfragmenthandler.cxx                 |    1 
 oox/source/ppt/slidetransition.cxx                          |    1 
 oox/source/shape/ShapeContextHandler.cxx                    |    2 -
 oox/source/vml/vmlformatting.cxx                            |    1 
 oox/source/vml/vmlshape.cxx                                 |    2 -
 opencl/inc/opencl_device.hxx                                |    2 -
 opencl/source/openclconfig.cxx                              |    2 -
 package/IwyuFilter_package.yaml                             |   24 ++++++++++++
 package/inc/ByteChucker.hxx                                 |    5 --
 package/inc/ByteGrabber.hxx                                 |    5 --
 package/inc/CRC32.hxx                                       |    2 -
 package/inc/PackageConstants.hxx                            |    1 
 package/inc/ThreadedDeflater.hxx                            |    2 -
 package/inc/ZipFile.hxx                                     |    6 ---
 package/inc/ZipPackage.hxx                                  |    3 -
 package/inc/ZipPackageEntry.hxx                             |    1 
 package/inc/ZipPackageStream.hxx                            |    1 
 package/inc/zipfileaccess.hxx                               |    4 --
 package/source/manifest/ManifestDefines.hxx                 |    2 -
 package/source/manifest/ManifestExport.cxx                  |    3 -
 package/source/manifest/ManifestExport.hxx                  |    1 
 package/source/manifest/ManifestImport.cxx                  |    2 -
 package/source/manifest/ManifestImport.hxx                  |    3 -
 package/source/manifest/ManifestReader.cxx                  |    4 --
 package/source/manifest/ManifestReader.hxx                  |    1 
 package/source/manifest/ManifestWriter.cxx                  |    5 --
 package/source/manifest/ManifestWriter.hxx                  |    1 
 package/source/xstor/ocompinstream.cxx                      |    1 
 package/source/xstor/ocompinstream.hxx                      |    2 -
 package/source/xstor/owriteablestream.cxx                   |    3 -
 package/source/xstor/owriteablestream.hxx                   |    3 -
 package/source/xstor/selfterminatefilestream.hxx            |    1 
 package/source/xstor/switchpersistencestream.hxx            |    5 --
 package/source/xstor/xfactory.cxx                           |    2 -
 package/source/xstor/xfactory.hxx                           |    1 
 package/source/xstor/xstorage.cxx                           |    3 -
 package/source/xstor/xstorage.hxx                           |    5 --
 package/source/zipapi/ByteChucker.cxx                       |    2 -
 package/source/zipapi/ByteGrabber.cxx                       |    2 +
 package/source/zipapi/MemoryByteGrabber.hxx                 |    4 --
 package/source/zipapi/XBufferedThreadedStream.cxx           |    3 -
 package/source/zipapi/XBufferedThreadedStream.hxx           |    7 ++-
 package/source/zipapi/XUnbufferedStream.cxx                 |    2 -
 package/source/zipapi/XUnbufferedStream.hxx                 |    2 -
 package/source/zipapi/ZipFile.cxx                           |   13 +++---
 package/source/zipapi/ZipOutputEntry.cxx                    |    3 -
 package/source/zipapi/ZipOutputStream.cxx                   |    3 -
 package/source/zippackage/ZipPackage.cxx                    |   12 +-----
 package/source/zippackage/ZipPackageEntry.cxx               |    1 
 package/source/zippackage/ZipPackageFolder.cxx              |    8 +---
 package/source/zippackage/ZipPackageStream.cxx              |   10 ++---
 package/source/zippackage/zipfileaccess.cxx                 |    2 -
 pyuno/IwyuFilter_pyuno.yaml                                 |    2 +
 remotebridges/source/unourl_resolver/unourl_resolver.cxx    |    2 -
 reportdesign/inc/helpids.h                                  |    2 +
 reportdesign/inc/stringarray.hrc                            |    2 +
 reportdesign/source/core/api/ReportDefinition.cxx           |    1 
 reportdesign/source/core/api/ReportEngineJFree.cxx          |    1 
 reportdesign/source/core/api/Shape.cxx                      |    2 -
 reportdesign/source/core/sdr/ReportDrawPage.cxx             |    2 -
 reportdesign/source/core/sdr/RptPage.cxx                    |    1 
 reportdesign/source/filter/xml/xmlColumn.cxx                |    1 
 reportdesign/source/filter/xml/xmlComponent.cxx             |    1 
 reportdesign/source/filter/xml/xmlCondPrtExpr.cxx           |    1 
 reportdesign/source/filter/xml/xmlControlProperty.cxx       |    1 
 reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx |    1 
 reportdesign/source/filter/xml/xmlFormatCondition.cxx       |    1 
 reportdesign/source/filter/xml/xmlFormattedField.cxx        |    1 
 reportdesign/source/filter/xml/xmlFunction.cxx              |    1 
 reportdesign/source/filter/xml/xmlGroup.cxx                 |    1 
 reportdesign/source/filter/xml/xmlHelper.cxx                |    1 
 reportdesign/source/filter/xml/xmlMasterFields.cxx          |    1 
 reportdesign/source/filter/xml/xmlReportElement.cxx         |    1 
 reportdesign/source/filter/xml/xmlReportElementBase.cxx     |    3 -
 reportdesign/source/filter/xml/xmlSection.cxx               |    2 -
 reportdesign/source/filter/xml/xmlTable.cxx                 |    1 
 reportdesign/source/ui/misc/FunctionHelper.cxx              |    1 
 reportdesign/source/ui/misc/RptUndo.cxx                     |    1 
 reportdesign/source/ui/report/ReportSection.cxx             |    2 -
 reportdesign/source/ui/report/StartMarker.cxx               |    1 
 reportdesign/source/ui/report/ViewsWindow.cxx               |    1 
 reportdesign/source/ui/report/dlgedfac.cxx                  |    1 
 108 files changed, 83 insertions(+), 196 deletions(-)

New commits:
commit 7b5193e2ae9eceba881163787b98c90f2310056d
Author:     Gabor Kelemen <kelem...@ubuntu.com>
AuthorDate: Mon Jan 24 00:17:20 2022 +0100
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Sun Jan 30 16:10:57 2022 +0100

    Recheck modules [o-r]* with IWYU
    
    See tdf#42949 for motivation
    
    Change-Id: I6b4b05a5e59b256653c4caf5297fffd601b45083
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128845
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>

diff --git a/o3tl/IwyuFilter_o3tl.yaml b/o3tl/IwyuFilter_o3tl.yaml
new file mode 100644
index 000000000000..15a5a2a0d26c
--- /dev/null
+++ b/o3tl/IwyuFilter_o3tl.yaml
@@ -0,0 +1,2 @@
+---
+assumeFilename: o3tl/qa/test-cow_wrapper.cxx
diff --git a/o3tl/qa/cow_wrapper_clients.hxx b/o3tl/qa/cow_wrapper_clients.hxx
index 36d77553b178..d0e416c96318 100644
--- a/o3tl/qa/cow_wrapper_clients.hxx
+++ b/o3tl/qa/cow_wrapper_clients.hxx
@@ -21,8 +21,8 @@
 #define INCLUDED_O3TL_QA_COW_WRAPPER_CLIENTS_HXX
 
 #include <o3tl/cow_wrapper.hxx>
-#include <cppunit/extensions/HelperMacros.h>
 #include <assert.h>
+#include <iostream>
 
 /* Definition of Cow_Wrapper_Clients classes */
 
diff --git a/o3tl/qa/test-enumarray.cxx b/o3tl/qa/test-enumarray.cxx
index 9da8dae18f0b..f54a92394195 100644
--- a/o3tl/qa/test-enumarray.cxx
+++ b/o3tl/qa/test-enumarray.cxx
@@ -9,8 +9,6 @@
 
 #include <sal/config.h>
 
-#include <stdexcept>
-
 #include <cppunit/TestAssert.h>
 #include <cppunit/TestFixture.h>
 #include <cppunit/extensions/HelperMacros.h>
diff --git a/o3tl/qa/test-lru_map.cxx b/o3tl/qa/test-lru_map.cxx
index aac8a3e25283..e749e7bd85ec 100644
--- a/o3tl/qa/test-lru_map.cxx
+++ b/o3tl/qa/test-lru_map.cxx
@@ -8,7 +8,6 @@
  *
  */
 
-#include <sal/types.h>
 #include <cppunit/TestAssert.h>
 #include <cppunit/TestFixture.h>
 #include <cppunit/extensions/HelperMacros.h>
diff --git a/o3tl/qa/test-string_view.cxx b/o3tl/qa/test-string_view.cxx
index 80f757529eee..b400c9605962 100644
--- a/o3tl/qa/test-string_view.cxx
+++ b/o3tl/qa/test-string_view.cxx
@@ -7,10 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include <config_options.h>
 #include <sal/config.h>
 
-#include <iostream>
 #include <string_view>
 
 #include <cppunit/TestAssert.h>
diff --git a/o3tl/qa/test-vector_pool.cxx b/o3tl/qa/test-vector_pool.cxx
index 78975e4d5dc0..6e739ebcd18f 100644
--- a/o3tl/qa/test-vector_pool.cxx
+++ b/o3tl/qa/test-vector_pool.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <sal/types.h>
 #include <cppunit/TestAssert.h>
 #include <cppunit/TestFixture.h>
 #include <cppunit/extensions/HelperMacros.h>
diff --git a/oox/IwyuFilter_oox.yaml b/oox/IwyuFilter_oox.yaml
index d652ce192592..73ee5e144247 100644
--- a/oox/IwyuFilter_oox.yaml
+++ b/oox/IwyuFilter_oox.yaml
@@ -7,6 +7,9 @@ excludelist:
     oox/source/core/filterbase.cxx:
     # Actually used
     - comphelper/scopeguard.hxx
+    oox/source/core/contexthandler2.cxx:
+    # Needed for template
+    - com/sun/star/frame/XModel.hpp
     oox/source/core/fragmenthandler2.cxx:
     # Needed for template
     - com/sun/star/frame/XModel.hpp
@@ -76,6 +79,12 @@ excludelist:
     oox/source/drawingml/diagram/diagram.cxx:
     # Actually used
     - com/sun/star/xml/dom/XDocument.hpp
+    oox/source/export/drawingml.cxx:
+    # Needed for template
+    - com/sun/star/text/XTextFrame.hpp
+    oox/source/export/vmlexport.cxx:
+    # Needed for template
+    - com/sun/star/text/XTextFrame.hpp
     oox/source/helper/binarystreambase.cxx:
     # Actually used
     - com/sun/star/io/XSeekable.hpp
diff --git a/oox/inc/drawingml/chart/datasourcecontext.hxx 
b/oox/inc/drawingml/chart/datasourcecontext.hxx
index ec64c4768180..7edb029eb336 100644
--- a/oox/inc/drawingml/chart/datasourcecontext.hxx
+++ b/oox/inc/drawingml/chart/datasourcecontext.hxx
@@ -22,7 +22,6 @@
 
 #include <memory>
 #include <drawingml/chart/chartcontextbase.hxx>
-#include <svl/zforlist.hxx>
 
 class SvNumberFormatter;
 
diff --git a/oox/inc/drawingml/textliststyle.hxx 
b/oox/inc/drawingml/textliststyle.hxx
index 5f986ff45afa..464e48756165 100644
--- a/oox/inc/drawingml/textliststyle.hxx
+++ b/oox/inc/drawingml/textliststyle.hxx
@@ -22,7 +22,6 @@
 
 #include <drawingml/textparagraphproperties.hxx>
 #include <array>
-#include <memory>
 
 namespace oox::drawingml
 {
diff --git a/oox/source/core/fragmenthandler2.cxx 
b/oox/source/core/fragmenthandler2.cxx
index 3ee410fad854..e4eeef076f41 100644
--- a/oox/source/core/fragmenthandler2.cxx
+++ b/oox/source/core/fragmenthandler2.cxx
@@ -24,7 +24,6 @@
 #include <oox/core/xmlfilterbase.hxx>
 #include <oox/helper/attributelist.hxx>
 #include <oox/token/namespaces.hxx>
-#include <oox/token/tokens.hxx>
 
 namespace oox::core {
 
diff --git a/oox/source/docprop/ooxmldocpropimport.cxx 
b/oox/source/docprop/ooxmldocpropimport.cxx
index 30c058e209a4..f58476c5688f 100644
--- a/oox/source/docprop/ooxmldocpropimport.cxx
+++ b/oox/source/docprop/ooxmldocpropimport.cxx
@@ -29,7 +29,6 @@
 #include <com/sun/star/xml/sax/InputSource.hpp>
 #include <oox/core/fastparser.hxx>
 #include <oox/core/relations.hxx>
-#include <oox/helper/containerhelper.hxx>
 #include "docprophandler.hxx"
 
 #include <comphelper/sequence.hxx>
diff --git a/oox/source/drawingml/chart/seriesconverter.cxx 
b/oox/source/drawingml/chart/seriesconverter.cxx
index d4fa267da536..72253723f91c 100644
--- a/oox/source/drawingml/chart/seriesconverter.cxx
+++ b/oox/source/drawingml/chart/seriesconverter.cxx
@@ -45,7 +45,6 @@
 #include <drawingml/chart/typegroupmodel.hxx>
 #include <drawingml/fillproperties.hxx>
 #include <oox/core/xmlfilterbase.hxx>
-#include <oox/helper/containerhelper.hxx>
 #include <oox/helper/modelobjecthelper.hxx>
 #include <oox/token/properties.hxx>
 #include <oox/token/tokens.hxx>
diff --git a/oox/source/drawingml/chart/titleconverter.cxx 
b/oox/source/drawingml/chart/titleconverter.cxx
index 0faf8aa5f79e..113c7fea7a9e 100644
--- a/oox/source/drawingml/chart/titleconverter.cxx
+++ b/oox/source/drawingml/chart/titleconverter.cxx
@@ -36,7 +36,6 @@
 #include <drawingml/textparagraph.hxx>
 #include <drawingml/chart/datasourceconverter.hxx>
 #include <drawingml/chart/titlemodel.hxx>
-#include <oox/helper/containerhelper.hxx>
 #include <oox/token/properties.hxx>
 #include <oox/token/tokens.hxx>
 #include <com/sun/star/chart2/RelativePosition.hpp>
diff --git a/oox/source/drawingml/chart/typegroupconverter.cxx 
b/oox/source/drawingml/chart/typegroupconverter.cxx
index 36c035efcc60..e8d8bb47bc33 100644
--- a/oox/source/drawingml/chart/typegroupconverter.cxx
+++ b/oox/source/drawingml/chart/typegroupconverter.cxx
@@ -41,7 +41,6 @@
 #include <drawingml/chart/seriesconverter.hxx>
 #include <drawingml/chart/typegroupmodel.hxx>
 #include <oox/core/xmlfilterbase.hxx>
-#include <oox/helper/containerhelper.hxx>
 #include <oox/token/namespaces.hxx>
 #include <oox/token/properties.hxx>
 #include <oox/token/tokens.hxx>
diff --git a/oox/source/drawingml/drawingmltypes.cxx 
b/oox/source/drawingml/drawingmltypes.cxx
index 3a94a449f317..6ce901ab1ef9 100644
--- a/oox/source/drawingml/drawingmltypes.cxx
+++ b/oox/source/drawingml/drawingmltypes.cxx
@@ -23,7 +23,6 @@
 #include <com/sun/star/drawing/Hatch.hpp>
 #include <com/sun/star/style/CaseMap.hpp>
 #include <com/sun/star/xml/sax/XFastAttributeList.hpp>
-#include <o3tl/safeint.hxx>
 #include <osl/diagnose.h>
 #include <sax/tools/converter.hxx>
 #include <oox/token/tokens.hxx>
diff --git a/oox/source/drawingml/lineproperties.cxx 
b/oox/source/drawingml/lineproperties.cxx
index dedde505e61a..2d10e82871ab 100644
--- a/oox/source/drawingml/lineproperties.cxx
+++ b/oox/source/drawingml/lineproperties.cxx
@@ -31,7 +31,6 @@
 #include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
 #include <oox/drawingml/drawingmltypes.hxx>
 #include <oox/drawingml/shapepropertymap.hxx>
-#include <oox/helper/containerhelper.hxx>
 #include <oox/helper/graphichelper.hxx>
 #include <oox/token/tokens.hxx>
 
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 3fbdc37933c8..f7161e01291f 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -59,8 +59,8 @@
 #include <tools/gen.hxx>
 #include <tools/globname.hxx>
 #include <tools/mapunit.hxx>
-#include <tools/UnitConversion.hxx>
 #include <editeng/unoprnms.hxx>
+#include <com/sun/star/awt/FontSlant.hpp>
 #include <com/sun/star/awt/Size.hpp>
 #include <com/sun/star/awt/XBitmap.hpp>
 #include <com/sun/star/awt/FontWeight.hpp>
@@ -75,6 +75,7 @@
 #include <com/sun/star/drawing/GraphicExportFilter.hpp>
 #include <com/sun/star/drawing/XShapes.hpp>
 #include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
+#include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp>
 #include <com/sun/star/drawing/EnhancedCustomShapeTextPathMode.hpp>
 #include <com/sun/star/embed/XEmbeddedObject.hpp>
 #include <com/sun/star/text/XText.hpp>
@@ -87,10 +88,10 @@
 #include <basegfx/point/b2dpoint.hxx>
 #include <basegfx/polygon/b2dpolygon.hxx>
 #include <basegfx/matrix/b2dhommatrix.hxx>
-#include <basegfx/matrix/b2dhommatrixtools.hxx>
 #include <com/sun/star/document/XActionLockable.hpp>
 #include <com/sun/star/chart2/data/XDataReceiver.hpp>
 #include <com/sun/star/text/GraphicCrop.hpp>
+#include <svx/svdobj.hxx>
 #include <svx/svdtrans.hxx>
 #include <tools/stream.hxx>
 #include <unotools/streamwrap.hxx>
@@ -100,8 +101,6 @@
 #include <vcl/svapp.hxx>
 #include <vcl/wmfexternal.hxx>
 #include <sal/log.hxx>
-#include <svx/unoapi.hxx>
-#include <svx/unoshape.hxx>
 #include <svx/sdtaitm.hxx>
 
 using namespace ::oox::core;
diff --git a/oox/source/drawingml/table/tableproperties.cxx 
b/oox/source/drawingml/table/tableproperties.cxx
index 1622b8fc22ca..07f670df1976 100644
--- a/oox/source/drawingml/table/tableproperties.cxx
+++ b/oox/source/drawingml/table/tableproperties.cxx
@@ -19,8 +19,6 @@
 
 #include <drawingml/table/tableproperties.hxx>
 #include <drawingml/table/tablestylelist.hxx>
-#include <drawingml/textbody.hxx>
-#include <drawingml/textparagraph.hxx>
 #include <oox/drawingml/drawingmltypes.hxx>
 #include <com/sun/star/table/XTable.hpp>
 #include <com/sun/star/table/XMergeableCellRange.hpp>
diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx 
b/oox/source/drawingml/textcharacterpropertiescontext.cxx
index 31ad3bee7c9f..5ec22d45e2a4 100644
--- a/oox/source/drawingml/textcharacterpropertiescontext.cxx
+++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx
@@ -29,7 +29,6 @@
 #include <oox/token/namespaces.hxx>
 #include <oox/token/tokens.hxx>
 #include <sax/fastattribs.hxx>
-#include <sax/fastparser.hxx>
 
 #include <sal/log.hxx>
 
diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx 
b/oox/source/drawingml/textparagraphpropertiescontext.cxx
index e7e77da8564f..20810ce1b5c8 100644
--- a/oox/source/drawingml/textparagraphpropertiescontext.cxx
+++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx
@@ -26,7 +26,6 @@
 #include <com/sun/star/awt/Size.hpp>
 #include <com/sun/star/uno/Reference.hxx>
 
-#include <svx/unopage.hxx>
 #include <sal/log.hxx>
 #include <tools/diagnose_ex.h>
 #include <tools/UnitConversion.hxx>
@@ -41,7 +40,6 @@
 #include <oox/token/namespaces.hxx>
 #include <oox/token/properties.hxx>
 #include <oox/token/tokens.hxx>
-#include <tools/helpers.hxx>
 
 using namespace ::oox::core;
 using namespace ::com::sun::star::uno;
diff --git a/oox/source/export/chartexport.cxx 
b/oox/source/export/chartexport.cxx
index 491211bd1999..8dd99152aadf 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -98,7 +98,6 @@
 #include "ColorPropertySet.hxx"
 
 #include <svl/numformat.hxx>
-#include <svl/zforlist.hxx>
 #include <svl/numuno.hxx>
 #include <tools/diagnose_ex.h>
 #include <sal/log.hxx>
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 55cea6049c83..cdc026375d10 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -107,7 +107,6 @@
 #include <comphelper/xmltools.hxx>
 #include <o3tl/any.hxx>
 #include <o3tl/safeint.hxx>
-#include <o3tl/unit_conversion.hxx>
 #include <tools/stream.hxx>
 #include <unotools/fontdefs.hxx>
 #include <vcl/cvtgrf.hxx>
@@ -124,7 +123,6 @@
 #include <editeng/escapementitem.hxx>
 #include <svx/svdoashp.hxx>
 #include <svx/svdomedia.hxx>
-#include <svx/unoapi.hxx>
 #include <svx/unoshape.hxx>
 #include <svx/EnhancedCustomShape2d.hxx>
 #include <drawingml/presetgeometrynames.hxx>
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 54c6a58299e9..2617e3c76d1b 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -62,7 +62,6 @@
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include <com/sun/star/drawing/XDrawPages.hpp>
 #include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
-#include <com/sun/star/document/XEventsSupplier.hpp>
 #include <com/sun/star/presentation/ClickAction.hpp>
 #include <tools/globname.hxx>
 #include <comphelper/classids.hxx>
@@ -76,7 +75,6 @@
 #include <svx/svdoashp.hxx>
 #include <svx/svdoole2.hxx>
 #include <tools/diagnose_ex.h>
-#include <svx/unoapi.hxx>
 #include <oox/export/chartexport.hxx>
 #include <oox/mathml/export.hxx>
 #include <basegfx/numeric/ftools.hxx>
diff --git a/oox/source/helper/binarystreambase.cxx 
b/oox/source/helper/binarystreambase.cxx
index a75832fa475f..1e3ef11ae9ea 100644
--- a/oox/source/helper/binarystreambase.cxx
+++ b/oox/source/helper/binarystreambase.cxx
@@ -21,7 +21,6 @@
 #include <oox/helper/helper.hxx>
 
 #include <com/sun/star/io/XSeekable.hpp>
-#include <osl/diagnose.h>
 #include <tools/diagnose_ex.h>
 
 namespace oox {
diff --git a/oox/source/helper/graphichelper.cxx 
b/oox/source/helper/graphichelper.cxx
index 8ff8c7939f4f..f327d7eba943 100644
--- a/oox/source/helper/graphichelper.cxx
+++ b/oox/source/helper/graphichelper.cxx
@@ -21,12 +21,8 @@
 
 #include <com/sun/star/awt/Point.hpp>
 #include <com/sun/star/awt/Size.hpp>
-#include <com/sun/star/awt/XDevice.hpp>
-#include <com/sun/star/awt/XUnitConversion.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/frame/Desktop.hpp>
 #include <com/sun/star/graphic/GraphicProvider.hpp>
-#include <com/sun/star/util/MeasureUnit.hpp>
 #include <com/sun/star/graphic/GraphicMapper.hpp>
 #include <osl/diagnose.h>
 #include <sal/log.hxx>
@@ -37,7 +33,6 @@
 #include <vcl/outdev.hxx>
 #include <tools/gen.hxx>
 #include <tools/diagnose_ex.h>
-#include <comphelper/sequence.hxx>
 #include <oox/helper/containerhelper.hxx>
 #include <oox/helper/propertyset.hxx>
 #include <oox/token/properties.hxx>
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index b703f615d0cf..49aa9cae139f 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -22,7 +22,6 @@
 #include <drawingml/textbody.hxx>
 #include <drawingml/textparagraph.hxx>
 #include <drawingml/textfield.hxx>
-#include <drawingml/table/tableproperties.hxx>
 #include <editeng/flditem.hxx>
 
 #include <com/sun/star/text/XTextField.hpp>
diff --git a/oox/source/ppt/presPropsfragmenthandler.cxx 
b/oox/source/ppt/presPropsfragmenthandler.cxx
index 708f194853fb..4792d07c0d80 100644
--- a/oox/source/ppt/presPropsfragmenthandler.cxx
+++ b/oox/source/ppt/presPropsfragmenthandler.cxx
@@ -12,7 +12,6 @@
 #include <com/sun/star/presentation/XPresentationSupplier.hpp>
 #include <com/sun/star/presentation/XCustomPresentationSupplier.hpp>
 #include <com/sun/star/container/XNamed.hpp>
-#include <com/sun/star/container/XIndexContainer.hpp>
 #include <com/sun/star/drawing/XDrawPages.hpp>
 #include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
 
diff --git a/oox/source/ppt/slidetransition.cxx 
b/oox/source/ppt/slidetransition.cxx
index a5c756e62b59..3ec5100583c1 100644
--- a/oox/source/ppt/slidetransition.cxx
+++ b/oox/source/ppt/slidetransition.cxx
@@ -23,7 +23,6 @@
 #include <com/sun/star/animations/TransitionSubType.hpp>
 #include <com/sun/star/animations/XTransitionFilter.hpp>
 
-#include <osl/diagnose.h>
 #include <sal/log.hxx>
 #include <tools/color.hxx>
 #include <tools/diagnose_ex.h>
diff --git a/oox/source/shape/ShapeContextHandler.cxx 
b/oox/source/shape/ShapeContextHandler.cxx
index 3454c0e03f87..6eb9e5ce9083 100644
--- a/oox/source/shape/ShapeContextHandler.cxx
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -35,9 +35,7 @@
 #include <oox/token/tokens.hxx>
 #include <oox/drawingml/theme.hxx>
 #include <oox/drawingml/themefragmenthandler.hxx>
-#include <cppuhelper/supportsservice.hxx>
 #include <memory>
-#include <sal/log.hxx>
 
 using namespace ::com::sun::star;
 
diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index c7ff6796db21..5474f782aa64 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -20,7 +20,6 @@
 #include <sal/config.h>
 
 #include <cstdlib>
-#include <limits>
 
 #include <oox/vml/vmlformatting.hxx>
 
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 38b632be843b..f87cb12a6899 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -63,14 +63,12 @@
 #include <oox/core/xmlfilterbase.hxx>
 #include <oox/helper/containerhelper.hxx>
 #include <svx/EnhancedCustomShapeTypeNames.hxx>
-#include <svx/unoapi.hxx>
 #include <svx/sdtagitm.hxx>
 #include <svx/svdobj.hxx>
 #include <comphelper/sequence.hxx>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/propertyvalue.hxx>
 #include <comphelper/storagehelper.hxx>
-#include <comphelper/sequenceashashmap.hxx>
 
 using ::com::sun::star::beans::XPropertySet;
 using ::com::sun::star::uno::Any;
diff --git a/opencl/inc/opencl_device.hxx b/opencl/inc/opencl_device.hxx
index 036a06fb2736..e5bd62b7e3d9 100644
--- a/opencl/inc/opencl_device.hxx
+++ b/opencl/inc/opencl_device.hxx
@@ -14,8 +14,6 @@
 
 #include <string_view>
 
-#include <rtl/ustring.hxx>
-
 namespace openclwrapper
 {
 struct GPUEnv;
diff --git a/opencl/source/openclconfig.cxx b/opencl/source/openclconfig.cxx
index 9c4452c153d3..525ef84ced6f 100644
--- a/opencl/source/openclconfig.cxx
+++ b/opencl/source/openclconfig.cxx
@@ -9,8 +9,6 @@
 
 #include <sal/config.h>
 
-#include <string_view>
-
 #include <unicode/regex.h>
 
 #include <comphelper/configuration.hxx>
diff --git a/package/IwyuFilter_package.yaml b/package/IwyuFilter_package.yaml
new file mode 100644
index 000000000000..cd456c41cd1d
--- /dev/null
+++ b/package/IwyuFilter_package.yaml
@@ -0,0 +1,24 @@
+---
+assumeFilename: package/source/zippackage/ZipPackage.cxx
+excludelist:
+    package/source/manifest/ManifestExport.cxx:
+    # Actually used
+    - com/sun/star/beans/PropertyValue.hpp
+    package/source/manifest/ManifestImport.cxx:
+    # Actually used
+    - com/sun/star/xml/sax/XAttributeList.hpp
+    package/source/xstor/owriteablestream.cxx:
+    # Actually used
+    - com/sun/star/uno/XComponentContext.hpp
+    package/source/zippackage/ZipPackage.cxx:
+    # Actually used
+    - com/sun/star/beans/PropertyValue.hpp
+    package/source/zippackage/ZipPackageFolder.cxx:
+    # Actually used
+    - com/sun/star/beans/PropertyValue.hpp
+    package/source/zippackage/ZipPackageStream.cxx:
+    # Actually used
+    - com/sun/star/beans/PropertyValue.hpp
+    package/source/xstor/xstorage.cxx:
+    # Actually used
+    - com/sun/star/beans/PropertyValue.hpp
diff --git a/package/inc/ByteChucker.hxx b/package/inc/ByteChucker.hxx
index 156b41f6001a..707b678ff2a5 100644
--- a/package/inc/ByteChucker.hxx
+++ b/package/inc/ByteChucker.hxx
@@ -21,11 +21,6 @@
 
 #include <com/sun/star/uno/Sequence.h>
 #include <com/sun/star/uno/Reference.h>
-#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/uno/RuntimeException.hpp>
-#include <com/sun/star/lang/IllegalArgumentException.hpp>
 
 namespace com::sun::star {
     namespace io { class XSeekable; class XOutputStream; }
diff --git a/package/inc/ByteGrabber.hxx b/package/inc/ByteGrabber.hxx
index 2ccacc1705f1..ba1512cf5162 100644
--- a/package/inc/ByteGrabber.hxx
+++ b/package/inc/ByteGrabber.hxx
@@ -21,11 +21,6 @@
 
 #include <com/sun/star/uno/Sequence.h>
 #include <com/sun/star/uno/Reference.h>
-#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/uno/RuntimeException.hpp>
-#include <com/sun/star/lang/IllegalArgumentException.hpp>
 
 #include <mutex>
 
diff --git a/package/inc/CRC32.hxx b/package/inc/CRC32.hxx
index 2539d8e8c44e..72243d0d8342 100644
--- a/package/inc/CRC32.hxx
+++ b/package/inc/CRC32.hxx
@@ -20,7 +20,7 @@
 #define INCLUDED_PACKAGE_INC_CRC32_HXX
 
 #include <com/sun/star/uno/Sequence.h>
-#include <com/sun/star/uno/RuntimeException.hpp>
+#include <com/sun/star/uno/Reference.h>
 
 namespace com::sun::star {
     namespace io { class XInputStream; }
diff --git a/package/inc/PackageConstants.hxx b/package/inc/PackageConstants.hxx
index 82aa94fc180c..2e9f1527b0f7 100644
--- a/package/inc/PackageConstants.hxx
+++ b/package/inc/PackageConstants.hxx
@@ -20,6 +20,7 @@
 #define INCLUDED_PACKAGE_INC_PACKAGECONSTANTS_HXX
 
 #include <sal/types.h>
+#include <rtl/ustring.hxx>
 
 const sal_Int32 n_ConstBufferSize = 32768;
 
diff --git a/package/inc/ThreadedDeflater.hxx b/package/inc/ThreadedDeflater.hxx
index f22a40a0c941..361129d0f927 100644
--- a/package/inc/ThreadedDeflater.hxx
+++ b/package/inc/ThreadedDeflater.hxx
@@ -23,9 +23,7 @@
 #include <com/sun/star/uno/Sequence.hxx>
 #include <com/sun/star/io/XInputStream.hpp>
 #include <com/sun/star/uno/Reference.hxx>
-#include <package/packagedllapi.hxx>
 #include <comphelper/threadpool.hxx>
-#include <atomic>
 #include <memory>
 #include <vector>
 #include <functional>
diff --git a/package/inc/ZipFile.hxx b/package/inc/ZipFile.hxx
index abfb6674ae18..15b800430555 100644
--- a/package/inc/ZipFile.hxx
+++ b/package/inc/ZipFile.hxx
@@ -19,10 +19,6 @@
 #ifndef INCLUDED_PACKAGE_INC_ZIPFILE_HXX
 #define INCLUDED_PACKAGE_INC_ZIPFILE_HXX
 
-#include <com/sun/star/packages/zip/ZipException.hpp>
-#include <com/sun/star/packages/zip/ZipIOException.hpp>
-#include <com/sun/star/packages/NoEncryptionException.hpp>
-#include <com/sun/star/packages/WrongPasswordException.hpp>
 #include <com/sun/star/xml/crypto/XCipherContext.hpp>
 #include <com/sun/star/xml/crypto/XDigestContext.hpp>
 
@@ -33,8 +29,6 @@
 #include "HashMaps.hxx"
 #include "EncryptionData.hxx"
 
-#include <memory>
-
 namespace com::sun::star {
     namespace uno { class XComponentContext; }
     namespace ucb  { class XProgressHandler; }
diff --git a/package/inc/ZipPackage.hxx b/package/inc/ZipPackage.hxx
index 77d0130f0b9b..729d025e089d 100644
--- a/package/inc/ZipPackage.hxx
+++ b/package/inc/ZipPackage.hxx
@@ -30,15 +30,12 @@
 #include <com/sun/star/beans/NamedValue.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/xml/crypto/CipherID.hpp>
-#include <com/sun/star/lang/IllegalArgumentException.hpp>
 #include <comphelper/refcountedmutex.hxx>
 #include <rtl/ref.hxx>
 
 #include "HashMaps.hxx"
 #include "ZipFile.hxx"
-#include <osl/file.h>
 #include <vector>
-#include <memory>
 #include <optional>
 
 class ZipOutputStream;
diff --git a/package/inc/ZipPackageEntry.hxx b/package/inc/ZipPackageEntry.hxx
index 0fa479cb8465..2617e6275628 100644
--- a/package/inc/ZipPackageEntry.hxx
+++ b/package/inc/ZipPackageEntry.hxx
@@ -24,7 +24,6 @@
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <com/sun/star/container/XNameContainer.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include "ZipEntry.hxx"
diff --git a/package/inc/ZipPackageStream.hxx b/package/inc/ZipPackageStream.hxx
index f4f6d438c8d9..20ee2cab7275 100644
--- a/package/inc/ZipPackageStream.hxx
+++ b/package/inc/ZipPackageStream.hxx
@@ -20,7 +20,6 @@
 #define INCLUDED_PACKAGE_INC_ZIPPACKAGESTREAM_HXX
 
 #include <com/sun/star/io/XActiveDataSink.hpp>
-#include <com/sun/star/io/XSeekable.hpp>
 #include <com/sun/star/beans/NamedValue.hpp>
 #include <com/sun/star/packages/XDataSinkEncrSupport.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
diff --git a/package/inc/zipfileaccess.hxx b/package/inc/zipfileaccess.hxx
index ae795665b0bd..5d85a846cfcd 100644
--- a/package/inc/zipfileaccess.hxx
+++ b/package/inc/zipfileaccess.hxx
@@ -21,19 +21,15 @@
 #define INCLUDED_PACKAGE_INC_ZIPFILEACCESS_HXX
 
 #include <com/sun/star/packages/zip/XZipFileAccess2.hpp>
-#include <com/sun/star/packages/zip/ZipException.hpp>
 #include <com/sun/star/lang/XInitialization.hpp>
 #include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
 
 #include <comphelper/interfacecontainer3.hxx>
 #include <comphelper/refcountedmutex.hxx>
 #include <cppuhelper/implbase.hxx>
 
 #include "ZipFile.hxx"
-#include "HashMaps.hxx"
 
 #include <memory>
 #include <optional>
diff --git a/package/source/manifest/ManifestDefines.hxx 
b/package/source/manifest/ManifestDefines.hxx
index ecb789eadff0..b5006f2d1c08 100644
--- a/package/source/manifest/ManifestDefines.hxx
+++ b/package/source/manifest/ManifestDefines.hxx
@@ -18,7 +18,7 @@
  */
 #pragma once
 
-#include <PackageConstants.hxx>
+#include <rtl/ustring.hxx>
 
 inline constexpr OUStringLiteral MANIFEST_NSPREFIX = u"manifest:";
 inline constexpr OUStringLiteral ELEMENT_MANIFEST = u"manifest:manifest";
diff --git a/package/source/manifest/ManifestExport.cxx 
b/package/source/manifest/ManifestExport.cxx
index b603200f061a..7e7f22a3adfd 100644
--- a/package/source/manifest/ManifestExport.cxx
+++ b/package/source/manifest/ManifestExport.cxx
@@ -18,8 +18,6 @@
  */
 
 #include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>
-#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
-#include <com/sun/star/xml/sax/XAttributeList.hpp>
 #include <com/sun/star/xml/crypto/DigestID.hpp>
 #include <com/sun/star/xml/crypto/CipherID.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
@@ -28,7 +26,6 @@
 
 #include "ManifestDefines.hxx"
 #include "ManifestExport.hxx"
-#include <sax/tools/converter.hxx>
 
 #include <osl/diagnose.h>
 #include <rtl/ustrbuf.hxx>
diff --git a/package/source/manifest/ManifestExport.hxx 
b/package/source/manifest/ManifestExport.hxx
index f7fbff66bd2b..0148ea62c8ab 100644
--- a/package/source/manifest/ManifestExport.hxx
+++ b/package/source/manifest/ManifestExport.hxx
@@ -22,7 +22,6 @@
 
 #include <com/sun/star/uno/Sequence.h>
 #include <com/sun/star/uno/Reference.h>
-#include <rtl/ustring.hxx>
 
 namespace com::sun::star {
     namespace beans { struct PropertyValue;}
diff --git a/package/source/manifest/ManifestImport.cxx 
b/package/source/manifest/ManifestImport.cxx
index 7fbb3cff512f..d2b3177e34cf 100644
--- a/package/source/manifest/ManifestImport.cxx
+++ b/package/source/manifest/ManifestImport.cxx
@@ -19,7 +19,7 @@
 
 #include "ManifestImport.hxx"
 #include "ManifestDefines.hxx"
-#include <sax/tools/converter.hxx>
+#include <PackageConstants.hxx>
 #include <osl/diagnose.h>
 #include <com/sun/star/xml/sax/XAttributeList.hpp>
 #include <com/sun/star/xml/crypto/DigestID.hpp>
diff --git a/package/source/manifest/ManifestImport.hxx 
b/package/source/manifest/ManifestImport.hxx
index 1a2b4de11a6d..0240146395a8 100644
--- a/package/source/manifest/ManifestImport.hxx
+++ b/package/source/manifest/ManifestImport.hxx
@@ -23,11 +23,10 @@
 #include <cppuhelper/implbase.hxx>
 #include <com/sun/star/xml/sax/XDocumentHandler.hpp>
 #include <com/sun/star/beans/NamedValue.hpp>
+#include <unordered_map>
 #include <vector>
 #include <rtl/ustrbuf.hxx>
 
-#include <HashMaps.hxx>
-
 namespace com::sun::star {
     namespace xml::sax { class XAttributeList; }
     namespace beans { struct PropertyValue; }
diff --git a/package/source/manifest/ManifestReader.cxx 
b/package/source/manifest/ManifestReader.cxx
index dcb296d7e6f0..6464681f2aa3 100644
--- a/package/source/manifest/ManifestReader.cxx
+++ b/package/source/manifest/ManifestReader.cxx
@@ -19,9 +19,7 @@
 
 #include "ManifestReader.hxx"
 #include "ManifestImport.hxx"
-#include <sal/log.hxx>
 #include <tools/diagnose_ex.h>
-#include <comphelper/processfactory.hxx>
 #include <comphelper/sequence.hxx>
 #include <cppuhelper/factory.hxx>
 #include <cppuhelper/supportsservice.hxx>
@@ -29,8 +27,6 @@
 #include <com/sun/star/xml/sax/XDocumentHandler.hpp>
 #include <com/sun/star/xml/sax/SAXParseException.hpp>
 #include <com/sun/star/xml/sax/Parser.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
 #include <vector>
 
 using namespace ::std;
diff --git a/package/source/manifest/ManifestReader.hxx 
b/package/source/manifest/ManifestReader.hxx
index d9546cd30ddf..f85644162d05 100644
--- a/package/source/manifest/ManifestReader.hxx
+++ b/package/source/manifest/ManifestReader.hxx
@@ -22,7 +22,6 @@
 
 #include <cppuhelper/implbase.hxx>
 #include <com/sun/star/packages/manifest/XManifestReader.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 
 namespace com::sun::star {
diff --git a/package/source/manifest/ManifestWriter.cxx 
b/package/source/manifest/ManifestWriter.cxx
index 08c12510afee..5515cc26df07 100644
--- a/package/source/manifest/ManifestWriter.cxx
+++ b/package/source/manifest/ManifestWriter.cxx
@@ -20,17 +20,12 @@
 #include "ManifestWriter.hxx"
 #include "ManifestExport.hxx"
 #include <cppuhelper/exc_hlp.hxx>
-#include <comphelper/processfactory.hxx>
 #include <cppuhelper/factory.hxx>
 #include <cppuhelper/supportsservice.hxx>
-#include <com/sun/star/io/XActiveDataSource.hpp>
 #include <com/sun/star/xml/sax/Writer.hpp>
 #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
 #include <com/sun/star/xml/sax/SAXException.hpp>
 
-#include <osl/diagnose.hxx>
 #include <sal/log.hxx>
 
 using namespace ::com::sun::star;
diff --git a/package/source/manifest/ManifestWriter.hxx 
b/package/source/manifest/ManifestWriter.hxx
index 1378ebf8edd7..ca08bb0e4078 100644
--- a/package/source/manifest/ManifestWriter.hxx
+++ b/package/source/manifest/ManifestWriter.hxx
@@ -22,7 +22,6 @@
 
 #include <cppuhelper/implbase.hxx>
 #include <com/sun/star/packages/manifest/XManifestWriter.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 
 namespace com::sun::star {
diff --git a/package/source/xstor/ocompinstream.cxx 
b/package/source/xstor/ocompinstream.cxx
index 7f59275f491d..14bfd3cab354 100644
--- a/package/source/xstor/ocompinstream.cxx
+++ b/package/source/xstor/ocompinstream.cxx
@@ -27,7 +27,6 @@
 #include <sal/log.hxx>
 
 #include "owriteablestream.hxx"
-#include "xstorage.hxx"
 
 using namespace ::com::sun::star;
 
diff --git a/package/source/xstor/ocompinstream.hxx 
b/package/source/xstor/ocompinstream.hxx
index 438f38631108..4001cf1187a1 100644
--- a/package/source/xstor/ocompinstream.hxx
+++ b/package/source/xstor/ocompinstream.hxx
@@ -21,8 +21,6 @@
 #define INCLUDED_PACKAGE_SOURCE_XSTOR_OCOMPINSTREAM_HXX
 
 #include <com/sun/star/io/XInputStream.hpp>
-#include <com/sun/star/io/XStream.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <com/sun/star/embed/XExtendedStorageStream.hpp>
diff --git a/package/source/xstor/owriteablestream.cxx 
b/package/source/xstor/owriteablestream.cxx
index 720632c87d60..7c80a6e86152 100644
--- a/package/source/xstor/owriteablestream.cxx
+++ b/package/source/xstor/owriteablestream.cxx
@@ -21,10 +21,10 @@
 #include <sal/config.h>
 #include <sal/log.hxx>
 
+#include <com/sun/star/packages/NoEncryptionException.hpp>
 #include <com/sun/star/packages/WrongPasswordException.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include <com/sun/star/ucb/SimpleFileAccess.hpp>
-#include <com/sun/star/ucb/XCommandEnvironment.hpp>
 #include <com/sun/star/lang/DisposedException.hpp>
 #include <com/sun/star/lang/XUnoTunnel.hpp>
 #include <com/sun/star/lang/XTypeProvider.hpp>
@@ -49,7 +49,6 @@
 #include <comphelper/refcountedmutex.hxx>
 #include <comphelper/sequence.hxx>
 
-#include <rtl/digest.h>
 #include <tools/diagnose_ex.h>
 
 #include <PackageConstants.hxx>
diff --git a/package/source/xstor/owriteablestream.hxx 
b/package/source/xstor/owriteablestream.hxx
index f902bebd6749..5e87aa3e3047 100644
--- a/package/source/xstor/owriteablestream.hxx
+++ b/package/source/xstor/owriteablestream.hxx
@@ -26,10 +26,8 @@
 #include <com/sun/star/io/XSeekable.hpp>
 #include <com/sun/star/io/XTruncate.hpp>
 #include <com/sun/star/packages/XDataSinkEncrSupport.hpp>
-#include <com/sun/star/packages/NoEncryptionException.hpp>
 #include <com/sun/star/lang/XEventListener.hpp>
 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
 #include <com/sun/star/embed/XEncryptionProtectedSource2.hpp>
 #include <com/sun/star/embed/XStorage.hpp>
 #include <com/sun/star/embed/XRelationshipAccess.hpp>
@@ -40,7 +38,6 @@
 #include <com/sun/star/beans/StringPair.hpp>
 
 #include <cppuhelper/weak.hxx>
-#include <cppuhelper/interfacecontainer.h>
 
 #include <comphelper/refcountedmutex.hxx>
 #include <comphelper/sequenceashashmap.hxx>
diff --git a/package/source/xstor/selfterminatefilestream.hxx 
b/package/source/xstor/selfterminatefilestream.hxx
index 4aecd337d9eb..14bf3a049958 100644
--- a/package/source/xstor/selfterminatefilestream.hxx
+++ b/package/source/xstor/selfterminatefilestream.hxx
@@ -23,6 +23,7 @@
 #include <com/sun/star/io/XInputStream.hpp>
 #include <com/sun/star/io/XSeekable.hpp>
 #include <com/sun/star/ucb/XSimpleFileAccess3.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
 #include <cppuhelper/implbase.hxx>
 
 struct OWriteStream_Impl;
diff --git a/package/source/xstor/switchpersistencestream.hxx 
b/package/source/xstor/switchpersistencestream.hxx
index 76562d09d52e..f1e9ddceea96 100644
--- a/package/source/xstor/switchpersistencestream.hxx
+++ b/package/source/xstor/switchpersistencestream.hxx
@@ -21,15 +21,12 @@
 
 #include <com/sun/star/uno/Sequence.hxx>
 #include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/XComponentContext.hpp>
 #include <com/sun/star/io/XInputStream.hpp>
 #include <com/sun/star/io/XOutputStream.hpp>
 #include <com/sun/star/io/XSeekable.hpp>
 #include <com/sun/star/io/XTruncate.hpp>
 #include <com/sun/star/io/XStream.hpp>
-#include <com/sun/star/embed/XTransactedObject.hpp>
-#include <com/sun/star/beans/XPropertySetInfo.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
 #include <com/sun/star/io/XAsyncOutputMonitor.hpp>
 #include <mutex>
 #include <cppuhelper/implbase.hxx>
diff --git a/package/source/xstor/xfactory.cxx 
b/package/source/xstor/xfactory.cxx
index 575715dab15b..38c8d4df29df 100644
--- a/package/source/xstor/xfactory.cxx
+++ b/package/source/xstor/xfactory.cxx
@@ -20,7 +20,6 @@
 #include <sal/config.h>
 #include <sal/log.hxx>
 
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/ucb/SimpleFileAccess.hpp>
 #include <com/sun/star/embed/ElementModes.hpp>
 #include <com/sun/star/embed/StorageFormats.hpp>
@@ -29,7 +28,6 @@
 #include <com/sun/star/io/TempFile.hpp>
 #include <com/sun/star/io/XSeekable.hpp>
 
-#include <comphelper/processfactory.hxx>
 #include <comphelper/propertyvalue.hxx>
 #include <comphelper/storagehelper.hxx>
 #include <cppuhelper/supportsservice.hxx>
diff --git a/package/source/xstor/xfactory.hxx 
b/package/source/xstor/xfactory.hxx
index 96033464b874..366911849217 100644
--- a/package/source/xstor/xfactory.hxx
+++ b/package/source/xstor/xfactory.hxx
@@ -22,6 +22,7 @@
 
 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
 
 #include <cppuhelper/implbase.hxx>
 #include <osl/diagnose.h>
diff --git a/package/source/xstor/xstorage.cxx 
b/package/source/xstor/xstorage.cxx
index de84e2372bd3..ba942c867379 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -30,16 +30,15 @@
 #include <com/sun/star/embed/UseBackupException.hpp>
 #include <com/sun/star/embed/StorageFormats.hpp>
 #include <com/sun/star/embed/StorageWrappedTargetException.hpp>
+#include <com/sun/star/packages/NoEncryptionException.hpp>
 #include <com/sun/star/packages/NoRawFormatException.hpp>
 #include <com/sun/star/packages/WrongPasswordException.hpp>
-#include <com/sun/star/ucb/XProgressHandler.hpp>
 #include <com/sun/star/io/TempFile.hpp>
 #include <com/sun/star/ucb/SimpleFileAccess.hpp>
 #include <com/sun/star/container/XHierarchicalNameAccess.hpp>
 #include <com/sun/star/container/XEnumerationAccess.hpp>
 #include <com/sun/star/container/XNamed.hpp>
 #include <com/sun/star/util/XChangesBatch.hpp>
-#include <com/sun/star/util/XCloneable.hpp>
 
 #include <com/sun/star/lang/XUnoTunnel.hpp>
 #include <com/sun/star/lang/XComponent.hpp>
diff --git a/package/source/xstor/xstorage.hxx 
b/package/source/xstor/xstorage.hxx
index 92cfc62c14eb..50e0fb78a7e3 100644
--- a/package/source/xstor/xstorage.hxx
+++ b/package/source/xstor/xstorage.hxx
@@ -27,13 +27,10 @@
 #include <com/sun/star/embed/XStorageRawAccess.hpp>
 #include <com/sun/star/embed/XTransactedObject.hpp>
 #include <com/sun/star/embed/XTransactionBroadcaster.hpp>
-#include <com/sun/star/embed/XClassifiedObject.hpp>
 #include <com/sun/star/embed/XEncryptionProtectedStorage.hpp>
 #include <com/sun/star/embed/XRelationshipAccess.hpp>
 #include <com/sun/star/util/XModifiable.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
 #include <com/sun/star/container/XNameContainer.hpp>
-#include <com/sun/star/util/XCloseable.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <com/sun/star/beans/StringPair.hpp>
@@ -41,11 +38,9 @@
 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
 #include <com/sun/star/lang/XTypeProvider.hpp>
 #include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/packages/NoEncryptionException.hpp>
 
 #include <cppuhelper/weak.hxx>
 #include <cppuhelper/weakref.hxx>
-#include <cppuhelper/interfacecontainer.h>
 #include <comphelper/refcountedmutex.hxx>
 #include <comphelper/sequenceashashmap.hxx>
 #include <o3tl/deleter.hxx>
diff --git a/package/source/zipapi/ByteChucker.cxx 
b/package/source/zipapi/ByteChucker.cxx
index af534e58e22e..6c5994aa6a2f 100644
--- a/package/source/zipapi/ByteChucker.cxx
+++ b/package/source/zipapi/ByteChucker.cxx
@@ -18,13 +18,11 @@
  */
 
 #include <ByteChucker.hxx>
-#include <PackageConstants.hxx>
 #include <com/sun/star/io/XSeekable.hpp>
 #include <com/sun/star/io/XOutputStream.hpp>
 
 using namespace ::com::sun::star::io;
 using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
 
 ByteChucker::ByteChucker(Reference<XOutputStream> const & xOstream)
 : xStream(xOstream)
diff --git a/package/source/zipapi/ByteGrabber.cxx 
b/package/source/zipapi/ByteGrabber.cxx
index 89ce1af5634b..b58a7087f468 100644
--- a/package/source/zipapi/ByteGrabber.cxx
+++ b/package/source/zipapi/ByteGrabber.cxx
@@ -19,8 +19,10 @@
 
 #include <ByteGrabber.hxx>
 #include <sal/log.hxx>
+#include <com/sun/star/io/IOException.hpp>
 #include <com/sun/star/io/XSeekable.hpp>
 #include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
 
 using namespace ::com::sun::star;
 
diff --git a/package/source/zipapi/MemoryByteGrabber.hxx 
b/package/source/zipapi/MemoryByteGrabber.hxx
index 9f52204ead67..8dcf7f067064 100644
--- a/package/source/zipapi/MemoryByteGrabber.hxx
+++ b/package/source/zipapi/MemoryByteGrabber.hxx
@@ -19,9 +19,7 @@
 #ifndef INCLUDED_PACKAGE_SOURCE_ZIPAPI_MEMORYBYTEGRABBER_HXX
 #define INCLUDED_PACKAGE_SOURCE_ZIPAPI_MEMORYBYTEGRABBER_HXX
 
-#include <com/sun/star/io/XInputStream.hpp>
-#include <com/sun/star/io/XSeekable.hpp>
-#include <string.h>
+#include <com/sun/star/uno/Sequence.h>
 
 class MemoryByteGrabber final
 {
diff --git a/package/source/zipapi/XBufferedThreadedStream.cxx 
b/package/source/zipapi/XBufferedThreadedStream.cxx
index e2f963bf88c1..d3bf995d9073 100644
--- a/package/source/zipapi/XBufferedThreadedStream.cxx
+++ b/package/source/zipapi/XBufferedThreadedStream.cxx
@@ -8,9 +8,6 @@
  */
 
 #include "XBufferedThreadedStream.hxx"
-#include <com/sun/star/packages/zip/ZipIOException.hpp>
-#include <cppuhelper/exc_hlp.hxx>
-#include <sal/log.hxx>
 
 using namespace css::uno;
 
diff --git a/package/source/zipapi/XBufferedThreadedStream.hxx 
b/package/source/zipapi/XBufferedThreadedStream.hxx
index 272414c37504..ad5d3b0ce116 100644
--- a/package/source/zipapi/XBufferedThreadedStream.hxx
+++ b/package/source/zipapi/XBufferedThreadedStream.hxx
@@ -10,10 +10,13 @@
 #ifndef INCLUDED_PACKAGE_SOURCE_ZIPAPI_XBUFFEREDTHREADEDSTREAM_HXX
 #define INCLUDED_PACKAGE_SOURCE_ZIPAPI_XBUFFEREDTHREADEDSTREAM_HXX
 
+#include <com/sun/star/io/XInputStream.hpp>
+
+#include <cppuhelper/implbase.hxx>
+#include <rtl/ref.hxx>
 #include <salhelper/thread.hxx>
-#include "XUnbufferedStream.hxx"
+
 #include <queue>
-#include <vector>
 #include <mutex>
 #include <condition_variable>
 
diff --git a/package/source/zipapi/XUnbufferedStream.cxx 
b/package/source/zipapi/XUnbufferedStream.cxx
index 6fe09c1162c1..56f864a2df05 100644
--- a/package/source/zipapi/XUnbufferedStream.cxx
+++ b/package/source/zipapi/XUnbufferedStream.cxx
@@ -23,7 +23,6 @@
 
 #include "XUnbufferedStream.hxx"
 #include <EncryptionData.hxx>
-#include <PackageConstants.hxx>
 #include <ZipFile.hxx>
 #include <EncryptedDataHeader.hxx>
 #include <algorithm>
@@ -31,7 +30,6 @@
 
 #include <osl/diagnose.h>
 #include <osl/mutex.hxx>
-#include <sal/log.hxx>
 #include <tools/diagnose_ex.h>
 
 using namespace ::com::sun::star;
diff --git a/package/source/zipapi/XUnbufferedStream.hxx 
b/package/source/zipapi/XUnbufferedStream.hxx
index 9cb97b1c35c5..277f356ee18c 100644
--- a/package/source/zipapi/XUnbufferedStream.hxx
+++ b/package/source/zipapi/XUnbufferedStream.hxx
@@ -19,10 +19,8 @@
 #ifndef INCLUDED_PACKAGE_SOURCE_ZIPAPI_XUNBUFFEREDSTREAM_HXX
 #define INCLUDED_PACKAGE_SOURCE_ZIPAPI_XUNBUFFEREDSTREAM_HXX
 
-#include <com/sun/star/lang/IllegalArgumentException.hpp>
 #include <com/sun/star/io/XSeekable.hpp>
 #include <com/sun/star/io/XInputStream.hpp>
-#include <com/sun/star/io/XOutputStream.hpp>
 #include <com/sun/star/xml/crypto/XCipherContext.hpp>
 
 #include <comphelper/refcountedmutex.hxx>
diff --git a/package/source/zipapi/ZipFile.cxx 
b/package/source/zipapi/ZipFile.cxx
index 3e9d24858df1..dba57c1f200c 100644
--- a/package/source/zipapi/ZipFile.cxx
+++ b/package/source/zipapi/ZipFile.cxx
@@ -17,13 +17,16 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/ucb/XProgressHandler.hpp>
+#include <com/sun/star/io/BufferSizeExceededException.hpp>
+#include <com/sun/star/io/NotConnectedException.hpp>
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <com/sun/star/packages/NoEncryptionException.hpp>
+#include <com/sun/star/packages/WrongPasswordException.hpp>
 #include <com/sun/star/packages/zip/ZipConstants.hpp>
+#include <com/sun/star/packages/zip/ZipException.hpp>
+#include <com/sun/star/packages/zip/ZipIOException.hpp>
 #include <com/sun/star/xml/crypto/XCipherContext.hpp>
 #include <com/sun/star/xml/crypto/XDigestContext.hpp>
-#include <com/sun/star/xml/crypto/XCipherContextSupplier.hpp>
-#include <com/sun/star/xml/crypto/XDigestContextSupplier.hpp>
 #include <com/sun/star/xml/crypto/CipherID.hpp>
 #include <com/sun/star/xml/crypto/DigestID.hpp>
 #include <com/sun/star/xml/crypto/NSSInitializer.hpp>
@@ -36,7 +39,6 @@
 
 #include <algorithm>
 #include <iterator>
-#include <memory>
 #include <vector>
 
 #include "blowfishcontext.hxx"
@@ -55,7 +57,6 @@
 using namespace com::sun::star;
 using namespace com::sun::star::io;
 using namespace com::sun::star::uno;
-using namespace com::sun::star::ucb;
 using namespace com::sun::star::lang;
 using namespace com::sun::star::packages;
 using namespace com::sun::star::packages::zip;
diff --git a/package/source/zipapi/ZipOutputEntry.cxx 
b/package/source/zipapi/ZipOutputEntry.cxx
index 734840865a14..897ea6212430 100644
--- a/package/source/zipapi/ZipOutputEntry.cxx
+++ b/package/source/zipapi/ZipOutputEntry.cxx
@@ -21,8 +21,6 @@
 
 #include <com/sun/star/io/TempFile.hpp>
 #include <com/sun/star/packages/zip/ZipConstants.hpp>
-#include <com/sun/star/ucb/SimpleFileAccess.hpp>
-#include <com/sun/star/ucb/XSimpleFileAccess3.hpp>
 
 #include <osl/diagnose.h>
 
@@ -30,7 +28,6 @@
 #include <ThreadedDeflater.hxx>
 #include <ZipEntry.hxx>
 #include <ZipFile.hxx>
-#include <ZipPackageBuffer.hxx>
 #include <ZipPackageStream.hxx>
 
 #include <algorithm>
diff --git a/package/source/zipapi/ZipOutputStream.cxx 
b/package/source/zipapi/ZipOutputStream.cxx
index 6bf3bd33f49e..a4d67fcfd54a 100644
--- a/package/source/zipapi/ZipOutputStream.cxx
+++ b/package/source/zipapi/ZipOutputStream.cxx
@@ -20,10 +20,9 @@
 #include <ZipOutputStream.hxx>
 
 #include <com/sun/star/packages/zip/ZipConstants.hpp>
+#include <com/sun/star/io/IOException.hpp>
 #include <com/sun/star/io/XInputStream.hpp>
-#include <com/sun/star/io/XOutputStream.hpp>
 #include <comphelper/storagehelper.hxx>
-#include <cppuhelper/exc_hlp.hxx>
 
 #include <osl/time.h>
 #include <osl/thread.hxx>
diff --git a/package/source/zippackage/ZipPackage.cxx 
b/package/source/zippackage/ZipPackage.cxx
index 81b8ee9f89a5..e00c47d10a5f 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -29,6 +29,8 @@
 #include <PackageConstants.hxx>
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <com/sun/star/packages/zip/ZipConstants.hpp>
+#include <com/sun/star/packages/zip/ZipException.hpp>
+#include <com/sun/star/packages/zip/ZipIOException.hpp>
 #include <com/sun/star/packages/manifest/ManifestReader.hpp>
 #include <com/sun/star/packages/manifest/ManifestWriter.hpp>
 #include <com/sun/star/io/TempFile.hpp>
@@ -37,28 +39,22 @@
 #include <com/sun/star/io/XOutputStream.hpp>
 #include <com/sun/star/io/XTruncate.hpp>
 #include <com/sun/star/io/XSeekable.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
 #include <com/sun/star/container/XNameContainer.hpp>
-#include <com/sun/star/ucb/IOErrorCode.hpp>
 #include <comphelper/fileurl.hxx>
 #include <ucbhelper/content.hxx>
-#include <cppuhelper/factory.hxx>
 #include <cppuhelper/exc_hlp.hxx>
 #include <com/sun/star/ucb/ContentCreationException.hpp>
 #include <com/sun/star/ucb/TransferInfo.hpp>
 #include <com/sun/star/ucb/NameClash.hpp>
 #include <com/sun/star/ucb/OpenCommandArgument2.hpp>
 #include <com/sun/star/ucb/OpenMode.hpp>
-#include <com/sun/star/ucb/XProgressHandler.hpp>
 #include <com/sun/star/ucb/SimpleFileAccess.hpp>
 #include <com/sun/star/io/XActiveDataStreamer.hpp>
-#include <com/sun/star/embed/XTransactedObject.hpp>
 #include <com/sun/star/embed/UseBackupException.hpp>
 #include <com/sun/star/embed/StorageFormats.hpp>
 #include <com/sun/star/beans/NamedValue.hpp>
 #include <com/sun/star/xml/crypto/DigestID.hpp>
-#include <com/sun/star/xml/crypto/CipherID.hpp>
 #include <cppuhelper/implbase.hxx>
 #include <rtl/uri.hxx>
 #include <rtl/random.h>
@@ -66,12 +62,8 @@
 #include <sal/log.hxx>
 #include <com/sun/star/io/XAsyncOutputMonitor.hpp>
 
-#include <cstring>
-#include <memory>
 #include <string_view>
-#include <vector>
 
-#include <comphelper/processfactory.hxx>
 #include <comphelper/seekableinput.hxx>
 #include <comphelper/storagehelper.hxx>
 #include <comphelper/ofopxmlhelper.hxx>
diff --git a/package/source/zippackage/ZipPackageEntry.cxx 
b/package/source/zippackage/ZipPackageEntry.cxx
index 385981b5c901..df18f0874f25 100644
--- a/package/source/zippackage/ZipPackageEntry.cxx
+++ b/package/source/zippackage/ZipPackageEntry.cxx
@@ -24,7 +24,6 @@
 #include <sal/log.hxx>
 
 #include <ZipPackageFolder.hxx>
-#include <ZipPackageStream.hxx>
 
 #include <comphelper/servicehelper.hxx>
 #include <comphelper/storagehelper.hxx>
diff --git a/package/source/zippackage/ZipPackageFolder.cxx 
b/package/source/zippackage/ZipPackageFolder.cxx
index 5690fd2fb530..b65c9c697788 100644
--- a/package/source/zippackage/ZipPackageFolder.cxx
+++ b/package/source/zippackage/ZipPackageFolder.cxx
@@ -17,24 +17,20 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <string.h>
-
 #include <ZipPackageFolder.hxx>
-#include <ZipFile.hxx>
 #include <ZipOutputStream.hxx>
 #include <ZipPackageStream.hxx>
 #include <PackageConstants.hxx>
 #include "ZipPackageFolderEnumeration.hxx"
+#include <com/sun/star/io/IOException.hpp>
 #include <com/sun/star/packages/zip/ZipConstants.hpp>
+#include <com/sun/star/packages/zip/ZipException.hpp>
 #include <com/sun/star/embed/StorageFormats.hpp>
 #include <comphelper/sequence.hxx>
 #include <comphelper/servicehelper.hxx>
 #include <cppuhelper/supportsservice.hxx>
-#include <osl/diagnose.h>
 #include <sal/log.hxx>
-#include <rtl/digest.h>
 #include <com/sun/star/beans/PropertyValue.hpp>
-#include <EncryptedDataHeader.hxx>
 
 using namespace com::sun::star;
 using namespace com::sun::star::packages::zip::ZipConstants;
diff --git a/package/source/zippackage/ZipPackageStream.cxx 
b/package/source/zippackage/ZipPackageStream.cxx
index 58f55768066a..b8157839bbba 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -20,10 +20,14 @@
 #include <ZipPackageStream.hxx>
 
 #include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
 #include <com/sun/star/packages/NoRawFormatException.hpp>
 #include <com/sun/star/packages/zip/ZipConstants.hpp>
 #include <com/sun/star/embed/StorageFormats.hpp>
 #include <com/sun/star/packages/zip/ZipIOException.hpp>
+#include <com/sun/star/packages/NoEncryptionException.hpp>
+#include <com/sun/star/packages/zip/ZipException.hpp>
+#include <com/sun/star/packages/WrongPasswordException.hpp>
 #include <com/sun/star/io/TempFile.hpp>
 #include <com/sun/star/io/XInputStream.hpp>
 #include <com/sun/star/io/XOutputStream.hpp>
@@ -32,14 +36,10 @@
 #include <com/sun/star/xml/crypto/DigestID.hpp>
 #include <com/sun/star/xml/crypto/CipherID.hpp>
 
-#include <string.h>
-
 #include <CRC32.hxx>
-#include <ThreadedDeflater.hxx>
 #include <ZipOutputEntry.hxx>
 #include <ZipOutputStream.hxx>
 #include <ZipPackage.hxx>
-#include <ZipPackageFolder.hxx>
 #include <ZipFile.hxx>
 #include <EncryptedDataHeader.hxx>
 #include <osl/diagnose.h>
@@ -48,7 +48,6 @@
 #include <comphelper/seekableinput.hxx>
 #include <comphelper/servicehelper.hxx>
 #include <comphelper/storagehelper.hxx>
-#include <cppuhelper/exc_hlp.hxx>
 #include <cppuhelper/supportsservice.hxx>
 
 #include <rtl/random.h>
@@ -58,7 +57,6 @@
 #include <PackageConstants.hxx>
 
 #include <algorithm>
-#include <thread>
 
 using namespace com::sun::star::packages::zip::ZipConstants;
 using namespace com::sun::star::packages::zip;
diff --git a/package/source/zippackage/zipfileaccess.cxx 
b/package/source/zippackage/zipfileaccess.cxx
index 85a674ef6e50..318943b02a42 100644
--- a/package/source/zippackage/zipfileaccess.cxx
+++ b/package/source/zippackage/zipfileaccess.cxx
@@ -20,6 +20,7 @@
 #include <com/sun/star/lang/DisposedException.hpp>
 #include <com/sun/star/lang/IllegalArgumentException.hpp>
 #include <com/sun/star/ucb/XCommandEnvironment.hpp>
+#include <com/sun/star/io/NotConnectedException.hpp>
 #include <com/sun/star/io/XActiveDataSink.hpp>
 #include <com/sun/star/io/XStream.hpp>
 #include <com/sun/star/io/XSeekable.hpp>
@@ -28,7 +29,6 @@
 #include <cppuhelper/exc_hlp.hxx>
 #include <cppuhelper/supportsservice.hxx>
 #include <zipfileaccess.hxx>
-#include <ZipEnumeration.hxx>
 #include "ZipPackageSink.hxx"
 #include <EncryptionData.hxx>
 
diff --git a/pyuno/IwyuFilter_pyuno.yaml b/pyuno/IwyuFilter_pyuno.yaml
index c39a7992cc0a..6e3a5df38bbe 100644
--- a/pyuno/IwyuFilter_pyuno.yaml
+++ b/pyuno/IwyuFilter_pyuno.yaml
@@ -18,6 +18,8 @@ excludelist:
     - osl/file.hxx
     # Needed for direct member access
     - com/sun/star/uno/XComponentContext.hpp
+    # Needed on WIN32
+    - o3tl/char16_t2wchar_t.hxx
     pyuno/source/module/pyuno_module.cxx:
     # Needed on MACOSX
     - config_folders.h
diff --git a/remotebridges/source/unourl_resolver/unourl_resolver.cxx 
b/remotebridges/source/unourl_resolver/unourl_resolver.cxx
index 9aa8293fa67b..6dc273ab365e 100644
--- a/remotebridges/source/unourl_resolver/unourl_resolver.cxx
+++ b/remotebridges/source/unourl_resolver/unourl_resolver.cxx
@@ -25,7 +25,6 @@
 #include <com/sun/star/bridge/XBridgeFactory.hpp>
 #include <com/sun/star/bridge/XUnoUrlResolver.hpp>
 #include <com/sun/star/connection/XConnector.hpp>
-#include <com/sun/star/registry/XRegistryKey.hpp>
 #include <cppuhelper/implbase.hxx>
 #include <cppuhelper/supportsservice.hxx>
 #include <cppuhelper/unourl.hxx>
@@ -35,7 +34,6 @@ using namespace com::sun::star::uno;
 using namespace com::sun::star::lang;
 using namespace com::sun::star::connection;
 using namespace com::sun::star::bridge;
-using namespace com::sun::star::registry;
 
 namespace unourl_resolver
 {
diff --git a/reportdesign/inc/helpids.h b/reportdesign/inc/helpids.h
index 5a02dbeea0ab..219d967228c0 100644
--- a/reportdesign/inc/helpids.h
+++ b/reportdesign/inc/helpids.h
@@ -18,6 +18,8 @@
  */
 #pragma once
 
+#include <rtl/ustring.hxx>
+
 inline constexpr OUStringLiteral UID_RPT_PROP_FORMULA = 
u"REPORTDESIGN_UID_RPT_PROP_FORMULA";
 inline constexpr OUStringLiteral UID_RPT_RPT_PROP_DLG_FONT_TYPE = 
u"REPORTDESIGN_UID_RPT_RPT_PROP_DLG_FONT_TYPE";
 inline constexpr OUStringLiteral UID_RPT_RPT_PROP_DLG_AREA = 
u"REPORTDESIGN_UID_RPT_RPT_PROP_DLG_AREA";
diff --git a/reportdesign/inc/stringarray.hrc b/reportdesign/inc/stringarray.hrc
index 99bdc9a296c5..1d6800bf0cb0 100644
--- a/reportdesign/inc/stringarray.hrc
+++ b/reportdesign/inc/stringarray.hrc
@@ -10,6 +10,8 @@
 #ifndef INCLUDED_REPORTDESIGN_INC_FNP_HRC
 #define INCLUDED_REPORTDESIGN_INC_FNP_HRC
 
+#include <unotools/resmgr.hxx>
+
 #define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const 
*>(u8##String))
 
 const TranslateId RID_STR_FORCENEWPAGE_CONST[] =
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx 
b/reportdesign/source/core/api/ReportDefinition.cxx
index 116de59b0690..636346a163c3 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -109,7 +109,6 @@
 #include <svx/xmleohlp.hxx>
 #include <svx/xmlgrhlp.hxx>
 #include <tools/diagnose_ex.h>
-#include <unotools/saveopt.hxx>
 #include <vcl/svapp.hxx>
 
 //  page styles
diff --git a/reportdesign/source/core/api/ReportEngineJFree.cxx 
b/reportdesign/source/core/api/ReportEngineJFree.cxx
index 01585aebbabf..182294c7be4a 100644
--- a/reportdesign/source/core/api/ReportEngineJFree.cxx
+++ b/reportdesign/source/core/api/ReportEngineJFree.cxx
@@ -40,7 +40,6 @@
 #include <core_resource.hxx>
 
 #include <connectivity/CommonTools.hxx>
-#include <rtl/ustrbuf.hxx>
 #include <sfx2/docfilt.hxx>
 
 namespace reportdesign
diff --git a/reportdesign/source/core/api/Shape.cxx 
b/reportdesign/source/core/api/Shape.cxx
index 464d7ac46cbc..cdeb8f221436 100644
--- a/reportdesign/source/core/api/Shape.cxx
+++ b/reportdesign/source/core/api/Shape.cxx
@@ -19,8 +19,8 @@
 #include <Shape.hxx>
 
 #include <cppuhelper/supportsservice.hxx>
+#include <svx/svdobj.hxx>
 #include <tools/diagnose_ex.h>
-#include <svx/unoshape.hxx>
 
 #include <strings.hxx>
 #include <strings.hrc>
diff --git a/reportdesign/source/core/sdr/ReportDrawPage.cxx 
b/reportdesign/source/core/sdr/ReportDrawPage.cxx
index abb56f534a58..1f80905252ec 100644
--- a/reportdesign/source/core/sdr/ReportDrawPage.cxx
+++ b/reportdesign/source/core/sdr/ReportDrawPage.cxx
@@ -19,11 +19,9 @@
 #include <ReportDrawPage.hxx>
 #include <RptObject.hxx>
 #include <RptModel.hxx>
-#include <RptDef.hxx>
 #include <strings.hxx>
 #include <comphelper/mimeconfighelper.hxx>
 #include <comphelper/embeddedobjectcontainer.hxx>
-#include <editeng/outlobj.hxx>
 
 #include <svx/svdmodel.hxx>
 #include <com/sun/star/embed/Aspects.hpp>
diff --git a/reportdesign/source/core/sdr/RptPage.cxx 
b/reportdesign/source/core/sdr/RptPage.cxx
index d774f37100a1..1ad1cb8e11b0 100644
--- a/reportdesign/source/core/sdr/RptPage.cxx
+++ b/reportdesign/source/core/sdr/RptPage.cxx
@@ -20,7 +20,6 @@
 #include <RptModel.hxx>
 #include <Section.hxx>
 #include <RptObject.hxx>
-#include <svx/unoshape.hxx>
 #include <ReportDrawPage.hxx>
 
 namespace rptui
diff --git a/reportdesign/source/filter/xml/xmlColumn.cxx 
b/reportdesign/source/filter/xml/xmlColumn.cxx
index da8a6966169b..f57c8085f7c5 100644
--- a/reportdesign/source/filter/xml/xmlColumn.cxx
+++ b/reportdesign/source/filter/xml/xmlColumn.cxx
@@ -32,7 +32,6 @@
 #include <comphelper/propertysetinfo.hxx>
 #include <com/sun/star/beans/PropertyAttribute.hpp>
 #include <strings.hxx>
-#include <sal/log.hxx>
 
 #define PROPERTY_ID_WIDTH      1
 #define PROPERTY_ID_HEIGHT     2
diff --git a/reportdesign/source/filter/xml/xmlComponent.cxx 
b/reportdesign/source/filter/xml/xmlComponent.cxx
index fc87f8da56e6..68111bb04625 100644
--- a/reportdesign/source/filter/xml/xmlComponent.cxx
+++ b/reportdesign/source/filter/xml/xmlComponent.cxx
@@ -21,7 +21,6 @@
 #include <xmloff/xmltoken.hxx>
 #include <xmloff/xmlnamespace.hxx>
 #include <osl/diagnose.h>
-#include <sal/log.hxx>
 #include <tools/diagnose_ex.h>
 
 namespace rptxml
diff --git a/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx 
b/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx
index 0ef9c8d98f61..0521fb895702 100644
--- a/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx
+++ b/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx
@@ -22,7 +22,6 @@
 #include <xmloff/xmlnamespace.hxx>
 #include <strings.hxx>
 #include <osl/diagnose.h>
-#include <sal/log.hxx>
 #include <tools/diagnose_ex.h>
 
 namespace rptxml
diff --git a/reportdesign/source/filter/xml/xmlControlProperty.cxx 
b/reportdesign/source/filter/xml/xmlControlProperty.cxx
index ca5cba2ae459..95415257a40d 100644
--- a/reportdesign/source/filter/xml/xmlControlProperty.cxx
+++ b/reportdesign/source/filter/xml/xmlControlProperty.cxx
@@ -37,7 +37,6 @@
 #include <com/sun/star/util/DateTime.hpp>
 #include <rtl/math.hxx>
 #include <osl/diagnose.h>
-#include <sal/log.hxx>
 
 #define TYPE_DATE       1
 #define TYPE_TIME       2
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx 
b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
index 123e4a1bb888..b8b064cc670d 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
@@ -30,7 +30,6 @@
 #include <xmloff/xmltoken.hxx>
 #include <xmloff/xmlement.hxx>
 #include <xmloff/xmluconv.hxx>
-#include <unotools/saveopt.hxx>
 #include <rtl/ustrbuf.hxx>
 #include <connectivity/dbtools.hxx>
 
diff --git a/reportdesign/source/filter/xml/xmlFormatCondition.cxx 
b/reportdesign/source/filter/xml/xmlFormatCondition.cxx
index 2e90c98e2dc2..6f5f430322e3 100644
--- a/reportdesign/source/filter/xml/xmlFormatCondition.cxx
+++ b/reportdesign/source/filter/xml/xmlFormatCondition.cxx
@@ -22,7 +22,6 @@
 #include <xmloff/xmlnamespace.hxx>
 #include "xmlHelper.hxx"
 #include <osl/diagnose.h>
-#include <sal/log.hxx>
 #include <tools/diagnose_ex.h>
 
 namespace rptxml
diff --git a/reportdesign/source/filter/xml/xmlFormattedField.cxx 
b/reportdesign/source/filter/xml/xmlFormattedField.cxx
index ad84810e8cdb..b7fd48ae2582 100644
--- a/reportdesign/source/filter/xml/xmlFormattedField.cxx
+++ b/reportdesign/source/filter/xml/xmlFormattedField.cxx
@@ -21,7 +21,6 @@
 #include <xmloff/xmltoken.hxx>
 #include <xmloff/xmlnamespace.hxx>
 #include <osl/diagnose.h>
-#include <sal/log.hxx>
 #include <tools/diagnose_ex.h>
 
 
diff --git a/reportdesign/source/filter/xml/xmlFunction.cxx 
b/reportdesign/source/filter/xml/xmlFunction.cxx
index cd6d072d24ac..1e052bcb4bff 100644
--- a/reportdesign/source/filter/xml/xmlFunction.cxx
+++ b/reportdesign/source/filter/xml/xmlFunction.cxx
@@ -21,7 +21,6 @@
 #include <xmloff/xmltoken.hxx>
 #include <xmloff/xmlnamespace.hxx>
 #include <osl/diagnose.h>
-#include <sal/log.hxx>
 #include <tools/diagnose_ex.h>
 
 namespace rptxml
diff --git a/reportdesign/source/filter/xml/xmlGroup.cxx 
b/reportdesign/source/filter/xml/xmlGroup.cxx
index 355ed8feab8f..a0f2e6bf7bd4 100644
--- a/reportdesign/source/filter/xml/xmlGroup.cxx
+++ b/reportdesign/source/filter/xml/xmlGroup.cxx
@@ -29,7 +29,6 @@
 #include <com/sun/star/report/GroupOn.hpp>
 #include <com/sun/star/report/KeepTogether.hpp>
 #include <osl/diagnose.h>
-#include <sal/log.hxx>
 #include <tools/diagnose_ex.h>
 
 namespace rptxml
diff --git a/reportdesign/source/filter/xml/xmlHelper.cxx 
b/reportdesign/source/filter/xml/xmlHelper.cxx
index a73474711523..a7e0c2ca45db 100644
--- a/reportdesign/source/filter/xml/xmlHelper.cxx
+++ b/reportdesign/source/filter/xml/xmlHelper.cxx
@@ -43,7 +43,6 @@
 #include <com/sun/star/sdb/CommandType.hpp>
 #include <com/sun/star/style/VerticalAlignment.hpp>
 #include <xmloff/EnumPropertyHdl.hxx>
-#include <osl/diagnose.h>
 #include <tools/diagnose_ex.h>
 
 #define XML_RPT_ALIGNMENT   (XML_DB_TYPES_START+1)
diff --git a/reportdesign/source/filter/xml/xmlMasterFields.cxx 
b/reportdesign/source/filter/xml/xmlMasterFields.cxx
index 64cb935db286..2dfd0ac4d9b1 100644
--- a/reportdesign/source/filter/xml/xmlMasterFields.cxx
+++ b/reportdesign/source/filter/xml/xmlMasterFields.cxx
@@ -23,7 +23,6 @@
 #include <xmloff/xmlnamespace.hxx>
 #include <xmloff/ProgressBarHelper.hxx>
 #include "xmlEnums.hxx"
-#include <sal/log.hxx>
 
 
 namespace rptxml
diff --git a/reportdesign/source/filter/xml/xmlReportElement.cxx 
b/reportdesign/source/filter/xml/xmlReportElement.cxx
index ea1871d7f655..7e4e89221651 100644
--- a/reportdesign/source/filter/xml/xmlReportElement.cxx
+++ b/reportdesign/source/filter/xml/xmlReportElement.cxx
@@ -26,7 +26,6 @@
 #include "xmlCondPrtExpr.hxx"
 #include "xmlFormatCondition.hxx"
 #include <osl/diagnose.h>
-#include <sal/log.hxx>
 #include <tools/diagnose_ex.h>
 
 namespace rptxml
diff --git a/reportdesign/source/filter/xml/xmlReportElementBase.cxx 
b/reportdesign/source/filter/xml/xmlReportElementBase.cxx
index dc601abe56ab..ffcb8b7b66a9 100644
--- a/reportdesign/source/filter/xml/xmlReportElementBase.cxx
+++ b/reportdesign/source/filter/xml/xmlReportElementBase.cxx
@@ -18,14 +18,13 @@
  */
 #include <xmloff/ProgressBarHelper.hxx>
 #include <xmloff/xmlnamespace.hxx>
-#include <xmloff/xmltkmap.hxx>
+#include <xmloff/xmltoken.hxx>
 #include "xmlReportElementBase.hxx"
 #include "xmlfilter.hxx"
 #include "xmlControlProperty.hxx"
 #include "xmlReportElement.hxx"
 #include "xmlEnums.hxx"
 #include "xmlTable.hxx"
-#include <osl/diagnose.h>
 #include <tools/diagnose_ex.h>
 
 namespace rptxml
diff --git a/reportdesign/source/filter/xml/xmlSection.cxx 
b/reportdesign/source/filter/xml/xmlSection.cxx
index 0b0834eac1e3..957c3a2ca974 100644
--- a/reportdesign/source/filter/xml/xmlSection.cxx
+++ b/reportdesign/source/filter/xml/xmlSection.cxx
@@ -24,8 +24,6 @@
 #include "xmlHelper.hxx"
 #include <com/sun/star/report/ReportPrintOption.hpp>
 #include "xmlTable.hxx"
-#include <osl/diagnose.h>
-#include <sal/log.hxx>
 #include <tools/diagnose_ex.h>
 
 
diff --git a/reportdesign/source/filter/xml/xmlTable.cxx 
b/reportdesign/source/filter/xml/xmlTable.cxx
index 130b5d6b7394..34075b46d97f 100644
--- a/reportdesign/source/filter/xml/xmlTable.cxx
+++ b/reportdesign/source/filter/xml/xmlTable.cxx
@@ -35,7 +35,6 @@
 #include <com/sun/star/report/XShape.hpp>
 #include <com/sun/star/report/XFixedLine.hpp>
 #include <osl/diagnose.h>
-#include <sal/log.hxx>
 #include <tools/diagnose_ex.h>
 
 #include <numeric>
diff --git a/reportdesign/source/ui/misc/FunctionHelper.cxx 
b/reportdesign/source/ui/misc/FunctionHelper.cxx
index d5265a514bfb..5475671781f9 100644
--- a/reportdesign/source/ui/misc/FunctionHelper.cxx
+++ b/reportdesign/source/ui/misc/FunctionHelper.cxx
@@ -20,7 +20,6 @@
 #include <FunctionHelper.hxx>
 
 #include <o3tl/safeint.hxx>
-#include <osl/diagnose.h>
 #include <tools/diagnose_ex.h>
 #include <formula/funcvarargs.h>
 
diff --git a/reportdesign/source/ui/misc/RptUndo.cxx 
b/reportdesign/source/ui/misc/RptUndo.cxx
index 6e718e0e156a..e0c7df4dcb25 100644
--- a/reportdesign/source/ui/misc/RptUndo.cxx
+++ b/reportdesign/source/ui/misc/RptUndo.cxx
@@ -36,7 +36,6 @@
 #include <tools/diagnose_ex.h>
 
 #include <functional>
-#include <string_view>
 
 namespace rptui
 {
diff --git a/reportdesign/source/ui/report/ReportSection.cxx 
b/reportdesign/source/ui/report/ReportSection.cxx
index 57c1bddb2797..51a2d381e7d4 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -31,8 +31,8 @@
 
 #include <svx/svdpagv.hxx>
 #include <editeng/adjustitem.hxx>
+#include <editeng/eeitem.hxx>
 #include <svx/sdrpaintwindow.hxx>
-#include <svx/unoshape.hxx>
 #include <svx/gallery.hxx>
 #include <svx/svxids.hrc>
 #include <svx/svditer.hxx>
diff --git a/reportdesign/source/ui/report/StartMarker.cxx 
b/reportdesign/source/ui/report/StartMarker.cxx
index 150f7aff5156..3d05f2910050 100644
--- a/reportdesign/source/ui/report/StartMarker.cxx
+++ b/reportdesign/source/ui/report/StartMarker.cxx
@@ -24,7 +24,6 @@
 #include <ColorChanger.hxx>
 #include <ReportDefines.hxx>
 #include <SectionWindow.hxx>
-#include <helpids.h>
 #include <vcl/event.hxx>
 #include <vcl/help.hxx>
 #include <vcl/gradient.hxx>
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx 
b/reportdesign/source/ui/report/ViewsWindow.cxx
index f856654fed63..b5ce7a48fe60 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -35,7 +35,6 @@
 #include <RptObject.hxx>
 #include <EndMarker.hxx>
 #include <sal/log.hxx>
-#include <svx/unoshape.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
 #include <core_resource.hxx>
diff --git a/reportdesign/source/ui/report/dlgedfac.cxx 
b/reportdesign/source/ui/report/dlgedfac.cxx
index f7b8a27f64b4..820f3e8f7ff3 100644
--- a/reportdesign/source/ui/report/dlgedfac.cxx
+++ b/reportdesign/source/ui/report/dlgedfac.cxx
@@ -19,7 +19,6 @@
 #include <dlgedfac.hxx>
 #include <strings.hxx>
 #include <RptObject.hxx>
-#include <RptDef.hxx>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <osl/diagnose.h>
 

Reply via email to