summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-18 10:10:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-18 09:25:06 +0000
commit0a840edcc19ad1b8bb1525717d91ce8ade0c0092 (patch)
tree7b868933b54e3e763bf294b463abd302be26fb4f /sw
parent3ab9cebf45e725bbd3d7828dbcf974d3bef2c32c (diff)
includes should be at the top of the file
not randomly scattered through the code found with something like: git ls-files *.cpp | xargs grep -Pzl "(?s){.*#include" Change-Id: I9c242fa4ef99e8677f2800d7ec9f16d16e488351 Reviewed-on: https://gerrit.libreoffice.org/30952 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/docary.hxx24
-rw-r--r--sw/inc/unobaseclass.hxx5
-rw-r--r--sw/source/core/doc/docnum.cxx4
-rw-r--r--sw/source/core/docnode/node.cxx3
-rw-r--r--sw/source/core/inc/flyfrm.hxx2
-rw-r--r--sw/source/core/inc/rolbck.hxx11
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx3
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx4
-rw-r--r--sw/source/ui/config/optcomp.cxx3
-rw-r--r--sw/source/ui/uno/swdetect.hxx4
-rw-r--r--sw/source/uibase/inc/FrameControl.hxx5
-rw-r--r--sw/source/uibase/shells/frmsh.cxx8
12 files changed, 36 insertions, 40 deletions
diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx
index 91ec0e749d31..45f9e4509ed3 100644
--- a/sw/inc/docary.hxx
+++ b/sw/inc/docary.hxx
@@ -32,6 +32,17 @@
#include <boost/multi_index/ordered_index.hpp>
#include <boost/multi_index/random_access_index.hpp>
+#include <swtypes.hxx>
+#include <ndarr.hxx>
+#include <charfmt.hxx>
+#include <fmtcol.hxx>
+#include <frmfmt.hxx>
+#include <section.hxx>
+#include <fldbas.hxx>
+#include <tox.hxx>
+#include <numrule.hxx>
+#include <frmfmt.hxx>
+
class SwRangeRedline;
class SwExtraRedline;
class SwUnoCursor;
@@ -44,19 +55,8 @@ namespace com { namespace sun { namespace star { namespace i18n {
struct ForbiddenCharacters; ///< comes from the I18N UNO interface
}}}}
-#include <swtypes.hxx>
-#include <ndarr.hxx>
-#include <charfmt.hxx>
-#include <fmtcol.hxx>
-#include <frmfmt.hxx>
-#include <section.hxx>
-#include <fldbas.hxx>
-#include <tox.hxx>
-#include <numrule.hxx>
-#include <frmfmt.hxx>
-/** provides some methods for generic operations on lists that contain
-SwFormat* subclasses. */
+/** provides some methods for generic operations on lists that contain SwFormat* subclasses. */
class SwFormatsBase
{
public:
diff --git a/sw/inc/unobaseclass.hxx b/sw/inc/unobaseclass.hxx
index 119bccb77875..bb2cb2aeaab6 100644
--- a/sw/inc/unobaseclass.hxx
+++ b/sw/inc/unobaseclass.hxx
@@ -25,6 +25,8 @@
#include <cppuhelper/implbase.hxx>
#include <sal/log.hxx>
+#include <osl/mutex.hxx>
+#include <vcl/svapp.hxx>
class SfxPoolItem;
class SwClient;
@@ -86,9 +88,6 @@ public:
/// helper function for implementing SwClient::Modify
void ClientModify(SwClient* pClient, const SfxPoolItem *pOld, const SfxPoolItem *pNew);
-#include <osl/mutex.hxx>
-#include <vcl/svapp.hxx>
-
namespace sw {
template<typename T>
struct UnoImplPtrDeleter
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 46b70f4a1ed8..867157f6b86b 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -59,6 +59,8 @@
#include <cstdlib>
#include <map>
+#include <stdlib.h>
+
namespace {
void lcl_ResetIndentAttrs(SwDoc *pDoc, const SwPaM &rPam, sal_uInt16 marker )
@@ -84,8 +86,6 @@ namespace {
}
}
-#include <stdlib.h>
-
inline sal_uInt8 GetUpperLvlChg( sal_uInt8 nCurLvl, sal_uInt8 nLevel, sal_uInt16 nMask )
{
if( 1 < nLevel )
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 50c6e18c7444..e267ffb0ba72 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -67,6 +67,7 @@
#include "ndole.hxx"
#include <memory>
#include <swcrsr.hxx>
+#include <svl/itemiter.hxx>
using namespace ::com::sun::star::i18n;
@@ -1454,8 +1455,6 @@ bool SwContentNode::SetAttr(const SfxPoolItem& rAttr )
return bRet;
}
-#include <svl/itemiter.hxx>
-
bool SwContentNode::SetAttr( const SfxItemSet& rSet )
{
if ( IsInCache() )
diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx
index 37b6ba8f7950..808b14a04842 100644
--- a/sw/source/core/inc/flyfrm.hxx
+++ b/sw/source/core/inc/flyfrm.hxx
@@ -23,6 +23,7 @@
#include "layfrm.hxx"
#include <list>
#include "frmfmt.hxx"
+#include <anchoredobject.hxx>
class SwPageFrame;
class SwFormatFrameSize;
@@ -36,7 +37,6 @@ class SwFlyDrawContact;
class SwFormat;
class SwViewShell;
-#include <anchoredobject.hxx>
/** search an anchor for paragraph bound frames starting from pOldAnch
diff --git a/sw/source/core/inc/rolbck.hxx b/sw/source/core/inc/rolbck.hxx
index 5476cb7be90e..07edd553dafa 100644
--- a/sw/source/core/inc/rolbck.hxx
+++ b/sw/source/core/inc/rolbck.hxx
@@ -22,7 +22,12 @@
#include <svl/itemset.hxx>
#include <tools/solar.h>
#include <vcl/keycod.hxx>
+#include <tox.hxx>
+
+#include <SwNumberTreeTypes.hxx>
+#include <IDocumentMarkAccess.hxx>
+#include <memory>
#include <vector>
#include <set>
@@ -49,12 +54,6 @@ class SwFormatChain;
class SwNode;
class SwCharFormat;
-#include <tox.hxx>
-
-#include <SwNumberTreeTypes.hxx>
-#include <IDocumentMarkAccess.hxx>
-
-#include <memory>
enum HISTORY_HINT {
HSTRY_SETFMTHNT,
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 31702553ad39..41e673c8f65b 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -35,6 +35,7 @@
#include "writerhelper.hxx"
#include "../inc/msfilter.hxx"
#include <expfld.hxx>
+#include "WW8TableInfo.hxx"
#include <vcl/graph.hxx>
@@ -125,8 +126,6 @@ typedef std::map<const css::embed::XEmbeddedObject*, sal_Int32> WW8OleMap;
struct WW8_PdAttrDesc;
class SvxBrushItem;
-#include "WW8TableInfo.hxx"
-
#define GRF_MAGIC_1 0x12 // 3 magic bytes for PicLocFc attribute
#define GRF_MAGIC_2 0x34
#define GRF_MAGIC_3 0x56
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 0a9f88b3ed1f..400f7f50b2e4 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -136,6 +136,8 @@
#include <i18nlangtag/languagetag.hxx>
#include <unotools/fltrcfg.hxx>
#include <o3tl/enumrange.hxx>
+#include <calbck.hxx>
+
using ::editeng::SvxBorderLine;
using namespace ::com::sun::star;
@@ -295,8 +297,6 @@ void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFormat, b
}
}
-#include <calbck.hxx>
-
void MSWordExportBase::GatherChapterFields()
{
//If the header/footer contains a chapter field
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index d028903d2cd6..2e72a027984b 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -34,6 +34,7 @@
#include <sfx2/fcontnr.hxx>
#include <svtools/treelistentry.hxx>
#include <IDocumentSettingAccess.hxx>
+#include <vector>
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::document;
@@ -82,8 +83,6 @@ struct CompatibilityItem
m_bIsDefault ( _bIsDefault ) {}
};
-#include <vector>
-
struct SwCompatibilityOptPage_Impl
{
typedef vector< CompatibilityItem > SwCompatibilityItemList;
diff --git a/sw/source/ui/uno/swdetect.hxx b/sw/source/ui/uno/swdetect.hxx
index aa07c87f10fc..bd5e5a6357d4 100644
--- a/sw/source/ui/uno/swdetect.hxx
+++ b/sw/source/ui/uno/swdetect.hxx
@@ -30,7 +30,7 @@
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <cppuhelper/factory.hxx>
-class SfxMedium;
+#include <sfx2/sfxuno.hxx>
namespace com
{
@@ -46,9 +46,9 @@ namespace com
}
}
-#include <sfx2/sfxuno.hxx>
class SfxMedium;
class SfxFilter;
+class SfxMedium;
class SwFilterDetect : public ::cppu::WeakImplHelper< css::document::XExtendedFilterDetection, css::lang::XServiceInfo >
{
diff --git a/sw/source/uibase/inc/FrameControl.hxx b/sw/source/uibase/inc/FrameControl.hxx
index 9cc986b89635..cae1e1eacb85 100644
--- a/sw/source/uibase/inc/FrameControl.hxx
+++ b/sw/source/uibase/inc/FrameControl.hxx
@@ -9,6 +9,9 @@
#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_FRAMECONTROL_HXX
#define INCLUDED_SW_SOURCE_UIBASE_INC_FRAMECONTROL_HXX
+#include <vcl/menubtn.hxx>
+
+
class SwEditWin;
class SwPageFrame;
class SwFrame;
@@ -44,8 +47,6 @@ public:
bool Contains( const Point &rDocPt ) const { return mpIFace->Contains( rDocPt ); }
};
-#include <vcl/menubtn.hxx>
-
/** Class sharing some MenuButton code
*/
class SwFrameMenuButtonBase : public MenuButton, public ISwFrameControl
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index 3b962a75466f..2a6ad96916c8 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -84,6 +84,10 @@
#include <svx/drawitem.hxx>
#include <memory>
+#define SwFrameShell
+#include <sfx2/msg.hxx>
+#include "swslots.hxx"
+
using ::editeng::SvxBorderLine;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -102,10 +106,6 @@ static const SwFrameFormat* lcl_GetFrameFormatByName(SwWrtShell& rSh, const OUSt
return nullptr;
}
-#define SwFrameShell
-#include <sfx2/msg.hxx>
-#include "swslots.hxx"
-
SFX_IMPL_INTERFACE(SwFrameShell, SwBaseShell)
void SwFrameShell::InitInterface_Impl()