[Libreoffice-commits] .: cui/source dbaccess/source fpicker/source framework/inc framework/source scripting/source sfx2/inc svl/source svtools/inc svtools/source svx/source unotools/source

Thomas Arnhold tarnhold at kemper.freedesktop.org
Fri Apr 20 20:54:05 PDT 2012


 cui/source/inc/acccfg.hxx                                          |    6 -----
 cui/source/inc/cfgutil.hxx                                         |    4 ---
 dbaccess/source/ui/control/sqledit.cxx                             |    6 -----
 fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx |    8 -------
 fpicker/source/win32/filepicker/VistaFilePicker.hxx                |    8 -------
 fpicker/source/win32/filepicker/VistaFilePickerEventHandler.hxx    |    8 -------
 fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx            |    8 -------
 fpicker/source/win32/filepicker/asyncrequests.hxx                  |    8 -------
 fpicker/source/win32/filepicker/vistatypes.h                       |    8 -------
 framework/inc/framework/preventduplicateinteraction.hxx            |   10 +--------
 framework/inc/framework/titlehelper.hxx                            |   10 +--------
 framework/source/inc/accelerators/storageholder.hxx                |   10 +--------
 framework/source/uielement/statusbarmanager.cxx                    |    4 ---
 scripting/source/inc/util/MiscUtils.hxx                            |    4 +--
 scripting/source/protocolhandler/scripthandler.cxx                 |    3 --
 scripting/source/provider/ActiveMSPList.hxx                        |    4 +--
 scripting/source/provider/BrowseNodeFactoryImpl.hxx                |    4 +--
 scripting/source/provider/MasterScriptProvider.hxx                 |    4 +--
 scripting/source/provider/MasterScriptProviderFactory.hxx          |    4 +--
 scripting/source/provider/ProviderCache.hxx                        |    4 +--
 scripting/source/provider/ScriptImpl.hxx                           |    5 +---
 scripting/source/provider/ScriptingContext.hxx                     |    5 ++--
 scripting/source/provider/URIHelper.hxx                            |    4 +--
 scripting/source/runtimemgr/ScriptNameResolverImpl.hxx             |    4 +--
 scripting/source/runtimemgr/ScriptRuntimeManager.hxx               |    4 +--
 scripting/source/runtimemgr/StorageBridge.hxx                      |    4 +--
 scripting/source/runtimemgr/StorageBridgeFactory.hxx               |    4 +--
 sfx2/inc/sfx2/sfxbasemodel.hxx                                     |    9 +-------
 svl/source/config/itemholder2.hxx                                  |   11 ----------
 svtools/inc/svtools/acceleratorexecute.hxx                         |    8 -------
 svtools/source/config/itemholder2.hxx                              |   10 ---------
 svx/source/inc/docrecovery.hxx                                     |   10 +--------
 unotools/source/config/itemholder1.hxx                             |    6 -----
 unotools/source/i18n/instance.hxx                                  |    3 --
 34 files changed, 53 insertions(+), 159 deletions(-)

New commits:
commit 2abba84aa7c639011956721a4922653130dd09a6
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sat Apr 21 01:30:38 2012 +0200

    Replace css macro with namespace for nicer namespacing

diff --git a/cui/source/inc/acccfg.hxx b/cui/source/inc/acccfg.hxx
index ec03c4a..1cfdc81 100644
--- a/cui/source/inc/acccfg.hxx
+++ b/cui/source/inc/acccfg.hxx
@@ -56,7 +56,7 @@
 #include <sfx2/minarray.hxx>
 #include "cfgutil.hxx"
 
-#define css ::com::sun::star
+namespace css = ::com::sun::star;
 
 class SfxMacroInfoItem;
 class SfxConfigGroupListBox_Impl;
@@ -219,10 +219,6 @@ public:
     virtual ~SvxShortcutAssignDlg();
 };
 
-
-
-#undef css
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx
index 94c764b..4e0fd27 100644
--- a/cui/source/inc/cfgutil.hxx
+++ b/cui/source/inc/cfgutil.hxx
@@ -51,7 +51,7 @@ class SfxMacroInfoItem;
 struct SfxStyleInfo_Impl;
 struct SfxStylesInfo_Impl;
 
-#define css ::com::sun::star
+namespace css = ::com::sun::star;
 
 struct SfxStyleInfo_Impl
 {
@@ -203,8 +203,6 @@ public:
     void                SetStylesInfo(SfxStylesInfo_Impl* pStyles);
 };
 
-#undef css
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx
index 765d6a7..3161879 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -45,11 +45,7 @@
 
 #include <svl/smplhint.hxx>
 
-namespace {
-
-namespace css = com::sun::star;
-
-}
+namespace css = ::com::sun::star;
 
 //////////////////////////////////////////////////////////////////////////
 // OSqlEdit
diff --git a/fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx b/fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx
index 47909d7..ca1b223 100644
--- a/fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx
+++ b/fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx
@@ -45,11 +45,7 @@
 // namespace
 //-----------------------------------------------------------------------------
 
-#ifdef css
-    #error "Clash on using CSS as namespace define."
-#else
-    #define css ::com::sun::star
-#endif
+namespace css = ::com::sun::star;
 
 namespace fpicker{
 namespace win32{
@@ -73,8 +69,6 @@ class IVistaFilePickerInternalNotify
 
 }}}
 
-#undef css
-
 #endif // FPICKER_WIN32_VISTA_FILEPICKER_INTERNALNOTIFY_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.hxx b/fpicker/source/win32/filepicker/VistaFilePicker.hxx
index 1a46ca0..1c0dd48 100644
--- a/fpicker/source/win32/filepicker/VistaFilePicker.hxx
+++ b/fpicker/source/win32/filepicker/VistaFilePicker.hxx
@@ -57,11 +57,7 @@
 // namespace
 //-----------------------------------------------------------------------------
 
-#ifdef css
-    #error "Clash on using CSS as namespace define."
-#else
-    #define css ::com::sun::star
-#endif
+namespace css = ::com::sun::star;
 
 namespace fpicker{
 namespace win32{
@@ -311,8 +307,6 @@ public:
 } // namespace win32
 } // namespace fpicker
 
-#undef css
-
 #endif  // FPICKER_WIN32_VISTA_FILEPICKER_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.hxx b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.hxx
index 76e6805..a63fbf8 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.hxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.hxx
@@ -57,11 +57,7 @@
 // namespace
 //-----------------------------------------------------------------------------
 
-#ifdef css
-    #error "Clash on using CSS as namespace define."
-#else
-    #define css ::com::sun::star
-#endif
+namespace css = ::com::sun::star;
 
 namespace fpicker{
 namespace win32{
@@ -224,8 +220,6 @@ class VistaFilePickerEventHandler : public ::cppu::BaseMutex
 } // namespace win32
 } // namespace fpicker
 
-#undef css
-
 #endif // __IFileDialogCustomize_INTERFACE_DEFINED__
 
 #endif  // FPICKER_WIN32_VISTA_FILEPICKER_EVENTHANDLER_HXX
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
index a8a07a2..f7dae0e 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
@@ -71,11 +71,7 @@
 // namespace
 //-----------------------------------------------------------------------------
 
-#ifdef css
-    #error "Clash on using CSS as namespace define."
-#else
-    #define css ::com::sun::star
-#endif
+namespace css = ::com::sun::star;
 
 namespace fpicker{
 namespace win32{
@@ -363,8 +359,6 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex
 } // namespace win32
 } // namespace fpicker
 
-#undef css
-
 #endif // __IFileDialogCustomize_INTERFACE_DEFINED__
 
 #endif // FPICKER_WIN32_VISTA_FILEPICKERIMPL_HXX
diff --git a/fpicker/source/win32/filepicker/asyncrequests.hxx b/fpicker/source/win32/filepicker/asyncrequests.hxx
index ba9b07e..7e7c9de 100644
--- a/fpicker/source/win32/filepicker/asyncrequests.hxx
+++ b/fpicker/source/win32/filepicker/asyncrequests.hxx
@@ -45,11 +45,7 @@
 // namespace
 //-----------------------------------------------------------------------------
 
-#ifdef css
-    #error "Clash on using CSS as namespace define."
-#else
-    #define css ::com::sun::star
-#endif
+namespace css = ::com::sun::star;
 
 namespace fpicker{
 namespace win32{
@@ -223,8 +219,6 @@ class AsyncRequests : private ::cppu::BaseMutex
 } // namespace win32
 } // namespace fpicker
 
-#undef css
-
 #endif // FPICKER_WIN32_VISTA_ASYNCREQUESTS_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/win32/filepicker/vistatypes.h b/fpicker/source/win32/filepicker/vistatypes.h
index 08b4613..e1b1fc5 100644
--- a/fpicker/source/win32/filepicker/vistatypes.h
+++ b/fpicker/source/win32/filepicker/vistatypes.h
@@ -40,11 +40,7 @@
 // namespace
 //-----------------------------------------------------------------------------
 
-#ifdef css
-    #error "Clash on using CSS as namespace define."
-#else
-    #define css ::com::sun::star
-#endif
+namespace css = ::com::sun::star;
 
 namespace fpicker{
 namespace win32{
@@ -64,8 +60,6 @@ typedef ComPtr< IFileDialogCustomize, IID_IFileDialogCustomize
 } // namespace win32
 } // namespace fpicker
 
-#undef css
-
 #endif // FPICKER_WIN32_VISTA_TYPES_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/inc/framework/preventduplicateinteraction.hxx b/framework/inc/framework/preventduplicateinteraction.hxx
index 692daaa..da9e836 100644
--- a/framework/inc/framework/preventduplicateinteraction.hxx
+++ b/framework/inc/framework/preventduplicateinteraction.hxx
@@ -52,13 +52,9 @@
 //  namespace
 //_________________________________________________________________________________________________________________
 
-namespace framework{
+namespace css = ::com::sun::star;
 
-#ifdef css
-    #error "Conflict during define of namespace alias ..."
-#else
-    #define css ::com::sun::star
-#endif
+namespace framework{
 
 //_________________________________________________________________________________________________________________
 //  exported const
@@ -266,8 +262,6 @@ class FWE_DLLPUBLIC PreventDuplicateInteraction : private ThreadHelpBase2
                                                   PreventDuplicateInteraction::InteractionInfo* pReturn     ) const;
 };
 
-#undef css
-
 } // namespace framework
 
 #endif // #ifndef __FRAMEWORK_INTERACTION_PREVENTDUPLICATEINTERACTION_HXX_
diff --git a/framework/inc/framework/titlehelper.hxx b/framework/inc/framework/titlehelper.hxx
index 6b3ba6c..a86bbaf 100644
--- a/framework/inc/framework/titlehelper.hxx
+++ b/framework/inc/framework/titlehelper.hxx
@@ -57,13 +57,9 @@
 //_______________________________________________
 // namespace
 
-namespace framework{
+namespace css = ::com::sun::star;
 
-#ifdef css
-    #error "Ambigious namespace definition of css."
-#else
-    #define css ::com::sun::star
-#endif
+namespace framework{
 
 //_______________________________________________
 // definitions
@@ -220,8 +216,6 @@ class FWE_DLLPUBLIC TitleHelper : private ::cppu::BaseMutex
         ::cppu::OMultiTypeInterfaceContainerHelper m_aListener;
 };
 
-#undef css
-
 } // namespace framework
 
 #endif // _FRAMEWORK_TITLEHELPER_HXX_
diff --git a/framework/source/inc/accelerators/storageholder.hxx b/framework/source/inc/accelerators/storageholder.hxx
index 741e971..78c1a28 100644
--- a/framework/source/inc/accelerators/storageholder.hxx
+++ b/framework/source/inc/accelerators/storageholder.hxx
@@ -51,15 +51,11 @@
 //===============================================
 // namespace
 
+namespace css = ::com::sun::star;
+
 namespace framework
 {
 
-#ifdef css
-    #error "Who defines css? I will use it as namespace alias inside header."
-#else
-    #define css ::com::sun::star
-#endif
-
 //===============================================
 // definitions
 
@@ -251,8 +247,6 @@ class StorageHolder : private ThreadHelpBase // attention! Must be the first bas
             static OUStringList impl_st_parsePath(const ::rtl::OUString& sPath);
 };
 
-#undef css // dont let it out!
-
 } // namespace framework
 
 #endif // __FRAMEWORK_ACCELERATORS_STORAGEHOLDER_HXX_
diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx
index ef15fe7..9afe6d9 100644
--- a/framework/source/uielement/statusbarmanager.cxx
+++ b/framework/source/uielement/statusbarmanager.cxx
@@ -69,9 +69,7 @@
 #include <rtl/logfile.hxx>
 
 using namespace ::com::sun::star;
-#ifndef css
-#define css ::com::sun::star
-#endif
+namespace css = ::com::sun::star;
 
 static const char HELPID_PREFIX[] = "helpid:";
 
diff --git a/scripting/source/inc/util/MiscUtils.hxx b/scripting/source/inc/util/MiscUtils.hxx
index 50d6933..5a8554b 100644
--- a/scripting/source/inc/util/MiscUtils.hxx
+++ b/scripting/source/inc/util/MiscUtils.hxx
@@ -48,10 +48,10 @@
 
 #include "util.hxx"
 
+namespace css = ::com::sun::star;
+
 namespace sf_misc
 {
-// for simplification
-#define css ::com::sun::star
 
 class MiscUtils
 {
diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx
index 73f4e56..7b12e68 100644
--- a/scripting/source/protocolhandler/scripthandler.cxx
+++ b/scripting/source/protocolhandler/scripthandler.cxx
@@ -509,8 +509,7 @@ const Reference< XMultiServiceFactory >& xServiceManager )
 extern "C"
 {
 
-#undef css
-#define css ::com::sun::star
+    namespace css = ::com::sun::star;
 
     SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char * pImplementationName ,
                                          void * pServiceManager ,
diff --git a/scripting/source/provider/ActiveMSPList.hxx b/scripting/source/provider/ActiveMSPList.hxx
index 42964cd..08eb70d 100644
--- a/scripting/source/provider/ActiveMSPList.hxx
+++ b/scripting/source/provider/ActiveMSPList.hxx
@@ -45,10 +45,10 @@
 
 #include <comphelper/stl_types.hxx>
 
+namespace css = ::com::sun::star;
+
 namespace func_provider
 {
-// for simplification
-#define css ::com::sun::star
 
 //Typedefs
 //=============================================================================
diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.hxx b/scripting/source/provider/BrowseNodeFactoryImpl.hxx
index 9594b6f..226f236 100644
--- a/scripting/source/provider/BrowseNodeFactoryImpl.hxx
+++ b/scripting/source/provider/BrowseNodeFactoryImpl.hxx
@@ -38,10 +38,10 @@
 #include <com/sun/star/script/browse/BrowseNodeTypes.hpp>
 #include <com/sun/star/script/browse/XBrowseNodeFactory.hpp>
 
+namespace css = ::com::sun::star;
+
 namespace browsenodefactory
 {
-// for simplification
-#define css ::com::sun::star
 
 class BrowseNodeFactoryImpl :
     public ::cppu::WeakImplHelper2 <
diff --git a/scripting/source/provider/MasterScriptProvider.hxx b/scripting/source/provider/MasterScriptProvider.hxx
index 89336a9..fa6c71e 100644
--- a/scripting/source/provider/MasterScriptProvider.hxx
+++ b/scripting/source/provider/MasterScriptProvider.hxx
@@ -45,10 +45,10 @@
 
 #include "ProviderCache.hxx"
 
+namespace css = ::com::sun::star;
+
 namespace func_provider
 {
-// for simplification
-#define css ::com::sun::star
 
  typedef ::cppu::WeakImplHelper5<
      css::script::provider::XScriptProvider,
diff --git a/scripting/source/provider/MasterScriptProviderFactory.hxx b/scripting/source/provider/MasterScriptProviderFactory.hxx
index 9db031e..cf1a67f 100644
--- a/scripting/source/provider/MasterScriptProviderFactory.hxx
+++ b/scripting/source/provider/MasterScriptProviderFactory.hxx
@@ -39,10 +39,10 @@
 
 #include "ActiveMSPList.hxx"
 
+namespace css = ::com::sun::star;
+
 namespace func_provider
 {
-// for simplification
-#define css ::com::sun::star
 
 class MasterScriptProviderFactory :
     public ::cppu::WeakImplHelper2 <
diff --git a/scripting/source/provider/ProviderCache.hxx b/scripting/source/provider/ProviderCache.hxx
index db1c7d3..ebb6d34 100644
--- a/scripting/source/provider/ProviderCache.hxx
+++ b/scripting/source/provider/ProviderCache.hxx
@@ -44,10 +44,10 @@
 
 #include "ScriptingContext.hxx"
 
+namespace css = ::com::sun::star;
+
 namespace func_provider
 {
-// for simplification
-#define css ::com::sun::star
 
 //Typedefs
 //=============================================================================
diff --git a/scripting/source/provider/ScriptImpl.hxx b/scripting/source/provider/ScriptImpl.hxx
index b49f245..d7e6b41 100644
--- a/scripting/source/provider/ScriptImpl.hxx
+++ b/scripting/source/provider/ScriptImpl.hxx
@@ -41,11 +41,10 @@
 #include <drafts/com/sun/star/script/framework/provider/XScript.hpp>
 #include <drafts/com/sun/star/script/framework/runtime/XScriptInvocation.hpp>
 
+namespace css = ::com::sun::star;
+
 namespace func_provider
 {
-// for simplification
-#define css ::com::sun::star
-
 
 class ScriptImpl :
             public ::cppu::WeakImplHelper1 < ::drafts::com::sun::star::script::framework::provider::XScript >
diff --git a/scripting/source/provider/ScriptingContext.hxx b/scripting/source/provider/ScriptingContext.hxx
index 97998c2..afb5bf7 100644
--- a/scripting/source/provider/ScriptingContext.hxx
+++ b/scripting/source/provider/ScriptingContext.hxx
@@ -44,10 +44,11 @@
 #include <com/sun/star/uno/RuntimeException.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <comphelper/broadcasthelper.hxx>
+
+namespace css = ::com::sun::star;
+
 namespace func_provider
 {
-// for simplification
-#define css ::com::sun::star
 
 //Typedefs
 //=============================================================================
diff --git a/scripting/source/provider/URIHelper.hxx b/scripting/source/provider/URIHelper.hxx
index 25683dc..b1e8946 100644
--- a/scripting/source/provider/URIHelper.hxx
+++ b/scripting/source/provider/URIHelper.hxx
@@ -40,11 +40,11 @@
 #include <rtl/ustring.hxx>
 #include <cppuhelper/implbase3.hxx>
 
+namespace css = ::com::sun::star;
+
 namespace func_provider
 {
 
-#define css ::com::sun::star
-
 class ScriptingFrameworkURIHelper :
     public ::cppu::WeakImplHelper3<
         css::script::provider::XScriptURIHelper,
diff --git a/scripting/source/runtimemgr/ScriptNameResolverImpl.hxx b/scripting/source/runtimemgr/ScriptNameResolverImpl.hxx
index 4a068ed..3df87d2 100644
--- a/scripting/source/runtimemgr/ScriptNameResolverImpl.hxx
+++ b/scripting/source/runtimemgr/ScriptNameResolverImpl.hxx
@@ -41,10 +41,10 @@
 #include <drafts/com/sun/star/script/framework/storage/XScriptInfoAccess.hpp>
 #include <drafts/com/sun/star/script/framework/storage/XScriptInfo.hpp>
 
+namespace css = ::com::sun::star;
+
 namespace scripting_runtimemgr
 {
-// for simplification
-#define css ::com::sun::star
 
 class ScriptNameResolverImpl : public
     ::cppu::WeakImplHelper1 < ::drafts::com::sun::star::script::framework::runtime::XScriptNameResolver >
diff --git a/scripting/source/runtimemgr/ScriptRuntimeManager.hxx b/scripting/source/runtimemgr/ScriptRuntimeManager.hxx
index 33fea58..6850027 100644
--- a/scripting/source/runtimemgr/ScriptRuntimeManager.hxx
+++ b/scripting/source/runtimemgr/ScriptRuntimeManager.hxx
@@ -44,10 +44,10 @@
 #include <drafts/com/sun/star/script/framework/runtime/XScriptInvocation.hpp>
 #include <drafts/com/sun/star/script/framework/runtime/XScriptNameResolver.hpp>
 
+namespace css = ::com::sun::star;
+
 namespace scripting_runtimemgr
 {
-// for simplification
-#define css ::com::sun::star
 
 /**
  * Class responsible for managing the various ScriptRuntime implementations.
diff --git a/scripting/source/runtimemgr/StorageBridge.hxx b/scripting/source/runtimemgr/StorageBridge.hxx
index 153d174..3f407b0 100644
--- a/scripting/source/runtimemgr/StorageBridge.hxx
+++ b/scripting/source/runtimemgr/StorageBridge.hxx
@@ -36,10 +36,10 @@
 #include <drafts/com/sun/star/script/framework/storage/XScriptInfoAccess.hpp>
 #include "StorageBridgeFactory.hxx"
 
+namespace css = ::com::sun::star;
+
 namespace scripting_runtimemgr
 {
-// for simplification
-#define css ::com::sun::star
 
 class StorageBridge : public ::cppu::WeakImplHelper1< ::drafts::com::sun::star::script::framework::storage::XScriptInfoAccess >
 {
diff --git a/scripting/source/runtimemgr/StorageBridgeFactory.hxx b/scripting/source/runtimemgr/StorageBridgeFactory.hxx
index 35f774d..e4f2970 100644
--- a/scripting/source/runtimemgr/StorageBridgeFactory.hxx
+++ b/scripting/source/runtimemgr/StorageBridgeFactory.hxx
@@ -37,10 +37,10 @@
 
 #include <drafts/com/sun/star/script/framework/storage/XScriptInfoAccess.hpp>
 
+namespace css = ::com::sun::star;
+
 namespace scripting_runtimemgr
 {
-// for simplification
-#define css ::com::sun::star
 
 class StorageBridgeFactory
 {
diff --git a/sfx2/inc/sfx2/sfxbasemodel.hxx b/sfx2/inc/sfx2/sfxbasemodel.hxx
index e3e0350..82a27c9 100644
--- a/sfx2/inc/sfx2/sfxbasemodel.hxx
+++ b/sfx2/inc/sfx2/sfxbasemodel.hxx
@@ -187,11 +187,8 @@
 //________________________________________________________________________________________________________
 //  namespace
 //________________________________________________________________________________________________________
-#ifdef css
-    #error "class is using css as namespace define .-)"
-#else
-    #define css ::com::sun::star
-#endif
+
+namespace css = ::com::sun::star;
 
 //________________________________________________________________________________________________________
 //  forwards
@@ -1640,8 +1637,6 @@ private:
     SolarMutexResettableGuard  m_aGuard;
 };
 
-#undef css
-
 #endif // _SFX_SFXBASEMODEL_HXX_
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/source/config/itemholder2.hxx b/svl/source/config/itemholder2.hxx
index 884536d..18c7e9b 100644
--- a/svl/source/config/itemholder2.hxx
+++ b/svl/source/config/itemholder2.hxx
@@ -39,11 +39,7 @@
 //-----------------------------------------------
 // namespaces
 
-#ifdef css
-#error "Cant use css as namespace alias."
-#else
-#define css ::com::sun::star
-#endif
+namespace css = ::com::sun::star;
 
 //-----------------------------------------------
 // definitions
@@ -82,11 +78,6 @@ class ItemHolder2 : private ItemHolderMutexBase
         void impl_deleteItem(TItemInfo& rItem);
 };
 
-//-----------------------------------------------
-// namespaces
-
-#undef css
-
 #endif // INCLUDED_SVTOOLS_ITEMHOLDER2_HXX_
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/inc/svtools/acceleratorexecute.hxx b/svtools/inc/svtools/acceleratorexecute.hxx
index ec2a69e..321c538 100644
--- a/svtools/inc/svtools/acceleratorexecute.hxx
+++ b/svtools/inc/svtools/acceleratorexecute.hxx
@@ -58,11 +58,7 @@
 //===============================================
 // namespace
 
-#ifdef css
-    #error "Conflict on using css as namespace alias!"
-#else
-    #define css ::com::sun::star
-#endif
+namespace css = ::com::sun::star;
 
 namespace svt
 {
@@ -271,8 +267,6 @@ class SVT_DLLPUBLIC AcceleratorExecute : private TMutexInit
 
 } // namespace svt
 
-#undef css
-
 #endif // INCLUDED_SVTOOLS_ACCELERATOREXECUTE_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/config/itemholder2.hxx b/svtools/source/config/itemholder2.hxx
index 1e0ade7..bd4ac34 100644
--- a/svtools/source/config/itemholder2.hxx
+++ b/svtools/source/config/itemholder2.hxx
@@ -39,11 +39,7 @@
 //-----------------------------------------------
 // namespaces
 
-#ifdef css
-#error "Cant use css as namespace alias."
-#else
-#define css ::com::sun::star
-#endif
+namespace css = ::com::sun::star;
 
 namespace svtools {
 //-----------------------------------------------
@@ -84,10 +80,6 @@ class ItemHolder2 : private ItemHolderMutexBase
 };
 
 } // namespace svtools
-//-----------------------------------------------
-// namespaces
-
-#undef css
 
 #endif // INCLUDED_SVTOOLS_ITEMHOLDER2_HXX_
 
diff --git a/svx/source/inc/docrecovery.hxx b/svx/source/inc/docrecovery.hxx
index ec4b9df..dfbd66c 100644
--- a/svx/source/inc/docrecovery.hxx
+++ b/svx/source/inc/docrecovery.hxx
@@ -99,15 +99,11 @@
 //===============================================
 // namespace
 
+namespace css = ::com::sun::star;
+
 namespace svx{
     namespace DocRecovery{
 
-#ifdef css
-#   error "Who uses css? I need it as temp. namespace alias!"
-#else
-#   define css ::com::sun::star
-#endif
-
 //===============================================
 enum EDocStates
 {
@@ -953,8 +949,6 @@ class BrokenRecoveryDialog : public ModalDialog
     }   // namespace DocRecovery
 }   // namespace svx
 
-#undef css
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unotools/source/config/itemholder1.hxx b/unotools/source/config/itemholder1.hxx
index e04b423..aa0775e 100644
--- a/unotools/source/config/itemholder1.hxx
+++ b/unotools/source/config/itemholder1.hxx
@@ -39,11 +39,7 @@
 //-----------------------------------------------
 // namespaces
 
-#ifdef css
-#error "Cant use css as namespace alias."
-#else
-#define css ::com::sun::star
-#endif
+namespace css = ::com::sun::star;
 
 //-----------------------------------------------
 // definitions
diff --git a/unotools/source/i18n/instance.hxx b/unotools/source/i18n/instance.hxx
index 4c18d38..6a1a069 100644
--- a/unotools/source/i18n/instance.hxx
+++ b/unotools/source/i18n/instance.hxx
@@ -33,8 +33,7 @@
 #include <rtl/oustringostreaminserter.hxx>
 #include <rtl/strbuf.hxx>
 
-// ugly but so is this namespacing evil.
-#define css ::com::sun::star
+namespace css = ::com::sun::star;
 
 // Helper to share code between activators with a fallback MSF.
 // Potentially this may also needs to find the library the component


More information about the Libreoffice-commits mailing list