[Libreoffice-commits] core.git: vcl/inc

Tor Lillqvist tml at collabora.com
Wed Mar 26 00:56:16 PDT 2014


 vcl/inc/generic/geninst.h    |   30 ++++++++++++------------
 vcl/inc/headless/svpinst.hxx |   53 +++++++++++++++++++++----------------------
 vcl/inc/unx/gtk/gtkinst.hxx  |   47 +++++++++++++++++++-------------------
 vcl/inc/unx/salinst.h        |   35 ++++++++++++++--------------
 4 files changed, 83 insertions(+), 82 deletions(-)

New commits:
commit 99a79ef856fb6b02196f71e67907a6a45940de01
Author: Tor Lillqvist <tml at collabora.com>
Date:   Wed Mar 26 09:52:04 2014 +0200

    Sprinkle some SAL_OVERRIDEs
    
    Add SAL_OVERRIDE markup to SalInstance and its derived classes for Unix. In
    the process, found one pointlessly virtual function (not overridden in any
    derived class).
    
    Change-Id: I49e021e77d53b658e664178372b333a13ffdc9aa

diff --git a/vcl/inc/generic/geninst.h b/vcl/inc/generic/geninst.h
index 75a4a65..adc05a6 100644
--- a/vcl/inc/generic/geninst.h
+++ b/vcl/inc/generic/geninst.h
@@ -83,25 +83,25 @@ public:
     virtual ~SalGenericInstance();
 
     // Yield mutex
-    virtual comphelper::SolarMutex* GetYieldMutex();
-    virtual sal_uIntPtr         ReleaseYieldMutex();
-    virtual void                AcquireYieldMutex( sal_uIntPtr nCount );
-    virtual bool                CheckYieldMutex();
+    virtual comphelper::SolarMutex* GetYieldMutex() SAL_OVERRIDE;
+    virtual sal_uIntPtr         ReleaseYieldMutex() SAL_OVERRIDE;
+    virtual void                AcquireYieldMutex( sal_uIntPtr nCount ) SAL_OVERRIDE;
+    virtual bool                CheckYieldMutex() SAL_OVERRIDE;
 
     // Printing
     virtual SalInfoPrinter*     CreateInfoPrinter      ( SalPrinterQueueInfo* pQueueInfo,
-                                                         ImplJobSetup* pSetupData );
-    virtual void                DestroyInfoPrinter     ( SalInfoPrinter* pPrinter );
-    virtual SalPrinter*         CreatePrinter          ( SalInfoPrinter* pInfoPrinter );
-    virtual void                DestroyPrinter         ( SalPrinter* pPrinter );
-    virtual void                GetPrinterQueueInfo    ( ImplPrnQueueList* pList );
-    virtual void                GetPrinterQueueState   ( SalPrinterQueueInfo* pInfo );
-    virtual void                DeletePrinterQueueInfo ( SalPrinterQueueInfo* pInfo );
-    virtual OUString       GetDefaultPrinter();
+                                                         ImplJobSetup* pSetupData ) SAL_OVERRIDE;
+    virtual void                DestroyInfoPrinter     ( SalInfoPrinter* pPrinter ) SAL_OVERRIDE;
+    virtual SalPrinter*         CreatePrinter          ( SalInfoPrinter* pInfoPrinter ) SAL_OVERRIDE;
+    virtual void                DestroyPrinter         ( SalPrinter* pPrinter ) SAL_OVERRIDE;
+    virtual void                GetPrinterQueueInfo    ( ImplPrnQueueList* pList ) SAL_OVERRIDE;
+    virtual void                GetPrinterQueueState   ( SalPrinterQueueInfo* pInfo ) SAL_OVERRIDE;
+    virtual void                DeletePrinterQueueInfo ( SalPrinterQueueInfo* pInfo ) SAL_OVERRIDE;
+    virtual OUString            GetDefaultPrinter() SAL_OVERRIDE;
     virtual void                PostPrintersChanged() = 0;
-    virtual void                updatePrinterUpdate();
-    virtual void                jobStartedPrinterUpdate();
-    virtual void                jobEndedPrinterUpdate();
+    virtual void                updatePrinterUpdate() SAL_OVERRIDE;
+    virtual void                jobStartedPrinterUpdate() SAL_OVERRIDE;
+    virtual void                jobEndedPrinterUpdate() SAL_OVERRIDE;
     bool isPrinterInit() const { return mbPrinterInit; }
     virtual GenPspGraphics     *CreatePrintGraphics() = 0;
 
diff --git a/vcl/inc/headless/svpinst.hxx b/vcl/inc/headless/svpinst.hxx
index 4090e35..d071e4c 100644
--- a/vcl/inc/headless/svpinst.hxx
+++ b/vcl/inc/headless/svpinst.hxx
@@ -82,8 +82,7 @@ class SvpSalInstance : public SalGenericInstance
 
     bool                    isFrameAlive( const SalFrame* pFrame ) const;
 
-protected:
-    virtual void            DoReleaseYield( int nTimeoutMS );
+    void                    DoReleaseYield( int nTimeoutMS );
 
 public:
     static SvpSalInstance*  s_pDefaultInstance;
@@ -107,13 +106,13 @@ public:
     bool                    CheckTimeout( bool bExecuteTimers = true );
 
     // Frame
-    virtual SalFrame*       CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle );
-    virtual SalFrame*       CreateFrame( SalFrame* pParent, sal_uLong nStyle );
-    virtual void            DestroyFrame( SalFrame* pFrame );
+    virtual SalFrame*       CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle ) SAL_OVERRIDE;
+    virtual SalFrame*       CreateFrame( SalFrame* pParent, sal_uLong nStyle ) SAL_OVERRIDE;
+    virtual void            DestroyFrame( SalFrame* pFrame ) SAL_OVERRIDE;
 
     // Object (System Child Window)
-    virtual SalObject*      CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, bool bShow = true );
-    virtual void            DestroyObject( SalObject* pObject );
+    virtual SalObject*      CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, bool bShow = true ) SAL_OVERRIDE;
+    virtual void            DestroyObject( SalObject* pObject ) SAL_OVERRIDE;
 
     // VirtualDevice
     // nDX and nDY in Pixel
@@ -121,47 +120,47 @@ public:
     // pData allows for using a system dependent graphics or device context
     virtual SalVirtualDevice*   CreateVirtualDevice( SalGraphics* pGraphics,
                                                      long nDX, long nDY,
-                                                     sal_uInt16 nBitCount, const SystemGraphicsData *pData = NULL );
+                                                     sal_uInt16 nBitCount, const SystemGraphicsData *pData = NULL ) SAL_OVERRIDE;
 
     // Printer
     // pSetupData->mpDriverData can be 0
     // pSetupData must be updatet with the current
     // JobSetup
     virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo,
-                                               ImplJobSetup* pSetupData );
-    virtual void            DestroyInfoPrinter( SalInfoPrinter* pPrinter );
-    virtual SalPrinter*     CreatePrinter( SalInfoPrinter* pInfoPrinter );
-    virtual void            DestroyPrinter( SalPrinter* pPrinter );
+                                               ImplJobSetup* pSetupData ) SAL_OVERRIDE;
+    virtual void            DestroyInfoPrinter( SalInfoPrinter* pPrinter ) SAL_OVERRIDE;
+    virtual SalPrinter*     CreatePrinter( SalInfoPrinter* pInfoPrinter ) SAL_OVERRIDE;
+    virtual void            DestroyPrinter( SalPrinter* pPrinter ) SAL_OVERRIDE;
 
-    virtual void            GetPrinterQueueInfo( ImplPrnQueueList* pList );
-    virtual void            GetPrinterQueueState( SalPrinterQueueInfo* pInfo );
-    virtual void            DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo );
-    virtual OUString   GetDefaultPrinter();
-    virtual void            PostPrintersChanged();
+    virtual void            GetPrinterQueueInfo( ImplPrnQueueList* pList ) SAL_OVERRIDE;
+    virtual void            GetPrinterQueueState( SalPrinterQueueInfo* pInfo ) SAL_OVERRIDE;
+    virtual void            DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ) SAL_OVERRIDE;
+    virtual OUString        GetDefaultPrinter() SAL_OVERRIDE;
+    virtual void            PostPrintersChanged() SAL_OVERRIDE;
 
     // SalTimer
-    virtual SalTimer*       CreateSalTimer();
+    virtual SalTimer*       CreateSalTimer() SAL_OVERRIDE;
     // SalI18NImeStatus
-    virtual SalI18NImeStatus*   CreateI18NImeStatus();
+    virtual SalI18NImeStatus*   CreateI18NImeStatus() SAL_OVERRIDE;
     // SalSystem
-    virtual SalSystem*      CreateSalSystem();
+    virtual SalSystem*      CreateSalSystem() SAL_OVERRIDE;
     // SalBitmap
-    virtual SalBitmap*      CreateSalBitmap();
+    virtual SalBitmap*      CreateSalBitmap() SAL_OVERRIDE;
 
     // wait next event and dispatch
     // must returned by UserEvent (SalFrame::PostEvent)
     // and timer
-    virtual void            Yield( bool bWait, bool bHandleAllCurrentEvents );
-    virtual bool            AnyInput( sal_uInt16 nType );
+    virtual void            Yield( bool bWait, bool bHandleAllCurrentEvents ) SAL_OVERRIDE;
+    virtual bool            AnyInput( sal_uInt16 nType ) SAL_OVERRIDE;
 
     // may return NULL to disable session management
-    virtual SalSession*     CreateSalSession();
+    virtual SalSession*     CreateSalSession() SAL_OVERRIDE;
 
-    virtual void*           GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes );
+    virtual void*           GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ) SAL_OVERRIDE;
 
-    virtual void            AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService);
+    virtual void            AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService) SAL_OVERRIDE;
 
-    virtual GenPspGraphics *CreatePrintGraphics();
+    virtual GenPspGraphics *CreatePrintGraphics() SAL_OVERRIDE;
 };
 
 #endif // INCLUDED_VCL_INC_HEADLESS_SVPINST_HXX
diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx
index bb997a6..7503820 100644
--- a/vcl/inc/unx/gtk/gtkinst.hxx
+++ b/vcl/inc/unx/gtk/gtkinst.hxx
@@ -67,39 +67,39 @@ public:
             GtkInstance( SalYieldMutex* pMutex );
     virtual ~GtkInstance();
     void    EnsureInit();
-    virtual void AfterAppInit();
-
-    virtual SalFrame*           CreateFrame( SalFrame* pParent, sal_uLong nStyle );
-    virtual SalFrame*           CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle );
-    virtual SalObject*          CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, bool bShow = true );
-    virtual SalSystem*          CreateSalSystem();
-    virtual SalInfoPrinter*     CreateInfoPrinter(SalPrinterQueueInfo* pPrinterQueueInfo, ImplJobSetup* pJobSetup);
-    virtual SalPrinter*         CreatePrinter( SalInfoPrinter* pInfoPrinter );
-    virtual SalMenu*            CreateMenu( bool, Menu* );
-    virtual void                DestroyMenu( SalMenu* pMenu );
-    virtual SalMenuItem*        CreateMenuItem( const SalItemParams* );
-    virtual void                DestroyMenuItem( SalMenuItem* pItem );
-    virtual SalTimer*           CreateSalTimer();
-    virtual void                AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService);
+    virtual void AfterAppInit() SAL_OVERRIDE;
+
+    virtual SalFrame*           CreateFrame( SalFrame* pParent, sal_uLong nStyle ) SAL_OVERRIDE;
+    virtual SalFrame*           CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle ) SAL_OVERRIDE;
+    virtual SalObject*          CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, bool bShow = true ) SAL_OVERRIDE;
+    virtual SalSystem*          CreateSalSystem() SAL_OVERRIDE;
+    virtual SalInfoPrinter*     CreateInfoPrinter(SalPrinterQueueInfo* pPrinterQueueInfo, ImplJobSetup* pJobSetup) SAL_OVERRIDE;
+    virtual SalPrinter*         CreatePrinter( SalInfoPrinter* pInfoPrinter ) SAL_OVERRIDE;
+    virtual SalMenu*            CreateMenu( bool, Menu* ) SAL_OVERRIDE;
+    virtual void                DestroyMenu( SalMenu* pMenu ) SAL_OVERRIDE;
+    virtual SalMenuItem*        CreateMenuItem( const SalItemParams* ) SAL_OVERRIDE;
+    virtual void                DestroyMenuItem( SalMenuItem* pItem ) SAL_OVERRIDE;
+    virtual SalTimer*           CreateSalTimer() SAL_OVERRIDE;
+    virtual void                AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService) SAL_OVERRIDE;
     virtual SalVirtualDevice*   CreateVirtualDevice( SalGraphics*,
                                                      long nDX, long nDY,
                                                      sal_uInt16 nBitCount,
-                                                     const SystemGraphicsData* );
-    virtual SalBitmap*          CreateSalBitmap();
+                                                     const SystemGraphicsData* ) SAL_OVERRIDE;
+    virtual SalBitmap*          CreateSalBitmap() SAL_OVERRIDE;
 
-    virtual void                Yield( bool bWait, bool bHandleAllCurrentEvents );
-    virtual bool                AnyInput( sal_uInt16 nType );
+    virtual void                Yield( bool bWait, bool bHandleAllCurrentEvents ) SAL_OVERRIDE;
+    virtual bool                AnyInput( sal_uInt16 nType ) SAL_OVERRIDE;
 
-    virtual GenPspGraphics     *CreatePrintGraphics();
+    virtual GenPspGraphics     *CreatePrintGraphics() SAL_OVERRIDE;
 
-    virtual bool hasNativeFileSelection() const { return true; }
+    virtual bool hasNativeFileSelection() const SAL_OVERRIDE { return true; }
 
     virtual com::sun::star::uno::Reference< com::sun::star::ui::dialogs::XFilePicker2 >
         createFilePicker( const com::sun::star::uno::Reference<
-                              com::sun::star::uno::XComponentContext >& );
+                              com::sun::star::uno::XComponentContext >& ) SAL_OVERRIDE;
     virtual com::sun::star::uno::Reference< com::sun::star::ui::dialogs::XFolderPicker2 >
         createFolderPicker( const com::sun::star::uno::Reference<
-                                com::sun::star::uno::XComponentContext >& );
+                                com::sun::star::uno::XComponentContext >& ) SAL_OVERRIDE;
 
     void                        RemoveTimer (SalTimer *pTimer);
 
@@ -108,7 +108,8 @@ public:
     void                        subtractEvent( sal_uInt16 nMask );
 
     boost::shared_ptr<vcl::unx::GtkPrintWrapper> getPrintWrapper() const;
-  private:
+
+private:
     std::vector<GtkSalTimer *>  m_aTimers;
     bool                        IsTimerExpired();
     bool                        bNeedsInit;
diff --git a/vcl/inc/unx/salinst.h b/vcl/inc/unx/salinst.h
index 77bcb33..72330e9 100644
--- a/vcl/inc/unx/salinst.h
+++ b/vcl/inc/unx/salinst.h
@@ -41,34 +41,35 @@ private:
 
 protected:
     SalXLib *mpXLib;
+
 public:
     X11SalInstance( SalYieldMutex* pMutex ) : SalGenericInstance( pMutex ), mpXLib(NULL) {}
     virtual ~X11SalInstance();
 
-    virtual SalFrame*           CreateChildFrame( SystemParentData* pParent, sal_uIntPtr nStyle );
-    virtual SalFrame*           CreateFrame( SalFrame* pParent, sal_uIntPtr nStyle );
-    virtual void                DestroyFrame( SalFrame* pFrame );
+    virtual SalFrame*           CreateChildFrame( SystemParentData* pParent, sal_uIntPtr nStyle ) SAL_OVERRIDE;
+    virtual SalFrame*           CreateFrame( SalFrame* pParent, sal_uIntPtr nStyle ) SAL_OVERRIDE;
+    virtual void                DestroyFrame( SalFrame* pFrame ) SAL_OVERRIDE;
 
-    virtual SalObject*          CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, bool bShow = true );
-    virtual void                DestroyObject( SalObject* pObject );
+    virtual SalObject*          CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, bool bShow = true ) SAL_OVERRIDE;
+    virtual void                DestroyObject( SalObject* pObject ) SAL_OVERRIDE;
 
     virtual SalVirtualDevice*   CreateVirtualDevice( SalGraphics* pGraphics,
                                                      long nDX, long nDY,
-                                                     sal_uInt16 nBitCount, const SystemGraphicsData *pData = NULL );
-    virtual void                PostPrintersChanged();
-    virtual GenPspGraphics     *CreatePrintGraphics();
+                                                     sal_uInt16 nBitCount, const SystemGraphicsData *pData = NULL ) SAL_OVERRIDE;
+    virtual void                PostPrintersChanged() SAL_OVERRIDE;
+    virtual GenPspGraphics     *CreatePrintGraphics() SAL_OVERRIDE;
 
-    virtual SalTimer*           CreateSalTimer();
-    virtual SalI18NImeStatus*   CreateI18NImeStatus();
-    virtual SalSystem*          CreateSalSystem();
-    virtual SalBitmap*          CreateSalBitmap();
-    virtual SalSession*         CreateSalSession();
+    virtual SalTimer*           CreateSalTimer() SAL_OVERRIDE;
+    virtual SalI18NImeStatus*   CreateI18NImeStatus() SAL_OVERRIDE;
+    virtual SalSystem*          CreateSalSystem() SAL_OVERRIDE;
+    virtual SalBitmap*          CreateSalBitmap() SAL_OVERRIDE;
+    virtual SalSession*         CreateSalSession() SAL_OVERRIDE;
 
-    virtual void                Yield( bool bWait, bool bHandleAllCurrentEvents );
-    virtual bool                AnyInput( sal_uInt16 nType );
+    virtual void                Yield( bool bWait, bool bHandleAllCurrentEvents ) SAL_OVERRIDE;
+    virtual bool                AnyInput( sal_uInt16 nType ) SAL_OVERRIDE;
 
-    virtual void*               GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes );
-    void                        FillFontPathList( std::list< OString >& o_rFontPaths );
+    virtual void*               GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ) SAL_OVERRIDE;
+    virtual void                FillFontPathList( std::list< OString >& o_rFontPaths ) SAL_OVERRIDE;
     void                        SetLib( SalXLib *pXLib ) { mpXLib = pXLib; }
 
     // dtrans implementation


More information about the Libreoffice-commits mailing list