Kaydet (Commit) 28726190 authored tarafından Gabor Kelemen's avatar Gabor Kelemen Kaydeden (comit) Miklos Vajna

find-unneeded-includes: Avoid proposing o3tl fw declaration

This does not really work: even when it seems to, it compiles only
because of transitive includes

- Filter o3tl/typed_flags_set.hxx in f-u-u
- Remove already added fw declarations from hxx files and
  include full header just in case
- Remove now unnecessary blacklist entries

Change-Id: Ie0de6667af697095a623b435806449e7e28a6004
Reviewed-on: https://gerrit.libreoffice.org/64659
Tested-by: Jenkins
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.com>
üst 0ad2302c
......@@ -63,6 +63,14 @@ def ignoreRemoval(include, toAdd, absFileName, moduleRules):
if include == k and v in toAdd:
return True
# Avoid proposing o3tl fw declaration
o3tl = {
"o3tl/typed_flags_set.hxx" : "namespace o3tl { template <typename T> struct typed_flags; }",
}
for k, v, in o3tl.items():
if include == k and v in toAdd:
return True
# Follow boost documentation.
if include == "boost/optional.hpp" and "boost/optional/optional.hpp" in toAdd:
return True
......
......@@ -40,12 +40,6 @@ blacklist:
include/rtl/math.hxx:
# TODO MSVC does not compile basegfx/numeric/ftools.hxx when this is replaced
- math.h
include/registry/regtype.h:
# Needed for template
- o3tl/typed_flags_set.hxx
include/registry/types.hxx:
# Needed for template
- o3tl/typed_flags_set.hxx
include/sfx2/toolbarids.hxx:
# needed for enum definition
- sal/types.h
......@@ -103,9 +97,6 @@ blacklist:
- cppuhelper/typeprovider.hxx
- cppuhelper/supportsservice.hxx
- cppuhelper/factory.hxx
include/ucbhelper/simpleinteractionrequest.hxx:
# Needed for template
- o3tl/typed_flags_set.hxx
include/comphelper/accessiblekeybindinghelper.hxx:
# base class has to be a complete type
- com/sun/star/accessibility/XAccessibleKeyBinding.hpp
......@@ -138,13 +129,8 @@ blacklist:
# base class has to be a complete type
- com/sun/star/lang/XSingleServiceFactory.hpp
include/comphelper/configurationhelper.hxx:
# Needed for template
- o3tl/typed_flags_set.hxx
# Needed for implicit destructor
- com/sun/star/uno/Any.hxx
include/comphelper/documentconstants.hxx:
# Needed for template
- o3tl/typed_flags_set.hxx
include/comphelper/docpasswordrequest.hxx:
# base class has to be a complete type
- com/sun/star/task/XInteractionRequest.hpp
......@@ -201,17 +187,12 @@ blacklist:
include/comphelper/uno3.hxx:
# Needed for macro
- comphelper/sequence.hxx
include/basegfx/polygon/b2dpolygontools.hxx:
# Needed for template
- o3tl/typed_flags_set.hxx
include/basegfx/utils/unopolypolygon.hxx:
# base class has to be a complete type
- com/sun/star/lang/XServiceInfo.hpp
- com/sun/star/rendering/XBezierPolyPolygon2D.hpp
- com/sun/star/rendering/XLinePolyPolygon2D.hpp
include/sot/exchange.hxx:
# Needed for template
- o3tl/typed_flags_set.hxx
# Used in a macro #define
- com/sun/star/datatransfer/dnd/DNDConstants.hpp
include/tools/debug.hxx:
......@@ -222,21 +203,9 @@ blacklist:
- com/sun/star/lang/IllegalArgumentException.hpp
- com/sun/star/uno/RuntimeException.hpp
- rtl/ustring.hxx
include/tools/fontenum.hxx:
# Needed for template
- o3tl/typed_flags_set.hxx
include/tools/svlibrary.h:
# Used behind #ifndef
- osl/module.h
include/tools/poly.hxx:
# Needed for template
- o3tl/typed_flags_set.hxx
include/tools/stream.hxx:
# Needed for template
- o3tl/typed_flags_set.hxx
include/tools/urlobj.hxx:
# Needed for template
- o3tl/typed_flags_set.hxx
include/unotools/accessiblestatesethelper.hxx:
# base class has to be a complete type
- com/sun/star/accessibility/XAccessibleStateSet.hpp
......@@ -250,18 +219,6 @@ blacklist:
include/unotools/fontcfg.hxx:
# Needed for a sal_uLong enum
- tools/solar.h
include/unotools/fontcvt.hxx:
# Needed for template
- o3tl/typed_flags_set.hxx
include/unotools/fontdefs.hxx:
# Needed for template
- o3tl/typed_flags_set.hxx
include/unotools/options.hxx:
# Needed for template
- o3tl/typed_flags_set.hxx
include/unotools/readwritemutexguard.hxx:
# Needed for template
- o3tl/typed_flags_set.hxx
include/unotools/streamwrap.hxx:
# base class has to be a complete type
- com/sun/star/io/XOutputStream.hpp
......@@ -278,25 +235,13 @@ blacklist:
- com/sun/star/lang/XInitialization.hpp
- com/sun/star/lang/XServiceInfo.hpp
- com/sun/star/xml/sax/XFastParser.hpp
include/i18nutil/casefolding.hxx:
# Needed for template
- o3tl/typed_flags_set.hxx
include/i18nutil/transliteration.hxx:
# Needed for template
- o3tl/typed_flags_set.hxx
include/svl/numuno.hxx:
# base class has to be a complete type
- com/sun/star/lang/XUnoTunnel.hpp
- com/sun/star/util/XNumberFormatsSupplier.hpp
include/svl/srchdefs.hxx:
# Needed for template
- o3tl/typed_flags_set.hxx
include/svl/urihelper.hxx:
# base class has to be a complete type
- tools/link.hxx
include/vcl/bitmap.hxx:
# Needed for template
- o3tl/typed_flags_set.hxx
include/vcl/builderfactory.hxx:
# Needed for macros
- vcl/builder.hxx
......@@ -304,21 +249,12 @@ blacklist:
include/vcl/devicecoordinate.hxx:
# Needed for #if configure switch
- basegfx/point/b2ipoint.hxx
include/vcl/errinf.hxx:
# Needed for template
- o3tl/typed_flags_set.hxx
include/vcl/edit.hxx:
# Needed for template
- o3tl/deleter.hxx
include/vcl/event.hxx:
# Needed for enum type
- vcl/window.hxx
include/vcl/fntstyle.hxx:
# Needed for template
- o3tl/typed_flags_set.hxx
include/vcl/help.hxx:
# Needed for template
- o3tl/typed_flags_set.hxx
include/vcl/imap.hxx:
# Needed for implicit dtor
- vcl/imapobj.hxx
......
......@@ -21,11 +21,11 @@
#include <svl/svldllapi.h>
#include <sal/types.h>
#include <o3tl/typed_flags_set.hxx>
#include <unotools/configitem.hxx>
#include <unotools/options.hxx>
#include <i18nlangtag/lang.h>
#include <memory>
namespace o3tl { template <typename T> struct typed_flags; }
// class SvtLanguageOptions ----------------------------------------------------
......
......@@ -22,6 +22,7 @@
#include <svl/svldllapi.h>
#include <rtl/ustrbuf.hxx>
#include <rtl/ustring.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <i18nlangtag/lang.h>
#include <com/sun/star/util/NumberFormat.hpp>
#include <unotools/localedatawrapper.hxx>
......@@ -36,7 +37,6 @@
namespace com { namespace sun { namespace star { namespace i18n { class XNumberFormatCode; } } } }
namespace com { namespace sun { namespace star { namespace i18n { struct Currency; } } } }
namespace com { namespace sun { namespace star { namespace i18n { struct NumberFormatCode; } } } }
namespace o3tl { template <typename T> struct typed_flags; }
class Date;
class Color;
......
......@@ -26,6 +26,7 @@
#include <com/sun/star/uno/Reference.h>
#include <unotools/unotoolsdllapi.h>
#include <unotools/options.hxx>
#include <o3tl/typed_flags_set.hxx>
namespace com{ namespace sun{ namespace star{
namespace uno{
......@@ -49,8 +50,6 @@ enum class ConfigItemMode
ReleaseTree = 0x04,
};
namespace o3tl { template <typename T> struct typed_flags; }
namespace o3tl
{
template<> struct typed_flags<ConfigItemMode> : is_typed_flags<ConfigItemMode, 0x07> {};
......
......@@ -23,12 +23,12 @@
#include <tools/solar.h>
#include <tools/fontenum.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <unordered_map>
#include <unordered_set>
#include <vector>
namespace o3tl { template <typename T> struct typed_flags; }
namespace com { namespace sun { namespace star { namespace container { class XNameAccess; } } } }
namespace com { namespace sun { namespace star { namespace lang { class XMultiServiceFactory; } } } }
......
......@@ -23,9 +23,9 @@
#include <memory>
#include <vcl/graph.hxx>
#include <vcl/dllapi.h>
#include <o3tl/typed_flags_set.hxx>
namespace com { namespace sun { namespace star { namespace graphic { class XGraphic; } } } }
namespace o3tl { template <typename T> struct typed_flags; }
// Adjustment defines
enum class GraphicAdjustmentFlags
......
......@@ -24,13 +24,12 @@
#include <vcl/outdev.hxx>
#include <vcl/vclptr.hxx>
#include <vcl/vclenum.hxx>
#include <o3tl/typed_flags_set.hxx>
namespace tools { class Rectangle; }
class Point;
class Color;
namespace o3tl { template <typename T> struct typed_flags; }
// Flags for DrawSymbol()
enum class DrawSymbolFlags
{
......
......@@ -23,8 +23,7 @@
#include <vcl/dllapi.h>
#include <vcl/syswin.hxx>
#include <memory>
namespace o3tl { template <typename T> struct typed_flags; }
#include <o3tl/typed_flags_set.hxx>
class ToolBox;
......
......@@ -24,12 +24,12 @@
#include <vcl/dllapi.h>
#include <vcl/graph.hxx>
#include <vcl/errcode.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <memory>
namespace com { namespace sun { namespace star { namespace beans { struct PropertyValue; } } } }
namespace com { namespace sun { namespace star { namespace uno { template <class E> class Sequence; } } } }
namespace o3tl { template <typename T> struct typed_flags; }
class INetURLObject;
......
......@@ -131,9 +131,6 @@ blacklist:
- com/sun/star/sheet/XSpreadsheets2.hpp
- com/sun/star/table/XTableColumns.hpp
- com/sun/star/table/XTableRows.hpp
sc/inc/dpglobal.hxx:
# base class has to be a complete type
- o3tl/typed_flags_set.hxx
sc/inc/dptabsrc.hxx:
# base class has to be a complete type
- com/sun/star/beans/XPropertySet.hpp
......@@ -168,9 +165,6 @@ blacklist:
- com/sun/star/text/XTextField.hpp
- com/sun/star/beans/XPropertySet.hpp
- com/sun/star/lang/XUnoTunnel.hpp
sc/inc/fillinfo.hxx:
# base class has to be a complete type
- o3tl/typed_flags_set.hxx
sc/inc/filtuno.hxx:
# base class has to be a complete type
- com/sun/star/beans/XPropertyAccess.hpp
......@@ -363,9 +357,6 @@ blacklist:
- com/sun/star/beans/XPropertySet.hpp
- com/sun/star/lang/XServiceInfo.hpp
- com/sun/star/sheet/XFormulaParser.hpp
sc/inc/types.hxx:
# base class has to be a complete type
- o3tl/typed_flags_set.hxx
sc/inc/unitconv.hxx:
# base class has to be a complete type
- map
......@@ -404,9 +395,6 @@ blacklist:
sc/source/filter/inc/xistream.hxx:
# Needed for implicit dtor
- com/sun/star/beans/NamedValue.hpp
sc/source/filter/inc/xlstring.hxx:
# Needed for template
- o3tl/typed_flags_set.hxx
sc/source/ui/inc/AccessibleContextBase.hxx:
# base class has to be a complete type
- com/sun/star/accessibility/XAccessibleComponent.hpp
......@@ -487,9 +475,6 @@ blacklist:
sc/source/ui/inc/RandomNumberGeneratorDialog.hxx:
# base class has to be a complete type
- viewdata.hxx
sc/source/ui/inc/scui_def.hxx:
# Needed for template
- o3tl/typed_flags_set.hxx
sc/source/ui/inc/StatisticsInputOutputDialog.hxx:
# base class has to be a complete type
- viewdata.hxx
......
......@@ -35,11 +35,10 @@
#include <memory>
#include <set>
#include <com/sun/star/uno/Sequence.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <formula/FormulaCompiler.hxx>
namespace o3tl { template <typename T> struct typed_flags; }
// constants and data types also for external modules (ScInterpreter et al)
#define MAXSTRLEN 1024 /* maximum length of input string of one symbol */
......
......@@ -22,8 +22,7 @@
#include "xiroot.hxx"
#include <mdds/flat_segment_tree.hpp>
namespace o3tl { template <typename T> struct typed_flags; }
#include <o3tl/typed_flags_set.hxx>
enum class ExcColRowFlags : sal_uInt8 {
NONE = 0x00,
......
......@@ -24,8 +24,7 @@
#include "xeroot.hxx"
#include <externalrefmgr.hxx>
#include <memory>
namespace o3tl { template <typename T> struct typed_flags; }
#include <o3tl/typed_flags_set.hxx>
struct ScSingleRefData;
struct ScComplexRefData;
......
......@@ -25,14 +25,13 @@
#include <address.hxx>
#include "csvsplits.hxx"
#include <com/sun/star/uno/Reference.hxx>
#include <o3tl/typed_flags_set.hxx>
class ScAccessibleCsvControl;
namespace com { namespace sun { namespace star { namespace accessibility {
class XAccessible;
} } } }
namespace o3tl { template <typename T> struct typed_flags; }
/** Minimum character count for a column in separators mode. */
const sal_Int32 CSV_MINCOLWIDTH = 8;
/** Maximum length of a cell string. */
......
......@@ -177,9 +177,6 @@ blacklist:
- com/sun/star/drawing/framework/XView.hpp
- com/sun/star/lang/XUnoTunnel.hpp
- com/sun/star/view/XSelectionSupplier.hpp
sd/source/ui/inc/tools/IdleDetection.hxx:
# Needed for template
- o3tl/typed_flags_set.hxx
sd/source/ui/inc/tools/PropertySet.hxx:
# base class has to be a complete type
- com/sun/star/beans/XPropertySet.hpp
......
......@@ -22,20 +22,7 @@ blacklist:
sw/inc/docfac.hxx:
# Complete type is needed by rtl::Reference<SwDoc>.
- doc.hxx
sw/inc/accmap.hxx:
- o3tl/typed_flags_set.hxx
sw/inc/crsrsh.hxx:
- o3tl/typed_flags_set.hxx
sw/inc/cshtyp.hxx:
- o3tl/typed_flags_set.hxx
sw/inc/fesh.hxx:
- o3tl/typed_flags_set.hxx
sw/inc/modcfg.hxx:
- o3tl/typed_flags_set.hxx
sw/inc/ndtyp.hxx:
- o3tl/typed_flags_set.hxx
sw/inc/swtypes.hxx:
- o3tl/typed_flags_set.hxx
# Needed for macro #define
- com/sun/star/i18n/CollatorOptions.hpp
sw/inc/doc.hxx:
......@@ -54,16 +41,6 @@ blacklist:
- utility
sw/inc/shellid.hxx:
- sfx2/shell.hxx
sw/inc/swurl.hxx:
- o3tl/typed_flags_set.hxx
sw/inc/tblenum.hxx:
- o3tl/typed_flags_set.hxx
sw/inc/tox.hxx:
- o3tl/typed_flags_set.hxx
sw/inc/undobj.hxx:
- o3tl/typed_flags_set.hxx
sw/inc/itabenum.hxx:
- o3tl/typed_flags_set.hxx
sw/inc/unosett.hxx:
# sw::UnoImplPtr typedef
- unobaseclass.hxx
......@@ -265,4 +242,3 @@ blacklist:
- vector
sw/inc/shellio.hxx:
- o3tl/deleter.hxx
- o3tl/typed_flags_set.hxx
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment