[Libreoffice-commits] core.git: bin/find-unneeded-includes

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Oct 13 16:41:22 UTC 2018


 bin/find-unneeded-includes |   11 +++++++++++
 1 file changed, 11 insertions(+)

New commits:
commit e9e347e9d7b36a32d44b5f0b53d8f9fe47567c16
Author:     Gabor Kelemen <kelemeng at ubuntu.com>
AuthorDate: Sat Oct 13 16:52:36 2018 +0200
Commit:     Miklos Vajna <vmiklos at collabora.co.uk>
CommitDate: Sat Oct 13 18:41:02 2018 +0200

    find-unneeded-includes: do not propose css/uno .hxx to .h replacements
    
    Better to not replace stable API headers with implementation details
    
    Change-Id: I66c7a237b1df13b7aa2523eba87d45d123621a95
    Reviewed-on: https://gerrit.libreoffice.org/61742
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/bin/find-unneeded-includes b/bin/find-unneeded-includes
index 7f221e646e14..5d043f0da1a9 100755
--- a/bin/find-unneeded-includes
+++ b/bin/find-unneeded-includes
@@ -69,6 +69,17 @@ def ignoreRemoval(include, toAdd, absFileName, moduleRules):
     if include == "boost/intrusive_ptr.hpp" and "boost/smart_ptr/intrusive_ptr.hpp" in toAdd:
         return True
 
+    # Avoid .hxx to .h proposals in basic css/uno/* API
+    unoapi = {
+        "com/sun/star/uno/Any.hxx": "com/sun/star/uno/Any.h",
+        "com/sun/star/uno/Reference.hxx": "com/sun/star/uno/Reference.h",
+        "com/sun/star/uno/Sequence.hxx": "com/sun/star/uno/Sequence.h",
+        "com/sun/star/uno/Type.hxx": "com/sun/star/uno/Type.h"
+    }
+    for k, v in unoapi.items():
+        if include == k and v in toAdd:
+            return True
+
     # 3rd-party, non-self-contained headers.
     if include == "libepubgen/libepubgen.h" and "libepubgen/libepubgen-decls.h" in toAdd:
         return True


More information about the Libreoffice-commits mailing list