tdf#42949 Fix IWYU warnings in ucbhelper/

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

Also include/ucbhelper had some false positives not yet on the blacklist

Change-Id: I4500271ea35efd7e140c76255df95ff7bbdf9f27
Reviewed-on: https://gerrit.libreoffice.org/70745
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
diff --git a/include/IwyuFilter_include.yaml b/include/IwyuFilter_include.yaml
index 393eda9..455c1bc 100644
--- a/include/IwyuFilter_include.yaml
+++ b/include/IwyuFilter_include.yaml
@@ -88,6 +88,18 @@
    include/cppuhelper/interfacecontainer.h:
    #Needed for implicit destructor
    - com/sun/star/uno/Sequence.hxx
    include/ucbhelper/activedatasink.hxx:
    # base class has to be a complete type
    - com/sun/star/io/XActiveDataSink.hpp
    include/ucbhelper/activedatastreamer.hxx:
    # base class has to be a complete type
    - com/sun/star/io/XActiveDataStreamer.hpp
    include/ucbhelper/commandenvironment.hxx:
    # base class has to be a complete type
    - com/sun/star/ucb/XCommandEnvironment.hpp
    include/ucbhelper/interceptedinteraction.hxx:
    # base class has to be a complete type
    - com/sun/star/task/XInteractionHandler.hpp
    include/ucbhelper/fd_inputstream.hxx:
    # Needed for typedef
    - com/sun/star/io/XInputStream.hpp
diff --git a/include/ucbhelper/interceptedinteraction.hxx b/include/ucbhelper/interceptedinteraction.hxx
index 5b57717..52928dd 100644
--- a/include/ucbhelper/interceptedinteraction.hxx
+++ b/include/ucbhelper/interceptedinteraction.hxx
@@ -24,10 +24,11 @@

#include <com/sun/star/task/XInteractionHandler.hpp>

#include <com/sun/star/task/XInteractionRequest.hpp>
#include <cppuhelper/implbase.hxx>
#include <ucbhelper/ucbhelperdllapi.h>

namespace com::sun::star::task { class XInteractionRequest; }


namespace ucbhelper{

diff --git a/ucbhelper/IwyuFilter_ucbhelper.yaml b/ucbhelper/IwyuFilter_ucbhelper.yaml
new file mode 100644
index 0000000..d6c0376
--- /dev/null
+++ b/ucbhelper/IwyuFilter_ucbhelper.yaml
@@ -0,0 +1,23 @@
---
assumeFilename: ucbhelper/source/provider/resultset.cxx
blacklist:
    ucbhelper/source/client/content.cxx:
    # Needed for direct member access
    - com/sun/star/ucb/XCommandInfo.hpp
    - com/sun/star/beans/XPropertySetInfo.hpp
    ucbhelper/source/provider/cancelcommandexecution.cxx:
    # Needed for linker visibility
    - ucbhelper/cancelcommandexecution.hxx
    ucbhelper/source/provider/getcomponentcontext.cxx:
    # Needed to for ucbhelper::getComponentContext
    - ucbhelper/getcomponentcontext.hxx
    ucbhelper/source/provider/resultsetmetadata.cxx:
    # Needed for UnoType types
    - com/sun/star/io/XInputStream.hpp
    - com/sun/star/sdbc/XArray.hpp
    - com/sun/star/sdbc/XBlob.hpp
    - com/sun/star/sdbc/XClob.hpp
    - com/sun/star/sdbc/XRef.hpp
    - com/sun/star/util/Date.hpp
    - com/sun/star/util/Time.hpp
    - com/sun/star/util/DateTime.hpp
diff --git a/ucbhelper/source/client/commandenvironment.cxx b/ucbhelper/source/client/commandenvironment.cxx
index 7ee9cd2..892a27b 100644
--- a/ucbhelper/source/client/commandenvironment.cxx
+++ b/ucbhelper/source/client/commandenvironment.cxx
@@ -23,18 +23,18 @@
 **************************************************************************

 *************************************************************************/
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/ucb/XContentIdentifierFactory.hpp>
#include <com/sun/star/ucb/XContentProvider.hpp>
#include <com/sun/star/ucb/XContentProviderManager.hpp>

#include <ucbhelper/commandenvironment.hxx>
#include <com/sun/star/uno/Reference.hxx>

using namespace com::sun::star::lang;
using namespace com::sun::star::task;
using namespace com::sun::star::ucb;
using namespace com::sun::star::uno;

namespace com::sun::star::task { class XInteractionHandler; }
namespace com::sun::star::ucb { class XProgressHandler; }

namespace ucbhelper
{
// struct CommandEnvironment_Impl.
diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx
index 0af6636..01d55bf 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -33,22 +33,16 @@
#include <com/sun/star/ucb/ContentCreationError.hpp>
#include <com/sun/star/ucb/ContentCreationException.hpp>
#include <com/sun/star/ucb/IllegalIdentifierException.hpp>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <com/sun/star/ucb/XCommandInfo.hpp>
#include <com/sun/star/ucb/XCommandProcessor.hpp>
#include <com/sun/star/ucb/Command.hpp>
#include <com/sun/star/ucb/CommandInfo.hpp>
#include <com/sun/star/ucb/ContentAction.hpp>
#include <com/sun/star/ucb/OpenCommandArgument2.hpp>
#include <com/sun/star/ucb/InsertCommandArgument.hpp>
#include <com/sun/star/ucb/GlobalTransferCommandArgument2.hpp>
#include <com/sun/star/ucb/NameClash.hpp>
#include <com/sun/star/ucb/OpenMode.hpp>
#include <com/sun/star/ucb/XContentCreator.hpp>
#include <com/sun/star/ucb/XContentEventListener.hpp>
#include <com/sun/star/ucb/XContentIdentifierFactory.hpp>
#include <com/sun/star/ucb/XContentProvider.hpp>
#include <com/sun/star/ucb/XContentProviderManager.hpp>
#include <com/sun/star/ucb/XDynamicResultSet.hpp>
#include <com/sun/star/ucb/SortedDynamicResultSetFactory.hpp>
#include <com/sun/star/ucb/UniversalContentBroker.hpp>
@@ -56,17 +50,18 @@
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/beans/Property.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/sdbc/XResultSet.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/beans/UnknownPropertyException.hpp>
#include <ucbhelper/macros.hxx>
#include <ucbhelper/content.hxx>
#include <ucbhelper/activedatasink.hxx>
#include <ucbhelper/activedatastreamer.hxx>
#include <ucbhelper/interactionrequest.hxx>
#include <ucbhelper/cancelcommandexecution.hxx>

namespace com::sun::star::ucb { class XCommandEnvironment; }
namespace com::sun::star::ucb { class XContentProvider; }
namespace com::sun::star::sdbc { class XResultSet; }

using namespace com::sun::star::container;
using namespace com::sun::star::beans;
using namespace com::sun::star::io;
diff --git a/ucbhelper/source/provider/cancelcommandexecution.cxx b/ucbhelper/source/provider/cancelcommandexecution.cxx
index b55c50f..e61415f 100644
--- a/ucbhelper/source/provider/cancelcommandexecution.cxx
+++ b/ucbhelper/source/provider/cancelcommandexecution.cxx
@@ -26,10 +26,7 @@
#include <osl/diagnose.h>
#include <rtl/ref.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/ucb/CommandFailedException.hpp>
#include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
#include <com/sun/star/ucb/NameClashException.hpp>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <ucbhelper/interactionrequest.hxx>
#include <ucbhelper/cancelcommandexecution.hxx>
diff --git a/ucbhelper/source/provider/contenthelper.cxx b/ucbhelper/source/provider/contenthelper.cxx
index 1482c03..5c64416 100644
--- a/ucbhelper/source/provider/contenthelper.cxx
+++ b/ucbhelper/source/provider/contenthelper.cxx
@@ -21,7 +21,6 @@

#include <com/sun/star/lang/NoSupportException.hpp>
#include <com/sun/star/ucb/ContentAction.hpp>
#include <com/sun/star/ucb/CommandInfoChange.hpp>
#include <com/sun/star/ucb/IllegalIdentifierException.hpp>
#include <com/sun/star/ucb/XPersistentPropertySet.hpp>
#include <com/sun/star/beans/IllegalTypeException.hpp>
diff --git a/ucbhelper/source/provider/contentidentifier.cxx b/ucbhelper/source/provider/contentidentifier.cxx
index 0026ca0..681890d 100644
--- a/ucbhelper/source/provider/contentidentifier.cxx
+++ b/ucbhelper/source/provider/contentidentifier.cxx
@@ -23,7 +23,6 @@
 **************************************************************************

 *************************************************************************/
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <ucbhelper/contentidentifier.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/queryinterface.hxx>
diff --git a/ucbhelper/source/provider/contentinfo.cxx b/ucbhelper/source/provider/contentinfo.cxx
index 1d52bdf..a7c9bcc 100644
--- a/ucbhelper/source/provider/contentinfo.cxx
+++ b/ucbhelper/source/provider/contentinfo.cxx
@@ -22,9 +22,9 @@
 **************************************************************************

 *************************************************************************/
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/ucb/UnsupportedCommandException.hpp>
#include <com/sun/star/ucb/XPropertySetRegistry.hpp>
#include <com/sun/star/ucb/XPersistentPropertySet.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/ucb/XCommandInfo.hpp>

diff --git a/ucbhelper/source/provider/fd_inputstream.cxx b/ucbhelper/source/provider/fd_inputstream.cxx
index b34e396..795c2dc 100644
--- a/ucbhelper/source/provider/fd_inputstream.cxx
+++ b/ucbhelper/source/provider/fd_inputstream.cxx
@@ -20,7 +20,6 @@
#include <ucbhelper/fd_inputstream.hxx>

#include <com/sun/star/io/IOException.hpp>
#include <rtl/alloc.h>
#include <osl/diagnose.h>
#include <sal/log.hxx>
#include <algorithm>
diff --git a/ucbhelper/source/provider/getcomponentcontext.cxx b/ucbhelper/source/provider/getcomponentcontext.cxx
index 1a73d2f..5ccd9e8 100644
--- a/ucbhelper/source/provider/getcomponentcontext.cxx
+++ b/ucbhelper/source/provider/getcomponentcontext.cxx
@@ -20,11 +20,12 @@
#include <sal/config.h>

#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <ucbhelper/getcomponentcontext.hxx>

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

css::uno::Reference< css::uno::XComponentContext >
ucbhelper::getComponentContext(
    css::uno::Reference< css::lang::XMultiServiceFactory > const & factory)
diff --git a/ucbhelper/source/provider/providerhelper.cxx b/ucbhelper/source/provider/providerhelper.cxx
index 766c6eb..546410b 100644
--- a/ucbhelper/source/provider/providerhelper.cxx
+++ b/ucbhelper/source/provider/providerhelper.cxx
@@ -30,7 +30,6 @@
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <ucbhelper/contenthelper.hxx>
#include <ucbhelper/contentidentifier.hxx>
#include <ucbhelper/providerhelper.hxx>
#include <ucbhelper/macros.hxx>

diff --git a/ucbhelper/source/provider/registerucb.cxx b/ucbhelper/source/provider/registerucb.cxx
index 7130c33..842fc00 100644
--- a/ucbhelper/source/provider/registerucb.cxx
+++ b/ucbhelper/source/provider/registerucb.cxx
@@ -18,8 +18,7 @@
 */

#include <ucbhelper/registerucb.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/ucb/DuplicateProviderException.hpp>
#include <com/sun/star/ucb/XContentProviderManager.hpp>
#include <com/sun/star/ucb/XParameterizedContentProvider.hpp>
diff --git a/ucbhelper/source/provider/resultset.cxx b/ucbhelper/source/provider/resultset.cxx
index 4ed85d4..ecc8cff 100644
--- a/ucbhelper/source/provider/resultset.cxx
+++ b/ucbhelper/source/provider/resultset.cxx
@@ -27,8 +27,7 @@
#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/ucb/ResultSetException.hpp>
#include <ucbhelper/getcomponentcontext.hxx>
#include <com/sun/star/sdbc/SQLException.hpp>
#include <ucbhelper/resultset.hxx>
#include <ucbhelper/resultsetmetadata.hxx>
#include <ucbhelper/macros.hxx>
diff --git a/ucbhelper/source/provider/resultsethelper.cxx b/ucbhelper/source/provider/resultsethelper.cxx
index 0a09c69..b26420b 100644
--- a/ucbhelper/source/provider/resultsethelper.cxx
+++ b/ucbhelper/source/provider/resultsethelper.cxx
@@ -35,7 +35,6 @@
#include <cppuhelper/interfacecontainer.h>
#include <cppuhelper/queryinterface.hxx>
#include <ucbhelper/resultsethelper.hxx>
#include <ucbhelper/getcomponentcontext.hxx>
#include <ucbhelper/macros.hxx>

#include <osl/diagnose.h>
diff --git a/ucbhelper/source/provider/resultsetmetadata.cxx b/ucbhelper/source/provider/resultsetmetadata.cxx
index 3666fa8..1fa276f 100644
--- a/ucbhelper/source/provider/resultsetmetadata.cxx
+++ b/ucbhelper/source/provider/resultsetmetadata.cxx
@@ -28,7 +28,6 @@
#include <com/sun/star/beans/Property.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/XArray.hpp>
diff --git a/ucbhelper/source/provider/simpleauthenticationrequest.cxx b/ucbhelper/source/provider/simpleauthenticationrequest.cxx
index 569876f..96608c7 100644
--- a/ucbhelper/source/provider/simpleauthenticationrequest.cxx
+++ b/ucbhelper/source/provider/simpleauthenticationrequest.cxx
@@ -17,7 +17,6 @@
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

#include <com/sun/star/task/XMasterPasswordHandling.hpp>
#include <com/sun/star/ucb/URLAuthenticationRequest.hpp>
#include <ucbhelper/simpleauthenticationrequest.hxx>