[Libreoffice-commits] core.git: helpcompiler/inc helpcompiler/IwyuFilter_helpcompiler.yaml helpcompiler/source

Gabor Kelemen (via logerrit) logerrit at kemper.freedesktop.org
Thu May 30 07:02:08 UTC 2019


 helpcompiler/IwyuFilter_helpcompiler.yaml |   20 ++++++++++++++++++++
 helpcompiler/inc/BasCodeTagger.hxx        |    6 ------
 helpcompiler/inc/HelpCompiler.hxx         |   17 ++++-------------
 helpcompiler/inc/HelpLinker.hxx           |    4 +++-
 helpcompiler/source/BasCodeTagger.cxx     |    1 +
 helpcompiler/source/HelpCompiler.cxx      |    5 ++---
 helpcompiler/source/HelpIndexer.cxx       |    4 ++--
 helpcompiler/source/HelpIndexer_main.cxx  |    2 --
 helpcompiler/source/HelpLinker.cxx        |   12 +++---------
 helpcompiler/source/HelpSearch.cxx        |    1 +
 helpcompiler/source/LuceneHelper.hxx      |    1 -
 11 files changed, 36 insertions(+), 37 deletions(-)

New commits:
commit c329a1c11299b999152b45343961e79e66be405a
Author:     Gabor Kelemen <kelemen.gabor2 at nisz.hu>
AuthorDate: Wed May 22 00:07:23 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Thu May 30 09:00:54 2019 +0200

    tdf#42949 Fix IWYU warnings in helpcompiler/
    
    Found with bin/find-unneeded-includes
    Only removal proposals are dealt with here.
    
    Change-Id: Ie7e20c77a8035c0ee4f0316966d163b9cd7d11f2
    Reviewed-on: https://gerrit.libreoffice.org/73006
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/helpcompiler/IwyuFilter_helpcompiler.yaml b/helpcompiler/IwyuFilter_helpcompiler.yaml
new file mode 100644
index 000000000000..e54447499c7c
--- /dev/null
+++ b/helpcompiler/IwyuFilter_helpcompiler.yaml
@@ -0,0 +1,20 @@
+---
+assumeFilename: helpcompiler/source/HelpCompiler.cxx
+blacklist:
+    helpcompiler/inc/HelpCompiler.hxx:
+    # Needed on WIN32
+    - o3tl/char16_t2wchar_t.hxx
+    helpcompiler/source/LuceneHelper.hxx:
+    # Better to keep the generic header, MSVC problem
+    - CLucene.h
+    helpcompiler/source/HelpIndexer.cxx:
+    # Better to keep the generic, details are order-sensitive
+    - CLucene.h
+    helpcompiler/source/HelpSearch.cxx:
+    # Better to keep the generic, details are order-sensitive
+    - CLucene.h
+    # Don't propose hxx -> h change in URE libs
+    - osl/thread.hxx
+    helpcompiler/source/HelpLinker.cxx:
+    # Needed on WIN32
+    - o3tl/char16_t2wchar_t.hxx
diff --git a/helpcompiler/inc/BasCodeTagger.hxx b/helpcompiler/inc/BasCodeTagger.hxx
index 228f86fd6a18..93dfd70f137b 100644
--- a/helpcompiler/inc/BasCodeTagger.hxx
+++ b/helpcompiler/inc/BasCodeTagger.hxx
@@ -10,19 +10,13 @@
 #ifndef INCLUDED_HELPCOMPILER_INC_BASCODETAGGER_HXX
 #define INCLUDED_HELPCOMPILER_INC_BASCODETAGGER_HXX
 
-#include <iostream>
-#include <cstdlib>
-#include <string>
 #include <deque>
 #include <memory>
 #include <vector>
-#include <libxml/xmlmemory.h>
 #include <libxml/parser.h>
-#include <rtl/ustring.hxx>
 #include <comphelper/syntaxhighlight.hxx>
 #include <helpcompiler/dllapi.h>
 
-class BasicCodeTagger;
 class LibXmlTreeWalker;
 
 //!Tagger class.
diff --git a/helpcompiler/inc/HelpCompiler.hxx b/helpcompiler/inc/HelpCompiler.hxx
index ecd54ede9d0f..91c1b2f59e65 100644
--- a/helpcompiler/inc/HelpCompiler.hxx
+++ b/helpcompiler/inc/HelpCompiler.hxx
@@ -22,29 +22,20 @@
 
 #include <sal/config.h>
 
+#include <deque>
+#include <memory>
 #include <string>
 #include <unordered_map>
 #include <vector>
-#include <list>
-#include <fstream>
-#include <sstream>
-#include <algorithm>
-
-#include <libxml/xmlmemory.h>
-#include <libxml/debugXML.h>
-#include <libxml/HTMLtree.h>
-#include <libxml/xmlIO.h>
-#include <libxml/xinclude.h>
-#include <libxml/catalog.h>
+
+#include <libxml/parser.h>
 
 #include <rtl/ustring.hxx>
 #include <rtl/character.hxx>
-#include <osl/thread.h>
 #include <osl/process.h>
 #include <osl/file.hxx>
 #include <o3tl/char16_t2wchar_t.hxx>
 
-#include "BasCodeTagger.hxx"
 #include <helpcompiler/compilehelp.hxx>
 
 #if OSL_DEBUG_LEVEL > 2
diff --git a/helpcompiler/inc/HelpLinker.hxx b/helpcompiler/inc/HelpLinker.hxx
index 6b338e1eb1e4..076141e39b92 100644
--- a/helpcompiler/inc/HelpLinker.hxx
+++ b/helpcompiler/inc/HelpLinker.hxx
@@ -21,8 +21,10 @@
 #define INCLUDED_HELPCOMPILER_INC_HELPLINKER_HXX
 
 #include <memory>
+#include <vector>
 #include <helpcompiler/dllapi.h>
-#include <libxslt/transform.h>
+#include "HelpCompiler.hxx"
+#include <libxslt/xsltInternals.h>
 
 #ifdef AIX
 #    undef _THREAD_SAFE
diff --git a/helpcompiler/source/BasCodeTagger.cxx b/helpcompiler/source/BasCodeTagger.cxx
index 369c49c389d5..1b4797b403b9 100644
--- a/helpcompiler/source/BasCodeTagger.cxx
+++ b/helpcompiler/source/BasCodeTagger.cxx
@@ -8,6 +8,7 @@
  */
 
 #include <BasCodeTagger.hxx>
+#include <iostream>
 
 LibXmlTreeWalker::LibXmlTreeWalker( xmlDocPtr doc )
 {
diff --git a/helpcompiler/source/HelpCompiler.cxx b/helpcompiler/source/HelpCompiler.cxx
index b612071aba18..70159a2c65fd 100644
--- a/helpcompiler/source/HelpCompiler.cxx
+++ b/helpcompiler/source/HelpCompiler.cxx
@@ -18,16 +18,15 @@
  */
 
 
+#include <algorithm>
 #include <memory>
 #include <HelpCompiler.hxx>
 #include <BasCodeTagger.hxx>
-#include <limits.h>
+#include <iostream>
 #include <stdlib.h>
 #include <string.h>
-#include <libxslt/xslt.h>
 #include <libxslt/xsltInternals.h>
 #include <libxslt/transform.h>
-#include <libxslt/xsltutils.h>
 #include <osl/thread.hxx>
 #include <chrono>
 #include <rtl/character.hxx>
diff --git a/helpcompiler/source/HelpIndexer.cxx b/helpcompiler/source/HelpIndexer.cxx
index 25ff6ef0b09e..d8f0b82a4f20 100644
--- a/helpcompiler/source/HelpIndexer.cxx
+++ b/helpcompiler/source/HelpIndexer.cxx
@@ -11,14 +11,14 @@
 
 #include <rtl/string.hxx>
 #include <rtl/uri.hxx>
-#include <rtl/ustrbuf.hxx>
 #include <o3tl/runtimetooustring.hxx>
 #include <osl/file.hxx>
 #include <osl/thread.h>
-#include <algorithm>
 #include <memory>
 
 #include "LuceneHelper.hxx"
+#include <CLucene.h>
+#include <CLucene/analysis/LanguageBasedAnalyzer.h>
 
 using namespace lucene::document;
 
diff --git a/helpcompiler/source/HelpIndexer_main.cxx b/helpcompiler/source/HelpIndexer_main.cxx
index eb1220c34c2b..0919e89eb004 100644
--- a/helpcompiler/source/HelpIndexer_main.cxx
+++ b/helpcompiler/source/HelpIndexer_main.cxx
@@ -14,8 +14,6 @@
 #include <string>
 #include <iostream>
 
-#include "LuceneHelper.hxx"
-
 int main(int argc, char **argv)
 {
     try
diff --git a/helpcompiler/source/HelpLinker.cxx b/helpcompiler/source/HelpLinker.cxx
index f32e242f0867..fc5894b080ad 100644
--- a/helpcompiler/source/HelpLinker.cxx
+++ b/helpcompiler/source/HelpLinker.cxx
@@ -20,20 +20,14 @@
 #include <HelpCompiler.hxx>
 #include <HelpLinker.hxx>
 
-#include <map>
+#include <algorithm>
+#include <fstream>
 
 #include <string.h>
-#include <limits.h>
 
-#include <libxslt/xslt.h>
-#include <libxslt/xsltutils.h>
-#include <libxslt/functions.h>
-#include <libxslt/extensions.h>
+#include <libxslt/transform.h>
 
-#include <sal/main.h>
 #include <sal/types.h>
-#include <osl/time.h>
-#include <rtl/bootstrap.hxx>
 #include <o3tl/char16_t2wchar_t.hxx>
 #include <sal/log.hxx>
 
diff --git a/helpcompiler/source/HelpSearch.cxx b/helpcompiler/source/HelpSearch.cxx
index 75a15bc4fcf0..982e672c4573 100644
--- a/helpcompiler/source/HelpSearch.cxx
+++ b/helpcompiler/source/HelpSearch.cxx
@@ -12,6 +12,7 @@
 #include <osl/thread.hxx>
 
 #include "LuceneHelper.hxx"
+#include <CLucene.h>
 
 HelpSearch::HelpSearch(OUString const &indexDir)
 {
diff --git a/helpcompiler/source/LuceneHelper.hxx b/helpcompiler/source/LuceneHelper.hxx
index dae1f2462f86..a84346e25faf 100644
--- a/helpcompiler/source/LuceneHelper.hxx
+++ b/helpcompiler/source/LuceneHelper.hxx
@@ -15,7 +15,6 @@
 #endif
 
 #include <CLucene.h>
-#include <CLucene/analysis/LanguageBasedAnalyzer.h>
 
 #if defined(__GNUC__)
 #  pragma GCC visibility pop


More information about the Libreoffice-commits mailing list