From 6a4a15c87c03feffb90cc416ce22d2819e41442d Mon Sep 17 00:00:00 2001 From: Jorenz Paragas Date: Mon, 25 Apr 2016 23:41:12 -0700 Subject: [PATCH] tdf#42949: clean up includes in include/oox/crypto with iwyu The includes in CryptTools.hxx that are within #if/#endif directives are not altered. iwyu suggested replacing the includes for nss.h, pk11pub.h, and sechash.h with hasht.h, pkcs11t.h, seccomon.h, and secmodt.h. I decided not to because it might make CryptTools.hxx harder to refactor in exchange for little gain. Before creating this commit, I ran 'make check' after passing --with-tls=openssl to ./autogen.sh to ensure that building with either OpenSSL or NSS (the default except on iOS and Android) works. Change-Id: I20260d18f073ffd8077bbcc597e7a8e4954e2ec5 Reviewed-on: https://gerrit.libreoffice.org/24386 Tested-by: Jenkins Reviewed-by: Michael Stahl --- include/oox/crypto/AgileEngine.hxx | 9 ++++++++ include/oox/crypto/CryptTools.hxx | 5 ++-- include/oox/crypto/CryptoEngine.hxx | 9 ++++++-- include/oox/crypto/DocumentDecryption.hxx | 28 ++++++++++++----------- include/oox/crypto/DocumentEncryption.hxx | 13 +++++------ include/oox/crypto/Standard2007Engine.hxx | 8 ++++++- oox/source/core/xmlfilterbase.cxx | 1 + oox/source/crypto/AgileEngine.cxx | 3 +++ oox/source/crypto/DocumentDecryption.cxx | 6 +++++ oox/source/crypto/DocumentEncryption.cxx | 9 +++++--- oox/source/crypto/Standard2007Engine.cxx | 4 ++++ 11 files changed, 66 insertions(+), 29 deletions(-) diff --git a/include/oox/crypto/AgileEngine.hxx b/include/oox/crypto/AgileEngine.hxx index cf47947f1e97..2bb73305d441 100644 --- a/include/oox/crypto/AgileEngine.hxx +++ b/include/oox/crypto/AgileEngine.hxx @@ -11,8 +11,17 @@ #ifndef INCLUDED_OOX_CRYPTO_AGILEENGINE_HXX #define INCLUDED_OOX_CRYPTO_AGILEENGINE_HXX +#include + #include #include +#include +#include + +namespace oox { + class BinaryXInputStream; + class BinaryXOutputStream; +} namespace oox { namespace core { diff --git a/include/oox/crypto/CryptTools.hxx b/include/oox/crypto/CryptTools.hxx index d93fef62e336..23e48c29d86b 100644 --- a/include/oox/crypto/CryptTools.hxx +++ b/include/oox/crypto/CryptTools.hxx @@ -22,8 +22,6 @@ #include -#include - #if USE_TLS_OPENSSL #include #include @@ -35,9 +33,10 @@ #include #endif // USE_TLS_NSS -#include #include +#include + namespace oox { namespace core { diff --git a/include/oox/crypto/CryptoEngine.hxx b/include/oox/crypto/CryptoEngine.hxx index a6ad858fb5db..9b988c0b2f25 100644 --- a/include/oox/crypto/CryptoEngine.hxx +++ b/include/oox/crypto/CryptoEngine.hxx @@ -13,8 +13,13 @@ #include -#include -#include +#include +#include + +namespace oox { + class BinaryXInputStream; + class BinaryXOutputStream; +} namespace oox { namespace core { diff --git a/include/oox/crypto/DocumentDecryption.hxx b/include/oox/crypto/DocumentDecryption.hxx index d6b867b47b29..16029ad6998b 100644 --- a/include/oox/crypto/DocumentDecryption.hxx +++ b/include/oox/crypto/DocumentDecryption.hxx @@ -13,20 +13,22 @@ #include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - #include -#include + +#include +#include +#include +#include + +namespace com { namespace sun { namespace star { + namespace beans { struct NamedValue; } + namespace io { class XInputStream; } + namespace io { class XStream; } + namespace uno { class XComponentContext; } +} } } + +namespace oox { class BinaryInputStream; } +namespace oox { namespace ole { class OleStorage; } } namespace oox { namespace core { diff --git a/include/oox/crypto/DocumentEncryption.hxx b/include/oox/crypto/DocumentEncryption.hxx index 720cb38b9e14..42646f367d1a 100644 --- a/include/oox/crypto/DocumentEncryption.hxx +++ b/include/oox/crypto/DocumentEncryption.hxx @@ -13,16 +13,15 @@ #include -#include - -#include -#include - -#include +#include #include +#include -#include +namespace com { namespace sun { namespace star { + namespace io { class XStream; } +} } } +namespace oox { namespace ole { class OleStorage; } } namespace oox { namespace core { diff --git a/include/oox/crypto/Standard2007Engine.hxx b/include/oox/crypto/Standard2007Engine.hxx index a4d13fb0f2cb..05bdc995e1a8 100644 --- a/include/oox/crypto/Standard2007Engine.hxx +++ b/include/oox/crypto/Standard2007Engine.hxx @@ -11,8 +11,14 @@ #ifndef INCLUDED_OOX_CRYPTO_STANDARD2007ENGINE_HXX #define INCLUDED_OOX_CRYPTO_STANDARD2007ENGINE_HXX -#include #include +#include +#include + +namespace oox { + class BinaryXInputStream; + class BinaryXOutputStream; +} namespace oox { namespace core { diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index a3cd57606e8e..066a3d6432c6 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -44,6 +44,7 @@ #include "oox/helper/containerhelper.hxx" #include "oox/helper/propertyset.hxx" #include "oox/helper/zipstorage.hxx" +#include #include #include "oox/token/properties.hxx" #include diff --git a/oox/source/crypto/AgileEngine.cxx b/oox/source/crypto/AgileEngine.cxx index 13780868cd55..3897b877b294 100644 --- a/oox/source/crypto/AgileEngine.cxx +++ b/oox/source/crypto/AgileEngine.cxx @@ -10,6 +10,9 @@ #include "oox/crypto/AgileEngine.hxx" +#include +#include + namespace oox { namespace core { diff --git a/oox/source/crypto/DocumentDecryption.cxx b/oox/source/crypto/DocumentDecryption.cxx index a57b5671063d..eea0c629d641 100644 --- a/oox/source/crypto/DocumentDecryption.cxx +++ b/oox/source/crypto/DocumentDecryption.cxx @@ -15,11 +15,17 @@ #include #include +#include #include #include #include #include #include +#include +#include +#include +#include +#include namespace oox { namespace core { diff --git a/oox/source/crypto/DocumentEncryption.cxx b/oox/source/crypto/DocumentEncryption.cxx index cd6527aa95a2..1c328fccd775 100644 --- a/oox/source/crypto/DocumentEncryption.cxx +++ b/oox/source/crypto/DocumentEncryption.cxx @@ -10,15 +10,18 @@ #include "oox/crypto/DocumentEncryption.hxx" +#include +#include +#include #include -#include "oox/helper/binaryinputstream.hxx" -#include "oox/helper/binaryoutputstream.hxx" +#include +#include +#include namespace oox { namespace core { -using namespace css::beans; using namespace css::io; using namespace css::lang; using namespace css::uno; diff --git a/oox/source/crypto/Standard2007Engine.cxx b/oox/source/crypto/Standard2007Engine.cxx index 0280a174b1a1..34fa2265a719 100644 --- a/oox/source/crypto/Standard2007Engine.cxx +++ b/oox/source/crypto/Standard2007Engine.cxx @@ -10,7 +10,11 @@ #include "oox/crypto/Standard2007Engine.hxx" +#include +#include +#include #include +#include #include namespace oox {