sc/IwyuFilter_sc.yaml                                  |    4 ++++
 sc/inc/PivotTableDataProvider.hxx                      |    1 -
 sc/inc/arealink.hxx                                    |    1 -
 sc/inc/attarray.hxx                                    |    1 -
 sc/inc/cellsuno.hxx                                    |    1 -
 sc/inc/column.hxx                                      |    5 -----
 sc/inc/datauno.hxx                                     |    4 ----
 sc/inc/dociter.hxx                                     |    8 --------
 sc/inc/docpool.hxx                                     |    3 ---
 sc/inc/document.hxx                                    |   11 -----------
 sc/inc/docuno.hxx                                      |    3 ---
 sc/inc/dpcache.hxx                                     |    1 -
 sc/inc/dpobject.hxx                                    |    1 -
 sc/inc/dptabsrc.hxx                                    |    1 -
 sc/inc/fillinfo.hxx                                    |    2 --
 sc/inc/global.hxx                                      |    1 -
 sc/inc/interpretercontext.hxx                          |    5 -----
 sc/inc/markarr.hxx                                     |    1 -
 sc/inc/markdata.hxx                                    |    2 --
 sc/inc/poolcach.hxx                                    |    2 --
 sc/inc/queryparam.hxx                                  |    1 -
 sc/inc/rangecache.hxx                                  |    1 -
 sc/inc/refhint.hxx                                     |    1 -
 sc/inc/scitems.hxx                                     |    1 -
 sc/inc/scmod.hxx                                       |    1 -
 sc/inc/scopetools.hxx                                  |    4 ----
 sc/inc/styleuno.hxx                                    |    1 -
 sc/inc/subtotal.hxx                                    |    2 --
 sc/inc/table.hxx                                       |    4 ----
 sc/inc/targuno.hxx                                     |    4 ----
 sc/inc/xmlwrap.hxx                                     |    2 +-
 sc/source/core/inc/ddelink.hxx                         |    2 --
 sc/source/core/inc/webservicelink.hxx                  |    5 -----
 sc/source/core/opencl/opbase.hxx                       |    3 ---
 sc/source/filter/inc/PivotTableFormat.hxx              |    1 -
 sc/source/filter/inc/SparklineFragment.hxx             |    5 -----
 sc/source/filter/inc/autofilterbuffer.hxx              |    1 -
 sc/source/filter/inc/condformatbuffer.hxx              |   10 ----------
 sc/source/filter/inc/eeimport.hxx                      |    1 -
 sc/source/filter/inc/extlstcontext.hxx                 |    1 -
 sc/source/filter/inc/htmlpars.hxx                      |    1 -
 sc/source/filter/inc/lotattr.hxx                       |    1 -
 sc/source/filter/inc/orcusinterface.hxx                |    4 +---
 sc/source/filter/inc/root.hxx                          |    3 ---
 sc/source/filter/inc/sharedformulagroups.hxx           |    1 -
 sc/source/filter/inc/tablecolumnsbuffer.hxx            |    1 -
 sc/source/filter/inc/workbookhelper.hxx                |    2 --
 sc/source/filter/inc/xetable.hxx                       |    5 -----
 sc/source/filter/inc/xlroot.hxx                        |    1 -
 sc/source/filter/xml/SparklineGroupsImportContext.hxx  |    5 -----
 sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx |    5 -----
 sc/source/filter/xml/XMLTableMasterPageExport.hxx      |    4 ----
 sc/source/filter/xml/xmlexprt.hxx                      |    1 -
 sc/source/filter/xml/xmlimprt.hxx                      |    6 ------
 sc/source/filter/xml/xmlstyli.hxx                      |    1 +
 sc/source/filter/xml/xmlsubti.hxx                      |    2 --
 sc/source/ui/inc/AccessibleCell.hxx                    |    1 -
 sc/source/ui/inc/SparklineDataRangeDialog.hxx          |    2 --
 sc/source/ui/inc/anyrefdg.hxx                          |    1 -
 sc/source/ui/inc/autostyl.hxx                          |    1 -
 sc/source/ui/inc/checklistmenu.hxx                     |    3 ---
 sc/source/ui/inc/condformateasydlg.hxx                 |    2 --
 sc/source/ui/inc/condformatuno.hxx                     |    2 --
 sc/source/ui/inc/consdlg.hxx                           |    1 -
 sc/source/ui/inc/csvcontrol.hxx                        |    2 --
 sc/source/ui/inc/csvgrid.hxx                           |    1 -
 sc/source/ui/inc/csvruler.hxx                          |    1 -
 sc/source/ui/inc/docsh.hxx                             |    1 -
 sc/source/ui/inc/drawview.hxx                          |    1 -
 sc/source/ui/inc/foptmgr.hxx                           |    1 -
 sc/source/ui/inc/gridwin.hxx                           |    4 ----
 sc/source/ui/inc/inputhdl.hxx                          |    1 -
 sc/source/ui/inc/inputwin.hxx                          |    4 ----
 sc/source/ui/inc/navipi.hxx                            |    2 --
 sc/source/ui/inc/simpref.hxx                           |    2 --
 sc/source/ui/inc/tabview.hxx                           |    5 -----
 sc/source/ui/inc/tabvwsh.hxx                           |    4 ----
 sc/source/ui/inc/tphfedit.hxx                          |    3 ---
 sc/source/ui/inc/transobj.hxx                          |    6 ------
 sc/source/ui/inc/uiobject.hxx                          |    1 -
 sc/source/ui/inc/undo/UndoDeleteSparkline.hxx          |    1 -
 sc/source/ui/inc/undo/UndoEditSparkline.hxx            |    1 -
 sc/source/ui/inc/undoblk.hxx                           |    1 -
 sc/source/ui/inc/undocell.hxx                          |    1 -
 sc/source/ui/inc/viewdata.hxx                          |    2 --
 sc/source/ui/inc/viewutil.hxx                          |    1 -
 sc/source/ui/inc/xmlsourcedlg.hxx                      |    1 -
 sc/source/ui/unoobj/scdetect.hxx                       |    4 ----
 sc/source/ui/vba/vbachartobjects.hxx                   |    1 -
 sc/source/ui/vba/vbaformatconditions.hxx               |    1 -
 sc/source/ui/vba/vbahyperlink.hxx                      |    1 -
 sc/source/ui/vba/vbamenuitems.hxx                      |    1 -
 sc/source/ui/vba/vbamenus.hxx                          |    1 -
 sc/source/ui/vba/vbarange.hxx                          |    4 ----
 sc/source/ui/vba/vbasheetobjects.hxx                   |    1 -
 sc/source/ui/vba/vbaworksheet.hxx                      |    3 ---
 96 files changed, 7 insertions(+), 222 deletions(-)

New commits:
commit b94cf8f15aa3c55805f9c0a5d926f11593dd83cd
Author:     Gabor Kelemen <gabor.kelemen.ext...@allotropia.de>
AuthorDate: Tue Apr 8 16:16:59 2025 +0200
Commit:     Gabor Kelemen <gabor.kelemen.ext...@allotropia.de>
CommitDate: Sun Apr 27 09:09:39 2025 +0200

    Remove obsolete fw declarations from sc/
    
    found with bin/find-unneeded-includes --fwdecl
    
    Change-Id: I04083a33ce1e7d85980da91f72c2dd85777b594d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183897
    Tested-by: Jenkins
    Reviewed-by: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de>

diff --git a/sc/IwyuFilter_sc.yaml b/sc/IwyuFilter_sc.yaml
index cf98aaffb989..31f7c83b6101 100644
--- a/sc/IwyuFilter_sc.yaml
+++ b/sc/IwyuFilter_sc.yaml
@@ -286,9 +286,13 @@ excludelist:
     sc/inc/scitems.hxx:
     # needed for defines
     - svl/typedwhich.hxx
+    # needed in --fwdecl mode
+    - class ScConsolidateItem
     sc/inc/scmatrix.hxx:
     # base class has to be a complete type
     - svl/sharedstringpool.hxx
+    # needed in --fwdecl mode, quotation needed for handling the colon
+    - 'enum class FormulaError : sal_uInt16'
     sc/inc/scmod.hxx:
     # Needed for macro define
     - sfx2/app.hxx
diff --git a/sc/inc/PivotTableDataProvider.hxx 
b/sc/inc/PivotTableDataProvider.hxx
index 17442949b1bc..dd2d5dd585dc 100644
--- a/sc/inc/PivotTableDataProvider.hxx
+++ b/sc/inc/PivotTableDataProvider.hxx
@@ -24,7 +24,6 @@
 #include <vector>
 #include <unordered_map>
 
-namespace com::sun::star::chart2::data { class XDataSequence; }
 namespace com::sun::star::chart2::data { class XDataSource; }
 namespace com::sun::star::chart2::data { class XLabeledDataSequence; }
 namespace com::sun::star::uno { class XComponentContext; }
diff --git a/sc/inc/arealink.hxx b/sc/inc/arealink.hxx
index aabe8b8a8c7e..077076f8ba8a 100644
--- a/sc/inc/arealink.hxx
+++ b/sc/inc/arealink.hxx
@@ -24,7 +24,6 @@
 #include <sfx2/lnkbase.hxx>
 #include "scdllapi.h"
 
-class SfxObjectShell;
 class ScDocShell;
 
 class SAL_DLLPUBLIC_RTTI ScAreaLink final : public ::sfx2::SvBaseLink, public 
ScRefreshTimer
diff --git a/sc/inc/attarray.hxx b/sc/inc/attarray.hxx
index 6de20af590a2..facdac80dc85 100644
--- a/sc/inc/attarray.hxx
+++ b/sc/inc/attarray.hxx
@@ -29,7 +29,6 @@
 
 #include <svl/itemset.hxx>
 
-class ScDocument;
 class ScEditDataArray;
 class ScMarkArray;
 class ScStyleSheet;
diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx
index f82643782dec..98ef58e9ae02 100644
--- a/sc/inc/cellsuno.hxx
+++ b/sc/inc/cellsuno.hxx
@@ -108,7 +108,6 @@ class SvxBoxInfoItem;
 class SvxItemPropertySet;
 class SvxUnoText;
 class ScDocument;
-class SfxBroadcaster;
 class SfxHint;
 class SfxItemPropertyMap;
 class SfxItemPropertySet;
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 92a9028ffec7..0c6be7ea0c6d 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -59,11 +59,9 @@ struct NoteEntry;
 class DocumentStreamAccess;
 class CellValues;
 class TableValues;
-struct RowSpan;
 class RowHeightContext;
 class CompileFormulaContext;
 struct SetFormulaDirtyContext;
-enum class MatrixEdge;
 class ColumnIterator;
 class Sparkline;
 
@@ -81,8 +79,6 @@ class SvxBoxItem;
 class ScDocument;
 class ScEditDataArray;
 class ScFormulaCell;
-class ScMarkData;
-class ScPatternAttr;
 class ScStyleSheet;
 class SvtBroadcaster;
 class ScTypedStrData;
@@ -93,7 +89,6 @@ struct ScSetStringParam;
 struct ScColWidthParam;
 struct ScRefCellValue;
 struct ScCellValue;
-class ScHint;
 enum class ScMF;
 struct ScFilterEntries;
 struct ScInterpreterContext;
diff --git a/sc/inc/datauno.hxx b/sc/inc/datauno.hxx
index bcb338dfb36d..6d152b1bc2ee 100644
--- a/sc/inc/datauno.hxx
+++ b/sc/inc/datauno.hxx
@@ -48,10 +48,6 @@
 
 #include <vector>
 
-namespace com::sun::star::sheet { struct TableFilterField2; }
-namespace com::sun::star::sheet { struct TableFilterField3; }
-namespace com::sun::star::sheet { struct TableFilterField; }
-
 class ScDBData;
 class ScDocShell;
 
diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx
index 190d284a39e8..0737bed223ec 100644
--- a/sc/inc/dociter.hxx
+++ b/sc/inc/dociter.hxx
@@ -37,16 +37,8 @@
 
 class ScDocument;
 class ScPatternAttr;
-class ScAttrArray;
-class ScAttrIterator;
-class ScFlatBoolRowSegments;
 class ScMatrix;
-struct ScDBQueryParamBase;
-struct ScQueryParam;
-struct ScDBQueryParamInternal;
-struct ScDBQueryParamMatrix;
 class ScFormulaCell;
-class OutputDevice;
 struct ScInterpreterContext;
 enum class SvNumFormatType : sal_Int16;
 
diff --git a/sc/inc/docpool.hxx b/sc/inc/docpool.hxx
index af6d9535177d..c62f12caf387 100644
--- a/sc/inc/docpool.hxx
+++ b/sc/inc/docpool.hxx
@@ -23,9 +23,6 @@
 #include <svl/itempool.hxx>
 #include "scdllapi.h"
 
-class ScStyleSheet;
-class ScDocument;
-
 class SC_DLLPUBLIC ScDocumentPool final : public SfxItemPool
 {
 public:
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index a38e5d01c3be..50e0f09b9e28 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -66,7 +66,6 @@ namespace oox
     namespace xls
     {
         class Connection;
-        struct ConnectionModel;
     }
 }
 
@@ -96,23 +95,18 @@ class StartListeningContext;
 class EndListeningContext;
 class CopyFromClipContext;
 class ColumnSpanSet;
-class RangeColumnSpanSet;
 struct ColumnBlockPosition;
 struct RefUpdateContext;
 class EditTextIterator;
 struct NoteEntry;
-class DocumentStreamAccess;
 class DocumentLinkManager;
 class CellValues;
 class TableValues;
 class RowHeightContext;
 struct SetFormulaDirtyContext;
-class RefMovedHint;
 struct ReorderParam;
-class FormulaGroupAreaListener;
 class ColumnSet;
 class UpdatedRangeNames;
-class TableColumnBlockPositionSet;
 class ColumnIterator;
 class ExternalDataMapper;
 class Sparkline;
@@ -128,7 +122,6 @@ class SdrObject;
 class SfxBroadcaster;
 class SfxListener;
 class SfxItemSet;
-class SfxObjectShell;
 class SfxBindings;
 class SfxPoolItem;
 class SfxItemPool;
@@ -159,7 +152,6 @@ class ScDetOpList;
 class ScDocOptions;
 class ScDocProtection;
 class ScDocumentPool;
-class ScDrawLayer;
 class ScExtDocOptions;
 class ScExternalRefManager;
 class ScFormulaCell;
@@ -187,7 +179,6 @@ struct ScSortParam;
 class ScRefreshTimerControl;
 class ScUnoListenerCalls;
 class ScUnoRefList;
-class ScRecursionHelper;
 struct RowInfo;
 struct ScTableInfo;
 struct ScTabOpParam;
@@ -195,7 +186,6 @@ class VirtualDevice;
 class ScAutoNameCache;
 class ScTemporaryChartLock;
 class ScLookupCache;
-struct ScLookupCacheMap;
 class ScSortedRangeCache;
 struct ScSortedRangeCacheMap;
 class ScUndoManager;
@@ -221,7 +211,6 @@ class BitmapEx;
 class ScColumnsRange;
 struct ScFilterEntries;
 typedef o3tl::sorted_vector<sal_uInt32> ScCondFormatIndexes;
-struct ScSheetLimits;
 struct ScDataAreaExtras;
 enum class ScConditionMode;
 
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index ec1855a63d64..ecdca483588e 100644
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -55,9 +55,6 @@
 #include <svl/itemprop.hxx>
 #include <vcl/ITiledRenderable.hxx>
 
-namespace com::sun::star::chart2::data { class XDataProvider; }
-namespace com::sun::star::sheet::opencl { struct OpenCLPlatform; }
-
 class ScDocShell;
 class ScAnnotationObj;
 class ScMarkData;
diff --git a/sc/inc/dpcache.hxx b/sc/inc/dpcache.hxx
index 5a1b77241acb..9e7e3397f69f 100644
--- a/sc/inc/dpcache.hxx
+++ b/sc/inc/dpcache.hxx
@@ -36,7 +36,6 @@
 struct ScQueryParam;
 class ScDPObject;
 class ScDocument;
-class SvNumberFormatter;
 struct ScInterpreterContext;
 
 enum class SvNumFormatType : sal_Int16;
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index ce0a147a4cae..fb137dab306a 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -63,7 +63,6 @@ class ScSheetSourceDesc;
 class ScDPTableData;
 class ScDPDimensionSaveData;
 class ScRangeList;
-class ScDPCache;
 class ScDocument;
 
 struct ScDPServiceDesc
diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx
index d9381c40c64a..2244fd8bc664 100644
--- a/sc/inc/dptabsrc.hxx
+++ b/sc/inc/dptabsrc.hxx
@@ -51,7 +51,6 @@
 
 namespace com::sun::star {
     namespace sheet {
-        struct DataPilotFieldFilter;
         struct MemberResult;
     }
 }
diff --git a/sc/inc/fillinfo.hxx b/sc/inc/fillinfo.hxx
index e9c713373724..de66e7a370e2 100644
--- a/sc/inc/fillinfo.hxx
+++ b/sc/inc/fillinfo.hxx
@@ -29,8 +29,6 @@
 #include <o3tl/typed_flags_set.hxx>
 #include <optional>
 
-class SfxItemSet;
-class SvxBrushItem;
 class SvxBoxItem;
 class SvxLineItem;
 class SvxShadowItem;
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index e37b2dbaef58..ca35a1c968e1 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -491,7 +491,6 @@ class LocaleDataWrapper;
 class SvtSysLocale;
 class CalendarWrapper;
 class CollatorWrapper;
-class IntlWrapper;
 class ScFieldEditEngine;
 
 namespace com::sun::star {
diff --git a/sc/inc/interpretercontext.hxx b/sc/inc/interpretercontext.hxx
index 4f66f29e31b6..f03450354eb3 100644
--- a/sc/inc/interpretercontext.hxx
+++ b/sc/inc/interpretercontext.hxx
@@ -37,8 +37,6 @@ struct DelayedSetNumberFormat
     sal_uInt32 mnNumberFormat;
 };
 
-class ScInterpreterContextPool;
-
 struct ScInterpreterContext
 {
     const ScDocument* mpDoc;
@@ -166,9 +164,6 @@ private:
     SvNumberFormatter* mpFormatter;
 };
 
-class ScThreadedInterpreterContextGetterGuard;
-class ScInterpreterContextGetterGuard;
-
 class ScInterpreterContextPool
 {
     friend class ScThreadedInterpreterContextGetterGuard;
diff --git a/sc/inc/markarr.hxx b/sc/inc/markarr.hxx
index 45fcba6e28b8..1e50a437df74 100644
--- a/sc/inc/markarr.hxx
+++ b/sc/inc/markarr.hxx
@@ -23,7 +23,6 @@
 #include <tools/long.hxx>
 #include <vector>
 
-class ScRangeList;
 struct ScSheetLimits;
 
 struct ScMarkEntry
diff --git a/sc/inc/markdata.hxx b/sc/inc/markdata.hxx
index 340accf38755..a704a4d356fb 100644
--- a/sc/inc/markdata.hxx
+++ b/sc/inc/markdata.hxx
@@ -33,8 +33,6 @@ struct ColRowSpan;
 
 }
 
-class ScMarkArray;
-
 //!     todo:
 //!     It should be possible to have MarkArrays for each table, in order to
 //!     enable "search all" across more than one table again!
diff --git a/sc/inc/poolcach.hxx b/sc/inc/poolcach.hxx
index f53d0e6532fb..3dc9d29b21b5 100644
--- a/sc/inc/poolcach.hxx
+++ b/sc/inc/poolcach.hxx
@@ -21,8 +21,6 @@
 #include "patattr.hxx"
 #include <vector>
 
-class CellAttributeHelper;
-class SfxItemSet;
 class SfxPoolItem;
 
 class ScItemPoolCache
diff --git a/sc/inc/queryparam.hxx b/sc/inc/queryparam.hxx
index 213ad2edeaea..913050521232 100644
--- a/sc/inc/queryparam.hxx
+++ b/sc/inc/queryparam.hxx
@@ -30,7 +30,6 @@
 struct ScInterpreterContext;
 
 struct ScDBQueryParamInternal;
-struct ScQueryEntry;
 
 namespace svl {
 
diff --git a/sc/inc/rangecache.hxx b/sc/inc/rangecache.hxx
index 4f0e810db0a8..0e04d47c4ad9 100644
--- a/sc/inc/rangecache.hxx
+++ b/sc/inc/rangecache.hxx
@@ -30,7 +30,6 @@
 class ScDocument;
 struct ScInterpreterContext;
 struct ScQueryParam;
-struct ScSortedRangeCacheMap;
 
 /** Sorted cache for one range used with interpreter functions such as VLOOKUP
     and MATCH. Caches sorted order for cells in the given range, which must
diff --git a/sc/inc/refhint.hxx b/sc/inc/refhint.hxx
index ad13287ede65..b453ae29761c 100644
--- a/sc/inc/refhint.hxx
+++ b/sc/inc/refhint.hxx
@@ -14,7 +14,6 @@
 
 namespace sc {
 
-struct RefUpdateContext;
 class ColRowReorderMapType;
 
 class RefHint : public SfxHint
diff --git a/sc/inc/scitems.hxx b/sc/inc/scitems.hxx
index d8aaee3c0273..57493ddd8dcc 100644
--- a/sc/inc/scitems.hxx
+++ b/sc/inc/scitems.hxx
@@ -68,7 +68,6 @@ class ScMergeAttr;
 class ScMergeFlagAttr;
 class ScProtectionAttr;
 class SvxBoxInfoItem;
-class ScPatternAttr;
 class SvxPageItem;
 class ScViewObjectModeItem;
 class SfxUInt16Item;
diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx
index 0cf597af2103..087942e53aa9 100644
--- a/sc/inc/scmod.hxx
+++ b/sc/inc/scmod.hxx
@@ -70,7 +70,6 @@ class ScAddInCfg;
 class ScTransferObj;
 class ScDrawTransferObj;
 class ScSelectionTransferObj;
-class ScFormEditData;
 class ScMarkData;
 struct ScDragData;
 class SfxDialogController;
diff --git a/sc/inc/scopetools.hxx b/sc/inc/scopetools.hxx
index a836f06ee90b..7c0f32e9fee2 100644
--- a/sc/inc/scopetools.hxx
+++ b/sc/inc/scopetools.hxx
@@ -13,10 +13,6 @@
 
 class ScDocument;
 class ScColumn;
-namespace vcl
-{
-class Window;
-}
 
 namespace sc
 {
diff --git a/sc/inc/styleuno.hxx b/sc/inc/styleuno.hxx
index f524cf8bc615..db7c63c9b03c 100644
--- a/sc/inc/styleuno.hxx
+++ b/sc/inc/styleuno.hxx
@@ -33,7 +33,6 @@
 #include <cppuhelper/implbase.hxx>
 
 namespace com::sun::star::container { class XIndexReplace; }
-namespace com::sun::star::lang { class XComponent; }
 
 class ScDocShell;
 class SfxItemPropertySet;
diff --git a/sc/inc/subtotal.hxx b/sc/inc/subtotal.hxx
index a2a8459b1939..86d484402b5c 100644
--- a/sc/inc/subtotal.hxx
+++ b/sc/inc/subtotal.hxx
@@ -29,8 +29,6 @@ public:
     static bool SafeDiv( double& fVal1, double fVal2);
 };
 
-class ScFunctionData;
-
 /** Implements the Welford Online one-pass algorithm.
     See 
https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_Online_algorithm
     and Donald E. Knuth, TAoCP vol.2, 3rd edn., p. 232
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 3994436da521..daa255957744 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -70,7 +70,6 @@ class ColumnSpanSet;
 class RangeColumnSpanSet;
 class ColumnSet;
 struct ColumnBlockPosition;
-class TableColumnBlockPositionSet;
 struct RefUpdateContext;
 struct RefUpdateInsertTabContext;
 struct RefUpdateDeleteTabContext;
@@ -83,7 +82,6 @@ class RowHeightContext;
 class CompileFormulaContext;
 struct SetFormulaDirtyContext;
 class ColumnIterator;
-class ScDrawObjData;
 }
 
 class SfxItemSet;
@@ -100,7 +98,6 @@ class ScPrintSaverTab;
 class ScProgress;
 class ScRangeList;
 class ScSheetEvents;
-class ScSortInfoArray;
 class ScConditionalFormat;
 class ScConditionalFormatList;
 class ScStyleSheet;
@@ -116,7 +113,6 @@ struct ScSetStringParam;
 struct ScColWidthParam;
 class ScRangeName;
 class ScDBData;
-class ScHint;
 class ScPostIt;
 struct ScInterpreterContext;
 
diff --git a/sc/inc/targuno.hxx b/sc/inc/targuno.hxx
index b45c56f5752f..1a3ac2345a7b 100644
--- a/sc/inc/targuno.hxx
+++ b/sc/inc/targuno.hxx
@@ -26,10 +26,6 @@
 #include <com/sun/star/container/XNameAccess.hpp>
 #include <cppuhelper/implbase.hxx>
 
-namespace com::sun::star::beans { class XPropertyChangeListener; }
-namespace com::sun::star::beans { class XPropertySetInfo; }
-namespace com::sun::star::beans { class XVetoableChangeListener; }
-
 class ScDocShell;
 
 #define SC_LINKTARGETTYPE_SHEET     0
diff --git a/sc/inc/xmlwrap.hxx b/sc/inc/xmlwrap.hxx
index bfae5363cfbd..7e1dd8d77fcc 100644
--- a/sc/inc/xmlwrap.hxx
+++ b/sc/inc/xmlwrap.hxx
@@ -32,7 +32,7 @@ namespace com::sun::star {
     namespace uno { template <class E> class Sequence; }
     namespace embed { class XStorage; }
     namespace xml {
-        namespace sax { struct InputSource; class XParser; class XWriter; }
+        namespace sax { struct InputSource; class XWriter; }
     }
 }
 
diff --git a/sc/source/core/inc/ddelink.hxx b/sc/source/core/inc/ddelink.hxx
index d872a102cc9c..0a53e9cdc66b 100644
--- a/sc/source/core/inc/ddelink.hxx
+++ b/sc/source/core/inc/ddelink.hxx
@@ -23,8 +23,6 @@
 #include <svl/broadcast.hxx>
 #include <types.hxx>
 
-namespace com::sun::star::uno { class Any; }
-
 class ScDocument;
 class ScMultipleReadHeader;
 class ScMultipleWriteHeader;
diff --git a/sc/source/core/inc/webservicelink.hxx 
b/sc/source/core/inc/webservicelink.hxx
index 8504a8c1b6e3..41ff2662b800 100644
--- a/sc/source/core/inc/webservicelink.hxx
+++ b/sc/source/core/inc/webservicelink.hxx
@@ -12,11 +12,6 @@
 #include <sfx2/lnkbase.hxx>
 #include <svl/broadcast.hxx>
 
-namespace com::sun::star::uno
-{
-class Any;
-}
-
 class ScDocument;
 
 class ScWebServiceLink final : public ::sfx2::SvBaseLink, public SvtBroadcaster
diff --git a/sc/source/core/opencl/opbase.hxx b/sc/source/core/opencl/opbase.hxx
index 3b5991275b17..bfdad82df998 100644
--- a/sc/source/core/opencl/opbase.hxx
+++ b/sc/source/core/opencl/opbase.hxx
@@ -429,9 +429,6 @@ public:
         int nCurWindowSize );
 };
 
-class OpAverage;
-class OpCount;
-
 /// Handling a Double Vector that is used as a sliding window input
 /// to either a sliding window average or sum-of-products
 /// Generate a sequential loop for reductions
diff --git a/sc/source/filter/inc/PivotTableFormat.hxx 
b/sc/source/filter/inc/PivotTableFormat.hxx
index 6d876147af9e..544ee06cc2d0 100644
--- a/sc/source/filter/inc/PivotTableFormat.hxx
+++ b/sc/source/filter/inc/PivotTableFormat.hxx
@@ -19,7 +19,6 @@
 namespace oox::xls
 {
 class PivotTable;
-class PivotTableFormat;
 class PivotTableReference;
 
 enum class PivotAreaType
diff --git a/sc/source/filter/inc/SparklineFragment.hxx 
b/sc/source/filter/inc/SparklineFragment.hxx
index 0d4e76e6b9a9..34c1fd4e62ac 100644
--- a/sc/source/filter/inc/SparklineFragment.hxx
+++ b/sc/source/filter/inc/SparklineFragment.hxx
@@ -16,11 +16,6 @@
 #include <vector>
 #include <memory>
 
-namespace oox
-{
-class AttributeList;
-}
-
 namespace oox::xls
 {
 /** Transitional sparkline data */
diff --git a/sc/source/filter/inc/autofilterbuffer.hxx 
b/sc/source/filter/inc/autofilterbuffer.hxx
index fad4de53bf09..70203c36f0a8 100644
--- a/sc/source/filter/inc/autofilterbuffer.hxx
+++ b/sc/source/filter/inc/autofilterbuffer.hxx
@@ -27,7 +27,6 @@
 
 namespace com::sun::star {
     namespace sheet { class XDatabaseRange; }
-    namespace sheet { class XSheetFilterDescriptor3; }
 }
 
 namespace oox { class AttributeList; }
diff --git a/sc/source/filter/inc/condformatbuffer.hxx 
b/sc/source/filter/inc/condformatbuffer.hxx
index a1ae1989d3a6..506e3eb91db2 100644
--- a/sc/source/filter/inc/condformatbuffer.hxx
+++ b/sc/source/filter/inc/condformatbuffer.hxx
@@ -28,12 +28,6 @@
 #include <memory>
 #include <vector>
 
-class ScColorScaleFormat;
-class ScDataBarFormat;
-struct ScDataBarFormatData;
-class ScIconSetFormat;
-struct ScIconSetFormatData;
-
 namespace oox { class AttributeList; }
 
 namespace oox::xls {
@@ -209,10 +203,6 @@ struct CondFormatModel
     explicit            CondFormatModel();
 };
 
-class CondFormatBuffer;
-struct CondFormatHash;
-struct CondFormatEquals;
-
 /** Represents a conditional formatting object with a list of affected cell 
ranges. */
 class CondFormat final : public WorksheetHelper
 {
diff --git a/sc/source/filter/inc/eeimport.hxx 
b/sc/source/filter/inc/eeimport.hxx
index 0d0466eb8909..74611a61e913 100644
--- a/sc/source/filter/inc/eeimport.hxx
+++ b/sc/source/filter/inc/eeimport.hxx
@@ -26,7 +26,6 @@
 class ScDocument;
 class ScEEParser;
 class ScTabEditEngine;
-class SvStream;
 
 struct ScEEParseEntry;
 
diff --git a/sc/source/filter/inc/extlstcontext.hxx 
b/sc/source/filter/inc/extlstcontext.hxx
index c8c3f5ddb355..b3016103d0f9 100644
--- a/sc/source/filter/inc/extlstcontext.hxx
+++ b/sc/source/filter/inc/extlstcontext.hxx
@@ -19,7 +19,6 @@
 extern sal_Int32 gnStyleIdx; // Holds index of the <extlst> <cfRule> style 
(Will be reset by finalize import)
 
 struct ScDataBarFormatData;
-namespace oox { class AttributeList; }
 namespace oox::xls { class WorkbookFragment; }
 namespace oox::xls { class WorksheetFragment; }
 
diff --git a/sc/source/filter/inc/htmlpars.hxx 
b/sc/source/filter/inc/htmlpars.hxx
index a03d1c4d5fca..846ee7fc897d 100644
--- a/sc/source/filter/inc/htmlpars.hxx
+++ b/sc/source/filter/inc/htmlpars.hxx
@@ -144,7 +144,6 @@ struct ScHTMLAdjustStackEntry
 
 class EditEngine;
 class ScDocument;
-class HTMLOption;
 
 // TODO these need better names
 typedef ::std::map<SCROW, SCROW> InnerMap;
diff --git a/sc/source/filter/inc/lotattr.hxx b/sc/source/filter/inc/lotattr.hxx
index 372e7dadbf8c..94c88b733b6e 100644
--- a/sc/source/filter/inc/lotattr.hxx
+++ b/sc/source/filter/inc/lotattr.hxx
@@ -24,7 +24,6 @@
 
 #include <address.hxx>
 
-class ScDocumentPool;
 class ScPatternAttr;
 class SvxColorItem;
 class Color;
diff --git a/sc/source/filter/inc/orcusinterface.hxx 
b/sc/source/filter/inc/orcusinterface.hxx
index 0b0c0c0be371..7d15b68c18c9 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -40,9 +40,7 @@
 class ScOrcusSheet;
 class ScOrcusStyles;
 class ScOrcusFactory;
-class ScOrcusImportFontStyle;
-class ScOrcusSharedStrings;
-class SfxItemSet;
+
 namespace com::sun::star::task
 {
 class XStatusIndicator;
diff --git a/sc/source/filter/inc/root.hxx b/sc/source/filter/inc/root.hxx
index 0e4697dcd364..d8142761939c 100644
--- a/sc/source/filter/inc/root.hxx
+++ b/sc/source/filter/inc/root.hxx
@@ -22,9 +22,6 @@
 #include "flttypes.hxx"
 #include <memory>
 
-class ScRangeName;
-
-class RangeNameBufferWK3;
 class SharedFormulaBuffer;
 class ExtNameBuff;
 class ExtSheetBuffer;
diff --git a/sc/source/filter/inc/sharedformulagroups.hxx 
b/sc/source/filter/inc/sharedformulagroups.hxx
index e8b04928596e..05e9520f4219 100644
--- a/sc/source/filter/inc/sharedformulagroups.hxx
+++ b/sc/source/filter/inc/sharedformulagroups.hxx
@@ -13,7 +13,6 @@
 #include <tokenarray.hxx>
 #include <memory>
 #include <map>
-class ScTokenArray;
 
 namespace sc
 {
diff --git a/sc/source/filter/inc/tablecolumnsbuffer.hxx 
b/sc/source/filter/inc/tablecolumnsbuffer.hxx
index f54c2eb5533e..efcfd979b219 100644
--- a/sc/source/filter/inc/tablecolumnsbuffer.hxx
+++ b/sc/source/filter/inc/tablecolumnsbuffer.hxx
@@ -25,7 +25,6 @@
 
 namespace oox { class AttributeList; }
 namespace oox { class SequenceInputStream; }
-class ScDBData;
 
 namespace oox::xls {
 
diff --git a/sc/source/filter/inc/workbookhelper.hxx 
b/sc/source/filter/inc/workbookhelper.hxx
index c9eb4c6f8951..b6aa24f8d4a1 100644
--- a/sc/source/filter/inc/workbookhelper.hxx
+++ b/sc/source/filter/inc/workbookhelper.hxx
@@ -36,8 +36,6 @@ namespace com::sun::star {
     namespace container { class XNameContainer; }
     namespace sheet { class XDatabaseRange; }
     namespace sheet { class XSpreadsheet; }
-    namespace sheet { class XSpreadsheetDocument; }
-    namespace sheet { struct FormulaToken; }
     namespace style { class XStyle; }
     namespace table { class XCellRange; }
 }
diff --git a/sc/source/filter/inc/xetable.hxx b/sc/source/filter/inc/xetable.hxx
index ed16140f6d68..4cd006f752ed 100644
--- a/sc/source/filter/inc/xetable.hxx
+++ b/sc/source/filter/inc/xetable.hxx
@@ -33,8 +33,6 @@
 #include <unordered_map>
 #include <o3tl/sorted_vector.hxx>
 
-class XclExtLst;
-
 /* ============================================================================
 Export of cell tables including row and column description.
 - Managing all used and formatted cells in a sheet.
@@ -955,9 +953,6 @@ private:
 // Cell Table
 
 class XclExpNote;
-class XclExpMergedcells;
-class XclExpHyperlink;
-class XclExpDval;
 
 /** This class contains the cell contents and more of an entire sheet.
 
diff --git a/sc/source/filter/inc/xlroot.hxx b/sc/source/filter/inc/xlroot.hxx
index 6ed01f2ce4c2..b732b6cc57a1 100644
--- a/sc/source/filter/inc/xlroot.hxx
+++ b/sc/source/filter/inc/xlroot.hxx
@@ -116,7 +116,6 @@ struct XclRootData
     virtual             ~XclRootData();
 };
 
-class SfxObjectShell;
 class ScModelObj;
 class OutputDevice;
 class SvNumberFormatter;
diff --git a/sc/source/filter/xml/SparklineGroupsImportContext.hxx 
b/sc/source/filter/xml/SparklineGroupsImportContext.hxx
index 197eca9ca09a..54bbb51fd50f 100644
--- a/sc/source/filter/xml/SparklineGroupsImportContext.hxx
+++ b/sc/source/filter/xml/SparklineGroupsImportContext.hxx
@@ -16,11 +16,6 @@
 #include <rangelst.hxx>
 #include <docmodel/color/ComplexColor.hxx>
 
-namespace sax_fastparser
-{
-class FastAttributeList;
-}
-
 namespace sc
 {
 class SparklineGroup;
diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx 
b/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx
index e975953517aa..45e113fe0afe 100644
--- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx
+++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx
@@ -22,11 +22,6 @@
 #include <xmloff/xmltoken.hxx>
 #include <rtl/ref.hxx>
 
-namespace com::sun::star::text
-{
-class XText;
-}
-
 class ScChangeAction;
 class ScChangeTrack;
 class ScDocument;
diff --git a/sc/source/filter/xml/XMLTableMasterPageExport.hxx 
b/sc/source/filter/xml/XMLTableMasterPageExport.hxx
index 2ae7a127e2c3..7f7aec88dc94 100644
--- a/sc/source/filter/xml/XMLTableMasterPageExport.hxx
+++ b/sc/source/filter/xml/XMLTableMasterPageExport.hxx
@@ -22,10 +22,6 @@
 #include <xmloff/xmltoken.hxx>
 #include <xmloff/XMLTextMasterPageExport.hxx>
 
-namespace com::sun::star {
-    namespace text { class XText; }
-}
-
 namespace com::sun::star::sheet { class XHeaderFooterContent; }
 
 class ScXMLExport;
diff --git a/sc/source/filter/xml/xmlexprt.hxx 
b/sc/source/filter/xml/xmlexprt.hxx
index 5136b4ef6308..d6134e2d0171 100644
--- a/sc/source/filter/xml/xmlexprt.hxx
+++ b/sc/source/filter/xml/xmlexprt.hxx
@@ -33,7 +33,6 @@ namespace com::sun::star {
     namespace beans { class XPropertySet; }
 }
 
-namespace com::sun::star::table { class XCellRange; }
 namespace com::sun::star::sheet { class XSpreadsheet; }
 namespace com::sun::star::sheet { class XSpreadsheetDocument; }
 
diff --git a/sc/source/filter/xml/xmlimprt.hxx 
b/sc/source/filter/xml/xmlimprt.hxx
index 74958aa1398f..d3ae5318ac50 100644
--- a/sc/source/filter/xml/xmlimprt.hxx
+++ b/sc/source/filter/xml/xmlimprt.hxx
@@ -36,8 +36,6 @@
 #include <list>
 
 namespace com::sun::star::beans { class XPropertySet; }
-namespace com::sun::star::sheet { class XSheetCellRangeContainer; }
-namespace com::sun::star::table { struct CellRangeAddress; }
 namespace com::sun::star::util { class XNumberFormatTypes; }
 namespace com::sun::star::util { class XNumberFormats; }
 namespace sax_fastparser { class FastAttributeList; }
@@ -49,18 +47,14 @@ class XMLNumberFormatAttributesExportHelper;
 class ScEditEngineDefaulter;
 class ScDocumentImport;
 class ScMyImpDetectiveOpArray;
-class SdrPage;
 class ScModelObj;
 
 namespace sc {
 struct ImportPostProcessData;
 struct PivotTableSources;
-class ScDrawObjData;
 }
 
 
-class SvXMLTokenMap;
-class XMLShapeImportHelper;
 class ScXMLChangeTrackingImportHelper;
 
 struct ScMyNamedExpression
diff --git a/sc/source/filter/xml/xmlstyli.hxx 
b/sc/source/filter/xml/xmlstyli.hxx
index 374c85ab81bd..00749c4496b5 100644
--- a/sc/source/filter/xml/xmlstyli.hxx
+++ b/sc/source/filter/xml/xmlstyli.hxx
@@ -30,6 +30,7 @@
 #include "xmlimprt.hxx"
 
 class ScConditionalFormat;
+namespace com::sun::star::table { struct CellRangeAddress; }
 
 class ScXMLCellImportPropertyMapper : public SvXMLImportPropertyMapper
 {
diff --git a/sc/source/filter/xml/xmlsubti.hxx 
b/sc/source/filter/xml/xmlsubti.hxx
index 5970ddade41b..b4c5ed051352 100644
--- a/sc/source/filter/xml/xmlsubti.hxx
+++ b/sc/source/filter/xml/xmlsubti.hxx
@@ -24,8 +24,6 @@
 #include <rangelst.hxx>
 
 namespace com::sun::star::drawing { class XDrawPage; }
-namespace com::sun::star::sheet { class XSpreadsheet; }
-namespace com::sun::star::table { class XCellRange; }
 namespace com::sun::star::drawing { class XShapes; }
 
 class ScXMLImport;
diff --git a/sc/source/ui/inc/AccessibleCell.hxx 
b/sc/source/ui/inc/AccessibleCell.hxx
index 0cb04e127db3..69764db893b5 100644
--- a/sc/source/ui/inc/AccessibleCell.hxx
+++ b/sc/source/ui/inc/AccessibleCell.hxx
@@ -28,7 +28,6 @@
 #include <editeng/AccessibleStaticTextBase.hxx>
 #include <comphelper/uno3.hxx>
 
-namespace com::sun::star::accessibility { class XAccessibleRelationSet; }
 namespace utl { class AccessibleRelationSetHelper; }
 
 class ScTabViewShell;
diff --git a/sc/source/ui/inc/SparklineDataRangeDialog.hxx 
b/sc/source/ui/inc/SparklineDataRangeDialog.hxx
index 32d3ed035c71..99a9ba4ac3f5 100644
--- a/sc/source/ui/inc/SparklineDataRangeDialog.hxx
+++ b/sc/source/ui/inc/SparklineDataRangeDialog.hxx
@@ -16,8 +16,6 @@
 #include <SparklineGroup.hxx>
 #include <SparklineAttributes.hxx>
 
-class ColorListBox;
-
 namespace sc
 {
 /** Dialog to change input data range for a sparkline  */
diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx
index ad3feac803a6..8d422e66add3 100644
--- a/sc/source/ui/inc/anyrefdg.hxx
+++ b/sc/source/ui/inc/anyrefdg.hxx
@@ -26,7 +26,6 @@
 
 #include <memory>
 
-class SfxObjectShell;
 class ScDocument;
 class ScRangeList;
 class ScCompiler;
diff --git a/sc/source/ui/inc/autostyl.hxx b/sc/source/ui/inc/autostyl.hxx
index 891455cc82bb..3f7e12a5fdc8 100644
--- a/sc/source/ui/inc/autostyl.hxx
+++ b/sc/source/ui/inc/autostyl.hxx
@@ -28,7 +28,6 @@
 #include <vcl/idle.hxx>
 
 class ScDocShell;
-class ScRange;
 
 struct ScAutoStyleData
 {
diff --git a/sc/source/ui/inc/checklistmenu.hxx 
b/sc/source/ui/inc/checklistmenu.hxx
index 558ef9f47e37..952bf9ee5902 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -18,9 +18,7 @@
 #include <map>
 #include <set>
 
-class ScCheckListMenuControl;
 class ScViewData;
-struct ScCheckListMember;
 struct ImplSVEvent;
 
 struct ScCheckListMember
@@ -49,7 +47,6 @@ struct ScCheckListMember
     std::unique_ptr<weld::TreeIter> mxParent;
 };
 
-class ScCheckListMenuWindow;
 class ScListSubMenuControl;
 
 /**
diff --git a/sc/source/ui/inc/condformateasydlg.hxx 
b/sc/source/ui/inc/condformateasydlg.hxx
index 8ec5625d8bdc..2ffed223c7a5 100644
--- a/sc/source/ui/inc/condformateasydlg.hxx
+++ b/sc/source/ui/inc/condformateasydlg.hxx
@@ -14,8 +14,6 @@
 #include <conditio.hxx>
 
 class ScViewData;
-class ScConditionalFormat;
-class ScTabViewShell;
 
 namespace sc
 {
diff --git a/sc/source/ui/inc/condformatuno.hxx 
b/sc/source/ui/inc/condformatuno.hxx
index 16b971a538f8..589ced0bca01 100644
--- a/sc/source/ui/inc/condformatuno.hxx
+++ b/sc/source/ui/inc/condformatuno.hxx
@@ -36,8 +36,6 @@ class ScCondDateFormatEntry;
 
 using namespace com::sun::star;
 
-namespace com::sun::star::sheet { class XSheetCellRanges; }
-
 class ScCondFormatsObj : public 
cppu::WeakImplHelper<css::sheet::XConditionalFormats>,
                             public SfxListener
 {
diff --git a/sc/source/ui/inc/consdlg.hxx b/sc/source/ui/inc/consdlg.hxx
index 140472cbbaf4..b7261e7a206f 100644
--- a/sc/source/ui/inc/consdlg.hxx
+++ b/sc/source/ui/inc/consdlg.hxx
@@ -24,7 +24,6 @@
 
 class ScViewData;
 class ScDocument;
-class ScRangeUtil;
 class ScAreaData;
 
 class ScConsolidateDlg : public ScAnyRefDlgController
diff --git a/sc/source/ui/inc/csvcontrol.hxx b/sc/source/ui/inc/csvcontrol.hxx
index 778f02edc983..9a2bea44e93c 100644
--- a/sc/source/ui/inc/csvcontrol.hxx
+++ b/sc/source/ui/inc/csvcontrol.hxx
@@ -27,8 +27,6 @@
 #include <vcl/customweld.hxx>
 #include "AccessibleCsvControl.hxx"
 
-namespace com::sun::star::accessibility { class XAccessible; }
-
 /** Minimum character count for a column in separators mode. */
 const sal_Int32 CSV_MINCOLWIDTH         = 8;
 /** Maximum length of a cell string. */
diff --git a/sc/source/ui/inc/csvgrid.hxx b/sc/source/ui/inc/csvgrid.hxx
index 683070b04eb7..49bb6d492cd3 100644
--- a/sc/source/ui/inc/csvgrid.hxx
+++ b/sc/source/ui/inc/csvgrid.hxx
@@ -32,7 +32,6 @@
 namespace svtools { class ColorConfig; }
 class EditEngine;
 class ScAsciiOptions;
-class ScAccessibleCsvControl;
 class ScCsvTableBox;
 
 const sal_uInt32 CSV_COLUMN_INVALID = CSV_VEC_NOTFOUND;
diff --git a/sc/source/ui/inc/csvruler.hxx b/sc/source/ui/inc/csvruler.hxx
index 5173f0d20002..730d5ac186b3 100644
--- a/sc/source/ui/inc/csvruler.hxx
+++ b/sc/source/ui/inc/csvruler.hxx
@@ -24,7 +24,6 @@
 
 #include <vcl/virdev.hxx>
 
-class ScAccessibleCsvControl;
 class ScCsvTableBox;
 
 /** A ruler control for the CSV import dialog. Supports setting and moving
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index c29eba3d9160..6c909028205c 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -40,7 +40,6 @@
 
 class ScRefreshTimerProtector;
 class ScEditEngineDefaulter;
-class SfxStyleSheetBasePool;
 class SfxStyleSheetHint;
 class INetURLObject;
 
diff --git a/sc/source/ui/inc/drawview.hxx b/sc/source/ui/inc/drawview.hxx
index 816a3428aacf..fb7ec43c4948 100644
--- a/sc/source/ui/inc/drawview.hxx
+++ b/sc/source/ui/inc/drawview.hxx
@@ -28,7 +28,6 @@ namespace com::sun::star::datatransfer { class XTransferable; 
}
 class ScDocument;
 class ScViewData;
 class ScDrawObjData;
-class SdrUndoManager;
 
 class ScDrawView final : public FmFormView
 {
diff --git a/sc/source/ui/inc/foptmgr.hxx b/sc/source/ui/inc/foptmgr.hxx
index 661feac98fb2..580563183a2f 100644
--- a/sc/source/ui/inc/foptmgr.hxx
+++ b/sc/source/ui/inc/foptmgr.hxx
@@ -23,7 +23,6 @@
 
 namespace formula
 {
-    class RefButton;
     class RefButton;
     class RefEdit;
 }
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 249876d750d8..4ca1f2337aaa 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -33,10 +33,6 @@
 #include <vector>
 
 
-namespace editeng {
-    struct MisspellRanges;
-}
-
 namespace sc {
     struct MisspellRangeResult;
     class SpellCheckContext;
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index 0b68ed14c6b6..26d03efd39b6 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -50,7 +50,6 @@ class CommandEvent;
 class VclWindowEvent;
 namespace vcl { class Window; }
 struct ReferenceMark;
-struct ESelection;
 
 //  ScInputHandler
 
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 93c0611cf384..4f72230fad34 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -32,17 +32,13 @@
 #include <formula/opcode.hxx>
 #include <svx/weldeditview.hxx>
 
-namespace com::sun::star::accessibility { class XAccessible; }
-
 class EditView;
 class ScAccessibleEditLineTextData;
 class ScAccessibleEditObject;
-class ScEditEngineDefaulter;
 class ScTextWndGroup;
 class ScInputBarGroup;
 class ScInputHandler;
 class ScTabViewShell;
-struct EENotify;
 
 class ScTextWndBase
 {
diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx
index 50bc5795b012..eed18028ec67 100644
--- a/sc/source/ui/inc/navipi.hxx
+++ b/sc/source/ui/inc/navipi.hxx
@@ -31,9 +31,7 @@
 class SfxPoolItem;
 class ScTabViewShell;
 class ScViewData;
-class ScScenarioWindow;
 class ScNavigatorControllerItem;
-class ScNavigatorDlg;
 class ScNavigatorSettings;
 
 #define SC_DROPMODE_URL         0
diff --git a/sc/source/ui/inc/simpref.hxx b/sc/source/ui/inc/simpref.hxx
index 0286aa6cf06b..3e96ef0285c9 100644
--- a/sc/source/ui/inc/simpref.hxx
+++ b/sc/source/ui/inc/simpref.hxx
@@ -21,8 +21,6 @@
 
 #include "anyrefdg.hxx"
 
-class ScDocument;
-
 class ScSimpleRefDlg: public ScAnyRefDlgController
 {
 private:
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 54ca1cde3403..69f87b16f737 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -31,10 +31,6 @@
 #include "gridwin.hxx"
 #include "drawview.hxx"
 
-namespace editeng {
-    struct MisspellRanges;
-}
-
 class ScEditEngineDefaulter;
 class ScOutlineWindow;
 class ScRowBar;
@@ -46,7 +42,6 @@ class SvBorder;
 class FuPoor;
 class Splitter;
 class ScTabSplitter;
-class SdrView;
 class SdrObject;
 class ScPageBreakData;
 class SdrHdlList;
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 431f915ce4e1..a1bc6e6b95f7 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -48,7 +48,6 @@ class AbstractScMoveTableDlg;
 class AbstractScTabBgColorDlg;
 class AbstractScStringInputDlg;
 class ScStyleSaveData;
-class ScArea;
 class ScAuditingShell;
 class ScDrawShell;
 class ScDrawTextObjectBar;
@@ -64,7 +63,6 @@ class ScChartShell;
 class ScPageBreakShell;
 class ScDPObject;
 class ScNavigatorSettings;
-class ScRangeName;
 class ScDrawTransferObj;
 class ScCondFormatDlgData;
 class ScDispatchProviderInterceptor;
@@ -75,8 +73,6 @@ struct ScHeaderFieldData;
 
 namespace editeng { class SvxBorderLine; }
 
-namespace com::sun::star::frame { class XDispatchProviderInterceptor; }
-
 namespace svx {
     class ExtrusionBar;
     class FontworkBar;
diff --git a/sc/source/ui/inc/tphfedit.hxx b/sc/source/ui/inc/tphfedit.hxx
index 4247f2ad9807..4685d0c3c8b1 100644
--- a/sc/source/ui/inc/tphfedit.hxx
+++ b/sc/source/ui/inc/tphfedit.hxx
@@ -27,10 +27,7 @@
 
 #include <functional>
 
-namespace com::sun::star::accessibility { class XAccessible; }
-
 class ScPatternAttr;
-class EditView;
 class EditTextObject;
 class SvxFieldItem;
 class ScAccessibleEditObject;
diff --git a/sc/source/ui/inc/transobj.hxx b/sc/source/ui/inc/transobj.hxx
index 8813bf5b40d2..4ad4a93be7f7 100644
--- a/sc/source/ui/inc/transobj.hxx
+++ b/sc/source/ui/inc/transobj.hxx
@@ -31,12 +31,6 @@ class ScMarkData;
 enum class ScDragSrc;
 class ScCellRangesBase;
 
-namespace com::sun::star {
-    namespace sheet {
-        class XSheetCellRanges;
-    }
-}
-
 class SAL_DLLPUBLIC_RTTI ScTransferObj : public TransferDataContainer
 {
 private:
diff --git a/sc/source/ui/inc/uiobject.hxx b/sc/source/ui/inc/uiobject.hxx
index 4545c50e79e2..44bb72d8648f 100644
--- a/sc/source/ui/inc/uiobject.hxx
+++ b/sc/source/ui/inc/uiobject.hxx
@@ -11,7 +11,6 @@
 #include <memory>
 #include <vcl/uitest/uiobject.hxx>
 
-class ScGridWindow;
 class ScDBFunc;
 class ScDrawView;
 class ScTabViewShell;
diff --git a/sc/source/ui/inc/undo/UndoDeleteSparkline.hxx 
b/sc/source/ui/inc/undo/UndoDeleteSparkline.hxx
index 97fcd77d9507..f0b0b5f6ec2a 100644
--- a/sc/source/ui/inc/undo/UndoDeleteSparkline.hxx
+++ b/sc/source/ui/inc/undo/UndoDeleteSparkline.hxx
@@ -17,7 +17,6 @@
 namespace sc
 {
 class SparklineGroup;
-struct SparklineData;
 
 /** Undo action for deleting a Sparkline */
 class UndoDeleteSparkline : public ScSimpleUndo
diff --git a/sc/source/ui/inc/undo/UndoEditSparkline.hxx 
b/sc/source/ui/inc/undo/UndoEditSparkline.hxx
index 78bd096bc9c3..26b312b14f80 100644
--- a/sc/source/ui/inc/undo/UndoEditSparkline.hxx
+++ b/sc/source/ui/inc/undo/UndoEditSparkline.hxx
@@ -18,7 +18,6 @@
 namespace sc
 {
 class Sparkline;
-struct SparklineData;
 
 /** Undo action for editing a Sparkline */
 class UndoEditSparkline : public ScSimpleUndo
diff --git a/sc/source/ui/inc/undoblk.hxx b/sc/source/ui/inc/undoblk.hxx
index b6dde6b5f484..c64218c06571 100644
--- a/sc/source/ui/inc/undoblk.hxx
+++ b/sc/source/ui/inc/undoblk.hxx
@@ -29,7 +29,6 @@
 
 class ScDocShell;
 class ScOutlineTable;
-class ScPatternAttr;
 class SvxSearchItem;
 class SdrUndoAction;
 class ScEditDataArray;
diff --git a/sc/source/ui/inc/undocell.hxx b/sc/source/ui/inc/undocell.hxx
index 1bceeb3af5fb..0d2b0767cacf 100644
--- a/sc/source/ui/inc/undocell.hxx
+++ b/sc/source/ui/inc/undocell.hxx
@@ -29,7 +29,6 @@
 #include <memory>
 
 class ScDocShell;
-class ScPatternAttr;
 class ScRangeName;
 class ScFormulaCell;
 
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index 00417885c7a0..12ecc42b061f 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -98,7 +98,6 @@ namespace o3tl {
 }
 
 class ScDocFunc;
-class ScDocument;
 class ScDBFunc;
 class ScTabViewShell;
 class ScDrawView;
@@ -113,7 +112,6 @@ class SfxDispatcher;
 class ScPatternAttr;
 class ScExtDocOptions;
 class ScViewData;
-class ScMarkData;
 class ScGridWindow;
 class ScSizeDeviceProvider;
 
diff --git a/sc/source/ui/inc/viewutil.hxx b/sc/source/ui/inc/viewutil.hxx
index 41367e6722f4..9d66b07f873b 100644
--- a/sc/source/ui/inc/viewutil.hxx
+++ b/sc/source/ui/inc/viewutil.hxx
@@ -26,7 +26,6 @@ class SfxItemSet;
 class SfxBindings;
 class SvxFontItem;
 class SfxViewShell;
-class SfxViewFrame;
 class ScChangeAction;
 class ScChangeViewSettings;
 class ScDocument;
diff --git a/sc/source/ui/inc/xmlsourcedlg.hxx 
b/sc/source/ui/inc/xmlsourcedlg.hxx
index 3d45d27a824d..bc639d4a47f3 100644
--- a/sc/source/ui/inc/xmlsourcedlg.hxx
+++ b/sc/source/ui/inc/xmlsourcedlg.hxx
@@ -16,7 +16,6 @@
 #include <memory>
 
 class ScDocument;
-class ScRange;
 class ScOrcusXMLContext;
 
 struct CustomCompare
diff --git a/sc/source/ui/unoobj/scdetect.hxx b/sc/source/ui/unoobj/scdetect.hxx
index 697bd8d58e3d..45f87e08c3d2 100644
--- a/sc/source/ui/unoobj/scdetect.hxx
+++ b/sc/source/ui/unoobj/scdetect.hxx
@@ -26,10 +26,6 @@
 
 #include <rtl/ustring.hxx>
 
-namespace com::sun::star {
-    namespace beans { struct PropertyValue; }
-}
-
 class ScFilterDetect : public ::cppu::WeakImplHelper< 
css::document::XExtendedFilterDetection, css::lang::XServiceInfo >
 {
 public:
diff --git a/sc/source/ui/vba/vbachartobjects.hxx 
b/sc/source/ui/vba/vbachartobjects.hxx
index 0efb4134ff86..de99d8f6d24b 100644
--- a/sc/source/ui/vba/vbachartobjects.hxx
+++ b/sc/source/ui/vba/vbachartobjects.hxx
@@ -22,7 +22,6 @@
 #include <ooo/vba/excel/XChartObjects.hpp>
 #include <vbahelper/vbacollectionimpl.hxx>
 
-namespace com::sun::star::container { class XEnumeration; }
 namespace com::sun::star::drawing { class XDrawPageSupplier; }
 namespace com::sun::star::table { class XTableCharts; }
 namespace com::sun::star::uno { class XComponentContext; }
diff --git a/sc/source/ui/vba/vbaformatconditions.hxx 
b/sc/source/ui/vba/vbaformatconditions.hxx
index 54721192fdb4..3cc67146ee31 100644
--- a/sc/source/ui/vba/vbaformatconditions.hxx
+++ b/sc/source/ui/vba/vbaformatconditions.hxx
@@ -27,7 +27,6 @@ namespace com::sun::star::beans { class XPropertySet; }
 namespace com::sun::star::sheet { class XSheetConditionalEntries; }
 namespace ooo::vba::excel { class XRange; }
 namespace ooo::vba::excel { class XStyle; }
-namespace ooo::vba::excel { class XStyles; }
 class ScVbaStyles;
 class ScVbaFormatCondition;
 
diff --git a/sc/source/ui/vba/vbahyperlink.hxx 
b/sc/source/ui/vba/vbahyperlink.hxx
index 391853be74f5..da1a8bbe657e 100644
--- a/sc/source/ui/vba/vbahyperlink.hxx
+++ b/sc/source/ui/vba/vbahyperlink.hxx
@@ -24,7 +24,6 @@
 #include <vbahelper/vbahelperinterface.hxx>
 #include <tools/long.hxx>
 
-namespace ooo::vba::excel { class XRange; }
 namespace com::sun::star::beans { class XPropertySet; }
 namespace com::sun::star::table { class XCell; }
 
diff --git a/sc/source/ui/vba/vbamenuitems.hxx 
b/sc/source/ui/vba/vbamenuitems.hxx
index 55e6fe78225e..91adfbbac614 100644
--- a/sc/source/ui/vba/vbamenuitems.hxx
+++ b/sc/source/ui/vba/vbamenuitems.hxx
@@ -12,7 +12,6 @@
 #include <vbahelper/vbacollectionimpl.hxx>
 
 namespace ooo::vba { class XCommandBarControls; }
-namespace ooo::vba::excel { class XMenuItem; }
 
 typedef CollTestImplHelper< ov::excel::XMenuItems > MenuItems_BASE;
 
diff --git a/sc/source/ui/vba/vbamenus.hxx b/sc/source/ui/vba/vbamenus.hxx
index 4d8f646254b1..3088e418005b 100644
--- a/sc/source/ui/vba/vbamenus.hxx
+++ b/sc/source/ui/vba/vbamenus.hxx
@@ -12,7 +12,6 @@
 #include <vbahelper/vbacollectionimpl.hxx>
 
 namespace ooo::vba { class XCommandBarControls; }
-namespace ooo::vba::excel { class XMenu; }
 
 typedef CollTestImplHelper< ov::excel::XMenus > Menus_BASE;
 
diff --git a/sc/source/ui/vba/vbarange.hxx b/sc/source/ui/vba/vbarange.hxx
index d36eb2562e63..50bac0d0e95d 100644
--- a/sc/source/ui/vba/vbarange.hxx
+++ b/sc/source/ui/vba/vbarange.hxx
@@ -33,13 +33,9 @@ namespace com::sun::star::sheet { class 
XSheetCellRangeContainer; }
 namespace com::sun::star::table { class XCell; }
 namespace com::sun::star::table { class XCellRange; }
 namespace com::sun::star::table { struct CellRangeAddress; }
-namespace com::sun::star::lang { class XServiceInfo; }
 namespace ooo::vba { class XCollection; }
-namespace ooo::vba::excel { class XComment; }
-namespace ooo::vba::excel { class XFont; }
 
 class SfxItemSet;
-class ScCellRangesBase;
 class ScCellRangeObj;
 class ScDocShell;
 class ScDocument;
diff --git a/sc/source/ui/vba/vbasheetobjects.hxx 
b/sc/source/ui/vba/vbasheetobjects.hxx
index 38d2d1c8d69f..aa7792f73e1d 100644
--- a/sc/source/ui/vba/vbasheetobjects.hxx
+++ b/sc/source/ui/vba/vbasheetobjects.hxx
@@ -25,7 +25,6 @@
 #include <rtl/ref.hxx>
 
 namespace com::sun::star {
-    namespace container { class XEnumeration; }
     namespace frame { class XModel; }
     namespace sheet { class XSpreadsheet; }
 }
diff --git a/sc/source/ui/vba/vbaworksheet.hxx 
b/sc/source/ui/vba/vbaworksheet.hxx
index f8ca3d0f8cba..ca52841a0524 100644
--- a/sc/source/ui/vba/vbaworksheet.hxx
+++ b/sc/source/ui/vba/vbaworksheet.hxx
@@ -27,12 +27,9 @@
 namespace com::sun::star::frame { class XModel; }
 namespace com::sun::star::sheet { class XSpreadsheet; }
 namespace com::sun::star::uno { class XComponentContext; }
-namespace ooo::vba::excel { class XOutline; }
-namespace ooo::vba::excel { class XPageSetup; }
 namespace ooo::vba::excel { class XRange; }
 
 namespace ooo::vba::excel {
-    class XChartObjects;
     class XHyperlinks;
 }
 

Reply via email to