tdf#42949 Fix IWYU warnings in starmath/inc/*hxx & starmath/source/*hxx

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

Change-Id: If1a597f4c2241dc1ad5687d81199bbc5745e711f
Reviewed-on: https://gerrit.libreoffice.org/65624
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
diff --git a/starmath/IwyuFilter_starmath.yaml b/starmath/IwyuFilter_starmath.yaml
new file mode 100644
index 0000000..4c925d9
--- /dev/null
+++ b/starmath/IwyuFilter_starmath.yaml
@@ -0,0 +1,15 @@
---
assumeFilename: starmath/source/document.cxx
blacklist:
    starmath/source/accessibility.hxx:
    # Base class needs complete type
    - com/sun/star/accessibility/XAccessible.hpp
    - com/sun/star/accessibility/XAccessibleComponent.hpp
    - com/sun/star/accessibility/XAccessibleContext.hpp
    - com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp
    - com/sun/star/accessibility/XAccessibleText.hpp
    - com/sun/star/lang/XServiceInfo.hpp
    starmath/source/smdetect.hxx:
    # Base class needs complete type
    - com/sun/star/document/XExtendedFilterDetection.hpp
    - com/sun/star/lang/XServiceInfo.hpp
diff --git a/starmath/inc/ElementsDockingWindow.hxx b/starmath/inc/ElementsDockingWindow.hxx
index 1e1cf41..1e938f3 100644
--- a/starmath/inc/ElementsDockingWindow.hxx
+++ b/starmath/inc/ElementsDockingWindow.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_STARMATH_INC_ELEMENTSDOCKINGWINDOW_HXX

#include <sfx2/dockwin.hxx>
#include <svx/dlgctrl.hxx>
#include <vcl/scrbar.hxx>

#include "format.hxx"
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index 2e2300a..6342694 100644
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -20,17 +20,16 @@
#define INCLUDED_STARMATH_INC_DIALOG_HXX

#include <sfx2/tabdlg.hxx>
#include <svx/charmap.hxx>
#include <sfx2/basedlgs.hxx>
#include <vcl/outdev.hxx>
#include <svtools/ctrlbox.hxx>
#include <svtools/ctrltool.hxx>
#include "utility.hxx"
#include "format.hxx"
#include <vcl/customweld.hxx>
#include "symbol.hxx"
#include <memory>

class SubsetMap;
class SmFormat;
class FontList;
class SvxShowCharSet;

#define CATEGORY_NONE   0xFFFF

/**************************************************************************/
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx
index 5f7e91f..311cece 100644
--- a/starmath/inc/document.hxx
+++ b/starmath/inc/document.hxx
@@ -24,28 +24,26 @@
#include <rtl/strbuf.hxx>
#include <sfx2/docfac.hxx>
#include <sfx2/objsh.hxx>
#include <sot/storage.hxx>
#include <svl/lstner.hxx>
#include <vcl/jobset.hxx>
#include <vcl/virdev.hxx>
#include <sax/fshelper.hxx>
#include <unotools/lingucfg.hxx>
#include <oox/core/filterbase.hxx>
#include <oox/mathml/import.hxx>
#include <oox/export/utils.hxx>

#include <memory>
#include <set>

#include "format.hxx"
#include "node.hxx"
#include "parse.hxx"
#include "smmod.hxx"
#include "smdllapi.hxx"

class SfxPrinter;
class Printer;
class SmCursor;

namespace oox { namespace formulaimport { class XmlStream; } }

#define STAROFFICE_XML  "StarOffice XML (Math)"
#define MATHML_XML      "MathML XML (Math)"

diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx
index fad4ac4..41d070e 100644
--- a/starmath/inc/edit.hxx
+++ b/starmath/inc/edit.hxx
@@ -20,11 +20,9 @@
#define INCLUDED_STARMATH_INC_EDIT_HXX

#include <vcl/window.hxx>
#include <vcl/timer.hxx>
#include <vcl/idle.hxx>
#include <vcl/transfer.hxx>
#include <editeng/editdata.hxx>
#include <svtools/colorcfg.hxx>
#include <memory>

class SmDocShell;
@@ -35,10 +33,12 @@
class ScrollBar;
class ScrollBarBox;
class DataChangedEvent;
class Menu;
class SmCmdBoxWindow;
class SmEditAccessible;
class CommandEvent;
class Timer;

namespace svtools { class ColorConfig; }

void SmGetLeftSelectionPart(const ESelection &rSelection, sal_Int32 &nPara, sal_uInt16 &nPos);

diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx
index 544ab1c..2d6036b 100644
--- a/starmath/inc/parse.hxx
+++ b/starmath/inc/parse.hxx
@@ -24,10 +24,19 @@
#include <set>
#include <vector>

#include "types.hxx"
#include "token.hxx"
#include "error.hxx"
#include "node.hxx"

class SmBlankNode;
class SmBracebodyNode;
class SmExpressionNode;
class SmGlyphSpecialNode;
class SmNode;
class SmOperNode;
class SmSpecialNode;
class SmStructureNode;
class SmTableNode;
class SmTextNode;

#define DEPTH_LIMIT 1024

diff --git a/starmath/inc/rect.hxx b/starmath/inc/rect.hxx
index f48cc60..8d0bbe9 100644
--- a/starmath/inc/rect.hxx
+++ b/starmath/inc/rect.hxx
@@ -24,9 +24,8 @@
#include <sal/log.hxx>
#include <tools/gen.hxx>
#include <vcl/outdev.hxx>
#include <vcl/metric.hxx>

#include "format.hxx"
class SmFormat;


inline long SmFromTo(long nFrom, long nTo, double fRelDist)
diff --git a/starmath/inc/smmod.hxx b/starmath/inc/smmod.hxx
index 8080028..b225b65 100644
--- a/starmath/inc/smmod.hxx
+++ b/starmath/inc/smmod.hxx
@@ -20,14 +20,13 @@
#ifndef INCLUDED_STARMATH_INC_SMMOD_HXX
#define INCLUDED_STARMATH_INC_SMMOD_HXX

#include <svl/lstner.hxx>
#include <svtools/colorcfg.hxx>

#include <sfx2/module.hxx>

#include <unotools/options.hxx>
#include <memory>

namespace svtools { class ColorConfig; }

class SfxObjectFactory;
class SmSymbolManager;
class SmMathConfig;
diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc
index 6f07991..60fd52e 100644
--- a/starmath/inc/starmath.hrc
+++ b/starmath/inc/starmath.hrc
@@ -21,8 +21,6 @@
#define INCLUDED_STARMATH_INC_STARMATH_HRC

#include <svl/solar.hrc>
#include <sfx2/sfxsids.hrc>
#include <editeng/memberids.h>

#define SID_NEXTERR                 (SID_SMA_START + 1)
#define SID_PREVERR                 (SID_SMA_START + 2)
diff --git a/starmath/inc/symbol.hxx b/starmath/inc/symbol.hxx
index 7a3a79c..cd40e24 100644
--- a/starmath/inc/symbol.hxx
+++ b/starmath/inc/symbol.hxx
@@ -20,16 +20,11 @@
#ifndef INCLUDED_STARMATH_INC_SYMBOL_HXX
#define INCLUDED_STARMATH_INC_SYMBOL_HXX

#include <vcl/font.hxx>
#include <svl/lstner.hxx>

#include <map>
#include <vector>
#include <set>

#include "unomodel.hxx"
#include "utility.hxx"
#include "smmod.hxx"


#define SYMBOL_NONE     0xFFFF
diff --git a/starmath/inc/token.hxx b/starmath/inc/token.hxx
index 30de715..c2b948b 100644
--- a/starmath/inc/token.hxx
+++ b/starmath/inc/token.hxx
@@ -21,7 +21,6 @@

#include <sal/types.h>
#include <rtl/ustring.hxx>
#include <tools/solar.h>
#include <o3tl/typed_flags_set.hxx>

// TokenGroups
diff --git a/starmath/inc/unomodel.hxx b/starmath/inc/unomodel.hxx
index 4bf5a46..1944f15 100644
--- a/starmath/inc/unomodel.hxx
+++ b/starmath/inc/unomodel.hxx
@@ -19,8 +19,6 @@
#ifndef INCLUDED_STARMATH_INC_UNOMODEL_HXX
#define INCLUDED_STARMATH_INC_UNOMODEL_HXX

#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/view/XRenderable.hpp>

diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx
index 43221c4..fab51dd 100644
--- a/starmath/inc/view.hxx
+++ b/starmath/inc/view.hxx
@@ -29,18 +29,17 @@
#include <svtools/scrwin.hxx>
#include <sfx2/ctrlitem.hxx>
#include <sfx2/shell.hxx>
#include <sfx2/viewfac.hxx>
#include <sfx2/viewfrm.hxx>
#include <vcl/timer.hxx>
#include <svtools/colorcfg.hxx>
#include "document.hxx"
#include "edit.hxx"
#include "node.hxx"

class SmDocShell;
class SmViewShell;
class SmPrintUIOptions;
class SmGraphicAccessible;
class SmNode;

namespace svtools { class ColorConfig; }

class SmGraphicWindow final : public ScrollableWindow
{
diff --git a/starmath/sdi/smslots.sdi b/starmath/sdi/smslots.sdi
index 64ba3ed..e8f6eeb 100644
--- a/starmath/sdi/smslots.sdi
+++ b/starmath/sdi/smslots.sdi
@@ -20,6 +20,7 @@
StarMath
[
    SlotIdFile ( "starmath.hrc" )
    SlotIdFile ( "editeng/memberids.h" )
    SlotIdFile ( "editeng/editids.hrc" )
    SlotIdFile ( "sfx2/sfxsids.hrc" )
    SlotIdFile ( "svx/svxids.hrc" )
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index 345c70e..85daa50 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -59,6 +59,7 @@
#include <view.hxx>
#include <o3tl/make_unique.hxx>
#include <strings.hrc>
#include <smmod.hxx>

using namespace com::sun::star;
using namespace com::sun::star::lang;
diff --git a/starmath/source/accessibility.hxx b/starmath/source/accessibility.hxx
index e74b558..1e37fa35 100644
--- a/starmath/source/accessibility.hxx
+++ b/starmath/source/accessibility.hxx
@@ -36,7 +36,6 @@
#include <memory>

class SmGraphicWindow;
class SmEditWindow;
class SmDocShell;

namespace accessibility { class AccessibleTextHelper; }
@@ -142,10 +141,8 @@

class SmEditAccessible;
class SmEditSource;
class EditEngine;
class EditView;
class SvxFieldItem;
struct ESelection;


class SmViewForwarder :
diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx
index 2959f37..4f1eabf 100644
--- a/starmath/source/cfgitem.hxx
+++ b/starmath/source/cfgitem.hxx
@@ -24,8 +24,6 @@

#include <vector>

#include <com/sun/star/uno/Sequence.hxx>

#include <rtl/ustring.hxx>
#include <svl/SfxBroadcaster.hxx>
#include <unotools/configitem.hxx>
@@ -33,6 +31,8 @@
#include <types.hxx>
#include <memory>

namespace com { namespace sun { namespace star { namespace uno { template <class E> class Sequence; } } } }

class SmSym;
class SmSymbolManager;
class SmFormat;
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 550401d..b8f7b27 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -32,6 +32,7 @@
#include <vcl/wall.hxx>
#include <vcl/fontcharmap.hxx>
#include <sfx2/dispatch.hxx>
#include <svx/charmap.hxx>
#include <svx/ucsubset.hxx>

#include <dialog.hxx>
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 81ca45a..a4f03b6 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -62,6 +62,7 @@
#include <format.hxx>
#include <starmath.hrc>
#include <strings.hrc>
#include <smmod.hxx>
#include <symbol.hxx>
#include <unomodel.hxx>
#include <utility.hxx>
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index cb3b285..3cb2840 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -33,8 +33,10 @@
#include <svl/stritem.hxx>
#include <sfx2/viewfrm.hxx>
#include <svx/AccessibleTextHelper.hxx>
#include <svtools/colorcfg.hxx>

#include <edit.hxx>
#include <smmod.hxx>
#include <view.hxx>
#include <document.hxx>
#include "cfgitem.hxx"
diff --git a/starmath/source/eqnolefilehdr.hxx b/starmath/source/eqnolefilehdr.hxx
index 119c2e1..29f93cd 100644
--- a/starmath/source/eqnolefilehdr.hxx
+++ b/starmath/source/eqnolefilehdr.hxx
@@ -21,7 +21,9 @@
#define INCLUDED_STARMATH_SOURCE_EQNOLEFILEHDR_HXX

#include <sal/types.h>
#include <sot/storage.hxx>
#include <tools/stream.hxx>

class SotStorage;

#define EQNOLEFILEHDR_SIZE 28

diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index d8924c9..084efcf 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -36,6 +36,7 @@
#include <sfx2/sfxsids.hrc>
#include <osl/diagnose.h>
#include <unotools/saveopt.hxx>
#include <sot/storage.hxx>
#include <svl/itemset.hxx>
#include <svl/stritem.hxx>
#include <comphelper/fileformat.h>
@@ -57,6 +58,7 @@

#include "mathmlexport.hxx"
#include <strings.hrc>
#include <smmod.hxx>
#include <unomodel.hxx>
#include <document.hxx>
#include <utility.hxx>
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index 1802d95..c22d31d 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -46,6 +46,7 @@
#include <sfx2/docfile.hxx>
#include <sfx2/sfxsids.hrc>
#include <osl/diagnose.h>
#include <sot/storage.hxx>
#include <svtools/sfxecode.hxx>
#include <svl/itemset.hxx>
#include <svl/stritem.hxx>
diff --git a/starmath/source/mathmlimport.hxx b/starmath/source/mathmlimport.hxx
index 3c8a389..c9a2f9d 100644
--- a/starmath/source/mathmlimport.hxx
+++ b/starmath/source/mathmlimport.hxx
@@ -21,11 +21,12 @@
#define INCLUDED_STARMATH_SOURCE_MATHMLIMPORT_HXX

#include <xmloff/xmlimp.hxx>
#include <vcl/errcode.hxx>

#include <node.hxx>
#include <deque>
#include <memory>

class SmNode;
class SfxMedium;
namespace com { namespace sun { namespace star {
    namespace beans {
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index d78e847..ebbb57f 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -31,6 +31,7 @@
#include <tools/color.hxx>
#include <tools/fract.hxx>
#include <tools/gen.hxx>
#include <vcl/metric.hxx>
#include <vcl/outdev.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 6080e57..e4d6ca6 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -29,6 +29,7 @@
#include <sal/log.hxx>
#include <osl/diagnose.h>
#include <rtl/character.hxx>
#include <node.hxx>
#include <parse.hxx>
#include <strings.hrc>
#include <smmod.hxx>
diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx
index c59e43d..ab32022 100644
--- a/starmath/source/rect.cxx
+++ b/starmath/source/rect.cxx
@@ -18,10 +18,12 @@
 */

#include <osl/diagnose.h>
#include <vcl/metric.hxx>
#include <vcl/svapp.hxx>
#include <vcl/virdev.hxx>
#include <sal/log.hxx>

#include <format.hxx>
#include <rect.hxx>
#include <types.hxx>
#include <smmod.hxx>
diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx
index ad5dacf..90d6011 100644
--- a/starmath/source/smdetect.cxx
+++ b/starmath/source/smdetect.cxx
@@ -25,6 +25,7 @@
#include <sfx2/docfile.hxx>
#include <unotools/mediadescriptor.hxx>
#include <sal/log.hxx>
#include <sot/storage.hxx>

#include "eqnolefilehdr.hxx"

diff --git a/starmath/source/smdetect.hxx b/starmath/source/smdetect.hxx
index fa61677..7869146 100644
--- a/starmath/source/smdetect.hxx
+++ b/starmath/source/smdetect.hxx
@@ -22,7 +22,6 @@

#include <rtl/ustring.hxx>
#include <com/sun/star/document/XExtendedFilterDetection.hpp>
#include <com/sun/star/uno/Reference.h>
#include <cppuhelper/implbase.hxx>

#include <com/sun/star/lang/XServiceInfo.hpp>
diff --git a/starmath/source/smdll.cxx b/starmath/source/smdll.cxx
index ecd8050..731f15d 100644
--- a/starmath/source/smdll.cxx
+++ b/starmath/source/smdll.cxx
@@ -28,6 +28,7 @@
#include <sfx2/app.hxx>

#include <smdll.hxx>
#include <smmod.hxx>
#include <document.hxx>
#include <view.hxx>

diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx
index 32cd555..95086ec 100644
--- a/starmath/source/smmod.cxx
+++ b/starmath/source/smmod.cxx
@@ -35,6 +35,7 @@
#include <smmod.hrc>
#include <starmath.hrc>
#include <svx/modctrl.hxx>
#include <svtools/colorcfg.hxx>


#define ShellClass_SmModule
diff --git a/starmath/source/tmpdevice.cxx b/starmath/source/tmpdevice.cxx
index cdfaf41..d69dc0b 100644
--- a/starmath/source/tmpdevice.cxx
+++ b/starmath/source/tmpdevice.cxx
@@ -20,6 +20,7 @@
#include <smmod.hxx>
#include "tmpdevice.hxx"

#include <svtools/colorcfg.hxx>
#include <vcl/window.hxx>
#include <sal/log.hxx>

diff --git a/starmath/source/unofilter.cxx b/starmath/source/unofilter.cxx
index 11b0728..2379158 100644
--- a/starmath/source/unofilter.cxx
+++ b/starmath/source/unofilter.cxx
@@ -11,6 +11,7 @@

#include <unotools/mediadescriptor.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <sot/storage.hxx>

#include <document.hxx>
#include "mathtype.hxx"
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index b19c1aa..f103b14 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -39,6 +39,7 @@
#include <cppuhelper/supportsservice.hxx>
#include <unotools/moduleoptions.hxx>
#include <tools/mapunit.hxx>
#include <tools/stream.hxx>

#include <unomodel.hxx>
#include <document.hxx>
@@ -46,6 +47,7 @@
#include <symbol.hxx>
#include <starmath.hrc>
#include <strings.hrc>
#include <smmod.hxx>
#include "cfgitem.hxx"

using namespace ::cppu;
diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx
index e9cc71e..a842c7e 100644
--- a/starmath/source/utility.cxx
+++ b/starmath/source/utility.cxx
@@ -18,6 +18,7 @@
 */

#include <strings.hrc>
#include <smmod.hxx>
#include <utility.hxx>
#include <dialog.hxx>
#include <view.hxx>
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 76ad4c5..596cb15 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -43,6 +43,7 @@
#include <svl/poolitem.hxx>
#include <svl/stritem.hxx>
#include <vcl/transfer.hxx>
#include <svtools/colorcfg.hxx>
#include <svtools/miscopt.hxx>
#include <svl/whiter.hxx>
#include <svx/zoomslideritem.hxx>
@@ -64,6 +65,7 @@
#include <document.hxx>
#include <starmath.hrc>
#include <strings.hrc>
#include <smmod.hxx>
#include "mathmlimport.hxx"
#include <cursor.hxx>
#include "accessibility.hxx"