From 8a1c18823c6e74b62c43cfe4fa72c87c36855d85 Mon Sep 17 00:00:00 2001 From: Gabor Kelemen Date: Wed, 13 Feb 2019 23:20:21 +0100 Subject: tdf#42949 Fix IWYU warnings in include/linguistic/ Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Iec1ca76e9b3a0896a732ab2b7fd34dd5a7f219fb Reviewed-on: https://gerrit.libreoffice.org/68367 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- cui/source/dialogs/SpellDialog.cxx | 1 + cui/source/options/optlingu.cxx | 2 ++ include/IwyuFilter_include.yaml | 15 +++++++++++++++ include/linguistic/lngprophelp.hxx | 3 ++- include/linguistic/lngprops.hxx | 2 -- include/linguistic/misc.hxx | 20 ++++++++++---------- include/linguistic/spelldta.hxx | 7 +------ .../source/hyphenator/hyphen/hyphenimp.cxx | 2 ++ .../source/spellcheck/macosxspell/macspellimp.mm | 1 + lingucomponent/source/spellcheck/spell/sspellimp.cxx | 2 ++ lingucomponent/source/thesaurus/libnth/nthesdta.cxx | 1 - lingucomponent/source/thesaurus/libnth/nthesimp.cxx | 2 ++ linguistic/source/convdic.cxx | 1 + linguistic/source/dicimp.cxx | 1 + linguistic/source/hhconvdic.cxx | 2 +- linguistic/source/iprcache.cxx | 2 +- linguistic/source/lngprophelp.cxx | 2 ++ linguistic/source/misc.cxx | 2 ++ linguistic/source/spelldta.cxx | 1 + linguistic/source/thesdsp.cxx | 1 + sw/source/core/edit/edlingu.cxx | 1 + 21 files changed, 49 insertions(+), 22 deletions(-) diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 8b41f7fd8eea..6f5432a63786 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -56,6 +56,7 @@ #include #include #include +#include using namespace ::com::sun::star; using namespace ::com::sun::star::uno; diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 0cdce26495df..1d4f603dec79 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -21,8 +21,10 @@ #include #include #include +#include #include #include +#include #include #include #include diff --git a/include/IwyuFilter_include.yaml b/include/IwyuFilter_include.yaml index 5bfdcf17c53a..c86fba0b1e83 100644 --- a/include/IwyuFilter_include.yaml +++ b/include/IwyuFilter_include.yaml @@ -560,3 +560,18 @@ blacklist: # base class has to be a complete type - com/sun/star/lang/XServiceInfo.hpp - com/sun/star/rendering/XParametricPolyPolygon2D.hpp + include/linguistic/hyphdta.hxx: + # base class has to be a complete type + - com/sun/star/linguistic2/XHyphenatedWord.hpp + - com/sun/star/linguistic2/XPossibleHyphens.hpp + include/linguistic/lngprophelp.hxx: + # base class has to be a complete type + - com/sun/star/beans/XPropertyChangeListener.hpp + - com/sun/star/linguistic2/XLinguServiceEventBroadcaster.hpp + include/linguistic/spelldta.hxx: + # base class has to be a complete type + - com/sun/star/linguistic2/XSetSpellAlternatives.hpp + - com/sun/star/linguistic2/XSpellAlternatives.hpp + include/linguistic/misc.hxx: + # base class has to be a complete type + - com/sun/star/frame/XTerminateListener.hpp diff --git a/include/linguistic/lngprophelp.hxx b/include/linguistic/lngprophelp.hxx index f86d810e159c..8474767488fe 100644 --- a/include/linguistic/lngprophelp.hxx +++ b/include/linguistic/lngprophelp.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -37,6 +36,8 @@ namespace com { namespace sun { namespace star { namespace linguistic2 { struct LinguServiceEvent; }}}} +namespace com::sun::star::linguistic2 { class XLinguProperties; } + namespace linguistic { diff --git a/include/linguistic/lngprops.hxx b/include/linguistic/lngprops.hxx index af73f3bdb66a..94278fd16947 100644 --- a/include/linguistic/lngprops.hxx +++ b/include/linguistic/lngprops.hxx @@ -20,8 +20,6 @@ #ifndef INCLUDED_LINGUISTIC_LNGPROPS_HXX #define INCLUDED_LINGUISTIC_LNGPROPS_HXX -#include - // maximal number of suggestions to be returned in spelling context-menu // (may not include results added by looking up user dictionaries) #define UPN_MAX_NUMBER_OF_SUGGESTIONS "MaxNumberOfSuggestions" diff --git a/include/linguistic/misc.hxx b/include/linguistic/misc.hxx index c2d4849e42d3..80b52116ab4f 100644 --- a/include/linguistic/misc.hxx +++ b/include/linguistic/misc.hxx @@ -25,30 +25,30 @@ #include #include #include -#include -#include -#include -#include -#include #include -#include #include #include -#include -#include -#include #include +#include + namespace com { namespace sun { namespace star { namespace beans { class XPropertySet; - class XFastPropertySet; }}}} namespace com { namespace sun { namespace star { namespace frame { class XDesktop2; }}}} +namespace com::sun::star::linguistic2 { class XDictionary; } +namespace com::sun::star::linguistic2 { class XDictionaryEntry; } +namespace com::sun::star::linguistic2 { class XHyphenatedWord; } +namespace com::sun::star::linguistic2 { class XLinguProperties; } +namespace com::sun::star::linguistic2 { class XSearchableDictionaryList; } +namespace osl { class Mutex; } + +class CharClass; class LocaleDataWrapper; diff --git a/include/linguistic/spelldta.hxx b/include/linguistic/spelldta.hxx index 11bb9a1ec9c1..1f0ecf6b37a7 100644 --- a/include/linguistic/spelldta.hxx +++ b/include/linguistic/spelldta.hxx @@ -23,16 +23,11 @@ #include #include #include -#include #include #include #include -namespace com { namespace sun { namespace star { - namespace linguistic2 { - class XDictionaryList; - } -} } } +namespace com::sun::star::linguistic2 { class XSearchableDictionaryList; } namespace linguistic diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx index 181d6a8bb0f4..ebd9f179b90f 100644 --- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx +++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx @@ -23,9 +23,11 @@ #include #include #include +#include #include #include #include +#include #include #include "hyphenimp.hxx" diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm index a141b8752ac9..02b130e67c95 100644 --- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm +++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index 1a6bb0390f9d..1f6c46a27a69 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -29,6 +30,7 @@ #include #include #include +#include #include #include diff --git a/lingucomponent/source/thesaurus/libnth/nthesdta.cxx b/lingucomponent/source/thesaurus/libnth/nthesdta.cxx index c01584eff8c5..aa7d2afa7f8d 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesdta.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesdta.cxx @@ -22,7 +22,6 @@ #include "nthesdta.hxx" #include -using namespace utl; using namespace osl; using namespace com::sun::star; using namespace com::sun::star::beans; diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx index e2331c2e20ce..1fae95a2a4db 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx @@ -24,12 +24,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx index 3c574212044e..071cb8d310df 100644 --- a/linguistic/source/convdic.cxx +++ b/linguistic/source/convdic.cxx @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx index 100c9cab7f06..b99f632c9842 100644 --- a/linguistic/source/dicimp.cxx +++ b/linguistic/source/dicimp.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/linguistic/source/hhconvdic.cxx b/linguistic/source/hhconvdic.cxx index 801af0800947..900a8b7d901f 100644 --- a/linguistic/source/hhconvdic.cxx +++ b/linguistic/source/hhconvdic.cxx @@ -27,13 +27,13 @@ #include #include #include +#include #include #include "hhconvdic.hxx" #include #include "defs.hxx" -using namespace utl; using namespace osl; using namespace com::sun::star; using namespace com::sun::star::lang; diff --git a/linguistic/source/iprcache.cxx b/linguistic/source/iprcache.cxx index e7c677c2bde6..f0a992bb5e20 100644 --- a/linguistic/source/iprcache.cxx +++ b/linguistic/source/iprcache.cxx @@ -26,8 +26,8 @@ #include #include #include +#include -using namespace utl; using namespace osl; using namespace com::sun::star; using namespace com::sun::star::beans; diff --git a/linguistic/source/lngprophelp.cxx b/linguistic/source/lngprophelp.cxx index d1368b1e3a62..608020f8f3b3 100644 --- a/linguistic/source/lngprophelp.cxx +++ b/linguistic/source/lngprophelp.cxx @@ -25,8 +25,10 @@ #include #include #include +#include #include #include +#include #include #include diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx index 0374d38f0729..29ad163ca912 100644 --- a/linguistic/source/misc.cxx +++ b/linguistic/source/misc.cxx @@ -37,6 +37,8 @@ #include #include #include +#include +#include #include #include #include diff --git a/linguistic/source/spelldta.cxx b/linguistic/source/spelldta.cxx index 7a0bc0f5d183..b57a570b38d6 100644 --- a/linguistic/source/spelldta.cxx +++ b/linguistic/source/spelldta.cxx @@ -21,6 +21,7 @@ #include #include #include +#include #include #include diff --git a/linguistic/source/thesdsp.cxx b/linguistic/source/thesdsp.cxx index cdb5a77af8e4..2ca199e567db 100644 --- a/linguistic/source/thesdsp.cxx +++ b/linguistic/source/thesdsp.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index d976285292ae..4a5d39addb27 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -27,6 +27,7 @@ #include #include +#include #include #include #include -- cgit