tdf#42949 Fix IWYU warnings in unoxml/

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

Change-Id: I4457153dc4f2bfe932488b1c6e3af3cff58cb150
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85787
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
diff --git a/unoxml/IwyuFilter_unoxml.yaml b/unoxml/IwyuFilter_unoxml.yaml
new file mode 100644
index 0000000..9003b92
--- /dev/null
+++ b/unoxml/IwyuFilter_unoxml.yaml
@@ -0,0 +1,6 @@
---
assumeFilename: unoxml/source/dom/document.cxx
blacklist:
    unoxml/source/rdf/librdf_repository.cxx:
    # Wrapper header needed for platform independence
    - redland.h
diff --git a/unoxml/inc/event.hxx b/unoxml/inc/event.hxx
index 598f870..d024ea9c 100644
--- a/unoxml/inc/event.hxx
+++ b/unoxml/inc/event.hxx
@@ -29,8 +29,6 @@

#include <cppuhelper/implbase.hxx>

#include "node.hxx"

namespace DOM {namespace events
{
class CEvent : public cppu::WeakImplHelper< css::xml::dom::events::XEvent >
diff --git a/unoxml/inc/eventdispatcher.hxx b/unoxml/inc/eventdispatcher.hxx
index be6a720..10bcb0a 100644
--- a/unoxml/inc/eventdispatcher.hxx
+++ b/unoxml/inc/eventdispatcher.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_UNOXML_INC_EVENTDISPATCHER_HXX

#include <map>
#include <vector>

#include <libxml/tree.h>

@@ -29,8 +28,6 @@

#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/xml/dom/XNode.hpp>
#include <com/sun/star/xml/dom/events/EventType.hpp>
#include <com/sun/star/xml/dom/events/PhaseType.hpp>
#include <com/sun/star/xml/dom/events/XEvent.hpp>

namespace osl { class Mutex; }
diff --git a/unoxml/inc/node.hxx b/unoxml/inc/node.hxx
index 3637c47..a6fae4a 100644
--- a/unoxml/inc/node.hxx
+++ b/unoxml/inc/node.hxx
@@ -40,7 +40,6 @@
#include <com/sun/star/xml/dom/NodeType.hpp>
#include <com/sun/star/xml/dom/events/XEventTarget.hpp>
#include <com/sun/star/xml/dom/events/XEvent.hpp>
#include <com/sun/star/xml/dom/DOMException.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <com/sun/star/xml/sax/XFastDocumentHandler.hpp>

diff --git a/unoxml/qa/unit/domtest.cxx b/unoxml/qa/unit/domtest.cxx
index 0a80d2a..9070522 100644
--- a/unoxml/qa/unit/domtest.cxx
+++ b/unoxml/qa/unit/domtest.cxx
@@ -18,18 +18,11 @@
 */

#include <rtl/ref.hxx>
#include <rtl/byteseq.hxx>
#include <sal/log.hxx>
#include <osl/file.hxx>
#include <osl/process.h>
#include <comphelper/seqstream.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/bootstrap.hxx>
#include <cppuhelper/basemutex.hxx>
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/plugin/TestPlugIn.h>
#include <unotest/macros_test.hxx>
#include <test/bootstrapfixture.hxx>

#include <com/sun/star/xml/dom/DocumentBuilder.hpp>
diff --git a/unoxml/source/dom/attr.cxx b/unoxml/source/dom/attr.cxx
index 4ff411d..1a993e1 100644
--- a/unoxml/source/dom/attr.cxx
+++ b/unoxml/source/dom/attr.cxx
@@ -26,7 +26,6 @@
#include <osl/diagnose.h>
#include <sal/log.hxx>

#include <com/sun/star/xml/dom/DOMException.hpp>
#include <com/sun/star/xml/dom/events/XMutationEvent.hpp>

#include "document.hxx"
diff --git a/unoxml/source/dom/attributesmap.cxx b/unoxml/source/dom/attributesmap.cxx
index 9ff0298..eef8c09 100644
--- a/unoxml/source/dom/attributesmap.cxx
+++ b/unoxml/source/dom/attributesmap.cxx
@@ -21,6 +21,8 @@

#include <string.h>

#include <com/sun/star/xml/dom/DOMException.hpp>

#include "element.hxx"
#include "document.hxx"

diff --git a/unoxml/source/dom/attributesmap.hxx b/unoxml/source/dom/attributesmap.hxx
index 84255fd..4a1f485 100644
--- a/unoxml/source/dom/attributesmap.hxx
+++ b/unoxml/source/dom/attributesmap.hxx
@@ -29,6 +29,8 @@

#include <cppuhelper/implbase.hxx>

#include "element.hxx"

namespace DOM
{
    class CElement;
diff --git a/unoxml/source/dom/characterdata.cxx b/unoxml/source/dom/characterdata.cxx
index 46d7a4d..ee85a76 100644
--- a/unoxml/source/dom/characterdata.cxx
+++ b/unoxml/source/dom/characterdata.cxx
@@ -25,9 +25,9 @@

#include <osl/diagnose.h>

#include <com/sun/star/xml/dom/DOMException.hpp>
#include <com/sun/star/xml/dom/events/XDocumentEvent.hpp>

#include <mutationevent.hxx>
#include <com/sun/star/xml/dom/events/XMutationEvent.hpp>

using namespace css::uno;
using namespace css::xml::dom;
diff --git a/unoxml/source/dom/childlist.hxx b/unoxml/source/dom/childlist.hxx
index 24f833e..c9a2697 100644
--- a/unoxml/source/dom/childlist.hxx
+++ b/unoxml/source/dom/childlist.hxx
@@ -29,6 +29,8 @@

#include <cppuhelper/implbase.hxx>

#include <node.hxx>

namespace DOM
{
    class CNode;
diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx
index 51277a5..be96f69 100644
--- a/unoxml/source/dom/document.cxx
+++ b/unoxml/source/dom/document.cxx
@@ -45,7 +45,6 @@
#include <osl/diagnose.h>

#include <com/sun/star/xml/sax/FastToken.hpp>
#include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>

using namespace css;
using namespace css::io;
diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx
index bb2b729..880d37a 100644
--- a/unoxml/source/dom/documentbuilder.cxx
+++ b/unoxml/source/dom/documentbuilder.cxx
@@ -20,15 +20,11 @@
#include "documentbuilder.hxx"

#include <string.h>
#include <stdio.h>
#include <stdarg.h>

#include <libxml/xmlerror.h>
#include <libxml/tree.h>

#include <memory>

#include <rtl/alloc.h>
#include <rtl/ustrbuf.hxx>
#include <osl/diagnose.h>
#include <sal/log.hxx>
@@ -45,7 +41,6 @@
#include <ucbhelper/content.hxx>
#include <ucbhelper/commandenvironment.hxx>

#include <node.hxx>
#include "document.hxx"

using namespace css::io;
diff --git a/unoxml/source/dom/documentbuilder.hxx b/unoxml/source/dom/documentbuilder.hxx
index b8ce66e..ee8b404 100644
--- a/unoxml/source/dom/documentbuilder.hxx
+++ b/unoxml/source/dom/documentbuilder.hxx
@@ -33,9 +33,7 @@
#include <com/sun/star/xml/dom/XDOMImplementation.hpp>
#include <com/sun/star/xml/sax/XEntityResolver.hpp>
#include <com/sun/star/xml/sax/XErrorHandler.hpp>
#include <com/sun/star/xml/sax/SAXParseException.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/IOException.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>

diff --git a/unoxml/source/dom/element.cxx b/unoxml/source/dom/element.cxx
index f154cbc..a729601 100644
--- a/unoxml/source/dom/element.cxx
+++ b/unoxml/source/dom/element.cxx
@@ -26,6 +26,8 @@
#include <osl/diagnose.h>
#include <rtl/ustrbuf.hxx>

#include <com/sun/star/xml/dom/DOMException.hpp>
#include <com/sun/star/xml/dom/events/XMutationEvent.hpp>
#include <com/sun/star/xml/sax/FastToken.hpp>

#include <comphelper/attributelist.hxx>
@@ -37,8 +39,6 @@
#include "attributesmap.hxx"
#include "document.hxx"

#include <mutationevent.hxx>

using namespace css::uno;
using namespace css::xml::dom;
using namespace css::xml::dom::events;
diff --git a/unoxml/source/dom/elementlist.cxx b/unoxml/source/dom/elementlist.cxx
index 11afe2a..c72e67a 100644
--- a/unoxml/source/dom/elementlist.cxx
+++ b/unoxml/source/dom/elementlist.cxx
@@ -22,8 +22,6 @@
#include <string.h>

#include <cppuhelper/implbase.hxx>
#include <osl/diagnose.h>
#include <sal/log.hxx>
#include <tools/diagnose_ex.h>

#include "element.hxx"
diff --git a/unoxml/source/dom/elementlist.hxx b/unoxml/source/dom/elementlist.hxx
index 28a4cb6..b315790 100644
--- a/unoxml/source/dom/elementlist.hxx
+++ b/unoxml/source/dom/elementlist.hxx
@@ -30,7 +30,6 @@
#include <rtl/ref.hxx>

#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/xml/dom/XNode.hpp>
#include <com/sun/star/xml/dom/XNodeList.hpp>
#include <com/sun/star/xml/dom/events/XEvent.hpp>
diff --git a/unoxml/source/dom/entitiesmap.cxx b/unoxml/source/dom/entitiesmap.cxx
index e5d8664..d5c65e7 100644
--- a/unoxml/source/dom/entitiesmap.cxx
+++ b/unoxml/source/dom/entitiesmap.cxx
@@ -21,8 +21,6 @@

#include <osl/diagnose.h>

#include "documenttype.hxx"

using namespace css::uno;
using namespace css::xml::dom;

diff --git a/unoxml/source/dom/entitiesmap.hxx b/unoxml/source/dom/entitiesmap.hxx
index af3ad42..a239a45 100644
--- a/unoxml/source/dom/entitiesmap.hxx
+++ b/unoxml/source/dom/entitiesmap.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_UNOXML_SOURCE_DOM_ENTITIESMAP_HXX

#include <sal/types.h>
#include <rtl/ref.hxx>

#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/xml/dom/XNode.hpp>
diff --git a/unoxml/source/dom/entity.hxx b/unoxml/source/dom/entity.hxx
index bed4820..ff45da5 100644
--- a/unoxml/source/dom/entity.hxx
+++ b/unoxml/source/dom/entity.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_UNOXML_SOURCE_DOM_ENTITY_HXX

#include <libxml/tree.h>
#include <libxml/entities.h>

#include <sal/types.h>

diff --git a/unoxml/source/dom/node.cxx b/unoxml/source/dom/node.cxx
index d85038c..68a834c 100644
--- a/unoxml/source/dom/node.cxx
+++ b/unoxml/source/dom/node.cxx
@@ -19,19 +19,19 @@

#include <node.hxx>

#include <stdio.h>
#include <string.h>

#include <libxml/xmlstring.h>

#include <algorithm>

#include <rtl/uuid.h>
#include <rtl/instance.hxx>
#include <osl/mutex.hxx>
#include <osl/diagnose.h>
#include <sal/log.hxx>

#include <com/sun/star/xml/dom/DOMException.hpp>
#include <com/sun/star/xml/dom/events/XMutationEvent.hpp>
#include <com/sun/star/xml/sax/FastToken.hpp>

#include <comphelper/servicehelper.hxx>
@@ -41,7 +41,6 @@
#include "childlist.hxx"

#include <eventdispatcher.hxx>
#include <mutationevent.hxx>

using namespace css;
using namespace css::uno;
diff --git a/unoxml/source/dom/notationsmap.cxx b/unoxml/source/dom/notationsmap.cxx
index 770923c..07cb851 100644
--- a/unoxml/source/dom/notationsmap.cxx
+++ b/unoxml/source/dom/notationsmap.cxx
@@ -21,8 +21,6 @@

#include <osl/diagnose.h>

#include "documenttype.hxx"

using namespace css::uno;
using namespace css::xml::dom;

diff --git a/unoxml/source/dom/notationsmap.hxx b/unoxml/source/dom/notationsmap.hxx
index daabc9f..d56f164 100644
--- a/unoxml/source/dom/notationsmap.hxx
+++ b/unoxml/source/dom/notationsmap.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_UNOXML_SOURCE_DOM_NOTATIONSMAP_HXX

#include <sal/types.h>
#include <rtl/ref.hxx>

#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/xml/dom/XNode.hpp>
diff --git a/unoxml/source/dom/saxbuilder.hxx b/unoxml/source/dom/saxbuilder.hxx
index e20b5cc..c8ea4d9 100644
--- a/unoxml/source/dom/saxbuilder.hxx
+++ b/unoxml/source/dom/saxbuilder.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_UNOXML_SOURCE_DOM_SAXBUILDER_HXX

#include <stack>
#include <map>

#include <sal/types.h>
#include <osl/mutex.hxx>
@@ -30,15 +29,12 @@
#include <com/sun/star/uno/Sequence.h>

#include <com/sun/star/uno/XInterface.hpp>
#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/xml/dom/XSAXDocumentBuilder2.hpp>
#include <com/sun/star/xml/dom/SAXDocumentBuilderState.hpp>
#include <com/sun/star/xml/dom/XDocument.hpp>
#include <com/sun/star/xml/dom/XDocumentFragment.hpp>
#include <com/sun/star/xml/sax/XLocator.hpp>
#include <com/sun/star/xml/sax/XAttributeList.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>

namespace DOM
diff --git a/unoxml/source/rdf/CLiteral.cxx b/unoxml/source/rdf/CLiteral.cxx
index f7f8c72..3c8672a 100644
--- a/unoxml/source/rdf/CLiteral.cxx
+++ b/unoxml/source/rdf/CLiteral.cxx
@@ -27,8 +27,6 @@

#include <com/sun/star/lang/IllegalArgumentException.hpp>

#include <rtl/ustrbuf.hxx>


/// anonymous implementation namespace
namespace {
diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx
index b069014..2eb278b 100644
--- a/unoxml/source/rdf/librdf_repository.cxx
+++ b/unoxml/source/rdf/librdf_repository.cxx
@@ -40,7 +40,7 @@
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/io/XSeekableInputStream.hpp>
#include <com/sun/star/io/XSeekable.hpp>
#include <com/sun/star/text/XTextRange.hpp>
#include <com/sun/star/rdf/ParseException.hpp>
#include <com/sun/star/rdf/QueryException.hpp>
@@ -48,7 +48,6 @@
#include <com/sun/star/rdf/XDocumentRepository.hpp>
#include <com/sun/star/rdf/XLiteral.hpp>
#include <com/sun/star/rdf/FileFormat.hpp>
#include <com/sun/star/rdf/URIs.hpp>
#include <com/sun/star/rdf/BlankNode.hpp>
#include <com/sun/star/rdf/URI.hpp>
#include <com/sun/star/rdf/Literal.hpp>
@@ -60,7 +59,6 @@
#include <osl/diagnose.h>
#include <cppuhelper/exc_hlp.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/weakref.hxx>

diff --git a/unoxml/source/service/services.cxx b/unoxml/source/service/services.cxx
index 55e58b76..8863b63 100644
--- a/unoxml/source/service/services.cxx
+++ b/unoxml/source/service/services.cxx
@@ -20,13 +20,8 @@
#include <rtl/ustring.hxx>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/uno/Reference.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <cppuhelper/factory.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>

#include "../dom/documentbuilder.hxx"
#include "../dom/saxbuilder.hxx"
diff --git a/unoxml/source/xpath/nodelist.hxx b/unoxml/source/xpath/nodelist.hxx
index c119eaa..e1be786 100644
--- a/unoxml/source/xpath/nodelist.hxx
+++ b/unoxml/source/xpath/nodelist.hxx
@@ -28,11 +28,11 @@
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/xml/dom/XNode.hpp>
#include <com/sun/star/xml/dom/XNodeList.hpp>
#include <com/sun/star/xml/xpath/XXPathObject.hpp>

#include <libxml/tree.h>
#include <libxml/xpath.h>

#include "../dom/document.hxx"

#include <memory>

namespace DOM {
diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx
index 5d3e6d8..d36aa11 100644
--- a/unoxml/source/xpath/xpathapi.cxx
+++ b/unoxml/source/xpath/xpathapi.cxx
@@ -27,10 +27,11 @@
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>

#include <com/sun/star/xml/xpath/XPathException.hpp>

#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>

#include "nodelist.hxx"
#include "xpathobject.hxx"

#include <node.hxx>
diff --git a/unoxml/source/xpath/xpathapi.hxx b/unoxml/source/xpath/xpathapi.hxx
index 1bc99b5..77cf0db 100644
--- a/unoxml/source/xpath/xpathapi.hxx
+++ b/unoxml/source/xpath/xpathapi.hxx
@@ -31,16 +31,12 @@
#include <com/sun/star/uno/Sequence.h>

#include <com/sun/star/uno/XInterface.hpp>
#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/xml/xpath/XXPathAPI.hpp>
#include <com/sun/star/xml/dom/XNode.hpp>
#include <com/sun/star/xml/dom/XNodeList.hpp>
#include <com/sun/star/xml/xpath/XXPathObject.hpp>
#include <com/sun/star/xml/xpath/XXPathExtension.hpp>
#include <com/sun/star/xml/xpath/Libxml2ExtensionHandle.hpp>
#include <com/sun/star/xml/xpath/XPathException.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>

namespace XPath
diff --git a/unoxml/source/xpath/xpathobject.hxx b/unoxml/source/xpath/xpathobject.hxx
index 41787c3..8e20bbc 100644
--- a/unoxml/source/xpath/xpathobject.hxx
+++ b/unoxml/source/xpath/xpathobject.hxx
@@ -22,7 +22,6 @@

#include <memory>

#include <libxml/tree.h>
#include <libxml/xpath.h>

#include <sal/types.h>
@@ -34,6 +33,8 @@
#include <com/sun/star/xml/dom/XNodeList.hpp>
#include <com/sun/star/xml/xpath/XXPathObject.hpp>

#include "../dom/document.hxx"

namespace DOM {
    class CDocument;
}