From 7f77ac2fcb0e2bbb6d9b93685e17c9154aec1ce0 Mon Sep 17 00:00:00 2001 From: Gabor Kelemen Date: Thu, 13 Feb 2020 20:01:48 +0100 Subject: tdf#42949 Fix IWYU warnings in vbahelper/ Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I6bf00dd94a397f00b4aa8c58ce7a5963e0eadc89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88629 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- vbahelper/IwyuFilter_vbahelper.yaml | 19 +++++++++++++++++++ vbahelper/source/msforms/service.cxx | 2 +- vbahelper/source/msforms/vbacheckbox.cxx | 1 - vbahelper/source/msforms/vbacheckbox.hxx | 1 + vbahelper/source/msforms/vbacombobox.cxx | 3 --- vbahelper/source/msforms/vbacontrol.cxx | 4 +--- vbahelper/source/msforms/vbacontrol.hxx | 1 - vbahelper/source/msforms/vbacontrols.cxx | 2 -- vbahelper/source/msforms/vbalabel.hxx | 1 + vbahelper/source/msforms/vbalistbox.cxx | 1 - vbahelper/source/msforms/vbanewfont.hxx | 2 +- vbahelper/source/msforms/vbapages.hxx | 3 --- vbahelper/source/msforms/vbaprogressbar.hxx | 1 + vbahelper/source/msforms/vbaradiobutton.hxx | 1 + vbahelper/source/msforms/vbatextbox.hxx | 1 + vbahelper/source/msforms/vbatogglebutton.hxx | 1 + vbahelper/source/msforms/vbauserform.cxx | 6 +----- vbahelper/source/msforms/vbauserform.hxx | 1 - vbahelper/source/vbahelper/vbaapplicationbase.cxx | 9 --------- vbahelper/source/vbahelper/vbacolorformat.cxx | 1 - vbahelper/source/vbahelper/vbacolorformat.hxx | 1 - vbahelper/source/vbahelper/vbacommandbar.cxx | 1 - vbahelper/source/vbahelper/vbacommandbar.hxx | 4 ---- vbahelper/source/vbahelper/vbacommandbarcontrols.hxx | 2 -- vbahelper/source/vbahelper/vbacommandbarhelper.cxx | 7 ------- vbahelper/source/vbahelper/vbacommandbarhelper.hxx | 2 -- vbahelper/source/vbahelper/vbacommandbars.cxx | 6 +----- vbahelper/source/vbahelper/vbacommandbars.hxx | 2 -- vbahelper/source/vbahelper/vbadocumentbase.cxx | 4 +--- vbahelper/source/vbahelper/vbadocumentsbase.cxx | 9 +-------- vbahelper/source/vbahelper/vbafontbase.cxx | 4 +--- vbahelper/source/vbahelper/vbahelper.cxx | 14 +++----------- vbahelper/source/vbahelper/vbalineformat.cxx | 2 -- vbahelper/source/vbahelper/vbashape.cxx | 10 +++------- vbahelper/source/vbahelper/vbashaperange.cxx | 1 - vbahelper/source/vbahelper/vbashapes.cxx | 9 ++------- vbahelper/source/vbahelper/vbatextframe.cxx | 3 +-- vbahelper/source/vbahelper/vbawindowbase.cxx | 1 - 38 files changed, 42 insertions(+), 101 deletions(-) create mode 100644 vbahelper/IwyuFilter_vbahelper.yaml diff --git a/vbahelper/IwyuFilter_vbahelper.yaml b/vbahelper/IwyuFilter_vbahelper.yaml new file mode 100644 index 000000000000..8024864b20f2 --- /dev/null +++ b/vbahelper/IwyuFilter_vbahelper.yaml @@ -0,0 +1,19 @@ +--- +assumeFilename: vbahelper/source/vbahelper/vbahelper.cxx +blacklist: + vbahelper/source/vbahelper/vbaglobalbase.cxx: + # Actually used + - com/sun/star/beans/PropertyValue.hpp + - com/sun/star/uno/XComponentContext.hpp + vbahelper/source/vbahelper/vbapagesetupbase.cxx: + # Needed for direct member access + - com/sun/star/beans/XPropertySet.hpp + vbahelper/source/msforms/vbalistcontrolhelper.cxx: + # Actually used + - com/sun/star/beans/XPropertySet.hpp + vbahelper/source/msforms/vbacontrol.cxx: + # Actually used + - com/sun/star/frame/XModel.hpp + vbahelper/source/msforms/vbauserform.cxx: + # Needed for extern declaration + - service.hxx diff --git a/vbahelper/source/msforms/service.cxx b/vbahelper/source/msforms/service.cxx index b3a86a66ea14..ed348af03570 100644 --- a/vbahelper/source/msforms/service.cxx +++ b/vbahelper/source/msforms/service.cxx @@ -16,7 +16,7 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include + #include #include diff --git a/vbahelper/source/msforms/vbacheckbox.cxx b/vbahelper/source/msforms/vbacheckbox.cxx index 6444d9dab526..61e2216c2f44 100644 --- a/vbahelper/source/msforms/vbacheckbox.cxx +++ b/vbahelper/source/msforms/vbacheckbox.cxx @@ -19,7 +19,6 @@ #include "vbacheckbox.hxx" #include "vbanewfont.hxx" -#include using namespace com::sun::star; using namespace ooo::vba; diff --git a/vbahelper/source/msforms/vbacheckbox.hxx b/vbahelper/source/msforms/vbacheckbox.hxx index 7053e0aec2a2..91de78eb5c00 100644 --- a/vbahelper/source/msforms/vbacheckbox.hxx +++ b/vbahelper/source/msforms/vbacheckbox.hxx @@ -20,6 +20,7 @@ #define INCLUDED_VBAHELPER_SOURCE_MSFORMS_VBACHECKBOX_HXX #include #include +#include #include "vbacontrol.hxx" #include diff --git a/vbahelper/source/msforms/vbacombobox.cxx b/vbahelper/source/msforms/vbacombobox.cxx index 429ef73a2219..07c937ccbb05 100644 --- a/vbahelper/source/msforms/vbacombobox.cxx +++ b/vbahelper/source/msforms/vbacombobox.cxx @@ -18,9 +18,6 @@ */ #include "vbacombobox.hxx" -#include -#include -#include #include #include "vbanewfont.hxx" #include diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx index bcbbbdcd446e..da1287d2e60c 100644 --- a/vbahelper/source/msforms/vbacontrol.cxx +++ b/vbahelper/source/msforms/vbacontrol.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -28,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -56,9 +54,9 @@ #include "vbaspinbutton.hxx" #include "vbasystemaxcontrol.hxx" #include "vbaimage.hxx" -#include #include #include +#include #include #include #include diff --git a/vbahelper/source/msforms/vbacontrol.hxx b/vbahelper/source/msforms/vbacontrol.hxx index 2e7c408d5cf2..e96cd5fa9730 100644 --- a/vbahelper/source/msforms/vbacontrol.hxx +++ b/vbahelper/source/msforms/vbacontrol.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/vbahelper/source/msforms/vbacontrols.cxx b/vbahelper/source/msforms/vbacontrols.cxx index c3cf49b86f0d..c019c376c2d7 100644 --- a/vbahelper/source/msforms/vbacontrols.cxx +++ b/vbahelper/source/msforms/vbacontrols.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include @@ -33,7 +32,6 @@ #include "vbacontrol.hxx" #include #include -#include #include using namespace com::sun::star; diff --git a/vbahelper/source/msforms/vbalabel.hxx b/vbahelper/source/msforms/vbalabel.hxx index d002557bb4c9..f7fc98416704 100644 --- a/vbahelper/source/msforms/vbalabel.hxx +++ b/vbahelper/source/msforms/vbalabel.hxx @@ -19,6 +19,7 @@ #ifndef INCLUDED_VBAHELPER_SOURCE_MSFORMS_VBALABEL_HXX #define INCLUDED_VBAHELPER_SOURCE_MSFORMS_VBALABEL_HXX #include +#include #include "vbacontrol.hxx" #include diff --git a/vbahelper/source/msforms/vbalistbox.cxx b/vbahelper/source/msforms/vbalistbox.cxx index 4e3467abdb44..f4af24a5b34f 100644 --- a/vbahelper/source/msforms/vbalistbox.cxx +++ b/vbahelper/source/msforms/vbalistbox.cxx @@ -19,7 +19,6 @@ #include "vbalistbox.hxx" #include "vbanewfont.hxx" -#include #include #include diff --git a/vbahelper/source/msforms/vbanewfont.hxx b/vbahelper/source/msforms/vbanewfont.hxx index fc21f88f211f..6f00a2724bf6 100644 --- a/vbahelper/source/msforms/vbanewfont.hxx +++ b/vbahelper/source/msforms/vbanewfont.hxx @@ -21,7 +21,7 @@ #define INCLUDED_VBAHELPER_SOURCE_MSFORMS_VBANEWFONT_HXX #include -#include +#include #include diff --git a/vbahelper/source/msforms/vbapages.hxx b/vbahelper/source/msforms/vbapages.hxx index ca7de5a8c8cd..cc42da280358 100644 --- a/vbahelper/source/msforms/vbapages.hxx +++ b/vbahelper/source/msforms/vbapages.hxx @@ -19,9 +19,6 @@ #ifndef INCLUDED_VBAHELPER_SOURCE_MSFORMS_VBAPAGES_HXX #define INCLUDED_VBAHELPER_SOURCE_MSFORMS_VBAPAGES_HXX -#include -#include -#include #include #include diff --git a/vbahelper/source/msforms/vbaprogressbar.hxx b/vbahelper/source/msforms/vbaprogressbar.hxx index 3822acf21527..8385ce4579b3 100644 --- a/vbahelper/source/msforms/vbaprogressbar.hxx +++ b/vbahelper/source/msforms/vbaprogressbar.hxx @@ -21,6 +21,7 @@ #define INCLUDED_VBAHELPER_SOURCE_MSFORMS_VBAPROGRESSBAR_HXX #include +#include #include "vbacontrol.hxx" #include diff --git a/vbahelper/source/msforms/vbaradiobutton.hxx b/vbahelper/source/msforms/vbaradiobutton.hxx index ffa5a542c6b8..a6f12ae90f2b 100644 --- a/vbahelper/source/msforms/vbaradiobutton.hxx +++ b/vbahelper/source/msforms/vbaradiobutton.hxx @@ -19,6 +19,7 @@ #ifndef INCLUDED_VBAHELPER_SOURCE_MSFORMS_VBARADIOBUTTON_HXX #define INCLUDED_VBAHELPER_SOURCE_MSFORMS_VBARADIOBUTTON_HXX #include +#include #include "vbacontrol.hxx" #include #include diff --git a/vbahelper/source/msforms/vbatextbox.hxx b/vbahelper/source/msforms/vbatextbox.hxx index debf3994de40..65857b86b4ad 100644 --- a/vbahelper/source/msforms/vbatextbox.hxx +++ b/vbahelper/source/msforms/vbatextbox.hxx @@ -22,6 +22,7 @@ #include #include +#include #include "vbacontrol.hxx" #include diff --git a/vbahelper/source/msforms/vbatogglebutton.hxx b/vbahelper/source/msforms/vbatogglebutton.hxx index dc6a440a5f1b..61be1a672c07 100644 --- a/vbahelper/source/msforms/vbatogglebutton.hxx +++ b/vbahelper/source/msforms/vbatogglebutton.hxx @@ -20,6 +20,7 @@ #define INCLUDED_VBAHELPER_SOURCE_MSFORMS_VBATOGGLEBUTTON_HXX #include #include +#include #include "vbacontrol.hxx" #include diff --git a/vbahelper/source/msforms/vbauserform.cxx b/vbahelper/source/msforms/vbauserform.cxx index 96acd3af6034..a89ab604a4ef 100644 --- a/vbahelper/source/msforms/vbauserform.cxx +++ b/vbahelper/source/msforms/vbauserform.cxx @@ -23,14 +23,10 @@ #include #include #include -#include #include -#include #include #include -#include -#include -#include +#include #include "vbacontrols.hxx" #include diff --git a/vbahelper/source/msforms/vbauserform.hxx b/vbahelper/source/msforms/vbauserform.hxx index 472fe351cc04..ded092bc1770 100644 --- a/vbahelper/source/msforms/vbauserform.hxx +++ b/vbahelper/source/msforms/vbauserform.hxx @@ -24,7 +24,6 @@ #include #include -#include #include "vbacontrol.hxx" //typedef InheritedHelperInterfaceWeakImpl< ov::msforms::XUserForm > ScVbaUserForm_BASE; diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx index bf7ac741563c..286b38bd4b88 100644 --- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx +++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx @@ -22,15 +22,8 @@ #include #include -#include #include -#include -#include #include -#include -#include -#include -#include #include #include @@ -39,9 +32,7 @@ #include #include -#include #include -#include #include #include #include diff --git a/vbahelper/source/vbahelper/vbacolorformat.cxx b/vbahelper/source/vbahelper/vbacolorformat.cxx index 7fdfa9911d19..49089f994517 100644 --- a/vbahelper/source/vbahelper/vbacolorformat.cxx +++ b/vbahelper/source/vbahelper/vbacolorformat.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include -#include #include "vbacolorformat.hxx" using namespace ooo::vba; diff --git a/vbahelper/source/vbahelper/vbacolorformat.hxx b/vbahelper/source/vbahelper/vbacolorformat.hxx index 746c87c9fadc..888228e77610 100644 --- a/vbahelper/source/vbahelper/vbacolorformat.hxx +++ b/vbahelper/source/vbahelper/vbacolorformat.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include "vbafillformat.hxx" diff --git a/vbahelper/source/vbahelper/vbacommandbar.cxx b/vbahelper/source/vbahelper/vbacommandbar.cxx index c1adf36f681a..b9cb17e6271e 100644 --- a/vbahelper/source/vbahelper/vbacommandbar.cxx +++ b/vbahelper/source/vbahelper/vbacommandbar.cxx @@ -18,7 +18,6 @@ */ #include "vbacommandbar.hxx" #include "vbacommandbarcontrols.hxx" -#include #include #include #include diff --git a/vbahelper/source/vbahelper/vbacommandbar.hxx b/vbahelper/source/vbahelper/vbacommandbar.hxx index 91a0fe6f0144..b6508760625e 100644 --- a/vbahelper/source/vbahelper/vbacommandbar.hxx +++ b/vbahelper/source/vbahelper/vbacommandbar.hxx @@ -20,10 +20,6 @@ #define INCLUDED_VBAHELPER_SOURCE_VBAHELPER_VBACOMMANDBAR_HXX #include -#include -#include -#include -#include #include #include "vbacommandbarhelper.hxx" diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrols.hxx b/vbahelper/source/vbahelper/vbacommandbarcontrols.hxx index f82651e9c96c..f30dc586eee7 100644 --- a/vbahelper/source/vbahelper/vbacommandbarcontrols.hxx +++ b/vbahelper/source/vbahelper/vbacommandbarcontrols.hxx @@ -20,8 +20,6 @@ #define INCLUDED_VBAHELPER_SOURCE_VBAHELPER_VBACOMMANDBARCONTROLS_HXX #include -#include -#include #include #include "vbacommandbarhelper.hxx" diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx index f2926139aea9..d61a3c3dd0dd 100644 --- a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx +++ b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx @@ -21,18 +21,11 @@ #include #include #include -#include -#include -#include -#include -#include #include #include -#include #include #include #include -#include #include #include diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.hxx b/vbahelper/source/vbahelper/vbacommandbarhelper.hxx index 17d6519d1475..545dc7318fc0 100644 --- a/vbahelper/source/vbahelper/vbacommandbarhelper.hxx +++ b/vbahelper/source/vbahelper/vbacommandbarhelper.hxx @@ -19,11 +19,9 @@ #ifndef INCLUDED_VBAHELPER_SOURCE_VBAHELPER_VBACOMMANDBARHELPER_HXX #define INCLUDED_VBAHELPER_SOURCE_VBAHELPER_VBACOMMANDBARHELPER_HXX -#include #include #include #include -#include #include #include #include diff --git a/vbahelper/source/vbahelper/vbacommandbars.cxx b/vbahelper/source/vbahelper/vbacommandbars.cxx index 66d14d0cfa18..a864339fd38d 100644 --- a/vbahelper/source/vbahelper/vbacommandbars.cxx +++ b/vbahelper/source/vbahelper/vbacommandbars.cxx @@ -16,12 +16,8 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include + #include -#include -#include -#include -#include #include #include diff --git a/vbahelper/source/vbahelper/vbacommandbars.hxx b/vbahelper/source/vbahelper/vbacommandbars.hxx index e94efafe59f9..ba7c8cbcd6cb 100644 --- a/vbahelper/source/vbahelper/vbacommandbars.hxx +++ b/vbahelper/source/vbahelper/vbacommandbars.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include "vbacommandbarhelper.hxx" diff --git a/vbahelper/source/vbahelper/vbadocumentbase.cxx b/vbahelper/source/vbahelper/vbadocumentbase.cxx index 39aea5b2db18..58210a3358bf 100644 --- a/vbahelper/source/vbahelper/vbadocumentbase.cxx +++ b/vbahelper/source/vbahelper/vbadocumentbase.cxx @@ -18,8 +18,8 @@ */ #include -#include +#include #include #include #include @@ -31,8 +31,6 @@ #include #include #include -#include -#include #include #include diff --git a/vbahelper/source/vbahelper/vbadocumentsbase.cxx b/vbahelper/source/vbahelper/vbadocumentsbase.cxx index e0f36fb3b137..b7b8124c2f0a 100644 --- a/vbahelper/source/vbahelper/vbadocumentsbase.cxx +++ b/vbahelper/source/vbahelper/vbadocumentsbase.cxx @@ -28,23 +28,16 @@ #include #include #include -#include -#include -#include -#include #include -#include #include #include -#include #include #include #include #include -#include -#include #include +#include using namespace ::ooo::vba; using namespace ::com::sun::star; diff --git a/vbahelper/source/vbahelper/vbafontbase.cxx b/vbahelper/source/vbahelper/vbafontbase.cxx index 95359aa78637..ea4278a47bcd 100644 --- a/vbahelper/source/vbahelper/vbafontbase.cxx +++ b/vbahelper/source/vbahelper/vbafontbase.cxx @@ -16,14 +16,12 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include + #include #include #include -#include #include #include -#include #include using namespace ::ooo::vba; diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx index 9e0218782fe7..71f990685dd6 100644 --- a/vbahelper/source/vbahelper/vbahelper.cxx +++ b/vbahelper/source/vbahelper/vbahelper.cxx @@ -16,7 +16,7 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include + #include #include #include @@ -35,15 +35,13 @@ #include #include #include -#include +#include #include - -#include +#include #include #include #include -#include #include #include @@ -57,19 +55,13 @@ #include #include -#include #include #include #include -#include #include #include -#include #include -#include -#include #include -#include #include #include #include diff --git a/vbahelper/source/vbahelper/vbalineformat.cxx b/vbahelper/source/vbahelper/vbalineformat.cxx index 5437d030c777..6ae69fff2409 100644 --- a/vbahelper/source/vbahelper/vbalineformat.cxx +++ b/vbahelper/source/vbahelper/vbalineformat.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include -#include -#include #include #include #include diff --git a/vbahelper/source/vbahelper/vbashape.cxx b/vbahelper/source/vbahelper/vbashape.cxx index f49d48370c9e..8f16865eff8c 100644 --- a/vbahelper/source/vbahelper/vbashape.cxx +++ b/vbahelper/source/vbahelper/vbashape.cxx @@ -18,15 +18,13 @@ */ #include #include +#include #include #include -#include -#include -#include +#include +#include #include #include -#include -#include #include #include #include @@ -38,8 +36,6 @@ #include #include #include -#include -#include #include #include diff --git a/vbahelper/source/vbahelper/vbashaperange.cxx b/vbahelper/source/vbahelper/vbashaperange.cxx index 6f353e5e14d1..7e69fc01b822 100644 --- a/vbahelper/source/vbahelper/vbashaperange.cxx +++ b/vbahelper/source/vbahelper/vbashaperange.cxx @@ -23,7 +23,6 @@ #include #include -#include #include #include using namespace ::ooo::vba; diff --git a/vbahelper/source/vbahelper/vbashapes.cxx b/vbahelper/source/vbahelper/vbashapes.cxx index f9356efedd9d..6177a23b595b 100644 --- a/vbahelper/source/vbahelper/vbashapes.cxx +++ b/vbahelper/source/vbahelper/vbashapes.cxx @@ -16,28 +16,23 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include + #include #include #include #include -#include #include #include #include +#include #include #include #include #include -#include -#include -#include #include #include #include #include -#include -#include #include #include #include diff --git a/vbahelper/source/vbahelper/vbatextframe.cxx b/vbahelper/source/vbahelper/vbatextframe.cxx index a55c895376ec..23c79f43bd61 100644 --- a/vbahelper/source/vbahelper/vbatextframe.cxx +++ b/vbahelper/source/vbahelper/vbatextframe.cxx @@ -16,10 +16,9 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include + #include #include -#include #include using namespace ::ooo::vba; diff --git a/vbahelper/source/vbahelper/vbawindowbase.cxx b/vbahelper/source/vbahelper/vbawindowbase.cxx index 015a9d832da9..a2735e31f19f 100644 --- a/vbahelper/source/vbahelper/vbawindowbase.cxx +++ b/vbahelper/source/vbahelper/vbawindowbase.cxx @@ -18,7 +18,6 @@ */ #include -#include #include #include #include -- cgit