summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorGabor Kelemen <kelemeng@ubuntu.com>2022-01-24 00:17:20 +0100
committerThorsten Behrens <thorsten.behrens@allotropia.de>2022-01-30 16:10:57 +0100
commit7b5193e2ae9eceba881163787b98c90f2310056d (patch)
tree8bbd62c065d2ba8c67d41c5236b2fcb77136f1c2 /package
parent026e2f437e969d75209ed05211e7f02349035b98 (diff)
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.behrens@allotropia.de>
Diffstat (limited to 'package')
-rw-r--r--package/IwyuFilter_package.yaml24
-rw-r--r--package/inc/ByteChucker.hxx5
-rw-r--r--package/inc/ByteGrabber.hxx5
-rw-r--r--package/inc/CRC32.hxx2
-rw-r--r--package/inc/PackageConstants.hxx1
-rw-r--r--package/inc/ThreadedDeflater.hxx2
-rw-r--r--package/inc/ZipFile.hxx6
-rw-r--r--package/inc/ZipPackage.hxx3
-rw-r--r--package/inc/ZipPackageEntry.hxx1
-rw-r--r--package/inc/ZipPackageStream.hxx1
-rw-r--r--package/inc/zipfileaccess.hxx4
-rw-r--r--package/source/manifest/ManifestDefines.hxx2
-rw-r--r--package/source/manifest/ManifestExport.cxx3
-rw-r--r--package/source/manifest/ManifestExport.hxx1
-rw-r--r--package/source/manifest/ManifestImport.cxx2
-rw-r--r--package/source/manifest/ManifestImport.hxx3
-rw-r--r--package/source/manifest/ManifestReader.cxx4
-rw-r--r--package/source/manifest/ManifestReader.hxx1
-rw-r--r--package/source/manifest/ManifestWriter.cxx5
-rw-r--r--package/source/manifest/ManifestWriter.hxx1
-rw-r--r--package/source/xstor/ocompinstream.cxx1
-rw-r--r--package/source/xstor/ocompinstream.hxx2
-rw-r--r--package/source/xstor/owriteablestream.cxx3
-rw-r--r--package/source/xstor/owriteablestream.hxx3
-rw-r--r--package/source/xstor/selfterminatefilestream.hxx1
-rw-r--r--package/source/xstor/switchpersistencestream.hxx5
-rw-r--r--package/source/xstor/xfactory.cxx2
-rw-r--r--package/source/xstor/xfactory.hxx1
-rw-r--r--package/source/xstor/xstorage.cxx3
-rw-r--r--package/source/xstor/xstorage.hxx5
-rw-r--r--package/source/zipapi/ByteChucker.cxx2
-rw-r--r--package/source/zipapi/ByteGrabber.cxx2
-rw-r--r--package/source/zipapi/MemoryByteGrabber.hxx4
-rw-r--r--package/source/zipapi/XBufferedThreadedStream.cxx3
-rw-r--r--package/source/zipapi/XBufferedThreadedStream.hxx7
-rw-r--r--package/source/zipapi/XUnbufferedStream.cxx2
-rw-r--r--package/source/zipapi/XUnbufferedStream.hxx2
-rw-r--r--package/source/zipapi/ZipFile.cxx13
-rw-r--r--package/source/zipapi/ZipOutputEntry.cxx3
-rw-r--r--package/source/zipapi/ZipOutputStream.cxx3
-rw-r--r--package/source/zippackage/ZipPackage.cxx12
-rw-r--r--package/source/zippackage/ZipPackageEntry.cxx1
-rw-r--r--package/source/zippackage/ZipPackageFolder.cxx8
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx10
-rw-r--r--package/source/zippackage/zipfileaccess.cxx2
45 files changed, 59 insertions, 117 deletions
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>