[Libreoffice-commits] .: svtools/inc

Joseph Powers jpowers at kemper.freedesktop.org
Fri Feb 4 19:17:09 PST 2011


 svtools/inc/framestatuslistener.hxx       |   21 ++++++----------
 svtools/inc/statusbarcontroller.hxx       |   39 +++++++++++++-----------------
 svtools/inc/svtools/toolboxcontroller.hxx |    4 ---
 3 files changed, 28 insertions(+), 36 deletions(-)

New commits:
commit c8654eacdcb75d97218d9dcd70347f7ac974904b
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Fri Feb 4 19:16:49 2011 -0800

    Remove some more INCLUDED_HASH_MAP guards.
    
    INCLUDED_HASH_MAP is used for <hash_map> also which can cause issues.
    unordered_map.hpp has it's own internal guard so its safe to just remove
    the exernal guard.

diff --git a/svtools/inc/framestatuslistener.hxx b/svtools/inc/framestatuslistener.hxx
index c321229..4a41d93 100644
--- a/svtools/inc/framestatuslistener.hxx
+++ b/svtools/inc/framestatuslistener.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -40,10 +40,7 @@
 #include <cppuhelper/interfacecontainer.hxx>
 #include <comphelper/broadcasthelper.hxx>
 
-#ifndef INCLUDED_HASH_MAP
 #include <boost/unordered_map.hpp>
-#define INCLUDED_HASH_MAP
-#endif
 
 namespace svt
 {
@@ -58,12 +55,12 @@ class SVT_DLLPUBLIC FrameStatusListener : public ::com::sun::star::frame::XStatu
         FrameStatusListener( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager,
                              const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame );
         virtual ~FrameStatusListener();
-        
+
         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > getFrameInterface() const;
         ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getServiceManager() const;
-        
+
         void updateStatus( const rtl::OUString aCommandURL );
-        
+
         // methods to support status forwarder, known by the old sfx2 toolbox controller implementation
         void addStatusListener( const rtl::OUString& aCommandURL );
         void removeStatusListener( const rtl::OUString& aCommandURL );
@@ -80,22 +77,22 @@ class SVT_DLLPUBLIC FrameStatusListener : public ::com::sun::star::frame::XStatu
         virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
         virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
         virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
-        
+
         // XEventListener
         virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException );
-        
+
         // XStatusListener
         virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ) = 0;
 
         // XFrameActionListener
         virtual void SAL_CALL frameAction( const com::sun::star::frame::FrameActionEvent& Action ) throw ( ::com::sun::star::uno::RuntimeException );
-    
+
     protected:
         struct Listener
         {
             Listener( const ::com::sun::star::util::URL& rURL, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& rDispatch ) :
                 aURL( rURL ), xDispatch( rDispatch ) {}
-            
+
             ::com::sun::star::util::URL aURL;
             ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatch;
         };
@@ -104,7 +101,7 @@ class SVT_DLLPUBLIC FrameStatusListener : public ::com::sun::star::frame::XStatu
                                  com::sun::star::uno::Reference< com::sun::star::frame::XDispatch >,
                                  ::rtl::OUStringHash,
                                  ::std::equal_to< ::rtl::OUString > > URLToDispatchMap;
-        
+
         sal_Bool                                                                            m_bInitialized : 1,
                                                                                             m_bDisposed : 1;
         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >                 m_xFrame;
diff --git a/svtools/inc/statusbarcontroller.hxx b/svtools/inc/statusbarcontroller.hxx
index 1738aed..0703a87 100644
--- a/svtools/inc/statusbarcontroller.hxx
+++ b/svtools/inc/statusbarcontroller.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -43,10 +43,7 @@
 #include <cppuhelper/interfacecontainer.hxx>
 #include <comphelper/broadcasthelper.hxx>
 
-#ifndef INCLUDED_HASH_MAP
 #include <boost/unordered_map.hpp>
-#define INCLUDED_HASH_MAP
-#endif
 
 #include <tools/gen.hxx>
 
@@ -67,8 +64,8 @@ class SVT_DLLPUBLIC StatusbarController : public ::com::sun::star::frame::XStatu
                              const rtl::OUString& aCommandURL,
                              unsigned short       nID );
         StatusbarController();
-        virtual ~StatusbarController();        
-        
+        virtual ~StatusbarController();
+
         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > getFrameInterface() const;
         ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getServiceManager() const;
         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager > getLayoutManager() const;
@@ -78,7 +75,7 @@ class SVT_DLLPUBLIC StatusbarController : public ::com::sun::star::frame::XStatu
         void updateStatus();
 
         ::Rectangle getControlRect() const;
-        
+
         // XInterface
         virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
         virtual void SAL_CALL acquire() throw ();
@@ -86,18 +83,18 @@ class SVT_DLLPUBLIC StatusbarController : public ::com::sun::star::frame::XStatu
 
         // XInitialization
         virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
-            
+
         // XUpdatable
         virtual void SAL_CALL update() throw (::com::sun::star::uno::RuntimeException);
-        
+
         // XComponent
         virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
         virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
         virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
-        
+
         // XEventListener
         virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException );
-        
+
         // XStatusListener
         virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
 
@@ -105,22 +102,22 @@ class SVT_DLLPUBLIC StatusbarController : public ::com::sun::star::frame::XStatu
         virtual ::sal_Bool SAL_CALL mouseButtonDown( const ::com::sun::star::awt::MouseEvent& aMouseEvent ) throw (::com::sun::star::uno::RuntimeException);
         virtual ::sal_Bool SAL_CALL mouseMove( const ::com::sun::star::awt::MouseEvent& aMouseEvent ) throw (::com::sun::star::uno::RuntimeException);
         virtual ::sal_Bool SAL_CALL mouseButtonUp( const ::com::sun::star::awt::MouseEvent& aMouseEvent ) throw (::com::sun::star::uno::RuntimeException);
-        virtual void SAL_CALL command( const ::com::sun::star::awt::Point& aPos, 
-                                       ::sal_Int32 nCommand, 
-                                       ::sal_Bool bMouseEvent, 
+        virtual void SAL_CALL command( const ::com::sun::star::awt::Point& aPos,
+                                       ::sal_Int32 nCommand,
+                                       ::sal_Bool bMouseEvent,
                                        const ::com::sun::star::uno::Any& aData ) throw (::com::sun::star::uno::RuntimeException);
-        virtual void SAL_CALL paint( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics >& xGraphics, 
-                                     const ::com::sun::star::awt::Rectangle& rOutputRectangle, 
+        virtual void SAL_CALL paint( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics >& xGraphics,
+                                     const ::com::sun::star::awt::Rectangle& rOutputRectangle,
                                      ::sal_Int32 nItemId, ::sal_Int32 nStyle ) throw (::com::sun::star::uno::RuntimeException);
         virtual void SAL_CALL click() throw (::com::sun::star::uno::RuntimeException);
         virtual void SAL_CALL doubleClick() throw (::com::sun::star::uno::RuntimeException);
- 
+
     protected:
         struct Listener
         {
             Listener( const ::com::sun::star::util::URL& rURL, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& rDispatch ) :
                 aURL( rURL ), xDispatch( rDispatch ) {}
-            
+
             ::com::sun::star::util::URL aURL;
             ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatch;
         };
@@ -129,19 +126,19 @@ class SVT_DLLPUBLIC StatusbarController : public ::com::sun::star::frame::XStatu
                                  com::sun::star::uno::Reference< com::sun::star::frame::XDispatch >,
                                  ::rtl::OUStringHash,
                                  ::std::equal_to< ::rtl::OUString > > URLToDispatchMap;
-        
+
         // methods to support status forwarder, known by the old sfx2 toolbox controller implementation
         void addStatusListener( const rtl::OUString& aCommandURL );
         void removeStatusListener( const rtl::OUString& aCommandURL );
         void bindListener();
         void unbindListener();
         sal_Bool isBound() const;
-        
+
         // execute methods
         // execute bound status bar controller command/execute various commands
         void execute( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs );
         void execute( const rtl::OUString& aCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs );
-        
+
         sal_Bool                                                                            m_bInitialized : 1,
                                                                                             m_bDisposed : 1;
         unsigned short                                                                      m_nID;
diff --git a/svtools/inc/svtools/toolboxcontroller.hxx b/svtools/inc/svtools/toolboxcontroller.hxx
index e9de271..f60af17 100644
--- a/svtools/inc/svtools/toolboxcontroller.hxx
+++ b/svtools/inc/svtools/toolboxcontroller.hxx
@@ -50,10 +50,8 @@
 #include <cppuhelper/propshlp.hxx>
 #include <cppuhelper/interfacecontainer.hxx>
 //end
-#ifndef INCLUDED_HASH_MAP
+
 #include <boost/unordered_map.hpp>
-#define INCLUDED_HASH_MAP
-#endif
 
 class ToolBox;
 


More information about the Libreoffice-commits mailing list