summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabor Kelemen <kelemeng@ubuntu.com>2018-11-28 04:37:16 +0100
committerMiklos Vajna <vmiklos@collabora.com>2018-11-30 09:13:55 +0100
commit9059457a1a8385cb80b5dd2c797cee77af4222a9 (patch)
tree2a142e7be68a74d222c04678bec518048c7003d8
parent5bdc78f65da36d65e94de1e2dde5659f0563f08f (diff)
tdf#42949 Fix IWYU warnings in sc/source/ui/*/hxx
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I3a945828b4c74be7747850e3e0eab2f4adeb67fd Reviewed-on: https://gerrit.libreoffice.org/64140 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--sc/IwyuFilter_sc.yaml129
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.hxx3
-rw-r--r--sc/source/ui/dataprovider/htmldataprovider.hxx1
-rw-r--r--sc/source/ui/dataprovider/sqldataprovider.hxx1
-rw-r--r--sc/source/ui/dataprovider/xmldataprovider.hxx1
-rw-r--r--sc/source/ui/optdlg/calcoptionsdlg.hxx5
-rw-r--r--sc/source/ui/sidebar/AlignmentPropertyPanel.hxx4
-rw-r--r--sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx6
-rw-r--r--sc/source/ui/sidebar/CellBorderStyleControl.hxx2
-rw-r--r--sc/source/ui/sidebar/CellLineStyleControl.hxx2
-rw-r--r--sc/source/ui/sidebar/CellLineStyleValueSet.hxx1
-rw-r--r--sc/source/ui/sidebar/ScPanelFactory.hxx1
-rw-r--r--sc/source/ui/unoobj/celllistsource.cxx2
-rw-r--r--sc/source/ui/unoobj/celllistsource.hxx6
-rw-r--r--sc/source/ui/unoobj/cellvaluebinding.cxx2
-rw-r--r--sc/source/ui/unoobj/cellvaluebinding.hxx9
-rw-r--r--sc/source/ui/unoobj/exceldetect.hxx4
-rw-r--r--sc/source/ui/unoobj/scdetect.hxx5
-rw-r--r--sc/source/ui/vba/excelvbahelper.cxx6
-rw-r--r--sc/source/ui/vba/excelvbahelper.hxx25
-rw-r--r--sc/source/ui/vba/helperdecl.hxx1
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx1
-rw-r--r--sc/source/ui/vba/vbaapplication.hxx9
-rw-r--r--sc/source/ui/vba/vbaassistant.hxx3
-rw-r--r--sc/source/ui/vba/vbaaxes.hxx6
-rw-r--r--sc/source/ui/vba/vbaborders.hxx8
-rw-r--r--sc/source/ui/vba/vbacharacters.cxx2
-rw-r--r--sc/source/ui/vba/vbachart.cxx2
-rw-r--r--sc/source/ui/vba/vbachartobject.cxx2
-rw-r--r--sc/source/ui/vba/vbachartobjects.cxx1
-rw-r--r--sc/source/ui/vba/vbachartobjects.hxx11
-rw-r--r--sc/source/ui/vba/vbacomment.cxx1
-rw-r--r--sc/source/ui/vba/vbacomments.cxx3
-rw-r--r--sc/source/ui/vba/vbacomments.hxx2
-rw-r--r--sc/source/ui/vba/vbacondition.cxx1
-rw-r--r--sc/source/ui/vba/vbacondition.hxx6
-rw-r--r--sc/source/ui/vba/vbadialog.hxx1
-rw-r--r--sc/source/ui/vba/vbadialogs.hxx6
-rw-r--r--sc/source/ui/vba/vbaeventshelper.cxx3
-rw-r--r--sc/source/ui/vba/vbaeventshelper.hxx4
-rw-r--r--sc/source/ui/vba/vbafiledialog.cxx1
-rw-r--r--sc/source/ui/vba/vbafiledialog.hxx7
-rw-r--r--sc/source/ui/vba/vbafiledialogitems.hxx2
-rw-r--r--sc/source/ui/vba/vbafont.cxx1
-rw-r--r--sc/source/ui/vba/vbafont.hxx7
-rw-r--r--sc/source/ui/vba/vbaformat.cxx7
-rw-r--r--sc/source/ui/vba/vbaformat.hxx21
-rw-r--r--sc/source/ui/vba/vbaformatconditions.hxx10
-rw-r--r--sc/source/ui/vba/vbaglobals.cxx2
-rw-r--r--sc/source/ui/vba/vbaglobals.hxx8
-rw-r--r--sc/source/ui/vba/vbahyperlink.cxx3
-rw-r--r--sc/source/ui/vba/vbahyperlink.hxx7
-rw-r--r--sc/source/ui/vba/vbamenu.cxx1
-rw-r--r--sc/source/ui/vba/vbamenubars.cxx1
-rw-r--r--sc/source/ui/vba/vbamenubars.hxx6
-rw-r--r--sc/source/ui/vba/vbamenuitems.cxx1
-rw-r--r--sc/source/ui/vba/vbamenuitems.hxx6
-rw-r--r--sc/source/ui/vba/vbamenus.cxx1
-rw-r--r--sc/source/ui/vba/vbamenus.hxx6
-rw-r--r--sc/source/ui/vba/vbaname.cxx1
-rw-r--r--sc/source/ui/vba/vbaname.hxx6
-rw-r--r--sc/source/ui/vba/vbanames.cxx3
-rw-r--r--sc/source/ui/vba/vbanames.hxx6
-rw-r--r--sc/source/ui/vba/vbaoleobject.cxx1
-rw-r--r--sc/source/ui/vba/vbaoleobjects.hxx1
-rw-r--r--sc/source/ui/vba/vbaoutline.cxx2
-rw-r--r--sc/source/ui/vba/vbaoutline.hxx5
-rw-r--r--sc/source/ui/vba/vbapagebreak.cxx3
-rw-r--r--sc/source/ui/vba/vbapagebreak.hxx8
-rw-r--r--sc/source/ui/vba/vbapagebreaks.cxx5
-rw-r--r--sc/source/ui/vba/vbapagebreaks.hxx13
-rw-r--r--sc/source/ui/vba/vbapagesetup.cxx2
-rw-r--r--sc/source/ui/vba/vbapalette.cxx2
-rw-r--r--sc/source/ui/vba/vbapalette.hxx2
-rw-r--r--sc/source/ui/vba/vbapane.cxx1
-rw-r--r--sc/source/ui/vba/vbapivottables.hxx6
-rw-r--r--sc/source/ui/vba/vbarange.cxx2
-rw-r--r--sc/source/ui/vba/vbarange.hxx23
-rw-r--r--sc/source/ui/vba/vbastyle.cxx1
-rw-r--r--sc/source/ui/vba/vbastyles.cxx2
-rw-r--r--sc/source/ui/vba/vbastyles.hxx5
-rw-r--r--sc/source/ui/vba/vbatextboxshape.cxx1
-rw-r--r--sc/source/ui/vba/vbatitle.hxx6
-rw-r--r--sc/source/ui/vba/vbavalidation.hxx6
-rw-r--r--sc/source/ui/vba/vbawindows.cxx1
-rw-r--r--sc/source/ui/vba/vbawindows.hxx5
-rw-r--r--sc/source/ui/vba/vbaworkbook.cxx1
-rw-r--r--sc/source/ui/vba/vbaworkbooks.cxx2
-rw-r--r--sc/source/ui/vba/vbaworkbooks.hxx3
-rw-r--r--sc/source/ui/vba/vbaworksheet.cxx2
-rw-r--r--sc/source/ui/vba/vbaworksheet.hxx20
-rw-r--r--sc/source/ui/vba/vbaworksheets.cxx1
-rw-r--r--sc/source/ui/vba/vbaworksheets.hxx11
-rw-r--r--sc/source/ui/vba/vbawsfunction.cxx1
94 files changed, 351 insertions, 195 deletions
diff --git a/sc/IwyuFilter_sc.yaml b/sc/IwyuFilter_sc.yaml
index fbc77d9daac6..8aeb6a621378 100644
--- a/sc/IwyuFilter_sc.yaml
+++ b/sc/IwyuFilter_sc.yaml
@@ -499,6 +499,135 @@ blacklist:
sc/source/ui/inc/StatisticsTwoVariableDialog.hxx:
# base class has to be a complete type
- viewdata.hxx
+ sc/source/ui/unoobj/exceldetect.hxx:
+ # base class has to be a complete type
+ - com/sun/star/document/XExtendedFilterDetection.hpp
+ - com/sun/star/lang/XServiceInfo.hpp
+ sc/source/ui/unoobj/scdetect.hxx:
+ # base class has to be a complete type
+ - com/sun/star/document/XExtendedFilterDetection.hpp
+ - com/sun/star/lang/XServiceInfo.hpp
+ sc/source/ui/unoobj/celllistsource.hxx:
+ # base class has to be a complete type
+ - com/sun/star/form/binding/XListEntryTypedSource.hpp
+ - com/sun/star/lang/XInitialization.hpp
+ - com/sun/star/lang/XServiceInfo.hpp
+ - com/sun/star/util/XModifyListener.hpp
+ sc/source/ui/unoobj/cellvaluebinding.hxx:
+ # base class has to be a complete type
+ - com/sun/star/form/binding/XValueBinding.hpp
+ - com/sun/star/util/XModifyBroadcaster.hpp
+ - com/sun/star/lang/XInitialization.hpp
+ - com/sun/star/lang/XServiceInfo.hpp
+ sc/source/ui/sidebar/ScPanelFactory.hxx:
+ # base class has to be a complete type
+ - com/sun/star/lang/XServiceInfo.hpp
+ - com/sun/star/ui/XUIElementFactory.hpp
+ sc/source/ui/vba/service.hxx:
+ # Used in extern declaration
+ - namespace comphelper { namespace service_decl { class ServiceDecl; } }
+ sc/source/ui/vba/vbaassistant.hxx:
+ # base class has to be a complete type
+ - ooo/vba/XAssistant.hpp
+ sc/source/ui/vba/vbaapplication.hxx:
+ # base class has to be a complete type
+ - ooo/vba/XSinkCaller.hpp
+ - ooo/vba/excel/XApplication.hpp
+ - vbahelper/vbaapplicationbase.hxx
+ sc/source/ui/vba/vbaaxes.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XAxes.hpp
+ sc/source/ui/vba/vbaborders.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XBorders.hpp
+ sc/source/ui/vba/vbachartobjects.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XChartObjects.hpp
+ sc/source/ui/vba/vbacomments.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XComments.hpp
+ 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
+ sc/source/ui/vba/vbafont.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XFont.hpp
+ - vbahelper/vbafontbase.hxx
+ sc/source/ui/vba/vbaformatconditions.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XFormatConditions.hpp
+ sc/source/ui/vba/vbaglobals.hxx:
+ # base class has to be a complete type
+ - vbahelper/vbaglobalbase.hxx
+ - ooo/vba/excel/XGlobals.hpp
+ sc/source/ui/vba/vbahyperlinks.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XHyperlinks.hpp
+ sc/source/ui/vba/vbahyperlink.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XHyperlink.hpp
+ sc/source/ui/vba/vbamenubars.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XMenuBars.hpp
+ sc/source/ui/vba/vbamenuitems.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XMenuItems.hpp
+ sc/source/ui/vba/vbamenus.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XMenus.hpp
+ sc/source/ui/vba/vbaname.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XName.hpp
+ sc/source/ui/vba/vbaoleobjects.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XOLEObjects.hpp
+ sc/source/ui/vba/vbanames.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XNames.hpp
+ sc/source/ui/vba/vbaoutline.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XOutline.hpp
+ sc/source/ui/vba/vbapagebreak.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XHPageBreak.hpp
+ - ooo/vba/excel/XVPageBreak.hpp
+ sc/source/ui/vba/vbapagebreaks.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XHPageBreaks.hpp
+ - ooo/vba/excel/XVPageBreaks.hpp
+ sc/source/ui/vba/vbapivottables.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XPivotTables.hpp
+ sc/source/ui/vba/vbarange.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XRange.hpp
+ sc/source/ui/vba/vbasheetobjects.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XGraphicObjects.hpp
+ sc/source/ui/vba/vbastyles.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XStyles.hpp
+ sc/source/ui/vba/vbavalidation.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XValidation.hpp
+ sc/source/ui/vba/vbaworkbooks.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XWorkbooks.hpp
+ - vbahelper/vbadocumentsbase.hxx
+ sc/source/ui/vba/vbawindows.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XWindows.hpp
+ sc/source/ui/vba/vbaworksheet.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XWorksheet.hpp
+ sc/source/ui/vba/vbaworksheets.hxx:
+ # base class has to be a complete type
+ - ooo/vba/excel/XWorksheets.hpp
sc/source/core/data/column2.cxx:
# Used in #if DEBUG_COLUMN_STORAGE
- tokenstringcontext.hxx
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 797d6deaf794..bcf0fa6e0c8e 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -21,7 +21,7 @@
#include <scabstdlg.hxx>
#include <sfx2/sfxdlg.hxx>
-class Dialog;
+
class ScImportAsciiDlg;
class ScAutoFormatDlg;
class ScColRowLabelDlg;
@@ -54,7 +54,6 @@ class ScShowTabDlg;
class ScStringInputDlg;
class ScTabBgColorDlg;
class ScImportOptionsDlg;
-class SfxTabDialog;
class ScTextImportOptionsDlg;
class ScCondFormatManagerDlg;
diff --git a/sc/source/ui/dataprovider/htmldataprovider.hxx b/sc/source/ui/dataprovider/htmldataprovider.hxx
index ae211850c9a3..249249dcef88 100644
--- a/sc/source/ui/dataprovider/htmldataprovider.hxx
+++ b/sc/source/ui/dataprovider/htmldataprovider.hxx
@@ -15,7 +15,6 @@
namespace sc {
class HTMLFetchThread;
-class DataTransformation;
class HTMLDataProvider : public DataProvider
{
diff --git a/sc/source/ui/dataprovider/sqldataprovider.hxx b/sc/source/ui/dataprovider/sqldataprovider.hxx
index a79930141ec1..7af495ccf77e 100644
--- a/sc/source/ui/dataprovider/sqldataprovider.hxx
+++ b/sc/source/ui/dataprovider/sqldataprovider.hxx
@@ -15,7 +15,6 @@
namespace sc
{
class SQLFetchThread;
-class DataTransformation;
class SQLDataProvider : public DataProvider
{
diff --git a/sc/source/ui/dataprovider/xmldataprovider.hxx b/sc/source/ui/dataprovider/xmldataprovider.hxx
index fef995522019..87b30a1ecea9 100644
--- a/sc/source/ui/dataprovider/xmldataprovider.hxx
+++ b/sc/source/ui/dataprovider/xmldataprovider.hxx
@@ -15,7 +15,6 @@
namespace sc
{
class XMLFetchThread;
-class DataTransformation;
class XMLDataProvider : public DataProvider
{
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.hxx b/sc/source/ui/optdlg/calcoptionsdlg.hxx
index 8d455797667d..2baae9d8c6b2 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.hxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.hxx
@@ -14,11 +14,6 @@
#include <vcl/weld.hxx>
#include <calcconfig.hxx>
-#if HAVE_FEATURE_OPENCL
-#include <opencl/openclconfig.hxx>
-#include <opencl/platforminfo.hxx>
-#endif
-
class ScCalcOptionsDialog : public weld::GenericDialogController
{
public:
diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx
index 9df3f424d885..47c50734f5f2 100644
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx
@@ -25,13 +25,9 @@
#include <vcl/fixed.hxx>
#include <vcl/button.hxx>
#include <vcl/layout.hxx>
-#include <editeng/svxenum.hxx>
-class ToolBox;
class MetricField;
class MetricBox;
-class CheckBox;
-namespace svx { namespace sidebar { class SidebarDialControl; }}
namespace sc { namespace sidebar {
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx
index c4d403f26040..296ec9d25a3c 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx
@@ -22,12 +22,8 @@
#include <sfx2/sidebar/ControllerItem.hxx>
#include <sfx2/sidebar/IContextChangeReceiver.hxx>
#include <svx/sidebar/PanelLayout.hxx>
-#include <vcl/floatwin.hxx>
-#include <memory>
+#include <vcl/image.hxx>
-namespace sc { namespace sidebar {
- class CellBorderUpdater;
-}}
class ToolBox;
namespace sc { namespace sidebar {
diff --git a/sc/source/ui/sidebar/CellBorderStyleControl.hxx b/sc/source/ui/sidebar/CellBorderStyleControl.hxx
index a288f1a3eaca..3e413265bc1b 100644
--- a/sc/source/ui/sidebar/CellBorderStyleControl.hxx
+++ b/sc/source/ui/sidebar/CellBorderStyleControl.hxx
@@ -19,8 +19,6 @@
#ifndef INCLUDED_SC_SOURCE_UI_SIDEBAR_CELLBORDERSTYLECONTROL_HXX
#define INCLUDED_SC_SOURCE_UI_SIDEBAR_CELLBORDERSTYLECONTROL_HXX
-#include <vcl/button.hxx>
-#include <vcl/fixed.hxx>
#include <vcl/floatwin.hxx>
#include <vcl/toolbox.hxx>
diff --git a/sc/source/ui/sidebar/CellLineStyleControl.hxx b/sc/source/ui/sidebar/CellLineStyleControl.hxx
index 399ff9a260be..26217fe3ee82 100644
--- a/sc/source/ui/sidebar/CellLineStyleControl.hxx
+++ b/sc/source/ui/sidebar/CellLineStyleControl.hxx
@@ -27,8 +27,6 @@ class SfxDispatcher;
namespace sc { namespace sidebar {
-class CellAppearancePropertyPanel;
-
class CellLineStylePopup : public FloatingWindow
{
SfxDispatcher* mpDispatcher;
diff --git a/sc/source/ui/sidebar/CellLineStyleValueSet.hxx b/sc/source/ui/sidebar/CellLineStyleValueSet.hxx
index b01a9e1464b1..2e45622d8812 100644
--- a/sc/source/ui/sidebar/CellLineStyleValueSet.hxx
+++ b/sc/source/ui/sidebar/CellLineStyleValueSet.hxx
@@ -20,7 +20,6 @@
#define INCLUDED_SC_SOURCE_UI_SIDEBAR_CELLLINESTYLEVALUESET_HXX
#include <svtools/valueset.hxx>
-#include <vcl/image.hxx>
#define CELL_LINE_STYLE_ENTRIES 9
diff --git a/sc/source/ui/sidebar/ScPanelFactory.hxx b/sc/source/ui/sidebar/ScPanelFactory.hxx
index 817058588fe9..ea5d28d53877 100644
--- a/sc/source/ui/sidebar/ScPanelFactory.hxx
+++ b/sc/source/ui/sidebar/ScPanelFactory.hxx
@@ -21,7 +21,6 @@
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/basemutex.hxx>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/ui/XUIElementFactory.hpp>
diff --git a/sc/source/ui/unoobj/celllistsource.cxx b/sc/source/ui/unoobj/celllistsource.cxx
index 6dd779d6f762..325500be6285 100644
--- a/sc/source/ui/unoobj/celllistsource.cxx
+++ b/sc/source/ui/unoobj/celllistsource.cxx
@@ -21,9 +21,11 @@
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/lang/NotInitializedException.hpp>
#include <com/sun/star/lang/NullPointerException.hpp>
+#include <com/sun/star/table/XCellRange.hpp>
#include <com/sun/star/text/XTextRange.hpp>
#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
#include <com/sun/star/sheet/FormulaResult.hpp>
+#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
diff --git a/sc/source/ui/unoobj/celllistsource.hxx b/sc/source/ui/unoobj/celllistsource.hxx
index 5444dfe60ca6..9d8d5f5cf2a8 100644
--- a/sc/source/ui/unoobj/celllistsource.hxx
+++ b/sc/source/ui/unoobj/celllistsource.hxx
@@ -27,14 +27,14 @@
#include <comphelper/propertycontainer.hxx>
#include <comphelper/uno3.hxx>
#include <comphelper/proparrhlp.hxx>
-#include <com/sun/star/table/XCellRange.hpp>
#include <com/sun/star/table/CellRangeAddress.hpp>
-#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/util/XModifyListener.hpp>
+namespace com { namespace sun { namespace star { namespace sheet { class XSpreadsheetDocument; } } } }
+namespace com { namespace sun { namespace star { namespace table { class XCellRange; } } } }
+
namespace calc
{
diff --git a/sc/source/ui/unoobj/cellvaluebinding.cxx b/sc/source/ui/unoobj/cellvaluebinding.cxx
index c65f26e83ed2..0ac76f797afa 100644
--- a/sc/source/ui/unoobj/cellvaluebinding.cxx
+++ b/sc/source/ui/unoobj/cellvaluebinding.cxx
@@ -21,10 +21,12 @@
#include <rtl/math.hxx>
#include <com/sun/star/form/binding/IncompatibleTypesException.hpp>
#include <com/sun/star/lang/NotInitializedException.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
#include <com/sun/star/table/XCellRange.hpp>
#include <com/sun/star/sheet/FormulaResult.hpp>
#include <com/sun/star/sheet/XCellAddressable.hpp>
#include <com/sun/star/sheet/XCellRangeData.hpp>
+#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
diff --git a/sc/source/ui/unoobj/cellvaluebinding.hxx b/sc/source/ui/unoobj/cellvaluebinding.hxx
index 0d9e3e7d6747..c60ed2332040 100644
--- a/sc/source/ui/unoobj/cellvaluebinding.hxx
+++ b/sc/source/ui/unoobj/cellvaluebinding.hxx
@@ -28,14 +28,13 @@
#include <comphelper/propertycontainer.hxx>
#include <comphelper/uno3.hxx>
#include <comphelper/proparrhlp.hxx>
-#include <com/sun/star/table/XCell.hpp>
-#include <com/sun/star/table/CellAddress.hpp>
-#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
-#include <com/sun/star/text/XTextRange.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
+namespace com { namespace sun { namespace star { namespace table { class XCell; } } } }
+namespace com { namespace sun { namespace star { namespace sheet { class XSpreadsheetDocument; } } } }
+namespace com { namespace sun { namespace star { namespace text { class XTextRange; } } } }
+
namespace calc
{
diff --git a/sc/source/ui/unoobj/exceldetect.hxx b/sc/source/ui/unoobj/exceldetect.hxx
index dab31ff3bed9..32909a041b51 100644
--- a/sc/source/ui/unoobj/exceldetect.hxx
+++ b/sc/source/ui/unoobj/exceldetect.hxx
@@ -15,10 +15,6 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/document/XExtendedFilterDetection.hpp>
-namespace com { namespace sun { namespace star { namespace uno {
- class XComponentContext;
-}}}}
-
class ScExcelBiffDetect : public cppu::WeakImplHelper<css::document::XExtendedFilterDetection, css::lang::XServiceInfo>
{
public:
diff --git a/sc/source/ui/unoobj/scdetect.hxx b/sc/source/ui/unoobj/scdetect.hxx
index cc42ae0c9339..b7db12709aa0 100644
--- a/sc/source/ui/unoobj/scdetect.hxx
+++ b/sc/source/ui/unoobj/scdetect.hxx
@@ -21,16 +21,11 @@
#define INCLUDED_SC_SOURCE_UI_UNOOBJ_SCDETECT_HXX
#include <com/sun/star/document/XExtendedFilterDetection.hpp>
-#include <com/sun/star/uno/Exception.hpp>
-#include <com/sun/star/uno/Reference.h>
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include <cppuhelper/factory.hxx>
#include <rtl/ustring.hxx>
-#include <sfx2/sfxuno.hxx>
namespace com { namespace sun { namespace star {
namespace beans { struct PropertyValue; }
diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx
index b96821b4ff07..e756fe36e69a 100644
--- a/sc/source/ui/vba/excelvbahelper.cxx
+++ b/sc/source/ui/vba/excelvbahelper.cxx
@@ -21,9 +21,15 @@
#include <basic/basmgr.hxx>
#include <comphelper/processfactory.hxx>
+#include <vbahelper/vbahelper.hxx>
+#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/sheet/XSheetCellRange.hpp>
#include <com/sun/star/sheet/GlobalSheetSettings.hpp>
+#include <com/sun/star/sheet/XUnnamedDatabaseRanges.hpp>
+#include <com/sun/star/sheet/XSpreadsheet.hpp>
+#include <com/sun/star/sheet/XDatabaseRange.hpp>
+#include <document.hxx>
#include <docuno.hxx>
#include <tabvwsh.hxx>
#include <transobj.hxx>
diff --git a/sc/source/ui/vba/excelvbahelper.hxx b/sc/source/ui/vba/excelvbahelper.hxx
index 002f2b6f79a6..8ae36b25f072 100644
--- a/sc/source/ui/vba/excelvbahelper.hxx
+++ b/sc/source/ui/vba/excelvbahelper.hxx
@@ -19,18 +19,25 @@
#ifndef INCLUDED_SC_SOURCE_UI_VBA_EXCELVBAHELPER_HXX
#define INCLUDED_SC_SOURCE_UI_VBA_EXCELVBAHELPER_HXX
-#include <vbahelper/vbahelper.hxx>
-#include <docsh.hxx>
-#include <com/sun/star/sheet/XDatabaseRange.hpp>
-#include <com/sun/star/sheet/XUnnamedDatabaseRanges.hpp>
-#include <com/sun/star/table/XCellRange.hpp>
-#include <com/sun/star/sheet/XSheetCellRangeContainer.hpp>
-#include <com/sun/star/sheet/XSpreadsheet.hpp>
-#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <ooo/vba/XHelperInterface.hpp>
+#include <vector>
+#include <global.hxx>
+
+namespace com { namespace sun { namespace star { namespace frame { class XModel; } } } }
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
+
+namespace com { namespace sun { namespace star { namespace sheet { class XDatabaseRange; } } } }
+namespace com { namespace sun { namespace star { namespace sheet { class XUnnamedDatabaseRanges; } } } }
+namespace com { namespace sun { namespace star { namespace table { class XCell; } } } }
+namespace com { namespace sun { namespace star { namespace table { class XCellRange; } } } }
+namespace com { namespace sun { namespace star { namespace sheet { class XSheetCellRangeContainer; } } } }
+namespace com { namespace sun { namespace star { namespace sheet { class XSpreadsheet; } } } }
+namespace com { namespace sun { namespace star { namespace sheet { class XSpreadsheetDocument; } } } }
+namespace ooo { namespace vba { class XHelperInterface; } }
class ScCellRangesBase;
+class ScTabViewShell;
+class SfxViewFrame;
namespace ooo {
namespace vba {
diff --git a/sc/source/ui/vba/helperdecl.hxx b/sc/source/ui/vba/helperdecl.hxx
index 0a318de4fc75..8413f0c08d12 100644
--- a/sc/source/ui/vba/helperdecl.hxx
+++ b/sc/source/ui/vba/helperdecl.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_SC_SOURCE_UI_VBA_HELPERDECL_HXX
#include <comphelper/servicedecl.hxx>
-#include <ooo/vba/XHelperInterface.hpp>
namespace comphelper {
namespace service_decl {
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index 0375aed29e28..6f502c8880dd 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -29,6 +29,7 @@
#include <com/sun/star/task/XStatusIndicator.hpp>
#include <com/sun/star/util/PathSettings.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <ooo/vba/XCommandBars.hpp>
#include <ooo/vba/XExecutableDialog.hpp>
#include <ooo/vba/excel/XApplicationOutgoing.hpp>
#include <ooo/vba/excel/XlCalculation.hpp>
diff --git a/sc/source/ui/vba/vbaapplication.hxx b/sc/source/ui/vba/vbaapplication.hxx
index 6c9c58588ada..cf7e28f710fe 100644
--- a/sc/source/ui/vba/vbaapplication.hxx
+++ b/sc/source/ui/vba/vbaapplication.hxx
@@ -21,17 +21,16 @@
#include <vector>
-#include <ooo/vba/XSink.hpp>
#include <ooo/vba/XSinkCaller.hpp>
-#include <ooo/vba/excel/XWorksheetFunction.hpp>
#include <ooo/vba/excel/XApplication.hpp>
-#include <ooo/vba/excel/XFileDialog.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <vbahelper/vbahelperinterface.hxx>
#include <vbahelper/vbaapplicationbase.hxx>
#include <cppuhelper/implbase.hxx>
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
+namespace ooo { namespace vba { class XSink; } }
+namespace ooo { namespace vba { namespace excel { class XFileDialog; } } }
+
typedef cppu::ImplInheritanceHelper< VbaApplicationBase, ov::excel::XApplication, ov::XSinkCaller > ScVbaApplication_BASE;
struct ScVbaAppSettings;
diff --git a/sc/source/ui/vba/vbaassistant.hxx b/sc/source/ui/vba/vbaassistant.hxx
index 25eb414e3025..ef961933e7e4 100644
--- a/sc/source/ui/vba/vbaassistant.hxx
+++ b/sc/source/ui/vba/vbaassistant.hxx
@@ -22,9 +22,6 @@
#include <cppuhelper/implbase.hxx>
#include <ooo/vba/XAssistant.hpp>
-#include <sfx2/sfxhelp.hxx>
-
-#include "excelvbahelper.hxx"
#include <vbahelper/vbahelperinterface.hxx>
typedef ::cppu::WeakImplHelper< ov::XAssistant > Assistant;
diff --git a/sc/source/ui/vba/vbaaxes.hxx b/sc/source/ui/vba/vbaaxes.hxx
index b0d8fa85a6f5..069bc59d1866 100644
--- a/sc/source/ui/vba/vbaaxes.hxx
+++ b/sc/source/ui/vba/vbaaxes.hxx
@@ -18,11 +18,13 @@
*/
#ifndef INCLUDED_SC_SOURCE_UI_VBA_VBAAXES_HXX
#define INCLUDED_SC_SOURCE_UI_VBA_VBAAXES_HXX
+
#include <ooo/vba/excel/XAxes.hpp>
-#include <ooo/vba/excel/XAxis.hpp>
-#include <ooo/vba/excel/XChart.hpp>
#include <vbahelper/vbacollectionimpl.hxx>
+namespace ooo { namespace vba { namespace excel { class XAxis; } } }
+namespace ooo { namespace vba { namespace excel { class XChart; } } }
+
typedef CollTestImplHelper< ov::excel::XAxes > ScVbaAxes_BASE;
class ScVbaAxes : public ScVbaAxes_BASE
{
diff --git a/sc/source/ui/vba/vbaborders.hxx b/sc/source/ui/vba/vbaborders.hxx
index cb16b696633e..422ae237ed5c 100644
--- a/sc/source/ui/vba/vbaborders.hxx
+++ b/sc/source/ui/vba/vbaborders.hxx
@@ -21,12 +21,12 @@
#include <ooo/vba/excel/XBorders.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/table/XCellRange.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-
#include <vbahelper/vbacollectionimpl.hxx>
+namespace com { namespace sun { namespace star { namespace beans { class XPropertySet; } } } }
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
+namespace com { namespace sun { namespace star { namespace table { class XCellRange; } } } }
+
typedef CollTestImplHelper< ov::excel::XBorders > ScVbaBorders_BASE;
class ScVbaPalette;
class ScVbaBorders : public ScVbaBorders_BASE
diff --git a/sc/source/ui/vba/vbacharacters.cxx b/sc/source/ui/vba/vbacharacters.cxx
index 61284330f96f..dc94a0371c8d 100644
--- a/sc/source/ui/vba/vbacharacters.cxx
+++ b/sc/source/ui/vba/vbacharacters.cxx
@@ -21,6 +21,8 @@
#include "vbaglobals.hxx"
#include "vbafont.hxx"
+#include <com/sun/star/beans/XPropertySet.hpp>
+
using namespace ::ooo::vba;
using namespace ::com::sun::star;
diff --git a/sc/source/ui/vba/vbachart.cxx b/sc/source/ui/vba/vbachart.cxx
index fa769944e1be..27605af57ea4 100644
--- a/sc/source/ui/vba/vbachart.cxx
+++ b/sc/source/ui/vba/vbachart.cxx
@@ -18,6 +18,7 @@
*/
#include "vbachart.hxx"
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
#include <com/sun/star/chart/XAxisXSupplier.hpp>
#include <com/sun/star/chart/XAxisYSupplier.hpp>
@@ -39,6 +40,7 @@
#include "vbarange.hxx"
#include "vbacharttitle.hxx"
#include "vbaaxes.hxx"
+#include <document.hxx>
using namespace ::com::sun::star;
using namespace ::ooo::vba;
diff --git a/sc/source/ui/vba/vbachartobject.cxx b/sc/source/ui/vba/vbachartobject.cxx
index c6311ebe51d6..cc48bd48d6dc 100644
--- a/sc/source/ui/vba/vbachartobject.cxx
+++ b/sc/source/ui/vba/vbachartobject.cxx
@@ -21,7 +21,9 @@
#include <com/sun/star/document/XEmbeddedObjectSupplier.hpp>
#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/script/BasicErrorException.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <basic/sberrors.hxx>
+#include <docsh.hxx>
#include "vbachartobject.hxx"
#include "vbachartobjects.hxx"
diff --git a/sc/source/ui/vba/vbachartobjects.cxx b/sc/source/ui/vba/vbachartobjects.cxx
index 8eed4924c3d5..bca84c28300a 100644
--- a/sc/source/ui/vba/vbachartobjects.cxx
+++ b/sc/source/ui/vba/vbachartobjects.cxx
@@ -27,6 +27,7 @@
#include "vbachartobjects.hxx"
#include "vbachartobject.hxx"
#include "vbaglobals.hxx"
+#include <docsh.hxx>
#include <cellsuno.hxx>
#include <vector>
#include <basic/sberrors.hxx>
diff --git a/sc/source/ui/vba/vbachartobjects.hxx b/sc/source/ui/vba/vbachartobjects.hxx
index 915df9d75003..1d1878e25a40 100644
--- a/sc/source/ui/vba/vbachartobjects.hxx
+++ b/sc/source/ui/vba/vbachartobjects.hxx
@@ -21,13 +21,12 @@
#define INCLUDED_SC_SOURCE_UI_VBA_VBACHARTOBJECTS_HXX
#include <ooo/vba/excel/XChartObjects.hpp>
-#include <ooo/vba/excel/XChartObject.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/table/XTableCharts.hpp>
-#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
-#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <vbahelper/vbacollectionimpl.hxx>
-#include "excelvbahelper.hxx"
+
+namespace com { namespace sun { namespace star { namespace container { class XEnumeration; } } } }
+namespace com { namespace sun { namespace star { namespace drawing { class XDrawPageSupplier; } } } }
+namespace com { namespace sun { namespace star { namespace table { class XTableCharts; } } } }
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
typedef CollTestImplHelper< ov::excel::XChartObjects > ChartObjects_BASE;
diff --git a/sc/source/ui/vba/vbacomment.cxx b/sc/source/ui/vba/vbacomment.cxx
index dac9a040f1a9..0370a45719fb 100644
--- a/sc/source/ui/vba/vbacomment.cxx
+++ b/sc/source/ui/vba/vbacomment.cxx
@@ -29,6 +29,7 @@
#include <com/sun/star/table/CellAddress.hpp>
#include <com/sun/star/table/XCell.hpp>
#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/frame/XModel.hpp>
#include <ooo/vba/office/MsoShapeType.hpp>
#include <vbahelper/vbashape.hxx>
diff --git a/sc/source/ui/vba/vbacomments.cxx b/sc/source/ui/vba/vbacomments.cxx
index 5841df0f84b1..02c5f9c1be32 100644
--- a/sc/source/ui/vba/vbacomments.cxx
+++ b/sc/source/ui/vba/vbacomments.cxx
@@ -17,9 +17,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "vbacomments.hxx"
+#include "vbacomment.hxx"
+#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/sheet/XSheetAnnotation.hpp>
+#include <com/sun/star/table/XCellRange.hpp>
#include "vbaglobals.hxx"
diff --git a/sc/source/ui/vba/vbacomments.hxx b/sc/source/ui/vba/vbacomments.hxx
index a45ae2a96f12..9f5cb158b4bf 100644
--- a/sc/source/ui/vba/vbacomments.hxx
+++ b/sc/source/ui/vba/vbacomments.hxx
@@ -21,9 +21,7 @@
#include <ooo/vba/excel/XComments.hpp>
-#include "excelvbahelper.hxx"
#include <vbahelper/vbacollectionimpl.hxx>
-#include "vbacomment.hxx"
typedef CollTestImplHelper< ov::excel::XComments > ScVbaComments_BASE;
diff --git a/sc/source/ui/vba/vbacondition.cxx b/sc/source/ui/vba/vbacondition.cxx
index 274be099b4b9..4966e7efd6b3 100644
--- a/sc/source/ui/vba/vbacondition.cxx
+++ b/sc/source/ui/vba/vbacondition.cxx
@@ -22,6 +22,7 @@
#include <ooo/vba/excel/XFormatCondition.hpp>
#include <com/sun/star/table/XCellRange.hpp>
#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
+#include <com/sun/star/sheet/XSheetCondition.hpp>
#include <basic/sberrors.hxx>
using namespace ::ooo::vba;
diff --git a/sc/source/ui/vba/vbacondition.hxx b/sc/source/ui/vba/vbacondition.hxx
index 346905a8c2c4..01283207e2ad 100644
--- a/sc/source/ui/vba/vbacondition.hxx
+++ b/sc/source/ui/vba/vbacondition.hxx
@@ -18,11 +18,13 @@
*/
#ifndef INCLUDED_SC_SOURCE_UI_VBA_VBACONDITION_HXX
#define INCLUDED_SC_SOURCE_UI_VBA_VBACONDITION_HXX
-#include <com/sun/star/sheet/XSheetCondition.hpp>
-#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
+
#include <vbahelper/vbahelperinterface.hxx>
#include <com/sun/star/sheet/ConditionOperator.hpp>
+namespace com { namespace sun { namespace star { namespace sheet { class XCellRangeAddressable; } } } }
+namespace com { namespace sun { namespace star { namespace sheet { class XSheetCondition; } } } }
+
template< typename... Ifc >
class ScVbaCondition : public InheritedHelperInterfaceWeakImpl< Ifc... >
{
diff --git a/sc/source/ui/vba/vbadialog.hxx b/sc/source/ui/vba/vbadialog.hxx
index f36fa59f06e4..e2d60bb32fab 100644
--- a/sc/source/ui/vba/vbadialog.hxx
+++ b/sc/source/ui/vba/vbadialog.hxx
@@ -21,7 +21,6 @@
#include <cppuhelper/implbase.hxx>
#include <ooo/vba/excel/XDialog.hpp>
-#include <vbahelper/vbahelperinterface.hxx>
#include <vbahelper/vbadialogbase.hxx>
typedef cppu::ImplInheritanceHelper< VbaDialogBase, ov::excel::XDialog > ScVbaDialog_BASE;
diff --git a/sc/source/ui/vba/vbadialogs.hxx b/sc/source/ui/vba/vbadialogs.hxx
index c9e9c657b2b7..630896996ec1 100644
--- a/sc/source/ui/vba/vbadialogs.hxx
+++ b/sc/source/ui/vba/vbadialogs.hxx
@@ -19,13 +19,13 @@
#ifndef INCLUDED_SC_SOURCE_UI_VBA_VBADIALOGS_HXX
#define INCLUDED_SC_SOURCE_UI_VBA_VBADIALOGS_HXX
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <ooo/vba/excel/XDialogs.hpp>
-#include <ooo/vba/XCollection.hpp>
-#include <vbahelper/vbahelperinterface.hxx>
#include <vbahelper/vbadialogsbase.hxx>
#include <cppuhelper/implbase.hxx>
+namespace ooo { namespace vba { class XHelperInterface; } }
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
+
typedef cppu::ImplInheritanceHelper< VbaDialogsBase, ov::excel::XDialogs > ScVbaDialogs_BASE;
class ScVbaDialogs : public ScVbaDialogs_BASE
diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx
index 5225cb722dc1..61b9bbc26cee 100644
--- a/sc/source/ui/vba/vbaeventshelper.cxx
+++ b/sc/source/ui/vba/vbaeventshelper.cxx
@@ -18,6 +18,7 @@
*/
#include "vbaeventshelper.hxx"
+#include "excelvbahelper.hxx"
#include <com/sun/star/awt/XTopWindow.hpp>
#include <com/sun/star/awt/XTopWindowListener.hpp>
@@ -39,6 +40,8 @@
#include <vcl/window.hxx>
#include <vbahelper/vbaaccesshelper.hxx>
+#include <docsh.hxx>
+#include <document.hxx>
#include <cellsuno.hxx>
#include <convuno.hxx>
#include "vbaapplication.hxx"
diff --git a/sc/source/ui/vba/vbaeventshelper.hxx b/sc/source/ui/vba/vbaeventshelper.hxx
index 5da129c825ec..7e85b8fdc3a2 100644
--- a/sc/source/ui/vba/vbaeventshelper.hxx
+++ b/sc/source/ui/vba/vbaeventshelper.hxx
@@ -22,9 +22,9 @@
#include <rtl/ref.hxx>
#include <vbahelper/vbaeventshelperbase.hxx>
-#include "excelvbahelper.hxx"
-#include <rangelst.hxx>
+class ScDocShell;
+class ScDocument;
class ScVbaEventListener;
class ScVbaEventsHelper : public VbaEventsHelperBase
diff --git a/sc/source/ui/vba/vbafiledialog.cxx b/sc/source/ui/vba/vbafiledialog.cxx
index 00b3f2b8bfe8..ad5ecdb03012 100644
--- a/sc/source/ui/vba/vbafiledialog.cxx
+++ b/sc/source/ui/vba/vbafiledialog.cxx
@@ -18,6 +18,7 @@
*/
#include "vbafiledialog.hxx"
+#include "vbafiledialogitems.hxx"
#include <osl/file.hxx>
diff --git a/sc/source/ui/vba/vbafiledialog.hxx b/sc/source/ui/vba/vbafiledialog.hxx
index f35a227dc84b..0596e640fb60 100644
--- a/sc/source/ui/vba/vbafiledialog.hxx
+++ b/sc/source/ui/vba/vbafiledialog.hxx
@@ -20,10 +20,13 @@
#define INCLUDED_SC_SOURCE_UI_VBA_VBAFILEDIALOG_HXX
#include <ooo/vba/excel/XFileDialog.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <vbahelper/vbahelperinterface.hxx>
-#include "vbafiledialogitems.hxx"
+#include <vbahelper/vbacollectionimpl.hxx>
+
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
+namespace ooo { namespace vba { class XHelperInterface; } }
+namespace ooo { namespace vba { namespace excel { class XFileDialogSelectedItems; } } }
typedef InheritedHelperInterfaceWeakImpl< ov::excel::XFileDialog > ScVbaFileDialog_BASE;
diff --git a/sc/source/ui/vba/vbafiledialogitems.hxx b/sc/source/ui/vba/vbafiledialogitems.hxx
index 47ba90ac4440..f0e2977fee7c 100644
--- a/sc/source/ui/vba/vbafiledialogitems.hxx
+++ b/sc/source/ui/vba/vbafiledialogitems.hxx
@@ -10,9 +10,7 @@
#define INCLUDED_SC_SOURCE_UI_VBA_VBAFILEDIALOGSELECTEDITEMS
#include <ooo/vba/excel/XFileDialogSelectedItems.hpp>
-#include <vbahelper/vbahelperinterface.hxx>
#include <vbahelper/vbacollectionimpl.hxx>
-#include <com/sun/star/container/XIndexAccess.hpp>
typedef CollTestImplHelper< ov::excel::XFileDialogSelectedItems > FileDialogSelectedItems_BASE;
diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx
index c22bfb4c828f..35684116de28 100644
--- a/sc/source/ui/vba/vbafont.cxx
+++ b/sc/source/ui/vba/vbafont.cxx
@@ -31,6 +31,7 @@
#include <svl/itemset.hxx>
#include "excelvbahelper.hxx"
#include "vbafont.hxx"
+#include "vbapalette.hxx"
#include <scitems.hxx>
#include <cellsuno.hxx>
diff --git a/sc/source/ui/vba/vbafont.hxx b/sc/source/ui/vba/vbafont.hxx
index 5b7e923668d7..4eac5d4b885d 100644
--- a/sc/source/ui/vba/vbafont.hxx
+++ b/sc/source/ui/vba/vbafont.hxx
@@ -21,13 +21,14 @@
#include <cppuhelper/implbase.hxx>
-#include <com/sun/star/beans/XPropertySet.hpp>
#include <ooo/vba/excel/XFont.hpp>
-#include <vbahelper/vbahelperinterface.hxx>
#include <vbahelper/vbafontbase.hxx>
-#include "vbapalette.hxx"
+
+namespace com { namespace sun { namespace star { namespace beans { class XPropertySet; } } } }
class ScCellRangeObj;
+class SfxItemSet;
+class ScVbaPalette;
typedef cppu::ImplInheritanceHelper< VbaFontBase, ov::excel::XFont > ScVbaFont_BASE;
diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx
index cc83083d892b..206163306f45 100644
--- a/sc/source/ui/vba/vbaformat.cxx
+++ b/sc/source/ui/vba/vbaformat.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "vbaformat.hxx"
+#include <ooo/vba/excel/XFont.hpp>
#include <ooo/vba/excel/XStyle.hpp>
#include <ooo/vba/excel/XlVAlign.hpp>
#include <ooo/vba/excel/XlHAlign.hpp>
@@ -29,6 +30,10 @@
#include <com/sun/star/table/XCellRange.hpp>
#include <com/sun/star/text/WritingMode.hpp>
#include <com/sun/star/util/CellProtection.hpp>
+#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+#include <com/sun/star/util/XNumberFormats.hpp>
+#include <com/sun/star/util/XNumberFormatTypes.hpp>
+#include <com/sun/star/frame/XModel.hpp>
#include <basic/sberrors.hxx>
#include <rtl/math.hxx>
@@ -39,6 +44,8 @@
#include "vbafont.hxx"
#include "vbainterior.hxx"
+#include <docsh.hxx>
+#include <document.hxx>
#include <unonames.hxx>
#include <cellsuno.hxx>
#include <scitems.hxx>
diff --git a/sc/source/ui/vba/vbaformat.hxx b/sc/source/ui/vba/vbaformat.hxx
index e89b516bcdc1..3805be38c19e 100644
--- a/sc/source/ui/vba/vbaformat.hxx
+++ b/sc/source/ui/vba/vbaformat.hxx
@@ -18,20 +18,21 @@
*/
#ifndef INCLUDED_SC_SOURCE_UI_VBA_VBAFORMAT_HXX
#define INCLUDED_SC_SOURCE_UI_VBA_VBAFORMAT_HXX
-#include <ooo/vba/excel/XFormat.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
-#include <com/sun/star/util/XNumberFormats.hpp>
-#include <com/sun/star/util/XNumberFormatTypes.hpp>
-#include <com/sun/star/frame/XModel.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+
#include <com/sun/star/lang/Locale.hpp>
-#include <com/sun/star/beans/XPropertyState.hpp>
-#include <svl/itemset.hxx>
#include <vbahelper/vbahelperinterface.hxx>
+namespace com { namespace sun { namespace star { namespace beans { class XPropertySet; } } } }
+namespace com { namespace sun { namespace star { namespace beans { class XPropertyState; } } } }
+namespace com { namespace sun { namespace star { namespace frame { class XModel; } } } }
+namespace com { namespace sun { namespace star { namespace util { class XNumberFormats; } } } }
+namespace com { namespace sun { namespace star { namespace util { class XNumberFormatsSupplier; } } } }
+namespace com { namespace sun { namespace star { namespace util { class XNumberFormatTypes; } } } }
+namespace ooo { namespace vba { namespace excel { class XFont; } } }
+namespace ooo { namespace vba { namespace excel { class XInterior; } } }
+
class ScCellRangesBase;
+class SfxItemSet;
template< typename... Ifc >
class ScVbaFormat : public InheritedHelperInterfaceWeakImpl< Ifc... >
diff --git a/sc/source/ui/vba/vbaformatconditions.hxx b/sc/source/ui/vba/vbaformatconditions.hxx
index 6e2c662a0323..3191a756975e 100644
--- a/sc/source/ui/vba/vbaformatconditions.hxx
+++ b/sc/source/ui/vba/vbaformatconditions.hxx
@@ -21,12 +21,14 @@
#define INCLUDED_SC_SOURCE_UI_VBA_VBAFORMATCONDITIONS_HXX
#include <ooo/vba/excel/XFormatConditions.hpp>
-#include <ooo/vba/excel/XStyles.hpp>
-#include <ooo/vba/excel/XRange.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/sheet/XSheetConditionalEntries.hpp>
#include <vbahelper/vbacollectionimpl.hxx>
+namespace com { namespace sun { namespace star { namespace beans { class XPropertySet; } } } }
+namespace com { namespace sun { namespace star { namespace sheet { class XSheetConditionalEntries; } } } }
+namespace ooo { namespace vba { namespace excel { class XRange; } } }
+namespace ooo { namespace vba { namespace excel { class XStyle; } } }
+namespace ooo { namespace vba { namespace excel { class XStyles; } } }
+
// This class is used only as a target for casting, it seems,
// and no objects of this type are created as such, I think.
diff --git a/sc/source/ui/vba/vbaglobals.cxx b/sc/source/ui/vba/vbaglobals.cxx
index 250173052f6a..7343471af556 100644
--- a/sc/source/ui/vba/vbaglobals.cxx
+++ b/sc/source/ui/vba/vbaglobals.cxx
@@ -23,6 +23,8 @@
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <comphelper/sequence.hxx>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/frame/XModel.hpp>
#include <cppuhelper/component_context.hxx>
#include "vbaapplication.hxx"
diff --git a/sc/source/ui/vba/vbaglobals.hxx b/sc/source/ui/vba/vbaglobals.hxx
index 700338be7282..229195c1f8b6 100644
--- a/sc/source/ui/vba/vbaglobals.hxx
+++ b/sc/source/ui/vba/vbaglobals.hxx
@@ -19,17 +19,15 @@
#ifndef SC_VBA_GLOBALS
#define SC_VBA_GLOBALS
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <ooo/vba/excel/XGlobals.hpp>
-#include <ooo/vba/excel/XApplication.hpp>
#include <cppuhelper/implbase.hxx>
-#include "excelvbahelper.hxx"
#include <vbahelper/vbaglobalbase.hxx>
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
+namespace ooo { namespace vba { namespace excel { class XApplication; } } }
+
// class ScVbaGlobals
typedef ::cppu::ImplInheritanceHelper< VbaGlobalsBase, ov::excel::XGlobals > ScVbaGlobals_BASE;
diff --git a/sc/source/ui/vba/vbahyperlink.cxx b/sc/source/ui/vba/vbahyperlink.cxx
index 6b338e478106..c2064d9b30b8 100644
--- a/sc/source/ui/vba/vbahyperlink.cxx
+++ b/sc/source/ui/vba/vbahyperlink.cxx
@@ -22,7 +22,10 @@
#include "service.hxx"
#include "vbahyperlink.hxx"
#include <vbahelper/helperdecl.hxx>
+#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/table/XCellRange.hpp>
#include <com/sun/star/text/XText.hpp>
#include <com/sun/star/text/XTextFieldsSupplier.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
diff --git a/sc/source/ui/vba/vbahyperlink.hxx b/sc/source/ui/vba/vbahyperlink.hxx
index 3e941a748541..14fe255599a2 100644
--- a/sc/source/ui/vba/vbahyperlink.hxx
+++ b/sc/source/ui/vba/vbahyperlink.hxx
@@ -21,12 +21,13 @@
#define INCLUDED_SC_SOURCE_UI_VBA_VBAHYPERLINK_HXX
#include <ooo/vba/excel/XHyperlink.hpp>
-#include <com/sun/star/table/XCell.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <ooo/vba/excel/XRange.hpp>
#include <vbahelper/vbahelperinterface.hxx>
+namespace ooo { namespace vba { namespace excel { class XRange; } } }
+namespace com { namespace sun { namespace star { namespace beans { class XPropertySet; } } } }
+namespace com { namespace sun { namespace star { namespace table { class XCell; } } } }
+
typedef InheritedHelperInterfaceWeakImpl< ov::excel::XHyperlink > HyperlinkImpl_BASE;
class ScVbaHyperlink : public HyperlinkImpl_BASE
diff --git a/sc/source/ui/vba/vbamenu.cxx b/sc/source/ui/vba/vbamenu.cxx
index d45c35e74c32..dc9c663521fd 100644
--- a/sc/source/ui/vba/vbamenu.cxx
+++ b/sc/source/ui/vba/vbamenu.cxx
@@ -9,6 +9,7 @@
#include "vbamenu.hxx"
#include "vbamenuitems.hxx"
+#include <ooo/vba/XCommandBarControls.hpp>
using namespace com::sun::star;
using namespace ooo::vba;
diff --git a/sc/source/ui/vba/vbamenubars.cxx b/sc/source/ui/vba/vbamenubars.cxx
index 3e845fb33455..50d649717bb2 100644
--- a/sc/source/ui/vba/vbamenubars.cxx
+++ b/sc/source/ui/vba/vbamenubars.cxx
@@ -10,6 +10,7 @@
#include "vbamenubar.hxx"
#include <cppuhelper/implbase.hxx>
#include <ooo/vba/excel/XlSheetType.hpp>
+#include <ooo/vba/XCommandBars.hpp>
using namespace com::sun::star;
using namespace ooo::vba;
diff --git a/sc/source/ui/vba/vbamenubars.hxx b/sc/source/ui/vba/vbamenubars.hxx
index da2017c40baf..6549786ae2b4 100644
--- a/sc/source/ui/vba/vbamenubars.hxx
+++ b/sc/source/ui/vba/vbamenubars.hxx
@@ -10,12 +10,10 @@
#define INCLUDED_SC_SOURCE_UI_VBA_VBAMENUBARS_HXX
#include <ooo/vba/excel/XMenuBars.hpp>
-#include <ooo/vba/excel/XMenuBar.hpp>
-#include <ooo/vba/XCommandBars.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
-#include <vbahelper/vbahelperinterface.hxx>
#include <vbahelper/vbacollectionimpl.hxx>
+namespace ooo { namespace vba { class XCommandBars; } }
+
typedef CollTestImplHelper< ov::excel::XMenuBars > MenuBars_BASE;
class ScVbaMenuBars : public MenuBars_BASE
diff --git a/sc/source/ui/vba/vbamenuitems.cxx b/sc/source/ui/vba/vbamenuitems.cxx
index 7edb660b4dd8..10faba0d3e29 100644
--- a/sc/source/ui/vba/vbamenuitems.cxx
+++ b/sc/source/ui/vba/vbamenuitems.cxx
@@ -11,6 +11,7 @@
#include "vbamenu.hxx"
#include <cppuhelper/implbase.hxx>
#include <ooo/vba/office/MsoControlType.hpp>
+#include <ooo/vba/XCommandBarControls.hpp>
using namespace com::sun::star;
using namespace ooo::vba;
diff --git a/sc/source/ui/vba/vbamenuitems.hxx b/sc/source/ui/vba/vbamenuitems.hxx
index 506e3a9b2b3e..45884a0669e0 100644
--- a/sc/source/ui/vba/vbamenuitems.hxx
+++ b/sc/source/ui/vba/vbamenuitems.hxx
@@ -10,11 +10,11 @@
#define INCLUDED_SC_SOURCE_UI_VBA_VBAMENUITEMS_HXX
#include <ooo/vba/excel/XMenuItems.hpp>
-#include <ooo/vba/excel/XMenuItem.hpp>
-#include <ooo/vba/XCommandBarControls.hpp>
-#include <vbahelper/vbahelperinterface.hxx>
#include <vbahelper/vbacollectionimpl.hxx>
+namespace ooo { namespace vba { class XCommandBarControls; } }
+namespace ooo { namespace vba { namespace excel { class XMenuItem; } } }
+
typedef CollTestImplHelper< ov::excel::XMenuItems > MenuItems_BASE;
class ScVbaMenuItems : public MenuItems_BASE
diff --git a/sc/source/ui/vba/vbamenus.cxx b/sc/source/ui/vba/vbamenus.cxx
index 6fb57e1cd400..ba8f07d573fd 100644
--- a/sc/source/ui/vba/vbamenus.cxx
+++ b/sc/source/ui/vba/vbamenus.cxx
@@ -10,6 +10,7 @@
#include "vbamenu.hxx"
#include <cppuhelper/implbase.hxx>
#include <ooo/vba/office/MsoControlType.hpp>
+#include <ooo/vba/XCommandBarControls.hpp>
using namespace com::sun::star;
using namespace ooo::vba;
diff --git a/sc/source/ui/vba/vbamenus.hxx b/sc/source/ui/vba/vbamenus.hxx
index 3727d7500564..2bf23e95b929 100644
--- a/sc/source/ui/vba/vbamenus.hxx
+++ b/sc/source/ui/vba/vbamenus.hxx
@@ -10,11 +10,11 @@
#define INCLUDED_SC_SOURCE_UI_VBA_VBAMENUS_HXX
#include <ooo/vba/excel/XMenus.hpp>
-#include <ooo/vba/excel/XMenu.hpp>
-#include <ooo/vba/XCommandBarControls.hpp>
-#include <vbahelper/vbahelperinterface.hxx>
#include <vbahelper/vbacollectionimpl.hxx>
+namespace ooo { namespace vba { class XCommandBarControls; } }
+namespace ooo { namespace vba { namespace excel { class XMenu; } } }
+
typedef CollTestImplHelper< ov::excel::XMenus > Menus_BASE;
class ScVbaMenus : public Menus_BASE
diff --git a/sc/source/ui/vba/vbaname.cxx b/sc/source/ui/vba/vbaname.cxx
index 874f290e51be..cd05040b4c65 100644
--- a/sc/source/ui/vba/vbaname.cxx
+++ b/sc/source/ui/vba/vbaname.cxx
@@ -22,6 +22,7 @@
#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
+#include "excelvbahelper.hxx"
#include "vbaname.hxx"
#include "vbarange.hxx"
#include "vbaglobals.hxx"
diff --git a/sc/source/ui/vba/vbaname.hxx b/sc/source/ui/vba/vbaname.hxx
index 300b836612b6..ccb0e9e06a52 100644
--- a/sc/source/ui/vba/vbaname.hxx
+++ b/sc/source/ui/vba/vbaname.hxx
@@ -20,12 +20,12 @@
#define INCLUDED_SC_SOURCE_UI_VBA_VBANAME_HXX
#include <ooo/vba/excel/XName.hpp>
-#include <com/sun/star/sheet/XNamedRange.hpp>
-#include <com/sun/star/sheet/XNamedRanges.hpp>
#include <vbahelper/vbahelperinterface.hxx>
#include <formula/grammar.hxx>
-class ScDocument;
+
+namespace com { namespace sun { namespace star { namespace sheet { class XNamedRange; } } } }
+namespace com { namespace sun { namespace star { namespace sheet { class XNamedRanges; } } } }
typedef InheritedHelperInterfaceWeakImpl< ov::excel::XName > NameImpl_BASE;
diff --git a/sc/source/ui/vba/vbanames.cxx b/sc/source/ui/vba/vbanames.cxx
index 16a56fd943be..1ad4f824ec3c 100644
--- a/sc/source/ui/vba/vbanames.cxx
+++ b/sc/source/ui/vba/vbanames.cxx
@@ -20,7 +20,10 @@
#include <com/sun/star/table/XCellRange.hpp>
#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
+#include <com/sun/star/sheet/XNamedRange.hpp>
+#include <com/sun/star/sheet/XNamedRanges.hpp>
+#include "excelvbahelper.hxx"
#include "vbanames.hxx"
#include "vbaname.hxx"
#include "vbarange.hxx"
diff --git a/sc/source/ui/vba/vbanames.hxx b/sc/source/ui/vba/vbanames.hxx
index c44f00a5b3c2..bfa1f77ca89f 100644
--- a/sc/source/ui/vba/vbanames.hxx
+++ b/sc/source/ui/vba/vbanames.hxx
@@ -20,13 +20,11 @@
#define INCLUDED_SC_SOURCE_UI_VBA_VBANAMES_HXX
#include <ooo/vba/excel/XNames.hpp>
-#include <ooo/vba/XCollection.hpp>
-#include <com/sun/star/container/XEnumerationAccess.hpp>
-#include <com/sun/star/sheet/XNamedRanges.hpp>
#include <vbahelper/vbacollectionimpl.hxx>
+namespace com { namespace sun { namespace star { namespace sheet { class XNamedRanges; } } } }
+
class ScDocument;
-class ScDocShell;
typedef CollTestImplHelper< ov::excel::XNames > ScVbaNames_BASE;
diff --git a/sc/source/ui/vba/vbaoleobject.cxx b/sc/source/ui/vba/vbaoleobject.cxx
index 87f78dd33503..9510d6b0485c 100644
--- a/sc/source/ui/vba/vbaoleobject.cxx
+++ b/sc/source/ui/vba/vbaoleobject.cxx
@@ -22,6 +22,7 @@
#include <com/sun/star/view/XControlAccess.hpp>
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <ooo/vba/XControlProvider.hpp>
#include "vbaoleobject.hxx"
diff --git a/sc/source/ui/vba/vbaoleobjects.hxx b/sc/source/ui/vba/vbaoleobjects.hxx
index 3ffc0a31621b..761bbddbd24b 100644
--- a/sc/source/ui/vba/vbaoleobjects.hxx
+++ b/sc/source/ui/vba/vbaoleobjects.hxx
@@ -22,7 +22,6 @@
#include <ooo/vba/excel/XOLEObjects.hpp>
#include <vbahelper/vbacollectionimpl.hxx>
-#include "excelvbahelper.hxx"
typedef CollTestImplHelper< ov::excel::XOLEObjects > OLEObjectsImpl_BASE;
diff --git a/sc/source/ui/vba/vbaoutline.cxx b/sc/source/ui/vba/vbaoutline.cxx
index 1710db41904b..d9601e1be874 100644
--- a/sc/source/ui/vba/vbaoutline.cxx
+++ b/sc/source/ui/vba/vbaoutline.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "vbaoutline.hxx"
+#include <com/sun/star/sheet/XSheetOutline.hpp>
+
using namespace ::com::sun::star;
using namespace ::ooo::vba;
diff --git a/sc/source/ui/vba/vbaoutline.hxx b/sc/source/ui/vba/vbaoutline.hxx
index fa38211daaa2..24d52ff18121 100644
--- a/sc/source/ui/vba/vbaoutline.hxx
+++ b/sc/source/ui/vba/vbaoutline.hxx
@@ -19,11 +19,12 @@
#ifndef INCLUDED_SC_SOURCE_UI_VBA_VBAOUTLINE_HXX
#define INCLUDED_SC_SOURCE_UI_VBA_VBAOUTLINE_HXX
-#include <com/sun/star/sheet/XSheetOutline.hpp>
#include <ooo/vba/excel/XOutline.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <vbahelper/vbahelperinterface.hxx>
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
+namespace com { namespace sun { namespace star { namespace sheet { class XSheetOutline; } } } }
+
typedef InheritedHelperInterfaceWeakImpl< ov::excel::XOutline > ScVbaOutline_BASE;
class ScVbaOutline : public ScVbaOutline_BASE
diff --git a/sc/source/ui/vba/vbapagebreak.cxx b/sc/source/ui/vba/vbapagebreak.cxx
index 0ad41e1a2caa..ba8f7549d8bd 100644
--- a/sc/source/ui/vba/vbapagebreak.cxx
+++ b/sc/source/ui/vba/vbapagebreak.cxx
@@ -20,6 +20,9 @@
#include "vbarange.hxx"
#include <basic/sberrors.hxx>
#include <ooo/vba/excel/XlPageBreak.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/table/XCellRange.hpp>
+
using namespace ::com::sun::star;
using namespace ::ooo::vba;
diff --git a/sc/source/ui/vba/vbapagebreak.hxx b/sc/source/ui/vba/vbapagebreak.hxx
index c85fd303db0e..a5958e66e420 100644
--- a/sc/source/ui/vba/vbapagebreak.hxx
+++ b/sc/source/ui/vba/vbapagebreak.hxx
@@ -19,15 +19,15 @@
#ifndef INCLUDED_SC_SOURCE_UI_VBA_VBAPAGEBREAK_HXX
#define INCLUDED_SC_SOURCE_UI_VBA_VBAPAGEBREAK_HXX
-#include <ooo/vba/excel/XPageBreak.hpp>
#include <ooo/vba/excel/XHPageBreak.hpp>
#include <ooo/vba/excel/XVPageBreak.hpp>
-#include <ooo/vba/excel/XRange.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/sheet/TablePageBreakData.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
#include <vbahelper/vbahelperinterface.hxx>
+namespace com { namespace sun { namespace star { namespace beans { class XPropertySet; } } } }
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
+namespace ooo { namespace vba { namespace excel { class XRange; } } }
+
template< typename... Ifc >
class ScVbaPageBreak : public InheritedHelperInterfaceWeakImpl< Ifc... >
{
diff --git a/sc/source/ui/vba/vbapagebreaks.cxx b/sc/source/ui/vba/vbapagebreaks.cxx
index 027b40fa2731..6260d4a1ab0e 100644
--- a/sc/source/ui/vba/vbapagebreaks.cxx
+++ b/sc/source/ui/vba/vbapagebreaks.cxx
@@ -21,6 +21,11 @@
#include <basic/sberrors.hxx>
#include <cppuhelper/implbase.hxx>
#include <ooo/vba/excel/XWorksheet.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/sheet/XSheetPageBreak.hpp>
+#include <com/sun/star/table/XColumnRowRange.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+
using namespace ::com::sun::star;
using namespace ::ooo::vba;
diff --git a/sc/source/ui/vba/vbapagebreaks.hxx b/sc/source/ui/vba/vbapagebreaks.hxx
index eabb12200fb2..3f0c05426868 100644
--- a/sc/source/ui/vba/vbapagebreaks.hxx
+++ b/sc/source/ui/vba/vbapagebreaks.hxx
@@ -20,19 +20,12 @@
#define INCLUDED_SC_SOURCE_UI_VBA_VBAPAGEBREAKS_HXX
#include <ooo/vba/excel/XHPageBreaks.hpp>
-#include <ooo/vba/excel/XHPageBreak.hpp>
#include <ooo/vba/excel/XVPageBreaks.hpp>
-#include <ooo/vba/excel/XVPageBreak.hpp>
-#include <ooo/vba/excel/XRange.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/sheet/XSheetPageBreak.hpp>
-#include <com/sun/star/sheet/TablePageBreakData.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/container/XIndexAccess.hpp>
-#include <com/sun/star/table/XColumnRowRange.hpp>
-#include <vbahelper/vbahelperinterface.hxx>
#include <vbahelper/vbacollectionimpl.hxx>
+namespace com { namespace sun { namespace star { namespace sheet { class XSheetPageBreak; } } } }
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
+
typedef CollTestImplHelper< ov::excel::XHPageBreaks > ScVbaHPageBreaks_BASE;
class ScVbaHPageBreaks : public ScVbaHPageBreaks_BASE
diff --git a/sc/source/ui/vba/vbapagesetup.cxx b/sc/source/ui/vba/vbapagesetup.cxx
index bec8c378b264..8105a4359715 100644
--- a/sc/source/ui/vba/vbapagesetup.cxx
+++ b/sc/source/ui/vba/vbapagesetup.cxx
@@ -20,6 +20,7 @@
#include <cellsuno.hxx>
#include <convuno.hxx>
#include <rangelst.hxx>
+#include <docsh.hxx>
#include "excelvbahelper.hxx"
#include "vbarange.hxx"
#include <com/sun/star/sheet/XPrintAreas.hpp>
@@ -30,6 +31,7 @@
#include <ooo/vba/excel/XlPageOrientation.hpp>
#include <ooo/vba/excel/XlOrder.hpp>
#include <ooo/vba/excel/Constants.hpp>
+#include <ooo/vba/excel/XRange.hpp>
#include <basic/sberrors.hxx>
#include <i18nutil/paper.hxx>
#include <sal/macros.h>
diff --git a/sc/source/ui/vba/vbapalette.cxx b/sc/source/ui/vba/vbapalette.cxx
index de7f0aaf3319..36b658a2e596 100644
--- a/sc/source/ui/vba/vbapalette.cxx
+++ b/sc/source/ui/vba/vbapalette.cxx
@@ -21,6 +21,8 @@
#include <sal/macros.h>
#include <cppuhelper/implbase.hxx>
+#include <sfx2/objsh.hxx>
+#include <docsh.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
diff --git a/sc/source/ui/vba/vbapalette.hxx b/sc/source/ui/vba/vbapalette.hxx
index bb76ee8e9f75..c556578a3955 100644
--- a/sc/source/ui/vba/vbapalette.hxx
+++ b/sc/source/ui/vba/vbapalette.hxx
@@ -20,7 +20,7 @@
#ifndef INCLUDED_SC_SOURCE_UI_VBA_VBAPALETTE_HXX
#define INCLUDED_SC_SOURCE_UI_VBA_VBAPALETTE_HXX
-#include <vbahelper/vbahelper.hxx>
+#include <com/sun/star/uno/Reference.hxx>
namespace com { namespace sun { namespace star {
namespace container { class XIndexAccess; }
diff --git a/sc/source/ui/vba/vbapane.cxx b/sc/source/ui/vba/vbapane.cxx
index 5abb35c853be..88f523bfbde5 100644
--- a/sc/source/ui/vba/vbapane.cxx
+++ b/sc/source/ui/vba/vbapane.cxx
@@ -18,6 +18,7 @@
*/
#include "vbapane.hxx"
+#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/sheet/XSpreadsheet.hpp>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/table/CellRangeAddress.hpp>
diff --git a/sc/source/ui/vba/vbapivottables.hxx b/sc/source/ui/vba/vbapivottables.hxx
index 5b95d9724472..8904e9d4e47d 100644
--- a/sc/source/ui/vba/vbapivottables.hxx
+++ b/sc/source/ui/vba/vbapivottables.hxx
@@ -20,13 +20,11 @@
#define INCLUDED_SC_SOURCE_UI_VBA_VBAPIVOTTABLES_HXX
#include <ooo/vba/excel/XPivotTables.hpp>
-#include <com/sun/star/container/XEnumerationAccess.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include "excelvbahelper.hxx"
-#include <vbahelper/vbahelperinterface.hxx>
#include <vbahelper/vbacollectionimpl.hxx>
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
+
typedef CollTestImplHelper< ov::excel::XPivotTables > ScVbaPivotTables_BASE;
class ScVbaPivotTables : public ScVbaPivotTables_BASE
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 84d5dba6f258..b9a648c79b76 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -51,6 +51,7 @@
#include <com/sun/star/sheet/XSheetCellCursor.hpp>
#include <com/sun/star/sheet/XArrayFormulaRange.hpp>
#include <com/sun/star/sheet/XNamedRange.hpp>
+#include <com/sun/star/sheet/XNamedRanges.hpp>
#include <com/sun/star/sheet/XPrintAreas.hpp>
#include <com/sun/star/sheet/XCellRangesQuery.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -137,6 +138,7 @@
#include <sc.hrc>
#include <unonames.hxx>
+#include "excelvbahelper.hxx"
#include "service.hxx"
#include "vbaapplication.hxx"
#include "vbafont.hxx"
diff --git a/sc/source/ui/vba/vbarange.hxx b/sc/source/ui/vba/vbarange.hxx
index 52ec4ac70e3e..dc2a33e8e07e 100644
--- a/sc/source/ui/vba/vbarange.hxx
+++ b/sc/source/ui/vba/vbarange.hxx
@@ -19,36 +19,31 @@
#ifndef INCLUDED_SC_SOURCE_UI_VBA_VBARANGE_HXX
#define INCLUDED_SC_SOURCE_UI_VBA_VBARANGE_HXX
-#include <com/sun/star/container/XEnumerationAccess.hpp>
-
#include <ooo/vba/excel/XRange.hpp>
-#include <com/sun/star/table/XCellRange.hpp>
-#include <ooo/vba/excel/XFont.hpp>
-#include <ooo/vba/excel/XComment.hpp>
-#include <ooo/vba/XCollection.hpp>
-#include <ooo/vba/excel/XlPasteType.hpp>
-#include <ooo/vba/excel/XlPasteSpecialOperation.hpp>
#include <com/sun/star/awt/Point.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/sheet/FillDateMode.hpp>
#include <com/sun/star/sheet/FillMode.hpp>
#include <com/sun/star/sheet/FillDirection.hpp>
-#include <com/sun/star/sheet/XSpreadsheet.hpp>
-#include <com/sun/star/sheet/XSheetCellRangeContainer.hpp>
#include "vbaformat.hxx"
#include <address.hxx>
#include <formula/grammar.hxx>
-#include <svl/itemset.hxx>
+namespace com { namespace sun { namespace star { namespace sheet { class XSheetCellRangeContainer; } } } }
+namespace com { namespace sun { namespace star { namespace table { class XCell; } } } }
+namespace com { namespace sun { namespace star { namespace table { class XCellRange; } } } }
+namespace com { namespace sun { namespace star { namespace table { struct CellRangeAddress; } } } }
+namespace ooo { namespace vba { class XCollection; } }
+namespace ooo { namespace vba { namespace excel { class XComment; } } }
+namespace ooo { namespace vba { namespace excel { class XFont; } } }
+
+class SfxItemSet;
class ScCellRangesBase;
class ScCellRangeObj;
class ScDocShell;
class ScDocument;
class ScRangeList;
-class ScRange;
typedef ScVbaFormat< ov::excel::XRange > ScVbaRange_BASE;
diff --git a/sc/source/ui/vba/vbastyle.cxx b/sc/source/ui/vba/vbastyle.cxx
index 0493dc976915..690b731372e7 100644
--- a/sc/source/ui/vba/vbastyle.cxx
+++ b/sc/source/ui/vba/vbastyle.cxx
@@ -20,6 +20,7 @@
#include "vbastyle.hxx"
#include <basic/sberrors.hxx>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
using namespace ::ooo::vba;
using namespace ::com::sun::star;
diff --git a/sc/source/ui/vba/vbastyles.cxx b/sc/source/ui/vba/vbastyles.cxx
index 8668119b6fa8..fd56dfc88813 100644
--- a/sc/source/ui/vba/vbastyles.cxx
+++ b/sc/source/ui/vba/vbastyles.cxx
@@ -21,6 +21,8 @@
#include <basic/sberrors.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <ooo/vba/excel/XRange.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
using namespace ::ooo::vba;
using namespace ::com::sun::star;
diff --git a/sc/source/ui/vba/vbastyles.hxx b/sc/source/ui/vba/vbastyles.hxx
index 39ac51ea3de9..b6c7d737252e 100644
--- a/sc/source/ui/vba/vbastyles.hxx
+++ b/sc/source/ui/vba/vbastyles.hxx
@@ -19,10 +19,11 @@
#ifndef INCLUDED_SC_SOURCE_UI_VBA_VBASTYLES_HXX
#define INCLUDED_SC_SOURCE_UI_VBA_VBASTYLES_HXX
#include <ooo/vba/excel/XStyles.hpp>
-#include <com/sun/star/container/XNameContainer.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <vbahelper/vbacollectionimpl.hxx>
+namespace com { namespace sun { namespace star { namespace lang { class XMultiServiceFactory; } } } }
+namespace com { namespace sun { namespace star { namespace container { class XNameContainer; } } } }
+
typedef CollTestImplHelper< ov::excel::XStyles > ScVbaStyles_BASE;
class ScVbaStyles: public ScVbaStyles_BASE
{
diff --git a/sc/source/ui/vba/vbatextboxshape.cxx b/sc/source/ui/vba/vbatextboxshape.cxx
index 1e141f4ffab0..d67c8acb33e9 100644
--- a/sc/source/ui/vba/vbatextboxshape.cxx
+++ b/sc/source/ui/vba/vbatextboxshape.cxx
@@ -20,6 +20,7 @@
#include "vbatextboxshape.hxx"
#include "vbacharacters.hxx"
#include <com/sun/star/text/XSimpleText.hpp>
+#include <docsh.hxx>
#include <vector>
using namespace com::sun::star;
diff --git a/sc/source/ui/vba/vbatitle.hxx b/sc/source/ui/vba/vbatitle.hxx
index 240fa21bd9e6..b672a10cb15d 100644
--- a/sc/source/ui/vba/vbatitle.hxx
+++ b/sc/source/ui/vba/vbatitle.hxx
@@ -20,17 +20,15 @@
#define INCLUDED_SC_SOURCE_UI_VBA_VBATITLE_HXX
#include <vbahelper/vbahelperinterface.hxx>
-#include "excelvbahelper.hxx"
#include "vbainterior.hxx"
#include "vbafont.hxx"
#include "vbapalette.hxx"
-#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <ooo/vba/excel/XTitle.hpp>
-#include <ooo/vba/excel/XCharacters.hpp>
#include <basic/sberrors.hxx>
#include <memory>
+namespace com { namespace sun { namespace star { namespace drawing { class XShape; } } } }
+
template< typename... Ifc >
class TitleImpl : public InheritedHelperInterfaceImpl< Ifc... >
{
diff --git a/sc/source/ui/vba/vbavalidation.hxx b/sc/source/ui/vba/vbavalidation.hxx
index b253386dfdca..e23232f1165f 100644
--- a/sc/source/ui/vba/vbavalidation.hxx
+++ b/sc/source/ui/vba/vbavalidation.hxx
@@ -18,11 +18,13 @@
*/
#ifndef INCLUDED_SC_SOURCE_UI_VBA_VBAVALIDATION_HXX
#define INCLUDED_SC_SOURCE_UI_VBA_VBAVALIDATION_HXX
-#include <com/sun/star/uno/XComponentContext.hpp>
+
#include <ooo/vba/excel/XValidation.hpp>
-#include <com/sun/star/table/XCellRange.hpp>
#include <vbahelper/vbahelperinterface.hxx>
+namespace com { namespace sun { namespace star { namespace table { class XCellRange; } } } }
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
+
typedef InheritedHelperInterfaceWeakImpl<ov::excel::XValidation > ValidationImpl_BASE;
class ScVbaValidation : public ValidationImpl_BASE
diff --git a/sc/source/ui/vba/vbawindows.cxx b/sc/source/ui/vba/vbawindows.cxx
index ccd48331becd..00c3010b0dc4 100644
--- a/sc/source/ui/vba/vbawindows.cxx
+++ b/sc/source/ui/vba/vbawindows.cxx
@@ -23,6 +23,7 @@
#include <com/sun/star/frame/Desktop.hpp>
#include <cppuhelper/implbase.hxx>
#include <comphelper/sequence.hxx>
+#include <rtl/ref.hxx>
#include "vbawindow.hxx"
#include "vbaglobals.hxx"
diff --git a/sc/source/ui/vba/vbawindows.hxx b/sc/source/ui/vba/vbawindows.hxx
index 3e9867db4006..27df5924655d 100644
--- a/sc/source/ui/vba/vbawindows.hxx
+++ b/sc/source/ui/vba/vbawindows.hxx
@@ -21,11 +21,10 @@
#include <ooo/vba/excel/XWindows.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-
-#include "excelvbahelper.hxx"
#include <vbahelper/vbacollectionimpl.hxx>
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
+
typedef CollTestImplHelper< ov::excel::XWindows > ScVbaWindows_BASE;
class ScVbaWindows : public ScVbaWindows_BASE
diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx
index d2d500f56c77..6793bf70bc66 100644
--- a/sc/source/ui/vba/vbaworkbook.cxx
+++ b/sc/source/ui/vba/vbaworkbook.cxx
@@ -44,6 +44,7 @@
#include <nameuno.hxx>
#include <docoptio.hxx>
#include <unonames.hxx>
+#include <docsh.hxx>
// Much of the impl. for the equivalent UNO module is
// sc/source/ui/unoobj/docuno.cxx, viewuno.cxx
diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx
index 2fe1cebccf43..eeb58a8ec9bc 100644
--- a/sc/source/ui/vba/vbaworkbooks.cxx
+++ b/sc/source/ui/vba/vbaworkbooks.cxx
@@ -25,12 +25,14 @@
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/beans/PropertyVetoException.hpp>
#include <com/sun/star/util/XCloseable.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/document/XTypeDetection.hpp>
#include <sfx2/objsh.hxx>
#include <tools/urlobj.hxx>
+#include "excelvbahelper.hxx"
#include "vbaglobals.hxx"
#include "vbaworkbook.hxx"
#include "vbaworkbooks.hxx"
diff --git a/sc/source/ui/vba/vbaworkbooks.hxx b/sc/source/ui/vba/vbaworkbooks.hxx
index c9825d51e039..4191df49ce9a 100644
--- a/sc/source/ui/vba/vbaworkbooks.hxx
+++ b/sc/source/ui/vba/vbaworkbooks.hxx
@@ -20,11 +20,8 @@
#define INCLUDED_SC_SOURCE_UI_VBA_VBAWORKBOOKS_HXX
#include <cppuhelper/implbase.hxx>
-#include <vbahelper/vbacollectionimpl.hxx>
#include <ooo/vba/excel/XWorkbooks.hpp>
-#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <vbahelper/vbadocumentsbase.hxx>
-#include "excelvbahelper.hxx"
typedef cppu::ImplInheritanceHelper< VbaDocumentsBase, ov::excel::XWorkbooks > ScVbaWorkbooks_BASE;
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index d1ac2dcbdd5b..a4b1d184b5a2 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -53,6 +53,7 @@
#include <com/sun/star/drawing/XControlShape.hpp>
#include <com/sun/star/form/FormComponentType.hpp>
#include <com/sun/star/form/XFormsSupplier.hpp>
+#include <ooo/vba/excel/XApplication.hpp>
#include <ooo/vba/excel/XlEnableSelection.hpp>
#include <ooo/vba/excel/XlSheetVisibility.hpp>
#include <ooo/vba/excel/XWorkbook.hpp>
@@ -76,6 +77,7 @@
#include <drwlayer.hxx>
#include <tabprotection.hxx>
#include <scextopt.hxx>
+#include "excelvbahelper.hxx"
#include "service.hxx"
#include "vbaoutline.hxx"
#include "vbarange.hxx"
diff --git a/sc/source/ui/vba/vbaworksheet.hxx b/sc/source/ui/vba/vbaworksheet.hxx
index af93e41d350e..b3e6532c132d 100644
--- a/sc/source/ui/vba/vbaworksheet.hxx
+++ b/sc/source/ui/vba/vbaworksheet.hxx
@@ -19,22 +19,18 @@
#ifndef INCLUDED_SC_SOURCE_UI_VBA_VBAWORKSHEET_HXX
#define INCLUDED_SC_SOURCE_UI_VBA_VBAWORKSHEET_HXX
-#include <com/sun/star/sheet/XSpreadsheet.hpp>
#include <ooo/vba/excel/XWorksheet.hpp>
-#include <ooo/vba/excel/XComments.hpp>
-#include <ooo/vba/excel/XRange.hpp>
-#include <com/sun/star/lang/XEventListener.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/frame/XModel.hpp>
-#include <ooo/vba/excel/XOutline.hpp>
-#include <ooo/vba/excel/XPageSetup.hpp>
-#include <ooo/vba/excel/XHPageBreaks.hpp>
-#include <ooo/vba/excel/XVPageBreaks.hpp>
-#include <com/sun/star/container/XNamed.hpp>
#include <rtl/ref.hxx>
#include <vbahelper/vbahelperinterface.hxx>
-#include <address.hxx>
+#include <types.hxx>
+
+namespace com { namespace sun { namespace star { namespace frame { class XModel; } } } }
+namespace com { namespace sun { namespace star { namespace sheet { class XSpreadsheet; } } } }
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
+namespace ooo { namespace vba { namespace excel { class XOutline; } } }
+namespace ooo { namespace vba { namespace excel { class XPageSetup; } } }
+namespace ooo { namespace vba { namespace excel { class XRange; } } }
namespace ooo { namespace vba { namespace excel {
class XChartObjects;
diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx
index ee287c4ba892..63f790afba87 100644
--- a/sc/source/ui/vba/vbaworksheets.cxx
+++ b/sc/source/ui/vba/vbaworksheets.cxx
@@ -39,6 +39,7 @@
#include <ooo/vba/excel/XApplication.hpp>
#include <tabvwsh.hxx>
+#include "excelvbahelper.hxx"
#include "vbaglobals.hxx"
#include "vbaworksheet.hxx"
#include "vbaworkbook.hxx"
diff --git a/sc/source/ui/vba/vbaworksheets.hxx b/sc/source/ui/vba/vbaworksheets.hxx
index 834616f91644..05f37867dbf3 100644
--- a/sc/source/ui/vba/vbaworksheets.hxx
+++ b/sc/source/ui/vba/vbaworksheets.hxx
@@ -20,14 +20,15 @@
#define INCLUDED_SC_SOURCE_UI_VBA_VBAWORKSHEETS_HXX
#include <ooo/vba/excel/XWorksheets.hpp>
-#include <com/sun/star/sheet/XSpreadsheets.hpp>
-#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
-#include <com/sun/star/container/XEnumerationAccess.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <vbahelper/vbacollectionimpl.hxx>
-#include <address.hxx>
+#include <types.hxx>
+
+namespace com { namespace sun { namespace star { namespace container { class XEnumerationAccess; } } } }
+namespace com { namespace sun { namespace star { namespace sheet { class XSpreadsheetDocument; } } } }
+namespace com { namespace sun { namespace star { namespace sheet { class XSpreadsheets; } } } }
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
typedef CollTestImplHelper< ov::excel::XWorksheets > ScVbaWorksheets_BASE;
diff --git a/sc/source/ui/vba/vbawsfunction.cxx b/sc/source/ui/vba/vbawsfunction.cxx
index 6ed142c0fde8..a7fbd65c16da 100644
--- a/sc/source/ui/vba/vbawsfunction.cxx
+++ b/sc/source/ui/vba/vbawsfunction.cxx
@@ -18,6 +18,7 @@
*/
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/table/XCell.hpp>
+#include <com/sun/star/table/XCellRange.hpp>
#include <com/sun/star/table/XColumnRowRange.hpp>
#include <com/sun/star/beans/XIntrospection.hpp>
#include <com/sun/star/beans/XIntrospectionAccess.hpp>