summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorGabor Kelemen <kelemeng@ubuntu.com>2018-11-30 01:31:19 +0100
committerMiklos Vajna <vmiklos@collabora.com>2018-12-14 09:39:29 +0100
commit117d91cfb4a11b9fc71ca58fc60345c6b05dd5aa (patch)
tree47c899b06cf1321bd47267f8baa70074c7776ec2 /chart2
parent1d17cab6becbf24187633761b953c43b0800bb49 (diff)
tdf#42949 Fix IWYU warnings in chart2/source/controller/*/cxx (1)
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Cleaned directories are: accessibility, drawinglayer, itemsetwrapper, main, sidebar Change-Id: I612eae9dec636d57a3a3a00102d74b964da5b54c Reviewed-on: https://gerrit.libreoffice.org/64307 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/IwyuFilter_chart2.yaml19
-rw-r--r--chart2/source/controller/accessibility/AccessibleBase.cxx12
-rw-r--r--chart2/source/controller/accessibility/AccessibleChartElement.cxx3
-rw-r--r--chart2/source/controller/accessibility/AccessibleChartShape.cxx2
-rw-r--r--chart2/source/controller/accessibility/AccessibleChartView.cxx2
-rw-r--r--chart2/source/controller/accessibility/AccessibleTextHelper.cxx1
-rw-r--r--chart2/source/controller/drawinglayer/DrawViewWrapper.cxx3
-rw-r--r--chart2/source/controller/drawinglayer/ViewElementListProvider.cxx11
-rw-r--r--chart2/source/controller/inc/CommandDispatchContainer.hxx1
-rw-r--r--chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx2
-rw-r--r--chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx2
-rw-r--r--chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx4
-rw-r--r--chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx12
-rw-r--r--chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx7
-rw-r--r--chart2/source/controller/itemsetwrapper/ItemConverter.cxx1
-rw-r--r--chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx4
-rw-r--r--chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx3
-rw-r--r--chart2/source/controller/itemsetwrapper/MultipleItemConverter.cxx2
-rw-r--r--chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx4
-rw-r--r--chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx4
-rw-r--r--chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx8
-rw-r--r--chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx11
-rw-r--r--chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx4
-rw-r--r--chart2/source/controller/main/ChartController.cxx8
-rw-r--r--chart2/source/controller/main/ChartController_EditData.cxx3
-rw-r--r--chart2/source/controller/main/ChartController_Insert.cxx3
-rw-r--r--chart2/source/controller/main/ChartController_Position.cxx1
-rw-r--r--chart2/source/controller/main/ChartController_Properties.cxx2
-rw-r--r--chart2/source/controller/main/ChartController_TextEdit.cxx6
-rw-r--r--chart2/source/controller/main/ChartController_Tools.cxx5
-rw-r--r--chart2/source/controller/main/ChartController_Window.cxx3
-rw-r--r--chart2/source/controller/main/ChartDropTargetHelper.cxx1
-rw-r--r--chart2/source/controller/main/ChartFrameloader.cxx2
-rw-r--r--chart2/source/controller/main/ChartTransferable.cxx1
-rw-r--r--chart2/source/controller/main/ChartWindow.cxx1
-rw-r--r--chart2/source/controller/main/CommandDispatch.cxx4
-rw-r--r--chart2/source/controller/main/CommandDispatchContainer.cxx3
-rw-r--r--chart2/source/controller/main/ControllerCommandDispatch.cxx3
-rw-r--r--chart2/source/controller/main/DragMethod_Base.cxx3
-rw-r--r--chart2/source/controller/main/DragMethod_PieSegment.cxx2
-rw-r--r--chart2/source/controller/main/DragMethod_RotateDiagram.cxx2
-rw-r--r--chart2/source/controller/main/DrawCommandDispatch.cxx3
-rw-r--r--chart2/source/controller/main/ElementSelector.cxx4
-rw-r--r--chart2/source/controller/main/ObjectHierarchy.cxx2
-rw-r--r--chart2/source/controller/main/PositionAndSizeHelper.cxx3
-rw-r--r--chart2/source/controller/main/SelectionHelper.cxx1
-rw-r--r--chart2/source/controller/main/ShapeController.cxx7
-rw-r--r--chart2/source/controller/main/ToolbarController.cxx7
-rw-r--r--chart2/source/controller/main/UndoActions.cxx5
-rw-r--r--chart2/source/controller/main/UndoGuard.cxx1
-rw-r--r--chart2/source/controller/sidebar/Chart2PanelFactory.cxx3
-rw-r--r--chart2/source/controller/sidebar/ChartAreaPanel.cxx1
-rw-r--r--chart2/source/controller/sidebar/ChartAxisPanel.cxx13
-rw-r--r--chart2/source/controller/sidebar/ChartColorWrapper.cxx3
-rw-r--r--chart2/source/controller/sidebar/ChartElementsPanel.cxx7
-rw-r--r--chart2/source/controller/sidebar/ChartErrorBarPanel.cxx12
-rw-r--r--chart2/source/controller/sidebar/ChartSeriesPanel.cxx12
57 files changed, 46 insertions, 213 deletions
diff --git a/chart2/IwyuFilter_chart2.yaml b/chart2/IwyuFilter_chart2.yaml
index 9349a4baa55a..f1e252485512 100644
--- a/chart2/IwyuFilter_chart2.yaml
+++ b/chart2/IwyuFilter_chart2.yaml
@@ -441,6 +441,9 @@ blacklist:
chart2/source/controller/inc/RangeSelectionListener.hxx:
# base class has to be a complete type
- com/sun/star/sheet/XRangeSelectionListener.hpp
+ chart2/source/controller/accessibility/AccessibleBase.cxx:
+ # Needed for template
+ - com/sun/star/chart2/XChartDocument.hpp
chart2/source/controller/accessibility/AccessibleChartShape.hxx:
# base class has to be a complete type
- AccessibleBase.hxx
@@ -475,6 +478,18 @@ blacklist:
# base class has to be a complete type
- CommandDispatch.hxx
- com/sun/star/view/XSelectionChangeListener.hpp
+ chart2/source/controller/main/ChartController_EditData.cxx:
+ # Needed for member access
+ - ChartWindow.hxx
+ chart2/source/controller/main/ChartController_Position.cxx:
+ # Needed for member access
+ - ChartWindow.hxx
+ chart2/source/controller/main/ChartController_Properties.cxx:
+ # Needed for member access
+ - ChartWindow.hxx
+ chart2/source/controller/main/ChartController_Tools.cxx:
+ # Needed for template
+ - com/sun/star/graphic/XGraphic.hpp
chart2/source/controller/main/UndoActions.hxx:
# base class has to be a complete type
- com/sun/star/document/XUndoAction.hpp
@@ -594,3 +609,7 @@ blacklist:
chart2/source/controller/chartapiwrapper/WrappedStockProperties.hxx:
# Needed for css namespace shortcut
- sal/types.h
+ chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx:
+ # Needed for compound type declaration
+ - com/sun/star/chart2/XAxis.hpp
+
diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx
index 2bfcacd3321a..2e375755dc01 100644
--- a/chart2/source/controller/accessibility/AccessibleBase.cxx
+++ b/chart2/source/controller/accessibility/AccessibleBase.cxx
@@ -23,7 +23,6 @@
#include <ObjectIdentifier.hxx>
#include <chartview/ExplicitValueProvider.hxx>
-#include <com/sun/star/awt/XDevice.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/accessibility/AccessibleEventObject.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
@@ -33,23 +32,12 @@
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
-#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
#include <vcl/svapp.hxx>
-#include <rtl/uuid.h>
-#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/supportsservice.hxx>
-#include <svl/itemset.hxx>
-#include <editeng/unofdesc.hxx>
-#include <editeng/outliner.hxx>
-#include <svx/svdoutl.hxx>
-#include <svx/svdetc.hxx>
-#include <svx/unoshape.hxx>
-#include <svx/unoprov.hxx>
#include <vcl/unohelp.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/window.hxx>
-#include <vcl/graph.hxx>
#include <vcl/settings.hxx>
#include <o3tl/functional.hxx>
#include <tools/diagnose_ex.h>
diff --git a/chart2/source/controller/accessibility/AccessibleChartElement.cxx b/chart2/source/controller/accessibility/AccessibleChartElement.cxx
index b66d59b114e5..4afafc219043 100644
--- a/chart2/source/controller/accessibility/AccessibleChartElement.cxx
+++ b/chart2/source/controller/accessibility/AccessibleChartElement.cxx
@@ -32,10 +32,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
-#include <vcl/svapp.hxx>
-#include <rtl/ustrbuf.hxx>
#include <tools/diagnose_ex.h>
-#include <comphelper/property.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
diff --git a/chart2/source/controller/accessibility/AccessibleChartShape.cxx b/chart2/source/controller/accessibility/AccessibleChartShape.cxx
index 55b66c7e6b6a..b6b3340a27dd 100644
--- a/chart2/source/controller/accessibility/AccessibleChartShape.cxx
+++ b/chart2/source/controller/accessibility/AccessibleChartShape.cxx
@@ -18,8 +18,6 @@
*/
#include "AccessibleChartShape.hxx"
-#include <ObjectHierarchy.hxx>
-#include <ObjectIdentifier.hxx>
#include <com/sun/star/awt/XWindow.hpp>
#include <toolkit/helper/vclunohelper.hxx>
diff --git a/chart2/source/controller/accessibility/AccessibleChartView.cxx b/chart2/source/controller/accessibility/AccessibleChartView.cxx
index 783764b93fa9..9a3fa947c4a3 100644
--- a/chart2/source/controller/accessibility/AccessibleChartView.cxx
+++ b/chart2/source/controller/accessibility/AccessibleChartView.cxx
@@ -19,14 +19,12 @@
#include <AccessibleChartView.hxx>
#include <chartview/ExplicitValueProvider.hxx>
-#include <servicenames.hxx>
#include <ObjectHierarchy.hxx>
#include <ObjectIdentifier.hxx>
#include <ResId.hxx>
#include <strings.hrc>
#include "AccessibleViewForwarder.hxx"
-#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
diff --git a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
index b097e1217760..80d404307127 100644
--- a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
+++ b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
@@ -20,7 +20,6 @@
#include <sal/config.h>
#include <memory>
-#include <utility>
#include <AccessibleTextHelper.hxx>
#include <DrawViewWrapper.hxx>
diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
index 252b11d130af..99201f1d748f 100644
--- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
+++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
@@ -24,10 +24,9 @@
#include <unotools/lingucfg.hxx>
#include <editeng/langitem.hxx>
#include <svl/itempool.hxx>
-#include <svx/svdpage.hxx>
+#include <svx/obj3d.hxx>
#include <svx/svdpagv.hxx>
#include <svx/svdmodel.hxx>
-#include <svx/scene3d.hxx>
#include <svx/svdetc.hxx>
#include <svx/svdoutl.hxx>
#include <svx/svxids.hrc>
diff --git a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
index 5f2a688cc64f..94660e734890 100644
--- a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
+++ b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
@@ -26,17 +26,6 @@
#include <com/sun/star/drawing/Direction3D.hpp>
#include <svx/xtable.hxx>
-#include <svx/XPropertyTable.hxx>
-#include <svx/unofill.hxx>
-#include <svx/unoapi.hxx>
-#include <svx/xit.hxx>
-#include <svx/xbtmpit.hxx>
-#include <svx/xflftrit.hxx>
-#include <svx/xlndsit.hxx>
-#include <svx/xflhtit.hxx>
-#include <svx/xflgrit.hxx>
-#include <svx/xlnstit.hxx>
-#include <svx/xlnedit.hxx>
#include <svl/itempool.hxx>
#include <svtools/ctrltool.hxx>
#include <vcl/svapp.hxx>
diff --git a/chart2/source/controller/inc/CommandDispatchContainer.hxx b/chart2/source/controller/inc/CommandDispatchContainer.hxx
index cbcf4345377b..72c2daaa9367 100644
--- a/chart2/source/controller/inc/CommandDispatchContainer.hxx
+++ b/chart2/source/controller/inc/CommandDispatchContainer.hxx
@@ -35,7 +35,6 @@ namespace com { namespace sun { namespace star { namespace util { struct URL; }
namespace chart
{
-class ChartController;
class DrawCommandDispatch;
class ShapeController;
diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
index 5768c108a8c9..3bf6b3aaa800 100644
--- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
@@ -48,8 +48,6 @@
#include <svl/intitem.hxx>
#include <rtl/math.hxx>
-#include <algorithm>
-
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
using ::com::sun::star::uno::Reference;
diff --git a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
index ffd3dbf5f8c8..4e100bfb9822 100644
--- a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
@@ -25,14 +25,12 @@
#include <editeng/eeitem.hxx>
#include <editeng/udlnitem.hxx>
#include <editeng/fontitem.hxx>
-#include <editeng/crossedoutitem.hxx>
#include <editeng/postitem.hxx>
#include <editeng/wghtitem.hxx>
#include <editeng/fhgtitem.hxx>
#include <o3tl/any.hxx>
#include <svl/stritem.hxx>
-#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/chart2/XFormattedString.hpp>
#include <tools/diagnose_ex.h>
diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
index 5dc89f2aafd1..343bd62d3e45 100644
--- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
@@ -31,7 +31,6 @@
#include <ChartTypeHelper.hxx>
#include <unonames.hxx>
-#include <svx/chrtitem.hxx>
#include <com/sun/star/chart2/AxisType.hpp>
#include <com/sun/star/chart2/DataPointLabel.hpp>
#include <com/sun/star/chart2/Symbol.hpp>
@@ -45,12 +44,9 @@
#include <editeng/brushitem.hxx>
#include <svl/ilstitem.hxx>
#include <vcl/graph.hxx>
-#include <com/sun/star/graphic/XGraphic.hpp>
#include <svx/tabline.hxx>
-#include <functional>
-#include <algorithm>
#include <memory>
using namespace ::com::sun::star;
diff --git a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
index a54dee05fc67..d159932af642 100644
--- a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
@@ -19,31 +19,19 @@
#include <ErrorBarItemConverter.hxx>
#include "SchWhichPairs.hxx"
-#include <ItemPropertyMap.hxx>
-#include <ErrorBar.hxx>
-#include <PropertyHelper.hxx>
-#include <ChartModelHelper.hxx>
-#include <ChartTypeHelper.hxx>
#include <StatisticsHelper.hxx>
#include <GraphicPropertyItemConverter.hxx>
#include <svl/stritem.hxx>
#include <svx/chrtitem.hxx>
-#include <svl/intitem.hxx>
#include <rtl/math.hxx>
-#include <com/sun/star/chart2/DataPointLabel.hpp>
#include <com/sun/star/chart2/XInternalDataProvider.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart/ErrorBarStyle.hpp>
-#include <com/sun/star/lang/XServiceName.hpp>
#include <tools/diagnose_ex.h>
-#include <functional>
-#include <algorithm>
-#include <vector>
-
using namespace ::com::sun::star;
namespace
diff --git a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
index fa7a0d319b04..e709a0f397af 100644
--- a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
@@ -23,8 +23,6 @@
#include <PropertyHelper.hxx>
#include <CommonConverters.hxx>
#include <editeng/memberids.h>
-#include <svx/xflclit.hxx>
-#include <svx/xlnclit.hxx>
#include <svx/xflbmtit.hxx>
#include <svx/xflbstit.hxx>
#include <svx/xbtmpit.hxx>
@@ -34,13 +32,10 @@
#include <svx/xflgrit.hxx>
#include <svx/xfltrit.hxx>
#include <svx/xlntrit.hxx>
-#include <editeng/eeitem.hxx>
-#include <svl/eitem.hxx>
#include <svx/xgrscit.hxx>
#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/chart2/FillBitmap.hpp>
-#include <com/sun/star/awt/Gradient.hpp>
+#include <com/sun/star/drawing/BitmapMode.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <tools/diagnose_ex.h>
diff --git a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
index a463fc176b82..6fd5ac749a1f 100644
--- a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
@@ -22,7 +22,6 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <osl/diagnose.h>
#include <svl/itempool.hxx>
-#include <svl/itemprop.hxx>
#include <svl/itemiter.hxx>
#include <svl/whiter.hxx>
#include <svx/svxids.hrc>
diff --git a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
index 888b2c4ea476..58251f381628 100644
--- a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
@@ -19,10 +19,8 @@
#include <LegendItemConverter.hxx>
#include "SchWhichPairs.hxx"
-#include <ItemPropertyMap.hxx>
#include <GraphicPropertyItemConverter.hxx>
#include <CharacterPropertyItemConverter.hxx>
-#include <com/sun/star/chart2/XLegend.hpp>
#include <com/sun/star/chart2/LegendPosition.hpp>
#include <com/sun/star/chart/ChartLegendExpansion.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -31,8 +29,6 @@
#include <svl/eitem.hxx>
#include <tools/diagnose_ex.h>
-#include <functional>
-#include <algorithm>
#include <memory>
using namespace ::com::sun::star;
diff --git a/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx b/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
index 9439dcc2ceb1..af20548504b8 100644
--- a/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
+++ b/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
@@ -19,7 +19,6 @@
#include <MultipleChartConverters.hxx>
-#include <chartview/ChartSfxItemIds.hxx>
#include "SchWhichPairs.hxx"
#include <AxisItemConverter.hxx>
#include <StatisticsItemConverter.hxx>
@@ -30,9 +29,9 @@
#include <TitleItemConverter.hxx>
#include <AxisHelper.hxx>
#include <chartview/ExplicitValueProvider.hxx>
-#include <DiagramHelper.hxx>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+#include <com/sun/star/chart2/XAxis.hpp>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
diff --git a/chart2/source/controller/itemsetwrapper/MultipleItemConverter.cxx b/chart2/source/controller/itemsetwrapper/MultipleItemConverter.cxx
index 0e0b33c151de..c060d64decf5 100644
--- a/chart2/source/controller/itemsetwrapper/MultipleItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/MultipleItemConverter.cxx
@@ -18,9 +18,7 @@
*/
#include <MultipleItemConverter.hxx>
-#include <ItemPropertyMap.hxx>
-#include <algorithm>
#include <memory>
using namespace ::com::sun::star;
diff --git a/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx b/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx
index 9842121c170c..2173620bf37b 100644
--- a/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx
@@ -20,7 +20,6 @@
#include <RegressionCurveHelper.hxx>
#include <RegressionCurveItemConverter.hxx>
#include "SchWhichPairs.hxx"
-#include <ItemPropertyMap.hxx>
#include <GraphicPropertyItemConverter.hxx>
#include <com/sun/star/chart2/XRegressionCurve.hpp>
@@ -30,9 +29,6 @@
#include <svl/intitem.hxx>
#include <svl/stritem.hxx>
-#include <functional>
-#include <algorithm>
-
using namespace ::com::sun::star;
namespace
diff --git a/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx b/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx
index 6dbdece70632..5958b362a3fb 100644
--- a/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx
@@ -22,15 +22,11 @@
#include <ItemPropertyMap.hxx>
#include <GraphicPropertyItemConverter.hxx>
#include <CharacterPropertyItemConverter.hxx>
-#include <MultipleItemConverter.hxx>
#include <unonames.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <svl/intitem.hxx>
-#include <rtl/math.hxx>
-#include <functional>
-#include <algorithm>
#include <memory>
using namespace ::com::sun::star;
diff --git a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
index b289a16423ae..6dd64d069a96 100644
--- a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
@@ -20,9 +20,6 @@
#include <SeriesOptionsItemConverter.hxx>
#include "SchWhichPairs.hxx"
-#include <ItemPropertyMap.hxx>
-#include <GraphicPropertyItemConverter.hxx>
-#include <MultipleItemConverter.hxx>
#include <ChartModelHelper.hxx>
#include <AxisHelper.hxx>
#include <DiagramHelper.hxx>
@@ -30,19 +27,14 @@
#include <DataSeriesHelper.hxx>
#include <ChartModel.hxx>
-#include <com/sun/star/chart/MissingValueTreatment.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <svl/eitem.hxx>
#include <svl/intitem.hxx>
#include <svl/ilstitem.hxx>
-#include <rtl/math.hxx>
#include <tools/diagnose_ex.h>
#include <sal/log.hxx>
-#include <functional>
-#include <algorithm>
-
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
diff --git a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
index 39838143aac0..6d6a9f6788bd 100644
--- a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
@@ -20,14 +20,9 @@
#include <StatisticsItemConverter.hxx>
#include "SchWhichPairs.hxx"
#include <RegressionCurveHelper.hxx>
-#include <ItemPropertyMap.hxx>
#include <ErrorBar.hxx>
-#include <PropertyHelper.hxx>
-#include <ChartModelHelper.hxx>
-#include <ChartTypeHelper.hxx>
#include <StatisticsHelper.hxx>
-#include <GraphicPropertyItemConverter.hxx>
#include <unonames.hxx>
#include <svl/stritem.hxx>
@@ -35,18 +30,12 @@
#include <svl/intitem.hxx>
#include <rtl/math.hxx>
-#include <com/sun/star/chart2/DataPointLabel.hpp>
#include <com/sun/star/chart2/XInternalDataProvider.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
#include <com/sun/star/chart/ErrorBarStyle.hpp>
-#include <com/sun/star/lang/XServiceName.hpp>
#include <tools/diagnose_ex.h>
-#include <functional>
-#include <algorithm>
-#include <vector>
-
using namespace ::com::sun::star;
namespace
diff --git a/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
index dabbeb5f45d3..be5cdb2b9c95 100644
--- a/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
@@ -26,11 +26,9 @@
#include <svl/intitem.hxx>
#include <rtl/math.hxx>
-#include <com/sun/star/chart2/XTitled.hpp>
+#include <com/sun/star/chart2/XTitle.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <functional>
-#include <algorithm>
#include <memory>
using namespace ::com::sun::star;
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index 3350e5e521d1..07eb6692a5d6 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -42,7 +42,6 @@
#include "UndoGuard.hxx"
#include "ChartDropTargetHelper.hxx"
-#include <dlg_CreationWizard.hxx>
#include <dlg_ChartType.hxx>
#include <AccessibleChartView.hxx>
#include "DrawCommandDispatch.hxx"
@@ -52,28 +51,22 @@
#include <cppuhelper/supportsservice.hxx>
-#include <com/sun/star/awt/PosSize.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/data/XDataReceiver.hpp>
#include <com/sun/star/frame/XController2.hpp>
-#include <com/sun/star/util/XCloneable.hpp>
-#include <com/sun/star/embed/XEmbeddedClient.hpp>
#include <com/sun/star/util/CloseVetoException.hpp>
#include <com/sun/star/util/XModeChangeBroadcaster.hpp>
#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <com/sun/star/frame/LayoutManagerEvents.hpp>
#include <com/sun/star/frame/XLayoutManagerEventBroadcaster.hpp>
#include <com/sun/star/document/XUndoManagerSupplier.hpp>
-#include <com/sun/star/document/XUndoAction.hpp>
#include <com/sun/star/ui/XSidebar.hpp>
#include <com/sun/star/chart2/XChartTypeContainer.hpp>
#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
-#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/chart2/XDataProviderAccess.hpp>
#include <sal/log.hxx>
#include <svx/sidebar/SelectionChangeHandler.hxx>
-#include <svx/svdundo.hxx>
#include <toolkit/awt/vclxwindow.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/svapp.hxx>
@@ -83,7 +76,6 @@
#include <sfx2/sidebar/SidebarController.hxx>
#include <com/sun/star/frame/XLayoutManager.hpp>
-#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
// this is needed to properly destroy the unique_ptr to the AcceleratorExecute
// object in the DTOR
diff --git a/chart2/source/controller/main/ChartController_EditData.cxx b/chart2/source/controller/main/ChartController_EditData.cxx
index c3296edf4d1c..fb5a5d105708 100644
--- a/chart2/source/controller/main/ChartController_EditData.cxx
+++ b/chart2/source/controller/main/ChartController_EditData.cxx
@@ -21,9 +21,6 @@
#include <ChartController.hxx>
#include <dlg_DataEditor.hxx>
-#include <DataSourceHelper.hxx>
-#include <DiagramHelper.hxx>
-#include <ControllerLockGuard.hxx>
#include "UndoGuard.hxx"
#include <ResId.hxx>
#include <strings.hrc>
diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx
index 198b9373b255..63d88e18a007 100644
--- a/chart2/source/controller/main/ChartController_Insert.cxx
+++ b/chart2/source/controller/main/ChartController_Insert.cxx
@@ -27,7 +27,6 @@
#include <dlg_InsertTitle.hxx>
#include <dlg_ObjectProperties.hxx>
-#include <ChartWindow.hxx>
#include <ChartModel.hxx>
#include <ChartModelHelper.hxx>
#include <AxisHelper.hxx>
@@ -48,7 +47,6 @@
#include <RegressionCurveItemConverter.hxx>
#include <StatisticsHelper.hxx>
#include <ErrorBarItemConverter.hxx>
-#include <MultipleItemConverter.hxx>
#include <DataSeriesHelper.hxx>
#include <ObjectNameProvider.hxx>
#include <LegendHelper.hxx>
@@ -59,7 +57,6 @@
#include <com/sun/star/chart/ErrorBarStyle.hpp>
#include <svx/ActionDescriptionProvider.hxx>
-#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
#include <vcl/svapp.hxx>
diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx
index 37e832977dfb..05b2eee17d32 100644
--- a/chart2/source/controller/main/ChartController_Position.cxx
+++ b/chart2/source/controller/main/ChartController_Position.cxx
@@ -36,7 +36,6 @@
#include <svx/rectenum.hxx>
#include <svl/aeitem.hxx>
#include <svx/svxdlg.hxx>
-#include <svx/dialogs.hrc>
#include <vcl/svapp.hxx>
#include <memory>
diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx
index a9907194a424..91034b9748cb 100644
--- a/chart2/source/controller/main/ChartController_Properties.cxx
+++ b/chart2/source/controller/main/ChartController_Properties.cxx
@@ -40,11 +40,9 @@
#include <ChartModelHelper.hxx>
#include <AxisHelper.hxx>
#include <TitleHelper.hxx>
-#include <LegendHelper.hxx>
#include <ChartTypeHelper.hxx>
#include <ColorPerPointHelper.hxx>
#include <DiagramHelper.hxx>
-#include <servicenames_charttypes.hxx>
#include <ControllerLockGuard.hxx>
#include "UndoGuard.hxx"
#include <ObjectNameProvider.hxx>
diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx
index 0a9669626fcb..71f9f02a28b3 100644
--- a/chart2/source/controller/main/ChartController_TextEdit.cxx
+++ b/chart2/source/controller/main/ChartController_TextEdit.cxx
@@ -30,13 +30,13 @@
#include <strings.hrc>
#include <chartview/DrawModelWrapper.hxx>
-#include <svx/svdotext.hxx>
#include <svx/svdoutl.hxx>
#include <svx/svxdlg.hxx>
-#include <svx/dialogs.hrc>
+#include <svx/svxids.hrc>
+#include <editeng/editids.hrc>
#include <vcl/svapp.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/chart2/XTitled.hpp>
+#include <com/sun/star/chart2/XTitle.hpp>
#include <svl/stritem.hxx>
#include <editeng/fontitem.hxx>
#include <memory>
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx
index 18894177ecf2..7cfc51c83bc0 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -30,7 +30,6 @@
#include <strings.hrc>
#include <ObjectIdentifier.hxx>
#include <ReferenceSizeProvider.hxx>
-#include <chartview/ExplicitValueProvider.hxx>
#include <chartview/DrawModelWrapper.hxx>
#include "ChartTransferable.hxx"
#include <DrawViewWrapper.hxx>
@@ -44,9 +43,7 @@
#include <com/sun/star/chart2/DataPointLabel.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
-#include <com/sun/star/drawing/CameraGeometry.hpp>
#include <com/sun/star/graphic/XGraphic.hpp>
-#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/text/XTextRange.hpp>
#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
#include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
@@ -65,13 +62,11 @@
#include <unotools/streamwrap.hxx>
#include <vcl/svapp.hxx>
#include <svx/dialmgr.hxx>
-#include <svx/dialogs.hrc>
#include <svx/strings.hrc>
#include <svx/svditer.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdundo.hxx>
#include <svx/unoapi.hxx>
-#include <svx/unopage.hxx>
#include <o3tl/make_unique.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index 8a4d92b95c6b..d8e7b3744352 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -22,7 +22,6 @@
#include <ObjectIdentifier.hxx>
#include <ChartWindow.hxx>
#include <ResId.hxx>
-#include <CommonConverters.hxx>
#include <ChartModel.hxx>
#include <ChartModelHelper.hxx>
#include <DiagramHelper.hxx>
@@ -69,7 +68,6 @@
#include <sfx2/viewsh.hxx>
#include <sfx2/ipclient.hxx>
-#include <svx/svxids.hrc>
#include <svx/ActionDescriptionProvider.hxx>
#include <svx/obj3d.hxx>
#include <svx/scene3d.hxx>
@@ -77,7 +75,6 @@
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <vcl/weld.hxx>
-#include <rtl/math.hxx>
#include <svtools/acceleratorexecute.hxx>
#include <tools/diagnose_ex.h>
#include <sal/log.hxx>
diff --git a/chart2/source/controller/main/ChartDropTargetHelper.cxx b/chart2/source/controller/main/ChartDropTargetHelper.cxx
index d0eeddf9ce01..60b64ec1e8fc 100644
--- a/chart2/source/controller/main/ChartDropTargetHelper.cxx
+++ b/chart2/source/controller/main/ChartDropTargetHelper.cxx
@@ -18,7 +18,6 @@
*/
#include "ChartDropTargetHelper.hxx"
-#include <DiagramHelper.hxx>
#include <DataSourceHelper.hxx>
#include <com/sun/star/chart2/XChartDocument.hpp>
diff --git a/chart2/source/controller/main/ChartFrameloader.cxx b/chart2/source/controller/main/ChartFrameloader.cxx
index 00d58ea7f0f3..c757d5f60760 100644
--- a/chart2/source/controller/main/ChartFrameloader.cxx
+++ b/chart2/source/controller/main/ChartFrameloader.cxx
@@ -22,8 +22,6 @@
#include <MediaDescriptorHelper.hxx>
#include <unotools/mediadescriptor.hxx>
#include <cppuhelper/supportsservice.hxx>
-#include <com/sun/star/document/XImporter.hpp>
-#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/frame/XLoadable.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <tools/diagnose_ex.h>
diff --git a/chart2/source/controller/main/ChartTransferable.cxx b/chart2/source/controller/main/ChartTransferable.cxx
index 9ace159756e1..7c2225f9087e 100644
--- a/chart2/source/controller/main/ChartTransferable.cxx
+++ b/chart2/source/controller/main/ChartTransferable.cxx
@@ -33,7 +33,6 @@
#include <editeng/fhgtitem.hxx>
#include <svx/svditer.hxx>
#include <svx/svdmodel.hxx>
-#include <svx/svdpage.hxx>
#include <svx/unomodel.hxx>
#include <svx/svdview.hxx>
diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx
index 57f245fe8db4..2a3bd54a85e6 100644
--- a/chart2/source/controller/main/ChartWindow.cxx
+++ b/chart2/source/controller/main/ChartWindow.cxx
@@ -24,7 +24,6 @@
#include <vcl/help.hxx>
#include <vcl/settings.hxx>
-#include <config_features.h>
#include <sfx2/ipclient.hxx>
#include <sfx2/viewsh.hxx>
diff --git a/chart2/source/controller/main/CommandDispatch.cxx b/chart2/source/controller/main/CommandDispatch.cxx
index 34e3d3e1ba1c..22e0a52c204f 100644
--- a/chart2/source/controller/main/CommandDispatch.cxx
+++ b/chart2/source/controller/main/CommandDispatch.cxx
@@ -18,13 +18,9 @@
*/
#include "CommandDispatch.hxx"
-#include <CommonFunctors.hxx>
#include <com/sun/star/util/URLTransformer.hpp>
#include <tools/diagnose_ex.h>
-#include <algorithm>
-#include <functional>
-
using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference;
diff --git a/chart2/source/controller/main/CommandDispatchContainer.cxx b/chart2/source/controller/main/CommandDispatchContainer.cxx
index ab93e3347057..58fa1bcd04ce 100644
--- a/chart2/source/controller/main/CommandDispatchContainer.cxx
+++ b/chart2/source/controller/main/CommandDispatchContainer.cxx
@@ -21,11 +21,12 @@
#include "UndoCommandDispatch.hxx"
#include "StatusBarCommandDispatch.hxx"
#include <DisposeHelper.hxx>
-#include <ChartController.hxx>
#include "DrawCommandDispatch.hxx"
#include "ShapeController.hxx"
#include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
using namespace ::com::sun::star;
diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx
index d920a4a8c988..07e99c5c6477 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.cxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx
@@ -39,11 +39,8 @@
#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
-#include <com/sun/star/chart2/XChartType.hpp>
-#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/chart2/XRegressionCurve.hpp>
#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
-#include <com/sun/star/chart2/data/XDatabaseDataProvider.hpp>
#include <com/sun/star/chart2/XDataProviderAccess.hpp>
// only needed until #i68864# is fixed
diff --git a/chart2/source/controller/main/DragMethod_Base.cxx b/chart2/source/controller/main/DragMethod_Base.cxx
index 3787341d70ab..d4f2971465cb 100644
--- a/chart2/source/controller/main/DragMethod_Base.cxx
+++ b/chart2/source/controller/main/DragMethod_Base.cxx
@@ -23,10 +23,7 @@
#include <ObjectNameProvider.hxx>
#include <ObjectIdentifier.hxx>
-#include <rtl/math.hxx>
-#include <svx/svdpagv.hxx>
#include <svx/ActionDescriptionProvider.hxx>
-#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/frame/XModel.hpp>
namespace chart
diff --git a/chart2/source/controller/main/DragMethod_PieSegment.cxx b/chart2/source/controller/main/DragMethod_PieSegment.cxx
index c352f99f4df7..a58c7a3271e2 100644
--- a/chart2/source/controller/main/DragMethod_PieSegment.cxx
+++ b/chart2/source/controller/main/DragMethod_PieSegment.cxx
@@ -23,8 +23,6 @@
#include <strings.hrc>
#include <ResId.hxx>
#include <ObjectIdentifier.hxx>
-#include <rtl/math.hxx>
-#include <svx/svdpagv.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <tools/diagnose_ex.h>
diff --git a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
index 88572d961d4e..5ed1cb16c5ed 100644
--- a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
+++ b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
@@ -21,14 +21,12 @@
#include <DrawViewWrapper.hxx>
#include <SelectionHelper.hxx>
-#include <CommonConverters.hxx>
#include <ChartModelHelper.hxx>
#include <DiagramHelper.hxx>
#include <ChartTypeHelper.hxx>
#include <ThreeDHelper.hxx>
#include <defines.hxx>
#include <svx/sdr/overlay/overlaypolypolygon.hxx>
-#include <svx/sdr/overlay/overlaymanager.hxx>
#include <svx/scene3d.hxx>
#include <basegfx/matrix/b3dhommatrix.hxx>
diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx
index 73bcc680ff1f..bdcb00cd5c0f 100644
--- a/chart2/source/controller/main/DrawCommandDispatch.cxx
+++ b/chart2/source/controller/main/DrawCommandDispatch.cxx
@@ -27,7 +27,6 @@
#include <vcl/svapp.hxx>
#include <svl/itempool.hxx>
#include <editeng/adjustitem.hxx>
-#include <svx/dialogs.hrc>
#include <svx/strings.hrc>
#include <svx/dialmgr.hxx>
#include <svx/fmmodel.hxx>
@@ -43,8 +42,6 @@
#include <svx/xtable.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
-#include <functional>
-
using namespace ::com::sun::star;
using namespace ::com::sun::star::frame;
diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx
index 3b9b861f1e27..d868365a19c1 100644
--- a/chart2/source/controller/main/ElementSelector.cxx
+++ b/chart2/source/controller/main/ElementSelector.cxx
@@ -21,7 +21,6 @@
#include <ObjectNameProvider.hxx>
#include <ObjectHierarchy.hxx>
#include <servicenames.hxx>
-#include <chartview/ExplicitValueProvider.hxx>
#include <DrawViewWrapper.hxx>
#include <ResId.hxx>
#include <strings.hrc>
@@ -32,10 +31,11 @@
#include <vcl/svapp.hxx>
#include <com/sun/star/chart2/XChartDocument.hpp>
-#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+namespace chart { class ExplicitValueProvider; }
+
namespace chart
{
diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx b/chart2/source/controller/main/ObjectHierarchy.cxx
index 41fc703f9e64..4444c4158b6f 100644
--- a/chart2/source/controller/main/ObjectHierarchy.cxx
+++ b/chart2/source/controller/main/ObjectHierarchy.cxx
@@ -34,7 +34,7 @@
#include <algorithm>
#include <iterator>
-#include <com/sun/star/drawing/XDrawPage.hpp>
+#include <com/sun/star/drawing/XShapes.hpp>
#include <com/sun/star/chart2/XTitled.hpp>
#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
#include <com/sun/star/chart2/XChartTypeContainer.hpp>
diff --git a/chart2/source/controller/main/PositionAndSizeHelper.cxx b/chart2/source/controller/main/PositionAndSizeHelper.cxx
index ed7b615917dc..8f8b7109b8a5 100644
--- a/chart2/source/controller/main/PositionAndSizeHelper.cxx
+++ b/chart2/source/controller/main/PositionAndSizeHelper.cxx
@@ -18,16 +18,15 @@
*/
#include <PositionAndSizeHelper.hxx>
-#include <ChartModelHelper.hxx>
#include <ControllerLockGuard.hxx>
#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/RelativeSize.hpp>
-#include <chartview/ExplicitValueProvider.hxx>
#include <tools/gen.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/awt/Rectangle.hpp>
namespace chart
{
diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx
index 5231f91615a9..a664c30490bc 100644
--- a/chart2/source/controller/main/SelectionHelper.cxx
+++ b/chart2/source/controller/main/SelectionHelper.cxx
@@ -28,7 +28,6 @@
#include <svx/svdopath.hxx>
#include <vcl/svapp.hxx>
#include <basegfx/point/b2dpoint.hxx>
-#include <com/sun/star/beans/XPropertySet.hpp>
#include <o3tl/make_unique.hxx>
namespace chart
diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx
index 0e090c7b91ad..e1e4cbd624c3 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -26,14 +26,13 @@
#include <dlg_ShapeParagraph.hxx>
#include <chartview/DrawModelWrapper.hxx>
-#include <com/sun/star/drawing/XDrawPage.hpp>
+#include <com/sun/star/drawing/XShapes.hpp>
#include <com/sun/star/frame/CommandGroup.hpp>
#include <com/sun/star/frame/XStorable.hpp>
#include <vcl/svapp.hxx>
#include <editeng/formatbreakitem.hxx>
-#include <svx/dialogs.hrc>
-#include <svx/drawitem.hxx>
+#include <editeng/editids.hrc>
#include <editeng/eeitem.hxx>
#include <editeng/hyphenzoneitem.hxx>
#include <editeng/orphitem.hxx>
@@ -42,8 +41,6 @@
#include <editeng/widwitem.hxx>
#include <tools/diagnose_ex.h>
-#include <memory>
-
using namespace ::com::sun::star;
using namespace ::com::sun::star::frame;
diff --git a/chart2/source/controller/main/ToolbarController.cxx b/chart2/source/controller/main/ToolbarController.cxx
index 895413d2b9e7..fa2a07032ed2 100644
--- a/chart2/source/controller/main/ToolbarController.cxx
+++ b/chart2/source/controller/main/ToolbarController.cxx
@@ -9,17 +9,14 @@
#include <ChartToolbarController.hxx>
-#include <rtl/ref.hxx>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XDispatch.hpp>
-#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/frame/XFramesSupplier.hpp>
#include <cppuhelper/supportsservice.hxx>
#include <sal/log.hxx>
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
+
namespace chart {
ChartToolbarController::ChartToolbarController(const css::uno::Sequence<css::uno::Any>& rProperties):
diff --git a/chart2/source/controller/main/UndoActions.cxx b/chart2/source/controller/main/UndoActions.cxx
index 6206430880b3..29c6d0ac7b62 100644
--- a/chart2/source/controller/main/UndoActions.cxx
+++ b/chart2/source/controller/main/UndoActions.cxx
@@ -18,17 +18,12 @@
*/
#include "UndoActions.hxx"
-#include <DisposeHelper.hxx>
-#include <CommonFunctors.hxx>
-#include <PropertyHelper.hxx>
#include "ChartModelClone.hxx"
#include <com/sun/star/lang/DisposedException.hpp>
-#include <tools/diagnose_ex.h>
#include <svx/svdundo.hxx>
-#include <algorithm>
#include <memory>
using namespace ::com::sun::star;
diff --git a/chart2/source/controller/main/UndoGuard.cxx b/chart2/source/controller/main/UndoGuard.cxx
index ec6f97b0b3ca..b173332c9ed4 100644
--- a/chart2/source/controller/main/UndoGuard.cxx
+++ b/chart2/source/controller/main/UndoGuard.cxx
@@ -21,7 +21,6 @@
#include "ChartModelClone.hxx"
#include "UndoActions.hxx"
-#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/document/XUndoManager.hpp>
#include <com/sun/star/frame/XModel.hpp>
diff --git a/chart2/source/controller/sidebar/Chart2PanelFactory.cxx b/chart2/source/controller/sidebar/Chart2PanelFactory.cxx
index 014ce5d0a924..5bd9fb34de68 100644
--- a/chart2/source/controller/sidebar/Chart2PanelFactory.cxx
+++ b/chart2/source/controller/sidebar/Chart2PanelFactory.cxx
@@ -20,11 +20,8 @@
#include "Chart2PanelFactory.hxx"
#include <sfx2/sidebar/SidebarPanelBase.hxx>
-#include <sfx2/sfxbasecontroller.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/window.hxx>
-#include <rtl/ref.hxx>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <cppuhelper/exc_hlp.hxx>
#include <comphelper/namedvaluecollection.hxx>
diff --git a/chart2/source/controller/sidebar/ChartAreaPanel.cxx b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
index 0dd4d3e2de5c..3c0f55ed0ea3 100644
--- a/chart2/source/controller/sidebar/ChartAreaPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
@@ -17,7 +17,6 @@
#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <com/sun/star/chart2/XDiagram.hpp>
-#include <editeng/memberids.h>
#include <svx/xfltrit.hxx>
#include <svx/xflftrit.hxx>
#include <svx/xbtmpit.hxx>
diff --git a/chart2/source/controller/sidebar/ChartAxisPanel.cxx b/chart2/source/controller/sidebar/ChartAxisPanel.cxx
index a5669926a182..9ea10136a9e0 100644
--- a/chart2/source/controller/sidebar/ChartAxisPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartAxisPanel.cxx
@@ -17,22 +17,17 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <sfx2/sidebar/ControlFactory.hxx>
-
+#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/chart/ChartAxisLabelPosition.hpp>
-#include <com/sun/star/chart2/XCoordinateSystem.hpp>
+#include <com/sun/star/chart2/AxisOrientation.hpp>
+#include <com/sun/star/chart2/XAxis.hpp>
+
#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include "ChartAxisPanel.hxx"
#include <ChartController.hxx>
-#include <sfx2/bindings.hxx>
-#include <sfx2/dispatch.hxx>
-#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/field.hxx>
-#include <vcl/toolbox.hxx>
-#include <svl/intitem.hxx>
-#include <svl/stritem.hxx>
using namespace css;
using namespace css::uno;
diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.cxx b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
index 6c9744ffee02..3aebb6b427c0 100644
--- a/chart2/source/controller/sidebar/ChartColorWrapper.cxx
+++ b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
@@ -9,8 +9,9 @@
#include "ChartColorWrapper.hxx"
-#include <ChartController.hxx>
+#include <ObjectIdentifier.hxx>
#include <com/sun/star/chart2/XDiagram.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <svx/tbcontrl.hxx>
diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
index 2f9d7ebaec27..e982f344dab0 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <sfx2/sidebar/ControlFactory.hxx>
#include <com/sun/star/chart2/LegendPosition.hpp>
#include <com/sun/star/chart/ChartLegendExpansion.hpp>
#include <com/sun/star/chart2/XChartTypeContainer.hpp>
@@ -25,14 +24,8 @@
#include "ChartElementsPanel.hxx"
#include <ChartController.hxx>
-#include <sfx2/bindings.hxx>
-#include <sfx2/dispatch.hxx>
#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
-#include <vcl/field.hxx>
-#include <vcl/toolbox.hxx>
-#include <svl/intitem.hxx>
-#include <svl/stritem.hxx>
#include <comphelper/processfactory.hxx>
#include <LegendHelper.hxx>
diff --git a/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx b/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx
index 4cc0d079fcd0..f6199cecef00 100644
--- a/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx
@@ -17,22 +17,16 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <sfx2/sidebar/ControlFactory.hxx>
-
-#include <com/sun/star/chart/ChartAxisLabelPosition.hpp>
#include <com/sun/star/chart/ErrorBarStyle.hpp>
#include <com/sun/star/util/XModifyBroadcaster.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
#include "ChartErrorBarPanel.hxx"
#include <ChartController.hxx>
-#include <sfx2/bindings.hxx>
-#include <sfx2/dispatch.hxx>
-#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/field.hxx>
-#include <vcl/toolbox.hxx>
-#include <svl/intitem.hxx>
-#include <svl/stritem.hxx>
+#include <vcl/button.hxx>
+#include <vcl/svapp.hxx>
using namespace css;
using namespace css::uno;
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
index c2a6a4afade0..67f52a5a3eff 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -17,31 +17,21 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <sfx2/sidebar/ControlFactory.hxx>
-
-#include <com/sun/star/chart2/DataPointLabel.hpp>
#include <com/sun/star/chart/ErrorBarStyle.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/chart/DataLabelPlacement.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
-#include <com/sun/star/chart2/XDiagram.hpp>
#include <com/sun/star/chart2/XChartTypeContainer.hpp>
#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
+#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include "ChartSeriesPanel.hxx"
#include <ChartController.hxx>
-#include <sfx2/bindings.hxx>
-#include <sfx2/dispatch.hxx>
#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
-#include <vcl/field.hxx>
-#include <vcl/toolbox.hxx>
-#include <svl/intitem.hxx>
-#include <svl/stritem.hxx>
-#include <ChartModel.hxx>
#include <DataSeriesHelper.hxx>
#include <RegressionCurveHelper.hxx>
#include <StatisticsHelper.hxx>