tdf#42949 Fix IWYU warnings in sot/

Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I202a98d76a37a564315374893b44ec25ef7798b3
Reviewed-on: https://gerrit.libreoffice.org/73005
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
diff --git a/sot/IwyuFilter_sot.yaml b/sot/IwyuFilter_sot.yaml
new file mode 100644
index 0000000..42d48d5
--- /dev/null
+++ b/sot/IwyuFilter_sot.yaml
@@ -0,0 +1,13 @@
---
assumeFilename: sot/source/base/object.cxx
blacklist:
    sot/source/unoolestorage/xolesimplestorage.hxx:
    # Base class needs complete type
    - com/sun/star/embed/XOLESimpleStorage.hpp
    - com/sun/star/lang/XServiceInfo.hpp
    sot/source/sdstor/stgcache.hxx:
    # OSL_BIGENDIAN is being checked
    - osl/endian.h
    sot/source/sdstor/stgcache.cxx:
    # OSL_BIGENDIAN is being checked
    - osl/endian.h
diff --git a/sot/qa/cppunit/test_sot.cxx b/sot/qa/cppunit/test_sot.cxx
index 06e26c8..101013a 100644
--- a/sot/qa/cppunit/test_sot.cxx
+++ b/sot/qa/cppunit/test_sot.cxx
@@ -10,8 +10,6 @@
#include <unotest/filters-test.hxx>
#include <unotest/bootstrapfixturebase.hxx>

#include <osl/file.hxx>
#include <osl/process.h>
#include <sot/storage.hxx>
#include <sot/storinfo.hxx>
#include <sysformats.hxx>
diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx
index f6d5ee8..da90eef 100644
--- a/sot/source/base/exchange.cxx
+++ b/sot/source/base/exchange.cxx
@@ -20,15 +20,12 @@
#include <sal/config.h>

#include <tools/debug.hxx>
#include <tools/solar.h>
#include <tools/globname.hxx>
#include <sot/exchange.hxx>
#include <sot/formats.hxx>
#include <sysformats.hxx>
#include <comphelper/classids.hxx>
#include <rtl/instance.hxx>
#include <com/sun/star/datatransfer/DataFlavor.hpp>
#include <com/sun/star/uno/Sequence.hxx>
#include <comphelper/documentconstants.hxx>

#include <memory>
diff --git a/sot/source/base/filelist.cxx b/sot/source/base/filelist.cxx
index ac338885..9ccce2c 100644
--- a/sot/source/base/filelist.cxx
+++ b/sot/source/base/filelist.cxx
@@ -19,9 +19,7 @@

#include <rtl/ustrbuf.hxx>
#include <tools/stream.hxx>
#include <sot/exchange.hxx>
#include <sot/filelist.hxx>
#include <osl/thread.h>

/* Stream operators */

diff --git a/sot/source/base/formats.cxx b/sot/source/base/formats.cxx
index bb5ea3d..d26521f 100644
--- a/sot/source/base/formats.cxx
+++ b/sot/source/base/formats.cxx
@@ -17,7 +17,6 @@
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

#include <tools/solar.h>
#include <config_features.h>

#include <sot/exchange.hxx>
diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx
index f8715d7..5b52b4b 100644
--- a/sot/source/sdstor/stg.cxx
+++ b/sot/source/sdstor/stg.cxx
@@ -19,7 +19,6 @@


#include <sot/storinfo.hxx>
#include <sot/exchange.hxx>
#include <osl/file.hxx>
#include <unotools/tempfile.hxx>
#include <tools/stream.hxx>
@@ -27,14 +26,10 @@

#include <sot/stg.hxx>
#include "stgelem.hxx"
#include "stgcache.hxx"
#include "stgstrms.hxx"
#include "stgdir.hxx"
#include "stgio.hxx"
#include "stgole.hxx"

#include <memory>

static long nTmpCount = 0;

// The internal open mode is StreamMode::READ | StreamMode::TRUNC, which is silly
diff --git a/sot/source/sdstor/stgavl.hxx b/sot/source/sdstor/stgavl.hxx
index 5dd29a9..c78df17 100644
--- a/sot/source/sdstor/stgavl.hxx
+++ b/sot/source/sdstor/stgavl.hxx
@@ -20,6 +20,8 @@
#ifndef INCLUDED_SOT_SOURCE_SDSTOR_STGAVL_HXX
#define INCLUDED_SOT_SOURCE_SDSTOR_STGAVL_HXX

#include <sal/types.h>

// This is an abstract base class for nodes.
// Especially, the compare function must be implemented.

diff --git a/sot/source/sdstor/stgcache.cxx b/sot/source/sdstor/stgcache.cxx
index 5c03f89..ba5610f 100644
--- a/sot/source/sdstor/stgcache.cxx
+++ b/sot/source/sdstor/stgcache.cxx
@@ -23,11 +23,7 @@
#include <tools/solar.h>

#include <sot/stg.hxx>
#include "stgelem.hxx"
#include "stgcache.hxx"
#include "stgstrms.hxx"
#include "stgdir.hxx"
#include "stgio.hxx"

#include <algorithm>

diff --git a/sot/source/sdstor/stgcache.hxx b/sot/source/sdstor/stgcache.hxx
index b7cd8e4..17ae1a9 100644
--- a/sot/source/sdstor/stgcache.hxx
+++ b/sot/source/sdstor/stgcache.hxx
@@ -22,18 +22,15 @@

#include <osl/endian.h>
#include <rtl/ref.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include "stgelem.hxx"
#include <salhelper/simplereferenceobject.hxx>

#include <memory>
#include <unordered_map>
#include <functional>

class UCBStorageStream;
class StgPage;
class StgDirEntry;
class StorageBase;

class StgCache
diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx
index 71a1268..f31488f 100644
--- a/sot/source/sdstor/stgdir.cxx
+++ b/sot/source/sdstor/stgdir.cxx
@@ -18,11 +18,8 @@
 */


#include <string.h>

#include <sot/stg.hxx>
#include "stgelem.hxx"
#include "stgcache.hxx"
#include "stgstrms.hxx"
#include "stgdir.hxx"
#include "stgio.hxx"
diff --git a/sot/source/sdstor/stgdir.hxx b/sot/source/sdstor/stgdir.hxx
index b0d2c43..3605c27 100644
--- a/sot/source/sdstor/stgdir.hxx
+++ b/sot/source/sdstor/stgdir.hxx
@@ -25,8 +25,6 @@
#include "stgstrms.hxx"

class StgIo;
class StgEntry;
class StgDirEntry;
class StgDirStrm;

class BaseStorageStream;
diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx
index be22b5e..6ad0d9a 100644
--- a/sot/source/sdstor/stgelem.cxx
+++ b/sot/source/sdstor/stgelem.cxx
@@ -24,9 +24,6 @@
#include <unotools/charclass.hxx>
#include <sot/stg.hxx>
#include "stgelem.hxx"
#include "stgcache.hxx"
#include "stgstrms.hxx"
#include "stgdir.hxx"
#include "stgio.hxx"

static const sal_uInt16 nMaxLegalStr = 31;
diff --git a/sot/source/sdstor/stgio.cxx b/sot/source/sdstor/stgio.cxx
index 8ec356d..026881b 100644
--- a/sot/source/sdstor/stgio.cxx
+++ b/sot/source/sdstor/stgio.cxx
@@ -18,14 +18,12 @@
 */


#include <sot/stg.hxx>
#include "stgelem.hxx"
#include "stgcache.hxx"
#include "stgstrms.hxx"
#include "stgdir.hxx"
#include "stgio.hxx"
#include <o3tl/safeint.hxx>
#include <rtl/instance.hxx>
#include <sal/log.hxx>

#include <memory>
diff --git a/sot/source/sdstor/stgio.hxx b/sot/source/sdstor/stgio.hxx
index 8e09c6a..7ed5917 100644
--- a/sot/source/sdstor/stgio.hxx
+++ b/sot/source/sdstor/stgio.hxx
@@ -22,8 +22,6 @@

#include "stgcache.hxx"
#include "stgelem.hxx"
#include <tools/link.hxx>
#include <tools/solar.h>

class StgFATStrm;
class StgDataStrm;
diff --git a/sot/source/sdstor/stgole.cxx b/sot/source/sdstor/stgole.cxx
index 0b1aa0d..87a42b9 100644
--- a/sot/source/sdstor/stgole.cxx
+++ b/sot/source/sdstor/stgole.cxx
@@ -20,10 +20,9 @@
#include <memory>
#include <algorithm>

#include <rtl/string.h>
#include "stgelem.hxx"
#include "stgole.hxx"
#include <sot/storinfo.hxx>
#include <sot/exchange.hxx>

///////////////////////// class StgInternalStream

diff --git a/sot/source/sdstor/stgole.hxx b/sot/source/sdstor/stgole.hxx
index d75bc6c..b688882 100644
--- a/sot/source/sdstor/stgole.hxx
+++ b/sot/source/sdstor/stgole.hxx
@@ -21,10 +21,8 @@
#define INCLUDED_SOT_SOURCE_SDSTOR_STGOLE_HXX

#include <memory>
#include <string.h>

#include <sot/stg.hxx>
#include "stgelem.hxx"

class StgInternalStream : public SvStream
{
diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx
index a03b75c..3c80528 100644
--- a/sot/source/sdstor/stgstrms.cxx
+++ b/sot/source/sdstor/stgstrms.cxx
@@ -24,9 +24,7 @@
#include <o3tl/safeint.hxx>
#include <osl/file.hxx>
#include <unotools/tempfile.hxx>
#include <set>

#include <sot/stg.hxx>
#include "stgelem.hxx"
#include "stgcache.hxx"
#include "stgstrms.hxx"
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index 2325d26..62fed8c 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -24,7 +24,6 @@
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>

#include <rtl/digest.h>
#include <osl/file.hxx>
#include <sot/stg.hxx>
#include <sot/storinfo.hxx>
@@ -37,8 +36,6 @@
#include <unotools/ucbhelper.hxx>
#include <comphelper/fileformat.h>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <ucbhelper/content.hxx>

#include <memory>

diff --git a/sot/source/sdstor/storinfo.cxx b/sot/source/sdstor/storinfo.cxx
index 080e41d..c4c2114 100644
--- a/sot/source/sdstor/storinfo.cxx
+++ b/sot/source/sdstor/storinfo.cxx
@@ -18,9 +18,10 @@
 */


#include <sot/stg.hxx>
#include <sot/storinfo.hxx>
#include <sot/exchange.hxx>
#include <tools/stream.hxx>
#include <vcl/errcode.hxx>
#include <memory>

/************** class SvStorageInfo **************************************
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 59b9f97..f5dea72 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -20,11 +20,9 @@
#include <com/sun/star/io/NotConnectedException.hpp>
#include <com/sun/star/io/BufferSizeExceededException.hpp>
#include <com/sun/star/uno/RuntimeException.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <ucbhelper/content.hxx>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/ucb/NameClash.hpp>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <unotools/tempfile.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <com/sun/star/io/XInputStream.hpp>
@@ -32,7 +30,6 @@
#include <com/sun/star/ucb/ResultSetException.hpp>
#include <com/sun/star/uno/Sequence.h>
#include <com/sun/star/sdbc/XResultSet.hpp>
#include <com/sun/star/ucb/XContentAccess.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/ucb/CommandAbortedException.hpp>
#include <com/sun/star/datatransfer/DataFlavor.hpp>
@@ -45,16 +42,13 @@
#include <com/sun/star/ucb/ContentCreationException.hpp>

#include <memory>
#include <rtl/digest.h>
#include <osl/diagnose.h>
#include <osl/file.hxx>
#include <sal/log.hxx>
#include <tools/ref.hxx>
#include <tools/debug.hxx>
#include <unotools/streamhelper.hxx>
#include <unotools/streamwrap.hxx>
#include <unotools/ucbhelper.hxx>
#include <unotools/localfilehelper.hxx>
#include <tools/urlobj.hxx>
#include <comphelper/processfactory.hxx>
#include <cppuhelper/implbase.hxx>
@@ -62,13 +56,14 @@

#include <sot/stg.hxx>
#include <sot/storinfo.hxx>
#include <sot/storage.hxx>
#include <sot/exchange.hxx>
#include <sot/formats.hxx>
#include <comphelper/classids.hxx>

#include <vector>

namespace com::sun::star::ucb { class XCommandEnvironment; }

using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::uno;
diff --git a/sot/source/unoolestorage/xolesimplestorage.cxx b/sot/source/unoolestorage/xolesimplestorage.cxx
index 926b32e..aab550a 100644
--- a/sot/source/unoolestorage/xolesimplestorage.cxx
+++ b/sot/source/unoolestorage/xolesimplestorage.cxx
@@ -22,7 +22,6 @@
#include <com/sun/star/embed/OLESimpleStorage.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/NoSupportException.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/io/IOException.hpp>
#include <com/sun/star/io/XStream.hpp>
#include <com/sun/star/io/XInputStream.hpp>
@@ -30,10 +29,12 @@
#include <com/sun/star/io/XTruncate.hpp>
#include <com/sun/star/io/TempFile.hpp>

#include <comphelper/interfacecontainer2.hxx>
#include <comphelper/storagehelper.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <sot/stg.hxx>
#include <sot/storinfo.hxx>

using namespace ::com::sun::star;
diff --git a/sot/source/unoolestorage/xolesimplestorage.hxx b/sot/source/unoolestorage/xolesimplestorage.hxx
index 0dc2c61..ef0214b 100644
--- a/sot/source/unoolestorage/xolesimplestorage.hxx
+++ b/sot/source/unoolestorage/xolesimplestorage.hxx
@@ -22,21 +22,21 @@

#include <sal/config.h>

#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XStream.hpp>
#include <com/sun/star/embed/XOLESimpleStorage.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/embed/XTransactedObject.hpp>
#include <com/sun/star/embed/XClassifiedObject.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/implbase.hxx>
#include <comphelper/interfacecontainer2.hxx>

#include <osl/mutex.hxx>
#include <sot/stg.hxx>

namespace com::sun::star::container { class XNameAccess; }
namespace com::sun::star::io { class XInputStream; }
namespace com::sun::star::io { class XStream; }
namespace com::sun::star::lang { class XEventListener; }
namespace com::sun::star::uno { class XComponentContext; }
namespace comphelper { class OInterfaceContainerHelper2; }

class BaseStorage;
class SvStream;

class OLESimpleStorage : public cppu::WeakImplHelper<css::embed::XOLESimpleStorage, css::lang::XServiceInfo>
{