From a87a062fd4fac61fde6aa7f6b4277cc77438d119 Mon Sep 17 00:00:00 2001 From: Gabor Kelemen Date: Thu, 8 Nov 2018 23:35:22 +0100 Subject: tdf#42949 Fix IWYU warnings in sc/qa/{perf,unit}/* Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I031faa67192f21d20938c8cc8056db138326a1ca Reviewed-on: https://gerrit.libreoffice.org/63143 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- sc/IwyuFilter_sc.yaml | 6 ++++++ sc/qa/perf/scperfobj.cxx | 5 ----- sc/qa/unit/bugfix-test.cxx | 1 - sc/qa/unit/chart2dataprovider.cxx | 4 ---- sc/qa/unit/cond_format_merge.cxx | 20 ++++++++++++++------ sc/qa/unit/copy_paste_test.cxx | 1 - sc/qa/unit/datacache.cxx | 1 - sc/qa/unit/dataproviders_test.cxx | 2 -- sc/qa/unit/datatransformation_test.cxx | 6 ------ sc/qa/unit/filters-test.cxx | 12 ------------ sc/qa/unit/functions_test.hxx | 6 ++++-- sc/qa/unit/helper/csv_handler.hxx | 7 +------ sc/qa/unit/helper/debughelper.hxx | 6 ------ sc/qa/unit/helper/qahelper.cxx | 8 ++++++-- sc/qa/unit/helper/qahelper.hxx | 10 ++-------- sc/qa/unit/helper/xpath.hxx | 17 ++++++++--------- sc/qa/unit/mark_test.cxx | 6 ++++-- sc/qa/unit/opencl-test.cxx | 22 ---------------------- sc/qa/unit/parallelism.cxx | 17 ----------------- sc/qa/unit/pivottable_filters_test.cxx | 5 +---- sc/qa/unit/range.cxx | 1 - sc/qa/unit/rangelst_test.cxx | 2 -- sc/qa/unit/screenshots/screenshots.cxx | 19 ------------------- sc/qa/unit/subsequent_export-test.cxx | 14 ++------------ sc/qa/unit/subsequent_filters-test.cxx | 14 +++----------- sc/qa/unit/tiledrendering/tiledrendering.cxx | 6 ------ sc/qa/unit/ucalc.cxx | 15 ++++----------- sc/qa/unit/ucalc.hxx | 3 ++- sc/qa/unit/ucalc_condformat.cxx | 1 + sc/qa/unit/ucalc_formula.cxx | 9 +++++---- sc/qa/unit/ucalc_pivottable.cxx | 6 ++++-- sc/qa/unit/ucalc_sharedformula.cxx | 4 +++- sc/qa/unit/ucalc_sort.cxx | 5 +++-- 33 files changed, 73 insertions(+), 188 deletions(-) (limited to 'sc') diff --git a/sc/IwyuFilter_sc.yaml b/sc/IwyuFilter_sc.yaml index f7db11f4decc..fbc77d9daac6 100644 --- a/sc/IwyuFilter_sc.yaml +++ b/sc/IwyuFilter_sc.yaml @@ -369,6 +369,12 @@ blacklist: sc/inc/unitconv.hxx: # base class has to be a complete type - map + sc/qa/unit/ucalc_formula.cxx: + # Needed in template + - docpool.hxx + sc/qa/unit/functions_test.hxx: + # Needed for css shortcut + - sal/types.h sc/source/core/inc/addinlis.hxx: # base class has to be a complete type - com/sun/star/lang/XServiceInfo.hpp diff --git a/sc/qa/perf/scperfobj.cxx b/sc/qa/perf/scperfobj.cxx index 628fc1233669..4c63d3d1c6aa 100644 --- a/sc/qa/perf/scperfobj.cxx +++ b/sc/qa/perf/scperfobj.cxx @@ -27,16 +27,11 @@ #include #include #include -#include -#include #include -#include #include -#include #include #include #include -#include #include #include #include diff --git a/sc/qa/unit/bugfix-test.cxx b/sc/qa/unit/bugfix-test.cxx index 94fa2d188189..d7386343efdb 100644 --- a/sc/qa/unit/bugfix-test.cxx +++ b/sc/qa/unit/bugfix-test.cxx @@ -10,7 +10,6 @@ #include #include #include -#include #include "helper/qahelper.hxx" using namespace ::com::sun::star; diff --git a/sc/qa/unit/chart2dataprovider.cxx b/sc/qa/unit/chart2dataprovider.cxx index f482283062f9..2e30b6090745 100644 --- a/sc/qa/unit/chart2dataprovider.cxx +++ b/sc/qa/unit/chart2dataprovider.cxx @@ -12,13 +12,9 @@ #include #include -#include -#include #include -#include #include -#include #include "helper/qahelper.hxx" diff --git a/sc/qa/unit/cond_format_merge.cxx b/sc/qa/unit/cond_format_merge.cxx index 0ce3f21909bd..28da3a88fbb2 100644 --- a/sc/qa/unit/cond_format_merge.cxx +++ b/sc/qa/unit/cond_format_merge.cxx @@ -10,16 +10,24 @@ #include #include -#include #include #include -#include +#include #include -#include -#include - -#include "helper/qahelper.hxx" +namespace com +{ +namespace sun +{ +namespace star +{ +namespace lang +{ +class XComponent; +} +} +} +} using namespace css; diff --git a/sc/qa/unit/copy_paste_test.cxx b/sc/qa/unit/copy_paste_test.cxx index 742005df7e26..3b57bad7a6ec 100644 --- a/sc/qa/unit/copy_paste_test.cxx +++ b/sc/qa/unit/copy_paste_test.cxx @@ -8,7 +8,6 @@ */ #include -#include #include #include diff --git a/sc/qa/unit/datacache.cxx b/sc/qa/unit/datacache.cxx index d389bdf3d8b1..078e2421f110 100644 --- a/sc/qa/unit/datacache.cxx +++ b/sc/qa/unit/datacache.cxx @@ -8,7 +8,6 @@ */ #include -#include #include #include "helper/qahelper.hxx" diff --git a/sc/qa/unit/dataproviders_test.cxx b/sc/qa/unit/dataproviders_test.cxx index 2885a5a53a2e..1e9cf97e8dc3 100644 --- a/sc/qa/unit/dataproviders_test.cxx +++ b/sc/qa/unit/dataproviders_test.cxx @@ -10,9 +10,7 @@ #include "helper/qahelper.hxx" #include -#include #include -#include #include #include #include diff --git a/sc/qa/unit/datatransformation_test.cxx b/sc/qa/unit/datatransformation_test.cxx index 4872f5684ec9..0cec07fb0742 100644 --- a/sc/qa/unit/datatransformation_test.cxx +++ b/sc/qa/unit/datatransformation_test.cxx @@ -11,15 +11,9 @@ #include "helper/qahelper.hxx" #include -#include -#include -#include #include #include -#include -#include #include -#include class ScDataTransformationTest : public ScBootstrapFixture { diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx index 021eeb9e9952..24be3958dc2c 100644 --- a/sc/qa/unit/filters-test.cxx +++ b/sc/qa/unit/filters-test.cxx @@ -10,25 +10,13 @@ #include #include #include -#include -#include - -#include -#include -#include -#include -#include -#include #include "helper/qahelper.hxx" #include #include #include -#include -#include #include -#include #include #include #include diff --git a/sc/qa/unit/functions_test.hxx b/sc/qa/unit/functions_test.hxx index 407efbf7b124..0964214fbb4f 100644 --- a/sc/qa/unit/functions_test.hxx +++ b/sc/qa/unit/functions_test.hxx @@ -8,11 +8,13 @@ */ #include +#include #include -#include #include "helper/qahelper.hxx" +#include + class SCQAHELPER_DLLPUBLIC FunctionsTest : public ScBootstrapFixture, public test::FiltersTest { public: @@ -30,7 +32,7 @@ public: unsigned int nFilterVersion) override; private: - uno::Reference m_xCalcComponent; + css::uno::Reference m_xCalcComponent; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/qa/unit/helper/csv_handler.hxx b/sc/qa/unit/helper/csv_handler.hxx index 1f7c3ac2e3b8..f9d0f31b18d5 100644 --- a/sc/qa/unit/helper/csv_handler.hxx +++ b/sc/qa/unit/helper/csv_handler.hxx @@ -10,20 +10,15 @@ #ifndef INCLUDED_SC_QA_UNIT_HELPER_CSV_HANDLER_HXX #define INCLUDED_SC_QA_UNIT_HELPER_CSV_HANDLER_HXX -#include +#include "qahelper.hxx" -#include -#include #include -#include #include #include #include #include -#include - #define DEBUG_CSV_HANDLER 0 inline OUString getConditionalFormatString(ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab) diff --git a/sc/qa/unit/helper/debughelper.hxx b/sc/qa/unit/helper/debughelper.hxx index 4f8dd6633590..fedde10dd120 100644 --- a/sc/qa/unit/helper/debughelper.hxx +++ b/sc/qa/unit/helper/debughelper.hxx @@ -10,10 +10,6 @@ #ifndef INCLUDED_SC_QA_UNIT_HELPER_DEBUGHELPER_HXX #define INCLUDED_SC_QA_UNIT_HELPER_DEBUGHELPER_HXX -#include -#include -#include - #ifdef _WIN32 #if !defined NOMINMAX #define NOMINMAX @@ -27,8 +23,6 @@ #include #include -#include - #define CALC_DEBUG_OUTPUT 0 #define CALC_TEST_PERF 0 diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx index 182cc995dd68..bc523cffe920 100644 --- a/sc/qa/unit/helper/qahelper.cxx +++ b/sc/qa/unit/helper/qahelper.cxx @@ -9,6 +9,7 @@ #include "qahelper.hxx" #include "csv_handler.hxx" +#include "debughelper.hxx" #include #include #include @@ -24,13 +25,16 @@ #include #include #include +#include +#include +#include +#include +#include #include #include -#include -#include #include #include #include diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx index 37bbdc35ff50..2482248a1754 100644 --- a/sc/qa/unit/helper/qahelper.hxx +++ b/sc/qa/unit/helper/qahelper.hxx @@ -10,8 +10,6 @@ #ifndef INCLUDED_SC_QA_UNIT_HELPER_QAHELPER_HXX #define INCLUDED_SC_QA_UNIT_HELPER_QAHELPER_HXX -#include -#include "debughelper.hxx" #include #include @@ -20,13 +18,7 @@ #include #include -#include - -#include #include -#include -#include -#include #include #include @@ -36,6 +28,8 @@ #include +namespace utl { class TempFile; } + #if defined(SCQAHELPER_DLLIMPLEMENTATION) #define SCQAHELPER_DLLPUBLIC SAL_DLLPUBLIC_EXPORT #else diff --git a/sc/qa/unit/helper/xpath.hxx b/sc/qa/unit/helper/xpath.hxx index f8ca5684c541..39813bea85cd 100644 --- a/sc/qa/unit/helper/xpath.hxx +++ b/sc/qa/unit/helper/xpath.hxx @@ -10,26 +10,25 @@ #ifndef INCLUDED_SC_QA_UNIT_HELPER_XPATH_HXX #define INCLUDED_SC_QA_UNIT_HELPER_XPATH_HXX -#include +#include -#include - -#include -#include - -#include #include +#include #include +namespace com { namespace sun { namespace star { namespace uno { template class Reference; } } } } +namespace com { namespace sun { namespace star { namespace lang { class XMultiServiceFactory; } } } } +namespace utl { class TempFile; } +class ScDocShell; +class SvStream; + #if defined(SCQAHELPER_DLLIMPLEMENTATION) #define SCQAHELPER_DLLPUBLIC SAL_DLLPUBLIC_EXPORT #else #define SCQAHELPER_DLLPUBLIC SAL_DLLPUBLIC_IMPORT #endif -#include - using namespace com::sun::star; class ScBootstrapFixture; diff --git a/sc/qa/unit/mark_test.cxx b/sc/qa/unit/mark_test.cxx index 6e00e4bf163d..16122da55f8c 100644 --- a/sc/qa/unit/mark_test.cxx +++ b/sc/qa/unit/mark_test.cxx @@ -8,8 +8,10 @@ */ #include -#include -#include "helper/qahelper.hxx" +#include +#include +#include +#include #include #include "../../source/core/data/markarr.cxx" diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx index 059027623989..79cf3ab8fb69 100644 --- a/sc/qa/unit/opencl-test.cxx +++ b/sc/qa/unit/opencl-test.cxx @@ -2,35 +2,13 @@ #include #include -#include -#include - -#include -#include -#include -#include -#include -#include -#include #include "helper/qahelper.hxx" -#include -#include - #include -#include -#include -#include #include -#include -#include -#include -#include #include -#include - using namespace ::com::sun::star; using namespace ::com::sun::star::uno; diff --git a/sc/qa/unit/parallelism.cxx b/sc/qa/unit/parallelism.cxx index 8c41318a5b1c..f8f5db920c45 100644 --- a/sc/qa/unit/parallelism.cxx +++ b/sc/qa/unit/parallelism.cxx @@ -2,35 +2,18 @@ #include #include -#include -#include #include -#include -#include -#include #include -#include #include "helper/qahelper.hxx" -#include -#include - #include -#include -#include -#include #include -#include -#include -#include #include #include #include -#include - #include using namespace css; diff --git a/sc/qa/unit/pivottable_filters_test.cxx b/sc/qa/unit/pivottable_filters_test.cxx index ceb43d6ce664..b7830b2e7d31 100644 --- a/sc/qa/unit/pivottable_filters_test.cxx +++ b/sc/qa/unit/pivottable_filters_test.cxx @@ -8,15 +8,12 @@ */ #include -#include -#include #include "helper/qahelper.hxx" +#include "helper/debughelper.hxx" #include "helper/xpath.hxx" -#include "helper/shared_test_impl.hxx" #include -#include #include #include #include diff --git a/sc/qa/unit/range.cxx b/sc/qa/unit/range.cxx index 67f4ecb92194..4eb490d81b56 100644 --- a/sc/qa/unit/range.cxx +++ b/sc/qa/unit/range.cxx @@ -10,7 +10,6 @@ #include #include #include -#include "helper/qahelper.hxx" #include #include #include diff --git a/sc/qa/unit/rangelst_test.cxx b/sc/qa/unit/rangelst_test.cxx index f955fc9167ef..e0f8bbefbf33 100644 --- a/sc/qa/unit/rangelst_test.cxx +++ b/sc/qa/unit/rangelst_test.cxx @@ -9,8 +9,6 @@ #include #include -#include "helper/qahelper.hxx" -#include #include #include diff --git a/sc/qa/unit/screenshots/screenshots.cxx b/sc/qa/unit/screenshots/screenshots.cxx index 5b137437c0f2..8f212bbda1e8 100644 --- a/sc/qa/unit/screenshots/screenshots.cxx +++ b/sc/qa/unit/screenshots/screenshots.cxx @@ -10,35 +10,16 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include #include -#include -#include #include #include #include -#include -#include -#include #include -#include #include -#include #include -#include #include #include #include diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 2472b3f9d55f..1425ff330954 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -9,17 +9,15 @@ #include #include -#include -#include #include -#include #include #include #include -#include #include +#include +#include "helper/debughelper.hxx" #include "helper/qahelper.hxx" #include "helper/xpath.hxx" #include "helper/shared_test_impl.hxx" @@ -30,23 +28,18 @@ #include #include #include -#include #include #include #include #include #include -#include -#include #include #include #include #include -#include #include #include -#include #include #include #include @@ -69,11 +62,8 @@ #include #include -#include -#include #include #include -#include #include #include diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index eca265feeb9d..67471ea15af0 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -15,14 +15,12 @@ #include #include -#include #include #include -#include #include -#include #include #include +#include #include #include @@ -57,7 +55,6 @@ #include #include #include -#include #include #include #include @@ -67,24 +64,19 @@ #include #include -#include #include #include -#include -#include #include #include #include #include -#include #include -#include -#include #include "helper/qahelper.hxx" #include "helper/shared_test_impl.hxx" -#include + +namespace com { namespace sun { namespace star { namespace frame { class XModel; } } } } using namespace ::com::sun::star; using namespace ::com::sun::star::uno; diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx index 2bbb71a1ec8a..0df9df47c65a 100644 --- a/sc/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx @@ -19,15 +19,9 @@ #include #include #include -#include -#include -#include -#include #include #include -#include #include -#include #include #include diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index f0c418fb856f..6853c66ac0ae 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -8,14 +8,14 @@ */ #include "ucalc.hxx" +#include "helper/debughelper.hxx" +#include "helper/qahelper.hxx" #include #include -#include -#include -#include #include +#include #include #include @@ -37,18 +37,15 @@ #include #include #include +#include #include #include -#include #include -#include #include -#include #include #include -#include #include #include #include @@ -73,14 +70,12 @@ #include -#include #include #include #include #include #include -#include #include #include #include @@ -94,8 +89,6 @@ #include #include -#include -#include #include struct TestImpl diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx index 9f69783ad815..35378b152711 100644 --- a/sc/qa/unit/ucalc.hxx +++ b/sc/qa/unit/ucalc.hxx @@ -10,7 +10,8 @@ #ifndef INCLUDED_SC_QA_UNIT_UCALC_HXX #define INCLUDED_SC_QA_UNIT_UCALC_HXX -#include "helper/qahelper.hxx" +#include +#include #include #include #include diff --git a/sc/qa/unit/ucalc_condformat.cxx b/sc/qa/unit/ucalc_condformat.cxx index 633bfd86fbcc..bb469678ab52 100644 --- a/sc/qa/unit/ucalc_condformat.cxx +++ b/sc/qa/unit/ucalc_condformat.cxx @@ -9,6 +9,7 @@ #include #include "ucalc.hxx" +#include "helper/qahelper.hxx" #include #include diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index 3c1b462933c4..fc505c281c18 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -8,17 +8,16 @@ */ #include "ucalc.hxx" +#include "helper/debughelper.hxx" +#include "helper/qahelper.hxx" #include #include #include -#include #include #include #include #include #include -#include -#include #include #include #include @@ -32,12 +31,14 @@ #include #include #include +#include +#include #include #include -#include #include #include +#include #include #include diff --git a/sc/qa/unit/ucalc_pivottable.cxx b/sc/qa/unit/ucalc_pivottable.cxx index d62a6cb3b9d0..f455152da133 100644 --- a/sc/qa/unit/ucalc_pivottable.cxx +++ b/sc/qa/unit/ucalc_pivottable.cxx @@ -8,7 +8,9 @@ */ #include +#include #include "ucalc.hxx" +#include "helper/qahelper.hxx" #include #include #include @@ -27,8 +29,8 @@ #include #include #include -#include -#include + +using namespace ::com::sun::star; namespace { diff --git a/sc/qa/unit/ucalc_sharedformula.cxx b/sc/qa/unit/ucalc_sharedformula.cxx index 853f54c30ff9..b54216b413d4 100644 --- a/sc/qa/unit/ucalc_sharedformula.cxx +++ b/sc/qa/unit/ucalc_sharedformula.cxx @@ -9,11 +9,12 @@ #include #include "ucalc.hxx" +#include "helper/debughelper.hxx" +#include "helper/qahelper.hxx" #include #include #include #include -#include #include #include #include @@ -26,6 +27,7 @@ #include #include +#include #include diff --git a/sc/qa/unit/ucalc_sort.cxx b/sc/qa/unit/ucalc_sort.cxx index bf817873a341..00473f4d7757 100644 --- a/sc/qa/unit/ucalc_sort.cxx +++ b/sc/qa/unit/ucalc_sort.cxx @@ -9,6 +9,8 @@ #include "ucalc.hxx" #include "helper/sorthelper.hxx" +#include "helper/debughelper.hxx" +#include "helper/qahelper.hxx" #include #include @@ -21,16 +23,15 @@ #include #include #include -#include #include #include #include #include #include +#include #include #include -#include void Test::testSort() { -- cgit