[Libreoffice-commits] core.git: basegfx/source connectivity/source framework/source hwpfilter/source include/connectivity include/editeng include/sfx2 include/svx include/toolkit include/vcl lotuswordpro/source salhelper/qa sc/source sd/inc sd/source sfx2/source sot/source starmath/source stoc/test svx/source sw/inc sw/source uui/source vcl/android vcl/osx vcl/unx xmloff/source xmlsecurity/inc

Noel Grandin noel.grandin at collabora.co.uk
Fri Nov 18 09:25:37 UTC 2016


 basegfx/source/tuple/b2dtuple.cxx                    |    2 -
 basegfx/source/tuple/b3dtuple.cxx                    |    2 -
 connectivity/source/commontools/CommonTools.cxx      |    2 -
 framework/source/recording/dispatchrecorder.cxx      |    2 -
 hwpfilter/source/hbox.cxx                            |    3 --
 include/connectivity/IParseContext.hxx               |    4 +--
 include/editeng/editview.hxx                         |    8 +++---
 include/editeng/outliner.hxx                         |   16 ++++++------
 include/editeng/unotext.hxx                          |    3 --
 include/sfx2/frame.hxx                               |   12 ++++-----
 include/sfx2/sfxdlg.hxx                              |    3 --
 include/svx/databaselocationinput.hxx                |    5 +--
 include/svx/svdglue.hxx                              |   10 +++----
 include/svx/unoprov.hxx                              |    4 +--
 include/svx/unoshape.hxx                             |   10 +++----
 include/toolkit/helper/vclunohelper.hxx              |   19 +++++++--------
 include/vcl/svapp.hxx                                |    6 ++--
 include/vcl/texteng.hxx                              |   18 +++++++-------
 include/vcl/unohelp2.hxx                             |    2 -
 lotuswordpro/source/filter/lwpbulletstylemgr.cxx     |    2 -
 lotuswordpro/source/filter/lwpcharacterstyle.cxx     |    6 ++--
 lotuswordpro/source/filter/lwpfont.cxx               |    5 ++-
 lotuswordpro/source/filter/lwpfootnote.hxx           |    2 -
 lotuswordpro/source/filter/lwpfoundry.cxx            |    6 ++--
 lotuswordpro/source/filter/lwpfribptr.cxx            |    2 -
 lotuswordpro/source/filter/lwpgrfobj.cxx             |    4 +--
 lotuswordpro/source/filter/lwplayout.hxx             |    4 +--
 lotuswordpro/source/filter/lwplaypiece.hxx           |    9 +++----
 lotuswordpro/source/filter/lwpnumericfmt.hxx         |    2 -
 lotuswordpro/source/filter/lwppagelayout.hxx         |    4 +--
 lotuswordpro/source/filter/lwpstory.cxx              |    8 +++---
 salhelper/qa/test_api.cxx                            |   18 +++++++-------
 sc/source/filter/xml/xmlexprt.hxx                    |    7 +++--
 sc/source/ui/inc/transobj.hxx                        |    4 +--
 sd/inc/sdiocmpt.hxx                                  |    4 +--
 sd/source/ui/accessibility/AccessibleOutlineView.cxx |    8 ++----
 sd/source/ui/dlg/SpellDialogChildWindow.cxx          |    7 +----
 sd/source/ui/inc/unopage.hxx                         |    2 -
 sd/source/ui/unoidl/sddetect.hxx                     |    4 +--
 sd/source/ui/unoidl/unocpres.hxx                     |   12 ++++-----
 sd/source/ui/view/unmodpg.cxx                        |    4 +--
 sfx2/source/appl/app.cxx                             |    7 ++---
 sfx2/source/appl/newhelp.hxx                         |    9 +++----
 sfx2/source/appl/shutdownicon.cxx                    |    2 -
 sfx2/source/inc/partwnd.hxx                          |    7 +++--
 sot/source/sdstor/storage.cxx                        |    6 ++--
 starmath/source/smdetect.hxx                         |    4 +--
 stoc/test/testsmgr_cpnt.cxx                          |    4 +--
 svx/source/svdraw/svdedtv.cxx                        |    6 ++--
 svx/source/toolbars/fontworkbar.cxx                  |    9 +++----
 svx/source/unodraw/unoshap2.cxx                      |    5 +--
 svx/source/unodraw/unoshap3.cxx                      |    3 --
 sw/inc/docary.hxx                                    |   24 +++++++++----------
 sw/inc/unobaseclass.hxx                              |    5 +--
 sw/source/core/doc/docnum.cxx                        |    4 +--
 sw/source/core/docnode/node.cxx                      |    3 --
 sw/source/core/inc/flyfrm.hxx                        |    2 -
 sw/source/core/inc/rolbck.hxx                        |   11 +++-----
 sw/source/filter/ww8/wrtww8.hxx                      |    3 --
 sw/source/filter/ww8/ww8atr.cxx                      |    4 +--
 sw/source/ui/config/optcomp.cxx                      |    3 --
 sw/source/ui/uno/swdetect.hxx                        |    4 +--
 sw/source/uibase/inc/FrameControl.hxx                |    5 ++-
 sw/source/uibase/shells/frmsh.cxx                    |    8 +++---
 uui/source/secmacrowarnings.hxx                      |    4 ---
 vcl/android/androidinst.cxx                          |    3 --
 vcl/osx/salinst.cxx                                  |    8 +++---
 vcl/unx/generic/gdi/cairo_xlib_cairo.cxx             |    6 ++--
 vcl/unx/kde4/KDE4FilePicker.cxx                      |   19 +++++++--------
 xmloff/source/draw/propimp0.cxx                      |    3 --
 xmloff/source/text/XMLTextNumRuleInfo.hxx            |    2 -
 xmlsecurity/inc/certificatechooser.hxx               |    6 ++--
 72 files changed, 213 insertions(+), 231 deletions(-)

New commits:
commit 0a840edcc19ad1b8bb1525717d91ce8ade0c0092
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Fri Nov 18 10:10:48 2016 +0200

    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 at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/basegfx/source/tuple/b2dtuple.cxx b/basegfx/source/tuple/b2dtuple.cxx
index 14be758..4a10786 100644
--- a/basegfx/source/tuple/b2dtuple.cxx
+++ b/basegfx/source/tuple/b2dtuple.cxx
@@ -18,11 +18,11 @@
  */
 
 #include <basegfx/tuple/b2dtuple.hxx>
+#include <basegfx/tuple/b2ituple.hxx>
 #include <basegfx/numeric/ftools.hxx>
 #include <rtl/instance.hxx>
 
 namespace { struct EmptyTuple : public rtl::Static<basegfx::B2DTuple, EmptyTuple> {}; }
-#include <basegfx/tuple/b2ituple.hxx>
 
 namespace basegfx
 {
diff --git a/basegfx/source/tuple/b3dtuple.cxx b/basegfx/source/tuple/b3dtuple.cxx
index 4fd31fc..9d20e1b 100644
--- a/basegfx/source/tuple/b3dtuple.cxx
+++ b/basegfx/source/tuple/b3dtuple.cxx
@@ -18,10 +18,10 @@
  */
 
 #include <basegfx/tuple/b3dtuple.hxx>
+#include <basegfx/tuple/b3ituple.hxx>
 #include <rtl/instance.hxx>
 
 namespace { struct EmptyTuple : public rtl::Static<basegfx::B3DTuple, EmptyTuple> {}; }
-#include <basegfx/tuple/b3ituple.hxx>
 
 namespace basegfx
 {
diff --git a/connectivity/source/commontools/CommonTools.cxx b/connectivity/source/commontools/CommonTools.cxx
index 33962c6..30f8538 100644
--- a/connectivity/source/commontools/CommonTools.cxx
+++ b/connectivity/source/commontools/CommonTools.cxx
@@ -35,6 +35,7 @@
 #include <jvmaccess/virtualmachine.hxx>
 #endif
 #include <rtl/process.h>
+#include <ctype.h>
 
 using namespace ::comphelper;
 inline sal_Unicode rtl_ascii_toUpperCase( sal_Unicode ch )
@@ -166,7 +167,6 @@ namespace connectivity
 #endif
 }
 
-#include <ctype.h>
 namespace dbtools
 {
 
diff --git a/framework/source/recording/dispatchrecorder.cxx b/framework/source/recording/dispatchrecorder.cxx
index b4298ed..aca5335 100644
--- a/framework/source/recording/dispatchrecorder.cxx
+++ b/framework/source/recording/dispatchrecorder.cxx
@@ -24,6 +24,7 @@
 #include <services.h>
 #include <vcl/svapp.hxx>
 #include <comphelper/processfactory.hxx>
+#include <typelib/typedescription.h>
 
 using namespace ::com::sun::star::uno;
 
@@ -46,7 +47,6 @@ DEFINE_INIT_SERVICE(
     }
 )
 
-#include <typelib/typedescription.h>
 
 void flatten_struct_members(
     ::std::vector< Any > * vec, void const * data,
diff --git a/hwpfilter/source/hbox.cxx b/hwpfilter/source/hbox.cxx
index bd30edc..da9e206 100644
--- a/hwpfilter/source/hbox.cxx
+++ b/hwpfilter/source/hbox.cxx
@@ -30,6 +30,7 @@
 #include "htags.h"
 #include "drawdef.h"
 #include "hcode.h"
+#include "datecode.h"
 
 #include <rtl/character.hxx>
 
@@ -140,8 +141,6 @@ DateCode::DateCode()
 {
 }
 
-#include "datecode.h"
-
 static const hchar kor_week[] =
 {
     0xB7A9, 0xB6A9, 0xD1C1, 0xAE81, 0xA1A2, 0x8B71, 0xC9A1
diff --git a/include/connectivity/IParseContext.hxx b/include/connectivity/IParseContext.hxx
index 5c52340..53c09f5 100644
--- a/include/connectivity/IParseContext.hxx
+++ b/include/connectivity/IParseContext.hxx
@@ -19,12 +19,12 @@
 #ifndef INCLUDED_CONNECTIVITY_IPARSECONTEXT_HXX
 #define INCLUDED_CONNECTIVITY_IPARSECONTEXT_HXX
 
-namespace connectivity { class OSQLParseNode; }
-
 #include <rtl/ustring.hxx>
 #include <com/sun/star/lang/Locale.hpp>
 #include <connectivity/dbtoolsdllapi.hxx>
 
+namespace connectivity { class OSQLParseNode; }
+
 namespace connectivity
 {
 
diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx
index 5653c45..361558b 100644
--- a/include/editeng/editview.hxx
+++ b/include/editeng/editview.hxx
@@ -31,6 +31,10 @@
 #include <editeng/editstat.hxx>
 #include <svl/languageoptions.hxx>
 #include <LibreOfficeKit/LibreOfficeKitTypes.h>
+#include <editeng/editdata.hxx>
+#include <com/sun/star/uno/Reference.h>
+#include <editeng/editengdllapi.h>
+
 
 class EditEngine;
 class ImpEditEngine;
@@ -55,10 +59,6 @@ namespace vcl { class Font; }
 class FontList;
 class OutputDevice;
 
-#include <editeng/editdata.hxx>
-#include <com/sun/star/uno/Reference.h>
-#include <editeng/editengdllapi.h>
-
 namespace com {
 namespace sun {
 namespace star {
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 25241c5..dad3d11 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -39,6 +39,14 @@
 #include <svtools/grfmgr.hxx>
 
 #include <LibreOfficeKit/LibreOfficeKitTypes.h>
+#include <com/sun/star/uno/Reference.h>
+
+#include <rtl/ref.hxx>
+#include <editeng/svxfont.hxx>
+#include <editeng/eedata.hxx>
+#include <editeng/paragraphdata.hxx>
+#include <o3tl/typed_flags_set.hxx>
+
 
 #include <functional>
 #include <vector>
@@ -81,14 +89,6 @@ namespace svl
     class IUndoManager;
 }
 
-#include <com/sun/star/uno/Reference.h>
-
-#include <rtl/ref.hxx>
-#include <editeng/svxfont.hxx>
-#include <editeng/eedata.hxx>
-#include <editeng/paragraphdata.hxx>
-#include <o3tl/typed_flags_set.hxx>
-
 class SvxFieldData;
 
 
diff --git a/include/editeng/unotext.hxx b/include/editeng/unotext.hxx
index 518a0bd..fd0ecce 100644
--- a/include/editeng/unotext.hxx
+++ b/include/editeng/unotext.hxx
@@ -23,6 +23,7 @@
 #include <com/sun/star/container/XNameContainer.hpp>
 #include <com/sun/star/text/XTextRange.hpp>
 #include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/text/XTextContent.hpp>
 #include <com/sun/star/container/XEnumerationAccess.hpp>
 #include <com/sun/star/text/XTextRangeMover.hpp>
 #include <com/sun/star/text/XTextCursor.hpp>
@@ -498,8 +499,6 @@ public:
 };
 
 
-#include <com/sun/star/text/XTextContent.hpp>
-
 class SvxUnoTextContent : public SvxUnoTextRangeBase,
                           public css::text::XTextContent,
                           public css::container::XEnumerationAccess,
diff --git a/include/sfx2/frame.hxx b/include/sfx2/frame.hxx
index e08c8bf..2df3fcd 100644
--- a/include/sfx2/frame.hxx
+++ b/include/sfx2/frame.hxx
@@ -25,6 +25,12 @@
 #include <com/sun/star/uno/Reference.h>
 #include <com/sun/star/uno/Any.hxx>
 #include <vcl/vclptr.hxx>
+#include <comphelper/namedvaluecollection.hxx>
+#include <rtl/ustring.hxx>
+#include <svl/poolitem.hxx>
+#include <tools/ref.hxx>
+#include <vector>
+
 
 namespace com
 {
@@ -51,12 +57,6 @@ namespace com
     }
 }
 
-#include <comphelper/namedvaluecollection.hxx>
-#include <rtl/ustring.hxx>
-#include <svl/poolitem.hxx>
-#include <tools/ref.hxx>
-#include <vector>
-
 class SvBorder;
 class SfxWorkWindow;
 namespace vcl { class Window; }
diff --git a/include/sfx2/sfxdlg.hxx b/include/sfx2/sfxdlg.hxx
index f14f9b3..b1ca637 100644
--- a/include/sfx2/sfxdlg.hxx
+++ b/include/sfx2/sfxdlg.hxx
@@ -29,6 +29,7 @@
 
 #include <sot/exchange.hxx>
 #include <sfx2/lnkbase.hxx>
+#include <sfx2/tabdlg.hxx>
 #include <com/sun/star/uno/Any.hxx>
 #include <com/sun/star/uno/Reference.h>
 
@@ -45,8 +46,6 @@ class SvObjectServerList;
 class TransferableDataHelper;
 struct TransferableObjectDescriptor;
 
-#include <sfx2/tabdlg.hxx>
-
 namespace sfx2
 {
     class LinkManager;
diff --git a/include/svx/databaselocationinput.hxx b/include/svx/databaselocationinput.hxx
index a534f6d..b20846c 100644
--- a/include/svx/databaselocationinput.hxx
+++ b/include/svx/databaselocationinput.hxx
@@ -23,11 +23,10 @@
 #include <svx/svxdllapi.h>
 #include <com/sun/star/uno/XComponentContext.hpp>
 
-class PushButton;
-namespace svt { class OFileURLControl; }
-
 #include <memory>
 
+class PushButton;
+namespace svt { class OFileURLControl; }
 
 namespace svx
 {
diff --git a/include/svx/svdglue.hxx b/include/svx/svdglue.hxx
index 94989ae..1543e0e 100644
--- a/include/svx/svdglue.hxx
+++ b/include/svx/svdglue.hxx
@@ -20,16 +20,16 @@
 #ifndef INCLUDED_SVX_SVDGLUE_HXX
 #define INCLUDED_SVX_SVDGLUE_HXX
 
-namespace vcl { class Window; }
-class OutputDevice;
-class SvStream;
-class SdrObject;
-
 #include <tools/gen.hxx>
 #include <svx/svxdllapi.h>
 #include <vector>
 #include <o3tl/typed_flags_set.hxx>
 
+namespace vcl { class Window; }
+class OutputDevice;
+class SvStream;
+class SdrObject;
+
 
 enum class SdrEscapeDirection
 {
diff --git a/include/svx/unoprov.hxx b/include/svx/unoprov.hxx
index 503d439..f8795e6 100644
--- a/include/svx/unoprov.hxx
+++ b/include/svx/unoprov.hxx
@@ -24,6 +24,8 @@
 #include <com/sun/star/uno/Sequence.hxx>
 #include <svl/itemprop.hxx>
 #include <svx/svxdllapi.h>
+#include <editeng/unoipset.hxx>
+
 
 class SvxItemPropertySet;
 class SfxItemPool;
@@ -98,8 +100,6 @@ const sal_Int16 OBJ_OLE2_PLUGIN = 101;
 
 #define E3D_INVENTOR_FLAG           (0x80000000)
 
-#include <editeng/unoipset.hxx>
-
 /**
  * class SvxPropertySetInfoPool
  */
diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx
index 4d23f15..8bf31b5 100644
--- a/include/svx/unoshape.hxx
+++ b/include/svx/unoshape.hxx
@@ -41,6 +41,9 @@
 #include <com/sun/star/container/XChild.hpp>
 #include <com/sun/star/beans/XMultiPropertySet.hpp>
 #include <com/sun/star/beans/XMultiPropertyStates.hpp>
+#include <com/sun/star/drawing/XConnectorShape.hpp>
+#include <com/sun/star/drawing/XControlShape.hpp>
+#include <basegfx/polygon/b2dpolypolygon.hxx>
 #include <sal/types.h>
 #include <tools/weakbase.hxx>
 #include <svl/lstner.hxx>
@@ -52,6 +55,7 @@
 #include <svx/svxdllapi.h>
 #include <rtl/ref.hxx>
 #include <com/sun/star/uno/Any.hxx>
+#include <editeng/unotext.hxx>
 
 #include <svx/svdouno.hxx>
 
@@ -314,8 +318,6 @@ private:
     SVX_DLLPRIVATE void impl_construct();
 };
 
-#include <editeng/unotext.hxx>
-
 class SVX_DLLPUBLIC SvxShapeText : public SvxShape, public SvxUnoTextBase
 {
 protected:
@@ -437,7 +439,6 @@ public:
     // XTypeProvider
     virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw(css::uno::RuntimeException, std::exception) override;
 };
-#include <com/sun/star/drawing/XConnectorShape.hpp>
 
 /***********************************************************************
 *                                                                      *
@@ -474,7 +475,6 @@ public:
     virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes(  ) throw(css::uno::RuntimeException, std::exception) override;
     virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw(css::uno::RuntimeException, std::exception) override;
 };
-#include <com/sun/star/drawing/XControlShape.hpp>
 
 /***********************************************************************
 *                                                                      *
@@ -568,8 +568,6 @@ public:
 };
 
 
-#include <basegfx/polygon/b2dpolypolygon.hxx>
-
 /***********************************************************************
 *                                                                      *
 ***********************************************************************/
diff --git a/include/toolkit/helper/vclunohelper.hxx b/include/toolkit/helper/vclunohelper.hxx
index bd02d6a..c9b062e 100644
--- a/include/toolkit/helper/vclunohelper.hxx
+++ b/include/toolkit/helper/vclunohelper.hxx
@@ -28,6 +28,16 @@
 #include <com/sun/star/awt/FontSlant.hpp>
 #include <com/sun/star/awt/MouseEvent.hpp>
 
+#include <vcl/bitmapex.hxx>
+#include <vcl/region.hxx>
+#include <vcl/metric.hxx>
+#include <vcl/vclptr.hxx>
+#include <vcl/window.hxx>
+#include <tools/mapunit.hxx>
+#include <tools/fldunit.hxx>
+#include <tools/poly.hxx>
+
+
 namespace com { namespace sun { namespace star { namespace uno {
     class XInterface;
 }}}}
@@ -53,15 +63,6 @@ namespace com { namespace sun { namespace star { namespace awt {
 }}}}
 
 
-#include <vcl/bitmapex.hxx>
-#include <vcl/region.hxx>
-#include <vcl/metric.hxx>
-#include <vcl/vclptr.hxx>
-#include <vcl/window.hxx>
-#include <tools/mapunit.hxx>
-#include <tools/fldunit.hxx>
-#include <tools/poly.hxx>
-
 class OutputDevice;
 class MouseEvent;
 class KeyEvent;
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 23d6e69..2719224 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -41,6 +41,9 @@
 #include <vcl/metric.hxx>
 #include <unotools/localedatawrapper.hxx>
 #include <o3tl/typed_flags_set.hxx>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/connection/XConnection.hpp>
+
 
 class BitmapEx;
 class AllSettings;
@@ -61,9 +64,6 @@ class ScrollEvent;
 struct ImplSVEvent;
 struct ConvertData;
 
-#include <com/sun/star/uno/Reference.h>
-#include <com/sun/star/connection/XConnection.hpp>
-
 namespace com {
 namespace sun {
 namespace star {
diff --git a/include/vcl/texteng.hxx b/include/vcl/texteng.hxx
index 5d18075..96ac426 100644
--- a/include/vcl/texteng.hxx
+++ b/include/vcl/texteng.hxx
@@ -21,6 +21,15 @@
 
 #include <vcl/dllapi.h>
 #include <vcl/vclptr.hxx>
+#include <rtl/ustring.hxx>
+#include <svl/SfxBroadcaster.hxx>
+#include <tools/lineend.hxx>
+#include <tools/link.hxx>
+#include <tools/gen.hxx>
+#include <vcl/font.hxx>
+
+#include <com/sun/star/lang/Locale.hpp>
+#include <com/sun/star/uno/Reference.hxx>
 
 class TextDoc;
 class TextView;
@@ -47,15 +56,6 @@ namespace svl
 
 class TextLine;
 class TETextPortion;
-#include <rtl/ustring.hxx>
-#include <svl/SfxBroadcaster.hxx>
-#include <tools/lineend.hxx>
-#include <tools/link.hxx>
-#include <tools/gen.hxx>
-#include <vcl/font.hxx>
-
-#include <com/sun/star/lang/Locale.hpp>
-#include <com/sun/star/uno/Reference.hxx>
 
 struct TEIMEInfos;
 class SvtCTLOptions;
diff --git a/include/vcl/unohelp2.hxx b/include/vcl/unohelp2.hxx
index 84d08c5..0b33c18 100644
--- a/include/vcl/unohelp2.hxx
+++ b/include/vcl/unohelp2.hxx
@@ -24,11 +24,11 @@
 #include <cppuhelper/weak.hxx>
 #include <rtl/ustring.hxx>
 #include <osl/mutex.hxx>
+#include <vcl/dllapi.h>
 
 namespace com { namespace sun { namespace star { namespace datatransfer { namespace clipboard {
     class XClipboard;
 } } } } }
-#include <vcl/dllapi.h>
 
 namespace vcl { namespace unohelper {
 
diff --git a/lotuswordpro/source/filter/lwpbulletstylemgr.cxx b/lotuswordpro/source/filter/lwpbulletstylemgr.cxx
index 5bc408a..2366b31 100644
--- a/lotuswordpro/source/filter/lwpbulletstylemgr.cxx
+++ b/lotuswordpro/source/filter/lwpbulletstylemgr.cxx
@@ -70,6 +70,7 @@
 #include "xfilter/xfstylemanager.hxx"
 #include "xfilter/xflist.hxx"
 #include "lwpglobalmgr.hxx"
+#include "xfilter/xflistitem.hxx"
 
 LwpBulletStyleMgr::LwpBulletStyleMgr()
     : m_pFoundry(nullptr)
@@ -242,7 +243,6 @@ OUString LwpBulletStyleMgr::RegisterBulletStyle(LwpPara* pPara, LwpBulletOverrid
 
 }
 
-#include "xfilter/xflistitem.hxx"
 //Create nested XFList and XFItems and then add it to XFContentContainer(pCont)
 //Return the inner XFItem created.
 XFContentContainer* LwpBulletStyleMgr::AddBulletList(
diff --git a/lotuswordpro/source/filter/lwpcharacterstyle.cxx b/lotuswordpro/source/filter/lwpcharacterstyle.cxx
index 650cf10..ba4303a3 100644
--- a/lotuswordpro/source/filter/lwpcharacterstyle.cxx
+++ b/lotuswordpro/source/filter/lwpcharacterstyle.cxx
@@ -66,6 +66,9 @@
 #include "lwpfont.hxx"
 #include "lwpfoundry.hxx"
 #include "lwpcharborderoverride.hxx"
+#include "xfilter/xfparastyle.hxx"
+#include "xfilter/xffont.hxx"
+
 
 /*class LwpTextStyle*/
 LwpTextStyle::LwpTextStyle(LwpObjectHeader& objHdr, LwpSvStream* pStrm)
@@ -158,9 +161,6 @@ void LwpTextStyle::ReadCommon()
 
 }
 
-#include "xfilter/xfparastyle.hxx"
-#include "xfilter/xffont.hxx"
-
 void LwpTextStyle::RegisterStyle()
 {
     if (!m_pFoundry)
diff --git a/lotuswordpro/source/filter/lwpfont.cxx b/lotuswordpro/source/filter/lwpfont.cxx
index 6d2bf8c..9877207 100644
--- a/lotuswordpro/source/filter/lwpfont.cxx
+++ b/lotuswordpro/source/filter/lwpfont.cxx
@@ -58,6 +58,8 @@
 #include "xfilter/xfstylemanager.hxx"
 #include "xfilter/xffontfactory.hxx"
 #include "xfilter/xftextstyle.hxx"
+#include "xfilter/xfdefs.hxx"
+#include "xfilter/xfcolor.hxx"
 
 void LwpFontAttrEntry::Read(LwpObjectStream *pStrm)
 {
@@ -71,7 +73,6 @@ void LwpFontAttrEntry::Read(LwpObjectStream *pStrm)
     pStrm->SkipExtra();
 }
 
-#include "xfilter/xfdefs.hxx"
 void LwpFontAttrEntry::Override( rtl::Reference<XFFont> const & pFont )
 {
     if (IsBoldOverridden())
@@ -293,7 +294,7 @@ void LwpFontNameEntry::Read(LwpObjectStream *pStrm)
     m_nAltFaceName = pStrm->QuickReaduInt16();
     pStrm->SkipExtra();
 }
-#include "xfilter/xfcolor.hxx"
+
 void LwpFontNameEntry::Override(rtl::Reference<XFFont> const & pFont)
 {
     if (IsPointSizeOverridden())
diff --git a/lotuswordpro/source/filter/lwpfootnote.hxx b/lotuswordpro/source/filter/lwpfootnote.hxx
index 54047f5..5966994 100644
--- a/lotuswordpro/source/filter/lwpfootnote.hxx
+++ b/lotuswordpro/source/filter/lwpfootnote.hxx
@@ -65,6 +65,7 @@
 #include "lwpobj.hxx"
 #include "lwpsection.hxx"
 #include "lwpborderstuff.hxx"
+#include "lwptable.hxx"
 
 // Footnote types are built up from these numbers
 #define FN_MASK_ENDNOTE         0x80
@@ -147,7 +148,6 @@ private:
 /**
  * @brief VO_FOOTNOTETABLE object
 */
-#include "lwptable.hxx"
 class LwpFootnoteTable : public LwpTable
 {
 public:
diff --git a/lotuswordpro/source/filter/lwpfoundry.cxx b/lotuswordpro/source/filter/lwpfoundry.cxx
index d7dde9f..6591db0 100644
--- a/lotuswordpro/source/filter/lwpfoundry.cxx
+++ b/lotuswordpro/source/filter/lwpfoundry.cxx
@@ -69,6 +69,9 @@
 #include "lwpsection.hxx"
 #include "lwpcharacterstyle.hxx"
 #include "lwpglobalmgr.hxx"
+#include "xfilter/xfstylemanager.hxx"
+#include "lwplayout.hxx"
+
 
 #include <osl/diagnose.h>
 
@@ -170,9 +173,6 @@ void LwpFoundry::ReadStyles(LwpObjectStream *pStrm)
 
 }
 
-#include "xfilter/xfstylemanager.hxx"
-#include "lwplayout.hxx"
-
 void LwpFoundry::RegisterAllLayouts()
 {
     if (m_bRegisteredAll)
diff --git a/lotuswordpro/source/filter/lwpfribptr.cxx b/lotuswordpro/source/filter/lwpfribptr.cxx
index af7b520..f6e6f62 100644
--- a/lotuswordpro/source/filter/lwpfribptr.cxx
+++ b/lotuswordpro/source/filter/lwpfribptr.cxx
@@ -82,6 +82,7 @@
 #include "xfilter/xfchange.hxx"
 #include "lwpchangemgr.hxx"
 #include "lwpglobalmgr.hxx"
+#include "lwpdropcapmgr.hxx"
 
 LwpFribPtr::LwpFribPtr()
     : m_pFribs(nullptr),m_pXFPara(nullptr),m_pPara(nullptr)
@@ -142,7 +143,6 @@ void LwpFribPtr::ReadPara(LwpObjectStream* pObjStrm)
     }
 }
 
-#include "lwpdropcapmgr.hxx"
 void LwpFribPtr::XFConvert()
 {
     LwpFrib* pFrib = m_pFribs;
diff --git a/lotuswordpro/source/filter/lwpgrfobj.cxx b/lotuswordpro/source/filter/lwpgrfobj.cxx
index 9d8903c..882f7d2 100644
--- a/lotuswordpro/source/filter/lwpgrfobj.cxx
+++ b/lotuswordpro/source/filter/lwpgrfobj.cxx
@@ -68,6 +68,8 @@
 #include "bento.hxx"
 
 #include "lwpglobalmgr.hxx"
+#include "lwpframelayout.hxx"
+
 #include "xfilter/xfframe.hxx"
 #include "xfilter/xfimage.hxx"
 #include "xfilter/xfimagestyle.hxx"
@@ -231,8 +233,6 @@ void LwpGraphicObject::XFConvert (XFContentContainer* pCont)
     }
 }
 
-#include "lwpframelayout.hxx"
-
 /**
  * @descr   judge if the graphic format is what we can support: bmp, jpg, wmf, gif, tgf(tif). other format will be filtered to
  *  these formats by Word Pro.
diff --git a/lotuswordpro/source/filter/lwplayout.hxx b/lotuswordpro/source/filter/lwplayout.hxx
index 70ab7cd..055a0e2 100644
--- a/lotuswordpro/source/filter/lwplayout.hxx
+++ b/lotuswordpro/source/filter/lwplayout.hxx
@@ -83,6 +83,8 @@
 #include "xfilter/xfframe.hxx"
 #include "xfilter/xfbgimage.hxx"
 #include "lwpusewhen.hxx"
+#include "lwplaypiece.hxx"
+
 
 #define FIRST_LAYOUTPAGENO  0x0001
 #define LAST_LAYOUTPAGENO       0xffff
@@ -326,8 +328,6 @@ private:
     LwpAtomHolder* m_pContentStyle;
 };
 
-#include "lwplaypiece.hxx"
-
 class LwpMiddleLayout : public LwpVirtualLayout
 {
 public:
diff --git a/lotuswordpro/source/filter/lwplaypiece.hxx b/lotuswordpro/source/filter/lwplaypiece.hxx
index 76ea400..0eb7f40 100644
--- a/lotuswordpro/source/filter/lwplaypiece.hxx
+++ b/lotuswordpro/source/filter/lwplaypiece.hxx
@@ -63,6 +63,10 @@
 
 #include "lwppiece.hxx"
 #include "lwpbasetype.hxx"
+#include "lwpmargins.hxx"
+#include "lwpborderstuff.hxx"
+#include "lwpshadow.hxx"
+
 
 class LwpRotor
 {
@@ -127,8 +131,6 @@ private:
     virtual ~LwpLayoutScale() override;
 };
 
-#include "lwpmargins.hxx"
-
 class LwpLayoutMargins : public LwpVirtualPiece
 {
 public:
@@ -146,7 +148,6 @@ private:
     virtual ~LwpLayoutMargins() override;
 };
 
-#include "lwpborderstuff.hxx"
 class LwpLayoutBorder : public LwpVirtualPiece
 {
 public:
@@ -305,8 +306,6 @@ private:
     virtual ~LwpLayoutJoins() override;
 };
 
-#include "lwpshadow.hxx"
-
 class LwpLayoutShadow : public LwpVirtualPiece
 {
 public:
diff --git a/lotuswordpro/source/filter/lwpnumericfmt.hxx b/lotuswordpro/source/filter/lwpnumericfmt.hxx
index 890c3a4..3b5021f 100644
--- a/lotuswordpro/source/filter/lwpnumericfmt.hxx
+++ b/lotuswordpro/source/filter/lwpnumericfmt.hxx
@@ -64,6 +64,7 @@
 #include "lwpatomholder.hxx"
 #include "lwptblcell.hxx"
 #include "lwpcolor.hxx"
+#include "lwppiece.hxx"
 
 //For converting to xml
 #include "xfilter/xfnumberstyle.hxx"
@@ -295,7 +296,6 @@ LwpNumericFormat::IsNegativeOverridden()
     return (cFlags & NF_OVER_NEGATIVE) != 0;
 }
 
-#include "lwppiece.hxx"
 class LwpLayoutNumerics : public LwpVirtualPiece
 {
 public:
diff --git a/lotuswordpro/source/filter/lwppagelayout.hxx b/lotuswordpro/source/filter/lwppagelayout.hxx
index a271ea5..5852bc9 100644
--- a/lotuswordpro/source/filter/lwppagelayout.hxx
+++ b/lotuswordpro/source/filter/lwppagelayout.hxx
@@ -58,6 +58,8 @@
 #define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPPAGELAYOUT_HXX
 
 #include "lwplayout.hxx"
+#include "xfilter/xfmasterpage.hxx"
+
 
 class LwpHeaderLayout;
 class LwpFooterLayout;
@@ -106,8 +108,6 @@ public:
     LwpPara* GetPagePosition();
 };
 
-#include "xfilter/xfmasterpage.hxx"
-
 class LwpHeaderLayout: public LwpPlacableLayout
 {
 public:
diff --git a/lotuswordpro/source/filter/lwpstory.cxx b/lotuswordpro/source/filter/lwpstory.cxx
index ee7031a..45827b9 100644
--- a/lotuswordpro/source/filter/lwpstory.cxx
+++ b/lotuswordpro/source/filter/lwpstory.cxx
@@ -63,6 +63,10 @@
 #include "lwpglobalmgr.hxx"
 #include "lwpstory.hxx"
 #include "xfilter/xfstylemanager.hxx"
+#include "lwppara.hxx"
+#include "lwpobjfactory.hxx"
+#include "lwppagelayout.hxx"
+
 
 LwpStory::LwpStory(LwpObjectHeader &objHdr, LwpSvStream* pStrm)
     : LwpContent(objHdr, pStrm)
@@ -88,9 +92,6 @@ void LwpStory::Read()
     m_pObjStrm->SkipExtra();
 }
 
-#include "lwppara.hxx"
-#include "lwpobjfactory.hxx"
-
 /**************************************************************************
  * @descr:   Convert all the contents in current story
 **************************************************************************/
@@ -148,7 +149,6 @@ void LwpStory::Parse(IXFStream* pOutputStream)
     m_pXFContainer = nullptr;
 }
 
-#include "lwppagelayout.hxx"
 /**************************************************************************
  * @descr:   Set current page layout. If pPageLayout is a mirror page layout,
              use odd child page layout as current page layout.
diff --git a/salhelper/qa/test_api.cxx b/salhelper/qa/test_api.cxx
index 33a3c94..20626d9 100644
--- a/salhelper/qa/test_api.cxx
+++ b/salhelper/qa/test_api.cxx
@@ -21,6 +21,15 @@
 
 #include <typeinfo>
 
+#include "osl/mutex.hxx"
+#include "salhelper/condition.hxx"
+#include "salhelper/dynload.hxx"
+#include "salhelper/simplereferenceobject.hxx"
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/plugin/TestPlugIn.h>
+#include <memory>
+
 namespace salhelper {
     class Condition;
     class ConditionModifier;
@@ -48,15 +57,6 @@ std::type_info const & getSimpleReferenceObjectTypeInfo()
 
 }
 
-#include "osl/mutex.hxx"
-#include "salhelper/condition.hxx"
-#include "salhelper/dynload.hxx"
-#include "salhelper/simplereferenceobject.hxx"
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/plugin/TestPlugIn.h>
-#include <memory>
-
 namespace {
 
 class DerivedCondition: public salhelper::Condition {
diff --git a/sc/source/filter/xml/xmlexprt.hxx b/sc/source/filter/xml/xmlexprt.hxx
index 7c56d4e..7e40ae1 100644
--- a/sc/source/filter/xml/xmlexprt.hxx
+++ b/sc/source/filter/xml/xmlexprt.hxx
@@ -29,13 +29,14 @@
 
 #include "address.hxx"
 
+#include <memory>
+#include <unordered_map>
+
+
 namespace com { namespace sun { namespace star {
     namespace beans { class XPropertySet; }
 } } }
 
-#include <memory>
-#include <unordered_map>
-
 class ScOutlineArray;
 class SvXMLExportPropertyMapper;
 class ScMyMergedRangesContainer;
diff --git a/sc/source/ui/inc/transobj.hxx b/sc/source/ui/inc/transobj.hxx
index 350a11f..593a5e0 100644
--- a/sc/source/ui/inc/transobj.hxx
+++ b/sc/source/ui/inc/transobj.hxx
@@ -23,6 +23,8 @@
 #include <svtools/transfer.hxx>
 #include "global.hxx"
 #include "address.hxx"
+#include <sfx2/objsh.hxx>
+
 
 class ScDocShell;
 class ScMarkData;
@@ -35,8 +37,6 @@ namespace com { namespace sun { namespace star {
     }
 }}}
 
-#include <sfx2/objsh.hxx>
-
 class ScTransferObj : public TransferableHelper
 {
 private:
diff --git a/sd/inc/sdiocmpt.hxx b/sd/inc/sdiocmpt.hxx
index 4016b57..d91c339 100644
--- a/sd/inc/sdiocmpt.hxx
+++ b/sd/inc/sdiocmpt.hxx
@@ -21,6 +21,8 @@
 #define INCLUDED_SD_INC_SDIOCMPT_HXX
 
 #include <tools/stream.hxx>
+#include "sddllapi.h"
+
 
 class old_SdrDownCompat
 {
@@ -41,8 +43,6 @@ public:
     void  CloseSubRecord();
 };
 
-#include "sddllapi.h"
-
 #define SDIOCOMPAT_VERSIONDONTKNOW (sal_uInt16)0xffff
 
 class SD_DLLPUBLIC SdIOCompat : public old_SdrDownCompat
diff --git a/sd/source/ui/accessibility/AccessibleOutlineView.cxx b/sd/source/ui/accessibility/AccessibleOutlineView.cxx
index ba187e8..fe40b86 100644
--- a/sd/source/ui/accessibility/AccessibleOutlineView.cxx
+++ b/sd/source/ui/accessibility/AccessibleOutlineView.cxx
@@ -44,13 +44,13 @@
 #include "View.hxx"
 #include "AccessibleOutlineView.hxx"
 #include "AccessibleOutlineEditSource.hxx"
-
-#include <memory>
-
+#include <drawdoc.hxx>
 #include "accessibility.hrc"
 #include "sdresid.hxx"
 #include <osl/mutex.hxx>
 
+#include <memory>
+
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::accessibility;
 
@@ -131,8 +131,6 @@ uno::Reference<XAccessible> SAL_CALL
     return maTextHelper.GetChild(nIndex);
 }
 
-#include <drawdoc.hxx>
-
 OUString SAL_CALL
     AccessibleOutlineView::getAccessibleName()
     throw (css::uno::RuntimeException, std::exception)
diff --git a/sd/source/ui/dlg/SpellDialogChildWindow.cxx b/sd/source/ui/dlg/SpellDialogChildWindow.cxx
index 12a59ec..ca88b37 100644
--- a/sd/source/ui/dlg/SpellDialogChildWindow.cxx
+++ b/sd/source/ui/dlg/SpellDialogChildWindow.cxx
@@ -20,11 +20,6 @@
 #include "SpellDialogChildWindow.hxx"
 #include <svx/svxids.hrc>
 
-namespace sd{
-
-SFX_IMPL_CHILDWINDOW_WITHID(SpellDialogChildWindow, SID_SPELL_DIALOG)
-}
-
 #include "ViewShell.hxx"
 #include "ViewShellBase.hxx"
 #include "DrawViewShell.hxx"
@@ -34,6 +29,8 @@ SFX_IMPL_CHILDWINDOW_WITHID(SpellDialogChildWindow, SID_SPELL_DIALOG)
 
 namespace sd {
 
+SFX_IMPL_CHILDWINDOW_WITHID(SpellDialogChildWindow, SID_SPELL_DIALOG)
+
 SpellDialogChildWindow::SpellDialogChildWindow (
     vcl::Window* _pParent,
     sal_uInt16 nId,
diff --git a/sd/source/ui/inc/unopage.hxx b/sd/source/ui/inc/unopage.hxx
index d6dc302..f0b983d 100644
--- a/sd/source/ui/inc/unopage.hxx
+++ b/sd/source/ui/inc/unopage.hxx
@@ -35,6 +35,7 @@
 #include <svx/svdpool.hxx>
 
 #include <comphelper/servicehelper.hxx>
+#include <cppuhelper/implbase.hxx>
 
 #include "unosrch.hxx"
 
@@ -285,7 +286,6 @@ public:
 /***********************************************************************
 *                                                                      *
 ***********************************************************************/
-#include <cppuhelper/implbase.hxx>
 
 class SdPageLinkTargets : public ::cppu::WeakImplHelper< css::container::XNameAccess,
                                                   css::lang::XServiceInfo >
diff --git a/sd/source/ui/unoidl/sddetect.hxx b/sd/source/ui/unoidl/sddetect.hxx
index 49beceb..e8c1cd9 100644
--- a/sd/source/ui/unoidl/sddetect.hxx
+++ b/sd/source/ui/unoidl/sddetect.hxx
@@ -28,6 +28,8 @@
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
 #include <cppuhelper/factory.hxx>
+#include <sfx2/sfxuno.hxx>
+
 
 namespace com
 {
@@ -47,8 +49,6 @@ namespace com
     }
 }
 
-#include <sfx2/sfxuno.hxx>
-
 class SdFilterDetect : public ::cppu::WeakImplHelper< css::document::XExtendedFilterDetection, css::lang::XServiceInfo >
 {
 public:
diff --git a/sd/source/ui/unoidl/unocpres.hxx b/sd/source/ui/unoidl/unocpres.hxx
index c04ebb7..64f6c1f 100644
--- a/sd/source/ui/unoidl/unocpres.hxx
+++ b/sd/source/ui/unoidl/unocpres.hxx
@@ -29,6 +29,12 @@
 
 #include <cppuhelper/implbase.hxx>
 #include <comphelper/servicehelper.hxx>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+
+#include "unomodel.hxx"
+#include "drawdoc.hxx"
+
 
 class SdXImpressDocument;
 class SdCustomShow;
@@ -91,12 +97,6 @@ public:
     virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener >& aListener ) throw(css::uno::RuntimeException, std::exception) override;
 };
 
-#include <com/sun/star/container/XNameContainer.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-
-#include "unomodel.hxx"
-#include "drawdoc.hxx"
-
 class List;
 
 class SdXCustomPresentationAccess : public ::cppu::WeakImplHelper< css::container::XNameContainer,
diff --git a/sd/source/ui/view/unmodpg.cxx b/sd/source/ui/view/unmodpg.cxx
index f7416f5..7da1392 100644
--- a/sd/source/ui/view/unmodpg.cxx
+++ b/sd/source/ui/view/unmodpg.cxx
@@ -20,6 +20,8 @@
 #include <svx/svdlayer.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/viewfrm.hxx>
+#include <svx/svdviter.hxx>
+#include <svx/svdview.hxx>
 
 #include "strings.hrc"
 #include "glob.hxx"
@@ -71,8 +73,6 @@ ModifyPageUndoAction::ModifyPageUndoAction(
     maComment = SD_RESSTR(STR_UNDO_MODIFY_PAGE);
 }
 
-#include <svx/svdviter.hxx>
-#include <svx/svdview.hxx>
 void ModifyPageUndoAction::Undo()
 {
     // invalidate Selection, there could be objects deleted in this UNDO
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 307e218..246d685 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -99,6 +99,9 @@
 #include <rtl/instance.hxx>
 #include <rtl/strbuf.hxx>
 #include <memory>
+#include <framework/sfxhelperfunctions.hxx>
+#include <sfx2/imagemgr.hxx>
+#include "fwkhelper.hxx"
 
 using namespace ::com::sun::star;
 
@@ -118,10 +121,6 @@ namespace
         : public rtl::Static<osl::Mutex, theApplicationMutex> {};
 }
 
-#include <framework/sfxhelperfunctions.hxx>
-#include <sfx2/imagemgr.hxx>
-#include "fwkhelper.hxx"
-
 SfxApplication* SfxApplication::Get()
 {
     return g_pSfxApplication;
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index f43929e..4f80ffa 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -24,10 +24,6 @@
 #include <com/sun/star/frame/XDispatch.hpp>
 #include <com/sun/star/frame/XFrame2.hpp>
 
-namespace com { namespace sun { namespace star { namespace awt { class XWindow; } } } }
-namespace com { namespace sun { namespace star { namespace i18n { class XBreakIterator; } } } }
-namespace com { namespace sun { namespace star { namespace text { class XTextRange; } } } }
-
 #include <vcl/window.hxx>
 #include <vcl/idle.hxx>
 #include <vcl/toolbox.hxx>
@@ -44,6 +40,11 @@ namespace com { namespace sun { namespace star { namespace text { class XTextRan
 
 #include "srchdlg.hxx"
 
+namespace com { namespace sun { namespace star { namespace awt { class XWindow; } } } }
+namespace com { namespace sun { namespace star { namespace i18n { class XBreakIterator; } } } }
+namespace com { namespace sun { namespace star { namespace text { class XTextRange; } } } }
+
+
 // ContentListBox_Impl ---------------------------------------------------
 
 class ContentListBox_Impl : public SvTreeListBox
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index d632672..b1127a4 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -55,6 +55,7 @@
 #include <sfx2/dispatch.hxx>
 #include <comphelper/extract.hxx>
 #include <tools/urlobj.hxx>
+#include <tools/rcid.h>
 #include <osl/security.hxx>
 #include <osl/file.hxx>
 #include <rtl/bootstrap.hxx>
@@ -305,7 +306,6 @@ void ShutdownIcon::FromTemplate()
 }
 
 
-#include <tools/rcid.h>
 OUString ShutdownIcon::GetResString( int id )
 {
     ::SolarMutexGuard aGuard;
diff --git a/sfx2/source/inc/partwnd.hxx b/sfx2/source/inc/partwnd.hxx
index 07f873c..487659e 100644
--- a/sfx2/source/inc/partwnd.hxx
+++ b/sfx2/source/inc/partwnd.hxx
@@ -19,6 +19,10 @@
 #ifndef INCLUDED_SFX2_SOURCE_INC_PARTWND_HXX
 #define INCLUDED_SFX2_SOURCE_INC_PARTWND_HXX
 
+#include <sfx2/childwin.hxx>
+#include <sfx2/dockwin.hxx>
+
+
 namespace com
 {
     namespace sun
@@ -33,9 +37,6 @@ namespace com
     }
 }
 
-#include <sfx2/childwin.hxx>
-#include <sfx2/dockwin.hxx>
-
 // forward ---------------------------------------------------------------
 
 // class SfxPartChildWnd_Impl -----------------------------------
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index cba3642..36dca8f 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -35,6 +35,9 @@
 #include <tools/urlobj.hxx>
 #include <unotools/ucbhelper.hxx>
 #include <comphelper/processfactory.hxx>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/ucb/XCommandEnvironment.hpp>
+#include <ucbhelper/content.hxx>
 
 #include <memory>
 
@@ -277,9 +280,6 @@ bool SotStorageStream::SetProperty( const OUString& rName, const css::uno::Any&
     , m_nVersion( SOFFICE_FILEFORMAT_CURRENT )
 
 #define ERASEMASK  ( StreamMode::TRUNC | StreamMode::WRITE | StreamMode::SHARE_DENYALL )
-#include <com/sun/star/uno/Reference.h>
-#include <com/sun/star/ucb/XCommandEnvironment.hpp>
-#include <ucbhelper/content.hxx>
 
 SotStorage::SotStorage( const OUString & rName, StreamMode nMode )
     INIT_SotStorage()
diff --git a/starmath/source/smdetect.hxx b/starmath/source/smdetect.hxx
index 6efd67e..5c28ee5 100644
--- a/starmath/source/smdetect.hxx
+++ b/starmath/source/smdetect.hxx
@@ -30,6 +30,8 @@
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
 #include <cppuhelper/factory.hxx>
+#include <sfx2/sfxuno.hxx>
+
 
 namespace com
 {
@@ -49,8 +51,6 @@ namespace com
     }
 }
 
-#include <sfx2/sfxuno.hxx>
-
 class SmFilterDetect : public ::cppu::WeakImplHelper< css::document::XExtendedFilterDetection, css::lang::XServiceInfo >
 {
 public:
diff --git a/stoc/test/testsmgr_cpnt.cxx b/stoc/test/testsmgr_cpnt.cxx
index d64c2c3..638ad81 100644
--- a/stoc/test/testsmgr_cpnt.cxx
+++ b/stoc/test/testsmgr_cpnt.cxx
@@ -42,6 +42,8 @@
 #include <com/sun/star/container/XEnumerationAccess.hpp>
 #include <com/sun/star/container/XEnumeration.hpp>
 
+#include <stdio.h>
+
 #if defined ( UNX )
 #include <limits.h>
 #define _MAX_PATH PATH_MAX
@@ -167,8 +169,6 @@ Sequence< OUString > Test_Manager_Impl::getSupportedServiceNames_Static() throw
 *
 ****/
 
-#include <stdio.h>
-
 extern "C" void SAL_CALL test_ServiceManager()
 {
 #if ! defined SAL_DLLPREFIX
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index 1497fa3..74de5e4 100644
--- a/svx/source/svdraw/svdedtv.cxx
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -35,6 +35,9 @@
 #include <rtl/strbuf.hxx>
 #include <svx/svdview.hxx>
 #include <clonelist.hxx>
+#include <svx/svdogrp.hxx>
+#include <svx/scene3d.hxx>
+
 
 using namespace com::sun::star;
 
@@ -114,9 +117,6 @@ void SdrEditView::InsertNewLayer(const OUString& rName, sal_uInt16 nPos)
     mpModel->SetChanged();
 }
 
-#include <svx/svdogrp.hxx>
-#include <svx/scene3d.hxx>
-
 bool SdrEditView::ImpDelLayerCheck(SdrObjList* pOL, SdrLayerID nDelID) const
 {
     bool bDelAll(true);
diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx
index d075c31..a148de3 100644
--- a/svx/source/toolbars/fontworkbar.cxx
+++ b/svx/source/toolbars/fontworkbar.cxx
@@ -30,6 +30,10 @@
 #include <svx/dialogs.hrc>
 #include <svx/svdview.hxx>
 #include <svx/sdasitm.hxx>
+#include "svx/gallery.hxx"
+#include <svx/fmmodel.hxx>
+#include <svx/fmpage.hxx>
+#include <svl/itempool.hxx>
 #include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
 #include <sfx2/bindings.hxx>
 #include <editeng/eeitem.hxx>
@@ -310,11 +314,6 @@ static void impl_execute( SdrView*, SfxRequest& rReq, SdrCustomShapeGeometryItem
     }
 }
 
-#include "svx/gallery.hxx"
-#include <svx/fmmodel.hxx>
-#include <svx/fmpage.hxx>
-#include <svl/itempool.hxx>
-
 void GetGeometryForCustomShape( SdrCustomShapeGeometryItem& rGeometryItem, const OUString& rCustomShape )
 {
     const OUString sType( "Type" );
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index 994eb2d..2086253 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
+#include <com/sun/star/drawing/FlagSequence.hpp>
 #include <com/sun/star/lang/DisposedException.hpp>
 #include <com/sun/star/awt/FontSlant.hpp>
 #include <com/sun/star/style/VerticalAlignment.hpp>
@@ -1222,9 +1224,6 @@ basegfx::B2DPolyPolygon SvxShapePolyPolygon::GetPolygon() const throw()
     }
 }
 
-#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
-#include <com/sun/star/drawing/FlagSequence.hpp>
-
 SvxShapePolyPolygonBezier::SvxShapePolyPolygonBezier( SdrObject* pObj , drawing::PolygonKind eNew ) throw()
 :   SvxShapeText( pObj, getSvxMapProvider().GetMap(SVXMAP_POLYPOLYGONBEZIER), getSvxMapProvider().GetPropertySet(SVXMAP_POLYPOLYGONBEZIER, SdrObject::GetGlobalDrawObjectItemPool()) )
 ,   mePolygonKind( eNew )
diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx
index d3ab906..3b28ea9 100644
--- a/svx/source/unodraw/unoshap3.cxx
+++ b/svx/source/unodraw/unoshap3.cxx
@@ -28,6 +28,7 @@
 #include <comphelper/serviceinfohelper.hxx>
 
 #include <svx/svdpool.hxx>
+#include <svx/svditer.hxx>
 #include <svx/unoshape.hxx>
 #include <svx/unopage.hxx>
 #include <editeng/unoprnms.hxx>
@@ -285,8 +286,6 @@ static void ConvertObjectToHomogenMatric( E3dObject* pObject, Any& rValue )
 }
 
 
-#include <svx/svditer.hxx>
-
 struct ImpRememberTransAndRect
 {
     basegfx::B3DHomMatrix                   maMat;
diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx
index 91ec0e7..45f9e45 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 119bccb7..bb2cb2a 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 46b70f4..867157f 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 50c6e18..e267ffb 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 37b6ba8..808b14a 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 5476cb7..07edd55 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 3170255..41e673c 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 0a9f88b..400f7f5 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 d028903..2e72a02 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 aa07c87..bd5e5a6 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 9cc986b..cae1e1e 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 3b962a7..2a6ad96 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()
diff --git a/uui/source/secmacrowarnings.hxx b/uui/source/secmacrowarnings.hxx
index ea8ff82..f6eb1e0 100644
--- a/uui/source/secmacrowarnings.hxx
+++ b/uui/source/secmacrowarnings.hxx
@@ -23,6 +23,7 @@
 #include <vcl/dialog.hxx>
 #include <unotools/securityoptions.hxx>
 #include <vcl/button.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
 
 namespace com {
 namespace sun {
@@ -31,9 +32,6 @@ namespace security {
     class XCertificate; }
 }}}
 
-#include <com/sun/star/uno/Sequence.hxx>
-
-
 class MacroWarning : public ModalDialog
 {
 private:
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index 7c25b91..e54bc68 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -19,6 +19,7 @@
 #include <osl/detail/android-bootstrap.h>
 #include <rtl/strbuf.hxx>
 #include <vcl/settings.hxx>
+#include <vcl/layout.hxx>
 
 #define LOGTAG "LibreOffice/androidinst"
 #define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, LOGTAG, __VA_ARGS__))
@@ -204,8 +205,6 @@ void DestroySalInstance( SalInstance *pInst )
     delete pInst;
 }
 
-#include <vcl/layout.hxx>
-
 int AndroidSalSystem::ShowNativeDialog( const OUString& rTitle,
                                         const OUString& rMessage,
                                         const std::list< OUString >& rButtons,
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index d6139c8..4cd82d6 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -64,6 +64,10 @@
 #include "apple_remote/RemoteControl.h"
 #include "postmac.h"
 
+extern "C" {
+#include <crt_externs.h>
+}
+
 using namespace std;
 using namespace ::com::sun::star;
 
@@ -251,10 +255,6 @@ void DeInitSalData()
     SetSalData( nullptr );
 }
 
-extern "C" {
-#include <crt_externs.h>
-}
-
 void InitSalMain()
 {
 }
diff --git a/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx b/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx
index 7814e18..4ee1eec 100644
--- a/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx
+++ b/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx
@@ -31,6 +31,9 @@
 #include <vcl/window.hxx>
 #include <basegfx/vector/b2isize.hxx>
 
+#include <cairo-xlib.h>
+#include <cairo-xlib-xrender.h>
+
 namespace
 {
     Pixmap limitXCreatePixmap(Display *display, Drawable d, unsigned int width, unsigned int height, unsigned int depth)
@@ -53,9 +56,6 @@ namespace
 namespace cairo
 {
 
-#include <cairo-xlib.h>
-#include <cairo-xlib-xrender.h>
-
     X11SysData::X11SysData() :
         pDisplay(nullptr),
         hDrawable(0),
diff --git a/vcl/unx/kde4/KDE4FilePicker.cxx b/vcl/unx/kde4/KDE4FilePicker.cxx
index c8ed780..bf366ab 100644
--- a/vcl/unx/kde4/KDE4FilePicker.cxx
+++ b/vcl/unx/kde4/KDE4FilePicker.cxx
@@ -61,15 +61,6 @@
 
 #include "svids.hrc"
 
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::ui::dialogs;
-using namespace ::com::sun::star::ui::dialogs::TemplateDescription;
-using namespace ::com::sun::star::ui::dialogs::ExtendedFilePickerElementIds;
-using namespace ::com::sun::star::ui::dialogs::CommonFilePickerElementIds;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::uno;
-
 // The dialog should check whether LO also supports the protocol
 // provided by KIO, and KFileWidget::dirOperator() is only 4.3+ .
 // Moreover it's only in this somewhat internal KFileWidget class,
@@ -85,6 +76,16 @@ using namespace ::com::sun::star::uno;
 
 #include <QtCore/QDebug>
 
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::ui::dialogs;
+using namespace ::com::sun::star::ui::dialogs::TemplateDescription;
+using namespace ::com::sun::star::ui::dialogs::ExtendedFilePickerElementIds;
+using namespace ::com::sun::star::ui::dialogs::CommonFilePickerElementIds;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::uno;
+
 namespace
 {
     uno::Sequence<OUString> SAL_CALL FilePicker_getSupportedServiceNames()
diff --git a/xmloff/source/draw/propimp0.cxx b/xmloff/source/draw/propimp0.cxx
index a52be47..dd13c8f 100644
--- a/xmloff/source/draw/propimp0.cxx
+++ b/xmloff/source/draw/propimp0.cxx
@@ -19,6 +19,7 @@
 
 #include <rtl/ustrbuf.hxx>
 #include "propimp0.hxx"
+#include "sdxmlexp_impl.hxx"
 #include <com/sun/star/drawing/LineDash.hpp>
 #include <com/sun/star/util/Duration.hpp>
 #include <com/sun/star/uno/Any.hxx>
@@ -233,8 +234,6 @@ bool XMLTextAnimationStepPropertyHdl::exportXML(
     return bRet;
 }
 
-#include "sdxmlexp_impl.hxx"
-
 XMLDateTimeFormatHdl::XMLDateTimeFormatHdl( SvXMLExport* pExport )
 : mpExport( pExport )
 {
diff --git a/xmloff/source/text/XMLTextNumRuleInfo.hxx b/xmloff/source/text/XMLTextNumRuleInfo.hxx
index ff5b907..6a23a72 100644
--- a/xmloff/source/text/XMLTextNumRuleInfo.hxx
+++ b/xmloff/source/text/XMLTextNumRuleInfo.hxx
@@ -22,11 +22,11 @@
 
 #include <com/sun/star/uno/Reference.hxx>
 #include <com/sun/star/container/XIndexReplace.hpp>
+#include <sal/types.h>
 
 namespace com { namespace sun { namespace star {
     namespace text { class XTextContent; }
 } } }
-#include <sal/types.h>
 
 class XMLTextListAutoStylePool;
 
diff --git a/xmlsecurity/inc/certificatechooser.hxx b/xmlsecurity/inc/certificatechooser.hxx
index fe138c6..45453b2 100644
--- a/xmlsecurity/inc/certificatechooser.hxx
+++ b/xmlsecurity/inc/certificatechooser.hxx
@@ -25,6 +25,9 @@
 #include <vcl/fixed.hxx>
 #include <vcl/button.hxx>
 #include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <sigstruct.hxx>
+
 
 namespace com {
 namespace sun {
@@ -35,9 +38,6 @@ namespace xml { namespace crypto {
     class XSecurityEnvironment; }}
 }}}
 
-#include <com/sun/star/uno/Sequence.hxx>
-#include <sigstruct.hxx>
-
 class HeaderBar;
 
 class CertificateChooser : public ModalDialog


More information about the Libreoffice-commits mailing list