tdf#42949 Fix IWYU warnings in sc/inc
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
New IWYU and recent developments in f-u-i helped to identify
some non self contained files, those were fixed too.
Change-Id: I3b33b0dee7d7c9afc136510898039cab53990ddf
Reviewed-on: https://gerrit.libreoffice.org/74980
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
diff --git a/sc/IwyuFilter_sc.yaml b/sc/IwyuFilter_sc.yaml
index 97ffa6b..9b2bf66 100644
--- a/sc/IwyuFilter_sc.yaml
+++ b/sc/IwyuFilter_sc.yaml
@@ -32,9 +32,6 @@ blacklist:
- com/sun/star/sheet/XFunctionDescriptions.hpp
- com/sun/star/sheet/XGlobalSheetSettings.hpp
- com/sun/star/sheet/XRecentFunctions.hpp
sc/inc/autoform.hxx:
# contains macro definitions
- scitems.hxx
sc/inc/chartuno.hxx:
# base class has to be a complete type
- com/sun/star/container/XEnumerationAccess.hpp
diff --git a/sc/inc/TablePivotChart.hxx b/sc/inc/TablePivotChart.hxx
index a99711c3..c357c6f 100644
--- a/sc/inc/TablePivotChart.hxx
+++ b/sc/inc/TablePivotChart.hxx
@@ -16,6 +16,7 @@
#include <com/sun/star/container/XNamed.hpp>
#include <svl/lstner.hxx>
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/compbase.hxx>
#include "types.hxx"
diff --git a/sc/inc/addruno.hxx b/sc/inc/addruno.hxx
index 62a0e7c..7503f86 100644
--- a/sc/inc/addruno.hxx
+++ b/sc/inc/addruno.hxx
@@ -26,6 +26,8 @@
#include <svl/lstner.hxx>
#include "address.hxx"
#include <docsh.hxx>
class ScAddressConversionObj : public ::cppu::WeakImplHelper<
css::beans::XPropertySet,
css::lang::XServiceInfo >,
diff --git a/sc/inc/afmtuno.hxx b/sc/inc/afmtuno.hxx
index d39e5e4..ff997b6 100644
--- a/sc/inc/afmtuno.hxx
+++ b/sc/inc/afmtuno.hxx
@@ -31,6 +31,8 @@
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/implbase.hxx>
#include <climits>
class ScAutoFormatFieldObj;
class ScAutoFormatObj;
diff --git a/sc/inc/attrib.hxx b/sc/inc/attrib.hxx
index 37340e7..a98578a 100644
--- a/sc/inc/attrib.hxx
+++ b/sc/inc/attrib.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_SC_INC_ATTRIB_HXX
#include <memory>
#include <vector>
#include <svl/poolitem.hxx>
#include <svl/intitem.hxx>
#include <svl/eitem.hxx>
diff --git a/sc/inc/autoform.hxx b/sc/inc/autoform.hxx
index 8fad143..43f22b1 100644
--- a/sc/inc/autoform.hxx
+++ b/sc/inc/autoform.hxx
@@ -30,25 +30,9 @@
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************************************/
#include "scitems.hxx"
#include <editeng/adjustitem.hxx>
#include <svx/algitem.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/brushitem.hxx>
#include <editeng/contouritem.hxx>
#include <editeng/colritem.hxx>
#include <editeng/crossedoutitem.hxx>
#include <editeng/fhgtitem.hxx>
#include <editeng/fontitem.hxx>
#include <editeng/postitem.hxx>
#include <editeng/shdditem.hxx>
#include <editeng/udlnitem.hxx>
#include <editeng/wghtitem.hxx>
#include <editeng/justifyitem.hxx>
#include <svx/rotmodit.hxx>
#include <svl/poolitem.hxx>
#include <svx/autoformathelper.hxx>
#include <svl/intitem.hxx>
#include <editeng/lineitem.hxx>
#include "scdllapi.h"
#include "zforauto.hxx"
diff --git a/sc/inc/calcmacros.hxx b/sc/inc/calcmacros.hxx
index d5cffd5..ca51c62 100644
--- a/sc/inc/calcmacros.hxx
+++ b/sc/inc/calcmacros.hxx
@@ -30,8 +30,6 @@
DEBUG_FORMULA_COMPILER || \
DEBUG_AREA_BROADCASTER
#include <iostream>
#include <string>
#include <cstdio>
using std::cout;
using std::cerr;
using std::endl;
diff --git a/sc/inc/chartuno.hxx b/sc/inc/chartuno.hxx
index 801a9d9..3e40ead 100644
--- a/sc/inc/chartuno.hxx
+++ b/sc/inc/chartuno.hxx
@@ -32,6 +32,7 @@
#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/container/XNamed.hpp>
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/implbase.hxx>
diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx
index 4244817..0ab1d11 100644
--- a/sc/inc/conditio.hxx
+++ b/sc/inc/conditio.hxx
@@ -31,7 +31,6 @@
#include <svl/listener.hxx>
#include <comphelper/stl_types.hxx>
#include <com/sun/star/sheet/ConditionOperator.hpp>
#include <rtl/math.hxx>
diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx
index 8604abc..7e293e4 100644
--- a/sc/inc/dociter.hxx
+++ b/sc/inc/dociter.hxx
@@ -26,6 +26,8 @@
#include "scdllapi.h"
#include "cellvalue.hxx"
#include "mtvelements.hxx"
#include "queryparam.hxx"
#include <vcl/outdev.hxx>
#include <vcl/vclptr.hxx>
#include <memory>
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index 4d0011c..c17cb53 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -23,6 +23,7 @@
#include "scdllapi.h"
#include "global.hxx"
#include "address.hxx"
#include "dpcache.hxx"
#include "dptypes.hxx"
#include "pivot.hxx"
#include "calcmacros.hxx"
diff --git a/sc/inc/dpoutput.hxx b/sc/inc/dpoutput.hxx
index 18aa7aa..70a5517 100644
--- a/sc/inc/dpoutput.hxx
+++ b/sc/inc/dpoutput.hxx
@@ -22,7 +22,7 @@
#include <com/sun/star/sheet/DataPilotOutputRangeType.hpp>
#include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
#include <comphelper/sequence.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include "address.hxx"
diff --git a/sc/inc/matrixoperators.hxx b/sc/inc/matrixoperators.hxx
index cadf554..aea82b5 100644
--- a/sc/inc/matrixoperators.hxx
+++ b/sc/inc/matrixoperators.hxx
@@ -11,6 +11,8 @@
#define INCLUDED_SC_INC_MATRIXOPERATORS_HXX
#include <functional>
namespace sc {
namespace op {
diff --git a/sc/inc/orcusxml.hxx b/sc/inc/orcusxml.hxx
index b635eca..f0f1558 100644
--- a/sc/inc/orcusxml.hxx
+++ b/sc/inc/orcusxml.hxx
@@ -12,7 +12,6 @@
#include "scdllapi.h"
#include "address.hxx"
#include <vcl/image.hxx>
#include <vector>
#include <memory>
diff --git a/sc/inc/refhint.hxx b/sc/inc/refhint.hxx
index ef5fc60..12c804d 100644
--- a/sc/inc/refhint.hxx
+++ b/sc/inc/refhint.hxx
@@ -10,7 +10,7 @@
#ifndef INCLUDED_SC_INC_REFHINT_HXX
#define INCLUDED_SC_INC_REFHINT_HXX
#include "address.hxx"
#include "types.hxx"
#include <svl/hint.hxx>
namespace sc {
diff --git a/sc/inc/scerrors.hrc b/sc/inc/scerrors.hrc
index d7095c3..e585b11 100644
--- a/sc/inc/scerrors.hrc
+++ b/sc/inc/scerrors.hrc
@@ -22,6 +22,7 @@
#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
#include <svtools/ehdl.hxx>
#include "scerrors.hxx"
const ErrMsgCode RID_ERRHDLSC[] =
diff --git a/sc/inc/scopetools.hxx b/sc/inc/scopetools.hxx
index 93f7238..135a7ff 100644
--- a/sc/inc/scopetools.hxx
+++ b/sc/inc/scopetools.hxx
@@ -11,7 +11,6 @@
#define INCLUDED_SC_INC_SCOPETOOLS_HXX
#include "scdllapi.h"
#include <vcl/vclptr.hxx>
class ScDocument;
namespace vcl { class Window; }
diff --git a/sc/inc/sheetdata.hxx b/sc/inc/sheetdata.hxx
index 1f3ce07..5b2265c 100644
--- a/sc/inc/sheetdata.hxx
+++ b/sc/inc/sheetdata.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_SC_INC_SHEETDATA_HXX
#include <editeng/editdata.hxx>
#include <map>
#include <unordered_set>
#include <vector>
diff --git a/sc/inc/unitconv.hxx b/sc/inc/unitconv.hxx
index 01a6a34..465aacf 100644
--- a/sc/inc/unitconv.hxx
+++ b/sc/inc/unitconv.hxx
@@ -20,6 +20,8 @@
#ifndef INCLUDED_SC_INC_UNITCONV_HXX
#define INCLUDED_SC_INC_UNITCONV_HXX
#include <rtl/ustring.hxx>
#include <map>
class ScUnitConverterData
diff --git a/sc/inc/units.hrc b/sc/inc/units.hrc
index 1ce44ba..19fcb81 100644
--- a/sc/inc/units.hrc
+++ b/sc/inc/units.hrc
@@ -22,6 +22,10 @@
#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
#include <tools/fldunit.hxx>
#include <utility>
const std::pair<const char*, FieldUnit> SCSTR_UNIT[] =
{
{ NC_("SCSTR_UNIT", "Millimeter") , FieldUnit::MM },
diff --git a/sc/inc/userlist.hxx b/sc/inc/userlist.hxx
index 3c0752a..ae4bec4 100644
--- a/sc/inc/userlist.hxx
+++ b/sc/inc/userlist.hxx
@@ -22,6 +22,8 @@
#include "scdllapi.h"
#include <rtl/ustring.hxx>
#include <memory>
#include <vector>
diff --git a/sc/inc/viewuno.hxx b/sc/inc/viewuno.hxx
index 3546b50..04f2300 100644
--- a/sc/inc/viewuno.hxx
+++ b/sc/inc/viewuno.hxx
@@ -22,6 +22,8 @@
#include <sfx2/sfxbasecontroller.hxx>
#include <svl/itemprop.hxx>
#include <svl/lstner.hxx>
#include <tools/gen.hxx>
#include <com/sun/star/view/XFormLayerAccess.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
diff --git a/sc/inc/waitoff.hxx b/sc/inc/waitoff.hxx
index 6c8b5f9..92eb127 100644
--- a/sc/inc/waitoff.hxx
+++ b/sc/inc/waitoff.hxx
@@ -22,6 +22,8 @@
#include <sal/types.h>
#include <vcl/vclptr.hxx>
namespace vcl { class Window; }
class ScWaitCursorOff
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 33e4ffb..d91222c 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -30,6 +30,7 @@
#include <sfx2/sfxsids.hrc>
#include <sfx2/viewfrm.hxx>
#include <sfx2/viewsh.hxx>
#include <svl/intitem.hxx>
#include <svl/stritem.hxx>
#include <svl/zforlist.hxx>
#include <svl/zformat.hxx>
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index f9840eb..254db1f 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -23,15 +23,32 @@
#include <sfx2/app.hxx>
#include <sfx2/docfile.hxx>
#include <unotools/pathoptions.hxx>
#include <svl/intitem.hxx>
#include <svl/itemset.hxx>
#include <vcl/svapp.hxx>
#include <vcl/outdev.hxx>
#include <svx/algitem.hxx>
#include <svx/dialmgr.hxx>
#include <svx/dialogs.hrc>
#include <svx/rotmodit.hxx>
#include <svx/svxids.hrc>
#include <svx/strings.hrc>
#include <editeng/adjustitem.hxx>
#include <editeng/borderline.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/brushitem.hxx>
#include <editeng/colritem.hxx>
#include <editeng/contouritem.hxx>
#include <editeng/crossedoutitem.hxx>
#include <editeng/fhgtitem.hxx>
#include <editeng/fontitem.hxx>
#include <editeng/justifyitem.hxx>
#include <editeng/langitem.hxx>
#include <editeng/lineitem.hxx>
#include <editeng/postitem.hxx>
#include <editeng/shdditem.hxx>
#include <editeng/udlnitem.hxx>
#include <editeng/wghtitem.hxx>
#include <tools/urlobj.hxx>
#include <comphelper/fileformat.h>
#include <unotools/collatorwrapper.hxx>
@@ -40,6 +57,7 @@
#include <osl/diagnose.h>
#include <globstr.hrc>
#include <scitems.hxx>
#include <scresid.hxx>
#include <document.hxx>
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 76f5a6c..adbee4b 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -22,6 +22,7 @@
#include <comphelper/lok.hxx>
#include <sfx2/app.hxx>
#include <editeng/editobj.hxx>
#include <editeng/justifyitem.hxx>
#include <sfx2/linkmgr.hxx>
#include <sfx2/bindings.hxx>
#include <vcl/svapp.hxx>
diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx
index 4887523..f003198 100644
--- a/sc/source/ui/miscdlgs/autofmt.cxx
+++ b/sc/source/ui/miscdlgs/autofmt.cxx
@@ -24,6 +24,8 @@
#include <editeng/colritem.hxx>
#include <editeng/crossedoutitem.hxx>
#include <editeng/fontitem.hxx>
#include <editeng/justifyitem.hxx>
#include <editeng/lineitem.hxx>
#include <editeng/postitem.hxx>
#include <editeng/shdditem.hxx>
#include <editeng/udlnitem.hxx>
diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx
index 531a94d..013a5b2 100644
--- a/sc/source/ui/unoobj/afmtuno.cxx
+++ b/sc/source/ui/unoobj/afmtuno.cxx
@@ -20,9 +20,13 @@
#include <scitems.hxx>
#include <editeng/memberids.h>
#include <osl/diagnose.h>
#include <svl/intitem.hxx>
#include <svl/poolitem.hxx>
#include <svl/eitem.hxx>
#include <vcl/svapp.hxx>
#include <svx/algitem.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/justifyitem.hxx>
#include <svx/unomid.hxx>
#include <unowids.hxx>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index f0772ba..72cd999 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -24,6 +24,7 @@
#include <editeng/borderline.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/fontitem.hxx>
#include <editeng/lineitem.hxx>
#include <editeng/scripttypeitem.hxx>
#include <svl/srchitem.hxx>
#include <sfx2/linkmgr.hxx>