tdf#42949 Fix IWYU warnings in registry/

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

Change-Id: I819bb44e36bdb6ec671cf11bd779085767d82fd0
Reviewed-on: https://gerrit.libreoffice.org/67697
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
diff --git a/registry/IwyuFilter_registry.yaml b/registry/IwyuFilter_registry.yaml
new file mode 100644
index 0000000..d7d93bd
--- /dev/null
+++ b/registry/IwyuFilter_registry.yaml
@@ -0,0 +1,16 @@
---
assumeFilename: registry/source/registry.cxx
blacklist:
    registry/source/regimpl.hxx:
    # Needed for correct linker visibility
    - regapi.hxx
    registry/source/reflwrit.cxx:
    # OSL_BIGENDIAN is being checked
    - osl/endian.h
    # Needed for correct linker visibility
    - registry/writer.h
    registry/source/reflread.cxx:
    # OSL_BIGENDIAN is being checked
    - osl/endian.h
    # Needed for correct linker visibility
    - registry/typereg_reader.hxx
diff --git a/registry/inc/regapi.hxx b/registry/inc/regapi.hxx
index 35c4ddd..ae5b7e1 100644
--- a/registry/inc/regapi.hxx
+++ b/registry/inc/regapi.hxx
@@ -20,7 +20,6 @@
#ifndef INCLUDED_REGISTRY_INC_REGAPI_HXX
#define INCLUDED_REGISTRY_INC_REGAPI_HXX

#include <stddef.h>
#include <rtl/ustring.h>
#include <registry/regtype.h>
#include <registry/regdllapi.h>
diff --git a/registry/source/keyimpl.hxx b/registry/source/keyimpl.hxx
index d5c6ada..a964866 100644
--- a/registry/source/keyimpl.hxx
+++ b/registry/source/keyimpl.hxx
@@ -20,7 +20,6 @@
#ifndef INCLUDED_REGISTRY_SOURCE_KEYIMPL_HXX
#define INCLUDED_REGISTRY_SOURCE_KEYIMPL_HXX

#include <regapi.hxx>
#include "regimpl.hxx"
#include <rtl/ustring.hxx>

diff --git a/registry/source/reflcnst.hxx b/registry/source/reflcnst.hxx
index a0ee421..2fff0ca 100644
--- a/registry/source/reflcnst.hxx
+++ b/registry/source/reflcnst.hxx
@@ -20,8 +20,7 @@
#ifndef INCLUDED_REGISTRY_SOURCE_REFLCNST_HXX
#define INCLUDED_REGISTRY_SOURCE_REFLCNST_HXX

#include <registry/refltype.hxx>
#include <sal/macros.h>
#include <registry/types.hxx>

#include <string.h>

diff --git a/registry/source/reflread.cxx b/registry/source/reflread.cxx
index f090383..b799e8b 100644
--- a/registry/source/reflread.cxx
+++ b/registry/source/reflread.cxx
@@ -24,7 +24,6 @@
#include <new>
#include <vector>

#include <string.h>
#include <sal/types.h>
#include <osl/endian.h>
#include <osl/diagnose.h>
diff --git a/registry/source/reflread.hxx b/registry/source/reflread.hxx
index 880b6bc..e35e3e0 100644
--- a/registry/source/reflread.hxx
+++ b/registry/source/reflread.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_REGISTRY_SOURCE_REFLREAD_HXX

#include <registry/refltype.hxx>
#include <registry/regtype.h>
#include <rtl/ustring.hxx>

/// Implememetation handle
diff --git a/registry/source/reflwrit.cxx b/registry/source/reflwrit.cxx
index 9c753cf..e06f575 100644
--- a/registry/source/reflwrit.cxx
+++ b/registry/source/reflwrit.cxx
@@ -22,13 +22,12 @@
#include <memory>
#include <algorithm>
#include <sal/types.h>
#include <sal/macros.h>
#include <osl/endian.h>
#include <rtl/alloc.h>
#include <rtl/string.hxx>
#include <rtl/ustring.hxx>

#include "reflwrit.hxx"
#include <registry/refltype.hxx>
#include <registry/version.h>
#include <registry/writer.h>

diff --git a/registry/source/reflwrit.hxx b/registry/source/reflwrit.hxx
index 39a7032..6ea4d0e 100644
--- a/registry/source/reflwrit.hxx
+++ b/registry/source/reflwrit.hxx
@@ -20,10 +20,11 @@
#ifndef INCLUDED_REGISTRY_SOURCE_REFLWRIT_HXX
#define INCLUDED_REGISTRY_SOURCE_REFLWRIT_HXX

#include <registry/refltype.hxx>
#include <registry/regtype.h>
#include <registry/types.hxx>
#include <rtl/ustring.hxx>

class RTConstValue;

/// Implememetation handle
typedef void* TypeWriterImpl;

diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx
index 9f01788..ea07473 100644
--- a/registry/source/regimpl.cxx
+++ b/registry/source/regimpl.cxx
@@ -21,6 +21,7 @@
#include "regimpl.hxx"

#include <memory>
#include <set>
#include <vector>
#include <string.h>
#include <stdio.h>
@@ -36,13 +37,11 @@
#include <registry/reader.hxx>
#include <registry/refltype.hxx>
#include <registry/types.hxx>
#include <registry/version.h>

#include "reflcnst.hxx"
#include "keyimpl.hxx"

#include <osl/thread.h>
#include <rtl/alloc.h>
#include <rtl/ustring.hxx>
#include <rtl/ustrbuf.hxx>
#include <osl/file.hxx>
diff --git a/registry/source/regimpl.hxx b/registry/source/regimpl.hxx
index 928807b..d8a7739 100644
--- a/registry/source/regimpl.hxx
+++ b/registry/source/regimpl.hxx
@@ -20,10 +20,10 @@
#ifndef INCLUDED_REGISTRY_SOURCE_REGIMPL_HXX
#define INCLUDED_REGISTRY_SOURCE_REGIMPL_HXX

#include <set>
#include <unordered_map>

#include <regapi.hxx>
#include <registry/regtype.h>
#include <rtl/ustring.hxx>
#include <osl/mutex.hxx>
#include <store/store.hxx>
diff --git a/registry/source/registry.cxx b/registry/source/registry.cxx
index b183f634..166354a 100644
--- a/registry/source/registry.cxx
+++ b/registry/source/registry.cxx
@@ -18,11 +18,8 @@
 */


#include <regapi.hxx>
#include <registry/registry.hxx>

#include <osl/process.h>

#include "keyimpl.hxx"
#include "regimpl.hxx"
#include "regkey.hxx"
@@ -31,12 +28,6 @@
#include <io.h>
#endif

#include <string.h>
#if defined(UNX)
#include <stdlib.h>
#include <unistd.h>
#endif

extern "C" {


diff --git a/registry/source/regkey.cxx b/registry/source/regkey.cxx
index 52bb910..b63bb5c 100644
--- a/registry/source/regkey.cxx
+++ b/registry/source/regkey.cxx
@@ -20,8 +20,6 @@

#include "regkey.hxx"

#include <registry/registry.hxx>
#include <rtl/alloc.h>
#include <osl/diagnose.h>
#include "regimpl.hxx"
#include "keyimpl.hxx"
diff --git a/registry/tools/fileurl.cxx b/registry/tools/fileurl.cxx
index cabfb16..8495b1f 100644
--- a/registry/tools/fileurl.cxx
+++ b/registry/tools/fileurl.cxx
@@ -20,7 +20,6 @@
#include "fileurl.hxx"

#include <rtl/ustring.hxx>
#include <osl/diagnose.h>
#include <osl/file.hxx>
#include <osl/process.h>
#include <osl/thread.h>
diff --git a/registry/tools/options.cxx b/registry/tools/options.cxx
index 0f929b4..e9b9c23 100644
--- a/registry/tools/options.cxx
+++ b/registry/tools/options.cxx
@@ -22,7 +22,6 @@
#include <osl/diagnose.h>

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

namespace registry
{
diff --git a/registry/tools/options.hxx b/registry/tools/options.hxx
index 6b62644..236ad37 100644
--- a/registry/tools/options.hxx
+++ b/registry/tools/options.hxx
@@ -23,8 +23,6 @@
#include <string>
#include <vector>

#include <sal/types.h>

namespace registry
{
namespace tools