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>
diff --git a/sc/IwyuFilter_sc.yaml b/sc/IwyuFilter_sc.yaml
index fbc77d9..8aeb6a6 100644
--- a/sc/IwyuFilter_sc.yaml
+++ b/sc/IwyuFilter_sc.yaml
@@ -499,6 +499,135 @@
    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 797d6de..bcf0fa6 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 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 ae21185..249249d 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 a799301..7af495c 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 fef9955..87b30a1 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 8d45579..2baae9d 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 9df3f424..47c5073 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 c4d403f..296ec9d 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 a288f1a3..3e41326 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 399ff9a..26217fe 100644
--- a/sc/source/ui/sidebar/CellLineStyleControl.hxx
+++ b/sc/source/ui/sidebar/CellLineStyleControl.hxx
@@ -27,8 +27,6 @@

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 b01a9e1..2e45622 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 8170585..ea5d28d 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 6dd779d..325500b 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 5444dfe..9d8d5f5 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 c65f26e..0ac76f7 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 0d9e3e7..c60ed23 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 dab31ff..32909a04 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 cc42ae0..b7db127 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 b96821b..e756fe3 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 002f2b6..8ae36b2 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 0a318de..8413f0c 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 0375aed..6f502c8 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 6c9c585..cf7e28f 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 25eb414..ef96193 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 b0d8fa8..069bc59 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 cb16b69..422ae23 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 6128433..dc94a03 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 fa76994..27605af 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 c6311eb..cc48bd4 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 8eed492..bca84c2 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 915df9d..1d1878e 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 dac9a04..0370a45 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 5841df0..02c5f9c 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 a45ae2a..9f5cb15 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 274be09..4966e7e 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 346905a..0128320 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 f36fa59..e2d60bb 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 c9e9c65..6308969 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 5225cb7..61b9bbc 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 5da129c..7e85b8f 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 00b3f2b..ad5ecdb 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 f35a227..0596e64 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 47ba90a..f0e2977 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 c22bfb4..3568411 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 5b7e923..4eac5d4 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 cc83083..2061633 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 e89b516..3805be3 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 6e2c662..3191a75 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 2501730..7343471 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 700338b..229195c 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 6b338e4..c2064d9 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 3e941a7..14fe255 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 d45c35e..dc9c663 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 3e845fb..50d6497 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 da2017c..6549786a 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 7edb660..10faba0 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 506e3a9..45884a0 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 6fb57e1..ba8f07d 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 3727d75..2bf23e9 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 874f290..cd05040 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 300b836..ccb0e9e 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 16a56fd..1ad4f82 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 c44f00a..bfa1f77 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 87f78dd..9510d6b 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 3ffc0a3..761bbdd 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 1710db4..d9601e1 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 fa38211..24d52ff 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 0ad41e1..ba8f754 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 c85fd30..a5958e6 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 027b40f..6260d4a 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 eabb122..3f0c054 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 bec8c37..8105a43 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 de7f0aa..36b658a 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 bb76ee8..c556578 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 5abb35c..88f523b 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 5b95d97..8904e9d 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 84d5dba..b9a648c 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 52ec4ac..dc2a33e 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 0493dc9..690b731 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 8668119..fd56dfc 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 39ac51e..b6c7d73 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 1e141f4..d67c8ac 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 240fa21..b672a10 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 b253386..e23232f 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 ccd4833..00c3010 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 3e9867d..27df592 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 d2d500f..6793bf7 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 2fe1ceb..eeb58a8 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 c9825d5..4191df4 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 d1ac2dcb..a4b1d18 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 af93e41..b3e6532 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 ee287c4..63f790af 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 834616f..05f3786 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 6ed142c..a7fbd65 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>