tdf#42949 Fix new IWYU warnings in directory sc/

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

Change-Id: I217817e2e4a42b096f5a7fb6344568c10d69aab2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106078
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
diff --git a/sc/IwyuFilter_sc.yaml b/sc/IwyuFilter_sc.yaml
index 3510a5f..514c2c3 100644
--- a/sc/IwyuFilter_sc.yaml
+++ b/sc/IwyuFilter_sc.yaml
@@ -1,6 +1,15 @@
---
assumeFilename: sc/source/core/data/document.cxx
excludelist:
    sc/sdi/scslots.hrc:
    # Needed for sdi files to compile
    - sfx2/sfxsids.hrc
    - svx/svxids.hrc
    - svx/unomid.hxx
    - editeng/editids.hrc
    - editeng/memberids.h
    - sc.hrc
    - mid.h
    sc/inc/addruno.hxx:
    # base class has to be a complete type
    - com/sun/star/beans/XPropertySet.hpp
@@ -64,8 +73,6 @@ excludelist:
    sc/inc/conditio.hxx:
    # base class has to be a complete type
    - tools/link.hxx
    # Used as type for a boost::optional variable
    - tools/color.hxx
    sc/inc/dapiuno.hxx:
    # base class has to be a complete type
    - com/sun/star/container/XEnumerationAccess.hpp
@@ -351,10 +358,24 @@ excludelist:
    sc/qa/unit/functions_test.hxx:
    # Needed for css shortcut
    - sal/types.h
    sc/qa/unit/screenshots/screenshots.cxx:
    # Needed for template
    - sfx2/sfxdlg.hxx
    sc/qa/unit/subsequent_filters-test.cxx:
    # Actually used
    - comphelper/scopeguard.hxx
    sc/qa/unit/subsequent_export-test.cxx:
    # Actually used
    - comphelper/scopeguard.hxx
    # Needed for namespace shortcuts
    - helper/debughelper.hxx
    sc/source/core/inc/addinlis.hxx:
    # base class has to be a complete type
    - com/sun/star/lang/XServiceInfo.hpp
    - com/sun/star/sheet/XResultListener.hpp
    sc/source/core/inc/arraysumfunctor.hxx:
    # Needed for uintptr_t
    - cstdint
    sc/source/core/opencl/formulagroupcl.cxx:
    # Needed for implicit dtor in inverseMatrix()
    - scmatrix.hxx
@@ -555,8 +576,6 @@ excludelist:
    sc/source/ui/vba/vbafiledialog.hxx:
    # base class has to be a complete type
    - ooo/vba/excel/XFileDialog.hpp
    # FIXME IWYU segfaults after removing this
    - vbahelper/vbacollectionimpl.hxx
    sc/source/ui/vba/vbafiledialogitems.hxx:
    # base class has to be a complete type
    - ooo/vba/excel/XFileDialogSelectedItems.hpp
@@ -667,9 +686,18 @@ excludelist:
    sc/source/core/data/documentimport.cxx:
    # Needed for member access in assert()
    - stringutil.hxx
    sc/source/core/data/dpresfilter.cxx:
    # Actually used
    - com/sun/star/uno/Sequence.hxx
    sc/source/core/data/dpoutputgeometry.cxx:
    # Actually used
    - vector
    sc/source/core/data/dptabres.cxx:
    # Used in #if DUMP_PIVOT_TABLE
    - document.hxx
    sc/source/core/data/dptabsrc.cxx:
    # Actually used
    - com/sun/star/sheet/DataPilotFieldFilter.hpp
    sc/source/core/data/formulacell.cxx:
    # Used in #if DBG_UTIL
    - com/sun/star/sheet/FormulaLanguage.hpp
@@ -682,6 +710,27 @@ excludelist:
    sc/source/core/data/types.cxx:
    # Complete type is needed for complex data type
    - scmatrix.hxx
    sc/source/core/data/tabprotection.cxx:
    # Actually used
    - vector
    sc/source/core/tool/addincol.cxx:
    # Needed for template
    - com/sun/star/frame/XModel.hpp
    sc/source/core/tool/autoform.cxx:
    # Don't propose hxx -> h in URE headers
    - osl/thread.hxx
    sc/source/core/tool/cellkeytranslator.cxx:
    # Needed for localized keywords
    - cellkeywords.inl
    sc/source/core/tool/formularesult.cxx:
    # Complete type needed for boost::intrusive_ptr
    - scmatrix.hxx
    sc/source/core/tool/formulaparserpool.cxx:
    # Needed for template
    - com/sun/star/frame/XModel.hpp
    sc/source/core/tool/interpr4.cxx:
    # Needed for template
    - com/sun/star/script/XInvocation.hpp
    sc/source/filter/xml/XMLCodeNameProvider.hxx:
    # base class has to be a complete type
    - com/sun/star/container/XNameAccess.hpp
@@ -691,13 +740,24 @@ excludelist:
    sc/source/filter/ftools/sharedformulagroups.cxx:
    # Needed for implicit dtor
    - tokenarray.hxx
    sc/source/filter/excel/excdoc.cxx:
    # Needed for template
    - com/sun/star/frame/XModel.hpp
    sc/source/filter/excel/excimp8.cxx:
    # base class has to be a complete type
    - com/sun/star/container/XIndexContainer.hpp
    # Needed for template
    - com/sun/star/frame/XModel.hpp
    sc/source/filter/excel/expop2.cxx:
    # Needed for template
    - com/sun/star/frame/XModel.hpp
    sc/source/filter/excel/xechart.cxx:
    # Complex type needs complete type
    - com/sun/star/chart2/RelativePosition.hpp
    - com/sun/star/chart2/RelativeSize.hpp
    sc/source/filter/excel/xecontent.cxx:
    # Needed for template
    - com/sun/star/frame/XModel.hpp
    sc/source/filter/excel/xeescher.cxx:
    # base class has to be a complete type
    - com/sun/star/chart/XChartDocument.hpp
@@ -714,6 +774,17 @@ excludelist:
    sc/source/filter/excel/xistyle.cxx:
    # Needed for direct member access
    - xladdress.hxx
    # Needed for template
    - com/sun/star/frame/XModel.hpp
    sc/source/filter/excel/xlpage.cxx:
    # Needed for template
    - editeng/brushitem.hxx
    sc/source/filter/excel/xlstyle.cxx:
    # Needed for template
    - com/sun/star/awt/FontSlant.hpp
    sc/source/filter/ftools/fapihelper.cxx:
    # Needed for template
    - com/sun/star/frame/XModel.hpp
    sc/source/filter/lotus/filter.cxx:
    # Needed to avoid loplugin:unreffun error
    - filter.hxx
@@ -723,15 +794,62 @@ excludelist:
    sc/source/filter/lotus/op.cxx:
    # Needed to avoid loplugin:unreffun error
    - op.h
    # Needed for rtl::math::round
    - rtl/math.hxx
    sc/source/filter/html/htmlpars.cxx:
    # Needed for template
    - com/sun/star/frame/XModel.hpp
    sc/source/filter/html/htmlexp.cxx:
    # Needed for template
    - com/sun/star/frame/XModel.hpp
    sc/source/filter/oox/defnamesbuffer.cxx:
    # Needed for template
    - com/sun/star/sheet/XSpreadsheet.hpp
    sc/source/filter/oox/externallinkbuffer.cxx:
    # Needed for template
    - com/sun/star/sheet/XSpreadsheetDocument.hpp
    sc/source/filter/oox/numberformatsbuffer.cxx:
    # Needed for template
    - com/sun/star/sheet/XSpreadsheetDocument.hpp
    sc/source/filter/oox/ooxformulaparser.cxx:
    # Needed for direct member access
    - com/sun/star/lang/XComponent.hpp
    sc/source/filter/oox/pagesettings.cxx:
    # Needed for template
    - com/sun/star/sheet/XSpreadsheet.hpp
    sc/source/filter/oox/querytablebuffer.cxx:
    # Needed for template
    - com/sun/star/sheet/XSpreadsheetDocument.hpp
    sc/source/filter/oox/richstring.cxx:
    # Complete type needed for unique_ptr
    - editeng/editobj.hxx
    sc/source/filter/oox/sheetdatabuffer.cxx:
    # Needed for template
    - com/sun/star/sheet/XSpreadsheetDocument.hpp
    - com/sun/star/table/XCell.hpp
    - com/sun/star/table/XCellRange.hpp
    sc/source/filter/oox/stylesbuffer.cxx:
    # Needed for template
    - com/sun/star/sheet/XSpreadsheetDocument.hpp
    sc/source/filter/oox/tablebuffer.cxx:
    # Needed for template
    - com/sun/star/sheet/XSpreadsheetDocument.hpp
    sc/source/filter/oox/unitconverter.cxx:
    # Needed for template
    - com/sun/star/sheet/XSpreadsheetDocument.hpp
    sc/source/filter/oox/viewsettings.cxx:
    # Needed for template
    - com/sun/star/sheet/XSpreadsheetDocument.hpp
    - com/sun/star/sheet/XSpreadsheet.hpp
    sc/source/filter/oox/workbooksettings.cxx:
    # Needed for template
    - com/sun/star/sheet/XSpreadsheetDocument.hpp
    sc/source/filter/oox/worksheethelper.cxx:
    # Needed for implicit dtor
    - editeng/editobj.hxx
    sc/source/filter/oox/worksheetsettings.cxx:
    # Needed for template
    - com/sun/star/sheet/XSpreadsheet.hpp
    sc/source/filter/orcus/orcusfiltersimpl.cxx:
    # Needed for implicit dtor
    - tokenarray.hxx
@@ -740,15 +858,51 @@ excludelist:
    sc/source/filter/orcus/xmlcontext.cxx:
    # Needed for implicit dtor
    - tokenarray.hxx
    sc/source/filter/xcl97/xcl97rec.cxx:
    # Needed for template
    - com/sun/star/chart/XChartDocument.hpp
    - sax/fastattribs.hxx
    sc/source/filter/xml/XMLCalculationSettingsContext.cxx:
    # Needed for template
    - com/sun/star/frame/XModel.hpp
    sc/source/filter/xml/XMLExportIterator.cxx:
    # Needed for direct member access
    - com/sun/star/table/XCellRange.hpp
    - com/sun/star/sheet/XSpreadsheet.hpp
    sc/source/filter/xml/XMLExportDatabaseRanges.cxx:
    # Needed for template
    - com/sun/star/frame/XModel.hpp
    sc/source/filter/xml/XMLTableHeaderFooterContext.cxx:
    # Needed for template
    - com/sun/star/beans/XPropertySet.hpp
    - com/sun/star/sheet/XHeaderFooterContent.hpp
    # Needed for macro XMLOFF_WARN_UNKNOWN
    - sal/log.hxx
    sc/source/filter/xml/XMLTableMasterPageExport.cxx:
     # Needed for template
     - com/sun/star/text/XText.hpp
     - com/sun/star/beans/XPropertySet.hpp
    sc/source/filter/xml/XMLTableShapeResizer.cxx:
    # Actually used
    - vector
    sc/source/filter/xml/XMLTableSourceContext.cxx:
    # Needed for template
    - com/sun/star/sheet/XSpreadsheet.hpp
    sc/source/filter/xml/xmldpimp.cxx:
    # Actually used
    - com/sun/star/sheet/DataPilotFieldOrientation.hpp
    sc/source/filter/xml/xmldrani.cxx:
    # Actually used
    - com/sun/star/sheet/DataImportMode.hpp
    sc/source/filter/xml/xmlimprt.cxx:
    # Needed to avoid loplugin:unreffun error
    - appluno.hxx
    sc/source/filter/xml/xmlsubti.cxx:
    # Needed for direct member access
    - com/sun/star/sheet/XSpreadsheet.hpp
    sc/source/filter/xml/xmltabi.cxx:
    # Needed for template
    - com/sun/star/sheet/XSpreadsheet.hpp
    sc/source/ui/attrdlg/scdlgfact.cxx:
    # Complete type needed for unique_ptr & ScConditionalFormatList
    - conditio.hxx
@@ -768,6 +922,7 @@ excludelist:
    # Needed for MID* macros
    - mid.h
    - editeng/memberids.h
    - svx/unomid.hxx
    # Needed by scslots.hxx
    - sfx2/msg.hxx
    - svl/slstitm.hxx
@@ -846,6 +1001,8 @@ excludelist:
    sc/source/ui/docshell/docsh.cxx:
    # Needed for method parameter
    - ooo/vba/excel/XWorkbook.hpp
    # Needed for SID* macros in workdir/SdiTarget/sc/sdi/scslots.hxx
    - sc.hrc
    sc/source/ui/docshell/docsh4.cxx:
    # Needed on WIN32
    - impex.hxx
@@ -864,6 +1021,12 @@ excludelist:
    # Complete type is needed
    - com/sun/star/sheet/XFormulaParser.hpp
    - com/sun/star/sheet/XFormulaOpCodeMapper.hpp
    sc/source/ui/miscdlgs/solveroptions.cxx:
    # Needed for template
    - com/sun/star/sheet/XSolver.hpp
    sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx:
    # Needed for rtl::math::round
    - rtl/math.hxx
    sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx:
    # Needed for implicit dtor
    - editeng/editobj.hxx
@@ -879,12 +1042,48 @@ excludelist:
    sc/source/ui/unoobj/notesuno.cxx:
    # Needed for macro defines
    - editeng/unoprnms.hxx
    sc/source/ui/unoobj/scdetect.cxx:
    # Actually used
    - com/sun/star/beans/PropertyValue.hpp
    sc/source/ui/unoobj/textuno.cxx:
    # Needed for macro defines
    - editeng/unoprnms.hxx
    sc/source/ui/view/tabview.cxx:
    # Needed for direct member access
    - pagedata.hxx
    sc/source/ui/vba/vbaformatconditions.cxx:
    # Needed for template
    - ooo/vba/excel/XRange.hpp
    sc/source/ui/vba/vbahyperlink.cxx:
    # Needed for template
    - com/sun/star/frame/XModel.hpp
    sc/source/ui/vba/vbaformat.cxx:
    # Needed for rtl::math::round
    - rtl/math.hxx
    sc/source/ui/vba/vbainterior.cxx:
    # Actually used
    - com/sun/star/beans/XPropertySet.hpp
    sc/source/ui/vba/vbanames.cxx:
    # Actually used
    - com/sun/star/sheet/XNamedRanges.hpp
    sc/source/ui/vba/vbapagebreaks.cxx:
    # Actually used
    - com/sun/star/uno/XComponentContext.hpp
    sc/source/ui/vba/vbaworkbooks.cxx:
    # Actually used
    - com/sun/star/uno/XComponentContext.hpp
    sc/source/ui/vba/vbawsfunction.cxx:
    # Actually used
    - com/sun/star/beans/XIntrospectionAccess.hpp
    sc/source/ui/vba/vbarange.cxx:
    # Actually used
    - com/sun/star/uno/XComponentContext.hpp
    sc/source/ui/vba/vbaworksheet.cxx:
    # Actually used
    - com/sun/star/beans/XIntrospectionAccess.hpp
    sc/source/ui/view/viewfun4.cxx:
    # Needed for direct member access
    - refundo.hxx
    sc/source/ui/view/tabvwshc.cxx:
    # Needed for ScFormulaDlg instantiation for some weird reason
    - funcdesc.hxx
diff --git a/sc/inc/NumberFormatControl.hxx b/sc/inc/NumberFormatControl.hxx
index 78be6f1..77e3843 100644
--- a/sc/inc/NumberFormatControl.hxx
+++ b/sc/inc/NumberFormatControl.hxx
@@ -19,7 +19,6 @@

#pragma once

#include "scdllapi.h"
#include <sfx2/tbxctrl.hxx>


diff --git a/sc/inc/dpdimsave.hxx b/sc/inc/dpdimsave.hxx
index d8cc13a..20642f5 100644
--- a/sc/inc/dpdimsave.hxx
+++ b/sc/inc/dpdimsave.hxx
@@ -20,6 +20,8 @@
#ifndef INCLUDED_SC_INC_DPDIMSAVE_HXX
#define INCLUDED_SC_INC_DPDIMSAVE_HXX

#include <tools/long.hxx>

#include <vector>
#include <map>
#include "dpitemdata.hxx"
diff --git a/sc/inc/dpfilteredcache.hxx b/sc/inc/dpfilteredcache.hxx
index aa40da4..b0503eb 100644
--- a/sc/inc/dpfilteredcache.hxx
+++ b/sc/inc/dpfilteredcache.hxx
@@ -23,7 +23,6 @@
#include <sal/types.h>
#include "dpitemdata.hxx"
#include "calcmacros.hxx"
#include "scdllapi.h"
#include "types.hxx"

#include <unordered_set>
diff --git a/sc/inc/dpoutput.hxx b/sc/inc/dpoutput.hxx
index 230b289..756ccce 100644
--- a/sc/inc/dpoutput.hxx
+++ b/sc/inc/dpoutput.hxx
@@ -24,6 +24,8 @@
#include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
#include <com/sun/star/uno/Sequence.hxx>

#include <tools/long.hxx>

#include "address.hxx"

#include "dptypes.hxx"
diff --git a/sc/inc/dpresfilter.hxx b/sc/inc/dpresfilter.hxx
index c9f32b9..5e6b0a1 100644
--- a/sc/inc/dpresfilter.hxx
+++ b/sc/inc/dpresfilter.hxx
@@ -11,7 +11,6 @@
#define INCLUDED_SC_INC_DPRESFILTER_HXX

#include <rtl/ustring.hxx>
#include <tools/long.hxx>
#include "calcmacros.hxx"

#include <memory>
diff --git a/sc/inc/formularesult.hxx b/sc/inc/formularesult.hxx
index c17f1e0..b79f4cc 100644
--- a/sc/inc/formularesult.hxx
+++ b/sc/inc/formularesult.hxx
@@ -20,7 +20,6 @@
#ifndef INCLUDED_SC_INC_FORMULARESULT_HXX
#define INCLUDED_SC_INC_FORMULARESULT_HXX

#include "scdllapi.h"
#include "global.hxx"
#include "calcmacros.hxx"
#include <svl/sharedstring.hxx>
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 3574a0a..f6b4e838 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -34,7 +34,7 @@
// HACK: <atomic> includes <stdbool.h>, which in some Clang versions does '#define bool bool',
// which confuses clang plugins.
#undef bool
#include <map>

#include <memory>

namespace com::sun::star::uno { template <typename > class Reference; }
diff --git a/sc/inc/inputopt.hxx b/sc/inc/inputopt.hxx
index 52811ee..9fdce59 100644
--- a/sc/inc/inputopt.hxx
+++ b/sc/inc/inputopt.hxx
@@ -20,7 +20,6 @@
#ifndef INCLUDED_SC_INC_INPUTOPT_HXX
#define INCLUDED_SC_INC_INPUTOPT_HXX

#include "scdllapi.h"
#include <unotools/configitem.hxx>

class ScInputOptions
diff --git a/sc/inc/rechead.hxx b/sc/inc/rechead.hxx
index 53ccca6..761150e 100644
--- a/sc/inc/rechead.hxx
+++ b/sc/inc/rechead.hxx
@@ -20,7 +20,6 @@
#ifndef INCLUDED_SC_INC_RECHEAD_HXX
#define INCLUDED_SC_INC_RECHEAD_HXX

#include <tools/solar.h>
#include <tools/stream.hxx>
#include <memory>

diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index e808256..bb86524 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -20,7 +20,6 @@
#ifndef SC_SC_HRC
#define SC_SC_HRC

#include <sfx2/sfxsids.hrc>
#include <svx/svxids.hrc>

// areas
diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx
index 20dc94e..62480e7 100644
--- a/sc/inc/scmod.hxx
+++ b/sc/inc/scmod.hxx
@@ -23,7 +23,6 @@
#include "scdllapi.h"
#include <o3tl/deleter.hxx>
#include <vcl/timer.hxx>
#include <vcl/idle.hxx>
#include <svl/lstner.hxx>
#include <sfx2/app.hxx>
#include <sfx2/module.hxx>
diff --git a/sc/inc/sheetlimits.hxx b/sc/inc/sheetlimits.hxx
index 31df9d4..ab55168 100644
--- a/sc/inc/sheetlimits.hxx
+++ b/sc/inc/sheetlimits.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_SC_INC_SHEETLIMITS_HXX

#include <salhelper/simplereferenceobject.hxx>
#include "address.hxx"

// Because some stuff needs this info, and those objects lifetimes sometimes exceeds the lifetime
// of the ScDocument.
diff --git a/sc/inc/userdat.hxx b/sc/inc/userdat.hxx
index 769f19b..11bd7f6 100644
--- a/sc/inc/userdat.hxx
+++ b/sc/inc/userdat.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_SC_INC_USERDAT_HXX

#include <svx/svdobj.hxx>
#include <vcl/imap.hxx>
#include "address.hxx"
#include "drwlayer.hxx"

diff --git a/sc/qa/extras/anchor.cxx b/sc/qa/extras/anchor.cxx
index 922ef1d..5e96425 100644
--- a/sc/qa/extras/anchor.cxx
+++ b/sc/qa/extras/anchor.cxx
@@ -19,7 +19,6 @@
#include <attrib.hxx>
#include <docsh.hxx>
#include <drwlayer.hxx>
#include <scitems.hxx>
#include <svx/svdocirc.hxx>
#include <vcl/scheduler.hxx>
#include <tabvwsh.hxx>
diff --git a/sc/qa/unit/copy_paste_test.cxx b/sc/qa/unit/copy_paste_test.cxx
index 6c91afa..2a1a106 100644
--- a/sc/qa/unit/copy_paste_test.cxx
+++ b/sc/qa/unit/copy_paste_test.cxx
@@ -16,7 +16,6 @@
#include <cellmergeoption.hxx>
#include <tabvwsh.hxx>
#include <impex.hxx>
#include <viewfunc.hxx>
#include <scitems.hxx>
#include <attrib.hxx>
#include <userlist.hxx>
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index a994297..c52f4f1 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -31,6 +31,7 @@

#include <svx/svdocapt.hxx>
#include <svx/svdpage.hxx>
#include <tools/stream.hxx>

using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
diff --git a/sc/qa/unit/helper/debughelper.hxx b/sc/qa/unit/helper/debughelper.hxx
index fedde10..1795c4a 100644
--- a/sc/qa/unit/helper/debughelper.hxx
+++ b/sc/qa/unit/helper/debughelper.hxx
@@ -26,6 +26,8 @@
#define CALC_DEBUG_OUTPUT 0
#define CALC_TEST_PERF 0

#include <sal/types.h>

using namespace ::com::sun::star;
using ::std::cout;
using ::std::cerr;
diff --git a/sc/qa/unit/jumbosheets-test.cxx b/sc/qa/unit/jumbosheets-test.cxx
index 1c129518..d635161 100644
--- a/sc/qa/unit/jumbosheets-test.cxx
+++ b/sc/qa/unit/jumbosheets-test.cxx
@@ -7,7 +7,6 @@
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#include <memory>
#include <sal/config.h>
#include <unotest/filters-test.hxx>
#include <test/bootstrapfixture.hxx>
@@ -23,7 +22,6 @@
#include <com/sun/star/frame/Desktop.hpp>

#include "helper/qahelper.hxx"
#include "helper/shared_test_impl.hxx"

using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
diff --git a/sc/qa/unit/scshapetest.cxx b/sc/qa/unit/scshapetest.cxx
index 9362d3d..236cbc0 100644
--- a/sc/qa/unit/scshapetest.cxx
+++ b/sc/qa/unit/scshapetest.cxx
@@ -9,11 +9,8 @@

#include <sal/config.h>

#include <cstdlib>

#include <test/calc_unoapi_test.hxx>

#include <comphelper/dispatchcommand.hxx>
#include <comphelper/propertyvalue.hxx>
#include <sfx2/dispatch.hxx>
#include <svx/svdoashp.hxx>
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 02b51df..54918a0 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -11,10 +11,7 @@
#include <sal/config.h>
#include <config_features.h>

#include <sfx2/docfile.hxx>
#include <sfx2/sfxmodelfactory.hxx>
#include <sfx2/sfxsids.hrc>
#include <sfx2/docfilt.hxx>

#include "helper/debughelper.hxx"
#include "helper/qahelper.hxx"
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 8bc5ff7..2323ee5 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -11,7 +11,6 @@
#include <sal/config.h>
#include <unotest/filters-test.hxx>
#include <test/bootstrapfixture.hxx>
#include <rtl/strbuf.hxx>
#include <osl/file.hxx>
#include <config_features.h>

@@ -80,7 +79,6 @@
#include <unotools/syslocaleoptions.hxx>
#include "helper/qahelper.hxx"
#include "helper/shared_test_impl.hxx"
#include <cellsuno.hxx>

namespace com::sun::star::frame { class XModel; }

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index ed6370e..2cf0bb5 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -15,9 +15,7 @@

#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/DispatchHelper.hpp>
#include <com/sun/star/datatransfer/clipboard/SystemClipboard.hpp>
#include <com/sun/star/datatransfer/UnsupportedFlavorException.hpp>
#include <comphelper/dispatchcommand.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/propertysequence.hxx>
@@ -31,11 +29,9 @@
#include <sfx2/childwin.hxx>
#include <sfx2/lokhelper.hxx>
#include <svx/svdpage.hxx>
#include <vcl/svapp.hxx>
#include <vcl/scheduler.hxx>
#include <vcl/vclevent.hxx>
#include <vcl/virdev.hxx>
#include <vcl/unohelp2.hxx>
#include <sc.hrc>
#include <comphelper/string.hxx>
#include <tools/json_writer.hxx>
diff --git a/sc/qa/unit/ucalc_sort.cxx b/sc/qa/unit/ucalc_sort.cxx
index 829fa82..d63bab2 100644
--- a/sc/qa/unit/ucalc_sort.cxx
+++ b/sc/qa/unit/ucalc_sort.cxx
@@ -29,7 +29,6 @@
#include <sal/config.h>
#include <editeng/wghtitem.hxx>
#include <editeng/postitem.hxx>
#include <editeng/editobj.hxx>
#include <svx/svdocirc.hxx>
#include <svx/svdpage.hxx>
#include <rtl/math.hxx>
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index a5c9a58..d87ca61 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -10,14 +10,17 @@
#include <test/bootstrapfixture.hxx>
#include <unotest/macros_test.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <vcl/keycodes.hxx>
#include <vcl/scheduler.hxx>

#include <comphelper/propertysequence.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/awt/Key.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <dbfunc.hxx>
#include <document.hxx>
#include <docuno.hxx>
#include <tabvwsh.hxx>
#include <docsh.hxx>
#include <viewdata.hxx>

using namespace ::com::sun::star;

diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 886dab8..d3d9910 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -41,7 +41,6 @@
#include <scmatrix.hxx>
#include <rowheightcontext.hxx>
#include <tokenstringcontext.hxx>
#include <recursionhelper.hxx>

#include <editeng/eeitem.hxx>
#include <o3tl/safeint.hxx>
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index f49f99b..011b596 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -31,7 +31,6 @@
#include <svl/itemiter.hxx>
#include <svl/stritem.hxx>
#include <svx/algitem.hxx>
#include <svx/sdangitm.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/lineitem.hxx>
#include <editeng/brushitem.hxx>
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index cd94e81..93d958f 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -53,7 +53,6 @@
#include <validat.hxx>
#include <detdata.hxx>
#include <defaultsoptions.hxx>
#include <sc.hrc>
#include <ddelink.hxx>
#include <chgtrack.hxx>
#include <chgviset.hxx>
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 944ca8c..4b9e061 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -66,7 +66,6 @@
#include <refupdatecontext.hxx>
#include <scopetools.hxx>
#include <filterentries.hxx>
#include <docsh.hxx>
#include <queryparam.hxx>

#include <globalnames.hxx>
diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx
index d56cea7..137aec6 100644
--- a/sc/source/core/data/documen7.cxx
+++ b/sc/source/core/data/documen7.cxx
@@ -30,7 +30,6 @@
#include <sheetevents.hxx>
#include <tokenarray.hxx>
#include <listenercontext.hxx>
#include <refhint.hxx>

void ScDocument::StartListeningArea(
    const ScRange& rRange, bool bGroupListening, SvtListener* pListener )
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index e4cb29e..03623e1 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -23,7 +23,6 @@
#include <comphelper/servicehelper.hxx>
#include <officecfg/Office/Common.hxx>
#include <tools/urlobj.hxx>
#include <editeng/editobj.hxx>
#include <editeng/frmdiritem.hxx>
#include <editeng/langitem.hxx>
#include <sfx2/linkmgr.hxx>
@@ -80,7 +79,6 @@
#include <globalnames.hxx>
#include <stringutil.hxx>
#include <documentlinkmgr.hxx>
#include <scopetools.hxx>
#include <tokenarray.hxx>

#include <memory>
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 17d0bf5..8e90694 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -25,7 +25,6 @@
#include <svx/sdrundomanager.hxx>
#include <svx/svditer.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/viewsh.hxx>
#include <sfx2/docfile.hxx>
#include <svl/poolcach.hxx>
#include <svl/zforlist.hxx>
@@ -40,6 +39,7 @@
#include <com/sun/star/lang/NotInitializedException.hpp>

#include <document.hxx>
#include <docuno.hxx>
#include <table.hxx>
#include <column.hxx>
#include <attrib.hxx>
@@ -83,8 +83,6 @@
#include <formulagroup.hxx>
#include <tokenstringcontext.hxx>
#include <compressedarray.hxx>
#include <docsh.hxx>
#include <brdcst.hxx>
#include <recursionhelper.hxx>

#include <formula/vectortoken.hxx>
@@ -94,7 +92,7 @@
#include <utility>

#include <comphelper/lok.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <comphelper/servicehelper.hxx>

#include <vcl/uitest/logger.hxx>
#include <vcl/uitest/eventdescription.hxx>
diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx
index d05e812..81f2fe1 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -16,7 +16,6 @@
#include <listenercontext.hxx>
#include <tokenstringcontext.hxx>
#include <poolhelp.hxx>
#include <bcaslot.hxx>
#include <cellvalues.hxx>
#include <docpool.hxx>
#include <columniterator.hxx>
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index b57bf76..b74bfd0 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -20,8 +20,6 @@
#include <dptabsrc.hxx>

#include <algorithm>
#include <set>
#include <unordered_set>
#include <vector>

#include <comphelper/sequence.hxx>
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 477eefe..16fbe9c 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -35,10 +35,8 @@
#include <svx/svdoashp.hxx>
#include <svx/svdobj.hxx>
#include <svx/svdocapt.hxx>
#include <svx/svdograf.hxx>
#include <svx/svdoole2.hxx>
#include <svx/svdopath.hxx>
#include <svx/svdtrans.hxx>
#include <svx/svdundo.hxx>
#include <svx/sdsxyitm.hxx>
#include <svx/svxids.hrc>
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 0e2c211..1d789e0 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -74,7 +74,6 @@
#include <memory>
#include <map>
#include <vector>
#include <unordered_set>

using namespace formula;

diff --git a/sc/source/core/data/markarr.cxx b/sc/source/core/data/markarr.cxx
index 3c2083a..9b1d3d8 100644
--- a/sc/source/core/data/markarr.cxx
+++ b/sc/source/core/data/markarr.cxx
@@ -19,12 +19,9 @@

#include <markarr.hxx>
#include <address.hxx>
#include <rangelst.hxx>
#include <sheetlimits.hxx>
#include <vector>

#include <osl/diagnose.h>

ScMarkArray::ScMarkArray(const ScSheetLimits& rLimits) :
    mrSheetLimits(rLimits)
{
diff --git a/sc/source/core/data/markmulti.cxx b/sc/source/core/data/markmulti.cxx
index e0296a8..3a41f8c 100644
--- a/sc/source/core/data/markmulti.cxx
+++ b/sc/source/core/data/markmulti.cxx
@@ -22,8 +22,6 @@
#include <rangelst.hxx>
#include <segmenttree.hxx>
#include <sheetlimits.hxx>
#include <sal/log.hxx>
#include <o3tl/sorted_vector.hxx>

#include <algorithm>

diff --git a/sc/source/core/data/poolhelp.cxx b/sc/source/core/data/poolhelp.cxx
index dc7e5e6..37b64c6 100644
--- a/sc/source/core/data/poolhelp.cxx
+++ b/sc/source/core/data/poolhelp.cxx
@@ -20,7 +20,6 @@
#include <comphelper/processfactory.hxx>
#include <svl/zforlist.hxx>
#include <editeng/editeng.hxx>
#include <osl/diagnose.h>

#include <poolhelp.hxx>
#include <document.hxx>
diff --git a/sc/source/core/data/segmenttree.cxx b/sc/source/core/data/segmenttree.cxx
index 0003343..4ccf146 100644
--- a/sc/source/core/data/segmenttree.cxx
+++ b/sc/source/core/data/segmenttree.cxx
@@ -23,7 +23,6 @@
#include <sal/log.hxx>
#include <algorithm>
#include <limits>
#include <address.hxx>

using ::std::numeric_limits;

diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index d95ae65..d878070 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -20,7 +20,6 @@
#include <scitems.hxx>
#include <comphelper/string.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/editobj.hxx>
#include <editeng/editeng.hxx>
#include <editeng/eeitem.hxx>
#include <editeng/escapementitem.hxx>
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 7ed29dd..0a79b37 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -24,6 +24,7 @@

#include <sfx2/app.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/viewsh.hxx>
#include <basic/sbmeth.hxx>
#include <basic/sbmod.hxx>
#include <basic/sbstar.hxx>
@@ -50,7 +51,6 @@
#include <scmatrix.hxx>
#include <cellvalue.hxx>
#include <comphelper/lok.hxx>
#include <sfx2/lokhelper.hxx>

#include <math.h>
#include <memory>
diff --git a/sc/source/core/inc/arraysumfunctor.hxx b/sc/source/core/inc/arraysumfunctor.hxx
index eb046fa..fc19819 100644
--- a/sc/source/core/inc/arraysumfunctor.hxx
+++ b/sc/source/core/inc/arraysumfunctor.hxx
@@ -12,8 +12,10 @@
#define INCLUDED_SC_SOURCE_CORE_INC_ARRAYSUMFUNCTOR_HXX

#include <cstdint>
#include <rtl/math.hxx>
#include <cmath>

#include <sal/mathconf.h>
#include <sal/types.h>
#include <tools/simd.hxx>
#include <tools/cpuid.hxx>

diff --git a/sc/source/core/inc/grouptokenconverter.hxx b/sc/source/core/inc/grouptokenconverter.hxx
index 6f43f9b..499ced0 100644
--- a/sc/source/core/inc/grouptokenconverter.hxx
+++ b/sc/source/core/inc/grouptokenconverter.hxx
@@ -10,7 +10,6 @@
#ifndef INCLUDED_SC_SOURCE_CORE_INC_GROUPTOKENCONVERTER_HXX
#define INCLUDED_SC_SOURCE_CORE_INC_GROUPTOKENCONVERTER_HXX

#include <scdllapi.h>
#include <types.hxx>
#include <formulalogger.hxx>

diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index 4e986da..18ed429 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -25,7 +25,6 @@
#include <unotools/textsearch.hxx>
#include <formula/errorcodes.hxx>
#include <formula/tokenarray.hxx>
#include <scdllapi.h>
#include <types.hxx>
#include <externalrefmgr.hxx>
#include <calcconfig.hxx>
diff --git a/sc/source/core/opencl/opinlinefun_math.hxx b/sc/source/core/opencl/opinlinefun_math.hxx
index ab9dc02..9c53b9f 100644
--- a/sc/source/core/opencl/opinlinefun_math.hxx
+++ b/sc/source/core/opencl/opinlinefun_math.hxx
@@ -10,6 +10,8 @@
#ifndef INCLUDED_SC_SOURCE_CORE_OPENCL_OPINLINEFUN_MATH_HXX
#define INCLUDED_SC_SOURCE_CORE_OPENCL_OPINLINEFUN_MATH_HXX

#include <string>

std::string Math_Intg_Str=
"\ndouble Intg(double n)\n\
{\n\
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index aa6e151..df68a6f 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -29,6 +29,7 @@
#include <com/sun/star/container/XContentEnumerationAccess.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XServiceName.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
@@ -47,12 +48,9 @@

#include <addincol.hxx>
#include <addinhelpid.hxx>
#include <compiler.hxx>
#include <scmatrix.hxx>
#include <addinlis.hxx>
#include <formula/errorcodes.hxx>
#include <formula/funcvarargs.h>
#include <sc.hrc>
#include <optutil.hxx>
#include <addincfg.hxx>
#include <scmod.hxx>
diff --git a/sc/source/core/tool/addinhelpid.cxx b/sc/source/core/tool/addinhelpid.cxx
index 832ce50..cad2ca6 100644
--- a/sc/source/core/tool/addinhelpid.cxx
+++ b/sc/source/core/tool/addinhelpid.cxx
@@ -18,7 +18,6 @@
 */

#include <addinhelpid.hxx>
#include <sc.hrc>
#include <helpids.h>

// A struct containing the built-in function name and the built-in help ID.
diff --git a/sc/source/core/tool/addinlis.cxx b/sc/source/core/tool/addinlis.cxx
index f4ff197..7a9f5d4 100644
--- a/sc/source/core/tool/addinlis.cxx
+++ b/sc/source/core/tool/addinlis.cxx
@@ -24,7 +24,6 @@
#include <miscuno.hxx>
#include <document.hxx>
#include <brdcst.hxx>
#include <sc.hrc>

#include <com/sun/star/sheet/XVolatileResult.hpp>

diff --git a/sc/source/core/tool/adiasync.cxx b/sc/source/core/tool/adiasync.cxx
index 8f8ded6..d8086e3 100644
--- a/sc/source/core/tool/adiasync.cxx
+++ b/sc/source/core/tool/adiasync.cxx
@@ -25,9 +25,7 @@

#include <adiasync.hxx>
#include <brdcst.hxx>
#include <global.hxx>
#include <document.hxx>
#include <sc.hrc>
#include <osl/diagnose.h>
#include <osl/thread.h>

diff --git a/sc/source/core/tool/appoptio.cxx b/sc/source/core/tool/appoptio.cxx
index d3b56af..d71d59a 100644
--- a/sc/source/core/tool/appoptio.cxx
+++ b/sc/source/core/tool/appoptio.cxx
@@ -17,15 +17,11 @@
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

#include <vcl/svapp.hxx>

#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <appoptio.hxx>
#include <rechead.hxx>
#include <global.hxx>
#include <userlist.hxx>
#include <sc.hrc>
#include <formula/compiler.hxx>
#include <miscuno.hxx>
#include <memory>
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 05c7654..22d32a8 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -20,18 +20,14 @@
#include <memory>
#include <autoform.hxx>

#include <sfx2/app.hxx>
#include <sfx2/docfile.hxx>
#include <unotools/pathoptions.hxx>
#include <svl/intitem.hxx>
#include <svl/itemset.hxx>
#include <vcl/svapp.hxx>
#include <vcl/outdev.hxx>
#include <svx/algitem.hxx>
#include <svx/dialmgr.hxx>
#include <svx/dialogs.hrc>
#include <svx/rotmodit.hxx>
#include <svx/svxids.hrc>
#include <svx/strings.hrc>
#include <editeng/adjustitem.hxx>
#include <editeng/borderline.hxx>
@@ -55,6 +51,7 @@
#include <unotools/transliterationwrapper.hxx>
#include <tools/tenccvt.hxx>
#include <osl/diagnose.h>
#include <osl/thread.hxx>

#include <attrib.hxx>
#include <globstr.hrc>
@@ -62,10 +59,6 @@
#include <scresid.hxx>
#include <document.hxx>

#include <svl/legacyitem.hxx>
#include <editeng/legacyitem.hxx>
#include <svx/legacyitem.hxx>

/*
 * XXX: BIG RED NOTICE! Changes MUST be binary file format compatible and MUST
 * be synchronized with Writer's SwTableAutoFmtTbl sw/source/core/doc/tblafmt.cxx
diff --git a/sc/source/core/tool/calcconfig.cxx b/sc/source/core/tool/calcconfig.cxx
index 9ef2ccf..4a8fb73 100644
--- a/sc/source/core/tool/calcconfig.cxx
+++ b/sc/source/core/tool/calcconfig.cxx
@@ -8,22 +8,17 @@
 */

#include <ostream>
#include <set>

#include <formula/FormulaCompiler.hxx>
#include <formula/grammar.hxx>
#include <formula/opcode.hxx>
#include <rtl/ustring.hxx>
#include <sal/log.hxx>
#include <sfx2/objsh.hxx>
#include <unotools/configmgr.hxx>

#include <calcconfig.hxx>
#include <compiler.hxx>
#include <docsh.hxx>

#include <comphelper/configurationlistener.hxx>
#include <com/sun/star/datatransfer/XTransferable2.hpp>

using comphelper::ConfigurationListener;

diff --git a/sc/source/core/tool/callform.cxx b/sc/source/core/tool/callform.cxx
index cbf8ae7..07b07a4 100644
--- a/sc/source/core/tool/callform.cxx
+++ b/sc/source/core/tool/callform.cxx
@@ -22,8 +22,7 @@
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <osl/module.hxx>
#include <osl/file.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <memory>

#include <callform.hxx>
diff --git a/sc/source/core/tool/cellform.cxx b/sc/source/core/tool/cellform.cxx
index 315bc9c..0f2daec 100644
--- a/sc/source/core/tool/cellform.cxx
+++ b/sc/source/core/tool/cellform.cxx
@@ -19,7 +19,6 @@

#include <cellform.hxx>

#include <sfx2/objsh.hxx>
#include <svl/zforlist.hxx>
#include <svl/sharedstring.hxx>

@@ -27,7 +26,6 @@
#include <document.hxx>
#include <cellvalue.hxx>
#include <formula/errorcodes.hxx>
#include <sc.hrc>
#include <editutil.hxx>

void ScCellFormat::GetString( const ScRefCellValue& rCell, sal_uInt32 nFormat, OUString& rString,
diff --git a/sc/source/core/tool/cellkeytranslator.cxx b/sc/source/core/tool/cellkeytranslator.cxx
index 381a48a..833f57d 100644
--- a/sc/source/core/tool/cellkeytranslator.cxx
+++ b/sc/source/core/tool/cellkeytranslator.cxx
@@ -21,7 +21,6 @@
#include <global.hxx>
#include <cellkeytranslator.hxx>
#include <comphelper/processfactory.hxx>
#include <i18nlangtag/mslangid.hxx>
#include <i18nlangtag/lang.h>
#include <i18nutil/transliteration.hxx>
#include <rtl/ustring.hxx>
diff --git a/sc/source/core/tool/chartarr.cxx b/sc/source/core/tool/chartarr.cxx
index 7b4637b..21be72e 100644
--- a/sc/source/core/tool/chartarr.cxx
+++ b/sc/source/core/tool/chartarr.cxx
@@ -17,15 +17,11 @@
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

#include <scitems.hxx>
#include <svl/intitem.hxx>
#include <svl/zforlist.hxx>
#include <float.h>

#include <chartarr.hxx>
#include <cellvalue.hxx>
#include <document.hxx>
#include <rechead.hxx>
#include <globstr.hrc>
#include <scresid.hxx>
#include <formulacell.hxx>
diff --git a/sc/source/core/tool/chartlock.cxx b/sc/source/core/tool/chartlock.cxx
index f1ecef3..2ac1a37 100644
--- a/sc/source/core/tool/chartlock.cxx
+++ b/sc/source/core/tool/chartlock.cxx
@@ -17,7 +17,6 @@
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

#include <vcl/svapp.hxx>
#include <svx/svditer.hxx>
#include <svx/svdoole2.hxx>
#include <svx/svdpage.hxx>
diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx
index 1d2cdc5..48e734e 100644
--- a/sc/source/core/tool/chartpos.cxx
+++ b/sc/source/core/tool/chartpos.cxx
@@ -19,7 +19,6 @@

#include <chartpos.hxx>
#include <document.hxx>
#include <rechead.hxx>
#include <osl/diagnose.h>

#include <memory>
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index bd40a24..86be823 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -23,8 +23,6 @@
#include <document.hxx>
#include <dociter.hxx>
#include <global.hxx>
#include <rechead.hxx>
#include <scerrors.hxx>
#include <scmod.hxx>
#include <inputopt.hxx>
#include <patattr.hxx>
@@ -39,18 +37,12 @@

#include <osl/diagnose.h>
#include <svl/zforlist.hxx>
#include <svl/itemset.hxx>
#include <svl/isethint.hxx>
#include <svl/itempool.hxx>
#include <sfx2/app.hxx>
#include <sfx2/objsh.hxx>
#include <unotools/useroptions.hxx>
#include <unotools/datetime.hxx>
#include <sfx2/sfxsids.hrc>
#include <tools/json_writer.hxx>
#include <algorithm>
#include <memory>
#include <boost/property_tree/json_parser.hpp>

ScChangeAction::ScChangeAction( ScChangeActionType eTypeP, const ScRange& rRange )
        :
diff --git a/sc/source/core/tool/chgviset.cxx b/sc/source/core/tool/chgviset.cxx
index 8913e14..0baf60a 100644
--- a/sc/source/core/tool/chgviset.cxx
+++ b/sc/source/core/tool/chgviset.cxx
@@ -20,7 +20,6 @@
#include <unotools/textsearch.hxx>

#include <chgviset.hxx>
#include <rechead.hxx>
#include <chgtrack.hxx>
#include <document.hxx>

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index e4fdbba..c35f809 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -29,12 +29,10 @@
#include <basic/sbstar.hxx>
#include <svl/zforlist.hxx>
#include <svl/sharedstringpool.hxx>
#include <sal/macros.h>
#include <sal/log.hxx>
#include <o3tl/safeint.hxx>
#include <osl/diagnose.h>
#include <rtl/character.hxx>
#include <tools/solar.h>
#include <unotools/charclass.hxx>
#include <unotools/configmgr.hxx>
#include <com/sun/star/lang/Locale.hpp>
@@ -49,7 +47,6 @@
#include <rtl/math.hxx>
#include <rtl/ustring.hxx>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <rangenam.hxx>
#include <dbdata.hxx>
@@ -57,7 +54,6 @@
#include <callform.hxx>
#include <addincol.hxx>
#include <refupdat.hxx>
#include <sc.hrc>
#include <globstr.hrc>
#include <scresid.hxx>
#include <formulacell.hxx>
diff --git a/sc/source/core/tool/consoli.cxx b/sc/source/core/tool/consoli.cxx
index 7b02c05..be29bbb 100644
--- a/sc/source/core/tool/consoli.cxx
+++ b/sc/source/core/tool/consoli.cxx
@@ -27,7 +27,6 @@
#include <osl/diagnose.h>
#include <refdata.hxx>

#include <math.h>
#include <string.h>
#include <memory>

diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index 5a6a284..9f8b682 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -27,7 +27,6 @@
#include <dbdata.hxx>
#include <globalnames.hxx>
#include <refupdat.hxx>
#include <rechead.hxx>
#include <document.hxx>
#include <queryparam.hxx>
#include <queryentry.hxx>
diff --git a/sc/source/core/tool/defaultsoptions.cxx b/sc/source/core/tool/defaultsoptions.cxx
index b821974..75636dc 100644
--- a/sc/source/core/tool/defaultsoptions.cxx
+++ b/sc/source/core/tool/defaultsoptions.cxx
@@ -11,10 +11,6 @@
#include <osl/diagnose.h>

#include <defaultsoptions.hxx>
#include <miscuno.hxx>
#include <global.hxx>
#include <attrib.hxx>
#include <scitems.hxx>
#include <globstr.hrc>
#include <scresid.hxx>
#include <sc.hrc>
diff --git a/sc/source/core/tool/detdata.cxx b/sc/source/core/tool/detdata.cxx
index f64dc49..feaccec 100644
--- a/sc/source/core/tool/detdata.cxx
+++ b/sc/source/core/tool/detdata.cxx
@@ -21,7 +21,6 @@
#include <memory>
#include <detdata.hxx>
#include <refupdat.hxx>
#include <rechead.hxx>

ScDetOpList::ScDetOpList(const ScDetOpList& rList) :
    bHasAddError( false )
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index 1fa94ab..3db72b4d 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -20,7 +20,6 @@
#include <scitems.hxx>
#include <svtools/colorcfg.hxx>
#include <editeng/eeitem.hxx>
#include <editeng/outlobj.hxx>
#include <formula/errorcodes.hxx>
#include <svx/sdshitm.hxx>
#include <svx/sdsxyitm.hxx>
@@ -42,13 +41,9 @@
#include <svx/xlnstit.hxx>
#include <svx/xlnstwit.hxx>
#include <svx/xlnwtit.hxx>
#include <svx/xtable.hxx>
#include <svx/sdtagitm.hxx>
#include <editeng/outliner.hxx>
#include <editeng/editobj.hxx>
#include <svx/sxcecitm.hxx>
#include <svl/whiter.hxx>
#include <editeng/writingmodeitem.hxx>

#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
@@ -63,10 +58,8 @@
#include <formulacell.hxx>
#include <docpool.hxx>
#include <patattr.hxx>
#include <attrib.hxx>
#include <scmod.hxx>
#include <postit.hxx>
#include <rangelst.hxx>
#include <reftokenhelper.hxx>
#include <formulaiter.hxx>
#include <cellvalue.hxx>
diff --git a/sc/source/core/tool/docoptio.cxx b/sc/source/core/tool/docoptio.cxx
index 5d289f4..a93d114 100644
--- a/sc/source/core/tool/docoptio.cxx
+++ b/sc/source/core/tool/docoptio.cxx
@@ -17,7 +17,6 @@
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

#include <vcl/svapp.hxx>
#include <svl/zforlist.hxx>
#include <osl/diagnose.h>

@@ -25,8 +24,6 @@
#include <com/sun/star/uno/Sequence.hxx>

#include <docoptio.hxx>
#include <rechead.hxx>
#include <sc.hrc>
#include <miscuno.hxx>
#include <global.hxx>

diff --git a/sc/source/core/tool/doubleref.cxx b/sc/source/core/tool/doubleref.cxx
index 267f762..a6c439c 100644
--- a/sc/source/core/tool/doubleref.cxx
+++ b/sc/source/core/tool/doubleref.cxx
@@ -18,7 +18,6 @@
 */

#include <doubleref.hxx>
#include <formulacell.hxx>
#include <global.hxx>
#include <document.hxx>
#include <queryparam.hxx>
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index d415e08..523c92e 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -23,17 +23,13 @@

#include <svx/algitem.hxx>
#include <svtools/colorcfg.hxx>
#include <editeng/editview.hxx>
#include <editeng/editstat.hxx>
#include <editeng/escapementitem.hxx>
#include <editeng/flditem.hxx>
#include <editeng/numitem.hxx>
#include <editeng/justifyitem.hxx>
#include <editeng/editobj.hxx>
#include <vcl/svapp.hxx>
#include <vcl/outdev.hxx>
#include <svl/inethist.hxx>
#include <unotools/syslocale.hxx>
#include <sfx2/objsh.hxx>
#include <osl/diagnose.h>

diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx
index 76b29ea..dacf978 100644
--- a/sc/source/core/tool/formulagroup.cxx
+++ b/sc/source/core/tool/formulagroup.cxx
@@ -13,21 +13,13 @@
#include <formulagroupcl.hxx>
#include <document.hxx>
#include <formulacell.hxx>
#include <tokenarray.hxx>
#include <compiler.hxx>
#include <interpre.hxx>
#include <scmatrix.hxx>
#include <globalnames.hxx>
#include <comphelper/threadpool.hxx>
#include <tools/cpuid.hxx>

#include <formula/vectortoken.hxx>
#include <officecfg/Office/Common.hxx>
#include <officecfg/Office/Calc.hxx>
#if HAVE_FEATURE_OPENCL
#include <opencl/platforminfo.hxx>
#endif
#include <rtl/bootstrap.hxx>
#include <sal/log.hxx>

#include <cstdio>
diff --git a/sc/source/core/tool/formulaopt.cxx b/sc/source/core/tool/formulaopt.cxx
index 60b3bde9..7305c3d 100644
--- a/sc/source/core/tool/formulaopt.cxx
+++ b/sc/source/core/tool/formulaopt.cxx
@@ -13,7 +13,6 @@
#include <sal/log.hxx>
#include <unotools/localedatawrapper.hxx>
#include <formulaopt.hxx>
#include <miscuno.hxx>
#include <global.hxx>
#include <formulagroup.hxx>
#include <sc.hrc>
diff --git a/sc/source/core/tool/inputopt.cxx b/sc/source/core/tool/inputopt.cxx
index 380c439..d54ab97 100644
--- a/sc/source/core/tool/inputopt.cxx
+++ b/sc/source/core/tool/inputopt.cxx
@@ -22,9 +22,7 @@
#include <osl/diagnose.h>

#include <inputopt.hxx>
#include <rechead.hxx>
#include <global.hxx>
#include <sc.hrc>
#include <miscuno.hxx>

using namespace utl;
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 507a7ae..95185b7 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -24,7 +24,6 @@
#include <editeng/justifyitem.hxx>
#include <o3tl/safeint.hxx>
#include <osl/thread.h>
#include <svx/algitem.hxx>
#include <unotools/textsearch.hxx>
#include <svl/zforlist.hxx>
#include <svl/zformat.hxx>
@@ -57,22 +56,18 @@
#include <rangeutl.hxx>
#include <compiler.hxx>
#include <externalrefmgr.hxx>
#include <basic/sbstar.hxx>
#include <doubleref.hxx>
#include <queryparam.hxx>
#include <queryentry.hxx>
#include <tokenarray.hxx>
#include <compare.hxx>

#include <com/sun/star/util/SearchResult.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/random.hxx>
#include <comphelper/string.hxx>
#include <svl/sharedstringpool.hxx>

#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <vector>
#include <memory>
#include <limits>
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index f917e40..2effe4b 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -22,28 +22,22 @@

#include <comphelper/string.hxx>
#include <o3tl/float_int_conversion.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/linkmgr.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/objsh.hxx>
#include <svl/stritem.hxx>
#include <svl/zforlist.hxx>
#include <svl/sharedstringpool.hxx>
#include <sal/macros.h>
#include <osl/diagnose.h>

#include <attrib.hxx>
#include <sc.hrc>
#include <ddelink.hxx>
#include <scmatrix.hxx>
#include <compiler.hxx>
#include <formulacell.hxx>
#include <document.hxx>
#include <dociter.hxx>
#include <docoptio.hxx>
#include <unitconv.hxx>
#include <hints.hxx>
#include <dpobject.hxx>
#include <postit.hxx>
#include <tokenarray.hxx>
#include <globalnames.hxx>
#include <stlsheet.hxx>
@@ -51,9 +45,7 @@

#include <com/sun/star/sheet/DataPilotFieldFilter.hpp>

#include <limits>
#include <string.h>
#include <math.h>

using ::std::vector;
using namespace com::sun::star;
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
index f17e72a..ebf77f6 100644
--- a/sc/source/core/tool/interpr3.cxx
+++ b/sc/source/core/tool/interpr3.cxx
@@ -19,12 +19,9 @@

#include <tools/solar.h>
#include <stdlib.h>
#include <string.h>

#include <interpre.hxx>
#include <global.hxx>
#include <compiler.hxx>
#include <formulacell.hxx>
#include <document.hxx>
#include <dociter.hxx>
#include <matrixoperators.hxx>
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index b9d34cd..32dbd58 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -21,13 +21,10 @@

#include <interpre.hxx>

#include <rangelst.hxx>
#include <o3tl/safeint.hxx>
#include <rtl/math.hxx>
#include <sfx2/app.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/docfilt.hxx>
#include <basic/sbmeth.hxx>
#include <basic/sbmod.hxx>
#include <basic/sbstar.hxx>
@@ -39,7 +36,6 @@
#include <unotools/charclass.hxx>
#include <stdlib.h>
#include <string.h>
#include <signal.h>

#include <com/sun/star/table/XCellRange.hpp>
#include <com/sun/star/script/XInvocation.hpp>
@@ -55,7 +51,6 @@
#include <docoptio.hxx>
#include <scmatrix.hxx>
#include <adiasync.hxx>
#include <sc.hrc>
#include <cellsuno.hxx>
#include <optuno.hxx>
#include <rangeseq.hxx>
@@ -70,14 +65,11 @@
#include <tokenarray.hxx>
#include <compiler.hxx>

#include <math.h>
#include <float.h>
#include <map>
#include <algorithm>
#include <basic/basmgr.hxx>
#include <vbahelper/vbaaccesshelper.hxx>
#include <memory>
#include <stack>

using namespace com::sun::star;
using namespace formula;
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index 3930de3..08bd2fc 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -30,7 +30,6 @@

#include <interpre.hxx>
#include <global.hxx>
#include <compiler.hxx>
#include <formulacell.hxx>
#include <document.hxx>
#include <dociter.hxx>
diff --git a/sc/source/core/tool/interpr6.cxx b/sc/source/core/tool/interpr6.cxx
index 57c0a89..f506b9f 100644
--- a/sc/source/core/tool/interpr6.cxx
+++ b/sc/source/core/tool/interpr6.cxx
@@ -23,7 +23,7 @@
#include <document.hxx>
#include <cellvalue.hxx>
#include <dociter.hxx>
#include <mtvcellfunc.hxx>
#include <mtvfunctions.hxx>
#include <scmatrix.hxx>

#include <arraysumfunctor.hxx>
diff --git a/sc/source/core/tool/interpr7.cxx b/sc/source/core/tool/interpr7.cxx
index fbc403d..acdea08 100644
--- a/sc/source/core/tool/interpr7.cxx
+++ b/sc/source/core/tool/interpr7.cxx
@@ -18,10 +18,6 @@
#include <sfx2/linkmgr.hxx>
#include <tools/urlobj.hxx>

#include <com/sun/star/ucb/XSimpleFileAccess3.hpp>
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <com/sun/star/io/XInputStream.hpp>

#include <officecfg/Office/Common.hxx>
#include <libxml/xpath.h>
#include <datastreamgettime.hxx>
diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx
index 19cdd7e..98a0551 100644
--- a/sc/source/core/tool/interpr8.cxx
+++ b/sc/source/core/tool/interpr8.cxx
@@ -9,14 +9,12 @@
 */

#include <interpre.hxx>
#include <global.hxx>
#include <dociter.hxx>
#include <cellvalue.hxx>
#include <scmatrix.hxx>
#include <comphelper/random.hxx>
#include <formula/token.hxx>
#include <sal/log.hxx>

#include <stack>
#include <cmath>
#include <memory>
#include <vector>
diff --git a/sc/source/core/tool/jumpmatrix.cxx b/sc/source/core/tool/jumpmatrix.cxx
index e06cfca..868d5da 100644
--- a/sc/source/core/tool/jumpmatrix.cxx
+++ b/sc/source/core/tool/jumpmatrix.cxx
@@ -19,7 +19,6 @@

#include <jumpmatrix.hxx>
#include <scmatrix.hxx>
#include <tools/solar.h>
#include <osl/diagnose.h>

namespace {
diff --git a/sc/source/core/tool/matrixoperators.cxx b/sc/source/core/tool/matrixoperators.cxx
index c42062b..31cf6d9 100644
--- a/sc/source/core/tool/matrixoperators.cxx
+++ b/sc/source/core/tool/matrixoperators.cxx
@@ -7,7 +7,6 @@
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#include <functional>
#include <matrixoperators.hxx>


diff --git a/sc/source/core/tool/numformat.cxx b/sc/source/core/tool/numformat.cxx
index ce3df32..4a5403a 100644
--- a/sc/source/core/tool/numformat.cxx
+++ b/sc/source/core/tool/numformat.cxx
@@ -19,13 +19,11 @@

#include <numformat.hxx>
#include <patattr.hxx>
#include <scitems.hxx>
#include <document.hxx>

#include <comphelper/processfactory.hxx>
#include <svl/zforlist.hxx>
#include <svl/zformat.hxx>
#include <svl/intitem.hxx>
#include <svl/languageoptions.hxx>

namespace sc {
diff --git a/sc/source/core/tool/optutil.cxx b/sc/source/core/tool/optutil.cxx
index f445c20..71ae002 100644
--- a/sc/source/core/tool/optutil.cxx
+++ b/sc/source/core/tool/optutil.cxx
@@ -17,11 +17,9 @@
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

#include <vcl/svapp.hxx>
#include <optutil.hxx>
#include <global.hxx>
#include <unotools/configmgr.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/localedatawrapper.hxx>

bool ScOptionsUtil::IsMetricSystem()
diff --git a/sc/source/core/tool/parclass.cxx b/sc/source/core/tool/parclass.cxx
index 9764141..8dd3901 100644
--- a/sc/source/core/tool/parclass.cxx
+++ b/sc/source/core/tool/parclass.cxx
@@ -18,14 +18,12 @@
 */

#include <parclass.hxx>
#include <token.hxx>
#include <global.hxx>
#include <callform.hxx>
#include <addincol.hxx>
#include <funcdesc.hxx>
#include <formula/token.hxx>
#include <unotools/charclass.hxx>
#include <osl/diagnose.h>
#include <sal/macros.h>
#include <sal/log.hxx>
#include <string.h>

diff --git a/sc/source/core/tool/prnsave.cxx b/sc/source/core/tool/prnsave.cxx
index c07eda0..d6df22d 100644
--- a/sc/source/core/tool/prnsave.cxx
+++ b/sc/source/core/tool/prnsave.cxx
@@ -18,7 +18,6 @@
 */

#include <prnsave.hxx>
#include <global.hxx>
#include <address.hxx>

#include <osl/diagnose.h>
diff --git a/sc/source/core/tool/progress.cxx b/sc/source/core/tool/progress.cxx
index ae1c96c..2a187f8 100644
--- a/sc/source/core/tool/progress.cxx
+++ b/sc/source/core/tool/progress.cxx
@@ -31,7 +31,6 @@
#define SC_PROGRESS_CXX
#include <progress.hxx>
#include <document.hxx>
#include <global.hxx>
#include <globstr.hrc>
#include <scresid.hxx>

diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index c49e969..f87b502 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -19,13 +19,11 @@

#include <stdlib.h>
#include <unotools/collatorwrapper.hxx>
#include <osl/diagnose.h>
#include <sal/log.hxx>

#include <rangelst.hxx>
#include <document.hxx>
#include <refupdat.hxx>
#include <rechead.hxx>
#include <compiler.hxx>
#include <algorithm>
#include <memory>
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx
index 314a8990..6779ffa 100644
--- a/sc/source/core/tool/rangenam.cxx
+++ b/sc/source/core/tool/rangenam.cxx
@@ -20,7 +20,6 @@
#include <string.h>
#include <memory>
#include <unotools/collatorwrapper.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <unotools/charclass.hxx>
#include <com/sun/star/sheet/NamedRangeFlag.hpp>
#include <osl/diagnose.h>
@@ -30,8 +29,6 @@
#include <rangenam.hxx>
#include <global.hxx>
#include <compiler.hxx>
#include <rangeutl.hxx>
#include <rechead.hxx>
#include <refupdat.hxx>
#include <document.hxx>
#include <refupdatecontext.hxx>
diff --git a/sc/source/core/tool/refupdat.cxx b/sc/source/core/tool/refupdat.cxx
index 3a1693e..9b587ef 100644
--- a/sc/source/core/tool/refupdat.cxx
+++ b/sc/source/core/tool/refupdat.cxx
@@ -19,9 +19,8 @@

#include <refupdat.hxx>
#include <document.hxx>
#include <compiler.hxx>
#include <bigrange.hxx>
#include <chgtrack.hxx>
#include <refdata.hxx>

#include <osl/diagnose.h>

diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index eb39260..a887482 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -17,12 +17,10 @@
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

#include <arraysumfunctor.hxx>
#include <scmatrix.hxx>
#include <global.hxx>
#include <address.hxx>
#include <formula/errorcodes.hxx>
#include <formula/vectortoken.hxx>
#include <interpre.hxx>
#include <mtvelements.hxx>
#include <compare.hxx>
@@ -31,20 +29,16 @@

#include <svl/zforlist.hxx>
#include <svl/sharedstring.hxx>
#include <tools/stream.hxx>
#include <rtl/math.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>

#include <math.h>

#include <memory>
#include <vector>
#include <limits>

#include <mdds/multi_type_matrix.hpp>
#include <mdds/multi_type_vector_types.hpp>
#include <mdds/multi_type_vector_trait.hpp>

#if DEBUG_MATRIX
#include <iostream>
diff --git a/sc/source/core/tool/scopetools.cxx b/sc/source/core/tool/scopetools.cxx
index 0da9d106..679e613 100644
--- a/sc/source/core/tool/scopetools.cxx
+++ b/sc/source/core/tool/scopetools.cxx
@@ -10,7 +10,6 @@
#include <scopetools.hxx>
#include <document.hxx>
#include <column.hxx>
#include <vcl/window.hxx>

namespace sc {

diff --git a/sc/source/core/tool/stringutil.cxx b/sc/source/core/tool/stringutil.cxx
index 685793b..1a96df8 100644
--- a/sc/source/core/tool/stringutil.cxx
+++ b/sc/source/core/tool/stringutil.cxx
@@ -18,7 +18,6 @@
 */

#include <stringutil.hxx>
#include <global.hxx>
#include <svl/zforlist.hxx>

#include <rtl/ustrbuf.hxx>
diff --git a/sc/source/core/tool/stylehelper.cxx b/sc/source/core/tool/stylehelper.cxx
index 36a1ae8..88a7c77 100644
--- a/sc/source/core/tool/stylehelper.cxx
+++ b/sc/source/core/tool/stylehelper.cxx
@@ -21,7 +21,6 @@
#include <osl/diagnose.h>

#include <stylehelper.hxx>
#include <global.hxx>
#include <globstr.hrc>
#include <scresid.hxx>

diff --git a/sc/source/core/tool/subtotal.cxx b/sc/source/core/tool/subtotal.cxx
index 9676553..4c21389 100644
--- a/sc/source/core/tool/subtotal.cxx
+++ b/sc/source/core/tool/subtotal.cxx
@@ -18,7 +18,7 @@
 */

#include <subtotal.hxx>
#include <interpre.hxx>
#include <sal/mathconf.h>
#include <cfloat>

bool SubTotal::SafePlus(double& fVal1, double fVal2)
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 859b443..df968b2 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -17,15 +17,11 @@
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

#include <cstddef>
#include <cstdio>
#include <functional>

#include <string.h>
#include <osl/diagnose.h>
#include <sal/log.hxx>
#include <sfx2/docfile.hxx>
#include <officecfg/Office/Calc.hxx>

#include <token.hxx>
#include <tokenarray.hxx>
@@ -35,11 +31,7 @@
#include <interpre.hxx>
#include <formula/FormulaCompiler.hxx>
#include <formula/compiler.hxx>
#include <formula/grammar.hxx>
#include <formula/opcode.hxx>
#include <formulagroup.hxx>
#include <rechead.hxx>
#include <parclass.hxx>
#include <jumpmatrix.hxx>
#include <rangeseq.hxx>
#include <externalrefmgr.hxx>
diff --git a/sc/source/core/tool/unitconv.cxx b/sc/source/core/tool/unitconv.cxx
index 4068fcb..41d3d4f 100644
--- a/sc/source/core/tool/unitconv.cxx
+++ b/sc/source/core/tool/unitconv.cxx
@@ -21,7 +21,7 @@

#include <unitconv.hxx>
#include <global.hxx>
#include <viewopti.hxx>
#include <optutil.hxx>

using namespace utl;
using namespace com::sun::star::uno;
diff --git a/sc/source/core/tool/userlist.cxx b/sc/source/core/tool/userlist.cxx
index 4facfde..01815ba 100644
--- a/sc/source/core/tool/userlist.cxx
+++ b/sc/source/core/tool/userlist.cxx
@@ -23,8 +23,8 @@
#include <global.hxx>
#include <userlist.hxx>
#include <unotools/localedatawrapper.hxx>
#include <unotools/calendarwrapper.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <com/sun/star/i18n/Calendar2.hpp>

#include <algorithm>

diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx
index 6db6e9b..3678e18 100644
--- a/sc/source/core/tool/viewopti.cxx
+++ b/sc/source/core/tool/viewopti.cxx
@@ -17,17 +17,13 @@
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

#include <vcl/svapp.hxx>
#include <osl/diagnose.h>

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

#include <global.hxx>
#include <globstr.hrc>
#include <scresid.hxx>
#include <viewopti.hxx>
#include <rechead.hxx>
#include <sc.hrc>
#include <miscuno.hxx>

diff --git a/sc/source/core/tool/webservicelink.cxx b/sc/source/core/tool/webservicelink.cxx
index f5e6218..12fe478 100644
--- a/sc/source/core/tool/webservicelink.cxx
+++ b/sc/source/core/tool/webservicelink.cxx
@@ -8,7 +8,6 @@
 */

#include <comphelper/processfactory.hxx>
#include <osl/thread.h>
#include <sfx2/linkmgr.hxx>
#include <sfx2/bindings.hxx>

@@ -19,12 +18,7 @@
#include <webservicelink.hxx>
#include <brdcst.hxx>
#include <document.hxx>
#include <scmatrix.hxx>
#include <patattr.hxx>
#include <rechead.hxx>
#include <rangeseq.hxx>
#include <sc.hrc>
#include <hints.hxx>

ScWebServiceLink::ScWebServiceLink(ScDocument* pD, const OUString& rURL)
    : ::sfx2::SvBaseLink(SfxLinkUpdateMode::ALWAYS, SotClipboardFormatId::STRING)
diff --git a/sc/source/core/tool/zforauto.cxx b/sc/source/core/tool/zforauto.cxx
index 00691f6..dec4945 100644
--- a/sc/source/core/tool/zforauto.cxx
+++ b/sc/source/core/tool/zforauto.cxx
@@ -24,7 +24,6 @@
#include <osl/diagnose.h>

#include <zforauto.hxx>
#include <global.hxx>
#include <tools/stream.hxx>

ScNumFormatAbbrev::ScNumFormatAbbrev() :
diff --git a/sc/source/filter/excel/xeextlst.cxx b/sc/source/filter/excel/xeextlst.cxx
index cca9403..35afd95 100644
--- a/sc/source/filter/excel/xeextlst.cxx
+++ b/sc/source/filter/excel/xeextlst.cxx
@@ -9,8 +9,6 @@

#include <xeextlst.hxx>
#include <xeroot.hxx>
#include <stlsheet.hxx>
#include <ftools.hxx>
#include <xestyle.hxx>
#include <stlpool.hxx>
#include <scitems.hxx>
@@ -19,7 +17,6 @@

#include <oox/export/utils.hxx>
#include <oox/token/namespaces.hxx>
#include <comphelper/processfactory.hxx>

using namespace ::oox;

diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index a43c612..b0ea61b 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -17,7 +17,6 @@
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <utility>
diff --git a/sc/source/filter/excel/xlchart.cxx b/sc/source/filter/excel/xlchart.cxx
index b55a446..0355a56 100644
--- a/sc/source/filter/excel/xlchart.cxx
+++ b/sc/source/filter/excel/xlchart.cxx
@@ -37,8 +37,8 @@
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>

#include <rtl/math.hxx>
#include <sal/macros.h>
#include <sal/mathconf.h>
#include <svl/itemset.hxx>
#include <svx/xfillit0.hxx>
#include <svx/xflclit.hxx>
diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx
index e1813a1..17027dd 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -17,7 +17,6 @@
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

#include <memory>
#include <ftools.hxx>
#include <osl/diagnose.h>
#include <osl/thread.h>
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 3984d7f..d66f9e3 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -37,7 +37,6 @@
#include <sfx2/docfile.hxx>
#include <sfx2/frmhtmlw.hxx>
#include <sfx2/objsh.hxx>
#include <svl/stritem.hxx>
#include <svl/urihelper.hxx>
#include <svtools/htmlkywd.hxx>
#include <svtools/htmlout.hxx>
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index 315d180..0fa8aa5 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -37,7 +37,6 @@
#include <editeng/boxitem.hxx>
#include <editeng/justifyitem.hxx>
#include <sfx2/objsh.hxx>
#include <svl/eitem.hxx>
#include <svl/intitem.hxx>
#include <vcl/graphicfilter.hxx>
#include <svtools/parhtml.hxx>
diff --git a/sc/source/filter/inc/condformatbuffer.hxx b/sc/source/filter/inc/condformatbuffer.hxx
index 6ce5b7f..d8c60da 100644
--- a/sc/source/filter/inc/condformatbuffer.hxx
+++ b/sc/source/filter/inc/condformatbuffer.hxx
@@ -22,6 +22,7 @@

#include "worksheethelper.hxx"
#include <tools/color.hxx>
#include <colorscale.hxx>
#include <conditio.hxx>
#include <rangelst.hxx>

diff --git a/sc/source/filter/inc/eeparser.hxx b/sc/source/filter/inc/eeparser.hxx
index 68183e8..bb330b86 100644
--- a/sc/source/filter/inc/eeparser.hxx
+++ b/sc/source/filter/inc/eeparser.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_SC_SOURCE_FILTER_INC_EEPARSER_HXX

#include <tools/gen.hxx>
#include <vcl/errcode.hxx>
#include <vcl/graph.hxx>
#include <svl/itemset.hxx>
#include <editeng/editdata.hxx>
diff --git a/sc/source/filter/inc/exp_op.hxx b/sc/source/filter/inc/exp_op.hxx
index 9273e74..8c7444a 100644
--- a/sc/source/filter/inc/exp_op.hxx
+++ b/sc/source/filter/inc/exp_op.hxx
@@ -20,6 +20,7 @@
#ifndef INCLUDED_SC_SOURCE_FILTER_INC_EXP_OP_HXX
#define INCLUDED_SC_SOURCE_FILTER_INC_EXP_OP_HXX

#include <tools/stream.hxx>
#include <memory>
#include "xeroot.hxx"

diff --git a/sc/source/filter/inc/lotrange.hxx b/sc/source/filter/inc/lotrange.hxx
index 2e73f43..345ad36 100644
--- a/sc/source/filter/inc/lotrange.hxx
+++ b/sc/source/filter/inc/lotrange.hxx
@@ -23,6 +23,8 @@
#include <refdata.hxx>
#include <types.hxx>

#include <memory>

typedef sal_uInt16  LR_ID;

#define ID_FAIL 0xFFFF
diff --git a/sc/source/filter/inc/root.hxx b/sc/source/filter/inc/root.hxx
index a41b22b..8de0c80 100644
--- a/sc/source/filter/inc/root.hxx
+++ b/sc/source/filter/inc/root.hxx
@@ -20,7 +20,6 @@
#ifndef INCLUDED_SC_SOURCE_FILTER_INC_ROOT_HXX
#define INCLUDED_SC_SOURCE_FILTER_INC_ROOT_HXX

#include <address.hxx>
#include "flttypes.hxx"
#include <memory>

diff --git a/sc/source/filter/inc/scfobj.hxx b/sc/source/filter/inc/scfobj.hxx
index 84824ae..0dbcb04 100644
--- a/sc/source/filter/inc/scfobj.hxx
+++ b/sc/source/filter/inc/scfobj.hxx
@@ -20,6 +20,8 @@
#ifndef INCLUDED_SC_SOURCE_FILTER_INC_SCFOBJ_HXX
#define INCLUDED_SC_SOURCE_FILTER_INC_SCFOBJ_HXX

#include <types.hxx>

class ScDocument;
namespace tools { class Rectangle; }

diff --git a/sc/source/filter/inc/sharedformulagroups.hxx b/sc/source/filter/inc/sharedformulagroups.hxx
index ae45f07..fde70b0 100644
--- a/sc/source/filter/inc/sharedformulagroups.hxx
+++ b/sc/source/filter/inc/sharedformulagroups.hxx
@@ -11,6 +11,7 @@
#define INCLUDED_SC_SOURCE_FILTER_INC_SHAREDFORMULAGROUPS_HXX

#include <address.hxx>
#include <tokenarray.hxx>
#include <memory>
#include <map>
class ScTokenArray;
diff --git a/sc/source/filter/inc/tool.h b/sc/source/filter/inc/tool.h
index 1d9559d..7c5f2b3 100644
--- a/sc/source/filter/inc/tool.h
+++ b/sc/source/filter/inc/tool.h
@@ -20,6 +20,8 @@
#ifndef INCLUDED_SC_SOURCE_FILTER_INC_TOOL_H
#define INCLUDED_SC_SOURCE_FILTER_INC_TOOL_H

#include <document.hxx>

#include <i18nlangtag/lang.h>
#include <svl/intitem.hxx>
#include <types.hxx>
diff --git a/sc/source/filter/inc/xehelper.hxx b/sc/source/filter/inc/xehelper.hxx
index a92c1a8..7369b99 100644
--- a/sc/source/filter/inc/xehelper.hxx
+++ b/sc/source/filter/inc/xehelper.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_SC_SOURCE_FILTER_INC_XEHELPER_HXX

#include <memory>
#include "ftools.hxx"
#include <rangelst.hxx>
#include "xladdress.hxx"
#include "xeroot.hxx"
diff --git a/sc/source/filter/inc/xerecord.hxx b/sc/source/filter/inc/xerecord.hxx
index b18fa73..3cf57b2 100644
--- a/sc/source/filter/inc/xerecord.hxx
+++ b/sc/source/filter/inc/xerecord.hxx
@@ -25,7 +25,6 @@
#include "xlstream.hxx"
#include <salhelper/simplereferenceobject.hxx>
#include <rtl/ref.hxx>
#include <type_traits>

// Base classes to export Excel records =======================================

diff --git a/sc/source/filter/inc/xestring.hxx b/sc/source/filter/inc/xestring.hxx
index fd0d9fa..9dfbe4b 100644
--- a/sc/source/filter/inc/xestring.hxx
+++ b/sc/source/filter/inc/xestring.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_SC_SOURCE_FILTER_INC_XESTRING_HXX

#include "xlstring.hxx"
#include "ftools.hxx"

class XclExpStream;
class XclExpXmlStream;
diff --git a/sc/source/filter/inc/xestyle.hxx b/sc/source/filter/inc/xestyle.hxx
index de6bd2cb..088f276 100644
--- a/sc/source/filter/inc/xestyle.hxx
+++ b/sc/source/filter/inc/xestyle.hxx
@@ -30,7 +30,6 @@
#include <fonthelper.hxx>
#include <memory>
#include <vector>
#include <o3tl/sorted_vector.hxx>

/* ============================================================================
- Buffers for style records (PALETTE, FONT, FORMAT, XF, STYLE).
diff --git a/sc/source/filter/inc/xetable.hxx b/sc/source/filter/inc/xetable.hxx
index e5414a3..6f4ba57 100644
--- a/sc/source/filter/inc/xetable.hxx
+++ b/sc/source/filter/inc/xetable.hxx
@@ -24,6 +24,7 @@

#include <vector>
#include "xladdress.hxx"
#include "xecontent.hxx"
#include "xerecord.hxx"
#include "xestyle.hxx"
#include "xlformula.hxx"
diff --git a/sc/source/filter/inc/xltools.hxx b/sc/source/filter/inc/xltools.hxx
index 0b58753..51f86fe8 100644
--- a/sc/source/filter/inc/xltools.hxx
+++ b/sc/source/filter/inc/xltools.hxx
@@ -23,6 +23,8 @@
#include <types.hxx>
#include "ftools.hxx"

#include <tools/long.hxx>

class SfxObjectShell;
enum class FormulaError : sal_uInt16;

diff --git a/sc/source/filter/lotus/lotattr.cxx b/sc/source/filter/lotus/lotattr.cxx
index 5054e8c..0fae3b7 100644
--- a/sc/source/filter/lotus/lotattr.cxx
+++ b/sc/source/filter/lotus/lotattr.cxx
@@ -32,7 +32,6 @@
#include <lotfntbf.hxx>
#include "lotfilter.hxx"
#include <patattr.hxx>
#include <root.hxx>
#include <scitems.hxx>

using namespace ::com::sun::star;
diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx
index facccd1..1013bde 100644
--- a/sc/source/filter/lotus/lotform.cxx
+++ b/sc/source/filter/lotus/lotform.cxx
@@ -22,7 +22,6 @@
#include "lotfilter.hxx"
#include <lotrange.hxx>
#include <namebuff.hxx>
#include <root.hxx>
#include <ftools.hxx>
#include <tool.h>
#include <document.hxx>
diff --git a/sc/source/filter/lotus/lotimpop.cxx b/sc/source/filter/lotus/lotimpop.cxx
index 159b137..78ff31f 100644
--- a/sc/source/filter/lotus/lotimpop.cxx
+++ b/sc/source/filter/lotus/lotimpop.cxx
@@ -26,7 +26,6 @@
#include <formulacell.hxx>
#include <global.hxx>

#include <root.hxx>
#include <lotfntbf.hxx>
#include <lotform.hxx>
#include <tool.h>
@@ -35,8 +34,6 @@
#include <stringutil.hxx>
#include <config_fuzzers.h>

#include <unotools/configmgr.hxx>


static osl::Mutex aLotImpSemaphore;

diff --git a/sc/source/filter/lotus/lotread.cxx b/sc/source/filter/lotus/lotread.cxx
index 4092e2f..f28a783 100644
--- a/sc/source/filter/lotus/lotread.cxx
+++ b/sc/source/filter/lotus/lotread.cxx
@@ -22,7 +22,6 @@

#include <scdll.hxx>
#include <scerrors.hxx>
#include <root.hxx>
#include "lotfilter.hxx"
#include <lotimpop.hxx>
#include <lotattr.hxx>
diff --git a/sc/source/filter/lotus/lotus.cxx b/sc/source/filter/lotus/lotus.cxx
index dbb8c67..291471e 100644
--- a/sc/source/filter/lotus/lotus.cxx
+++ b/sc/source/filter/lotus/lotus.cxx
@@ -24,7 +24,6 @@
#include <tools/urlobj.hxx>

#include <scerrors.hxx>
#include <root.hxx>
#include <filtopt.hxx>
#include <ftools.hxx>

diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx
index ea34c53..040cf76 100644
--- a/sc/source/filter/lotus/op.cxx
+++ b/sc/source/filter/lotus/op.cxx
@@ -41,7 +41,6 @@
#include "lotfilter.hxx"
#include <lotform.hxx>
#include <lotrange.hxx>
#include <root.hxx>
#include <ftools.hxx>

#include <vector>
diff --git a/sc/source/filter/lotus/tool.cxx b/sc/source/filter/lotus/tool.cxx
index eff0740..fb711db 100644
--- a/sc/source/filter/lotus/tool.cxx
+++ b/sc/source/filter/lotus/tool.cxx
@@ -26,7 +26,6 @@
#include <document.hxx>

#include <tool.h>
#include <root.hxx>
#include <lotrange.hxx>
#include <namebuff.hxx>
#include <stringutil.hxx>
diff --git a/sc/source/filter/oox/commentsbuffer.cxx b/sc/source/filter/oox/commentsbuffer.cxx
index 3a85f8a..d2d1ca2 100644
--- a/sc/source/filter/oox/commentsbuffer.cxx
+++ b/sc/source/filter/oox/commentsbuffer.cxx
@@ -17,17 +17,11 @@
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

#include <oox/token/properties.hxx>
#include <oox/token/tokens.hxx>

#include <commentsbuffer.hxx>

#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <com/sun/star/sheet/XSheetAnnotationAnchor.hpp>
#include <com/sun/star/sheet/XSheetAnnotationShapeSupplier.hpp>
#include <com/sun/star/sheet/XSheetAnnotations.hpp>
#include <com/sun/star/sheet/XSheetAnnotationsSupplier.hpp>
#include <com/sun/star/text/XText.hpp>
#include <osl/diagnose.h>
#include <oox/helper/attributelist.hxx>
@@ -36,7 +30,6 @@
#include <drawingfragment.hxx>
#include <svx/sdtaitm.hxx>
#include <svx/svdocapt.hxx>
#include <svx/unoshape.hxx>
#include <tools/diagnose_ex.h>
#include <document.hxx>
#include <drwlayer.hxx>
diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index c7baa9b..21fef59 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -30,7 +30,6 @@
#include <com/sun/star/awt/XDevice.hpp>
#include <com/sun/star/awt/XFont2.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/style/XStyle.hpp>
#include <com/sun/star/text/WritingMode2.hpp>
diff --git a/sc/source/filter/oox/viewsettings.cxx b/sc/source/filter/oox/viewsettings.cxx
index 64f20e2..0e66409 100644
--- a/sc/source/filter/oox/viewsettings.cxx
+++ b/sc/source/filter/oox/viewsettings.cxx
@@ -28,7 +28,6 @@
#include <com/sun/star/document/NamedPropertyValues.hpp>
#include <com/sun/star/sheet/XSpreadsheet.hpp>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/table/XCellRange.hpp>
#include <osl/diagnose.h>
#include <unotools/mediadescriptor.hxx>
#include <oox/core/filterbase.hxx>
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index 8214ccb..b15a94a 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -20,7 +20,6 @@
#include <workbookhelper.hxx>

#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/sheet/XDatabaseRanges.hpp>
diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx b/sc/source/filter/orcus/orcusfiltersimpl.cxx
index ce90954..d3211c6 100644
--- a/sc/source/filter/orcus/orcusfiltersimpl.cxx
+++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx
@@ -11,7 +11,6 @@
#include <orcusinterface.hxx>
#include <tokenarray.hxx>

#include <tools/urlobj.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/frame.hxx>
#include <sfx2/sfxsids.hrc>
diff --git a/sc/source/filter/qpro/qproform.cxx b/sc/source/filter/qpro/qproform.cxx
index 6f0b6b8..34613ad 100644
--- a/sc/source/filter/qpro/qproform.cxx
+++ b/sc/source/filter/qpro/qproform.cxx
@@ -17,7 +17,6 @@
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

#include <rtl/strbuf.hxx>
#include <sal/config.h>
#include <sal/macros.h>
#include <sal/log.hxx>
diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx
index 86f4c80..fa7c3a9 100644
--- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx
+++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx
@@ -21,9 +21,6 @@
#define INCLUDED_SC_SOURCE_FILTER_XML_XMLCHANGETRACKINGEXPORTHELPER_HXX

#include <xmloff/xmltoken.hxx>
#include <map>
#include <memory>
#include <tools/solar.h>

namespace com::sun::star::text
{
diff --git a/sc/source/filter/xml/XMLStylesImportHelper.hxx b/sc/source/filter/xml/XMLStylesImportHelper.hxx
index e0d5bed..a4fa8d8 100644
--- a/sc/source/filter/xml/XMLStylesImportHelper.hxx
+++ b/sc/source/filter/xml/XMLStylesImportHelper.hxx
@@ -22,9 +22,7 @@

#include <rangelst.hxx>
#include <rtl/ustring.hxx>
#include <tools/ref.hxx>

#include <list>
#include <memory>
#include <set>
#include <map>
diff --git a/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx b/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx
index a728b64..3d3d77d 100644
--- a/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx
+++ b/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx
@@ -20,7 +20,6 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/text/XText.hpp>
#include <com/sun/star/sheet/XHeaderFooterContent.hpp>
#include <xmloff/namespacemap.hxx>
#include <xmloff/xmlnamespace.hxx>
#include <xmloff/xmlimp.hxx>
#include "XMLTableHeaderFooterContext.hxx"
diff --git a/sc/source/filter/xml/xmlcvali.cxx b/sc/source/filter/xml/xmlcvali.cxx
index 164c36e..b5b6972 100644
--- a/sc/source/filter/xml/xmlcvali.cxx
+++ b/sc/source/filter/xml/xmlcvali.cxx
@@ -23,7 +23,6 @@
#include <document.hxx>
#include "XMLConverter.hxx"

#include <xmloff/xmltkmap.hxx>
#include <xmloff/xmltoken.hxx>
#include <xmloff/xmlnamespace.hxx>
#include <xmloff/XMLEventsImportContext.hxx>
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 41218fe..da8f7ce 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -138,7 +138,6 @@
#include <com/sun/star/sheet/XSheetCellRanges.hpp>
#include <com/sun/star/sheet/XSheetLinkable.hpp>
#include <com/sun/star/sheet/GlobalSheetSettings.hpp>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/table/XColumnRowRange.hpp>
#include <com/sun/star/util/XProtectable.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx
index d4579a3..75d8fa6 100644
--- a/sc/source/filter/xml/xmlstyle.cxx
+++ b/sc/source/filter/xml/xmlstyle.cxx
@@ -39,7 +39,6 @@
#include <com/sun/star/sheet/XSheetConditionalEntry.hpp>
#include <com/sun/star/sheet/XSheetCondition.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <comphelper/extract.hxx>

diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx
index 29d9792..20ea0df 100644
--- a/sc/source/filter/xml/xmlstyli.cxx
+++ b/sc/source/filter/xml/xmlstyli.cxx
@@ -18,7 +18,6 @@
 */

#include "xmlstyli.hxx"
#include <xmloff/namespacemap.hxx>
#include <xmloff/xmlnamespace.hxx>
#include <xmloff/xmlimppr.hxx>
#include <xmloff/families.hxx>
diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx
index 55394c3..7ef701f 100644
--- a/sc/source/filter/xml/xmltabi.cxx
+++ b/sc/source/filter/xml/xmltabi.cxx
@@ -39,7 +39,6 @@
#include <xmloff/xmltoken.hxx>
#include <xmloff/xmlnamespace.hxx>
#include <xmloff/XMLEventsImportContext.hxx>
#include <sal/log.hxx>

#include <tools/urlobj.hxx>
#include <sax/fastattribs.hxx>
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index c55c8d8..5442788 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -35,7 +35,6 @@
#include <sfx2/sfxsids.hrc>
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/frame/XTransientDocumentsDocumentContentFactory.hpp>
#include <com/sun/star/xml/sax/InputSource.hpp>
#include <com/sun/star/xml/sax/Parser.hpp>
#include <com/sun/star/xml/sax/XFastParser.hpp>
diff --git a/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx b/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
index c4b40df..aa1df4d 100644
--- a/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
+++ b/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
@@ -18,7 +18,6 @@
 */

#include <DrawModelBroadcaster.hxx>
#include <sal/log.hxx>
#include <svx/svdmodel.hxx>
#include <svx/unomod.hxx>
#include <svx/svdobj.hxx>
diff --git a/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx b/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx
index 59d9556..88e7fef 100644
--- a/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx
@@ -8,18 +8,8 @@
 *
 */

#include <sfx2/dispatch.hxx>
#include <svl/zforlist.hxx>
#include <svl/undo.hxx>

#include <formulacell.hxx>
#include <rangelst.hxx>
#include <scitems.hxx>
#include <docsh.hxx>
#include <document.hxx>
#include <uiitems.hxx>
#include <reffact.hxx>
#include <docfunc.hxx>
#include <TableFillingAndNavigationTools.hxx>
#include <FourierAnalysisDialog.hxx>
#include <scresid.hxx>
diff --git a/sc/source/ui/app/client.cxx b/sc/source/ui/app/client.cxx
index ac6b0e1..50cbadc 100644
--- a/sc/source/ui/app/client.cxx
+++ b/sc/source/ui/app/client.cxx
@@ -18,7 +18,6 @@
 */

#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>

#include <toolkit/helper/vclunohelper.hxx>
#include <tools/diagnose_ex.h>
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 7027f83..b5f43ac 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -26,7 +26,6 @@
#include <editeng/eeitem.hxx>

#include <sfx2/app.hxx>
#include <sfx2/lokhelper.hxx>
#include <editeng/acorrcfg.hxx>
#include <formula/errorcodes.hxx>
#include <editeng/adjustitem.hxx>
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 3d37feb..90ef42a 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -32,7 +32,6 @@
#include <editeng/postitem.hxx>
#include <editeng/langitem.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/lokhelper.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/event.hxx>
@@ -43,7 +42,6 @@
#include <vcl/settings.hxx>
#include <svl/stritem.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weldutils.hxx>
#include <unotools/charclass.hxx>

#include <inputwin.hxx>
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index 2d254db..c675ef0 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -26,9 +26,6 @@
#include <sfx2/sidebar/SidebarChildWindow.hxx>
#include <sfx2/app.hxx>
#include <avmedia/mediatoolbox.hxx>
#include <svx/ParaLineSpacingPopup.hxx>
#include <svx/TextCharacterSpacingPopup.hxx>
#include <svx/TextUnderlinePopup.hxx>
#include <NumberFormatControl.hxx>

#include <unotools/resmgr.hxx>
@@ -62,7 +59,7 @@
#include <svx/tbxctl.hxx>
#include <svx/fillctrl.hxx>
#include <svx/linectrl.hxx>
#include <svx/tbcontrl.hxx>
//#include <svx/tbcontrl.hxx>
#include <svx/selctrl.hxx>
#include <svx/insctrl.hxx>
#include <svx/zoomctrl.hxx>
@@ -70,13 +67,9 @@
#include <svx/pszctrl.hxx>
#include <svx/grafctrl.hxx>
#include <svx/clipboardctl.hxx>
#include <svx/lboxctrl.hxx>
#include <svx/verttexttbxctrl.hxx>
#include <svx/formatpaintbrushctrl.hxx>
#include <tbzoomsliderctrl.hxx>
#include <svx/zoomsliderctrl.hxx>
#include <sfx2/emojipopup.hxx>
#include <sfx2/charmappopup.hxx>

#include <svx/xmlsecctrl.hxx>
// Child windows
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index f0a992e..b268e9d 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -81,7 +81,6 @@
#include <inputhdl.hxx>
#include <inputwin.hxx>
#include <msgpool.hxx>
#include <formdata.hxx>
#include <detfunc.hxx>
#include <preview.hxx>
#include <dragdata.hxx>
diff --git a/sc/source/ui/attrdlg/attrdlg.cxx b/sc/source/ui/attrdlg/attrdlg.cxx
index 6c3f1fa..f37a724 100644
--- a/sc/source/ui/attrdlg/attrdlg.cxx
+++ b/sc/source/ui/attrdlg/attrdlg.cxx
@@ -27,7 +27,7 @@
#include <tabpages.hxx>
#include <attrdlg.hxx>
#include <svx/dialogs.hrc>
#include <svx/svxids.hrc>
#include <editeng/editids.hrc>
#include <editeng/flstitem.hxx>
#include <osl/diagnose.h>

diff --git a/sc/source/ui/attrdlg/scabstdlg.cxx b/sc/source/ui/attrdlg/scabstdlg.cxx
index d81e26d..a8a457c 100644
--- a/sc/source/ui/attrdlg/scabstdlg.cxx
+++ b/sc/source/ui/attrdlg/scabstdlg.cxx
@@ -21,7 +21,6 @@

#include <osl/module.hxx>
#include <tools/svlibrary.h>
#include <rtl/ustrbuf.hxx>

typedef ScAbstractDialogFactory* (*ScFuncPtrCreateDialogFactory)();

diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index 40dc203..73d4bc1 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -70,6 +70,8 @@
#include <sfx2/sfxdlg.hxx>
#include <conditio.hxx>

#include <vcl/virdev.hxx>

short AbstractScImportAsciiDlg_Impl::Execute()
{
    return m_xDlg->run();
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 1e3be87c..666a36d 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -21,7 +21,6 @@

#include <scabstdlg.hxx>
#include <sfx2/sfxdlg.hxx>
#include <vcl/virdev.hxx>

#include <corodlg.hxx>
#include <condformatmgr.hxx>
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 3c3b1752..319d2ef 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -20,8 +20,6 @@
#include <checklistmenu.hxx>
#include <globstr.hrc>
#include <scresid.hxx>
#include <strings.hrc>
#include <bitmaps.hlst>

#include <vcl/decoview.hxx>
#include <vcl/event.hxx>
@@ -30,7 +28,6 @@
#include <vcl/svapp.hxx>
#include <vcl/virdev.hxx>
#include <rtl/math.hxx>
#include <tools/wintypes.hxx>
#include <unotools/charclass.hxx>
#include <comphelper/lok.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
index 12d12c1..ca713316 100644
--- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
+++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
@@ -22,8 +22,6 @@
#include <vcl/image.hxx>
#include <vcl/toolbox.hxx>
#include <vcl/virdev.hxx>
#include <vcl/gradient.hxx>
#include <vcl/settings.hxx>
#include <svx/zoomslideritem.hxx>
#include <iterator>
#include <set>
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index 09432d8..7a46312 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -7,12 +7,9 @@
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#include <comphelper/lok.hxx>
#include <condformatdlg.hxx>

#include <sfx2/dispatch.hxx>
#include <sfx2/lokhelper.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>

#include <anyrefdg.hxx>
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index 8a9fe98..d997a91 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -20,11 +20,9 @@
#include <svl/style.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/frame.hxx>
#include <sfx2/lokhelper.hxx>
#include <svl/stritem.hxx>
#include <svl/intitem.hxx>
#include <svx/colorbox.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
#include <formula/token.hxx>
#include <formula/errorcodes.hxx>
@@ -32,7 +30,6 @@
#include <stlpool.hxx>
#include <tabvwsh.hxx>
#include <unotools/charclass.hxx>
#include <comphelper/lok.hxx>

#include <colorformat.hxx>
#include <scresid.hxx>
diff --git a/sc/source/ui/condformat/condformatmgr.cxx b/sc/source/ui/condformat/condformatmgr.cxx
index 4e9e322..03530cc 100644
--- a/sc/source/ui/condformat/condformatmgr.cxx
+++ b/sc/source/ui/condformat/condformatmgr.cxx
@@ -9,8 +9,6 @@

#include <condformatmgr.hxx>
#include <condformathelper.hxx>
#include <globstr.hrc>
#include <scresid.hxx>
#include <condformatdlg.hxx>
#include <document.hxx>
#include <conditio.hxx>
diff --git a/sc/source/ui/dataprovider/sqldataprovider.cxx b/sc/source/ui/dataprovider/sqldataprovider.cxx
index 3267822..0547286 100644
--- a/sc/source/ui/dataprovider/sqldataprovider.cxx
+++ b/sc/source/ui/dataprovider/sqldataprovider.cxx
@@ -16,7 +16,6 @@
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
#include <com/sun/star/sdbc/XResultSetMetaData.hpp>
#include <miscuno.hxx>
#include <dbdocutl.hxx>
#include <datamapper.hxx>
#include <vcl/svapp.hxx>
diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
index 604d94d..700f189 100644
--- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
@@ -19,6 +19,7 @@
#include <dbdocfun.hxx>
#include <dpsave.hxx>
#include <dpshttab.hxx>
#include <scmod.hxx>

#include <memory>
#include <vector>
diff --git a/sc/source/ui/dbgui/csvtablebox.cxx b/sc/source/ui/dbgui/csvtablebox.cxx
index 908a6ea..ec2a11c 100644
--- a/sc/source/ui/dbgui/csvtablebox.cxx
+++ b/sc/source/ui/dbgui/csvtablebox.cxx
@@ -18,9 +18,7 @@
 */

#include <csvtablebox.hxx>
#include <vcl/event.hxx>
#include <vcl/settings.hxx>
#include <AccessibleCsvControl.hxx>

ScCsvTableBox::ScCsvTableBox(weld::Builder& rBuilder)
    : mxRuler(new ScCsvRuler(maData, this))
diff --git a/sc/source/ui/dbgui/dapidata.cxx b/sc/source/ui/dbgui/dapidata.cxx
index 75e895f..8e97a1d 100644
--- a/sc/source/ui/dbgui/dapidata.cxx
+++ b/sc/source/ui/dbgui/dapidata.cxx
@@ -32,7 +32,6 @@
using namespace com::sun::star;

#include <dapidata.hxx>
#include <miscuno.hxx>
#include <dpsdbtab.hxx>

//  entries in the "type" ListBox
diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx
index be524ab..40d86b9 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -37,7 +37,6 @@
#include <miscuno.hxx>
#include <osl/diagnose.h>

#include <unicode/uclean.h>
#include <unicode/ucsdet.h>

//! TODO make dynamic
diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index 8367678..4f47e4e 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -33,7 +33,6 @@
#include <strings.hrc>

#include <filtdlg.hxx>
#include <vcl/idle.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>

diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index e4f9e93c..3d73a72 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -23,8 +23,6 @@

#include <com/sun/star/sheet/TableValidationVisibility.hpp>
#include <comphelper/string.hxx>
#include <vcl/svapp.hxx>
#include <svl/aeitem.hxx>
#include <svl/stritem.hxx>
#include <svl/eitem.hxx>
#include <svl/intitem.hxx>
@@ -45,7 +43,6 @@
#include <sfx2/childwin.hxx>
#include <reffact.hxx>
#include <comphelper/lok.hxx>
#include <sfx2/lokhelper.hxx>


#define IS_MOBILE (comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current() && SfxViewShell::Current()->isLOKMobilePhone())
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index e152824..5da81c9 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -56,7 +56,6 @@
#include <chartlis.hxx>
#include <ChartTools.hxx>

#include <set>
#include <memory>

using namespace ::com::sun::star;
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index 42f952f..a31d73e 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -69,7 +69,6 @@
#include <formulaopt.hxx>

#include <comphelper/lok.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <sfx2/lokhelper.hxx>

//          Redraw - Notifications
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 50a1ef3..7c1c3d4 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -87,7 +87,6 @@ using namespace ::com::sun::star;
#include <reffact.hxx>
#include <chartlis.hxx>
#include <chartpos.hxx>
#include <waitoff.hxx>
#include <tablink.hxx>
#include <drwlayer.hxx>
#include <docoptio.hxx>
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 85e6202..464173d 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -51,7 +51,6 @@
#include <docpool.hxx>
#include <uiitems.hxx>
#include <sc.hrc>
#include <waitoff.hxx>
#include <sizedev.hxx>
#include <clipparam.hxx>
#include <rowheightcontext.hxx>
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index cb2f058..f6f0fe4 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -39,7 +39,6 @@
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdbc/XConnection.hpp>
#include <com/sun/star/sdbc/XDriverAccess.hpp>
#include <com/sun/star/sdbc/DriverManager.hpp>
#include <com/sun/star/sdbc/XResultSetUpdate.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 76470eb..3bfa5bb 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -58,7 +58,6 @@
#include <svx/xlnclit.hxx>
#include <svx/xflclit.hxx>
#include <svx/xflgrit.hxx>
#include <editeng/colritem.hxx>

SFX_IMPL_INTERFACE(ScDrawShell, SfxShell)

diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx
index 916e756..ca3713e 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -47,8 +47,6 @@
#include <drtxtob.hxx>
#include <gridwin.hxx>
#include <svx/svdoole2.hxx>
#include <svx/svdocapt.hxx>
#include <svx/xfillit0.hxx>
#include <svx/xflgrit.hxx>
#include <comphelper/lok.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
@@ -57,8 +55,6 @@
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <sfx2/ipclient.hxx>

#include <com/sun/star/drawing/FillStyle.hpp>

using namespace com::sun::star::drawing;
using namespace com::sun::star;

diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx
index d71e2eb..3d3201b 100644
--- a/sc/source/ui/drawfunc/fudraw.cxx
+++ b/sc/source/ui/drawfunc/fudraw.cxx
@@ -25,7 +25,6 @@
#include <svx/ImageMapInfo.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/lokhelper.hxx>
#include <vcl/uitest/logger.hxx>
#include <vcl/uitest/eventdescription.hxx>

diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index 4188e78..ebbbbca 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -46,13 +46,11 @@
#include <comphelper/lok.hxx>
#include <comphelper/storagehelper.hxx>
#include <comphelper/propertysequence.hxx>
#include <sfx2/lokhelper.hxx>
#include <com/sun/star/embed/EmbedVerbs.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/chart2/data/XDataReceiver.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <com/sun/star/ui/dialogs/XAsynchronousExecutableDialog.hpp>
#include <com/sun/star/ui/dialogs/XDialogClosedListener.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/frame/XModel.hpp>
diff --git a/sc/source/ui/inc/AccessibleCsvControl.hxx b/sc/source/ui/inc/AccessibleCsvControl.hxx
index 808368c..975698d 100644
--- a/sc/source/ui/inc/AccessibleCsvControl.hxx
+++ b/sc/source/ui/inc/AccessibleCsvControl.hxx
@@ -27,6 +27,7 @@
#include <com/sun/star/accessibility/XAccessibleTable.hpp>
#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
#include <tools/gen.hxx>
#include <rtl/ref.hxx>
#include <rtl/ustrbuf.hxx>
#include <comphelper/accessiblecomponenthelper.hxx>
#include <cppuhelper/implbase1.hxx>
@@ -34,8 +35,6 @@
#include <cppuhelper/implbase3.hxx>
#include <editeng/AccessibleStaticTextBase.hxx>
#include <comphelper/uno3.hxx>
#include <vcl/vclptr.hxx>
#include "AccessibleContextBase.hxx"
#include <map>

class ScCsvControl;
diff --git a/sc/source/ui/inc/ChildWindowWrapper.hxx b/sc/source/ui/inc/ChildWindowWrapper.hxx
index dad043e..f88c49f 100644
--- a/sc/source/ui/inc/ChildWindowWrapper.hxx
+++ b/sc/source/ui/inc/ChildWindowWrapper.hxx
@@ -11,7 +11,6 @@
#ifndef INCLUDED_SC_SOURCE_UI_INC_CHILDWINDOWWRAPPER_HXX
#define INCLUDED_SC_SOURCE_UI_INC_CHILDWINDOWWRAPPER_HXX

#include <sfx2/basedlgs.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/childwin.hxx>
diff --git a/sc/source/ui/inc/FilterListBox.hxx b/sc/source/ui/inc/FilterListBox.hxx
index 1a4685f..0177bb4 100644
--- a/sc/source/ui/inc/FilterListBox.hxx
+++ b/sc/source/ui/inc/FilterListBox.hxx
@@ -19,6 +19,8 @@

#pragma once

#include <types.hxx>

#include <vcl/InterimItemWindow.hxx>

class ScGridWindow;
diff --git a/sc/source/ui/inc/PivotLayoutTreeList.hxx b/sc/source/ui/inc/PivotLayoutTreeList.hxx
index ab1ce9c..4d15053 100644
--- a/sc/source/ui/inc/PivotLayoutTreeList.hxx
+++ b/sc/source/ui/inc/PivotLayoutTreeList.hxx
@@ -12,7 +12,6 @@
#define INCLUDED_SC_SOURCE_UI_INC_PIVOTLAYOUTTREELIST_HXX

#include <memory>
#include <tools/solar.h>
#include "PivotLayoutTreeListBase.hxx"

class ScPivotLayoutTreeList : public ScPivotLayoutTreeListBase
diff --git a/sc/source/ui/inc/PivotLayoutTreeListData.hxx b/sc/source/ui/inc/PivotLayoutTreeListData.hxx
index 5041ff1..bd60a76 100644
--- a/sc/source/ui/inc/PivotLayoutTreeListData.hxx
+++ b/sc/source/ui/inc/PivotLayoutTreeListData.hxx
@@ -12,7 +12,6 @@
#define INCLUDED_SC_SOURCE_UI_INC_PIVOTLAYOUTTREELISTDATA_HXX

#include "PivotLayoutTreeListBase.hxx"
#include <tools/solar.h>
#include <vector>
#include <memory>

diff --git a/sc/source/ui/inc/RegressionDialog.hxx b/sc/source/ui/inc/RegressionDialog.hxx
index 96da940..2d75ae9 100644
--- a/sc/source/ui/inc/RegressionDialog.hxx
+++ b/sc/source/ui/inc/RegressionDialog.hxx
@@ -12,6 +12,7 @@
#define INCLUDED_SC_SOURCE_UI_INC_REGRESSIONDIALOG_HXX

#include "StatisticsTwoVariableDialog.hxx"
#include "TableFillingAndNavigationTools.hxx"

class ScRegressionDialog : public ScStatisticsTwoVariableDialog
{
diff --git a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
index c4974bb..a2d0440 100644
--- a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
+++ b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
@@ -14,6 +14,7 @@
#include <address.hxx>
#include <rangelst.hxx>

#include <map>
#include <vector>

class FormulaTemplate
diff --git a/sc/source/ui/inc/acredlin.hxx b/sc/source/ui/inc/acredlin.hxx
index 7bca575..04f919e 100644
--- a/sc/source/ui/inc/acredlin.hxx
+++ b/sc/source/ui/inc/acredlin.hxx
@@ -21,6 +21,8 @@
#define INCLUDED_SC_SOURCE_UI_INC_ACREDLIN_HXX

#include <svx/ctredlin.hxx>
#include <sfx2/basedlgs.hxx>
#include <sfx2/bindings.hxx>
#include <chgtrack.hxx>
#include <chgviset.hxx>
#include <vcl/idle.hxx>
diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx
index 699725f..30fc15a 100644
--- a/sc/source/ui/inc/anyrefdg.hxx
+++ b/sc/source/ui/inc/anyrefdg.hxx
@@ -23,9 +23,7 @@
#include <sfx2/basedlgs.hxx>
#include <address.hxx>
#include <formula/funcutl.hxx>
#include <vcl/accel.hxx>
#include "IAnyRefDialog.hxx"
#include <scmod.hxx>

#include <memory>

diff --git a/sc/source/ui/inc/areasave.hxx b/sc/source/ui/inc/areasave.hxx
index 345331c..a8cf0db 100644
--- a/sc/source/ui/inc/areasave.hxx
+++ b/sc/source/ui/inc/areasave.hxx
@@ -23,6 +23,7 @@
#include <address.hxx>
#include <tools/solar.h>

#include <memory>
#include <vector>

class ScDocument;
diff --git a/sc/source/ui/inc/autostyl.hxx b/sc/source/ui/inc/autostyl.hxx
index 83078c3..8040373 100644
--- a/sc/source/ui/inc/autostyl.hxx
+++ b/sc/source/ui/inc/autostyl.hxx
@@ -20,6 +20,7 @@
#ifndef INCLUDED_SC_SOURCE_UI_INC_AUTOSTYL_HXX
#define INCLUDED_SC_SOURCE_UI_INC_AUTOSTYL_HXX

#include <address.hxx>
#include <vector>
#include <rtl/ustring.hxx>
#include <tools/solar.h>
diff --git a/sc/source/ui/inc/cellsh.hxx b/sc/source/ui/inc/cellsh.hxx
index 1d543ad..837923f 100644
--- a/sc/source/ui/inc/cellsh.hxx
+++ b/sc/source/ui/inc/cellsh.hxx
@@ -29,6 +29,7 @@
#include <rtl/ref.hxx>
#include <sot/formats.hxx>
#include <vcl/vclptr.hxx>
#include <vcl/window.hxx>
#include <tools/solar.h>

class SvxClipboardFormatItem;
diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx
index 247ff1c..602d6d8 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -10,14 +10,12 @@
#ifndef INCLUDED_SC_SOURCE_UI_INC_CHECKLISTMENU_HXX
#define INCLUDED_SC_SOURCE_UI_INC_CHECKLISTMENU_HXX

#include <vcl/InterimItemWindow.hxx>
#include <vcl/dockwin.hxx>
#include <vcl/timer.hxx>
#include <vcl/weld.hxx>

#include <memory>
#include <unordered_set>
#include <unordered_map>
#include <map>
#include <set>

diff --git a/sc/source/ui/inc/condformatmgr.hxx b/sc/source/ui/inc/condformatmgr.hxx
index 2e7eaa5..b70b0ff 100644
--- a/sc/source/ui/inc/condformatmgr.hxx
+++ b/sc/source/ui/inc/condformatmgr.hxx
@@ -12,8 +12,6 @@

#include <vcl/weld.hxx>

#include <map>

class ScDocument;
class ScConditionalFormat;
class ScConditionalFormatList;
diff --git a/sc/source/ui/inc/csvcontrol.hxx b/sc/source/ui/inc/csvcontrol.hxx
index 8a87e30..65a3163 100644
--- a/sc/source/ui/inc/csvcontrol.hxx
+++ b/sc/source/ui/inc/csvcontrol.hxx
@@ -23,7 +23,6 @@
#include <scdllapi.h>
#include <address.hxx>
#include "csvsplits.hxx"
#include <com/sun/star/uno/Reference.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <rtl/ref.hxx>
#include <vcl/customweld.hxx>
diff --git a/sc/source/ui/inc/csvruler.hxx b/sc/source/ui/inc/csvruler.hxx
index ad91731..6d64b317 100644
--- a/sc/source/ui/inc/csvruler.hxx
+++ b/sc/source/ui/inc/csvruler.hxx
@@ -22,7 +22,6 @@

#include "csvcontrol.hxx"
#include "csvsplits.hxx"
#include <scdllapi.h>

#include <vcl/virdev.hxx>

diff --git a/sc/source/ui/inc/dataprovider.hxx b/sc/source/ui/inc/dataprovider.hxx
index a7a5f9b..a1cd99e 100644
--- a/sc/source/ui/inc/dataprovider.hxx
+++ b/sc/source/ui/inc/dataprovider.hxx
@@ -20,7 +20,7 @@
#include <rtl/strbuf.hxx>

#include <vector>
#include <map>
//#include <map>

#include <orcus/csv_parser.hpp>

diff --git a/sc/source/ui/inc/datatableview.hxx b/sc/source/ui/inc/datatableview.hxx
index fe41543..57bcde6 100644
--- a/sc/source/ui/inc/datatableview.hxx
+++ b/sc/source/ui/inc/datatableview.hxx
@@ -23,7 +23,6 @@
#include <com/sun/star/awt/XWindow.hpp>
#include <vcl/ctrl.hxx>
#include <vcl/scrbar.hxx>
#include <scdllapi.h>
#include <types.hxx>
#include "hdrcont.hxx"

diff --git a/sc/source/ui/inc/foptmgr.hxx b/sc/source/ui/inc/foptmgr.hxx
index b26ffbe..319ce24 100644
--- a/sc/source/ui/inc/foptmgr.hxx
+++ b/sc/source/ui/inc/foptmgr.hxx
@@ -20,6 +20,8 @@
#ifndef INCLUDED_SC_SOURCE_UI_INC_FOPTMGR_HXX
#define INCLUDED_SC_SOURCE_UI_INC_FOPTMGR_HXX

#include <vcl/weld.hxx>

namespace formula
{
    class RefButton;
diff --git a/sc/source/ui/inc/formula.hxx b/sc/source/ui/inc/formula.hxx
index d478ff0..31ea0b4 100644
--- a/sc/source/ui/inc/formula.hxx
+++ b/sc/source/ui/inc/formula.hxx
@@ -23,6 +23,7 @@
#include <memory>
#include "anyrefdg.hxx"

#include <scmod.hxx>
#include <formula/formula.hxx>
#include "IAnyRefDialog.hxx"

diff --git a/sc/source/ui/inc/fuinsert.hxx b/sc/source/ui/inc/fuinsert.hxx
index a9c8fb5..45aeb11 100644
--- a/sc/source/ui/inc/fuinsert.hxx
+++ b/sc/source/ui/inc/fuinsert.hxx
@@ -22,9 +22,7 @@

#include "fupoor.hxx"
#include <scdllapi.h>
#include <svx/svdoole2.hxx>
#include <com/sun/star/ui/dialogs/DialogClosedEvent.hpp>
#include <com/sun/star/ui/dialogs/XAsynchronousExecutableDialog.hpp>

class FuInsertGraphic : public FuPoor
{
diff --git a/sc/source/ui/inc/gridmerg.hxx b/sc/source/ui/inc/gridmerg.hxx
index 82fec23..a05c1bd 100644
--- a/sc/source/ui/inc/gridmerg.hxx
+++ b/sc/source/ui/inc/gridmerg.hxx
@@ -20,6 +20,9 @@
#ifndef INCLUDED_SC_SOURCE_UI_INC_GRIDMERG_HXX
#define INCLUDED_SC_SOURCE_UI_INC_GRIDMERG_HXX

#include <tools/long.hxx>
#include <vcl/vclptr.hxx>

class OutputDevice;

class ScGridMerger
diff --git a/sc/source/ui/inc/hdrcont.hxx b/sc/source/ui/inc/hdrcont.hxx
index 3bb0e42..f9ef17c 100644
--- a/sc/source/ui/inc/hdrcont.hxx
+++ b/sc/source/ui/inc/hdrcont.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_SC_SOURCE_UI_INC_HDRCONT_HXX

#include <vcl/window.hxx>
#include <scdllapi.h>
#include <types.hxx>

#define HDR_SIZE_OPTIMUM    0xFFFF
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 04b700a..c0f37f6 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -22,7 +22,6 @@

#include <vector>
#include <memory>
#include <cppuhelper/weakref.hxx>
#include <vcl/customweld.hxx>
#include <vcl/toolbox.hxx>
#include <vcl/InterimItemWindow.hxx>
@@ -30,7 +29,6 @@
#include <svl/lstner.hxx>
#include <svtools/stringtransfer.hxx>
#include <vcl/window.hxx>
#include <vcl/transfer.hxx>
#include <vcl/menu.hxx>
#include <formula/opcode.hxx>
#include <svx/weldeditview.hxx>
diff --git a/sc/source/ui/inc/instbdlg.hxx b/sc/source/ui/inc/instbdlg.hxx
index 449ec75..bb57c66 100644
--- a/sc/source/ui/inc/instbdlg.hxx
+++ b/sc/source/ui/inc/instbdlg.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_SC_SOURCE_UI_INC_INSTBDLG_HXX

#include <sfx2/objsh.hxx>
#include <vcl/timer.hxx>
#include <vcl/weld.hxx>
#include <types.hxx>

diff --git a/sc/source/ui/inc/optsolver.hxx b/sc/source/ui/inc/optsolver.hxx
index 410f513..60dad2c 100644
--- a/sc/source/ui/inc/optsolver.hxx
+++ b/sc/source/ui/inc/optsolver.hxx
@@ -22,6 +22,7 @@

#include <address.hxx>
#include "anyrefdg.hxx"
#include "docsh.hxx"
#include <com/sun/star/uno/Sequence.hxx>

#include <vector>
diff --git a/sc/source/ui/inc/protectiondlg.hxx b/sc/source/ui/inc/protectiondlg.hxx
index e368217..96bdf58 100644
--- a/sc/source/ui/inc/protectiondlg.hxx
+++ b/sc/source/ui/inc/protectiondlg.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_SC_SOURCE_UI_INC_PROTECTIONDLG_HXX

#include <vcl/weld.hxx>
#include <scdllapi.h>

class ScTableProtection;

diff --git a/sc/source/ui/inc/scuiasciiopt.hxx b/sc/source/ui/inc/scuiasciiopt.hxx
index d327d81..51cf2ec 100644
--- a/sc/source/ui/inc/scuiasciiopt.hxx
+++ b/sc/source/ui/inc/scuiasciiopt.hxx
@@ -23,7 +23,6 @@
#include <svx/langbox.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <vcl/customweld.hxx>
#include <vcl/weld.hxx>

#include "asciiopt.hxx"
diff --git a/sc/source/ui/inc/scuiautofmt.hxx b/sc/source/ui/inc/scuiautofmt.hxx
index 5fee724..24f9f69 100644
--- a/sc/source/ui/inc/scuiautofmt.hxx
+++ b/sc/source/ui/inc/scuiautofmt.hxx
@@ -20,6 +20,7 @@
#define INCLUDED_SC_SOURCE_UI_INC_SCUIAUTOFMT_HXX

#include <vcl/customweld.hxx>
#include <autoform.hxx>
#include "autofmt.hxx"

class ScAutoFormatDlg : public weld::GenericDialogController
diff --git a/sc/source/ui/inc/scuitphfedit.hxx b/sc/source/ui/inc/scuitphfedit.hxx
index b0f0d32..940879f 100644
--- a/sc/source/ui/inc/scuitphfedit.hxx
+++ b/sc/source/ui/inc/scuitphfedit.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_SC_SOURCE_UI_INC_SCUITPHFEDIT_HXX

#include "tphfedit.hxx"
#include <sfx2/tabdlg.hxx>
#include <vcl/customweld.hxx>
#include <vcl/weld.hxx>

diff --git a/sc/source/ui/inc/sharedocdlg.hxx b/sc/source/ui/inc/sharedocdlg.hxx
index e49d4c3..a8f6d1a 100644
--- a/sc/source/ui/inc/sharedocdlg.hxx
+++ b/sc/source/ui/inc/sharedocdlg.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_SC_SOURCE_UI_INC_SHAREDOCDLG_HXX

#include <vcl/weld.hxx>
#include <scdllapi.h>

class ScViewData;
class ScDocShell;
diff --git a/sc/source/ui/inc/sizedev.hxx b/sc/source/ui/inc/sizedev.hxx
index 95bfac3..93255e62 100644
--- a/sc/source/ui/inc/sizedev.hxx
+++ b/sc/source/ui/inc/sizedev.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_SC_SOURCE_UI_INC_SIZEDEV_HXX

#include <vcl/mapmod.hxx>
#include <vcl/vclptr.hxx>

class OutputDevice;
class ScDocShell;
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 1061dbe..2500a8f 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -20,7 +20,6 @@
#ifndef INCLUDED_SC_SOURCE_UI_INC_TABVWSH_HXX
#define INCLUDED_SC_SOURCE_UI_INC_TABVWSH_HXX

#include <com/sun/star/drawing/QRCode.hpp>
#include <formula/errorcodes.hxx>
#include <formula/opcode.hxx>
#include <svx/fmshell.hxx>
@@ -32,7 +31,7 @@
#include "target.hxx"
#include <shellids.hxx>
#include <tabprotection.hxx>
#include <com/sun/star/ui/dialogs/XDialogClosedListener.hpp>
#include <com/sun/star/ui/dialogs/DialogClosedEvent.hpp>

#include <memory>
#include <map>
diff --git a/sc/source/ui/inc/tphfedit.hxx b/sc/source/ui/inc/tphfedit.hxx
index 85b8984..7d5a9ca 100644
--- a/sc/source/ui/inc/tphfedit.hxx
+++ b/sc/source/ui/inc/tphfedit.hxx
@@ -22,10 +22,8 @@

#include <scdllapi.h>
#include <cppuhelper/weakref.hxx>
#include <tools/wintypes.hxx>
#include <svx/weldeditview.hxx>
#include <editeng/svxenum.hxx>
#include <vcl/customweld.hxx>

#include <functional>

diff --git a/sc/source/ui/inc/uiobject.hxx b/sc/source/ui/inc/uiobject.hxx
index 235c5f7..ae3583f 100644
--- a/sc/source/ui/inc/uiobject.hxx
+++ b/sc/source/ui/inc/uiobject.hxx
@@ -7,6 +7,8 @@
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#include "gridwin.hxx"
#include "navipi.hxx"
#include <memory>
#include <vcl/uitest/uiobject.hxx>

diff --git a/sc/source/ui/inc/undoolk.hxx b/sc/source/ui/inc/undoolk.hxx
index a8e0357..2669508 100644
--- a/sc/source/ui/inc/undoolk.hxx
+++ b/sc/source/ui/inc/undoolk.hxx
@@ -20,6 +20,8 @@
#ifndef INCLUDED_SC_SOURCE_UI_INC_UNDOOLK_HXX
#define INCLUDED_SC_SOURCE_UI_INC_UNDOOLK_HXX

#include <memory>

class SdrUndoAction;
class ScDocument;

diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx
index 3f64e14..a0f8410 100644
--- a/sc/source/ui/inc/validate.hxx
+++ b/sc/source/ui/inc/validate.hxx
@@ -24,6 +24,7 @@

#include "anyrefdg.hxx"
#include <sc.hrc>
#include <scmod.hxx>

struct  ScRefHandlerCaller{
    virtual ~ScRefHandlerCaller(){}
diff --git a/sc/source/ui/inc/xmlsourcedlg.hxx b/sc/source/ui/inc/xmlsourcedlg.hxx
index 452bac0..9f4b308 100644
--- a/sc/source/ui/inc/xmlsourcedlg.hxx
+++ b/sc/source/ui/inc/xmlsourcedlg.hxx
@@ -15,7 +15,6 @@

#include <set>
#include <memory>
#include <vector>

class ScDocument;
class ScRange;
diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx
index 0e6fe0d..636ad93 100644
--- a/sc/source/ui/miscdlgs/datafdlg.cxx
+++ b/sc/source/ui/miscdlgs/datafdlg.cxx
@@ -14,7 +14,6 @@
#include <docsh.hxx>
#include <tabvwsh.hxx>

#include <rtl/ustrbuf.hxx>
#include <vcl/svapp.hxx>

#define HDL(hdl)            LINK( this, ScDataFormDlg, hdl )
diff --git a/sc/source/ui/namedlg/namedefdlg.cxx b/sc/source/ui/namedlg/namedefdlg.cxx
index b66b1cf..3f0905e 100644
--- a/sc/source/ui/namedlg/namedefdlg.cxx
+++ b/sc/source/ui/namedlg/namedefdlg.cxx
@@ -9,7 +9,6 @@

#include <namedefdlg.hxx>

#include <vcl/settings.hxx>
#include <formula/errorcodes.hxx>
#include <sfx2/app.hxx>
#include <unotools/charclass.hxx>
diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx
index bff3991..566ecd8 100644
--- a/sc/source/ui/namedlg/namedlg.cxx
+++ b/sc/source/ui/namedlg/namedlg.cxx
@@ -32,7 +32,6 @@
#include <globalnames.hxx>
#include <tokenarray.hxx>

#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
#include <formula/errorcodes.hxx>
#include <unotools/charclass.hxx>
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 6a638f8..9686f77 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -28,7 +28,6 @@
#include <sfx2/docfile.hxx>
#include <sfx2/viewfrm.hxx>
#include <vcl/commandevent.hxx>
#include <vcl/help.hxx>
#include <vcl/svapp.hxx>
#include <tools/urlobj.hxx>
#include <sal/log.hxx>
diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx
index f9ad4067..0b317ea 100644
--- a/sc/source/ui/navipi/scenwnd.cxx
+++ b/sc/source/ui/navipi/scenwnd.cxx
@@ -26,7 +26,6 @@
#include <vcl/event.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
#include <vcl/settings.hxx>
#include <navipi.hxx>
#include <sc.hrc>
#include <globstr.hrc>
diff --git a/sc/source/ui/pagedlg/tphf.cxx b/sc/source/ui/pagedlg/tphf.cxx
index b5e5331..e04f269 100644
--- a/sc/source/ui/pagedlg/tphf.cxx
+++ b/sc/source/ui/pagedlg/tphf.cxx
@@ -24,7 +24,6 @@
#include <sfx2/sfxdlg.hxx>
#include <svl/style.hxx>
#include <svx/pageitem.hxx>
#include <vcl/svapp.hxx>

#include <attrib.hxx>
#include <tphf.hxx>
diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx
index acf8333..16be645 100644
--- a/sc/source/ui/pagedlg/tphfedit.cxx
+++ b/sc/source/ui/pagedlg/tphfedit.cxx
@@ -21,15 +21,11 @@
#include <editeng/eeitem.hxx>

#include <editeng/editobj.hxx>
#include <editeng/editstat.hxx>
#include <editeng/editview.hxx>
#include <editeng/adjustitem.hxx>
#include <editeng/fhgtitem.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/sfxdlg.hxx>
#include <vcl/cursor.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>

#include <tphfedit.hxx>
#include <editutil.hxx>
diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx
index 692fc245..7ea361b 100644
--- a/sc/source/ui/pagedlg/tptable.cxx
+++ b/sc/source/ui/pagedlg/tptable.cxx
@@ -21,8 +21,6 @@

#include <scitems.hxx>

#include <vcl/event.hxx>
#include <vcl/settings.hxx>
#include <osl/diagnose.h>

#include <tptable.hxx>
diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
index daae959..7c51f5d 100644
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
@@ -26,13 +26,8 @@
#include <sfx2/dispatch.hxx>
#include <svl/intitem.hxx>
#include <svx/rotmodit.hxx>
#include <svx/sdangitm.hxx>
#include <svtools/unitconv.hxx>
#include <unotools/localedatawrapper.hxx>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <sfx2/lokhelper.hxx>
#include <comphelper/lok.hxx>

using namespace css;
using namespace css::uno;
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx
index 1747e9f..ae42b47 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx
@@ -22,8 +22,8 @@
#include <sfx2/sidebar/ControllerItem.hxx>
#include <sfx2/sidebar/IContextChangeReceiver.hxx>
#include <sfx2/sidebar/PanelLayout.hxx>
#include "CellBorderStyleControl.hxx"
#include "CellLineStyleControl.hxx"
#include <vcl/EnumContext.hxx>
#include <vcl/image.hxx>

class ToolbarUnoDispatcher;
class ToolbarPopupContainer;
diff --git a/sc/source/ui/sidebar/CellBorderStyleControl.cxx b/sc/source/ui/sidebar/CellBorderStyleControl.cxx
index 6a6d7c74..b172561 100644
--- a/sc/source/ui/sidebar/CellBorderStyleControl.cxx
+++ b/sc/source/ui/sidebar/CellBorderStyleControl.cxx
@@ -20,7 +20,6 @@
#include "CellBorderStyleControl.hxx"
#include <editeng/boxitem.hxx>
#include <editeng/borderline.hxx>
#include <sfx2/app.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
#include <svx/svxids.hrc>
diff --git a/sc/source/ui/sidebar/CellLineStyleControl.cxx b/sc/source/ui/sidebar/CellLineStyleControl.cxx
index beae25f..70dab18 100644
--- a/sc/source/ui/sidebar/CellLineStyleControl.cxx
+++ b/sc/source/ui/sidebar/CellLineStyleControl.cxx
@@ -24,7 +24,6 @@
#include <vcl/svapp.hxx>
#include <editeng/borderline.hxx>
#include <editeng/lineitem.hxx>
#include <sfx2/app.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
#include <svx/svxids.hrc>
diff --git a/sc/source/ui/styleui/styledlg.cxx b/sc/source/ui/styleui/styledlg.cxx
index 544489b..12acb34 100644
--- a/sc/source/ui/styleui/styledlg.cxx
+++ b/sc/source/ui/styleui/styledlg.cxx
@@ -34,7 +34,6 @@
#include <svx/dialogs.hrc>
#include <svl/intitem.hxx>
#include <editeng/flstitem.hxx>
#include <svl/aeitem.hxx>
#include <svx/flagsdef.hxx>

ScStyleDlg::ScStyleDlg(weld::Window* pParent,
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index f6d2c1b..f7347ec 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -45,13 +45,10 @@
#include <refundo.hxx>
#include <undoolk.hxx>
#include <clipparam.hxx>
#include <brdcst.hxx>
#include <rowheightcontext.hxx>
#include <refhint.hxx>
#include <refupdatecontext.hxx>
#include <validat.hxx>
#include <gridwin.hxx>
#include <svl/listener.hxx>
#include <columnspanset.hxx>

#include <memory>
diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx
index 9516b92..6dbf2c5 100644
--- a/sc/source/ui/unoobj/afmtuno.cxx
+++ b/sc/source/ui/unoobj/afmtuno.cxx
@@ -20,13 +20,10 @@
#include <scitems.hxx>
#include <editeng/memberids.h>
#include <osl/diagnose.h>
#include <svl/intitem.hxx>
#include <svl/poolitem.hxx>
#include <svl/eitem.hxx>
#include <vcl/svapp.hxx>
#include <svx/algitem.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/justifyitem.hxx>
#include <svx/unomid.hxx>
#include <unowids.hxx>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx
index 2a8fd36..097f8a9 100644
--- a/sc/source/ui/unoobj/appluno.cxx
+++ b/sc/source/ui/unoobj/appluno.cxx
@@ -20,7 +20,6 @@
#include <appluno.hxx>
#include <sal/types.h>
#include <osl/diagnose.h>
#include <cppuhelper/factory.hxx>
#include <formula/funcvarargs.h>

#include <vcl/svapp.hxx>
@@ -36,7 +35,6 @@
#include <unonames.hxx>
#include <funcdesc.hxx>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/sheet/FunctionArgument.hpp>
#include <memory>

diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 4b8613f..8c00ecc 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -26,10 +26,8 @@
#include <svx/algitem.hxx>
#include <editeng/borderline.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/brushitem.hxx>
#include <editeng/editeng.hxx>
#include <editeng/flditem.hxx>
#include <editeng/justifyitem.hxx>
#include <editeng/editobj.hxx>
#include <editeng/unoipset.hxx>
#include <editeng/langitem.hxx>
diff --git a/sc/source/ui/unoobj/defltuno.cxx b/sc/source/ui/unoobj/defltuno.cxx
index c8bee74..72618aa 100644
--- a/sc/source/ui/unoobj/defltuno.cxx
+++ b/sc/source/ui/unoobj/defltuno.cxx
@@ -18,7 +18,6 @@
 */

#include <editeng/memberids.h>
#include <editeng/langitem.hxx>
#include <svl/hint.hxx>
#include <svl/itemprop.hxx>
#include <vcl/svapp.hxx>
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 7142e28..9eef212 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -19,8 +19,6 @@

#include <config_feature_opencl.h>

#include <boost/property_tree/json_parser.hpp>

#include <scitems.hxx>
#include <comphelper/sequence.hxx>
#include <editeng/editview.hxx>
diff --git a/sc/source/ui/unoobj/notesuno.cxx b/sc/source/ui/unoobj/notesuno.cxx
index 8929192..11b8049 100644
--- a/sc/source/ui/unoobj/notesuno.cxx
+++ b/sc/source/ui/unoobj/notesuno.cxx
@@ -32,7 +32,6 @@
#include <cellsuno.hxx>
#include <docsh.hxx>
#include <docfunc.hxx>
#include <hints.hxx>
#include <editsrc.hxx>
#include <miscuno.hxx>

diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 5e32bb5..49c2f68 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -21,10 +21,8 @@
#include <editeng/memberids.h>
#include <svx/algitem.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/justifyitem.hxx>
#include <editeng/langitem.hxx>
#include <editeng/numitem.hxx>
#include <editeng/shaditem.hxx>
#include <svx/pageitem.hxx>
#include <editeng/pbinitem.hxx>
#include <svx/unomid.hxx>
diff --git a/sc/source/ui/unoobj/unodoc.cxx b/sc/source/ui/unoobj/unodoc.cxx
index 7f26aa3..f878524 100644
--- a/sc/source/ui/unoobj/unodoc.cxx
+++ b/sc/source/ui/unoobj/unodoc.cxx
@@ -17,11 +17,8 @@
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

#include <rtl/ustring.hxx>
#include <sfx2/sfxmodelfactory.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>

#include <appluno.hxx>
#include <scdll.hxx>
#include <vcl/svapp.hxx>

diff --git a/sc/source/ui/vba/vbafiledialog.hxx b/sc/source/ui/vba/vbafiledialog.hxx
index 9f2b8e0..98a0c76 100644
--- a/sc/source/ui/vba/vbafiledialog.hxx
+++ b/sc/source/ui/vba/vbafiledialog.hxx
@@ -22,8 +22,6 @@
#include <ooo/vba/excel/XFileDialog.hpp>
#include <vbahelper/vbahelperinterface.hxx>

#include <vbahelper/vbacollectionimpl.hxx>

namespace com::sun::star::uno { class XComponentContext; }
namespace ooo::vba { class XHelperInterface; }
namespace ooo::vba::excel { class XFileDialogSelectedItems; }
diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx
index 2c7b418..ef67d69 100644
--- a/sc/source/ui/vba/vbafont.cxx
+++ b/sc/source/ui/vba/vbafont.cxx
@@ -20,7 +20,6 @@
#include <com/sun/star/awt/FontUnderline.hpp>
#include <ooo/vba/excel/XlColorIndex.hpp>
#include <ooo/vba/excel/XlUnderlineStyle.hpp>
#include <editeng/eeitem.hxx>
#include <svl/itemset.hxx>
#include "excelvbahelper.hxx"
#include "vbafont.hxx"
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index f71b8f3..514733f 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -24,8 +24,6 @@
#include <comphelper/lok.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/request.hxx>
#include <sfx2/sfxdlg.hxx>
#include <svl/aeitem.hxx>
#include <basic/sbxcore.hxx>
#include <svl/whiter.hxx>
#include <svl/zforlist.hxx>
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 924ce27..5112b80 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -47,7 +47,6 @@
#include <columnspanset.hxx>
#include <comphelper/lok.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <sfx2/lokhelper.hxx>

#include <memory>

diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 60a5777..f237722 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -67,7 +67,6 @@
#include <unordered_set>
#include <unordered_map>
#include <vector>
#include <set>
#include <algorithm>

using namespace com::sun::star;
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 585e19c..80a1dd6 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -55,7 +55,6 @@
#include <sal/log.hxx>
#include <comphelper/lok.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <editeng/itemtype.hxx>

#include <formatsh.hxx>
#include <sc.hrc>
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 546d9cb..418e735 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -28,8 +28,6 @@
#include <editeng/editstat.hxx>
#include <editeng/flditem.hxx>
#include <editeng/justifyitem.hxx>
#include <editeng/unolingu.hxx>
#include <editeng/langitem.hxx>
#include <editeng/misspellrange.hxx>
#include <editeng/editobj.hxx>
#include <sfx2/dispatch.hxx>
@@ -117,13 +115,12 @@
#include <queryentry.hxx>
#include <markdata.hxx>
#include <externalrefmgr.hxx>
#include <dociter.hxx>
#include <hints.hxx>
#include <spellcheckcontext.hxx>
#include <uiobject.hxx>
#include <undoblk.hxx>
#include <datamapper.hxx>
#include <inputopt.hxx>
#include <queryparam.hxx>

#include <svx/sdrpagewindow.hxx>
#include <svx/sdr/overlay/overlaymanager.hxx>
@@ -131,7 +128,6 @@
#include <vcl/uitest/logger.hxx>
#include <vcl/uitest/eventdescription.hxx>
#include <svx/sdr/overlay/overlayselection.hxx>
#include <comphelper/string.hxx>
#include <comphelper/lok.hxx>
#include <sfx2/lokhelper.hxx>

diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 4205db5c..8d95ed2 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -38,7 +38,6 @@
#include <svx/unoapi.hxx>
#include <sal/log.hxx>
#include <comphelper/lok.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>

#include <output.hxx>
#include <document.hxx>
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 367d0dc..59c1ac4 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -34,7 +34,6 @@
#include <editeng/fhgtitem.hxx>
#include <editeng/forbiddenruleitem.hxx>
#include <editeng/frmdiritem.hxx>
#include <editeng/langitem.hxx>
#include <editeng/justifyitem.hxx>
#include <svx/rotmodit.hxx>
#include <editeng/udlnitem.hxx>
diff --git a/sc/source/ui/view/overlayobject.cxx b/sc/source/ui/view/overlayobject.cxx
index 5070217..67a7788 100644
--- a/sc/source/ui/view/overlayobject.cxx
+++ b/sc/source/ui/view/overlayobject.cxx
@@ -22,7 +22,6 @@
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <svx/sdr/overlay/overlaymanager.hxx>
#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
#include <drawinglayer/primitive2d/PolyPolygonMarkerPrimitive2D.hxx>
#include <officecfg/Office/Common.hxx>

diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index c95d45f..da60252 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -65,8 +65,6 @@

#include <memory>

#include <sfx2/sfxsids.hrc>

#define SC_PREVIEW_SHADOWSIZE   2

static tools::Long lcl_GetDisplayStart( SCTAB nTab, const ScDocument* pDoc, std::vector<tools::Long>& nPages )
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index c0304ef..e1109da 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -68,8 +68,6 @@
#include <vcl/EnumContext.hxx>
#include <vcl/notebookbar.hxx>

#include <sfx2/sfxsids.hrc>

//  for mouse wheel
#define MINZOOM_SLIDER 10
#define MAXZOOM_SLIDER 400
diff --git a/sc/source/ui/view/spellcheckcontext.cxx b/sc/source/ui/view/spellcheckcontext.cxx
index 971fa48..637458f 100644
--- a/sc/source/ui/view/spellcheckcontext.cxx
+++ b/sc/source/ui/view/spellcheckcontext.cxx
@@ -8,15 +8,12 @@
 */

#include <spellcheckcontext.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <svl/sharedstring.hxx>
#include <editeng/eeitem.hxx>
#include <editeng/langitem.hxx>
#include <editeng/editeng.hxx>
#include <editeng/unolingu.hxx>

#include <scitems.hxx>
#include <attarray.hxx>
#include <document.hxx>
#include <cellvalue.hxx>
#include <editutil.hxx>
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 70e781d..4374eae 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -48,7 +48,6 @@
#include <attrib.hxx>
#include <spellcheckcontext.hxx>
#include <comphelper/lok.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <sfx2/lokhelper.hxx>

#include <boost/property_tree/ptree.hpp>
diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx
index aa34633..5238947 100644
--- a/sc/source/ui/view/tabview4.cxx
+++ b/sc/source/ui/view/tabview4.cxx
@@ -27,8 +27,6 @@
#include <gridwin.hxx>
#include <globstr.hrc>
#include <scresid.hxx>
#include <formulacell.hxx>
#include <dociter.hxx>
#include <inputhdl.hxx>

// ---  Referenz-Eingabe / Fill-Cursor
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 68a76c3..bb7ba06 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -19,8 +19,6 @@

#include <sal/config.h>

#include <scitems.hxx>
#include <editeng/eeitem.hxx>
#include <formdata.hxx>

#include <sfx2/app.hxx>
@@ -56,7 +54,6 @@
#include <inputwin.hxx>
#include <dbdata.hxx>
#include <reffact.hxx>
#include <fuinsert.hxx>
#include <viewuno.hxx>
#include <dispuno.hxx>
#include <chgtrack.hxx>
diff --git a/sc/source/ui/view/tabvwsh9.cxx b/sc/source/ui/view/tabvwsh9.cxx
index 7bf98ac..03aa061 100644
--- a/sc/source/ui/view/tabvwsh9.cxx
+++ b/sc/source/ui/view/tabvwsh9.cxx
@@ -33,8 +33,6 @@
#include "imapwrap.hxx"
#include <tabvwsh.hxx>
#include <viewdata.hxx>
#include <drwlayer.hxx>
#include <userdat.hxx>
#include <docsh.hxx>

#include <svx/galleryitem.hxx>
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index d6f2884..500104e 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -21,10 +21,8 @@

#include <comphelper/lok.hxx>
#include <editeng/boxitem.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <o3tl/temporary.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/lokhelper.hxx>
#include <sfx2/request.hxx>
#include <sfx2/sfxdlg.hxx>
#include <sfx2/sidebar/Sidebar.hxx>
diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx
index bd667a5..5148954 100644
--- a/sc/source/ui/view/tabvwshe.cxx
+++ b/sc/source/ui/view/tabvwshe.cxx
@@ -26,7 +26,6 @@
#include <svx/hlnkitem.hxx>
#include <svl/srchitem.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/request.hxx>
#include <svl/stritem.hxx>

@@ -37,9 +36,7 @@
#include <editsh.hxx>
#include <dociter.hxx>
#include <inputhdl.hxx>
#include <svx/srchdlg.hxx>
#include <document.hxx>
#include <gridwin.hxx>

OUString ScTabViewShell::GetSelectionText( bool bWholeWord )
{
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index 3371ded..aae8c1b 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -59,7 +59,6 @@
#include <scmod.hxx>
#include <spelleng.hxx>
#include <patattr.hxx>
#include <sc.hrc>
#include <tabvwsh.hxx>
#include <impex.hxx>
#include <editutil.hxx>
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index f85fbf7..aad9b69 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -33,7 +33,6 @@
#include <svx/svdpage.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/lokhelper.hxx>
#include <comphelper/classids.hxx>
#include <sot/formats.hxx>
#include <sot/filelist.hxx>
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index d0484be..1c8d699 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -26,7 +26,6 @@
#include <editeng/boxitem.hxx>
#include <editeng/editobj.hxx>
#include <editeng/langitem.hxx>
#include <editeng/shaditem.hxx>
#include <editeng/justifyitem.hxx>
#include <sfx2/bindings.hxx>
#include <svl/zforlist.hxx>