[Libreoffice-commits] core.git: sot/IwyuFilter_sot.yaml sot/qa sot/source

Gabor Kelemen (via logerrit) logerrit at kemper.freedesktop.org
Tue May 28 10:25:29 UTC 2019


 sot/IwyuFilter_sot.yaml                        |   13 +++++++++++++
 sot/qa/cppunit/test_sot.cxx                    |    2 --
 sot/source/base/exchange.cxx                   |    3 ---
 sot/source/base/filelist.cxx                   |    2 --
 sot/source/base/formats.cxx                    |    1 -
 sot/source/sdstor/stg.cxx                      |    5 -----
 sot/source/sdstor/stgavl.hxx                   |    2 ++
 sot/source/sdstor/stgcache.cxx                 |    4 ----
 sot/source/sdstor/stgcache.hxx                 |    3 ---
 sot/source/sdstor/stgdir.cxx                   |    3 ---
 sot/source/sdstor/stgdir.hxx                   |    2 --
 sot/source/sdstor/stgelem.cxx                  |    3 ---
 sot/source/sdstor/stgio.cxx                    |    2 --
 sot/source/sdstor/stgio.hxx                    |    2 --
 sot/source/sdstor/stgole.cxx                   |    3 +--
 sot/source/sdstor/stgole.hxx                   |    2 --
 sot/source/sdstor/stgstrms.cxx                 |    2 --
 sot/source/sdstor/storage.cxx                  |    3 ---
 sot/source/sdstor/storinfo.cxx                 |    3 ++-
 sot/source/sdstor/ucbstorage.cxx               |    9 ++-------
 sot/source/unoolestorage/xolesimplestorage.cxx |    3 ++-
 sot/source/unoolestorage/xolesimplestorage.hxx |   20 ++++++++++----------
 22 files changed, 32 insertions(+), 60 deletions(-)

New commits:
commit e43f0657f19f9de8d351bb6b416b7fd7f570e3ff
Author:     Gabor Kelemen <kelemen.gabor2 at nisz.hu>
AuthorDate: Wed May 22 23:05:03 2019 +0200
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Tue May 28 12:24:40 2019 +0200

    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 at cib.de>

diff --git a/sot/IwyuFilter_sot.yaml b/sot/IwyuFilter_sot.yaml
new file mode 100644
index 000000000000..42d48d538f59
--- /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 06e26c806eb1..101013a8fb2c 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 f6d5ee8ca633..da90eef263d7 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 ac3388858643..9ccce2cc2bb5 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 bb5ea3dcae16..d26521fd31e8 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 f8715d71408a..5b52b4b3683a 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 5dd29a988f30..c78df17229cd 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 5c03f89cc4fd..ba5610f706b5 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 b7cd8e4d25f0..17ae1a9d4b88 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 71a1268cb84d..f31488fd07c2 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 b0d2c43cf511..3605c27ac03d 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 be22b5e44b6e..6ad0d9a6f438 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 8ec356d20699..026881b9a7d7 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 8e09c6ae1c09..7ed5917ac63e 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 0b1aa0d6a80d..87a42b92f61b 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 d75bc6c00321..b6888823e4af 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 a03b75ccbe42..3c805283cb4b 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 2325d261108d..62fed8cfa692 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 080e41d3e83e..c4c21145f815 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 59b9f97f1e85..f5dea724f153 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 926b32e08cf8..aab550a0a525 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 0dc2c6160a58..ef0214ba61c3 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>
 {


More information about the Libreoffice-commits mailing list