diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2023-09-10 18:46:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-09-10 20:43:05 +0200 |
commit | e23d2be0ce41ea0a1f6d3d58d626a546c25cb516 (patch) | |
tree | 5a7704f14398859252a666dd607d47af6040705b | |
parent | 76ea287c040dcfc2fe71b0588e1701cfe1ae6940 (diff) |
using decls should come after #include
Change-Id: I058551e87bca42adede860f6f299b0f7ae2af3b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156798
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
44 files changed, 124 insertions, 153 deletions
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index 705905acfce7..be056aaf61e8 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -37,6 +37,7 @@ #include <com/sun/star/io/XOutputStream.hpp> #include <com/sun/star/io/XStream.hpp> #include <com/sun/star/io/XSeekable.hpp> +#include <iosys.hxx> using namespace com::sun::star::uno; using namespace com::sun::star::lang; @@ -44,7 +45,6 @@ using namespace com::sun::star::ucb; using namespace com::sun::star::io; using namespace com::sun::star::bridge; -#include <iosys.hxx> namespace { diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 0c01e31126f1..8bfb362f98c9 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -74,14 +74,6 @@ #include <unotools/textsearch.hxx> #include <svl/numformat.hxx> - - -using namespace comphelper; -using namespace osl; -using namespace com::sun::star; -using namespace com::sun::star::lang; -using namespace com::sun::star::uno; - #include <date.hxx> #include <sbstdobj.hxx> #include <rtlproto.hxx> @@ -111,6 +103,12 @@ using namespace com::sun::star::uno; #include <vcl/TypeSerializer.hxx> +using namespace comphelper; +using namespace osl; +using namespace com::sun::star; +using namespace com::sun::star::lang; +using namespace com::sun::star::uno; + static sal_Int32 GetDayDiff(const Date& rDate) { return rDate - Date(1899'12'30); } #if HAVE_FEATURE_SCRIPTING diff --git a/connectivity/source/cpool/ZConnectionPool.cxx b/connectivity/source/cpool/ZConnectionPool.cxx index 7d4ea408d4b6..009de85b3f4b 100644 --- a/connectivity/source/cpool/ZConnectionPool.cxx +++ b/connectivity/source/cpool/ZConnectionPool.cxx @@ -24,6 +24,7 @@ #include "ZPoolCollection.hxx" #include <connectivity/ConnectionWrapper.hxx> #include <com/sun/star/beans/XPropertySet.hpp> +#include <algorithm> using namespace ::com::sun::star::uno; @@ -34,7 +35,6 @@ using namespace ::com::sun::star::container; using namespace ::osl; using namespace connectivity; -#include <algorithm> void SAL_CALL OPoolTimer::onShot() { diff --git a/connectivity/source/drivers/mysqlc/mysqlc_driver.cxx b/connectivity/source/drivers/mysqlc/mysqlc_driver.cxx index 37a14e822aff..79a514a57898 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_driver.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_driver.cxx @@ -18,6 +18,8 @@ */ #include "mysqlc_driver.hxx" #include "mysqlc_connection.hxx" +#include <cppuhelper/supportsservice.hxx> +#include <comphelper/servicehelper.hxx> using namespace css::uno; using namespace css::lang; @@ -26,9 +28,6 @@ using namespace css::sdbc; using namespace css::sdbcx; using namespace connectivity::mysqlc; -#include <cppuhelper/supportsservice.hxx> -#include <comphelper/servicehelper.hxx> - MysqlCDriver::MysqlCDriver(const Reference<XMultiServiceFactory>& _rxFactory) : ODriver_BASE(m_aMutex) , m_xFactory(_rxFactory) diff --git a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx index b2c7d31842c4..32d4915377e8 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx @@ -31,10 +31,10 @@ #include <cppuhelper/typeprovider.hxx> #include <sal/log.hxx> -using namespace rtl; - #include <cstdlib> +#include <typeindex> +using namespace rtl; using namespace connectivity::mysqlc; using namespace connectivity; using namespace cppu; @@ -49,8 +49,6 @@ using namespace com::sun::star::util; using namespace ::comphelper; using ::osl::MutexGuard; -#include <typeindex> - namespace { std::type_index getTypeFromMysqlType(enum_field_types type) diff --git a/hwpfilter/source/hwpreader.hxx b/hwpfilter/source/hwpreader.hxx index d99099f2b31c..7e25cbbb0e81 100644 --- a/hwpfilter/source/hwpreader.hxx +++ b/hwpfilter/source/hwpreader.hxx @@ -47,15 +47,6 @@ #include <cppuhelper/weak.hxx> #include <memory> -using namespace ::cppu; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::io; -using namespace ::com::sun::star::registry; -using namespace ::com::sun::star::document; -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::xml::sax; - #include <assert.h> #include <unotools/mediadescriptor.hxx> @@ -68,6 +59,15 @@ using namespace ::com::sun::star::xml::sax; #include "drawdef.h" #include "attributes.hxx" +using namespace ::cppu; +using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::io; +using namespace ::com::sun::star::registry; +using namespace ::com::sun::star::document; +using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::xml::sax; + inline constexpr OUStringLiteral WRITER_IMPORTER_NAME = u"com.sun.star.comp.Writer.XMLImporter"; struct HwpReaderPrivate; diff --git a/linguistic/source/hhconvdic.cxx b/linguistic/source/hhconvdic.cxx index d20088a10e73..f2574d630e49 100644 --- a/linguistic/source/hhconvdic.cxx +++ b/linguistic/source/hhconvdic.cxx @@ -25,6 +25,7 @@ #include <cppuhelper/supportsservice.hxx> #include <com/sun/star/linguistic2/ConversionDictionaryType.hpp> #include <com/sun/star/lang/IllegalArgumentException.hpp> +#include <com/sun/star/i18n/UnicodeScript.hpp> #include "hhconvdic.hxx" #include <linguistic/misc.hxx> @@ -35,14 +36,12 @@ using namespace com::sun::star::lang; using namespace com::sun::star::uno; using namespace com::sun::star::linguistic2; using namespace linguistic; +using namespace i18n; constexpr OUStringLiteral SN_HH_CONV_DICTIONARY = u"com.sun.star.linguistic2.HangulHanjaConversionDictionary"; -#include <com/sun/star/i18n/UnicodeScript.hpp> - -using namespace i18n; #define SCRIPT_OTHERS 0 #define SCRIPT_HANJA 1 diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx index d6d63fb654bd..9a82b8703644 100644 --- a/sax/source/expatwrap/sax_expat.cxx +++ b/sax/source/expatwrap/sax_expat.cxx @@ -44,6 +44,7 @@ #include <sal/log.hxx> #include <expat.h> +#include <xml2utf.hxx> using namespace ::osl; using namespace ::cppu; @@ -51,7 +52,6 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::xml::sax; using namespace ::com::sun::star::io; -#include <xml2utf.hxx> namespace { diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx index 3b75255ee9ef..180126684ea1 100644 --- a/sax/source/expatwrap/saxwriter.cxx +++ b/sax/source/expatwrap/saxwriter.cxx @@ -41,6 +41,8 @@ #include <rtl/character.hxx> #include <sal/log.hxx> +#include <memory> + using namespace ::osl; using namespace ::cppu; using namespace ::com::sun::star::uno; @@ -49,8 +51,6 @@ using namespace ::com::sun::star::xml::sax; using namespace ::com::sun::star::util; using namespace ::com::sun::star::io; -#include <memory> - #define LINEFEED 10 #define SEQUENCESIZE 1024 #define MAXCOLUMNCOUNT 72 diff --git a/sax/source/expatwrap/xml2utf.cxx b/sax/source/expatwrap/xml2utf.cxx index 1f044571d53d..7cbf24d0d3d8 100644 --- a/sax/source/expatwrap/xml2utf.cxx +++ b/sax/source/expatwrap/xml2utf.cxx @@ -26,14 +26,14 @@ #include <rtl/tencinfo.h> #include <com/sun/star/io/NotConnectedException.hpp> #include <com/sun/star/io/XInputStream.hpp> +#include <xml2utf.hxx> +#include <memory> + using namespace ::com::sun::star::uno; using namespace ::com::sun::star::io; -#include <xml2utf.hxx> -#include <memory> - namespace sax_expatwrap { sal_Int32 XMLFile2UTFConverter::readAndConvert( Sequence<sal_Int8> &seq , sal_Int32 nMaxToRead ) diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 337a2fb86d21..8abf686f2510 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -46,8 +46,6 @@ #include <svl/sharedstring.hxx> #include <scmatrix.hxx> -using ::std::vector; - #include <com/sun/star/sheet/ComplexReference.hpp> #include <com/sun/star/sheet/ExternalReference.hpp> #include <com/sun/star/sheet/FormulaToken.hpp> @@ -57,6 +55,7 @@ using ::std::vector; #include <o3tl/safeint.hxx> #include <o3tl/sorted_vector.hxx> +using ::std::vector; using namespace formula; using namespace com::sun::star; diff --git a/sc/source/filter/oox/formulabuffer.cxx b/sc/source/filter/oox/formulabuffer.cxx index 0e7f3cdd5001..fae50d9305f7 100644 --- a/sc/source/filter/oox/formulabuffer.cxx +++ b/sc/source/filter/oox/formulabuffer.cxx @@ -24,13 +24,12 @@ #include <svl/sharedstringpool.hxx> #include <svl/numformat.hxx> #include <sal/log.hxx> +#include <memory> +#include <utility> using namespace ::com::sun::star::uno; using namespace ::com::sun::star::sheet; -#include <memory> -#include <utility> - namespace oox::xls { namespace { diff --git a/sc/source/ui/dbgui/dapidata.cxx b/sc/source/ui/dbgui/dapidata.cxx index 1f9b3001756d..0bd08616502b 100644 --- a/sc/source/ui/dbgui/dapidata.cxx +++ b/sc/source/ui/dbgui/dapidata.cxx @@ -29,11 +29,11 @@ #include <com/sun/star/sdb/XCompletedConnection.hpp> #include <com/sun/star/task/InteractionHandler.hpp> -using namespace com::sun::star; - #include <dapidata.hxx> #include <dpsdbtab.hxx> +using namespace com::sun::star; + // entries in the "type" ListBox #define DP_TYPELIST_TABLE 0 #define DP_TYPELIST_QUERY 1 diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 7e4370b7e6db..36666799dbce 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -23,8 +23,6 @@ #include <com/sun/star/frame/Desktop.hpp> -using namespace ::com::sun::star; - #include <scitems.hxx> #include <editeng/flstitem.hxx> #include <sfx2/fcontnr.hxx> @@ -115,6 +113,8 @@ using namespace ::com::sun::star; #include <svx/xdef.hxx> +using namespace ::com::sun::star; + void ScDocShell::SetInitialLinkUpdate( const SfxMedium* pMed ) { if (pMed) diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx index abdebf96b31e..84283b1ede14 100644 --- a/sc/source/ui/unoobj/nameuno.cxx +++ b/sc/source/ui/unoobj/nameuno.cxx @@ -30,10 +30,6 @@ #include <cppuhelper/supportsservice.hxx> #include <unotools/charclass.hxx> -using namespace ::com::sun::star; -using ::com::sun::star::uno::Reference; -using ::com::sun::star::uno::Any; - #include <nameuno.hxx> #include <miscuno.hxx> #include <cellsuno.hxx> @@ -48,6 +44,10 @@ using ::com::sun::star::uno::Any; #include <scui_def.hxx> +using namespace ::com::sun::star; +using ::com::sun::star::uno::Reference; +using ::com::sun::star::uno::Any; + static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetNamedRangeMap() { static const SfxItemPropertyMapEntry aNamedRangeMap_Impl[] = diff --git a/sc/source/ui/view/tabvwshg.cxx b/sc/source/ui/view/tabvwshg.cxx index 09be14ad22ec..6b6820b9a395 100644 --- a/sc/source/ui/view/tabvwshg.cxx +++ b/sc/source/ui/view/tabvwshg.cxx @@ -30,8 +30,6 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/awt/XControlModel.hpp> -using namespace com::sun::star; - #include <tabvwsh.hxx> #include <document.hxx> #include <drawview.hxx> @@ -39,6 +37,8 @@ using namespace com::sun::star; #include <gridwin.hxx> #include <avmedia/mediawindow.hxx> +using namespace com::sun::star; + void ScTabViewShell::InsertURLButton( const OUString& rName, const OUString& rURL, const OUString& rTarget, const Point* pInsPos ) diff --git a/sd/source/filter/html/HtmlOptionsDialog.cxx b/sd/source/filter/html/HtmlOptionsDialog.cxx index 78939dc4ddac..52d50472d9b1 100644 --- a/sd/source/filter/html/HtmlOptionsDialog.cxx +++ b/sd/source/filter/html/HtmlOptionsDialog.cxx @@ -28,6 +28,9 @@ #include <cppuhelper/implbase.hxx> #include <cppuhelper/supportsservice.hxx> #include <vcl/svapp.hxx> +#include <pres.hxx> +#include <sdabstdlg.hxx> + using namespace com::sun::star::uno; using namespace com::sun::star::lang; @@ -35,9 +38,6 @@ using namespace com::sun::star::document; using namespace com::sun::star::beans; using namespace com::sun::star::ui::dialogs; -#include <pres.hxx> -#include <sdabstdlg.hxx> - namespace { class SdHtmlOptionsDialog : public cppu::WeakImplHelper diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx index 8b6c0ff22132..94864cb56cb9 100644 --- a/sd/source/ui/view/drtxtob.cxx +++ b/sd/source/ui/view/drtxtob.cxx @@ -57,12 +57,13 @@ #include <Window.hxx> #include <OutlineView.hxx> -using namespace sd; -using namespace ::com::sun::star; #define ShellClass_TextObjectBar +using namespace sd; #include <sdslots.hxx> +using namespace ::com::sun::star; + namespace sd { /** diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 43117897da5a..8bb39efc4bb0 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -82,16 +82,15 @@ #include <memory> +#define ShellClass_OutlineViewShell +using namespace sd; +#include <sdslots.hxx> + using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::linguistic2; -using namespace sd; - -#define ShellClass_OutlineViewShell -#include <sdslots.hxx> - namespace sd { #define MIN_ZOOM 10 // minimum zoom factor diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx index 3b748ddebd04..948a1de40fd0 100644 --- a/sfx2/source/appl/appmisc.cxx +++ b/sfx2/source/appl/appmisc.cxx @@ -45,15 +45,15 @@ #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <drawinglayer/primitive2d/transformprimitive2d.hxx> +#define ShellClass_SfxApplication +#include <sfxslots.hxx> + using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::util; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; -#define ShellClass_SfxApplication -#include <sfxslots.hxx> - SFX_IMPL_INTERFACE(SfxApplication,SfxShell) void SfxApplication::InitInterface_Impl() diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx index feaa91567f43..3625e5aa3f8d 100644 --- a/sfx2/source/doc/doctempl.cxx +++ b/sfx2/source/doc/doctempl.cxx @@ -57,19 +57,6 @@ #include "doctemplateslocal.hxx" #include <sfxurlrelocator.hxx> -using namespace ::com::sun::star; -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::frame; -using namespace ::com::sun::star::io; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::sdbc; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::ucb; -using namespace ::com::sun::star::document; -using namespace ::rtl; -using namespace ::ucbhelper; - - #include <sfx2/doctempl.hxx> #include <sfx2/objsh.hxx> #include <sfx2/sfxresid.hxx> @@ -82,6 +69,18 @@ using namespace ::ucbhelper; #include <vector> +using namespace ::com::sun::star; +using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::frame; +using namespace ::com::sun::star::io; +using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::sdbc; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::ucb; +using namespace ::com::sun::star::document; +using namespace ::rtl; +using namespace ::ucbhelper; + constexpr OUStringLiteral TITLE = u"Title"; constexpr OUStringLiteral TARGET_URL = u"TargetURL"; diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 47ee9d4415a8..a9c39b006564 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -111,6 +111,9 @@ #include <boost/property_tree/json_parser.hpp> +#define ShellClass_SfxObjectShell +#include <sfxslots.hxx> + using namespace ::com::sun::star; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; @@ -123,9 +126,6 @@ using namespace ::com::sun::star::security; using namespace ::com::sun::star::task; using namespace ::com::sun::star::graphic; -#define ShellClass_SfxObjectShell -#include <sfxslots.hxx> - SFX_IMPL_SUPERCLASS_INTERFACE(SfxObjectShell, SfxShell) void SfxObjectShell::InitInterface_Impl() diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 2a4d615b25fa..dd1fa74ea2be 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -100,17 +100,6 @@ #include <commandpopup/CommandPopup.hxx> - -using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::ucb; -using namespace ::com::sun::star::frame; -using namespace ::com::sun::star::lang; -using ::com::sun::star::awt::XWindow; -using ::com::sun::star::beans::PropertyValue; -using ::com::sun::star::document::XViewDataSupplier; -using ::com::sun::star::container::XIndexContainer; - // Due to ViewFrame::Current #include <appdata.hxx> #include <sfx2/app.hxx> @@ -143,6 +132,16 @@ using ::com::sun::star::container::XIndexContainer; #define ShellClass_SfxViewFrame #include <sfxslots.hxx> +using namespace ::com::sun::star; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::ucb; +using namespace ::com::sun::star::frame; +using namespace ::com::sun::star::lang; +using ::com::sun::star::awt::XWindow; +using ::com::sun::star::beans::PropertyValue; +using ::com::sun::star::document::XViewDataSupplier; +using ::com::sun::star::container::XIndexContainer; + constexpr OUStringLiteral CHANGES_STR = u"private:resource/toolbar/changes"; SFX_IMPL_SUPERCLASS_INTERFACE(SfxViewFrame,SfxShell) diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 9e9c106691c0..34298882fe71 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -112,6 +112,9 @@ #include <unordered_map> #include <unordered_set> +#define ShellClass_SfxViewShell +#include <sfxslots.hxx> + using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::frame; @@ -119,10 +122,6 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::util; using namespace ::cppu; -#define ShellClass_SfxViewShell -#include <sfxslots.hxx> - - class SfxClipboardChangeListener : public ::cppu::WeakImplHelper< datatransfer::clipboard::XClipboardListener > { diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index 8f8e184470a0..18cdc237944f 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -83,13 +83,13 @@ #include <ElementsDockingWindow.hxx> #include <smediteng.hxx> +#define ShellClass_SmDocShell +#include <smslots.hxx> + using namespace ::com::sun::star; using namespace ::com::sun::star::accessibility; using namespace ::com::sun::star::uno; -#define ShellClass_SmDocShell -#include <smslots.hxx> - SFX_IMPL_SUPERCLASS_INTERFACE(SmDocShell, SfxObjectShell) diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx index 5fb675a03a4b..1f4562181abb 100644 --- a/stoc/source/corereflection/crefl.cxx +++ b/stoc/source/corereflection/crefl.cxx @@ -28,6 +28,7 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <o3tl/any.hxx> #include <uno/lbnames.h> +#include "base.hxx" using namespace css; using namespace css::uno; @@ -36,10 +37,6 @@ using namespace css::reflection; using namespace cppu; using namespace osl; - -#include "base.hxx" - - namespace stoc_corefl { diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx index 7c8703993e3b..7fe1728f4194 100644 --- a/svtools/source/dialogs/insdlg.cxx +++ b/svtools/source/dialogs/insdlg.cxx @@ -32,8 +32,6 @@ #include <comphelper/propertysequence.hxx> #include <com/sun/star/container/XNameAccess.hpp> -using namespace ::com::sun::star; - #if defined _WIN32 #include <prewin.h> #include <oleidl.h> @@ -43,6 +41,8 @@ typedef Size SIZEL; typedef Point POINTL; #endif +using namespace ::com::sun::star; + // this struct conforms to the Microsoft // OBJECTDESCRIPTOR -> see oleidl.h // (MS platform sdk) diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx index b9d18e0a0c9c..8c24f3cc22ae 100644 --- a/svx/source/form/fmpage.cxx +++ b/svx/source/form/fmpage.cxx @@ -31,14 +31,12 @@ #include <vcl/help.hxx> #include <vcl/window.hxx> #include <osl/diagnose.h> - - #include <fmprop.hxx> #include <fmundo.hxx> -using namespace ::svxform; #include <comphelper/property.hxx> #include <comphelper/types.hxx> +using namespace ::svxform; using com::sun::star::uno::Reference; using com::sun::star::uno::UNO_QUERY; diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index 9f627a7358b4..62374ff96ca8 100644 --- a/svx/source/form/fmundo.cxx +++ b/svx/source/form/fmundo.cxx @@ -41,6 +41,7 @@ #include <com/sun/star/form/binding/XListEntrySink.hpp> #include <com/sun/star/sdbc/XConnection.hpp> #include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/script/XScriptListener.hpp> #include <svx/fmtools.hxx> #include <tools/debug.hxx> @@ -52,6 +53,9 @@ #include <comphelper/types.hxx> #include <connectivity/dbtools.hxx> #include <vcl/svapp.hxx> +#include <comphelper/processfactory.hxx> +#include <cppuhelper/implbase.hxx> + using namespace ::com::sun::star::uno; using namespace ::com::sun::star::awt; @@ -67,10 +71,6 @@ using namespace ::svxform; using namespace ::dbtools; -#include <com/sun/star/script/XScriptListener.hpp> -#include <comphelper/processfactory.hxx> -#include <cppuhelper/implbase.hxx> - namespace { class ScriptEventListenerWrapper : public cppu::WeakImplHelper< XScriptListener > diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx index 2027520d1ccc..970fa60d370f 100644 --- a/svx/source/svdraw/svdouno.cxx +++ b/svx/source/svdraw/svdouno.cxx @@ -23,6 +23,8 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/util/XCloneable.hpp> #include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/lang/XEventListener.hpp> +#include <cppuhelper/implbase.hxx> #include <comphelper/processfactory.hxx> #include <svx/svdouno.hxx> #include <svx/svdpagv.hxx> @@ -42,16 +44,6 @@ using namespace ::com::sun::star; using namespace sdr::contact; -// Defines - - -// Helper class SdrControlEventListenerImpl - -#include <com/sun/star/lang/XEventListener.hpp> - -#include <cppuhelper/implbase.hxx> - - class SdrControlEventListenerImpl : public ::cppu::WeakImplHelper< css::lang::XEventListener > { protected: diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index 2e8a776aeb2c..cf6cfe1d964d 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -68,6 +68,8 @@ #include <comphelper/sequence.hxx> #include "UnoGraphicExporter.hxx" #include <memory> +// #i102251# +#include <editeng/editstat.hxx> #define MAX_EXT_PIX 2048 @@ -83,9 +85,6 @@ using namespace ::com::sun::star::document; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::task; -// #i102251# -#include <editeng/editstat.hxx> - namespace { struct ExportSettings diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 567026d5b77a..5208d6ab0320 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -75,13 +75,13 @@ #include <com/sun/star/rdf/XLiteral.hpp> #include <com/sun/star/text/XTextContent.hpp> -using namespace ::com::sun::star; -using namespace i18n::ScriptType; - #include <unicode/ubidi.h> #include <i18nutil/scripttypedetector.hxx> #include <i18nutil/unicode.hxx> +using namespace ::com::sun::star; +using namespace i18n::ScriptType; + /* https://www.khtt.net/en/page/1821/the-big-kashida-secret diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index a16da71ce055..18178cdc0ee0 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -142,11 +142,6 @@ #include <unordered_set> #include <memory> -using namespace ::com::sun::star; -using namespace sw::util; -using namespace sw::types; -using namespace nsHdFtFlags; - #include <com/sun/star/i18n/XBreakIterator.hpp> #include <com/sun/star/i18n/ScriptType.hpp> #include <unotools/pathoptions.hxx> @@ -160,6 +155,11 @@ using namespace nsHdFtFlags; #include <sfx2/DocumentMetadataAccess.hxx> #include <comphelper/diagnose_ex.hxx> +using namespace ::com::sun::star; +using namespace sw::util; +using namespace sw::types; +using namespace nsHdFtFlags; + static SwMacroInfo* GetMacroInfo( SdrObject* pObj ) { if ( pObj ) diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index 14fe9a73644d..558ea5dc5796 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -51,10 +51,10 @@ #include <doc.hxx> #include <svl/cjkoptions.hxx> +#include <svl/eitem.hxx> using namespace ::com::sun::star; -#include <svl/eitem.hxx> sal_uInt32 SwFieldUnitTable::Count() { diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index fc6f096372f2..a44f2f7e2263 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -63,6 +63,7 @@ #include <sfx2/filedlghelper.hxx> #include <toxwrap.hxx> #include <chpfld.hxx> +#include <svtools/editbrowsebox.hxx> #include <cmath> #include <memory> @@ -76,7 +77,6 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; using namespace com::sun::star::ui::dialogs; using namespace ::sfx2; -#include <svtools/editbrowsebox.hxx> const sal_Unicode aDeliStart = '['; // for the form const sal_Unicode aDeliEnd = ']'; // for the form diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx index d9bedfdf2a5b..f6363abee4a0 100644 --- a/sw/source/uibase/shells/textsh.cxx +++ b/sw/source/uibase/shells/textsh.cxx @@ -80,8 +80,6 @@ #include <SwRewriter.hxx> #include <SwCapObjType.hxx> -using namespace ::com::sun::star; - #include <svx/svxdlg.hxx> #include <swabstdlg.hxx> #include <IDocumentDrawModelAccess.hxx> @@ -93,6 +91,8 @@ using namespace ::com::sun::star; #include <IDocumentUndoRedo.hxx> #include <formatcontentcontrol.hxx> +using namespace ::com::sun::star; + SFX_IMPL_INTERFACE(SwTextShell, SwBaseShell) IMPL_STATIC_LINK( SwTextShell, DialogClosedHdl, css::ui::dialogs::DialogClosedEvent*, pEvent, void ) diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx index ecc718fa8aad..1aff6af42f8d 100644 --- a/sw/source/uibase/uiview/view0.cxx +++ b/sw/source/uibase/uiview/view0.cxx @@ -62,14 +62,14 @@ #include <swslots.hxx> #include <PostItMgr.hxx> -using namespace ::com::sun::star; - #include <unotools/moduleoptions.hxx> #include <sfx2/viewfac.hxx> #include <memory> #include <swabstdlg.hxx> +using namespace ::com::sun::star; + SFX_IMPL_NAMED_VIEWFACTORY(SwView, "Default") { if (utl::ConfigManager::IsFuzzing() || SvtModuleOptions().IsWriter()) diff --git a/ucb/source/ucp/file/filprp.cxx b/ucb/source/ucp/file/filprp.cxx index fb895ebe28bb..ed352a9e9a23 100644 --- a/ucb/source/ucp/file/filprp.cxx +++ b/ucb/source/ucp/file/filprp.cxx @@ -20,14 +20,13 @@ #include "filtask.hxx" #include "prov.hxx" #include "filprp.hxx" +#include "filinl.hxx" using namespace fileaccess; using namespace com::sun::star; using namespace com::sun::star::uno; using namespace com::sun::star::ucb; -#include "filinl.hxx" - XPropertySetInfo_impl::XPropertySetInfo_impl( TaskManager* pMyShell,const OUString& aUnqPath ) : m_pMyShell( pMyShell ), m_seq( 0 ) diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx index 55e79e30c8a4..d0b6a04a697d 100644 --- a/unotools/source/config/configitem.cxx +++ b/unotools/source/config/configitem.cxx @@ -39,6 +39,8 @@ #include <comphelper/sequence.hxx> #include <comphelper/solarmutex.hxx> #include <comphelper/diagnose_ex.hxx> +#include <cppuhelper/implbase.hxx> +#include <utility> using namespace utl; using namespace com::sun::star::uno; @@ -48,9 +50,6 @@ using namespace com::sun::star::beans; using namespace com::sun::star::container; using namespace com::sun::star::configuration; -#include <cppuhelper/implbase.hxx> -#include <utility> - /* The ConfigChangeListener_Impl receives notifications from the configuration about changes that have happened. It forwards this notification to the ConfigItem it knows a pParent by calling its diff --git a/uui/source/secmacrowarnings.cxx b/uui/source/secmacrowarnings.cxx index 9b81f6d9cb22..9ecdc9afa1d9 100644 --- a/uui/source/secmacrowarnings.cxx +++ b/uui/source/secmacrowarnings.cxx @@ -27,10 +27,9 @@ #include <unotools/securityoptions.hxx> #include <tools/urlobj.hxx> -using namespace ::com::sun::star::security; - #include "secmacrowarnings.hxx" +using namespace ::com::sun::star::security; using namespace ::com::sun::star; diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 53ea2c86bb1c..a1138de24c4d 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -51,11 +51,11 @@ #include <unotools/syslocale.hxx> #include <unotools/syslocaleoptions.hxx> -using namespace ::com::sun::star; - #include <salframe.hxx> #include <svdata.hxx> +using namespace ::com::sun::star; + struct ImplMouseData { MouseSettingsOptions mnOptions = MouseSettingsOptions::NONE; diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx index ae190ab96e58..eda4405e6658 100644 --- a/vcl/unx/generic/fontmanager/fontconfig.cxx +++ b/vcl/unx/generic/fontmanager/fontconfig.cxx @@ -47,8 +47,6 @@ #include <org/freedesktop/PackageKit/SyncDbusSessionHelper.hpp> #include <config_fonts.h> -using namespace psp; - #include <fontconfig/fontconfig.h> #include <cstdio> @@ -62,6 +60,7 @@ using namespace psp; #include <utility> #include <algorithm> +using namespace psp; using namespace osl; namespace diff --git a/winaccessibility/source/service/AccFrameEventListener.cxx b/winaccessibility/source/service/AccFrameEventListener.cxx index 9d2bd0cf30d2..55ecf24792d1 100644 --- a/winaccessibility/source/service/AccFrameEventListener.cxx +++ b/winaccessibility/source/service/AccFrameEventListener.cxx @@ -29,13 +29,13 @@ #include <AccObjectWinManager.hxx> #include <unomsaaevent.hxx> -using namespace com::sun::star::uno; -using namespace com::sun::star::accessibility; - #include <vcl/window.hxx> #include <toolkit/awt/vclxwindow.hxx> #include <vcl/sysdata.hxx> +using namespace com::sun::star::uno; +using namespace com::sun::star::accessibility; + AccFrameEventListener::AccFrameEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager) :AccEventListener(pAcc, pManager) { diff --git a/winaccessibility/source/service/msaaservice_impl.cxx b/winaccessibility/source/service/msaaservice_impl.cxx index dcc493718acc..3891b6df4872 100644 --- a/winaccessibility/source/service/msaaservice_impl.cxx +++ b/winaccessibility/source/service/msaaservice_impl.cxx @@ -35,14 +35,14 @@ #include <prewin.h> #include <postwin.h> +#include <AccTopWindowListener.hxx> + using namespace ::com::sun::star; // for odk interfaces using namespace ::com::sun::star::uno; // for basic types using namespace ::com::sun::star::accessibility; using namespace ::com::sun::star::awt; -#include <AccTopWindowListener.hxx> - namespace my_sc_impl { |