formula/source/core/api/FormulaCompiler.cxx | 1 + include/IwyuFilter_include.yaml | 7 +++++++ include/LibreOfficeKit/LibreOfficeKitTypes.h | 2 -- include/editeng/editund2.hxx | 1 - include/editeng/editview.hxx | 1 - include/editeng/overflowingtxt.hxx | 2 -- include/editeng/txtrange.hxx | 1 - include/editeng/unoforou.hxx | 1 - include/editeng/unoipset.hxx | 1 - include/editeng/unonames.hxx | 2 ++ include/editeng/xmlcnitm.hxx | 1 - include/formula/errorcodes.hxx | 2 +- include/linguistic/lngprops.hxx | 2 ++ include/o3tl/cow_wrapper.hxx | 1 - include/o3tl/hash_combine.hxx | 4 ++++ include/o3tl/string_view.hxx | 1 - include/oox/core/fragmenthandler2.hxx | 2 -- include/oox/drawingml/drawingmltypes.hxx | 1 - include/oox/export/drawingml.hxx | 1 + include/oox/export/utils.hxx | 2 ++ include/oox/ppt/pptimport.hxx | 1 - include/oox/shape/ShapeContextHandler.hxx | 2 -- include/oox/shape/ShapeFilterBase.hxx | 1 + oox/source/drawingml/chart/converterbase.cxx | 1 + oox/source/drawingml/diagram/datamodel.hxx | 1 + sc/qa/unit/ucalc_pivottable.cxx | 1 + sc/source/core/data/global2.cxx | 1 + sc/source/ui/docshell/impex.cxx | 1 + sc/source/ui/vba/vbarange.cxx | 1 + sc/source/ui/view/viewfun6.cxx | 1 + 30 files changed, 28 insertions(+), 19 deletions(-)
New commits: commit 807f238f12e0774fabf507a17ca0ba9204d47833 Author: Gabor Kelemen <kelem...@ubuntu.com> AuthorDate: Thu Dec 16 20:59:35 2021 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Mon Dec 20 10:06:34 2021 +0100 Recheck include/[e-r]* with IWYU See tdf#42949 for motivation Change-Id: I44e4e3a88067c1c29ce9d563b22741e984b43576 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126964 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 9d84909c71c2..80065f2bc855 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -18,6 +18,7 @@ */ #include <sal/macros.h> #include <sal/log.hxx> +#include <rtl/math.hxx> #include <formula/FormulaCompiler.hxx> #include <formula/errorcodes.hxx> #include <formula/token.hxx> diff --git a/include/IwyuFilter_include.yaml b/include/IwyuFilter_include.yaml index d608a87768d8..f56ed368c98b 100644 --- a/include/IwyuFilter_include.yaml +++ b/include/IwyuFilter_include.yaml @@ -43,6 +43,10 @@ excludelist: include/android/compatibility.hxx: # TODO check whether actually needed, just silence this for now - math.h + include/LibreOfficeKit/LibreOfficeKit.h: + # the unstable API needs C99's bool + - stdbool.h + - stdint.h include/sfx2/toolbarids.hxx: # needed for enum definition - sal/types.h @@ -233,6 +237,9 @@ excludelist: include/o3tl/make_shared.hxx: # Needed for __COVERITY__ - o3tl/deleter.hxx + include/o3tl/safeint.hxx: + # Needed for std::min + - algorithm include/sot/exchange.hxx: # Used in a macro #define - com/sun/star/datatransfer/dnd/DNDConstants.hpp diff --git a/include/LibreOfficeKit/LibreOfficeKitTypes.h b/include/LibreOfficeKit/LibreOfficeKitTypes.h index 5f4e3d4d870f..8513ef75421d 100644 --- a/include/LibreOfficeKit/LibreOfficeKitTypes.h +++ b/include/LibreOfficeKit/LibreOfficeKitTypes.h @@ -10,8 +10,6 @@ #ifndef INCLUDED_LIBREOFFICEKIT_LIBREOFFICEKIT_TYPES_H #define INCLUDED_LIBREOFFICEKIT_LIBREOFFICEKIT_TYPES_H -#include <stddef.h> - #ifdef __cplusplus extern "C" { #endif diff --git a/include/editeng/editund2.hxx b/include/editeng/editund2.hxx index fb8d66b99443..3f6975a3a2e8 100644 --- a/include/editeng/editund2.hxx +++ b/include/editeng/editund2.hxx @@ -20,7 +20,6 @@ #ifndef INCLUDED_EDITENG_EDITUND2_HXX #define INCLUDED_EDITENG_EDITUND2_HXX -#include <config_options.h> #include <editeng/editengdllapi.h> #include <svl/undo.hxx> diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx index 8332e516915d..f610f5ee6bf5 100644 --- a/include/editeng/editview.hxx +++ b/include/editeng/editview.hxx @@ -20,7 +20,6 @@ #ifndef INCLUDED_EDITENG_EDITVIEW_HXX #define INCLUDED_EDITENG_EDITVIEW_HXX -#include <config_options.h> #include <memory> #include <com/sun/star/i18n/WordType.hpp> diff --git a/include/editeng/overflowingtxt.hxx b/include/editeng/overflowingtxt.hxx index 1c11c7797d00..031b4d82d9d5 100644 --- a/include/editeng/overflowingtxt.hxx +++ b/include/editeng/overflowingtxt.hxx @@ -20,12 +20,10 @@ #ifndef INCLUDED_EDITENG_OVERFLOWINGTXT_HXX #define INCLUDED_EDITENG_OVERFLOWINGTXT_HXX -#include <config_options.h> #include <editeng/editengdllapi.h> #include <editeng/editdata.hxx> #include <com/sun/star/uno/Reference.h> -#include <memory> #include <optional> namespace com::sun::star { diff --git a/include/editeng/txtrange.hxx b/include/editeng/txtrange.hxx index ab6be6d283a2..c6661f687dad 100644 --- a/include/editeng/txtrange.hxx +++ b/include/editeng/txtrange.hxx @@ -24,7 +24,6 @@ #include <tools/gen.hxx> #include <tools/poly.hxx> #include <deque> -#include <memory> #include <optional> namespace basegfx { diff --git a/include/editeng/unoforou.hxx b/include/editeng/unoforou.hxx index bbc92541735c..a4535d83bf77 100644 --- a/include/editeng/unoforou.hxx +++ b/include/editeng/unoforou.hxx @@ -24,7 +24,6 @@ #include <editeng/editengdllapi.h> #include <editeng/editdata.hxx> #include <svl/itemset.hxx> -#include <memory> #include <optional> class Outliner; diff --git a/include/editeng/unoipset.hxx b/include/editeng/unoipset.hxx index b4ea97f6cb28..5a0ac105c176 100644 --- a/include/editeng/unoipset.hxx +++ b/include/editeng/unoipset.hxx @@ -22,7 +22,6 @@ #include <editeng/editengdllapi.h> #include <svl/itemprop.hxx> -#include <memory> #include <vector> namespace com::sun::star::beans { class XPropertySetInfo; } diff --git a/include/editeng/unonames.hxx b/include/editeng/unonames.hxx index 29bb46a97c3d..2e5b44e1ad88 100644 --- a/include/editeng/unonames.hxx +++ b/include/editeng/unonames.hxx @@ -10,6 +10,8 @@ #ifndef INCLUDED_EDITENG_UNONAMES_HXX #define INCLUDED_EDITENG_UNONAMES_HXX +#include <rtl/ustring.hxx> + // Common across fields inline constexpr OUStringLiteral UNO_TC_PROP_ANCHOR = u"Anchor"; inline constexpr OUStringLiteral UNO_TC_PROP_TEXTFIELD_TYPE = u"TextFieldType"; diff --git a/include/editeng/xmlcnitm.hxx b/include/editeng/xmlcnitm.hxx index f3b44e062e00..a0ee0a63fb55 100644 --- a/include/editeng/xmlcnitm.hxx +++ b/include/editeng/xmlcnitm.hxx @@ -22,7 +22,6 @@ #include <svl/poolitem.hxx> #include <editeng/editengdllapi.h> -#include <memory> #include <xmloff/xmlcnimp.hxx> diff --git a/include/formula/errorcodes.hxx b/include/formula/errorcodes.hxx index 1a96a0c70223..3e929bff49e8 100644 --- a/include/formula/errorcodes.hxx +++ b/include/formula/errorcodes.hxx @@ -20,10 +20,10 @@ #ifndef INCLUDED_FORMULA_ERRORCODES_HXX #define INCLUDED_FORMULA_ERRORCODES_HXX -#include <rtl/math.hxx> #include <sal/mathconf.h> #include <sal/types.h> +#include <cmath> #include <limits> // Store as 16-bits, since error values are stored in tokens and formula results, diff --git a/include/linguistic/lngprops.hxx b/include/linguistic/lngprops.hxx index 62a72f34b5aa..2c3dc1d901f1 100644 --- a/include/linguistic/lngprops.hxx +++ b/include/linguistic/lngprops.hxx @@ -20,6 +20,8 @@ #ifndef INCLUDED_LINGUISTIC_LNGPROPS_HXX #define INCLUDED_LINGUISTIC_LNGPROPS_HXX +#include <rtl/ustring.hxx> + // maximal number of suggestions to be returned in spelling context-menu // (may not include results added by looking up user dictionaries) inline constexpr OUStringLiteral UPN_MAX_NUMBER_OF_SUGGESTIONS = u"MaxNumberOfSuggestions"; diff --git a/include/o3tl/cow_wrapper.hxx b/include/o3tl/cow_wrapper.hxx index ced27c1fda32..cc823f60ec57 100644 --- a/include/o3tl/cow_wrapper.hxx +++ b/include/o3tl/cow_wrapper.hxx @@ -23,7 +23,6 @@ #include <osl/interlck.h> #include <optional> -#include <utility> #include <cstddef> namespace o3tl diff --git a/include/o3tl/hash_combine.hxx b/include/o3tl/hash_combine.hxx index f56beda62672..48e14262228e 100644 --- a/include/o3tl/hash_combine.hxx +++ b/include/o3tl/hash_combine.hxx @@ -9,6 +9,10 @@ #pragma once +#include <cstddef> +#include <functional> +#include <type_traits> + namespace o3tl { template <typename T, typename N> diff --git a/include/o3tl/string_view.hxx b/include/o3tl/string_view.hxx index 4cb9790900f6..0ca26a829932 100644 --- a/include/o3tl/string_view.hxx +++ b/include/o3tl/string_view.hxx @@ -15,7 +15,6 @@ #include <cstddef> #include <string> #include <string_view> -#include <type_traits> #include <rtl/ustring.h> diff --git a/include/oox/core/fragmenthandler2.hxx b/include/oox/core/fragmenthandler2.hxx index 598426ee681e..05b2b2d0bef3 100644 --- a/include/oox/core/fragmenthandler2.hxx +++ b/include/oox/core/fragmenthandler2.hxx @@ -20,8 +20,6 @@ #ifndef INCLUDED_OOX_CORE_FRAGMENTHANDLER2_HXX #define INCLUDED_OOX_CORE_FRAGMENTHANDLER2_HXX -#include <vector> - #include <com/sun/star/uno/Reference.hxx> #include <oox/core/contexthandler.hxx> #include <oox/core/contexthandler2.hxx> diff --git a/include/oox/drawingml/drawingmltypes.hxx b/include/oox/drawingml/drawingmltypes.hxx index 4350b8d033a7..7f7aab4ef7d1 100644 --- a/include/oox/drawingml/drawingmltypes.hxx +++ b/include/oox/drawingml/drawingmltypes.hxx @@ -32,7 +32,6 @@ #include <com/sun/star/uno/Reference.hxx> #include <o3tl/unit_conversion.hxx> #include <oox/dllapi.h> -#include <oox/helper/helper.hxx> #include <rtl/ustring.hxx> #include <sal/types.h> diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx index b71490752708..eb1da4a61f8e 100644 --- a/include/oox/export/drawingml.hxx +++ b/include/oox/export/drawingml.hxx @@ -42,6 +42,7 @@ #include <svx/msdffdef.hxx> #include <vcl/checksum.hxx> #include <tools/gen.hxx> +#include <tools/color.hxx> #include <vcl/mapmod.hxx> class Graphic; diff --git a/include/oox/export/utils.hxx b/include/oox/export/utils.hxx index 1a9a790d2182..00fd953a04e7 100644 --- a/include/oox/export/utils.hxx +++ b/include/oox/export/utils.hxx @@ -26,6 +26,8 @@ #include <rtl/string.hxx> #include <sal/types.h> +#include <cmath> + inline OString I32SHEX(sal_Int32 x) { OString aStr = OString::number(x, 16); diff --git a/include/oox/ppt/pptimport.hxx b/include/oox/ppt/pptimport.hxx index 29ef3c5732a6..3b81f26ec5e8 100644 --- a/include/oox/ppt/pptimport.hxx +++ b/include/oox/ppt/pptimport.hxx @@ -31,7 +31,6 @@ #include <oox/drawingml/drawingmltypes.hxx> #include <oox/drawingml/theme.hxx> #include <oox/ppt/slidepersist.hxx> -#include <oox/ppt/pptshape.hxx> #include <rtl/ustring.hxx> #include <sal/types.h> diff --git a/include/oox/shape/ShapeContextHandler.hxx b/include/oox/shape/ShapeContextHandler.hxx index dadaf7f64cb3..934ea374fd7c 100644 --- a/include/oox/shape/ShapeContextHandler.hxx +++ b/include/oox/shape/ShapeContextHandler.hxx @@ -23,8 +23,6 @@ #include <oox/drawingml/graphicshapecontext.hxx> #include <oox/core/fragmenthandler2.hxx> #include <oox/core/xmlfilterbase.hxx> -#include <com/sun/star/uno/XComponentContext.hpp> -#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/document/XDocumentProperties.hpp> #include <com/sun/star/graphic/XGraphicMapper.hpp> #include <com/sun/star/drawing/XDrawPage.hpp> diff --git a/include/oox/shape/ShapeFilterBase.hxx b/include/oox/shape/ShapeFilterBase.hxx index 5ae3b20c711d..4b6153a58d2f 100644 --- a/include/oox/shape/ShapeFilterBase.hxx +++ b/include/oox/shape/ShapeFilterBase.hxx @@ -27,6 +27,7 @@ #include <oox/drawingml/drawingmltypes.hxx> #include <com/sun/star/graphic/XGraphicMapper.hpp> #include <rtl/ref.hxx> +#include <tools/color.hxx> namespace oox::drawingml::table { diff --git a/oox/source/drawingml/chart/converterbase.cxx b/oox/source/drawingml/chart/converterbase.cxx index 5a58401ae07d..bf85b7c02360 100644 --- a/oox/source/drawingml/chart/converterbase.cxx +++ b/oox/source/drawingml/chart/converterbase.cxx @@ -33,6 +33,7 @@ #include <osl/diagnose.h> #include <basegfx/numeric/ftools.hxx> #include <oox/core/xmlfilterbase.hxx> +#include <oox/helper/helper.hxx> #include <oox/token/properties.hxx> #include <oox/token/tokens.hxx> diff --git a/oox/source/drawingml/diagram/datamodel.hxx b/oox/source/drawingml/diagram/datamodel.hxx index aee953b6f30c..a3d71718a74d 100644 --- a/oox/source/drawingml/diagram/datamodel.hxx +++ b/oox/source/drawingml/diagram/datamodel.hxx @@ -27,6 +27,7 @@ #include <rtl/ustring.hxx> #include <oox/drawingml/drawingmltypes.hxx> +#include <oox/helper/helper.hxx> #include <oox/token/tokens.hxx> #include <svx/DiagramDataInterface.hxx> diff --git a/sc/qa/unit/ucalc_pivottable.cxx b/sc/qa/unit/ucalc_pivottable.cxx index 2100e50d531a..9be50c461384 100644 --- a/sc/qa/unit/ucalc_pivottable.cxx +++ b/sc/qa/unit/ucalc_pivottable.cxx @@ -14,6 +14,7 @@ #include <cppunit/TestAssert.h> #include <sal/types.h> +#include <rtl/math.hxx> #include <scdll.hxx> #include "helper/qahelper.hxx" #include <dpshttab.hxx> diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx index 5dcbbdd11709..5d58a3e8c2e3 100644 --- a/sc/source/core/data/global2.cxx +++ b/sc/source/core/data/global2.cxx @@ -27,6 +27,7 @@ #include <formula/errorcodes.hxx> #include <sal/log.hxx> #include <rtl/character.hxx> +#include <rtl/math.hxx> #include <global.hxx> #include <rangeutl.hxx> diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index b49f3b96fb50..953aa0eb8167 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -63,6 +63,7 @@ #include <editeng/editobj.hxx> #include <svl/numformat.hxx> #include <rtl/character.hxx> +#include <rtl/math.hxx> #include <sax/tools/converter.hxx> #include <memory> diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 1cb307133cf7..d264682a1f7a 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -23,6 +23,7 @@ #include <cppuhelper/exc_hlp.hxx> #include <o3tl/any.hxx> #include <o3tl/unit_conversion.hxx> +#include <rtl/math.hxx> #include <tools/diagnose_ex.h> #include <com/sun/star/script/ArrayWrapper.hpp> diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx index 9e066efff637..160ee6ce5882 100644 --- a/sc/source/ui/view/viewfun6.cxx +++ b/sc/source/ui/view/viewfun6.cxx @@ -28,6 +28,7 @@ #include <vcl/uitest/logger.hxx> #include <vcl/uitest/eventdescription.hxx> #include <editeng/editview.hxx> +#include <rtl/math.hxx> #include <sal/log.hxx> #include <viewfunc.hxx>