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@collabora.co.uk>
This commit is contained in:
Gabor Kelemen 2018-10-13 16:52:36 +02:00 committed by Miklos Vajna
parent 3ff158c41d
commit e9e347e9d7

View file

@ -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