[Libreoffice-commits] core.git: chart2/IwyuFilter_chart2.yaml chart2/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Jan 3 08:39:48 UTC 2019


 chart2/IwyuFilter_chart2.yaml                                                      |   44 ++++++++++
 chart2/source/controller/chartapiwrapper/AreaWrapper.cxx                           |    1 
 chart2/source/controller/chartapiwrapper/AxisWrapper.cxx                           |    3 
 chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx                      |   19 ----
 chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx                  |   10 --
 chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx                |    6 -
 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx                        |    6 -
 chart2/source/controller/chartapiwrapper/GridWrapper.cxx                           |    3 
 chart2/source/controller/chartapiwrapper/LegendWrapper.cxx                         |    4 
 chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx                      |    1 
 chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx                      |    5 -
 chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx                  |    1 
 chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx    |    2 
 chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx |    1 
 chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx                  |    1 
 chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx            |    5 -
 chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx                |    1 
 chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx               |    2 
 chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx           |    3 
 chart2/source/controller/dialogs/ChartTypeDialogController.cxx                     |    6 -
 chart2/source/controller/dialogs/DataBrowser.cxx                                   |    4 
 chart2/source/controller/dialogs/DataBrowserModel.cxx                              |    3 
 chart2/source/controller/dialogs/DialogModel.cxx                                   |    4 
 chart2/source/controller/dialogs/ObjectNameProvider.cxx                            |    1 
 chart2/source/controller/dialogs/TextDirectionListBox.cxx                          |    3 
 chart2/source/controller/dialogs/dlg_ChartType.cxx                                 |    2 
 chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx                             |    1 
 chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx                        |    3 
 chart2/source/controller/dialogs/dlg_DataEditor.cxx                                |    5 -
 chart2/source/controller/dialogs/dlg_DataSource.cxx                                |    9 --
 chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx                           |    5 -
 chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx                           |    4 
 chart2/source/controller/dialogs/dlg_NumberFormat.cxx                              |    4 
 chart2/source/controller/dialogs/dlg_ObjectProperties.cxx                          |    9 --
 chart2/source/controller/dialogs/dlg_ShapeFont.cxx                                 |    2 
 chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx                            |    1 
 chart2/source/controller/dialogs/dlg_View3D.cxx                                    |    1 
 chart2/source/controller/dialogs/res_BarGeometry.cxx                               |    1 
 chart2/source/controller/dialogs/res_DataLabel.cxx                                 |    2 
 chart2/source/controller/dialogs/res_ErrorBar.cxx                                  |    2 
 chart2/source/controller/dialogs/res_LegendPosition.cxx                            |    3 
 chart2/source/controller/dialogs/res_Titles.cxx                                    |    3 
 chart2/source/controller/dialogs/res_Trendline.cxx                                 |    6 -
 chart2/source/controller/dialogs/res_Trendline.hxx                                 |   11 ++
 chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx                         |    1 
 chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx                           |    3 
 chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx                       |    2 
 chart2/source/controller/dialogs/tp_AxisLabel.cxx                                  |    1 
 chart2/source/controller/dialogs/tp_AxisPositions.cxx                              |    8 -
 chart2/source/controller/dialogs/tp_ChartType.cxx                                  |    2 
 chart2/source/controller/dialogs/tp_DataLabel.cxx                                  |    2 
 chart2/source/controller/dialogs/tp_DataSource.cxx                                 |    9 --
 chart2/source/controller/dialogs/tp_DataSource.hxx                                 |    4 
 chart2/source/controller/dialogs/tp_ErrorBars.cxx                                  |    2 
 chart2/source/controller/dialogs/tp_LegendPosition.cxx                             |    3 
 chart2/source/controller/dialogs/tp_PointGeometry.cxx                              |    1 
 chart2/source/controller/dialogs/tp_PolarOptions.cxx                               |    3 
 chart2/source/controller/dialogs/tp_RangeChooser.cxx                               |    7 -
 chart2/source/controller/dialogs/tp_Scale.cxx                                      |    2 
 chart2/source/controller/dialogs/tp_SeriesToAxis.cxx                               |    3 
 chart2/source/controller/dialogs/tp_TitleRotation.cxx                              |    1 
 chart2/source/controller/dialogs/tp_Trendline.cxx                                  |    1 
 chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx                    |    1 
 chart2/source/controller/inc/ChartController.hxx                                   |    1 
 chart2/source/controller/inc/ChartDocumentWrapper.hxx                              |    6 -
 chart2/source/controller/inc/TextDirectionListBox.hxx                              |    2 
 chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx                            |    2 
 chart2/source/controller/inc/dlg_DataSource.hxx                                    |    1 
 chart2/source/controller/inc/res_ErrorBar.hxx                                      |   16 +++
 chart2/source/controller/inc/res_LegendPosition.hxx                                |    6 +
 chart2/source/controller/inc/res_Titles.hxx                                        |    6 +
 chart2/source/controller/sidebar/ChartAxisPanel.hxx                                |    2 
 chart2/source/inc/LifeTime.hxx                                                     |    1 
 chart2/source/inc/NumberFormatterWrapper.hxx                                       |    2 
 chart2/source/inc/chartview/ChartSfxItemIds.hxx                                    |   12 ++
 75 files changed, 111 insertions(+), 215 deletions(-)

New commits:
commit 5cb0c041fd50896d426626bad11032ffe4ac4614
Author:     Gabor Kelemen <kelemeng at ubuntu.com>
AuthorDate: Sat Dec 22 11:35:30 2018 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Thu Jan 3 09:39:22 2019 +0100

    tdf#42949 Fix IWYU warnings in chart2/source/controller/* (2)
    
    Found with bin/find-unneeded-includes
    Only removal proposals are dealt with here.
    
    Cleaned directories are chartapiwrapper and dialogs
    Also a few other hxx in other inc dirs that came up
    during the process
    
    Change-Id: Ibf9c33aeee91a92216e8ab512f87acc482e13ae5
    Reviewed-on: https://gerrit.libreoffice.org/65566
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/chart2/IwyuFilter_chart2.yaml b/chart2/IwyuFilter_chart2.yaml
index f1e252485512..68761f242b30 100644
--- a/chart2/IwyuFilter_chart2.yaml
+++ b/chart2/IwyuFilter_chart2.yaml
@@ -54,6 +54,17 @@ blacklist:
     # base class has to be a complete type
     - com/sun/star/chart2/XColorScheme.hpp
     - com/sun/star/lang/XServiceInfo.hpp
+    chart2/source/inc/chartview/ChartSfxItemIds.hxx:
+    # Needed for TypedWhichId macros
+    - class SvxSizeItem
+    - class SfxIntegerListItem
+    - class SfxBoolItem
+    - class SfxStringItem
+    - class SfxInt32Item
+    - class SfxUInt32Item
+    - class SvxChartIndicateItem
+    - class SvxDoubleItem
+    - class SvxBrushItem
     chart2/source/inc/chartview/ExplicitScaleValues.hxx:
     # base class has to be a complete type
     - com/sun/star/chart2/XScaling.hpp
@@ -424,6 +435,7 @@ blacklist:
     - com/sun/star/util/XUpdatable.hpp
     chart2/source/controller/inc/ChartController.hxx:
     # base class has to be a complete type
+    - com/sun/star/frame/XController.hpp
     - com/sun/star/frame/XDispatchProvider.hpp
     - com/sun/star/frame/XLayoutManagerListener.hpp
     - com/sun/star/ui/XContextMenuInterception.hpp
@@ -432,6 +444,26 @@ blacklist:
     - com/sun/star/lang/XServiceInfo.hpp
     - com/sun/star/util/XCloseListener.hpp
     - com/sun/star/util/XModifyListener.hpp
+    chart2/source/controller/inc/ChartDocumentWrapper.hxx:
+    # base class has to be a complete type
+     - com/sun/star/chart/XChartDocument.hpp
+     - com/sun/star/drawing/XDrawPageSupplier.hpp
+     - com/sun/star/lang/XMultiServiceFactory.hpp
+     - com/sun/star/lang/XServiceInfo.hpp
+     - com/sun/star/uno/XAggregation.hpp
+    chart2/source/controller/inc/dlg_ChartType.hxx:
+    # Needed for vclptr type
+    - namespace chart { class ChartTypeTabPage; }
+    chart2/source/controller/inc/dlg_DataEditor.hxx:
+    # Needed for vclptr type
+    - namespace chart { class DataBrowser; }
+    chart2/source/controller/inc/dlg_View3D.hxx:
+    - namespace chart { class ThreeD_SceneAppearance_TabPage; }
+    - namespace chart { class ThreeD_SceneGeometry_TabPage; }
+    - namespace chart { class ThreeD_SceneIllumination_TabPage; }
+    chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx:
+    # Needed for vclptr type
+    - class SvxColorListBox
     chart2/source/controller/inc/ItemPropertyMap.hxx:
     # base class has to be a complete type
     - map
@@ -452,6 +484,18 @@ blacklist:
     # base class has to be a complete type
     - AccessibleBase.hxx
     - com/sun/star/accessibility/XAccessibleExtendedComponent.hpp
+    chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx:
+    # Needed for complex variable type
+    - com/sun/star/util/XRefreshable.hpp
+    chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx:
+    # Needed for complex variable type
+    - com/sun/star/util/XRefreshable.hpp
+    chart2/source/controller/dialogs/DataBrowser.cxx:
+    # Needed for complex variable type
+    - com/sun/star/chart2/XChartDocument.hpp
+    chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx:
+    # Needed for complex variable type
+    - com/sun/star/frame/XModel.hpp
     chart2/source/controller/main/ChartModelClone.hxx:
     # Needed for implicit dtor
     - com/sun/star/uno/Any.hxx
diff --git a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
index f6a94e2769e3..82c5edb3e13d 100644
--- a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
@@ -20,7 +20,6 @@
 #include "AreaWrapper.hxx"
 #include "Chart2ModelContact.hxx"
 #include <WrappedDirectStateProperty.hxx>
-#include <com/sun/star/drawing/FillStyle.hpp>
 #include <com/sun/star/chart2/XChartDocument.hpp>
 #include <comphelper/sequence.hxx>
 #include <cppuhelper/supportsservice.hxx>
diff --git a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
index c7efa0182005..c84037422de3 100644
--- a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
@@ -42,13 +42,10 @@
 #include "WrappedTextRotationProperty.hxx"
 #include "WrappedGapwidthProperty.hxx"
 #include "WrappedScaleProperty.hxx"
-#include <WrappedDefaultProperty.hxx>
 #include "WrappedNumberFormatProperty.hxx"
 #include "WrappedScaleTextProperties.hxx"
 
 #include <algorithm>
-#include <rtl/ustrbuf.hxx>
-#include <rtl/math.hxx>
 #include <tools/diagnose_ex.h>
 
 using namespace ::com::sun::star;
diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
index b5b4bf783554..67492264b60f 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
@@ -20,33 +20,14 @@
 #include "ChartDataWrapper.hxx"
 #include <DiagramHelper.hxx>
 #include <DataSourceHelper.hxx>
-#include <servicenames_charttypes.hxx>
-#include <CommonFunctors.hxx>
 #include <ChartModelHelper.hxx>
-#include <DataSeriesHelper.hxx>
 #include <ControllerLockGuard.hxx>
 #include "Chart2ModelContact.hxx"
 #include <cppuhelper/supportsservice.hxx>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <com/sun/star/chart2/XTitled.hpp>
-#include <com/sun/star/chart2/data/XNumericalDataSequence.hpp>
-#include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
-#include <com/sun/star/chart2/data/XDataSource.hpp>
 #include <com/sun/star/chart2/XChartDocument.hpp>
-#include <com/sun/star/chart2/XDataSeries.hpp>
-#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
-#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
-#include <com/sun/star/chart2/XChartTypeContainer.hpp>
-#include <com/sun/star/chart2/data/XDataReceiver.hpp>
-#include <com/sun/star/chart/ChartDataRowSource.hpp>
 #include <com/sun/star/chart/XChartDocument.hpp>
 
-#include <CharacterProperties.hxx>
-#include <FillProperties.hxx>
-
 #include <float.h>
-#include <map>
-#include <algorithm>
 #include <rtl/math.hxx>
 #include <osl/diagnose.h>
 
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index 471bb1a8e193..4de7a7ff223e 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -23,7 +23,6 @@
 #include <TitleHelper.hxx>
 #include <LegendHelper.hxx>
 #include <ControllerLockGuard.hxx>
-#include <ModifyListenerHelper.hxx>
 #include <DisposeHelper.hxx>
 #include "DataSeriesPointWrapper.hxx"
 #include <chartview/ExplicitValueProvider.hxx>
@@ -46,27 +45,20 @@
 #include "WrappedAddInProperty.hxx"
 #include <WrappedIgnoreProperty.hxx>
 #include <cppuhelper/supportsservice.hxx>
-#include <com/sun/star/chart2/XTitled.hpp>
-#include <com/sun/star/chart2/data/XDataReceiver.hpp>
-#include <com/sun/star/chart/ChartDataRowSource.hpp>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/sequence.hxx>
-#include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
 
 #include <com/sun/star/drawing/ShapeCollection.hpp>
-#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
 #include <com/sun/star/beans/PropertyAttribute.hpp>
 #include <com/sun/star/lang/DisposedException.hpp>
 #include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/util/DateTime.hpp>
+#include <com/sun/star/util/XRefreshable.hpp>
 #include <tools/diagnose_ex.h>
 
 #include <vector>
 #include <algorithm>
-#include <functional>
 #include <map>
-#include <o3tl/functional.hxx>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::chart;
diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
index 0562ef61f3e3..adde5bc6aec1 100644
--- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
@@ -18,11 +18,9 @@
  */
 
 #include "DataSeriesPointWrapper.hxx"
-#include <RegressionCurveHelper.hxx>
 #include "Chart2ModelContact.hxx"
 #include <ChartTypeHelper.hxx>
 #include <DiagramHelper.hxx>
-#include <ChartModelHelper.hxx>
 #include <LinePropertiesHelper.hxx>
 #include <FillProperties.hxx>
 #include <CharacterProperties.hxx>
@@ -39,7 +37,6 @@
 #include "WrappedTextRotationProperty.hxx"
 #include <unonames.hxx>
 
-#include <rtl/ustrbuf.hxx>
 #include <rtl/math.hxx>
 
 #include <algorithm>
@@ -48,9 +45,6 @@
 #include <com/sun/star/chart/ChartAxisAssign.hpp>
 #include <com/sun/star/chart/ChartErrorCategory.hpp>
 #include <com/sun/star/chart/ChartSymbolType.hpp>
-#include <com/sun/star/chart/XChartDocument.hpp>
-#include <com/sun/star/chart2/AxisType.hpp>
-#include <com/sun/star/drawing/FillStyle.hpp>
 #include <com/sun/star/drawing/LineJoint.hpp>
 #include <com/sun/star/drawing/LineStyle.hpp>
 #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index c554cf3f7f30..ea5ac7949e0e 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -21,9 +21,7 @@
 #include <servicenames_charttypes.hxx>
 #include "DataSeriesPointWrapper.hxx"
 #include "AxisWrapper.hxx"
-#include <AxisHelper.hxx>
 #include "Chart2ModelContact.hxx"
-#include <PositionAndSizeHelper.hxx>
 #include "WallFloorWrapper.hxx"
 #include "MinMaxLineWrapper.hxx"
 #include "UpDownBarWrapper.hxx"
@@ -38,9 +36,7 @@
 #include "WrappedSplineProperties.hxx"
 #include "WrappedStockProperties.hxx"
 #include "WrappedSceneProperty.hxx"
-#include <RelativePositionHelper.hxx>
 #include <ControllerLockGuard.hxx>
-#include <ModifyListenerHelper.hxx>
 #include <DisposeHelper.hxx>
 #include "WrappedAutomaticPositionProperties.hxx"
 #include <CommonConverters.hxx>
@@ -49,7 +45,6 @@
 #include <cppuhelper/supportsservice.hxx>
 
 #include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <com/sun/star/chart2/XTitled.hpp>
 #include <com/sun/star/chart/ChartDataRowSource.hpp>
 #include <com/sun/star/chart2/RelativeSize.hpp>
 #include <com/sun/star/chart2/RelativePosition.hpp>
@@ -65,7 +60,6 @@
 
 #include <algorithm>
 #include <map>
-#include <rtl/ustrbuf.hxx>
 #include <com/sun/star/lang/XServiceName.hpp>
 #include <com/sun/star/util/XRefreshable.hpp>
 #include <tools/diagnose_ex.h>
diff --git a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
index d4df5f2cb025..c699e51db73a 100644
--- a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
@@ -21,7 +21,6 @@
 #include <AxisHelper.hxx>
 #include "Chart2ModelContact.hxx"
 #include <AxisIndexDefines.hxx>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
 
 #include <LinePropertiesHelper.hxx>
 #include <UserDefinedProperties.hxx>
@@ -30,8 +29,6 @@
 #include <comphelper/sequence.hxx>
 #include <cppuhelper/supportsservice.hxx>
 #include <algorithm>
-#include <rtl/ustrbuf.hxx>
-#include <rtl/math.hxx>
 #include <tools/diagnose_ex.h>
 
 using namespace ::com::sun::star;
diff --git a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
index 78a149a0ded2..287b83901794 100644
--- a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
@@ -19,17 +19,14 @@
 
 #include "LegendWrapper.hxx"
 #include "Chart2ModelContact.hxx"
-#include <LegendHelper.hxx>
 #include <comphelper/sequence.hxx>
 #include <cppuhelper/supportsservice.hxx>
 #include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <com/sun/star/chart2/XTitled.hpp>
 #include <com/sun/star/chart/ChartLegendPosition.hpp>
 #include <com/sun/star/chart2/LegendPosition.hpp>
 #include <com/sun/star/chart/ChartLegendExpansion.hpp>
 #include <com/sun/star/chart2/RelativePosition.hpp>
 #include <com/sun/star/chart2/XDiagram.hpp>
-#include <com/sun/star/drawing/FillStyle.hpp>
 
 #include <CharacterProperties.hxx>
 #include <LinePropertiesHelper.hxx>
@@ -42,7 +39,6 @@
 #include "WrappedScaleTextProperties.hxx"
 
 #include <algorithm>
-#include <rtl/ustrbuf.hxx>
 
 using namespace ::com::sun::star;
 using ::com::sun::star::beans::Property;
diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
index fdd1368ae57d..52a94d20b6c0 100644
--- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
@@ -24,7 +24,6 @@
 #include <cppuhelper/supportsservice.hxx>
 #include <cppuhelper/propshlp.hxx>
 #include <com/sun/star/chart2/XChartType.hpp>
-#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
 #include <comphelper/sequence.hxx>
 
 #include <LinePropertiesHelper.hxx>
diff --git a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
index e6938d7bcf68..05f631fc88e0 100644
--- a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
@@ -21,9 +21,6 @@
 #include "Chart2ModelContact.hxx"
 #include <comphelper/sequence.hxx>
 #include <cppuhelper/supportsservice.hxx>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <com/sun/star/drawing/FillStyle.hpp>
-#include <com/sun/star/chart2/XDataSeries.hpp>
 #include <com/sun/star/chart2/XDiagram.hpp>
 
 #include <FillProperties.hxx>
@@ -32,8 +29,6 @@
 #include <WrappedDirectStateProperty.hxx>
 
 #include <algorithm>
-#include <rtl/ustrbuf.hxx>
-#include <rtl/math.hxx>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::chart2;
diff --git a/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx
index b05c41cb2ab3..7a554a245745 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx
@@ -19,6 +19,7 @@
 
 #include "WrappedAddInProperty.hxx"
 #include <ChartDocumentWrapper.hxx>
+#include <com/sun/star/util/XRefreshable.hpp>
 
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::uno::Any;
diff --git a/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx
index 2280eacada4a..8ac56ce8c446 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx
@@ -18,13 +18,11 @@
  */
 
 #include "WrappedAutomaticPositionProperties.hxx"
-#include "Chart2ModelContact.hxx"
 #include <FastPropertyIdRanges.hxx>
 #include <WrappedProperty.hxx>
 #include <com/sun/star/beans/PropertyAttribute.hpp>
 #include <com/sun/star/beans/XPropertyState.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/chart2/RelativePosition.hpp>
 #include <tools/diagnose_ex.h>
 
 using namespace ::com::sun::star;
diff --git a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
index 829bba7fb119..ad349fa0275a 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
@@ -20,7 +20,6 @@
 #include "WrappedAxisAndGridExistenceProperties.hxx"
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <AxisHelper.hxx>
-#include <ChartModelHelper.hxx>
 #include <WrappedProperty.hxx>
 #include "Chart2ModelContact.hxx"
 #include <TitleHelper.hxx>
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx
index 772167514b2f..1f5b011c3538 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx
@@ -20,7 +20,6 @@
 #include "WrappedSceneProperty.hxx"
 #include "Chart2ModelContact.hxx"
 #include <DiagramHelper.hxx>
-#include <servicenames_charttypes.hxx>
 #include <BaseGFXHelper.hxx>
 
 using namespace ::com::sun::star;
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
index a3d2d517c23e..c274f88aa48f 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
@@ -21,24 +21,23 @@
 #include "WrappedSeriesOrDiagramProperty.hxx"
 #include <FastPropertyIdRanges.hxx>
 #include <RegressionCurveHelper.hxx>
-#include <DiagramHelper.hxx>
 #include <ErrorBar.hxx>
 #include <StatisticsHelper.hxx>
 #include <unonames.hxx>
 
 #include <com/sun/star/beans/PropertyAttribute.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/beans/Property.hpp>
 #include <com/sun/star/chart/ChartErrorCategory.hpp>
 #include <com/sun/star/chart/ErrorBarStyle.hpp>
 #include <com/sun/star/chart/ChartErrorIndicatorType.hpp>
 #include <com/sun/star/chart/ChartRegressionCurveType.hpp>
 #include <com/sun/star/chart2/XChartDocument.hpp>
-#include <com/sun/star/chart2/data/XDataProvider.hpp>
 #include <com/sun/star/chart2/data/XRangeXMLConversion.hpp>
 #include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
 #include <utility>
 
+namespace com { namespace sun { namespace star { namespace chart2 { namespace data { class XDataProvider; } } } } }
+
 using namespace ::com::sun::star;
 using ::com::sun::star::uno::Any;
 using ::com::sun::star::uno::Reference;
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx
index ce856e20b60a..9123543d9036 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx
@@ -21,7 +21,6 @@
 #include "Chart2ModelContact.hxx"
 #include <FastPropertyIdRanges.hxx>
 #include <DiagramHelper.hxx>
-#include <ChartModelHelper.hxx>
 #include <ControllerLockGuard.hxx>
 #include <WrappedProperty.hxx>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
index 01e7c07bb562..558e800a2f7f 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
@@ -29,9 +29,7 @@
 #include <com/sun/star/drawing/LineStyle.hpp>
 #include <vcl/GraphicLoader.hxx>
 
-#include <editeng/unoprnms.hxx>
 #include <vcl/graph.hxx>
-#include <vcl/GraphicObject.hxx>
 #include <vcl/outdev.hxx>
 #include <tools/diagnose_ex.h>
 #include <sal/log.hxx>
diff --git a/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx
index 365c6af63b28..81fa4775a83f 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx
@@ -18,7 +18,8 @@
  */
 
 #include "WrappedTextRotationProperty.hxx"
-#include <com/sun/star/beans/XPropertyState.hpp>
+
+namespace com { namespace sun { namespace star { namespace beans { class XPropertyState; } } } }
 
 using namespace ::com::sun::star;
 using ::com::sun::star::uno::Any;
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
index 56a7a2173c88..c34540f6a8e1 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
@@ -28,16 +28,10 @@
 #include <unonames.hxx>
 
 #include <com/sun/star/chart2/DataPointGeometry3D.hpp>
-#include <com/sun/star/chart2/PieChartOffsetMode.hpp>
-#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
 #include <com/sun/star/chart2/XChartDocument.hpp>
 
-#include <svtools/controldims.hxx>
 #include <svtools/valueset.hxx>
-#include <vcl/bitmap.hxx>
-#include <vcl/builder.hxx>
 #include <vcl/image.hxx>
-#include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
 
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index 740735d45829..24e5f5e0ed2a 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <svl/zformat.hxx>
 #include <svl/zforlist.hxx>
 
 #include "DataBrowser.hxx"
@@ -25,7 +24,6 @@
 #include <strings.hrc>
 #include <DataSeriesHelper.hxx>
 #include <DiagramHelper.hxx>
-#include <ChartModelHelper.hxx>
 #include <CommonConverters.hxx>
 #include <NumberFormatterWrapper.hxx>
 #include <servicenames_charttypes.hxx>
@@ -47,10 +45,8 @@
 #include <com/sun/star/chart2/XChartType.hpp>
 
 #include <com/sun/star/container/XIndexReplace.hpp>
-#include <com/sun/star/util/XNumberFormats.hpp>
 
 #include <algorithm>
-#include <functional>
 
 
 using namespace ::com::sun::star;
diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx
index 15e1d00c307b..22df32c24849 100644
--- a/chart2/source/controller/dialogs/DataBrowserModel.cxx
+++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx
@@ -22,7 +22,6 @@
 #include <ChartModelHelper.hxx>
 #include <DiagramHelper.hxx>
 #include <DataSeriesHelper.hxx>
-#include <PropertyHelper.hxx>
 #include <ControllerLockGuard.hxx>
 #include <StatisticsHelper.hxx>
 #include <ChartTypeHelper.hxx>
@@ -33,13 +32,11 @@
 #include <unonames.hxx>
 
 #include <com/sun/star/container/XIndexReplace.hpp>
-#include <com/sun/star/chart2/XAxis.hpp>
 #include <com/sun/star/chart2/XDataSeriesContainer.hpp>
 #include <com/sun/star/chart2/XInternalDataProvider.hpp>
 #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
 #include <com/sun/star/chart2/XChartTypeContainer.hpp>
 #include <com/sun/star/chart2/data/XDataSource.hpp>
-#include <com/sun/star/chart2/data/XDataSink.hpp>
 #include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
 #include <com/sun/star/chart2/data/XNumericalDataSequence.hpp>
 #include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index 281f66c309f7..5f361953c1ec 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -19,23 +19,19 @@
 
 #include "DialogModel.hxx"
 #include <RangeSelectionHelper.hxx>
-#include <PropertyHelper.hxx>
 #include <DataSeriesHelper.hxx>
 #include <DataSourceHelper.hxx>
 #include <DiagramHelper.hxx>
 #include <strings.hrc>
 #include <ResId.hxx>
 #include <ContainerHelper.hxx>
-#include <CommonFunctors.hxx>
 #include <ControllerLockGuard.hxx>
 #include <ChartTypeHelper.hxx>
 #include <ThreeDHelper.hxx>
 #include <ChartModel.hxx>
 
-#include <com/sun/star/util/XCloneable.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include <com/sun/star/chart2/AxisType.hpp>
-#include <com/sun/star/chart2/XTitled.hpp>
 #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
 #include <com/sun/star/chart2/XChartDocument.hpp>
 #include <com/sun/star/chart2/XChartTypeContainer.hpp>
diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
index f36375af474f..df7aee8ba8de 100644
--- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx
+++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
@@ -26,7 +26,6 @@
 #include <DiagramHelper.hxx>
 #include <DataSeriesHelper.hxx>
 #include <TitleHelper.hxx>
-#include <AxisIndexDefines.hxx>
 #include <ExplicitCategoriesProvider.hxx>
 #include <CommonConverters.hxx>
 #include <NumberFormatterWrapper.hxx>
diff --git a/chart2/source/controller/dialogs/TextDirectionListBox.cxx b/chart2/source/controller/dialogs/TextDirectionListBox.cxx
index cb4afc8597f7..611251df8451 100644
--- a/chart2/source/controller/dialogs/TextDirectionListBox.cxx
+++ b/chart2/source/controller/dialogs/TextDirectionListBox.cxx
@@ -20,9 +20,6 @@
 #include <TextDirectionListBox.hxx>
 #include <ResId.hxx>
 #include <strings.hrc>
-#include <svl/languageoptions.hxx>
-#include <vcl/window.hxx>
-#include <vcl/builderfactory.hxx>
 
 namespace chart
 {
diff --git a/chart2/source/controller/dialogs/dlg_ChartType.cxx b/chart2/source/controller/dialogs/dlg_ChartType.cxx
index 44c6b06bf098..8848bc2787c4 100644
--- a/chart2/source/controller/dialogs/dlg_ChartType.cxx
+++ b/chart2/source/controller/dialogs/dlg_ChartType.cxx
@@ -18,10 +18,8 @@
  */
 
 #include <dlg_ChartType.hxx>
-#include "TabPageIds.h"
 #include "tp_ChartType.hxx"
 #include <com/sun/star/chart2/XChartDocument.hpp>
-#include <vcl/layout.hxx>
 
 
 namespace chart
diff --git a/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx b/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx
index df04dbee684a..384f1ac6e4dc 100644
--- a/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx
+++ b/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx
@@ -21,7 +21,6 @@
 #include <dlg_ChartType.hxx>
 #include <servicenames.hxx>
 #include <osl/mutex.hxx>
-#include <toolkit/helper/vclunohelper.hxx>
 #include <vcl/svapp.hxx>
 #include <com/sun/star/frame/XModel.hpp>
 
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
index 9606ae805c6f..6c3be3da57c2 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
@@ -21,16 +21,13 @@
 #include <dlg_CreationWizard.hxx>
 #include <servicenames.hxx>
 #include <TimerTriggeredControllerLock.hxx>
-#include <osl/mutex.hxx>
 #include <vcl/svapp.hxx>
 #include <toolkit/awt/vclxwindow.hxx>
-#include <cppuhelper/typeprovider.hxx>
 #include <cppuhelper/supportsservice.hxx>
 #include <com/sun/star/awt/Point.hpp>
 #include <com/sun/star/awt/Size.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <com/sun/star/frame/Desktop.hpp>
-#include <comphelper/sequence.hxx>
 #include <tools/diagnose_ex.h>
 
 namespace chart
diff --git a/chart2/source/controller/dialogs/dlg_DataEditor.cxx b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
index 45c8cdbaa27c..cc65860c3746 100644
--- a/chart2/source/controller/dialogs/dlg_DataEditor.cxx
+++ b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
@@ -22,15 +22,10 @@
 #include <comphelper/stl_types.hxx>
 
 #include <osl/diagnose.h>
-#include <sfx2/dispatch.hxx>
 #include <vcl/taskpanelist.hxx>
 #include <svtools/miscopt.hxx>
-#include <unotools/pathoptions.hxx>
-#include <svl/eitem.hxx>
-#include <vcl/edit.hxx>
 
 #include <com/sun/star/frame/XStorable.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
 
 using namespace ::com::sun::star;
 using ::com::sun::star::uno::Reference;
diff --git a/chart2/source/controller/dialogs/dlg_DataSource.cxx b/chart2/source/controller/dialogs/dlg_DataSource.cxx
index 020d2a0e26ed..856420bcc245 100644
--- a/chart2/source/controller/dialogs/dlg_DataSource.cxx
+++ b/chart2/source/controller/dialogs/dlg_DataSource.cxx
@@ -17,20 +17,17 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+
 #include <dlg_DataSource.hxx>
-#include <strings.hrc>
-#include <ResId.hxx>
 #include "ChartTypeTemplateProvider.hxx"
 #include <DiagramHelper.hxx>
-#include <ChartModel.hxx>
 #include "DialogModel.hxx"
 
 #include "tp_RangeChooser.hxx"
 #include "tp_DataSource.hxx"
 
-#include <vcl/layout.hxx>
-#include <vcl/tabctrl.hxx>
-
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::chart2;
 using namespace ::chart;
diff --git a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx
index 9a227f59b2f5..3843263ad664 100644
--- a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx
+++ b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx
@@ -19,11 +19,6 @@
 
 #include <dlg_InsertAxis_Grid.hxx>
 
-#include <chartview/ChartSfxItemIds.hxx>
-#include <ObjectNameProvider.hxx>
-
-#include <svl/eitem.hxx>
-
 namespace chart
 {
 
diff --git a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx
index 084ada9c74aa..65c201232352 100644
--- a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx
+++ b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx
@@ -27,10 +27,6 @@
 #include <AxisHelper.hxx>
 #include <ObjectNameProvider.hxx>
 
-#include <com/sun/star/chart2/XAxis.hpp>
-#include <com/sun/star/chart2/XDiagram.hpp>
-#include <vcl/settings.hxx>
-
 using ::com::sun::star::uno::Reference;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::chart2;
diff --git a/chart2/source/controller/dialogs/dlg_NumberFormat.cxx b/chart2/source/controller/dialogs/dlg_NumberFormat.cxx
index ca9a74146cc9..fa6f51c0d86b 100644
--- a/chart2/source/controller/dialogs/dlg_NumberFormat.cxx
+++ b/chart2/source/controller/dialogs/dlg_NumberFormat.cxx
@@ -20,11 +20,9 @@
 #include "dlg_NumberFormat.hxx"
 
 #include <svl/itemset.hxx>
-#include <svx/numinf.hxx>
-#include <svx/svxdlg.hxx>
 #include <svx/dialogs.hrc>
 #include <sfx2/tabdlg.hxx>
-#include <svl/zforlist.hxx>
+#include <sfx2/sfxdlg.hxx>
 
 namespace chart
 {
diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
index 13f0419a05ca..66a12ef6b3db 100644
--- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
+++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
@@ -17,9 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <svl/zforlist.hxx>
 #include <dlg_ObjectProperties.hxx>
-#include "TabPageIds.h"
 #include <strings.hrc>
 #include "tp_AxisLabel.hxx"
 #include "tp_DataLabel.hxx"
@@ -39,7 +37,6 @@
 #include <ObjectNameProvider.hxx>
 #include <DiagramHelper.hxx>
 #include <NumberFormatterWrapper.hxx>
-#include <AxisIndexDefines.hxx>
 #include <AxisHelper.hxx>
 #include <ExplicitCategoriesProvider.hxx>
 #include <ChartModel.hxx>
@@ -48,8 +45,6 @@
 
 #include <com/sun/star/chart2/AxisType.hpp>
 #include <com/sun/star/chart2/XAxis.hpp>
-#include <com/sun/star/chart2/XChartType.hpp>
-#include <com/sun/star/chart2/XDataSeries.hpp>
 #include <svl/intitem.hxx>
 #include <svl/languageoptions.hxx>
 
@@ -61,7 +56,6 @@
 
 #include <svx/dialogs.hrc>
 #include <editeng/flstitem.hxx>
-#include <svx/tabline.hxx>
 
 #include <svx/flagsdef.hxx>
 #include <svx/numinf.hxx>
@@ -69,6 +63,9 @@
 #include <svl/cjkoptions.hxx>
 #include <tools/diagnose_ex.h>
 
+namespace com { namespace sun { namespace star { namespace chart2 { class XChartType; } } } }
+namespace com { namespace sun { namespace star { namespace chart2 { class XDataSeries; } } } }
+
 namespace chart
 {
 
diff --git a/chart2/source/controller/dialogs/dlg_ShapeFont.cxx b/chart2/source/controller/dialogs/dlg_ShapeFont.cxx
index 7b257b556b44..d91385be94ce 100644
--- a/chart2/source/controller/dialogs/dlg_ShapeFont.cxx
+++ b/chart2/source/controller/dialogs/dlg_ShapeFont.cxx
@@ -19,10 +19,8 @@
 
 #include <dlg_ShapeFont.hxx>
 #include <ViewElementListProvider.hxx>
-#include "TabPageIds.h"
 
 #include <svl/intitem.hxx>
-#include <sfx2/objsh.hxx>
 #include <svx/dialogs.hrc>
 #include <svx/flagsdef.hxx>
 #include <editeng/flstitem.hxx>
diff --git a/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx b/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx
index b203e13b3d7c..ccef966d0385 100644
--- a/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx
+++ b/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx
@@ -18,7 +18,6 @@
  */
 
 #include <dlg_ShapeParagraph.hxx>
-#include "TabPageIds.h"
 
 #include <svl/cjkoptions.hxx>
 #include <svl/intitem.hxx>
diff --git a/chart2/source/controller/dialogs/dlg_View3D.cxx b/chart2/source/controller/dialogs/dlg_View3D.cxx
index e4db6f6a2818..fc329ce6b733 100644
--- a/chart2/source/controller/dialogs/dlg_View3D.cxx
+++ b/chart2/source/controller/dialogs/dlg_View3D.cxx
@@ -25,7 +25,6 @@
 #include "tp_3D_SceneAppearance.hxx"
 #include "tp_3D_SceneIllumination.hxx"
 #include <ChartModelHelper.hxx>
-#include <ControllerLockGuard.hxx>
 #include <com/sun/star/beans/XPropertySet.hpp>
 
 namespace chart
diff --git a/chart2/source/controller/dialogs/res_BarGeometry.cxx b/chart2/source/controller/dialogs/res_BarGeometry.cxx
index d067ae711978..128a1bc8ba32 100644
--- a/chart2/source/controller/dialogs/res_BarGeometry.cxx
+++ b/chart2/source/controller/dialogs/res_BarGeometry.cxx
@@ -18,7 +18,6 @@
  */
 
 #include "res_BarGeometry.hxx"
-#include <vcl/builder.hxx>
 #include <ResId.hxx>
 #include <chart.hrc>
 
diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx
index 0d7e48f264b5..2889bdb74f13 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.cxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.cxx
@@ -31,8 +31,6 @@
 #include <editeng/eeitem.hxx>
 #include <editeng/frmdiritem.hxx>
 #include <svx/svxids.hrc>
-#include <svl/zforlist.hxx>
-#include <svtools/controldims.hxx>
 #include <osl/diagnose.h>
 
 namespace chart
diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx
index 5d3296953370..8d0517ce1970 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar.cxx
+++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx
@@ -20,10 +20,10 @@
 #include <res_ErrorBar.hxx>
 #include <bitmaps.hlst>
 #include <RangeSelectionHelper.hxx>
-#include <TabPageNotifiable.hxx>
 #include <helpids.h>
 #include <chartview/ChartSfxItemIds.hxx>
 #include <com/sun/star/chart2/XChartDocument.hpp>
+#include <vcl/dialog.hxx>
 
 #include <rtl/math.hxx>
 #include <sal/log.hxx>
diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx b/chart2/source/controller/dialogs/res_LegendPosition.cxx
index 68e64d84f34a..abe3f2688cec 100644
--- a/chart2/source/controller/dialogs/res_LegendPosition.cxx
+++ b/chart2/source/controller/dialogs/res_LegendPosition.cxx
@@ -22,7 +22,6 @@
 #include <LegendHelper.hxx>
 #include <ChartModel.hxx>
 
-#include <svtools/controldims.hxx>
 #include <com/sun/star/chart2/LegendPosition.hpp>
 #include <com/sun/star/chart/ChartLegendExpansion.hpp>
 
@@ -31,7 +30,7 @@
 #include <svl/intitem.hxx>
 #include <svl/eitem.hxx>
 #include <tools/diagnose_ex.h>
-#include <vcl/builder.hxx>
+#include <vcl/weld.hxx>
 
 namespace chart
 {
diff --git a/chart2/source/controller/dialogs/res_Titles.cxx b/chart2/source/controller/dialogs/res_Titles.cxx
index b10cd19aa95d..22bb474b2f82 100644
--- a/chart2/source/controller/dialogs/res_Titles.cxx
+++ b/chart2/source/controller/dialogs/res_Titles.cxx
@@ -19,8 +19,7 @@
 
 #include <res_Titles.hxx>
 #include <TitleDialogData.hxx>
-#include <svtools/controldims.hxx>
-#include <vcl/builder.hxx>
+#include <vcl/weld.hxx>
 
 namespace chart
 {
diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx b/chart2/source/controller/dialogs/res_Trendline.cxx
index 8f140428a9da..1e39e1fdfb86 100644
--- a/chart2/source/controller/dialogs/res_Trendline.cxx
+++ b/chart2/source/controller/dialogs/res_Trendline.cxx
@@ -21,14 +21,10 @@
 #include <bitmaps.hlst>
 #include <chartview/ChartSfxItemIds.hxx>
 
-#include <editeng/sizeitem.hxx>
 #include <svl/intitem.hxx>
 #include <svl/stritem.hxx>
 #include <svl/zforlist.hxx>
-#include <sfx2/tabdlg.hxx>
-
-#include <vector>
-#include <algorithm>
+#include <vcl/weld.hxx>
 
 namespace chart
 {
diff --git a/chart2/source/controller/dialogs/res_Trendline.hxx b/chart2/source/controller/dialogs/res_Trendline.hxx
index 0d5eb85e8a1f..91f70f241bfc 100644
--- a/chart2/source/controller/dialogs/res_Trendline.hxx
+++ b/chart2/source/controller/dialogs/res_Trendline.hxx
@@ -19,9 +19,18 @@
 #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_RES_TRENDLINE_HXX
 #define INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_RES_TRENDLINE_HXX
 
+#include <tools/link.hxx>
 #include <svl/itemset.hxx>
 #include <svx/chrtitem.hxx>
-#include <vcl/weld.hxx>
+
+namespace weld { class Builder; }
+namespace weld { class CheckButton; }
+namespace weld { class Entry; }
+namespace weld { class FormattedSpinButton; }
+namespace weld { class Image; }
+namespace weld { class RadioButton; }
+namespace weld { class SpinButton; }
+namespace weld { class ToggleButton; }
 
 class SvNumberFormatter;
 
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx
index e261cff87d3c..781cd535b47c 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx
@@ -21,7 +21,6 @@
 #include <ChartModelHelper.hxx>
 #include <ThreeDHelper.hxx>
 #include <ControllerLockGuard.hxx>
-#include <rtl/math.hxx>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/drawing/ShadeMode.hpp>
 #include <tools/diagnose_ex.h>
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
index 43cb32e001e2..729f9606033e 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
@@ -19,13 +19,10 @@
 
 #include "tp_3D_SceneGeometry.hxx"
 
-#include <BaseGFXHelper.hxx>
 #include <DiagramHelper.hxx>
 #include <ChartTypeHelper.hxx>
 #include <ThreeDHelper.hxx>
 #include <ControllerLockGuard.hxx>
-#include <rtl/math.hxx>
-#include <editeng/unoprnms.hxx>
 #include <com/sun/star/drawing/ProjectionMode.hpp>
 #include <tools/diagnose_ex.h>
 #include <tools/helpers.hxx>
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
index a6e70f363af6..4b5265d2239e 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
@@ -23,10 +23,8 @@
 #include <ControllerLockGuard.hxx>
 
 #include <svx/colorbox.hxx>
-#include <svx/dialogs.hrc>
 #include <svx/strings.hrc>
 #include <svx/dialmgr.hxx>
-#include <rtl/math.hxx>
 #include <svtools/colrdlg.hxx>
 #include <svx/svx3ditems.hxx>
 #include <svx/svddef.hxx>
diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
index 0272b44a97aa..066eefcdbd50 100644
--- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
@@ -19,7 +19,6 @@
 
 #include "tp_AxisLabel.hxx"
 
-#include "TabPageIds.h"
 #include <chartview/ChartSfxItemIds.hxx>
 #include <TextDirectionListBox.hxx>
 
diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
index 4c098e6273a5..3fdc197f6583 100644
--- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
@@ -19,20 +19,12 @@
 
 #include "tp_AxisPositions.hxx"
 
-#include "TabPageIds.h"
 #include <chartview/ChartSfxItemIds.hxx>
 #include <AxisHelper.hxx>
 
-#include <svx/svxids.hrc>
 #include <rtl/math.hxx>
 #include <svx/chrtitem.hxx>
-#include <svl/eitem.hxx>
 #include <svl/intitem.hxx>
-#include <svl/zformat.hxx>
-#include <svtools/controldims.hxx>
-
-#include <com/sun/star/chart/ChartAxisPosition.hpp>
-#include <com/sun/star/chart2/AxisType.hpp>
 
 using namespace ::com::sun::star;
 
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index bec21d752cf1..855885b459d6 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -23,12 +23,10 @@
 #include <ChartModelHelper.hxx>
 #include <DiagramHelper.hxx>
 #include "res_BarGeometry.hxx"
-#include <ControllerLockGuard.hxx>
 #include <unonames.hxx>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/chart2/XChartDocument.hpp>
 
-#include <svtools/controldims.hxx>
 #include <svtools/valueset.hxx>
 
 #include <o3tl/make_unique.hxx>
diff --git a/chart2/source/controller/dialogs/tp_DataLabel.cxx b/chart2/source/controller/dialogs/tp_DataLabel.cxx
index 7d189fad49ca..e64e5d4ed385 100644
--- a/chart2/source/controller/dialogs/tp_DataLabel.cxx
+++ b/chart2/source/controller/dialogs/tp_DataLabel.cxx
@@ -19,8 +19,6 @@
 
 #include "tp_DataLabel.hxx"
 
-#include "TabPageIds.h"
-
 namespace chart
 {
 
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index 758664428019..3fddd55005ac 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -20,7 +20,6 @@
 #include "tp_DataSource.hxx"
 #include <strings.hrc>
 #include <ResId.hxx>
-#include <chartview/ChartSfxItemIds.hxx>
 #include "ChartTypeTemplateProvider.hxx"
 #include <RangeSelectionHelper.hxx>
 #include <DataSeriesHelper.hxx>
@@ -28,21 +27,13 @@
 #include <DataSourceHelper.hxx>
 #include "DialogModel.hxx"
 #include <TabPageNotifiable.hxx>
-#include <com/sun/star/sheet/XRangeSelection.hpp>
-#include <com/sun/star/table/XCellRange.hpp>
 #include <com/sun/star/chart2/XChartType.hpp>
-#include <com/sun/star/chart2/XChartTypeTemplate.hpp>
 #include <com/sun/star/chart2/data/XDataProvider.hpp>
 #include <com/sun/star/util/XModifiable.hpp>
 #include <com/sun/star/chart2/data/XDataSink.hpp>
 
-#include <rtl/ustrbuf.hxx>
 #include <tools/diagnose_ex.h>
 
-#include <functional>
-#include <algorithm>
-#include <map>
-
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::chart2;
 
diff --git a/chart2/source/controller/dialogs/tp_DataSource.hxx b/chart2/source/controller/dialogs/tp_DataSource.hxx
index 0d237ffa79a5..7c4f9b437e3e 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.hxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.hxx
@@ -21,10 +21,6 @@
 
 #include <svtools/wizardmachine.hxx>
 
-#include <vcl/fixed.hxx>
-#include <vcl/svtabbx.hxx>
-#include <vcl/treelistbox.hxx>
-
 #include <RangeSelectionListener.hxx>
 
 namespace com { namespace sun { namespace star { namespace chart2 { class XChartType; } } } }
diff --git a/chart2/source/controller/dialogs/tp_ErrorBars.cxx b/chart2/source/controller/dialogs/tp_ErrorBars.cxx
index 5288224f8e6f..7ad67dbe32d7 100644
--- a/chart2/source/controller/dialogs/tp_ErrorBars.cxx
+++ b/chart2/source/controller/dialogs/tp_ErrorBars.cxx
@@ -18,8 +18,6 @@
  */
 
 #include "tp_ErrorBars.hxx"
-#include "TabPageIds.h"
-#include <TabPageNotifiable.hxx>
 #include <vcl/settings.hxx>
 
 using namespace ::com::sun::star;
diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.cxx b/chart2/source/controller/dialogs/tp_LegendPosition.cxx
index 0e358234e51e..efd8a29c790e 100644
--- a/chart2/source/controller/dialogs/tp_LegendPosition.cxx
+++ b/chart2/source/controller/dialogs/tp_LegendPosition.cxx
@@ -18,11 +18,8 @@
  */
 
 #include "tp_LegendPosition.hxx"
-#include "TabPageIds.h"
 #include <res_LegendPosition.hxx>
 #include <TextDirectionListBox.hxx>
-#include <chartview/ChartSfxItemIds.hxx>
-#include <svx/chrtitem.hxx>
 #include <editeng/eeitem.hxx>
 #include <editeng/frmdiritem.hxx>
 
diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.cxx b/chart2/source/controller/dialogs/tp_PointGeometry.cxx
index a3717c81f729..bbf87155d895 100644
--- a/chart2/source/controller/dialogs/tp_PointGeometry.cxx
+++ b/chart2/source/controller/dialogs/tp_PointGeometry.cxx
@@ -18,7 +18,6 @@
  */
 
 #include "tp_PointGeometry.hxx"
-#include "TabPageIds.h"
 #include "res_BarGeometry.hxx"
 
 #include <chartview/ChartSfxItemIds.hxx>
diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.cxx b/chart2/source/controller/dialogs/tp_PolarOptions.cxx
index a33bbcfa17ca..df169e8ddb37 100644
--- a/chart2/source/controller/dialogs/tp_PolarOptions.cxx
+++ b/chart2/source/controller/dialogs/tp_PolarOptions.cxx
@@ -20,11 +20,8 @@
 #include "tp_PolarOptions.hxx"
 #include <chartview/ChartSfxItemIds.hxx>
 
-#include <editeng/sizeitem.hxx>
 #include <svl/eitem.hxx>
 #include <svl/intitem.hxx>
-#include <svtools/controldims.hxx>
-#include <svx/chrtitem.hxx>
 
 namespace chart
 {
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
index 130ab64df371..5a7db1ae3878 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
@@ -19,15 +19,12 @@
 
 #include "tp_RangeChooser.hxx"
 #include <DataSourceHelper.hxx>
-#include <DiagramHelper.hxx>
 #include "ChartTypeTemplateProvider.hxx"
 #include "DialogModel.hxx"
 #include <RangeSelectionHelper.hxx>
 #include <TabPageNotifiable.hxx>
-#include <com/sun/star/awt/XTopWindow.hpp>
-#include <com/sun/star/embed/EmbedStates.hpp>
-#include <com/sun/star/embed/XComponentSupplier.hpp>
-#include <com/sun/star/chart2/XChartTypeTemplate.hpp>
+#include <com/sun/star/beans/PropertyState.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
 #include <svtools/miscopt.hxx>
 #include <osl/diagnose.h>
 
diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx
index 5c320ddf6151..561295f9756d 100644
--- a/chart2/source/controller/dialogs/tp_Scale.cxx
+++ b/chart2/source/controller/dialogs/tp_Scale.cxx
@@ -25,14 +25,12 @@
 #include <AxisHelper.hxx>
 
 #include <svx/svxids.hrc>
-#include <rtl/math.hxx>
 #include <osl/diagnose.h>
 #include <svx/chrtitem.hxx>
 #include <svl/eitem.hxx>
 #include <svl/intitem.hxx>
 #include <vcl/weld.hxx>
 #include <svl/zformat.hxx>
-#include <svtools/controldims.hxx>
 
 #include <com/sun/star/chart2/AxisType.hpp>
 
diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
index 91f2255cf99e..e7b344bce71a 100644
--- a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
+++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
@@ -21,12 +21,9 @@
 
 #include <chartview/ChartSfxItemIds.hxx>
 
-#include <editeng/sizeitem.hxx>
 #include <svl/eitem.hxx>
 #include <svl/intitem.hxx>
 #include <svl/ilstitem.hxx>
-#include <svtools/controldims.hxx>
-#include <svx/chrtitem.hxx>
 
 #include <com/sun/star/chart/MissingValueTreatment.hpp>
 
diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.cxx b/chart2/source/controller/dialogs/tp_TitleRotation.cxx
index d82092513047..b9d73f337cc0 100644
--- a/chart2/source/controller/dialogs/tp_TitleRotation.cxx
+++ b/chart2/source/controller/dialogs/tp_TitleRotation.cxx
@@ -19,7 +19,6 @@
 
 #include "tp_TitleRotation.hxx"
 
-#include "TabPageIds.h"
 #include <chartview/ChartSfxItemIds.hxx>
 #include <TextDirectionListBox.hxx>
 
diff --git a/chart2/source/controller/dialogs/tp_Trendline.cxx b/chart2/source/controller/dialogs/tp_Trendline.cxx
index 60d77bf29280..b04051a8a63a 100644
--- a/chart2/source/controller/dialogs/tp_Trendline.cxx
+++ b/chart2/source/controller/dialogs/tp_Trendline.cxx
@@ -18,7 +18,6 @@
  */
 
 #include "tp_Trendline.hxx"
-#include "TabPageIds.h"
 #include <vcl/settings.hxx>
 
 namespace chart
diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
index 7b8dc3936fb8..628b77fc13f9 100644
--- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
+++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
@@ -22,7 +22,6 @@
 #include <res_LegendPosition.hxx>
 #include <ChartModelHelper.hxx>
 #include <AxisHelper.hxx>
-#include <LegendHelper.hxx>
 #include <ControllerLockGuard.hxx>
 #include <com/sun/star/frame/XModel.hpp>
 
diff --git a/chart2/source/controller/inc/ChartController.hxx b/chart2/source/controller/inc/ChartController.hxx
index eac60f235fa9..d7e374857ba0 100644
--- a/chart2/source/controller/inc/ChartController.hxx
+++ b/chart2/source/controller/inc/ChartController.hxx
@@ -52,7 +52,6 @@ namespace com { namespace sun { namespace star { namespace awt { class XWindow;
 namespace com { namespace sun { namespace star { namespace awt { class XWindowListener; } } } }
 namespace com { namespace sun { namespace star { namespace awt { struct Point; } } } }
 namespace com { namespace sun { namespace star { namespace document { class XUndoManager; } } } }
-namespace com { namespace sun { namespace star { namespace frame { class XController; } } } }
 namespace com { namespace sun { namespace star { namespace frame { class XDispatch; } } } }
 namespace com { namespace sun { namespace star { namespace frame { class XLayoutManagerEventBroadcaster; } } } }
 namespace com { namespace sun { namespace star { namespace lang { class XInitialization; } } } }
diff --git a/chart2/source/controller/inc/ChartDocumentWrapper.hxx b/chart2/source/controller/inc/ChartDocumentWrapper.hxx
index 8b4945c34d50..0a6a52f2c23f 100644
--- a/chart2/source/controller/inc/ChartDocumentWrapper.hxx
+++ b/chart2/source/controller/inc/ChartDocumentWrapper.hxx
@@ -20,19 +20,19 @@
 #define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_CHARTDOCUMENTWRAPPER_HXX
 
 #include <WrappedPropertySet.hxx>
-#include <com/sun/star/chart2/XChartDocument.hpp>
 #include <com/sun/star/chart/XChartDocument.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
 #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/uno/XAggregation.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/util/XRefreshable.hpp>
 #include <cppuhelper/implbase.hxx>
 #include <unotools/eventlisteneradapter.hxx>
 
 #include <memory>
 
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
+namespace com { namespace sun { namespace star { namespace util { class XRefreshable; } } } }
+
 namespace chart
 {
 
diff --git a/chart2/source/controller/inc/TextDirectionListBox.hxx b/chart2/source/controller/inc/TextDirectionListBox.hxx
index 8f50065eedce..7db7d674e0bb 100644
--- a/chart2/source/controller/inc/TextDirectionListBox.hxx
+++ b/chart2/source/controller/inc/TextDirectionListBox.hxx
@@ -22,8 +22,6 @@
 
 #include <svx/frmdirlbox.hxx>
 
-namespace vcl { class Window; }
-
 namespace chart
 {
 
diff --git a/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx b/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx
index 2eed39a2a19d..a54adb5c6a5e 100644
--- a/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx
+++ b/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx
@@ -30,6 +30,7 @@
 
 #include <tools/link.hxx>
 #include <vcl/vclptr.hxx>
+#include "dlg_CreationWizard.hxx"
 
 namespace com { namespace sun { namespace star { namespace awt { class XWindow; } } } }
 namespace com { namespace sun { namespace star { namespace frame { class XModel; } } } }
@@ -40,7 +41,6 @@ class VclWindowEvent;
 namespace chart
 {
 
-class CreationWizard;
 class CreationWizardUnoDlg : public MutexContainer
                             , public ::cppu::OComponentHelper
                             , public css::ui::dialogs::XExecutableDialog
diff --git a/chart2/source/controller/inc/dlg_DataSource.hxx b/chart2/source/controller/inc/dlg_DataSource.hxx
index 64273e9d5b20..b708a2c97a8d 100644
--- a/chart2/source/controller/inc/dlg_DataSource.hxx
+++ b/chart2/source/controller/inc/dlg_DataSource.hxx
@@ -34,7 +34,6 @@ class TabPage;
 namespace chart
 {
 
-class DataSourceTabControl;
 class RangeChooserTabPage;
 class DataSourceTabPage;
 class ChartTypeTemplateProvider;
diff --git a/chart2/source/controller/inc/res_ErrorBar.hxx b/chart2/source/controller/inc/res_ErrorBar.hxx
index db9030f1a1d6..7ed5f2d50fc9 100644
--- a/chart2/source/controller/inc/res_ErrorBar.hxx
+++ b/chart2/source/controller/inc/res_ErrorBar.hxx
@@ -20,13 +20,25 @@
 #define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_RES_ERRORBAR_HXX
 
 #include <memory>
-#include <vcl/weld.hxx>
-#include <sfx2/tabdlg.hxx>
+#include <tools/link.hxx>
 #include <svl/itemset.hxx>
 #include <svx/chrtitem.hxx>
+#include <vcl/tabpage.hxx>
 #include "RangeSelectionListener.hxx"
 
 namespace com { namespace sun { namespace star { namespace chart2 { class XChartDocument; } } } }
+namespace weld { class Builder; }
+namespace weld { class Button; }
+namespace weld { class CheckButton; }
+namespace weld { class ComboBox; }
+namespace weld { class Entry; }
+namespace weld { class Frame; }
+namespace weld { class Image; }
+namespace weld { class Label; }
+namespace weld { class MetricSpinButton; }
+namespace weld { class RadioButton; }
+namespace weld { class ToggleButton; }
+namespace weld { class Widget; }
 
 namespace chart
 {
diff --git a/chart2/source/controller/inc/res_LegendPosition.hxx b/chart2/source/controller/inc/res_LegendPosition.hxx
index f5e9ab9445b7..f5901ef33f41 100644
--- a/chart2/source/controller/inc/res_LegendPosition.hxx
+++ b/chart2/source/controller/inc/res_LegendPosition.hxx
@@ -19,11 +19,15 @@
 #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_RES_LEGENDPOSITION_HXX
 #define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_RES_LEGENDPOSITION_HXX
 
-#include <vcl/weld.hxx>
 #include <svl/itemset.hxx>
+#include <tools/link.hxx>
 
 namespace com { namespace sun { namespace star { namespace frame { class XModel; } } } }
 namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
+namespace weld { class Builder; }
+namespace weld { class CheckButton; }
+namespace weld { class RadioButton; }
+namespace weld { class ToggleButton; }
 
 namespace chart
 {
diff --git a/chart2/source/controller/inc/res_Titles.hxx b/chart2/source/controller/inc/res_Titles.hxx
index ce9d950c5568..e8e7644809ee 100644
--- a/chart2/source/controller/inc/res_Titles.hxx
+++ b/chart2/source/controller/inc/res_Titles.hxx
@@ -20,7 +20,11 @@
 #define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_RES_TITLES_HXX
 
 #include "TitleDialogData.hxx"
-#include <vcl/weld.hxx>
+
+template <typename Arg, typename Ret> class Link;
+namespace weld { class Builder; }
+namespace weld { class Entry; }
+namespace weld { class Label; }
 
 namespace chart
 {
diff --git a/chart2/source/controller/sidebar/ChartAxisPanel.hxx b/chart2/source/controller/sidebar/ChartAxisPanel.hxx
index 1fc63544d27c..70f0d7583868 100644
--- a/chart2/source/controller/sidebar/ChartAxisPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartAxisPanel.hxx
@@ -16,7 +16,6 @@
 #include <sfx2/sidebar/SidebarModelUpdate.hxx>
 #include <svx/sidebar/PanelLayout.hxx>
 #include <vcl/layout.hxx>
-#include <vcl/edit.hxx>
 
 #include "ChartSidebarModifyListener.hxx"
 #include "ChartSidebarSelectionListener.hxx"
@@ -24,6 +23,7 @@
 namespace com { namespace sun { namespace star { namespace util { class XModifyListener; } } } }
 namespace com { namespace sun { namespace star { namespace view { class XSelectionChangeListener; } } } }
 
+class Edit;
 class ListBox;
 class MetricField;
 
diff --git a/chart2/source/inc/LifeTime.hxx b/chart2/source/inc/LifeTime.hxx
index 39b2ec640245..4fc1908c6bcc 100644
--- a/chart2/source/inc/LifeTime.hxx
+++ b/chart2/source/inc/LifeTime.hxx
@@ -32,7 +32,6 @@ namespace com { namespace sun { namespace star { namespace util { class XCloseab
 namespace apphelper
 {
 
-class LifeTimeGuard;
 class OOO_DLLPUBLIC_CHARTTOOLS LifeTimeManager
 {
 friend class LifeTimeGuard;
diff --git a/chart2/source/inc/NumberFormatterWrapper.hxx b/chart2/source/inc/NumberFormatterWrapper.hxx
index 74a0976a5a51..bf999ea6e1e2 100644
--- a/chart2/source/inc/NumberFormatterWrapper.hxx
+++ b/chart2/source/inc/NumberFormatterWrapper.hxx
@@ -30,8 +30,6 @@ class Color;
 namespace chart
 {
 
-class FixedNumberFormatter;
-
 class OOO_DLLPUBLIC_CHARTTOOLS NumberFormatterWrapper final
 {
 public:
diff --git a/chart2/source/inc/chartview/ChartSfxItemIds.hxx b/chart2/source/inc/chartview/ChartSfxItemIds.hxx
index c1de0a8a6864..b28bf1e548c7 100644
--- a/chart2/source/inc/chartview/ChartSfxItemIds.hxx
+++ b/chart2/source/inc/chartview/ChartSfxItemIds.hxx
@@ -19,9 +19,15 @@
 #ifndef INCLUDED_CHART2_SOURCE_INC_CHARTVIEW_CHARTSFXITEMIDS_HXX
 #define INCLUDED_CHART2_SOURCE_INC_CHARTVIEW_CHARTSFXITEMIDS_HXX
 
-#include <svl/ilstitem.hxx>
-#include <svx/chrtitem.hxx>
-#include <editeng/brushitem.hxx>
+class SvxSizeItem;
+class SfxIntegerListItem;
+class SfxBoolItem;
+class SfxStringItem;
+class SfxInt32Item;
+class SfxUInt32Item;
+class SvxChartIndicateItem;
+class SvxDoubleItem;
+class SvxBrushItem;
 
 // SCHATTR
 


More information about the Libreoffice-commits mailing list