summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorGabor Kelemen <gabor.kelemen.extern@allotropia.de>2023-09-12 15:32:43 +0200
committerMiklos Vajna <vmiklos@collabora.com>2023-09-19 08:35:12 +0200
commit2e71c439057c8d31b6af191ef38607600cb996f0 (patch)
treedc7afd8083a29c2b42cdf1d3a305340aa3dfa3b4 /sal
parentf2f32aaa839b25a2413928b7b92fff3d71034508 (diff)
tdf#146619 Remove unused includes from sal/ [cpp files]
Change-Id: I11a54c1ddf73c16ce46a0d1c375bf43157870db7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155856 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/IwyuFilter_sal.yaml31
-rw-r--r--sal/cppunittester/cppunittester.cxx7
-rw-r--r--sal/osl/all/loadmodulerelative.cxx1
-rw-r--r--sal/rtl/alloc_arena.cxx1
-rw-r--r--sal/rtl/alloc_global.cxx8
-rw-r--r--sal/rtl/bootstrap.cxx5
-rw-r--r--sal/rtl/cipher.cxx4
-rw-r--r--sal/rtl/hash.cxx1
-rw-r--r--sal/rtl/locale.cxx3
-rw-r--r--sal/rtl/math.cxx3
-rw-r--r--sal/rtl/strbuf.cxx7
-rw-r--r--sal/rtl/string.cxx1
-rw-r--r--sal/rtl/ustrbuf.cxx5
-rw-r--r--sal/rtl/ustring.cxx5
-rw-r--r--sal/textenc/convertbig5hkscs.cxx1
-rw-r--r--sal/textenc/converteuctw.cxx2
-rw-r--r--sal/textenc/convertgb18030.cxx2
-rw-r--r--sal/textenc/convertisciidevangari.cxx1
-rw-r--r--sal/textenc/convertiso2022cn.cxx1
-rw-r--r--sal/textenc/convertiso2022jp.cxx1
-rw-r--r--sal/textenc/convertiso2022kr.cxx1
-rw-r--r--sal/textenc/convertsinglebytetobmpunicode.cxx1
-rw-r--r--sal/textenc/tcvtutf8.cxx2
-rw-r--r--sal/textenc/tencinfo.cxx1
-rw-r--r--sal/textenc/textenc.cxx5
25 files changed, 36 insertions, 64 deletions
diff --git a/sal/IwyuFilter_sal.yaml b/sal/IwyuFilter_sal.yaml
index 0871e1c82d46..b12f857e012a 100644
--- a/sal/IwyuFilter_sal.yaml
+++ b/sal/IwyuFilter_sal.yaml
@@ -18,6 +18,12 @@ excludelist:
sal/android/uthash.h:
# needed for defines to work / somehow on Linux there is a warning about android-related file
- string.h
+ sal/cppunittester/cppunittester.cxx:
+ # Actually used
+ - boost/algorithm/string.hpp
+ sal/emscripten/lo-bootstrap.c:
+ # Actually needed for lo_get_app_data_dir
+ - osl/detail/emscripten-bootstrap.h
sal/qa/osl/security/osl_Security.cxx:
# Needed on _WIN32
- o3tl/char16_t2wchar_t.hxx
@@ -66,3 +72,28 @@ excludelist:
sal/osl/unx/uunxapi.cxx:
# Needed for macxp_resolveAlias on MACOSX
- system.hxx
+ sal/rtl/bootstrap.cxx:
+ # Needed on MACOSX
+ - config_folders.h
+ sal/textenc/tables.cxx:
+ # Needed for the .tab files to work
+ - cstddef
+ - iterator
+ - rtl/tencinfo.h
+ # Needed for other .tab files to work
+ - tcvtjp1.tab
+ - tcvtjp2.tab
+ - tcvtjp3.tab
+ - tcvtjp4.tab
+ - tcvtjp5.tab
+ - tcvtkr1.tab
+ - tcvtkr2.tab
+ - tcvtkr4.tab
+ - tcvtkr5.tab
+ - tcvtscn1.tab
+ - tcvtscn2.tab
+ - tcvtscn3.tab
+ - tcvtscn4.tab
+ - tcvtscn5.tab
+ - tcvttcn1.tab
+ - tcvttcn2.tab
diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx
index 4a1d033e97ba..854c0999c911 100644
--- a/sal/cppunittester/cppunittester.cxx
+++ b/sal/cppunittester/cppunittester.cxx
@@ -30,11 +30,9 @@
#endif
#ifdef UNX
-#include <sys/time.h>
#include <sys/resource.h>
#endif
-#include <stdlib.h>
#include <cstdlib>
#include <iostream>
#include <string>
@@ -43,13 +41,11 @@
#include <cppunittester/protectorfactory.hxx>
#include <osl/module.h>
#include <osl/module.hxx>
+#include <osl/process.h>
#include <osl/thread.h>
#include <rtl/character.hxx>
-#include <rtl/process.h>
-#include <rtl/string.h>
#include <rtl/string.hxx>
#include <rtl/strbuf.hxx>
-#include <rtl/textcvt.h>
#include <rtl/ustring.hxx>
#include <sal/main.h>
@@ -64,7 +60,6 @@
#include <cppunit/plugin/DynamicLibraryManagerException.h>
#include <cppunit/portability/Stream.h>
-#include <memory>
#include <boost/algorithm/string.hpp>
#include <algorithm>
diff --git a/sal/osl/all/loadmodulerelative.cxx b/sal/osl/all/loadmodulerelative.cxx
index f7a6938ed130..d2af7d010057 100644
--- a/sal/osl/all/loadmodulerelative.cxx
+++ b/sal/osl/all/loadmodulerelative.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+
#include <sal/log.hxx>
#include <osl/module.h>
#include <osl/module.hxx>
diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx
index 47cb3eeab6cb..05e1b7ab212e 100644
--- a/sal/rtl/alloc_arena.cxx
+++ b/sal/rtl/alloc_arena.cxx
@@ -23,7 +23,6 @@
#include "alloc_impl.hxx"
#include <rtllifecycle.h>
-#include <sal/macros.h>
#include <cassert>
#include <string.h>
diff --git a/sal/rtl/alloc_global.cxx b/sal/rtl/alloc_global.cxx
index 4b7ec6037dc1..29eb0e8f2a84 100644
--- a/sal/rtl/alloc_global.cxx
+++ b/sal/rtl/alloc_global.cxx
@@ -17,17 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "alloc_impl.hxx"
#include <rtl/alloc.h>
#include <sal/log.hxx>
-#include <sal/macros.h>
-#include <algorithm>
-#include <cassert>
-#include <string.h>
-#include <stdio.h>
-
-#include <rtllifecycle.h>
#include <oslmemory.h>
void* SAL_CALL rtl_allocateMemory(sal_Size n) SAL_THROW_EXTERN_C()
diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx
index 04e0a4d0ed14..a3ada36a4439 100644
--- a/sal/rtl/bootstrap.cxx
+++ b/sal/rtl/bootstrap.cxx
@@ -16,25 +16,20 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <config_features.h>
#include <config_folders.h>
#include <rtl/bootstrap.h>
#include <rtl/bootstrap.hxx>
#include <osl/diagnose.h>
-#include <osl/module.h>
#include <osl/process.h>
#include <osl/file.hxx>
#include <osl/mutex.hxx>
#include <osl/profile.hxx>
#include <osl/security.hxx>
-#include <rtl/alloc.h>
#include <rtl/string.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/ustring.hxx>
#include <rtl/byteseq.hxx>
-#include <rtl/malformeduriexception.hxx>
-#include <rtl/uri.hxx>
#include <sal/log.hxx>
#include <o3tl/lru_map.hxx>
#include <o3tl/string_view.hxx>
diff --git a/sal/rtl/cipher.cxx b/sal/rtl/cipher.cxx
index bb0884b7a3d6..a58c6eef7adc 100644
--- a/sal/rtl/cipher.cxx
+++ b/sal/rtl/cipher.cxx
@@ -19,14 +19,10 @@
#include <string.h>
-#include <o3tl/safeint.hxx>
#include <sal/types.h>
#include <rtl/alloc.h>
#include <rtl/cipher.h>
#include <algorithm>
-#include <cassert>
-#include <cstring>
-#include <limits>
#if defined LIBO_CIPHER_OPENSSL_BACKEND
#include <openssl/evp.h>
diff --git a/sal/rtl/hash.cxx b/sal/rtl/hash.cxx
index 4fed60889f50..7cfc443cb972 100644
--- a/sal/rtl/hash.cxx
+++ b/sal/rtl/hash.cxx
@@ -24,7 +24,6 @@
#include "hash.hxx"
#include "strimp.hxx"
#include <osl/diagnose.h>
-#include <sal/macros.h>
namespace {
diff --git a/sal/rtl/locale.cxx b/sal/rtl/locale.cxx
index 742041ac1579..286155af77a2 100644
--- a/sal/rtl/locale.cxx
+++ b/sal/rtl/locale.cxx
@@ -17,11 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <stdlib.h>
#include <rtl/locale.h>
-#include <osl/diagnose.h>
-
#include <rtllifecycle.h>
#include <memory>
#include <unordered_map>
diff --git a/sal/rtl/math.cxx b/sal/rtl/math.cxx
index 9a8c2614060f..32507b619ff7 100644
--- a/sal/rtl/math.cxx
+++ b/sal/rtl/math.cxx
@@ -19,7 +19,6 @@
#include <rtl/math.h>
-#include <o3tl/safeint.hxx>
#include <osl/diagnose.h>
#include <rtl/character.hxx>
#include <rtl/math.hxx>
@@ -30,8 +29,6 @@
#include <cmath>
#include <float.h>
#include <limits>
-#include <limits.h>
-#include <math.h>
#include <memory>
#include <stdlib.h>
diff --git a/sal/rtl/strbuf.cxx b/sal/rtl/strbuf.cxx
index 7ba25ff4a31a..655e2af3cc6b 100644
--- a/sal/rtl/strbuf.cxx
+++ b/sal/rtl/strbuf.cxx
@@ -17,11 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <string.h>
-
-#include <osl/interlck.h>
-#include <rtl/strbuf.hxx>
-#include "strimp.hxx"
+#include <config_probes.h>
+#include <rtl/strbuf.h>
#if USE_SDT_PROBES
#define RTL_LOG_STRING_BITS 8
diff --git a/sal/rtl/string.cxx b/sal/rtl/string.cxx
index 06cde3c4faad..95f51ad288d0 100644
--- a/sal/rtl/string.cxx
+++ b/sal/rtl/string.cxx
@@ -22,7 +22,6 @@
#include <cassert>
#include <cstdlib>
-#include <osl/interlck.h>
#include <osl/diagnose.h>
#include <rtl/tencinfo.h>
diff --git a/sal/rtl/ustrbuf.cxx b/sal/rtl/ustrbuf.cxx
index c91834cfa783..6154814ebb9e 100644
--- a/sal/rtl/ustrbuf.cxx
+++ b/sal/rtl/ustrbuf.cxx
@@ -17,12 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <string.h>
-
#include <osl/interlck.h>
-#include <osl/diagnose.h>
#include <rtl/character.hxx>
-#include <rtl/ustrbuf.hxx>
+#include <rtl/ustrbuf.h>
#include "strimp.hxx"
#if USE_SDT_PROBES
diff --git a/sal/rtl/ustring.cxx b/sal/rtl/ustring.cxx
index 2a730f8cb5fa..ed039c4685da 100644
--- a/sal/rtl/ustring.cxx
+++ b/sal/rtl/ustring.cxx
@@ -22,20 +22,15 @@
#include <cassert>
#include <cstdlib>
#include <limits>
-#include <stdexcept>
-#include <string>
#include <config_options.h>
#include <o3tl/intcmp.hxx>
-#include <o3tl/safeint.hxx>
#include <o3tl/string_view.hxx>
#include <osl/diagnose.h>
#include <osl/interlck.h>
#include <osl/mutex.h>
#include <rtl/tencinfo.h>
-#include <string.h>
-#include <sal/alloca.h>
#include <sal/log.hxx>
#include "hash.hxx"
diff --git a/sal/textenc/convertbig5hkscs.cxx b/sal/textenc/convertbig5hkscs.cxx
index bf3a2e2cf59d..275e91d3d3b4 100644
--- a/sal/textenc/convertbig5hkscs.cxx
+++ b/sal/textenc/convertbig5hkscs.cxx
@@ -29,7 +29,6 @@
#include "convertbig5hkscs.hxx"
#include "converter.hxx"
#include "tenchelp.hxx"
-#include "unichars.hxx"
namespace {
diff --git a/sal/textenc/converteuctw.cxx b/sal/textenc/converteuctw.cxx
index 8684b643c66e..b1bfd8a67766 100644
--- a/sal/textenc/converteuctw.cxx
+++ b/sal/textenc/converteuctw.cxx
@@ -28,8 +28,6 @@
#include "context.hxx"
#include "converter.hxx"
#include "converteuctw.hxx"
-#include "tenchelp.hxx"
-#include "unichars.hxx"
namespace {
diff --git a/sal/textenc/convertgb18030.cxx b/sal/textenc/convertgb18030.cxx
index d7963762fa2b..b38cc231d653 100644
--- a/sal/textenc/convertgb18030.cxx
+++ b/sal/textenc/convertgb18030.cxx
@@ -28,8 +28,6 @@
#include "context.hxx"
#include "converter.hxx"
#include "convertgb18030.hxx"
-#include "tenchelp.hxx"
-#include "unichars.hxx"
namespace {
diff --git a/sal/textenc/convertisciidevangari.cxx b/sal/textenc/convertisciidevangari.cxx
index 75fcadcf7fe4..cf39721446eb 100644
--- a/sal/textenc/convertisciidevangari.cxx
+++ b/sal/textenc/convertisciidevangari.cxx
@@ -12,7 +12,6 @@
#include <cassert>
#include "converter.hxx"
-#include "unichars.hxx"
#include "convertisciidevangari.hxx"
#include "convertsinglebytetobmpunicode.hxx"
diff --git a/sal/textenc/convertiso2022cn.cxx b/sal/textenc/convertiso2022cn.cxx
index 60c2b57436ff..d4747913f162 100644
--- a/sal/textenc/convertiso2022cn.cxx
+++ b/sal/textenc/convertiso2022cn.cxx
@@ -28,7 +28,6 @@
#include "converter.hxx"
#include "convertiso2022cn.hxx"
#include "tenchelp.hxx"
-#include "unichars.hxx"
namespace {
diff --git a/sal/textenc/convertiso2022jp.cxx b/sal/textenc/convertiso2022jp.cxx
index 935bc8515d77..93470b852a70 100644
--- a/sal/textenc/convertiso2022jp.cxx
+++ b/sal/textenc/convertiso2022jp.cxx
@@ -28,7 +28,6 @@
#include "converter.hxx"
#include "convertiso2022jp.hxx"
#include "tenchelp.hxx"
-#include "unichars.hxx"
namespace {
diff --git a/sal/textenc/convertiso2022kr.cxx b/sal/textenc/convertiso2022kr.cxx
index 5aea5c66c877..a829bd0de202 100644
--- a/sal/textenc/convertiso2022kr.cxx
+++ b/sal/textenc/convertiso2022kr.cxx
@@ -28,7 +28,6 @@
#include "converter.hxx"
#include "convertiso2022kr.hxx"
#include "tenchelp.hxx"
-#include "unichars.hxx"
namespace {
diff --git a/sal/textenc/convertsinglebytetobmpunicode.cxx b/sal/textenc/convertsinglebytetobmpunicode.cxx
index 43c2b9cf39ce..1fa9be11dab5 100644
--- a/sal/textenc/convertsinglebytetobmpunicode.cxx
+++ b/sal/textenc/convertsinglebytetobmpunicode.cxx
@@ -29,7 +29,6 @@
#include "context.hxx"
#include "converter.hxx"
#include "convertsinglebytetobmpunicode.hxx"
-#include "unichars.hxx"
sal_Size rtl_textenc_convertSingleByteToBmpUnicode(
void const * data, SAL_UNUSED_PARAMETER void *, char const * srcBuf,
diff --git a/sal/textenc/tcvtutf8.cxx b/sal/textenc/tcvtutf8.cxx
index f210b654d57f..456d77e2f51c 100644
--- a/sal/textenc/tcvtutf8.cxx
+++ b/sal/textenc/tcvtutf8.cxx
@@ -27,8 +27,6 @@
#include "converter.hxx"
#include "tcvtutf8.hxx"
-#include "tenchelp.hxx"
-#include "unichars.hxx"
namespace {
diff --git a/sal/textenc/tencinfo.cxx b/sal/textenc/tencinfo.cxx
index 7db2753938f3..2447e71006fd 100644
--- a/sal/textenc/tencinfo.cxx
+++ b/sal/textenc/tencinfo.cxx
@@ -19,7 +19,6 @@
#include <sal/config.h>
-#include <cstddef>
#include <cstring>
#include <rtl/tencinfo.h>
diff --git a/sal/textenc/textenc.cxx b/sal/textenc/textenc.cxx
index b8b12fb21bf7..23b5a85faa4a 100644
--- a/sal/textenc/textenc.cxx
+++ b/sal/textenc/textenc.cxx
@@ -23,21 +23,16 @@
#include <sal/config.h>
-#include <cstddef>
#include <cstdlib>
#include <osl/module.hxx>
#include <rtl/textenc.h>
#include <rtl/tencinfo.h>
-#include <rtl/ustring.h>
-#include <rtl/ustring.hxx>
#include <sal/log.hxx>
-#include <sal/macros.h>
#include <sal/types.h>
#include "convertsimple.hxx"
#include "gettextencodingdata.hxx"
-#include "tcvtbyte.hxx"
#include "tcvtutf8.hxx"
#include "tenchelp.hxx"