tdf#42949 Fix IWYU warnings in linguistic/

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

Change-Id: Ida2903087ae5752a65c0ce099449645d91a83f29
Reviewed-on: https://gerrit.libreoffice.org/81971
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
diff --git a/linguistic/IwyuFilter_linguistic.yaml b/linguistic/IwyuFilter_linguistic.yaml
new file mode 100644
index 0000000..8e69f24
--- /dev/null
+++ b/linguistic/IwyuFilter_linguistic.yaml
@@ -0,0 +1,6 @@
---
assumeFilename: linguistic/source/lngsvcmgr.cxx
blacklist:
    linguistic/source/hyphdsp.cxx:
    # Needed for direct member access
    - com/sun/star/linguistic2/XLinguProperties.hpp
diff --git a/linguistic/inc/iprcache.hxx b/linguistic/inc/iprcache.hxx
index 10c47b5..434a4dc 100644
--- a/linguistic/inc/iprcache.hxx
+++ b/linguistic/inc/iprcache.hxx
@@ -23,15 +23,12 @@
#include <cppuhelper/implbase.hxx>

#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/document/XEventListener.hpp>
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/linguistic2/XDictionaryListEventListener.hpp>
#include <com/sun/star/linguistic2/XSearchableDictionaryList.hpp>
#include <com/sun/star/linguistic2/XLinguProperties.hpp>

#include <rtl/ref.hxx>
#include <rtl/string.hxx>
#include <i18nlangtag/lang.h>

#include <set>
diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx
index 3e9ec1b..1a7b559 100644
--- a/linguistic/source/convdic.cxx
+++ b/linguistic/source/convdic.cxx
@@ -26,7 +26,6 @@
#include <tools/debug.hxx>
#include <tools/stream.hxx>
#include <tools/urlobj.hxx>
#include <ucbhelper/content.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
#include <cppuhelper/supportsservice.hxx>
@@ -35,19 +34,13 @@

#include <com/sun/star/linguistic2/ConversionPropertyType.hpp>
#include <com/sun/star/util/XFlushable.hpp>
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/lang/EventObject.hpp>
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/util/XFlushListener.hpp>
#include <com/sun/star/io/IOException.hpp>
#include <com/sun/star/io/XActiveDataSource.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/xml/sax/Writer.hpp>
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/xml/sax/InputSource.hpp>
#include <com/sun/star/xml/sax/Parser.hpp>
#include <com/sun/star/xml/sax/SAXParseException.hpp>
diff --git a/linguistic/source/convdic.hxx b/linguistic/source/convdic.hxx
index 1a93599..23d51f8 100644
--- a/linguistic/source/convdic.hxx
+++ b/linguistic/source/convdic.hxx
@@ -25,12 +25,11 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase.hxx>
#include <comphelper/interfacecontainer2.hxx>
#include <i18nlangtag/lang.h>

#include <memory>
#include <set>
#include <unordered_map>
#include <linguistic/misc.hxx>
#include "defs.hxx"

// text conversion dictionary extension
#define CONV_DIC_EXT            "tcd"
diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx
index d110dd4..79ea6f6 100644
--- a/linguistic/source/convdiclist.cxx
+++ b/linguistic/source/convdiclist.cxx
@@ -24,32 +24,24 @@
#include <com/sun/star/lang/NoSupportException.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/linguistic2/ConversionDictionaryType.hpp>
#include <com/sun/star/linguistic2/XConversionDictionary.hpp>
#include <com/sun/star/linguistic2/XConversionDictionaryList.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/util/XFlushable.hpp>
#include <com/sun/star/ucb/CommandAbortedException.hpp>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <sal/log.hxx>
#include <rtl/instance.hxx>
#include <tools/debug.hxx>
#include <tools/stream.hxx>
#include <tools/urlobj.hxx>
#include <ucbhelper/content.hxx>
#include <unotools/localfilehelper.hxx>
#include <unotools/lingucfg.hxx>
#include <unotools/pathoptions.hxx>
#include <unotools/useroptions.hxx>
#include <tools/diagnose_ex.h>

#include "convdic.hxx"
#include "convdiclist.hxx"
#include "defs.hxx"
#include "hhconvdic.hxx"
#include "lngreg.hxx"
#include <linguistic/misc.hxx>
diff --git a/linguistic/source/convdiclist.hxx b/linguistic/source/convdiclist.hxx
index 971be9e..52ebbd4 100644
--- a/linguistic/source/convdiclist.hxx
+++ b/linguistic/source/convdiclist.hxx
@@ -24,11 +24,10 @@
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <comphelper/interfacecontainer2.hxx>
#include <rtl/ref.hxx>

#include <linguistic/misc.hxx>
#include "lngopt.hxx"


class ConvDicNameContainer;
diff --git a/linguistic/source/convdicxml.cxx b/linguistic/source/convdicxml.cxx
index 55f5140..f4165abc 100644
--- a/linguistic/source/convdicxml.cxx
+++ b/linguistic/source/convdicxml.cxx
@@ -19,19 +19,11 @@

#include <tools/debug.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <tools/stream.hxx>
#include <ucbhelper/content.hxx>

#include <cppuhelper/factory.hxx>
#include <com/sun/star/linguistic2/ConversionDictionaryType.hpp>
#include <com/sun/star/linguistic2/ConversionPropertyType.hpp>
#include <com/sun/star/util/XFlushable.hpp>
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/lang/EventObject.hpp>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/util/XFlushListener.hpp>
#include <com/sun/star/io/XActiveDataSource.hpp>
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <xmloff/nmspmap.hxx>
@@ -41,7 +33,6 @@
#include "convdic.hxx"
#include "convdicxml.hxx"
#include <linguistic/misc.hxx>
#include "defs.hxx"

using namespace std;
using namespace utl;
diff --git a/linguistic/source/convdicxml.hxx b/linguistic/source/convdicxml.hxx
index 62ec13a..39c3c86 100644
--- a/linguistic/source/convdicxml.hxx
+++ b/linguistic/source/convdicxml.hxx
@@ -20,9 +20,7 @@
#ifndef INCLUDED_LINGUISTIC_SOURCE_CONVDICXML_HXX
#define INCLUDED_LINGUISTIC_SOURCE_CONVDICXML_HXX

#include <com/sun/star/util/XFlushable.hpp>
#include <com/sun/star/util/MeasureUnit.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <com/sun/star/xml/sax/FastToken.hpp>
#include <comphelper/processfactory.hxx>
@@ -30,10 +28,7 @@
#include <xmloff/xmlimp.hxx>
#include <xmloff/xmltoken.hxx>
#include <xmloff/xmlnmspe.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <rtl/ustring.hxx>
#include <linguistic/misc.hxx>
#include "defs.hxx"


class ConvDic;
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index 423923a..328871f 100644
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.cxx
@@ -20,9 +20,9 @@

#include <cppuhelper/factory.hxx>
#include "dicimp.hxx"
#include "hyphdsp.hxx"
#include <i18nlangtag/lang.h>
#include <i18nlangtag/languagetag.hxx>
#include <linguistic/misc.hxx>
#include <osl/mutex.hxx>
#include <osl/thread.h>
#include <sal/log.hxx>
@@ -35,12 +35,9 @@
#include <unotools/ucbstreamhelper.hxx>

#include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <com/sun/star/linguistic2/DictionaryType.hpp>
#include <com/sun/star/linguistic2/DictionaryEventFlags.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/io/TempFile.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XOutputStream.hpp>

#include <com/sun/star/linguistic2/LinguServiceManager.hpp>
#include <com/sun/star/linguistic2/XSpellChecker1.hpp>
diff --git a/linguistic/source/dicimp.hxx b/linguistic/source/dicimp.hxx
index 99560ff..3722173 100644
--- a/linguistic/source/dicimp.hxx
+++ b/linguistic/source/dicimp.hxx
@@ -22,15 +22,13 @@

#include <com/sun/star/linguistic2/XDictionary.hpp>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>

#include <cppuhelper/implbase.hxx>
#include <comphelper/interfacecontainer2.hxx>
#include <tools/solar.h>
#include <i18nlangtag/lang.h>
#include <vcl/errcode.hxx>

#include "defs.hxx"
#include <linguistic/misc.hxx>

#define DIC_MAX_ENTRIES     30000

diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index c876a5e..d97957a 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -24,7 +24,6 @@
#include <tools/debug.hxx>
#include <tools/stream.hxx>
#include <tools/urlobj.hxx>
#include <unotools/pathoptions.hxx>
#include <unotools/useroptions.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <unotools/localfilehelper.hxx>
@@ -32,12 +31,10 @@
#include <comphelper/sequence.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/linguistic2/DictionaryEventFlags.hpp>
#include <com/sun/star/linguistic2/DictionaryListEventFlags.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <svtools/strings.hrc>
#include <unotools/resmgr.hxx>
diff --git a/linguistic/source/dlistimp.hxx b/linguistic/source/dlistimp.hxx
index 73de31b..3039f6e 100644
--- a/linguistic/source/dlistimp.hxx
+++ b/linguistic/source/dlistimp.hxx
@@ -25,7 +25,6 @@
#include <com/sun/star/lang/XServiceInfo.hpp>

#include <cppuhelper/implbase.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <rtl/ref.hxx>

#include <vector>
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index d0c51f9..81c1ce9 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -18,13 +18,12 @@
 */

#include <sal/macros.h>
#include <com/sun/star/container/XContentEnumerationAccess.hpp>
#include <com/sun/star/container/XEnumeration.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/ElementExistException.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/container/XNameReplace.hpp>
#include <com/sun/star/configuration/theDefaultProvider.hpp>
#include <com/sun/star/i18n/BreakIterator.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -35,23 +34,17 @@
#include <com/sun/star/linguistic2/ProofreadingResult.hpp>
#include <com/sun/star/linguistic2/LinguServiceEvent.hpp>
#include <com/sun/star/linguistic2/LinguServiceEventFlags.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/text/TextMarkupType.hpp>
#include <com/sun/star/text/TextMarkupDescriptor.hpp>
#include <com/sun/star/text/XTextMarkup.hpp>
#include <com/sun/star/text/XMultiTextMarkup.hpp>
#include <com/sun/star/text/XFlatParagraph.hpp>
#include <com/sun/star/text/XFlatParagraphIterator.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>

#include <sal/config.h>
#include <sal/log.hxx>
#include <osl/conditn.hxx>
#include <osl/thread.hxx>
#include <cppuhelper/implementationentry.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <i18nlangtag/languagetag.hxx>
@@ -60,13 +53,9 @@
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>

#include <deque>
#include <map>
#include <vector>

#include <linguistic/misc.hxx>
#include "defs.hxx"
#include "lngopt.hxx"
#include "lngreg.hxx"

#include "gciterator.hxx"
diff --git a/linguistic/source/gciterator.hxx b/linguistic/source/gciterator.hxx
index 10eb2a4..b0274ae 100644
--- a/linguistic/source/gciterator.hxx
+++ b/linguistic/source/gciterator.hxx
@@ -27,7 +27,6 @@
#include <com/sun/star/linguistic2/XProofreadingIterator.hpp>
#include <com/sun/star/linguistic2/XLinguServiceEventListener.hpp>
#include <com/sun/star/linguistic2/XLinguServiceEventBroadcaster.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/util/XChangesBatch.hpp>

#include <cppuhelper/implbase.hxx>
@@ -37,9 +36,9 @@
#include <osl/thread.h>
#include <rtl/instance.hxx>

#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/uno/Any.hxx>
#include <cppu/unotype.hxx>
#include <comphelper/interfacecontainer2.hxx>
#include <i18nlangtag/lang.h>

#include <map>
#include <deque>
diff --git a/linguistic/source/hhconvdic.cxx b/linguistic/source/hhconvdic.cxx
index 718a9d2..a57df56 100644
--- a/linguistic/source/hhconvdic.cxx
+++ b/linguistic/source/hhconvdic.cxx
@@ -19,20 +19,15 @@

#include <unicode/uscript.h>
#include <i18nlangtag/lang.h>
#include <tools/stream.hxx>
#include <osl/mutex.hxx>
#include <ucbhelper/content.hxx>

#include <cppuhelper/factory.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/linguistic2/ConversionDictionaryType.hpp>
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>

#include "hhconvdic.hxx"
#include <linguistic/misc.hxx>
#include "defs.hxx"

using namespace osl;
using namespace com::sun::star;
@@ -45,7 +40,6 @@ using namespace linguistic;
#define SN_HH_CONV_DICTIONARY   "com.sun.star.linguistic2.HangulHanjaConversionDictionary"


#include <i18nutil/unicode.hxx>
#include <com/sun/star/i18n/UnicodeScript.hpp>

using namespace i18n;
diff --git a/linguistic/source/hhconvdic.hxx b/linguistic/source/hhconvdic.hxx
index 7aa97d3..ba7e671 100644
--- a/linguistic/source/hhconvdic.hxx
+++ b/linguistic/source/hhconvdic.hxx
@@ -20,12 +20,6 @@
#ifndef INCLUDED_LINGUISTIC_SOURCE_HHCONVDIC_HXX
#define INCLUDED_LINGUISTIC_SOURCE_HHCONVDIC_HXX

#include <com/sun/star/util/XFlushable.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/interfacecontainer.h>

#include <linguistic/misc.hxx>
#include "defs.hxx"
#include "convdic.hxx"


diff --git a/linguistic/source/hyphdsp.cxx b/linguistic/source/hyphdsp.cxx
index f2665b65..f868470 100644
--- a/linguistic/source/hyphdsp.cxx
+++ b/linguistic/source/hyphdsp.cxx
@@ -23,10 +23,10 @@
#include <algorithm>

#include <cppuhelper/factory.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/linguistic2/XLinguProperties.hpp>
#include <com/sun/star/linguistic2/XLinguServiceEventBroadcaster.hpp>
#include <com/sun/star/linguistic2/XHyphenatedWord.hpp>
#include <rtl/ustrbuf.hxx>
#include <i18nlangtag/lang.h>
#include <unotools/localedatawrapper.hxx>
@@ -38,7 +38,7 @@

#include "hyphdsp.hxx"
#include <linguistic/hyphdta.hxx>
#include <linguistic/lngprops.hxx>
#include <linguistic/misc.hxx>
#include "lngsvcmgr.hxx"

using namespace osl;
diff --git a/linguistic/source/hyphdsp.hxx b/linguistic/source/hyphdsp.hxx
index 4825f74..938ab27 100644
--- a/linguistic/source/hyphdsp.hxx
+++ b/linguistic/source/hyphdsp.hxx
@@ -21,12 +21,8 @@
#define INCLUDED_LINGUISTIC_SOURCE_HYPHDSP_HXX


#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceDisplayName.hpp>
#include <com/sun/star/linguistic2/XHyphenator.hpp>
#include <com/sun/star/linguistic2/XPossibleHyphens.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/linguistic2/XSearchableDictionaryList.hpp>

#include <cppuhelper/implbase.hxx>
@@ -34,7 +30,6 @@
#include <map>
#include <memory>

#include "lngopt.hxx"
#include <linguistic/misc.hxx>
#include "defs.hxx"

diff --git a/linguistic/source/hyphdta.cxx b/linguistic/source/hyphdta.cxx
index 3996fc5..3ab4552 100644
--- a/linguistic/source/hyphdta.cxx
+++ b/linguistic/source/hyphdta.cxx
@@ -19,14 +19,11 @@


#include <linguistic/hyphdta.hxx>
#include <linguistic/lngprops.hxx>
#include <linguistic/misc.hxx>
#include <osl/mutex.hxx>


#include <rtl/ustrbuf.hxx>
#include <tools/debug.hxx>
#include <svl/lngmisc.hxx>
#include <unotools/localedatawrapper.hxx>

using namespace osl;
diff --git a/linguistic/source/iprcache.cxx b/linguistic/source/iprcache.cxx
index f0a992b..8f81551 100644
--- a/linguistic/source/iprcache.cxx
+++ b/linguistic/source/iprcache.cxx
@@ -18,14 +18,11 @@
 */


#include <string.h>

#include <iprcache.hxx>
#include <linguistic/misc.hxx>

#include <com/sun/star/linguistic2/DictionaryListEventFlags.hpp>
#include <osl/mutex.hxx>
#include <linguistic/lngprops.hxx>
#include <unotools/linguprops.hxx>

using namespace osl;
diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx
index 9473a8d..e2d6d65 100644
--- a/linguistic/source/lngopt.cxx
+++ b/linguistic/source/lngopt.cxx
@@ -21,7 +21,6 @@
#include <sal/macros.h>
#include "lngopt.hxx"
#include "lngreg.hxx"
#include <linguistic/lngprops.hxx>
#include <linguistic/misc.hxx>
#include <tools/debug.hxx>
#include <unotools/lingucfg.hxx>
@@ -29,18 +28,12 @@
#include <comphelper/sequence.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/registry/XSimpleRegistry.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <i18nlangtag/mslangid.hxx>

using namespace utl;
using namespace osl;
using namespace com::sun::star;
using namespace com::sun::star::container;
using namespace com::sun::star::beans;
using namespace com::sun::star::lang;
using namespace com::sun::star::uno;
diff --git a/linguistic/source/lngopt.hxx b/linguistic/source/lngopt.hxx
index 14635c5..8adb3c9 100644
--- a/linguistic/source/lngopt.hxx
+++ b/linguistic/source/lngopt.hxx
@@ -23,7 +23,6 @@
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <comphelper/interfacecontainer2.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XFastPropertySet.hpp>
#include <com/sun/star/beans/XPropertyAccess.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -31,11 +30,8 @@
#include <com/sun/star/linguistic2/XLinguProperties.hpp>
#include <unotools/lingucfg.hxx>
#include <svl/itemprop.hxx>
#include <unotools/configitem.hxx>
#include <unotools/linguprops.hxx>
#include <com/sun/star/uno/Any.h>
#include <linguistic/misc.hxx>
#include "defs.hxx"

namespace com { namespace sun { namespace star {
    namespace beans {
diff --git a/linguistic/source/lngreg.cxx b/linguistic/source/lngreg.cxx
index 671aecc..37cbea2 100644
--- a/linguistic/source/lngreg.cxx
+++ b/linguistic/source/lngreg.cxx
@@ -18,9 +18,6 @@
 */

#include <cppuhelper/factory.hxx>
#include <rtl/string.hxx>

#include <com/sun/star/registry/XRegistryKey.hpp>

#include "lngreg.hxx"

diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index c54a212..f8d373a6 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -22,7 +22,6 @@

#include <com/sun/star/deployment/DeploymentException.hpp>
#include <com/sun/star/deployment/ExtensionManager.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/container/XContentEnumerationAccess.hpp>
#include <com/sun/star/container/XEnumeration.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -45,7 +44,6 @@
#include <cppuhelper/supportsservice.hxx>

#include "lngsvcmgr.hxx"
#include "lngopt.hxx"
#include "lngreg.hxx"
#include <linguistic/misc.hxx>
#include "spelldsp.hxx"
diff --git a/linguistic/source/lngsvcmgr.hxx b/linguistic/source/lngsvcmgr.hxx
index eb45e32..7262d26 100644
--- a/linguistic/source/lngsvcmgr.hxx
+++ b/linguistic/source/lngsvcmgr.hxx
@@ -36,9 +36,6 @@
#include <vector>
#include <memory>

#include <linguistic/misc.hxx>
#include "defs.hxx"

class SpellCheckerDispatcher;
class HyphenatorDispatcher;
class ThesaurusDispatcher;
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index 3702af8..ef64ac9 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -18,15 +18,12 @@
 */

#include <memory>
#include <sal/macros.h>
#include <sal/log.hxx>
#include <unotools/pathoptions.hxx>
#include <svl/lngmisc.hxx>
#include <ucbhelper/content.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XFastPropertySet.hpp>
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
#include <com/sun/star/beans/PropertyValues.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XStorable.hpp>
@@ -48,8 +45,6 @@
#include <rtl/instance.hxx>

#include <linguistic/misc.hxx>
#include "defs.hxx"
#include <linguistic/lngprops.hxx>
#include <linguistic/hyphdta.hxx>

using namespace osl;
diff --git a/linguistic/source/misc2.cxx b/linguistic/source/misc2.cxx
index 58b315b..664812f 100644
--- a/linguistic/source/misc2.cxx
+++ b/linguistic/source/misc2.cxx
@@ -20,14 +20,7 @@
#include <tools/urlobj.hxx>
#include <ucbhelper/content.hxx>
#include <tools/debug.hxx>
#include <unotools/pathoptions.hxx>
#include <comphelper/processfactory.hxx>
#include <unotools/localfilehelper.hxx>
#include <unotools/localedatawrapper.hxx>
#include <unotools/ucbhelper.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XFastPropertySet.hpp>
#include <com/sun/star/beans/PropertyValues.hpp>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/util/thePathSettings.hpp>
diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx
index 6bbc664..ba0c45f 100644
--- a/linguistic/source/spelldsp.cxx
+++ b/linguistic/source/spelldsp.cxx
@@ -21,12 +21,9 @@

#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/linguistic2/XLinguServiceEventBroadcaster.hpp>
#include <com/sun/star/linguistic2/XSearchableDictionaryList.hpp>
#include <com/sun/star/linguistic2/SpellFailure.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>

#include <cppuhelper/factory.hxx>
#include <unotools/localedatawrapper.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
@@ -40,7 +37,6 @@
#include "spelldsp.hxx"
#include <linguistic/spelldta.hxx>
#include "lngsvcmgr.hxx"
#include <linguistic/lngprops.hxx>

using namespace osl;
using namespace com::sun::star;
diff --git a/linguistic/source/spelldsp.hxx b/linguistic/source/spelldsp.hxx
index 4c4dd7f..f9a3063 100644
--- a/linguistic/source/spelldsp.hxx
+++ b/linguistic/source/spelldsp.hxx
@@ -20,17 +20,12 @@
#ifndef INCLUDED_LINGUISTIC_SOURCE_SPELLDSP_HXX
#define INCLUDED_LINGUISTIC_SOURCE_SPELLDSP_HXX

#include "lngopt.hxx"
#include "defs.hxx"
#include <linguistic/misc.hxx>
#include <iprcache.hxx>

#include <cppuhelper/implbase.hxx>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceDisplayName.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/PropertyValues.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/linguistic2/XSpellChecker1.hpp>
#include <com/sun/star/linguistic2/XSpellChecker.hpp>
#include <com/sun/star/linguistic2/XSearchableDictionaryList.hpp>
diff --git a/linguistic/source/spelldta.cxx b/linguistic/source/spelldta.cxx
index 0c45700..7588cb9 100644
--- a/linguistic/source/spelldta.cxx
+++ b/linguistic/source/spelldta.cxx
@@ -26,11 +26,10 @@
#include <algorithm>
#include <vector>

#include <linguistic/misc.hxx>
#include <linguistic/spelldta.hxx>
#include "lngsvcmgr.hxx"


using namespace utl;
using namespace osl;
using namespace com::sun::star;
using namespace com::sun::star::beans;
diff --git a/linguistic/source/thesdsp.cxx b/linguistic/source/thesdsp.cxx
index 49b33c3..9681368 100644
--- a/linguistic/source/thesdsp.cxx
+++ b/linguistic/source/thesdsp.cxx
@@ -22,8 +22,6 @@
#include <tools/debug.hxx>
#include <svl/lngmisc.hxx>

#include <cppuhelper/factory.hxx>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
@@ -32,7 +30,7 @@
#include <sal/log.hxx>

#include "thesdsp.hxx"
#include <linguistic/lngprops.hxx>
#include <linguistic/misc.hxx>

using namespace osl;
using namespace com::sun::star;
diff --git a/linguistic/source/thesdsp.hxx b/linguistic/source/thesdsp.hxx
index 4481099..9547234 100644
--- a/linguistic/source/thesdsp.hxx
+++ b/linguistic/source/thesdsp.hxx
@@ -22,23 +22,17 @@

#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/uno/Sequence.h>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertyAccess.hpp>
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceDisplayName.hpp>

#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/linguistic2/XLinguProperties.hpp>
#include <com/sun/star/linguistic2/XThesaurus.hpp>

#include <cppuhelper/implbase.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <linguistic/misc.hxx>

#include <map>
#include <memory>

#include "lngopt.hxx"
#include "defs.hxx"


class ThesaurusDispatcher :