tdf#42949 Fix IWYU warnings in UnoControls/

Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Id088a2c8a91c2fe7c8ff9e05d910d5b5e9383b7c
Reviewed-on: https://gerrit.libreoffice.org/72095
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
diff --git a/UnoControls/IwyuFilter_UnoControls.yaml b/UnoControls/IwyuFilter_UnoControls.yaml
new file mode 100644
index 0000000..998e200
--- /dev/null
+++ b/UnoControls/IwyuFilter_UnoControls.yaml
@@ -0,0 +1,12 @@
---
assumeFilename: UnoControls/source/base/basecontrol.cxx
blacklist:
    UnoControls/inc/multiplexer.hxx:
    # Don't propose hxx -> h change in URE libs
    - cppuhelper/interfacecontainer.hxx
    UnoControls/source/inc/OConnectionPointContainerHelper.hxx:
    # Don't propose hxx -> h change in URE libs
    - cppuhelper/interfacecontainer.hxx
    UnoControls/source/controls/framecontrol.cxx:
    # Needed for use in cppu::UnoType template
    - com/sun/star/awt/XControlContainer.hpp
diff --git a/UnoControls/inc/basecontainercontrol.hxx b/UnoControls/inc/basecontainercontrol.hxx
index d297e41..500313f 100644
--- a/UnoControls/inc/basecontainercontrol.hxx
+++ b/UnoControls/inc/basecontainercontrol.hxx
@@ -20,20 +20,11 @@
#ifndef INCLUDED_UNOCONTROLS_INC_BASECONTAINERCONTROL_HXX
#define INCLUDED_UNOCONTROLS_INC_BASECONTAINERCONTROL_HXX

#include <com/sun/star/lang/XServiceName.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/container/XContainer.hpp>
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/container/XNameReplace.hpp>
#include <com/sun/star/container/XContainerListener.hpp>
#include <com/sun/star/container/XSet.hpp>
#include <com/sun/star/container/ContainerEvent.hpp>
#include <com/sun/star/container/XIndexReplace.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <memory>
#include <vector>

#include "basecontrol.hxx"
#include <com/sun/star/awt/XControlContainer.hpp>

namespace unocontrols {

diff --git a/UnoControls/inc/basecontrol.hxx b/UnoControls/inc/basecontrol.hxx
index e10a7ce..c19e3d9 100644
--- a/UnoControls/inc/basecontrol.hxx
+++ b/UnoControls/inc/basecontrol.hxx
@@ -20,78 +20,23 @@
#ifndef INCLUDED_UNOCONTROLS_INC_BASECONTROL_HXX
#define INCLUDED_UNOCONTROLS_INC_BASECONTROL_HXX

#include <com/sun/star/awt/XKeyListener.hpp>
#include <com/sun/star/awt/XPaintListener.hpp>
#include <com/sun/star/awt/KeyEvent.hpp>
#include <com/sun/star/awt/KeyModifier.hpp>
#include <com/sun/star/awt/XMouseMotionListener.hpp>
#include <com/sun/star/awt/FocusEvent.hpp>
#include <com/sun/star/awt/XWindowListener.hpp>
#include <com/sun/star/awt/XActivateListener.hpp>
#include <com/sun/star/awt/MouseEvent.hpp>
#include <com/sun/star/awt/XTopWindowListener.hpp>
#include <com/sun/star/awt/PaintEvent.hpp>
#include <com/sun/star/awt/InputEvent.hpp>
#include <com/sun/star/awt/KeyGroup.hpp>
#include <com/sun/star/awt/Key.hpp>
#include <com/sun/star/awt/WindowEvent.hpp>
#include <com/sun/star/awt/XMouseListener.hpp>
#include <com/sun/star/awt/KeyFunction.hpp>
#include <com/sun/star/awt/FocusChangeReason.hpp>
#include <com/sun/star/awt/MouseButton.hpp>
#include <com/sun/star/awt/XFocusListener.hpp>
#include <com/sun/star/awt/XFileDialog.hpp>
#include <com/sun/star/awt/XTextComponent.hpp>
#include <com/sun/star/awt/XListBox.hpp>
#include <com/sun/star/awt/XProgressMonitor.hpp>
#include <com/sun/star/awt/TextAlign.hpp>
#include <com/sun/star/awt/XScrollBar.hpp>
#include <com/sun/star/awt/XVclContainerPeer.hpp>
#include <com/sun/star/awt/XTabControllerModel.hpp>
#include <com/sun/star/awt/XMessageBox.hpp>
#include <com/sun/star/awt/XTextEditField.hpp>
#include <com/sun/star/awt/Style.hpp>
#include <com/sun/star/awt/XTimeField.hpp>
#include <com/sun/star/awt/XVclWindowPeer.hpp>
#include <com/sun/star/awt/XControlModel.hpp>
#include <com/sun/star/awt/XSpinField.hpp>
#include <com/sun/star/awt/XUnoControlContainer.hpp>
#include <com/sun/star/awt/XTextLayoutConstrains.hpp>
#include <com/sun/star/awt/XNumericField.hpp>
#include <com/sun/star/awt/XButton.hpp>
#include <com/sun/star/awt/XTextArea.hpp>
#include <com/sun/star/awt/XImageButton.hpp>
#include <com/sun/star/awt/XFixedText.hpp>
#include <com/sun/star/awt/XControlContainer.hpp>
#include <com/sun/star/awt/XDialog.hpp>
#include <com/sun/star/awt/ScrollBarOrientation.hpp>
#include <com/sun/star/awt/XRadioButton.hpp>
#include <com/sun/star/awt/XCurrencyField.hpp>
#include <com/sun/star/awt/XPatternField.hpp>
#include <com/sun/star/awt/VclWindowPeerAttribute.hpp>
#include <com/sun/star/awt/XTabController.hpp>
#include <com/sun/star/awt/XVclContainer.hpp>
#include <com/sun/star/awt/XDateField.hpp>
#include <com/sun/star/awt/XComboBox.hpp>
#include <com/sun/star/awt/XControl.hpp>
#include <com/sun/star/awt/XCheckBox.hpp>
#include <com/sun/star/awt/XLayoutConstrains.hpp>
#include <com/sun/star/awt/XProgressBar.hpp>
#include <com/sun/star/awt/XTopWindow.hpp>
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/awt/PosSize.hpp>
#include <com/sun/star/awt/XView.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <osl/mutex.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/component.hxx>
#include <rtl/ref.hxx>

#include "multiplexer.hxx"

namespace com { namespace sun { namespace star { namespace uno {
    class XComponentContext;
} } } }
namespace com::sun::star::uno { class XComponentContext; }
namespace com::sun::star::awt { class XFocusListener; }
namespace com::sun::star::awt { class XMouseListener; }
namespace com::sun::star::awt { class XMouseMotionListener; }
namespace com::sun::star::awt { struct PaintEvent; }
namespace com::sun::star::awt { struct WindowEvent; }
namespace unocontrols { class OMRCListenerMultiplexerHelper; }

namespace unocontrols {

diff --git a/UnoControls/inc/multiplexer.hxx b/UnoControls/inc/multiplexer.hxx
index f36ba3a..dda3013 100644
--- a/UnoControls/inc/multiplexer.hxx
+++ b/UnoControls/inc/multiplexer.hxx
@@ -22,31 +22,21 @@

#include <com/sun/star/awt/XKeyListener.hpp>
#include <com/sun/star/awt/XPaintListener.hpp>
#include <com/sun/star/awt/KeyEvent.hpp>
#include <com/sun/star/awt/KeyModifier.hpp>
#include <com/sun/star/awt/XMouseMotionListener.hpp>
#include <com/sun/star/awt/FocusEvent.hpp>
#include <com/sun/star/awt/XWindowListener.hpp>
#include <com/sun/star/awt/XActivateListener.hpp>
#include <com/sun/star/awt/MouseEvent.hpp>
#include <com/sun/star/awt/XTopWindowListener.hpp>
#include <com/sun/star/awt/PaintEvent.hpp>
#include <com/sun/star/awt/InputEvent.hpp>
#include <com/sun/star/awt/KeyGroup.hpp>
#include <com/sun/star/awt/Key.hpp>
#include <com/sun/star/awt/WindowEvent.hpp>
#include <com/sun/star/awt/XMouseListener.hpp>
#include <com/sun/star/awt/KeyFunction.hpp>
#include <com/sun/star/awt/FocusChangeReason.hpp>
#include <com/sun/star/awt/MouseButton.hpp>
#include <com/sun/star/awt/XFocusListener.hpp>
#include <com/sun/star/awt/XTopWindow.hpp>
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/awt/PosSize.hpp>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/weakref.hxx>
#include <cppuhelper/interfacecontainer.hxx>

namespace com::sun::star::awt { class XWindow; }
namespace com::sun::star::awt { struct KeyEvent; }
namespace com::sun::star::awt { struct MouseEvent; }
namespace com::sun::star::awt { struct PaintEvent; }
namespace com::sun::star::awt { struct WindowEvent; }

namespace unocontrols {

class OMRCListenerMultiplexerHelper : public css::awt::XFocusListener
diff --git a/UnoControls/source/base/basecontainercontrol.cxx b/UnoControls/source/base/basecontainercontrol.cxx
index 3c6469d..c814eb0 100644
--- a/UnoControls/source/base/basecontainercontrol.cxx
+++ b/UnoControls/source/base/basecontainercontrol.cxx
@@ -22,6 +22,10 @@
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/typeprovider.hxx>

#include <com/sun/star/container/ContainerEvent.hpp>
#include <com/sun/star/container/XContainerListener.hpp>
#include <com/sun/star/awt/XControlContainer.hpp>

//  namespaces

using namespace ::cppu;
diff --git a/UnoControls/source/base/basecontrol.cxx b/UnoControls/source/base/basecontrol.cxx
index 06adc4a..6294376 100644
--- a/UnoControls/source/base/basecontrol.cxx
+++ b/UnoControls/source/base/basecontrol.cxx
@@ -18,10 +18,9 @@
 */

#include <basecontrol.hxx>
#include <multiplexer.hxx>

#include <com/sun/star/awt/XDevice.hpp>
#include <com/sun/star/awt/XDisplayBitmap.hpp>
#include <com/sun/star/awt/DeviceInfo.hpp>
#include <com/sun/star/awt/WindowAttribute.hpp>
#include <com/sun/star/awt/PosSize.hpp>
#include <com/sun/star/awt/Toolkit.hpp>
diff --git a/UnoControls/source/base/multiplexer.cxx b/UnoControls/source/base/multiplexer.cxx
index d7008c6..cfeb597 100644
--- a/UnoControls/source/base/multiplexer.cxx
+++ b/UnoControls/source/base/multiplexer.cxx
@@ -22,6 +22,9 @@
#include <osl/diagnose.h>
#include <cppuhelper/queryinterface.hxx>

#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/awt/XTopWindow.hpp>

using namespace ::cppu;
using namespace ::osl;
using namespace ::com::sun::star::uno;
diff --git a/UnoControls/source/base/registercontrols.cxx b/UnoControls/source/base/registercontrols.cxx
index 46145f1..40a51b8e 100644
--- a/UnoControls/source/base/registercontrols.cxx
+++ b/UnoControls/source/base/registercontrols.cxx
@@ -19,7 +19,6 @@

#include <sal/config.h>

#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <comphelper/processfactory.hxx>
#include <cppuhelper/factory.hxx>
@@ -29,6 +28,8 @@
#include <progressmonitor.hxx>
#include <statusindicator.hxx>

namespace com::sun::star::lang { class XMultiServiceFactory; }

namespace {

/// @throws css::uno::Exception
diff --git a/UnoControls/source/controls/framecontrol.cxx b/UnoControls/source/controls/framecontrol.cxx
index 5c0bcc2..263391c 100644
--- a/UnoControls/source/controls/framecontrol.cxx
+++ b/UnoControls/source/controls/framecontrol.cxx
@@ -18,14 +18,15 @@
 */

#include <framecontrol.hxx>
#include <OConnectionPointContainerHelper.hxx>

#include <com/sun/star/awt/XControlContainer.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/frame/Frame.hpp>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
#include <comphelper/processfactory.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <osl/diagnose.h>
diff --git a/UnoControls/source/controls/progressbar.cxx b/UnoControls/source/controls/progressbar.cxx
index 0d3b03d..662242c 100644
--- a/UnoControls/source/controls/progressbar.cxx
+++ b/UnoControls/source/controls/progressbar.cxx
@@ -19,15 +19,11 @@

#include <progressbar.hxx>

#include <com/sun/star/awt/GradientStyle.hpp>
#include <com/sun/star/awt/RasterOperation.hpp>
#include <com/sun/star/awt/Gradient.hpp>
#include <com/sun/star/awt/XGraphics.hpp>
#include <tools/debug.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/typeprovider.hxx>

#include <math.h>
#include <limits.h>

using namespace ::cppu;
diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx
index 2c728cb..f1cfc79 100644
--- a/UnoControls/source/controls/progressmonitor.cxx
+++ b/UnoControls/source/controls/progressmonitor.cxx
@@ -19,9 +19,7 @@

#include <progressmonitor.hxx>

#include <com/sun/star/awt/GradientStyle.hpp>
#include <com/sun/star/awt/RasterOperation.hpp>
#include <com/sun/star/awt/Gradient.hpp>
#include <com/sun/star/awt/XFixedText.hpp>
#include <com/sun/star/awt/XGraphics.hpp>
#include <com/sun/star/awt/PosSize.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
diff --git a/UnoControls/source/controls/statusindicator.cxx b/UnoControls/source/controls/statusindicator.cxx
index 2b6a23b..55652dd 100644
--- a/UnoControls/source/controls/statusindicator.cxx
+++ b/UnoControls/source/controls/statusindicator.cxx
@@ -19,7 +19,8 @@

#include <statusindicator.hxx>

#include <com/sun/star/awt/WindowAttribute.hpp>
#include <com/sun/star/awt/PosSize.hpp>
#include <com/sun/star/awt/XFixedText.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/typeprovider.hxx>
diff --git a/UnoControls/source/inc/OConnectionPointContainerHelper.hxx b/UnoControls/source/inc/OConnectionPointContainerHelper.hxx
index 316a836..7285421 100644
--- a/UnoControls/source/inc/OConnectionPointContainerHelper.hxx
+++ b/UnoControls/source/inc/OConnectionPointContainerHelper.hxx
@@ -21,9 +21,10 @@
#define INCLUDED_UNOCONTROLS_SOURCE_INC_OCONNECTIONPOINTCONTAINERHELPER_HXX

#include <com/sun/star/lang/XConnectionPointContainer.hpp>
#include <com/sun/star/lang/XConnectionPoint.hpp>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/propshlp.hxx>
#include <cppuhelper/interfacecontainer.hxx>

namespace com::sun::star::lang { class XConnectionPoint; }

namespace unocontrols {

diff --git a/UnoControls/source/inc/OConnectionPointHelper.hxx b/UnoControls/source/inc/OConnectionPointHelper.hxx
index 51143fc..852c916 100644
--- a/UnoControls/source/inc/OConnectionPointHelper.hxx
+++ b/UnoControls/source/inc/OConnectionPointHelper.hxx
@@ -20,13 +20,12 @@
#ifndef INCLUDED_UNOCONTROLS_SOURCE_INC_OCONNECTIONPOINTHELPER_HXX
#define INCLUDED_UNOCONTROLS_SOURCE_INC_OCONNECTIONPOINTHELPER_HXX

#include <com/sun/star/lang/XConnectionPointContainer.hpp>
#include <com/sun/star/lang/XConnectionPoint.hpp>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/weakref.hxx>
#include <cppuhelper/propshlp.hxx>

#include "OConnectionPointContainerHelper.hxx"
namespace com::sun::star::lang { class XConnectionPointContainer; }
namespace unocontrols { class OConnectionPointContainerHelper; }

namespace unocontrols {

diff --git a/UnoControls/source/inc/framecontrol.hxx b/UnoControls/source/inc/framecontrol.hxx
index f9bf629..c76bc75 100644
--- a/UnoControls/source/inc/framecontrol.hxx
+++ b/UnoControls/source/inc/framecontrol.hxx
@@ -20,15 +20,15 @@
#ifndef INCLUDED_UNOCONTROLS_SOURCE_INC_FRAMECONTROL_HXX
#define INCLUDED_UNOCONTROLS_SOURCE_INC_FRAMECONTROL_HXX

#include <com/sun/star/frame/XFrame2.hpp>
#include <com/sun/star/lang/XServiceName.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XConnectionPointContainer.hpp>
#include <cppuhelper/propshlp.hxx>
#include <rtl/ref.hxx>

#include <basecontrol.hxx>
#include "OConnectionPointContainerHelper.hxx"

namespace com::sun::star::beans { struct PropertyValue; }
namespace com::sun::star::frame { class XFrame2; }
namespace unocontrols { class OConnectionPointContainerHelper; }

namespace unocontrols {

diff --git a/UnoControls/source/inc/progressbar.hxx b/UnoControls/source/inc/progressbar.hxx
index 99a5bb3..77b7e7f 100644
--- a/UnoControls/source/inc/progressbar.hxx
+++ b/UnoControls/source/inc/progressbar.hxx
@@ -20,10 +20,8 @@
#ifndef INCLUDED_UNOCONTROLS_SOURCE_INC_PROGRESSBAR_HXX
#define INCLUDED_UNOCONTROLS_SOURCE_INC_PROGRESSBAR_HXX

#include <com/sun/star/lang/XServiceName.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/awt/XProgressBar.hpp>

#include <vcl/vclptr.hxx>
#include <tools/color.hxx>

#include <basecontrol.hxx>
diff --git a/UnoControls/source/inc/progressmonitor.hxx b/UnoControls/source/inc/progressmonitor.hxx
index e31cdab..65b7a47 100644
--- a/UnoControls/source/inc/progressmonitor.hxx
+++ b/UnoControls/source/inc/progressmonitor.hxx
@@ -20,43 +20,9 @@
#ifndef INCLUDED_UNOCONTROLS_SOURCE_INC_PROGRESSMONITOR_HXX
#define INCLUDED_UNOCONTROLS_SOURCE_INC_PROGRESSMONITOR_HXX

#include <com/sun/star/awt/XFileDialog.hpp>
#include <com/sun/star/awt/XTextComponent.hpp>
#include <com/sun/star/awt/XListBox.hpp>
#include <com/sun/star/awt/XProgressMonitor.hpp>
#include <com/sun/star/awt/TextAlign.hpp>
#include <com/sun/star/awt/XScrollBar.hpp>
#include <com/sun/star/awt/XVclContainerPeer.hpp>
#include <com/sun/star/awt/XTabControllerModel.hpp>
#include <com/sun/star/awt/XMessageBox.hpp>
#include <com/sun/star/awt/XTextEditField.hpp>
#include <com/sun/star/awt/Style.hpp>
#include <com/sun/star/awt/XTimeField.hpp>
#include <com/sun/star/awt/XVclWindowPeer.hpp>
#include <com/sun/star/awt/XControlModel.hpp>
#include <com/sun/star/awt/XSpinField.hpp>
#include <com/sun/star/awt/XUnoControlContainer.hpp>
#include <com/sun/star/awt/XTextLayoutConstrains.hpp>
#include <com/sun/star/awt/XNumericField.hpp>
#include <com/sun/star/awt/XButton.hpp>
#include <com/sun/star/awt/XTextArea.hpp>
#include <com/sun/star/awt/XImageButton.hpp>
#include <com/sun/star/awt/XFixedText.hpp>
#include <com/sun/star/awt/XControlContainer.hpp>
#include <com/sun/star/awt/XDialog.hpp>
#include <com/sun/star/awt/ScrollBarOrientation.hpp>
#include <com/sun/star/awt/XRadioButton.hpp>
#include <com/sun/star/awt/XCurrencyField.hpp>
#include <com/sun/star/awt/XPatternField.hpp>
#include <com/sun/star/awt/VclWindowPeerAttribute.hpp>
#include <com/sun/star/awt/XTabController.hpp>
#include <com/sun/star/awt/XVclContainer.hpp>
#include <com/sun/star/awt/XDateField.hpp>
#include <com/sun/star/awt/XComboBox.hpp>
#include <com/sun/star/awt/XControl.hpp>
#include <com/sun/star/awt/XCheckBox.hpp>
#include <com/sun/star/awt/XLayoutConstrains.hpp>
#include <com/sun/star/awt/XProgressBar.hpp>
#include <rtl/ref.hxx>

#include <vector>
@@ -64,6 +30,9 @@

#include <basecontainercontrol.hxx>

namespace com::sun::star::awt { class XFixedText; }
namespace com::sun::star::awt { class XControlModel; }

namespace unocontrols {

class ProgressBar;
diff --git a/UnoControls/source/inc/statusindicator.hxx b/UnoControls/source/inc/statusindicator.hxx
index ab55345..abd50d9 100644
--- a/UnoControls/source/inc/statusindicator.hxx
+++ b/UnoControls/source/inc/statusindicator.hxx
@@ -20,19 +20,18 @@
#ifndef INCLUDED_UNOCONTROLS_SOURCE_INC_STATUSINDICATOR_HXX
#define INCLUDED_UNOCONTROLS_SOURCE_INC_STATUSINDICATOR_HXX

#include <com/sun/star/awt/XControlModel.hpp>
#include <com/sun/star/awt/XFixedText.hpp>
#include <com/sun/star/awt/XGraphics.hpp>
#include <com/sun/star/awt/XLayoutConstrains.hpp>
#include <com/sun/star/awt/XProgressBar.hpp>
#include <com/sun/star/task/XStatusIndicator.hpp>
#include <com/sun/star/awt/XToolkit.hpp>
#include <com/sun/star/awt/XWindowPeer.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <rtl/ref.hxx>

#include <basecontainercontrol.hxx>

namespace com::sun::star::awt { class XControlModel; }
namespace com::sun::star::awt { class XFixedText; }
namespace com::sun::star::awt { class XGraphics; }
namespace com::sun::star::awt { class XToolkit; }
namespace com::sun::star::awt { class XWindowPeer; }

namespace unocontrols {

class ProgressBar;