tdf#42949 Fix IWYU warnings in tools/

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

Change-Id: I47974f5c24819eb60e6724f42d51bb206dc26d21
Reviewed-on: https://gerrit.libreoffice.org/71557
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
This commit is contained in:
Gabor Kelemen
2019-04-30 15:02:42 +02:00
committed by Miklos Vajna
parent a1a16b2262
commit 83abdf803a
31 changed files with 37 additions and 89 deletions
+34
View File
@@ -0,0 +1,34 @@
---
assumeFilename: tools/source/generic/gen.cxx
blacklist:
tools/qa/cppunit/test_pathutils.cxx:
# Needed for WIN32 specific unit test
- cppunit/TestAssert.h
- cppunit/plugin/TestPlugIn.h
- tools/pathutils.hxx
- cwchar
tools/source/debug/debug.cxx:
# Needed for linker visibility
- tools/diagnose_ex.h
tools/source/generic/poly.cxx:
# OSL_BIGENDIAN is being checked
- osl/endian.h
tools/source/misc/extendapplicationenvironment.cxx:
# Needed on MACOSX
- config_folders.h
# Needed for linker visibility
- tools/extendapplicationenvironment.hxx
tools/source/ref/ref.cxx:
# Don't replace with impl. detail
- tools/weakbase.hxx
tools/source/stream/strmwnt.cxx:
# WIN32-specific file
- string.h
- osl/thread.h
- o3tl/char16_t2wchar_t.hxx
tools/source/stream/strmunx.cxx:
# Needed for OSL_DEBUG_LEVEL > 1
- osl/thread.h
tools/source/string/tenccvt.cxx:
# Needed for linker visibility
- tools/tenccvt.hxx
-6
View File
@@ -22,8 +22,6 @@
#include <sal/types.h>
#include <tools/poly.hxx>
class Point;
class SAL_WARN_UNUSED ImplPolygon
{
public:
@@ -55,10 +53,6 @@ public:
#define MAX_POLYGONS SAL_MAX_UINT16
namespace tools {
class Polygon;
}
struct ImplPolyPolygon
{
std::vector<tools::Polygon> mvPolyAry;
-4
View File
@@ -18,16 +18,12 @@
*/
#include <sal/types.h>
#include <sal/log.hxx>
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/plugin/TestPlugIn.h>
#include <tools/helpers.hxx>
#include <cassert>
namespace tools
{
class cm2TwipsTest : public CppUnit::TestFixture
-3
View File
@@ -17,12 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <limits>
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <rtl/math.hxx>
#include <tools/bigint.hxx>
namespace tools
-2
View File
@@ -11,9 +11,7 @@
#include <cppunit/TestAssert.h>
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/plugin/TestPlugIn.h>
#include <tools/color.hxx>
#include <tools/stream.hxx>
namespace
{
-1
View File
@@ -20,7 +20,6 @@
#include <sal/types.h>
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/plugin/TestPlugIn.h>
#include <rtl/math.hxx>
#include <tools/fract.hxx>
-1
View File
@@ -20,7 +20,6 @@
#include <sal/types.h>
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/plugin/TestPlugIn.h>
#include <tools/helpers.hxx>
-2
View File
@@ -17,12 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <sal/types.h>
#include <rtl/ustring.hxx>
#include <cppunit/TestAssert.h>
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/plugin/TestPlugIn.h>
#include <tools/inetmime.hxx>
-1
View File
@@ -20,7 +20,6 @@
#include <sal/types.h>
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/plugin/TestPlugIn.h>
#include <tools/helpers.hxx>
-2
View File
@@ -19,11 +19,9 @@
#include <cwchar>
#include <sal/types.h>
#include <cppunit/TestAssert.h>
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/plugin/TestPlugIn.h>
#include <tools/pathutils.hxx>
namespace {
-2
View File
@@ -7,11 +7,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <sal/types.h>
#include <cppunit/TestAssert.h>
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/plugin/TestPlugIn.h>
#include <tools/gen.hxx>
namespace
-1
View File
@@ -11,7 +11,6 @@
#include <cppunit/TestAssert.h>
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/plugin/TestPlugIn.h>
#include <tools/stream.hxx>
#include <sstream>
-5
View File
@@ -7,11 +7,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <memory>
#include <string>
#include <sal/types.h>
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <test/bootstrapfixture.hxx>
#include <rtl/ustring.hxx>
-2
View File
@@ -22,7 +22,6 @@
#endif
#include <windows.h>
#elif defined UNX
#include <unistd.h>
#include <sys/time.h>
#endif
@@ -33,7 +32,6 @@
#include <mach/mach_time.h>
#endif
#include <rtl/math.hxx>
#include <osl/diagnose.h>
#include <systemdatetime.hxx>
-4
View File
@@ -28,8 +28,6 @@
#include <windows.h>
#include <mmsystem.h>
#elif defined UNX
#include <unistd.h>
#include <math.h>
#include <sys/time.h>
#endif
@@ -40,10 +38,8 @@
#include <mach/mach_time.h>
#endif
#include <sal/log.hxx>
#include <rtl/math.hxx>
#include <tools/time.hxx>
#include <osl/diagnose.h>
#include <com/sun/star/util/DateTime.hpp>
#include <systemdatetime.hxx>
+1 -14
View File
@@ -17,17 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#if defined (UNX) || defined (__GNUC__)
#include <unistd.h>
#endif
#include <errno.h>
#include <time.h>
#include <cstdarg>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <com/sun/star/configuration/CorruptedConfigurationException.hpp>
#include <com/sun/star/configuration/backend/BackendSetupException.hpp>
#include <com/sun/star/configuration/backend/MalformedDataException.hpp>
@@ -37,6 +26,7 @@
#include <com/sun/star/deployment/DeploymentException.hpp>
#include <com/sun/star/document/CorruptedFilterConfigurationException.hpp>
#include <com/sun/star/document/UndoFailedException.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/lang/WrappedTargetException.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/ldap/LdapGenericException.hpp>
@@ -57,13 +47,10 @@
#include <com/sun/star/xml/sax/SAXParseException.hpp>
#include <comphelper/anytostring.hxx>
#include <tools/debug.hxx>
#include <rtl/string.h>
#include <sal/log.hxx>
#include <sal/macros.h>
#include <osl/thread.h>
#include <typeinfo>
#include <vector>
#include <tools/diagnose_ex.h>
+1 -1
View File
@@ -8,8 +8,8 @@
*/
#include <tools/fileutil.hxx>
#include <tools/urlobj.hxx>
#if defined _WIN32
#include <tools/urlobj.hxx>
#include <osl/file.hxx>
#include <string.h>
#include <o3tl/char16_t2wchar_t.hxx>
-2
View File
@@ -43,8 +43,6 @@
#include <string.h>
#include <com/sun/star/uno/Sequence.hxx>
#include <sax/tools/converter.hxx>
#include <rtl/uri.hxx>
#include <comphelper/base64.hxx>
using namespace css;
-2
View File
@@ -17,10 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <limits>
#include <math.h>
#include <rtl/ustrbuf.hxx>
#include <osl/diagnose.h>
#include <tools/bigint.hxx>
-5
View File
@@ -19,8 +19,6 @@
#include <cstddef>
#include <cstdlib>
#include <limits>
#include <new>
#include <string.h>
#ifdef _WIN32
@@ -28,10 +26,7 @@
#endif
#include <osl/file.hxx>
#include <tools/stream.hxx>
#include <tools/config.hxx>
#include <osl/security.h>
#include <rtl/strbuf.hxx>
#include <sal/log.hxx>
struct ImplKeyData
-3
View File
@@ -19,14 +19,11 @@
#include <tools/fract.hxx>
#include <tools/debug.hxx>
#include <tools/lineend.hxx>
#include <tools/stream.hxx>
#include <o3tl/safeint.hxx>
#include <rtl/ustring.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
#include <limits.h>
#include <algorithm>
#include <cmath>
+1 -3
View File
@@ -17,12 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <tools/link.hxx>
#include <tools/line.hxx>
#include <tools/helpers.hxx>
#include <cstdlib>
#include <math.h>
#include <cmath>
namespace tools
{
-2
View File
@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <numeric>
#include <tools/gen.hxx>
#include <basegfx/numeric/ftools.hxx>
-2
View File
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <rtl/math.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
#include <poly.h>
@@ -27,7 +26,6 @@
#include <tools/vcompat.hxx>
#include <tools/gen.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolypolygoncutter.hxx>
namespace tools {
-2
View File
@@ -18,12 +18,10 @@
*/
#include <algorithm>
#include <cstddef>
#include <limits>
#include <forward_list>
#include <memory>
#include <osl/diagnose.h>
#include <sal/log.hxx>
#include <rtl/ustring.hxx>
#include <rtl/strbuf.hxx>
-2
View File
@@ -20,8 +20,6 @@
#include <sal/types.h>
#include <tools/datetime.hxx>
#include <tools/inetmsg.hxx>
#include <tools/contnr.hxx>
#include <rtl/instance.hxx>
#include <comphelper/string.hxx>
#include <rtl/character.hxx>
-1
View File
@@ -21,7 +21,6 @@
#include <cassert>
#include <sal/log.hxx>
#include <sal/types.h>
#include <rtl/strbuf.hxx>
#include <tools/inetmsg.hxx>
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <config_features.h>
#include <config_folders.h>
#include <sal/config.h>
@@ -26,17 +25,11 @@
#if defined UNX
#include <sys/resource.h>
#include <sys/time.h>
#include <sys/types.h>
#endif
#include <osl/process.h>
#include <osl/thread.h>
#include <rtl/bootstrap.hxx>
#include <rtl/string.hxx>
#include <rtl/textcvt.h>
#include <rtl/ustrbuf.hxx>
#include <rtl/ustring.h>
#include <rtl/ustring.hxx>
#include <sal/types.h>
#include <tools/extendapplicationenvironment.hxx>
-1
View File
@@ -24,7 +24,6 @@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <osl/endian.h>
#include <osl/diagnose.h>
-5
View File
@@ -19,12 +19,8 @@
#include <algorithm>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <limits.h>
#include <tools/stream.hxx>
#include <vector>
@@ -37,7 +33,6 @@
#include <osl/file.hxx>
#include <osl/detail/file.h>
#include <rtl/instance.hxx>
#include <rtl/strbuf.hxx>
using namespace osl;
-1
View File
@@ -27,7 +27,6 @@
#include <tools/zcodec.hxx>
#include <rtl/crc.h>
#include <osl/endian.h>
#define PZSTREAM static_cast<z_stream*>(mpsC_Stream)