summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/IwyuFilter_sc.yaml18
-rw-r--r--sc/source/ui/vba/excelvbahelper.cxx1
-rw-r--r--sc/source/ui/vba/service.cxx2
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx15
-rw-r--r--sc/source/ui/vba/vbaassistant.cxx2
-rw-r--r--sc/source/ui/vba/vbaaxes.cxx1
-rw-r--r--sc/source/ui/vba/vbacharacters.cxx1
-rw-r--r--sc/source/ui/vba/vbachart.cxx1
-rw-r--r--sc/source/ui/vba/vbachart.hxx2
-rw-r--r--sc/source/ui/vba/vbachartobject.cxx1
-rw-r--r--sc/source/ui/vba/vbachartobjects.cxx5
-rw-r--r--sc/source/ui/vba/vbacomment.cxx6
-rw-r--r--sc/source/ui/vba/vbacomment.hxx1
-rw-r--r--sc/source/ui/vba/vbacomments.cxx2
-rw-r--r--sc/source/ui/vba/vbacondition.cxx1
-rw-r--r--sc/source/ui/vba/vbafiledialog.cxx1
-rw-r--r--sc/source/ui/vba/vbafiledialogitems.cxx2
-rw-r--r--sc/source/ui/vba/vbafont.cxx9
-rw-r--r--sc/source/ui/vba/vbaformat.cxx2
-rw-r--r--sc/source/ui/vba/vbaformatconditions.cxx3
-rw-r--r--sc/source/ui/vba/vbaglobals.cxx8
-rw-r--r--sc/source/ui/vba/vbahyperlink.cxx1
-rw-r--r--sc/source/ui/vba/vbainterior.cxx10
-rw-r--r--sc/source/ui/vba/vbaname.cxx10
-rw-r--r--sc/source/ui/vba/vbanames.cxx3
-rw-r--r--sc/source/ui/vba/vbaoleobject.cxx8
-rw-r--r--sc/source/ui/vba/vbaoleobjects.cxx1
-rw-r--r--sc/source/ui/vba/vbapagesetup.cxx6
-rw-r--r--sc/source/ui/vba/vbapagesetup.hxx3
-rw-r--r--sc/source/ui/vba/vbapane.hxx4
-rw-r--r--sc/source/ui/vba/vbapivottable.hxx1
-rw-r--r--sc/source/ui/vba/vbarange.cxx27
-rw-r--r--sc/source/ui/vba/vbasheetobject.cxx4
-rw-r--r--sc/source/ui/vba/vbatextboxshape.cxx2
-rw-r--r--sc/source/ui/vba/vbatextboxshape.hxx2
-rw-r--r--sc/source/ui/vba/vbatextframe.cxx4
-rw-r--r--sc/source/ui/vba/vbatextframe.hxx1
-rw-r--r--sc/source/ui/vba/vbavalidation.cxx1
-rw-r--r--sc/source/ui/vba/vbawindow.cxx10
-rw-r--r--sc/source/ui/vba/vbawindow.hxx5
-rw-r--r--sc/source/ui/vba/vbawindows.cxx2
-rw-r--r--sc/source/ui/vba/vbaworkbook.cxx6
-rw-r--r--sc/source/ui/vba/vbaworkbook.hxx1
-rw-r--r--sc/source/ui/vba/vbaworkbooks.cxx9
-rw-r--r--sc/source/ui/vba/vbaworksheet.cxx19
-rw-r--r--sc/source/ui/vba/vbaworksheets.cxx12
-rw-r--r--sc/source/ui/vba/vbawsfunction.cxx9
-rw-r--r--sc/source/ui/vba/vbawsfunction.hxx4
48 files changed, 44 insertions, 205 deletions
diff --git a/sc/IwyuFilter_sc.yaml b/sc/IwyuFilter_sc.yaml
index 9b2bf6629b06..7914de9251cd 100644
--- a/sc/IwyuFilter_sc.yaml
+++ b/sc/IwyuFilter_sc.yaml
@@ -580,6 +580,9 @@ blacklist:
# base class has to be a complete type
- ooo/vba/excel/XFont.hpp
- vbahelper/vbafontbase.hxx
+ sc/source/ui/vba/vbaformat.cxx:
+ # Needed for variable initialization
+ - docsh.hxx
sc/source/ui/vba/vbaformatconditions.hxx:
# base class has to be a complete type
- ooo/vba/excel/XFormatConditions.hpp
@@ -628,6 +631,9 @@ blacklist:
sc/source/ui/vba/vbarange.hxx:
# base class has to be a complete type
- ooo/vba/excel/XRange.hpp
+ sc/source/ui/vba/vbarange.cxx:
+ # Needed for linker visibility of range::serviceDecl
+ - service.hxx
sc/source/ui/vba/vbasheetobjects.hxx:
# base class has to be a complete type
- ooo/vba/excel/XGraphicObjects.hpp
@@ -644,9 +650,21 @@ blacklist:
sc/source/ui/vba/vbawindows.hxx:
# base class has to be a complete type
- ooo/vba/excel/XWindows.hpp
+ sc/source/ui/vba/vbawindow.cxx:
+ # Needed for linker visibility of window::serviceDecl
+ - service.hxx
+ sc/source/ui/vba/vbaworkbook.cxx:
+ # Needed for linker visibility of workbook::serviceDecl
+ - service.hxx
+ sc/source/ui/vba/vbaworkbooks.cxx:
+ # Needed for linker visibility of worksheet::serviceDecl
+ - service.hxx
sc/source/ui/vba/vbaworksheet.hxx:
# base class has to be a complete type
- ooo/vba/excel/XWorksheet.hpp
+ sc/source/ui/vba/vbaworksheet.cxx:
+ # Needed for linker visibility of workbook::serviceDecl
+ - service.hxx
sc/source/ui/vba/vbaworksheets.hxx:
# base class has to be a complete type
- ooo/vba/excel/XWorksheets.hpp
diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx
index 4528c7fa8013..3a1e025bd717 100644
--- a/sc/source/ui/vba/excelvbahelper.cxx
+++ b/sc/source/ui/vba/excelvbahelper.cxx
@@ -33,7 +33,6 @@
#include <docuno.hxx>
#include <tabvwsh.hxx>
#include <transobj.hxx>
-#include <scmod.hxx>
#include <cellsuno.hxx>
#include <gridwin.hxx>
diff --git a/sc/source/ui/vba/service.cxx b/sc/source/ui/vba/service.cxx
index 562a6b3e0c1d..9ff35e3a70a9 100644
--- a/sc/source/ui/vba/service.cxx
+++ b/sc/source/ui/vba/service.cxx
@@ -16,7 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <cppuhelper/implementationentry.hxx>
+
#include <comphelper/servicedecl.hxx>
#include "service.hxx"
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index f9ee9813d2e6..002e09282485 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -22,16 +22,13 @@
#include <com/sun/star/script/BasicErrorException.hpp>
#include <com/sun/star/sheet/XCalculatable.hpp>
#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
-#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
#include <com/sun/star/sheet/XNamedRanges.hpp>
#include <com/sun/star/sheet/XSpreadsheetView.hpp>
-#include <com/sun/star/sheet/XSpreadsheets.hpp>
#include <com/sun/star/task/XStatusIndicatorSupplier.hpp>
#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>
#include <ooo/vba/excel/XlMousePointer.hpp>
@@ -42,13 +39,11 @@
#include "vbaapplication.hxx"
#include "vbaworkbooks.hxx"
#include "vbaworkbook.hxx"
-#include "vbaworksheets.hxx"
#include "vbarange.hxx"
#include "vbawsfunction.hxx"
#include "vbadialogs.hxx"
#include "vbawindow.hxx"
#include "vbawindows.hxx"
-#include "vbaglobals.hxx"
#include "vbamenubars.hxx"
#include <tabvwsh.hxx>
#include <gridwin.hxx>
@@ -60,7 +55,6 @@
#include "vbaassistant.hxx"
#include <sc.hrc>
#include <macromgr.hxx>
-#include <defaultsoptions.hxx>
#include "vbafiledialog.hxx"
#include <osl/file.hxx>
@@ -68,17 +62,10 @@
#include <sfx2/bindings.hxx>
#include <sfx2/request.hxx>
-#include <sfx2/objsh.hxx>
-#include <sfx2/viewfrm.hxx>
#include <sfx2/app.hxx>
#include <vcl/svapp.hxx>
-#include <toolkit/awt/vclxwindow.hxx>
-
#include <tools/diagnose_ex.h>
-#include <tools/urlobj.hxx>
-
-#include <docuno.hxx>
#include <basic/sbx.hxx>
#include <basic/sbstar.hxx>
@@ -88,13 +75,11 @@
#include <convuno.hxx>
#include <cellsuno.hxx>
-#include <miscuno.hxx>
#include <unonames.hxx>
#include <docsh.hxx>
#include <vbahelper/helperdecl.hxx>
#include "excelvbahelper.hxx"
-#include <basic/sbmod.hxx>
#include <basic/sbxobj.hxx>
#include <viewutil.hxx>
diff --git a/sc/source/ui/vba/vbaassistant.cxx b/sc/source/ui/vba/vbaassistant.cxx
index bfdc8c9b7e4d..11a370e6a5c6 100644
--- a/sc/source/ui/vba/vbaassistant.cxx
+++ b/sc/source/ui/vba/vbaassistant.cxx
@@ -16,8 +16,6 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <sfx2/app.hxx>
-#include <svtools/helpopt.hxx>
#include <ooo/vba/office/MsoAnimationType.hpp>
diff --git a/sc/source/ui/vba/vbaaxes.cxx b/sc/source/ui/vba/vbaaxes.cxx
index 9cf88bf0eb83..ee93fe2c4700 100644
--- a/sc/source/ui/vba/vbaaxes.cxx
+++ b/sc/source/ui/vba/vbaaxes.cxx
@@ -27,7 +27,6 @@
#include <ooo/vba/excel/XlAxisType.hpp>
#include <ooo/vba/excel/XlAxisGroup.hpp>
#include <ooo/vba/excel/XAxis.hpp>
-#include <map>
using namespace ::com::sun::star;
using namespace ::ooo::vba;
diff --git a/sc/source/ui/vba/vbacharacters.cxx b/sc/source/ui/vba/vbacharacters.cxx
index 3281eff63a34..d9a705014b47 100644
--- a/sc/source/ui/vba/vbacharacters.cxx
+++ b/sc/source/ui/vba/vbacharacters.cxx
@@ -18,7 +18,6 @@
*/
#include "vbacharacters.hxx"
-#include "vbaglobals.hxx"
#include "vbafont.hxx"
#include <com/sun/star/beans/XPropertySet.hpp>
diff --git a/sc/source/ui/vba/vbachart.cxx b/sc/source/ui/vba/vbachart.cxx
index efda917eada2..d6727d73aa7a 100644
--- a/sc/source/ui/vba/vbachart.cxx
+++ b/sc/source/ui/vba/vbachart.cxx
@@ -29,7 +29,6 @@
#include <com/sun/star/chart/ChartSymbolType.hpp>
#include <com/sun/star/chart/ChartSolidType.hpp>
#include <com/sun/star/chart/ChartDataRowSource.hpp>
-#include <com/sun/star/chart/ChartDataCaption.hpp>
#include <ooo/vba/excel/XlChartType.hpp>
#include <ooo/vba/excel/XlRowCol.hpp>
#include <ooo/vba/excel/XlAxisType.hpp>
diff --git a/sc/source/ui/vba/vbachart.hxx b/sc/source/ui/vba/vbachart.hxx
index 5c4e3171b786..03edd255274c 100644
--- a/sc/source/ui/vba/vbachart.hxx
+++ b/sc/source/ui/vba/vbachart.hxx
@@ -29,8 +29,6 @@
#include <com/sun/star/chart/XTwoAxisXSupplier.hpp>
#include <com/sun/star/chart/XTwoAxisYSupplier.hpp>
#include <ooo/vba/excel/XChart.hpp>
-#include <ooo/vba/excel/XDataLabels.hpp>
-#include <ooo/vba/excel/XSeries.hpp>
#include <vbahelper/vbahelperinterface.hxx>
typedef InheritedHelperInterfaceWeakImpl<ov::excel::XChart > ChartImpl_BASE;
diff --git a/sc/source/ui/vba/vbachartobject.cxx b/sc/source/ui/vba/vbachartobject.cxx
index cc48bd48d6dc..d687416b4c4a 100644
--- a/sc/source/ui/vba/vbachartobject.cxx
+++ b/sc/source/ui/vba/vbachartobject.cxx
@@ -23,7 +23,6 @@
#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 c8a752021a3c..5863b36ec65f 100644
--- a/sc/source/ui/vba/vbachartobjects.cxx
+++ b/sc/source/ui/vba/vbachartobjects.cxx
@@ -16,9 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "vbachart.hxx"
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/document/XEmbeddedObjectSupplier.hpp>
+
#include <com/sun/star/table/XTableChartsSupplier.hpp>
#include <com/sun/star/table/XTableChart.hpp>
#include <com/sun/star/script/BasicErrorException.hpp>
@@ -27,7 +25,6 @@
#include "vbachartobjects.hxx"
#include "vbachartobject.hxx"
-#include "vbaglobals.hxx"
#include <docsh.hxx>
#include <cellsuno.hxx>
#include <vector>
diff --git a/sc/source/ui/vba/vbacomment.cxx b/sc/source/ui/vba/vbacomment.cxx
index b22cc8210350..348ecf7b0006 100644
--- a/sc/source/ui/vba/vbacomment.cxx
+++ b/sc/source/ui/vba/vbacomment.cxx
@@ -18,7 +18,6 @@
*/
#include "vbacomment.hxx"
-#include <ooo/vba/excel/XlCreator.hpp>
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/sheet/XSpreadsheet.hpp>
#include <com/sun/star/sheet/XSheetAnnotationAnchor.hpp>
@@ -28,13 +27,14 @@
#include <com/sun/star/sheet/XCellAddressable.hpp>
#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/text/XSimpleText.hpp>
+#include <com/sun/star/text/XTextCursor.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <ooo/vba/office/MsoShapeType.hpp>
#include <vbahelper/vbashape.hxx>
#include <sal/log.hxx>
-#include "vbaglobals.hxx"
#include "vbacomments.hxx"
using namespace ::ooo::vba;
diff --git a/sc/source/ui/vba/vbacomment.hxx b/sc/source/ui/vba/vbacomment.hxx
index b430d962ecdf..28139175d4c7 100644
--- a/sc/source/ui/vba/vbacomment.hxx
+++ b/sc/source/ui/vba/vbacomment.hxx
@@ -20,7 +20,6 @@
#define INCLUDED_SC_SOURCE_UI_VBA_VBACOMMENT_HXX
#include <ooo/vba/excel/XComment.hpp>
-#include <ooo/vba/excel/XApplication.hpp>
#include <ooo/vba/msforms/XShape.hpp>
#include <com/sun/star/sheet/XSheetAnnotations.hpp>
#include <com/sun/star/sheet/XSheetAnnotation.hpp>
diff --git a/sc/source/ui/vba/vbacomments.cxx b/sc/source/ui/vba/vbacomments.cxx
index 02c5f9c1be32..7dec20724383 100644
--- a/sc/source/ui/vba/vbacomments.cxx
+++ b/sc/source/ui/vba/vbacomments.cxx
@@ -24,8 +24,6 @@
#include <com/sun/star/sheet/XSheetAnnotation.hpp>
#include <com/sun/star/table/XCellRange.hpp>
-#include "vbaglobals.hxx"
-
using namespace ::ooo::vba;
using namespace ::com::sun::star;
diff --git a/sc/source/ui/vba/vbacondition.cxx b/sc/source/ui/vba/vbacondition.cxx
index cf2ff15f8761..2e53d62fc5f8 100644
--- a/sc/source/ui/vba/vbacondition.cxx
+++ b/sc/source/ui/vba/vbacondition.cxx
@@ -20,7 +20,6 @@
#include "vbacondition.hxx"
#include <ooo/vba/excel/XlFormatConditionOperator.hpp>
#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>
diff --git a/sc/source/ui/vba/vbafiledialog.cxx b/sc/source/ui/vba/vbafiledialog.cxx
index ad5ecdb03012..2842b87efb57 100644
--- a/sc/source/ui/vba/vbafiledialog.cxx
+++ b/sc/source/ui/vba/vbafiledialog.cxx
@@ -24,7 +24,6 @@
#include <ooo/vba/office/MsoFileDialogType.hpp>
-#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/ui/dialogs/FilePicker.hpp>
#include <com/sun/star/ui/dialogs/FolderPicker.hpp>
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
diff --git a/sc/source/ui/vba/vbafiledialogitems.cxx b/sc/source/ui/vba/vbafiledialogitems.cxx
index 551da71fda3e..03fe61d71924 100644
--- a/sc/source/ui/vba/vbafiledialogitems.cxx
+++ b/sc/source/ui/vba/vbafiledialogitems.cxx
@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "vbafiledialogitems.hxx"
-#include <com/sun/star/lang/XSingleComponentFactory.hpp>
-#include <com/sun/star/container/XIndexContainer.hpp>
using namespace ::com::sun::star;
using namespace ::ooo::vba;
diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx
index 09ecf921cc3d..5dc152b112f3 100644
--- a/sc/source/ui/vba/vbafont.cxx
+++ b/sc/source/ui/vba/vbafont.cxx
@@ -16,15 +16,8 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <com/sun/star/beans/XProperty.hpp>
-#include <com/sun/star/awt/FontWeight.hpp>
+
#include <com/sun/star/awt/FontUnderline.hpp>
-#include <com/sun/star/awt/FontStrikeout.hpp>
-#include <com/sun/star/awt/FontSlant.hpp>
-#include <com/sun/star/text/XSimpleText.hpp>
-#include <com/sun/star/table/XCellRange.hpp>
-#include <com/sun/star/table/XCell.hpp>
-#include <com/sun/star/table/XColumnRowRange.hpp>
#include <ooo/vba/excel/XlColorIndex.hpp>
#include <ooo/vba/excel/XlUnderlineStyle.hpp>
#include <editeng/eeitem.hxx>
diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx
index 47ddfcaaefad..ce5bddd12505 100644
--- a/sc/source/ui/vba/vbaformat.cxx
+++ b/sc/source/ui/vba/vbaformat.cxx
@@ -36,7 +36,6 @@
#include <com/sun/star/frame/XModel.hpp>
#include <basic/sberrors.hxx>
-#include <rtl/math.hxx>
#include "excelvbahelper.hxx"
#include "vbaborders.hxx"
@@ -45,7 +44,6 @@
#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/vbaformatconditions.cxx b/sc/source/ui/vba/vbaformatconditions.cxx
index 94c34908fdf0..c588c57fbc9e 100644
--- a/sc/source/ui/vba/vbaformatconditions.cxx
+++ b/sc/source/ui/vba/vbaformatconditions.cxx
@@ -18,7 +18,6 @@
*/
#include <ooo/vba/excel/XRange.hpp>
-#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
#include <com/sun/star/sheet/XSheetConditionalEntry.hpp>
#include <basic/sberrors.hxx>
#include <comphelper/sequence.hxx>
@@ -27,9 +26,7 @@
#include <unonames.hxx>
#include "vbaformatconditions.hxx"
#include "vbaformatcondition.hxx"
-#include "vbaworkbook.hxx"
#include "vbastyles.hxx"
-#include "vbaglobals.hxx"
using namespace ::ooo::vba;
using namespace ::com::sun::star;
diff --git a/sc/source/ui/vba/vbaglobals.cxx b/sc/source/ui/vba/vbaglobals.cxx
index d2872fdfed5a..03bf8685f00b 100644
--- a/sc/source/ui/vba/vbaglobals.cxx
+++ b/sc/source/ui/vba/vbaglobals.cxx
@@ -18,19 +18,13 @@
*/
#include "vbaglobals.hxx"
-#include <sal/macros.h>
-
#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"
-#include "vbaworksheet.hxx"
-#include "vbarange.hxx"
-#include <cppuhelper/bootstrap.hxx>
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::ooo::vba;
diff --git a/sc/source/ui/vba/vbahyperlink.cxx b/sc/source/ui/vba/vbahyperlink.cxx
index c2064d9b30b8..1a5bd6093485 100644
--- a/sc/source/ui/vba/vbahyperlink.cxx
+++ b/sc/source/ui/vba/vbahyperlink.cxx
@@ -28,7 +28,6 @@
#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>
#include <ooo/vba/office/MsoHyperlinkType.hpp>
#include <ooo/vba/msforms/XShape.hpp>
#include "vbarange.hxx"
diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx
index 76556ff25610..d8816a526758 100644
--- a/sc/source/ui/vba/vbainterior.cxx
+++ b/sc/source/ui/vba/vbainterior.cxx
@@ -17,24 +17,14 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/table/XCell.hpp>
-#include <com/sun/star/table/XColumnRowRange.hpp>
-#include <com/sun/star/beans/XIntrospection.hpp>
-#include <com/sun/star/beans/XIntrospectionAccess.hpp>
-#include <com/sun/star/reflection/XIdlMethod.hpp>
-#include <com/sun/star/beans/MethodConcept.hpp>
-#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/xml/AttributeData.hpp>
#include <ooo/vba/excel/XlColorIndex.hpp>
#include <ooo/vba/excel/XlPattern.hpp>
-#include <cppuhelper/queryinterface.hxx>
-
#include <map>
#include <sal/macros.h>
-#include <svx/xtable.hxx>
#include "vbainterior.hxx"
#include "vbapalette.hxx"
diff --git a/sc/source/ui/vba/vbaname.cxx b/sc/source/ui/vba/vbaname.cxx
index cd05040b4c65..d480197ac2bc 100644
--- a/sc/source/ui/vba/vbaname.cxx
+++ b/sc/source/ui/vba/vbaname.cxx
@@ -16,20 +16,12 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <vbahelper/helperdecl.hxx>
-
-#include <com/sun/star/table/XCellRange.hpp>
-#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"
-#include <vector>
+#include <docsh.hxx>
#include <rangenam.hxx>
-#include <tabvwsh.hxx>
-#include <viewdata.hxx>
#include <nameuno.hxx>
#include <compiler.hxx>
#include <tokenarray.hxx>
diff --git a/sc/source/ui/vba/vbanames.cxx b/sc/source/ui/vba/vbanames.cxx
index 254b7cd5ec36..67f59b07a330 100644
--- a/sc/source/ui/vba/vbanames.cxx
+++ b/sc/source/ui/vba/vbanames.cxx
@@ -16,7 +16,6 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <vbahelper/helperdecl.hxx>
#include <com/sun/star/table/XCellRange.hpp>
#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
@@ -27,8 +26,6 @@
#include "vbanames.hxx"
#include "vbaname.hxx"
#include "vbarange.hxx"
-#include "vbaglobals.hxx"
-#include <vector>
#include <tabvwsh.hxx>
#include <viewdata.hxx>
#include <compiler.hxx>
diff --git a/sc/source/ui/vba/vbaoleobject.cxx b/sc/source/ui/vba/vbaoleobject.cxx
index 18e0e78ae195..981d7be1ee79 100644
--- a/sc/source/ui/vba/vbaoleobject.cxx
+++ b/sc/source/ui/vba/vbaoleobject.cxx
@@ -18,18 +18,12 @@
*/
#include <com/sun/star/awt/XControlModel.hpp>
-#include <com/sun/star/awt/XWindow2.hpp>
-#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"
-#include <svx/svdobj.hxx>
-#include <drwlayer.hxx>
-#include "excelvbahelper.hxx"
-#include <svtools/bindablecontrolhelper.hxx>
+
using namespace com::sun::star;
using namespace ooo::vba;
diff --git a/sc/source/ui/vba/vbaoleobjects.cxx b/sc/source/ui/vba/vbaoleobjects.cxx
index 373cfda51501..68400f007e29 100644
--- a/sc/source/ui/vba/vbaoleobjects.cxx
+++ b/sc/source/ui/vba/vbaoleobjects.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <com/sun/star/drawing/XControlShape.hpp>
#include <com/sun/star/container/XNamed.hpp>
#include <ooo/vba/excel/XOLEObject.hpp>
diff --git a/sc/source/ui/vba/vbapagesetup.cxx b/sc/source/ui/vba/vbapagesetup.cxx
index b7b13b19bcce..035243f1d78d 100644
--- a/sc/source/ui/vba/vbapagesetup.cxx
+++ b/sc/source/ui/vba/vbapagesetup.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "vbapagesetup.hxx"
-#include <cellsuno.hxx>
#include <convuno.hxx>
#include <rangelst.hxx>
#include <docsh.hxx>
@@ -31,11 +30,8 @@
#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 <ooo/vba/excel/XlPaperSize.hpp>
#include <basic/sberrors.hxx>
-#include <i18nutil/paper.hxx>
-#include <sal/macros.h>
-#include <algorithm>
#include <filter/msfilter/util.hxx>
using namespace ::com::sun::star;
diff --git a/sc/source/ui/vba/vbapagesetup.hxx b/sc/source/ui/vba/vbapagesetup.hxx
index 39ed7ff65d33..bd5045d41741 100644
--- a/sc/source/ui/vba/vbapagesetup.hxx
+++ b/sc/source/ui/vba/vbapagesetup.hxx
@@ -23,10 +23,7 @@
#include <ooo/vba/excel/XPageSetup.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/sheet/XSpreadsheet.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <vbahelper/vbahelperinterface.hxx>
#include <vbahelper/vbapagesetupbase.hxx>
-#include <ooo/vba/excel/XlPaperSize.hpp>
typedef cppu::ImplInheritanceHelper< VbaPageSetupBase, ov::excel::XPageSetup > ScVbaPageSetup_BASE;
diff --git a/sc/source/ui/vba/vbapane.hxx b/sc/source/ui/vba/vbapane.hxx
index 03f4a6ef5a55..539b278780c2 100644
--- a/sc/source/ui/vba/vbapane.hxx
+++ b/sc/source/ui/vba/vbapane.hxx
@@ -21,9 +21,9 @@
#include <com/sun/star/sheet/XViewPane.hpp>
#include <cppuhelper/implbase.hxx>
+#include <cppuhelper/weakref.hxx>
#include <ooo/vba/excel/XPane.hpp>
-#include <vbahelper/vbahelperinterface.hxx>
-#include "excelvbahelper.hxx"
+#include <vbahelper/vbahelper.hxx>
class ScVbaPane final : public cppu::WeakImplHelper< ov::excel::XPane >
{
diff --git a/sc/source/ui/vba/vbapivottable.hxx b/sc/source/ui/vba/vbapivottable.hxx
index eb16e9905efe..506c61a7febb 100644
--- a/sc/source/ui/vba/vbapivottable.hxx
+++ b/sc/source/ui/vba/vbapivottable.hxx
@@ -21,7 +21,6 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/sheet/XDataPilotTable.hpp>
#include <ooo/vba/excel/XPivotTable.hpp>
-#include "excelvbahelper.hxx"
#include <vbahelper/vbahelperinterface.hxx>
typedef InheritedHelperInterfaceWeakImpl< ov::excel::XPivotTable > PivotTableImpl_BASE;
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index a97729b16d12..96bf107afd2e 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -24,8 +24,6 @@
#include <comphelper/types.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <o3tl/any.hxx>
-#include <sfx2/objsh.hxx>
-#include <sal/log.hxx>
#include <tools/diagnose_ex.h>
#include <com/sun/star/script/ArrayWrapper.hpp>
@@ -56,18 +54,14 @@
#include <com/sun/star/sheet/XPrintAreas.hpp>
#include <com/sun/star/sheet/XCellRangesQuery.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/sheet/XFunctionAccess.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
-#include <com/sun/star/table/XCellCursor.hpp>
#include <com/sun/star/table/XTableRows.hpp>
#include <com/sun/star/table/XTableColumns.hpp>
#include <com/sun/star/table/TableSortField.hpp>
#include <com/sun/star/util/XMergeable.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
-#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
#include <com/sun/star/util/XNumberFormats.hpp>
#include <com/sun/star/util/NumberFormat.hpp>
@@ -75,20 +69,13 @@
#include <com/sun/star/util/XReplaceable.hpp>
#include <com/sun/star/util/XSortable.hpp>
#include <com/sun/star/sheet/XCellRangeMovement.hpp>
-#include <com/sun/star/sheet/XCellRangeData.hpp>
#include <com/sun/star/sheet/FormulaResult.hpp>
#include <com/sun/star/sheet/FilterOperator2.hpp>
-#include <com/sun/star/sheet/TableFilterField.hpp>
#include <com/sun/star/sheet/TableFilterField2.hpp>
#include <com/sun/star/sheet/XSheetFilterDescriptor2.hpp>
-#include <com/sun/star/sheet/XSheetFilterable.hpp>
#include <com/sun/star/sheet/FilterConnection.hpp>
-#include <com/sun/star/util/CellProtection.hpp>
#include <com/sun/star/util/TriState.hpp>
-#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
-#include <com/sun/star/awt/XDevice.hpp>
-
#include <com/sun/star/sheet/XSubTotalCalculatable.hpp>
#include <com/sun/star/sheet/XSubTotalDescriptor.hpp>
#include <com/sun/star/sheet/GeneralFunction.hpp>
@@ -98,7 +85,6 @@
#include <ooo/vba/excel/XlPasteSpecialOperation.hpp>
#include <ooo/vba/excel/XlPasteType.hpp>
-#include <ooo/vba/excel/Constants.hpp>
#include <ooo/vba/excel/XlFindLookIn.hpp>
#include <ooo/vba/excel/XlLookAt.hpp>
#include <ooo/vba/excel/XlSearchOrder.hpp>
@@ -115,8 +101,6 @@
#include <ooo/vba/excel/XlPageBreak.hpp>
#include <ooo/vba/excel/XlAutoFilterOperator.hpp>
#include <ooo/vba/excel/XlAutoFillType.hpp>
-#include <ooo/vba/excel/XlTextParsingType.hpp>
-#include <ooo/vba/excel/XlTextQualifier.hpp>
#include <ooo/vba/excel/XlCellType.hpp>
#include <ooo/vba/excel/XlSpecialCellsValue.hpp>
#include <ooo/vba/excel/XlConsolidationFunction.hpp>
@@ -127,14 +111,13 @@
#include <cellsuno.hxx>
#include <dbdata.hxx>
#include <docfunc.hxx>
-#include <docuno.hxx>
#include <columnspanset.hxx>
+#include <queryparam.hxx>
#include <sortparam.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/app.hxx>
#include <sfx2/bindings.hxx>
-#include <sfx2/request.hxx>
#include <sfx2/viewfrm.hxx>
#include <sc.hrc>
#include <unonames.hxx>
@@ -155,9 +138,6 @@
#include <rangelst.hxx>
#include <convuno.hxx>
#include <compiler.hxx>
-#include <attrib.hxx>
-#include <undodat.hxx>
-#include <dbdocfun.hxx>
#include <patattr.hxx>
#include <olinetab.hxx>
#include <transobj.hxx>
@@ -168,16 +148,11 @@
#include <global.hxx>
-#include "vbaglobals.hxx"
#include "vbastyle.hxx"
#include "vbaname.hxx"
#include <vector>
#include <vbahelper/vbacollectionimpl.hxx>
-// begin test includes
-#include <com/sun/star/sheet/FunctionArgument.hpp>
-// end test includes
-#include <ooo/vba/excel/Range.hpp>
#include <com/sun/star/bridge/oleautomation/Date.hpp>
#include <tokenarray.hxx>
#include <tokenuno.hxx>
diff --git a/sc/source/ui/vba/vbasheetobject.cxx b/sc/source/ui/vba/vbasheetobject.cxx
index d371bf2ed35b..119e111f39b1 100644
--- a/sc/source/ui/vba/vbasheetobject.cxx
+++ b/sc/source/ui/vba/vbasheetobject.cxx
@@ -19,6 +19,7 @@
#include "vbasheetobject.hxx"
#include <com/sun/star/awt/TextAlign.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/drawing/XControlShape.hpp>
#include <com/sun/star/frame/XModel.hpp>
@@ -28,11 +29,8 @@
#include <ooo/vba/excel/Constants.hpp>
#include <ooo/vba/excel/XlOrientation.hpp>
#include <ooo/vba/excel/XlPlacement.hpp>
-#include <rtl/ustrbuf.hxx>
#include <filter/msfilter/msvbahelper.hxx>
-#include <svx/unoshape.hxx>
#include "vbafont.hxx"
-#include <drwlayer.hxx>
using namespace ::com::sun::star;
using namespace ::ooo::vba;
diff --git a/sc/source/ui/vba/vbatextboxshape.cxx b/sc/source/ui/vba/vbatextboxshape.cxx
index d67c8acb33e9..66a85e49e2e9 100644
--- a/sc/source/ui/vba/vbatextboxshape.cxx
+++ b/sc/source/ui/vba/vbatextboxshape.cxx
@@ -17,11 +17,11 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include "excelvbahelper.hxx"
#include "vbatextboxshape.hxx"
#include "vbacharacters.hxx"
#include <com/sun/star/text/XSimpleText.hpp>
#include <docsh.hxx>
-#include <vector>
using namespace com::sun::star;
using namespace ooo::vba;
diff --git a/sc/source/ui/vba/vbatextboxshape.hxx b/sc/source/ui/vba/vbatextboxshape.hxx
index 3c71ee87032c..edd9e0cee0f2 100644
--- a/sc/source/ui/vba/vbatextboxshape.hxx
+++ b/sc/source/ui/vba/vbatextboxshape.hxx
@@ -22,8 +22,6 @@
#include <com/sun/star/text/XTextRange.hpp>
#include <ooo/vba/msforms/XTextBoxShape.hpp>
#include <vbahelper/vbashape.hxx>
-#include "excelvbahelper.hxx"
-#include "vbacharacters.hxx"
typedef cppu::ImplInheritanceHelper< ScVbaShape, ov::msforms::XTextBoxShape > TextBoxShapeImpl_BASE;
diff --git a/sc/source/ui/vba/vbatextframe.cxx b/sc/source/ui/vba/vbatextframe.cxx
index 1d010b1f09b5..d4da85f26521 100644
--- a/sc/source/ui/vba/vbatextframe.cxx
+++ b/sc/source/ui/vba/vbatextframe.cxx
@@ -16,10 +16,8 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <vbahelper/helperdecl.hxx>
-#include <com/sun/star/drawing/TextFitToSizeType.hpp>
+
#include <com/sun/star/drawing/XShape.hpp>
-#include <com/sun/star/text/XText.hpp>
#include <sfx2/objsh.hxx>
#include "vbatextframe.hxx"
#include "vbacharacters.hxx"
diff --git a/sc/source/ui/vba/vbatextframe.hxx b/sc/source/ui/vba/vbatextframe.hxx
index 9bac1c531e81..8b7a2c70d527 100644
--- a/sc/source/ui/vba/vbatextframe.hxx
+++ b/sc/source/ui/vba/vbatextframe.hxx
@@ -20,7 +20,6 @@
#define INCLUDED_SC_SOURCE_UI_VBA_VBATEXTFRAME_HXX
#include <cppuhelper/implbase.hxx>
#include <ooo/vba/excel/XTextFrame.hpp>
-#include <vbahelper/vbahelperinterface.hxx>
#include <vbahelper/vbatextframe.hxx>
//typedef InheritedHelperInterfaceWeakImpl< ov::excel::XTextFrame > ScVbaTextFrame_BASE;
diff --git a/sc/source/ui/vba/vbavalidation.cxx b/sc/source/ui/vba/vbavalidation.cxx
index c9f166435325..f8af437e218c 100644
--- a/sc/source/ui/vba/vbavalidation.cxx
+++ b/sc/source/ui/vba/vbavalidation.cxx
@@ -24,7 +24,6 @@
#include <com/sun/star/sheet/ValidationAlertStyle.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <ooo/vba/excel/XlDVType.hpp>
-#include <ooo/vba/excel/XlFormatConditionOperator.hpp>
#include <ooo/vba/excel/XlDVAlertStyle.hpp>
#include <unonames.hxx>
diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx
index 35818b1bac0c..848687dd3bc9 100644
--- a/sc/source/ui/vba/vbawindow.cxx
+++ b/sc/source/ui/vba/vbawindow.cxx
@@ -17,23 +17,23 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <vbahelper/helperdecl.hxx>
+#include "excelvbahelper.hxx"
#include "service.hxx"
#include "vbawindow.hxx"
#include "vbaworksheets.hxx"
#include "vbaworksheet.hxx"
-#include "vbaglobals.hxx"
+#include "vbaworkbook.hxx"
#include "vbapane.hxx"
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/sheet/XSpreadsheet.hpp>
+#include <com/sun/star/sheet/XViewSplitable.hpp>
+#include <com/sun/star/sheet/XViewFreezable.hpp>
#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/view/DocumentZoomType.hpp>
#include <com/sun/star/table/CellRangeAddress.hpp>
+#include <ooo/vba/excel/XApplication.hpp>
#include <ooo/vba/excel/XlWindowState.hpp>
#include <ooo/vba/excel/XlWindowView.hpp>
-#include <ooo/vba/excel/Constants.hpp>
-#include <com/sun/star/awt/XWindow.hpp>
-#include <com/sun/star/awt/XWindow2.hpp>
-#include <com/sun/star/awt/PosSize.hpp>
#include <basic/sberrors.hxx>
#include <comphelper/sequence.hxx>
#include <cppuhelper/implbase.hxx>
diff --git a/sc/source/ui/vba/vbawindow.hxx b/sc/source/ui/vba/vbawindow.hxx
index ee70854f6c79..ffa56eca908a 100644
--- a/sc/source/ui/vba/vbawindow.hxx
+++ b/sc/source/ui/vba/vbawindow.hxx
@@ -21,17 +21,12 @@
#include <ooo/vba/excel/XWindow.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/sheet/XViewPane.hpp>
-#include <com/sun/star/sheet/XViewFreezable.hpp>
-#include <com/sun/star/sheet/XViewSplitable.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <ooo/vba/excel/XPane.hpp>
#include <com/sun/star/awt/XDevice.hpp>
#include <cppuhelper/implbase.hxx>
-#include <vbahelper/vbahelperinterface.hxx>
#include <vbahelper/vbawindowbase.hxx>
-#include "vbaworkbook.hxx"
typedef cppu::ImplInheritanceHelper< VbaWindowBase, ov::excel::XWindow > WindowImpl_BASE;
diff --git a/sc/source/ui/vba/vbawindows.cxx b/sc/source/ui/vba/vbawindows.cxx
index 00c3010b0dc4..d7094b4eaa51 100644
--- a/sc/source/ui/vba/vbawindows.cxx
+++ b/sc/source/ui/vba/vbawindows.cxx
@@ -26,7 +26,7 @@
#include <rtl/ref.hxx>
#include "vbawindow.hxx"
-#include "vbaglobals.hxx"
+#include "vbaworkbook.hxx"
#include <unordered_map>
diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx
index b6e45af532f5..4e49e403f4b1 100644
--- a/sc/source/ui/vba/vbaworkbook.cxx
+++ b/sc/source/ui/vba/vbaworkbook.cxx
@@ -19,10 +19,9 @@
#include <vbahelper/helperdecl.hxx>
#include <tools/urlobj.hxx>
-#include <boost/optional.hpp>
-#include <com/sun/star/util/XModifiable.hpp>
#include <com/sun/star/util/XProtectable.hpp>
+#include <com/sun/star/sheet/XNamedRanges.hpp>
#include <com/sun/star/sheet/XSpreadsheetView.hpp>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/frame/XStorable.hpp>
@@ -30,7 +29,6 @@
#include <ooo/vba/excel/XlFileFormat.hpp>
#include <ooo/vba/excel/XApplication.hpp>
-#include <scextopt.hxx>
#include "service.hxx"
#include "vbaworksheet.hxx"
#include "vbaworksheets.hxx"
@@ -41,9 +39,7 @@
#include "vbapalette.hxx"
#include <osl/file.hxx>
#include "vbanames.hxx"
-#include <nameuno.hxx>
#include <docoptio.hxx>
-#include <unonames.hxx>
#include <docsh.hxx>
// Much of the impl. for the equivalent UNO module is
diff --git a/sc/source/ui/vba/vbaworkbook.hxx b/sc/source/ui/vba/vbaworkbook.hxx
index 6efaa938cfa8..f02c460da273 100644
--- a/sc/source/ui/vba/vbaworkbook.hxx
+++ b/sc/source/ui/vba/vbaworkbook.hxx
@@ -22,7 +22,6 @@
#include <com/sun/star/frame/XModel.hpp>
#include <ooo/vba/excel/XWorkbook.hpp>
#include <cppuhelper/implbase.hxx>
-#include <vbahelper/vbahelperinterface.hxx>
#include <vbahelper/vbadocumentbase.hxx>
typedef cppu::ImplInheritanceHelper< VbaDocumentBase, ov::excel::XWorkbook > ScVbaWorkbook_BASE;
diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx
index eeb58a8ec9bc..33ed98755499 100644
--- a/sc/source/ui/vba/vbaworkbooks.cxx
+++ b/sc/source/ui/vba/vbaworkbooks.cxx
@@ -19,26 +19,17 @@
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/frame/XModel.hpp>
-#include <com/sun/star/util/XModifiable.hpp>
-#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"
#include <vbahelper/vbahelper.hxx>
-#include <vector>
#include <osl/file.hxx>
using namespace ::ooo::vba;
using namespace ::com::sun::star;
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index 81ed54728e60..1604bca5118b 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -18,14 +18,12 @@
*/
#include <vbahelper/helperdecl.hxx>
-#include <cppuhelper/queryinterface.hxx>
#include "vbaworksheet.hxx"
#include "vbanames.hxx"
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XIntrospectionAccess.hpp>
-#include <com/sun/star/beans/XIntrospection.hpp>
#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/util/XProtectable.hpp>
#include <com/sun/star/table/XCellRange.hpp>
@@ -33,30 +31,23 @@
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/sheet/XCalculatable.hpp>
#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
-#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
#include <com/sun/star/sheet/XSheetCellRange.hpp>
#include <com/sun/star/sheet/XSheetCellCursor.hpp>
#include <com/sun/star/sheet/XSheetAnnotationsSupplier.hpp>
#include <com/sun/star/sheet/XUsedAreaCursor.hpp>
#include <com/sun/star/sheet/XSpreadsheets.hpp>
-#include <com/sun/star/sheet/XSheetPastable.hpp>
-#include <com/sun/star/sheet/XCellAddressable.hpp>
#include <com/sun/star/sheet/XSheetOutline.hpp>
#include <com/sun/star/sheet/XSheetPageBreak.hpp>
#include <com/sun/star/sheet/XDataPilotTablesSupplier.hpp>
#include <com/sun/star/sheet/XNamedRanges.hpp>
-#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/Desktop.hpp>
-#include <com/sun/star/table/XColumnRowRange.hpp>
#include <com/sun/star/table/XTableChartsSupplier.hpp>
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#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>
#include <ooo/vba/XControlProvider.hpp>
#include <basic/sberrors.hxx>
@@ -65,18 +56,10 @@
#include <vbahelper/vbashapes.hxx>
//zhangyun showdataform
-#include <sfx2/sfxdlg.hxx>
#include <scabstdlg.hxx>
#include <tabvwsh.hxx>
-#include <scitems.hxx>
-#include <svx/svdouno.hxx>
-#include <svx/svdpage.hxx>
-
-#include <cellsuno.hxx>
-#include <drwlayer.hxx>
#include <tabprotection.hxx>
-#include <scextopt.hxx>
#include "excelvbahelper.hxx"
#include "service.hxx"
#include "vbaoutline.hxx"
@@ -84,14 +67,12 @@
#include "vbacomments.hxx"
#include "vbachartobjects.hxx"
#include "vbapivottables.hxx"
-#include "vbaoleobject.hxx"
#include "vbaoleobjects.hxx"
#include "vbapagesetup.hxx"
#include "vbapagebreaks.hxx"
#include "vbaworksheets.hxx"
#include "vbahyperlinks.hxx"
#include "vbasheetobjects.hxx"
-#include <markdata.hxx>
#include <dbdata.hxx>
#include <attrib.hxx>
diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx
index b017fba4663e..34aa20fcd0d0 100644
--- a/sc/source/ui/vba/vbaworksheets.cxx
+++ b/sc/source/ui/vba/vbaworksheets.cxx
@@ -18,32 +18,22 @@
*/
#include "vbaworksheets.hxx"
-#include <sfx2/dispatch.hxx>
-#include <sfx2/app.hxx>
-#include <sfx2/bindings.hxx>
-#include <sfx2/request.hxx>
#include <sfx2/viewfrm.hxx>
-#include <svl/itemset.hxx>
-#include <svl/eitem.hxx>
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
-#include <com/sun/star/sheet/XSpreadsheetView.hpp>
+#include <com/sun/star/sheet/XSpreadsheet.hpp>
#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/script/XTypeConverter.hpp>
#include <ooo/vba/excel/XApplication.hpp>
#include <tabvwsh.hxx>
#include "excelvbahelper.hxx"
-#include "vbaglobals.hxx"
#include "vbaworksheet.hxx"
-#include "vbaworkbook.hxx"
-#include <unonames.hxx>
#include <markdata.hxx>
#include <vector>
diff --git a/sc/source/ui/vba/vbawsfunction.cxx b/sc/source/ui/vba/vbawsfunction.cxx
index 8f6b3ffe824b..fa5b2e051449 100644
--- a/sc/source/ui/vba/vbawsfunction.cxx
+++ b/sc/source/ui/vba/vbawsfunction.cxx
@@ -17,18 +17,11 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#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>
#include <com/sun/star/sheet/XFunctionAccess.hpp>
-#include <com/sun/star/sheet/XCellRangesQuery.hpp>
#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
-#include <com/sun/star/sheet/CellFlags.hpp>
-#include <com/sun/star/reflection/XIdlMethod.hpp>
-#include <com/sun/star/beans/MethodConcept.hpp>
-#include <cppuhelper/queryinterface.hxx>
+#include <ooo/vba/excel/XRange.hpp>
#include "vbawsfunction.hxx"
#include <compiler.hxx>
diff --git a/sc/source/ui/vba/vbawsfunction.hxx b/sc/source/ui/vba/vbawsfunction.hxx
index eaedf551fdf5..f204eb858e08 100644
--- a/sc/source/ui/vba/vbawsfunction.hxx
+++ b/sc/source/ui/vba/vbawsfunction.hxx
@@ -21,10 +21,8 @@
#include <ooo/vba/excel/XWorksheetFunction.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include "vbarange.hxx"
-#include <com/sun/star/beans/XExactName.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
typedef InheritedHelperInterfaceWeakImpl< ov::excel::XWorksheetFunction > ScVbaWSFunction_BASE;