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

Jan-Marek Glogowski glogow at fbihome.de
Fri Sep 29 19:14:35 UTC 2017


 vcl/inc/osx/runinmain.hxx |    6 +++---
 vcl/inc/osx/saldata.hxx   |    2 +-
 vcl/inc/osx/salframe.h    |    2 +-
 vcl/osx/saldata.cxx       |    2 +-
 vcl/osx/salframe.cxx      |    8 ++++----
 vcl/osx/salframeview.mm   |    8 ++++----
 vcl/osx/salinst.cxx       |   22 +++++++++++-----------
 vcl/osx/salobj.cxx        |    2 +-
 vcl/osx/salprn.cxx        |    2 +-
 vcl/osx/saltimer.cxx      |    8 ++++----
 vcl/osx/vclnsapp.mm       |   10 +++++-----
 vcl/quartz/salvd.cxx      |    2 +-
 12 files changed, 37 insertions(+), 37 deletions(-)

New commits:
commit 442771d105fbce531ec3df5673dcc4a5f7a8bc7b
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Fri Sep 29 09:18:51 2017 +0200

    OSX rename mpFirstInstance to mpInstance
    
    In the same spirit as the Windows commit
    7c52d86f7b05fe7e0178f6d98a12a531b88a32ff.
    
    Change-Id: Ic45803c0715723b6f57c9f6a0c731edd559aa92c
    Reviewed-on: https://gerrit.libreoffice.org/42932
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>

diff --git a/vcl/inc/osx/runinmain.hxx b/vcl/inc/osx/runinmain.hxx
index c971d3a25639..0c2a5268d70a 100644
--- a/vcl/inc/osx/runinmain.hxx
+++ b/vcl/inc/osx/runinmain.hxx
@@ -140,13 +140,13 @@ union RuninmainResult
  */
 
 #define OSX_SALDATA_RUNINMAIN( command ) \
-    OSX_RUNINMAIN( GetSalData()->mpFirstInstance, command )
+    OSX_RUNINMAIN( GetSalData()->mpInstance, command )
 
 #define OSX_SALDATA_RUNINMAIN_POINTER( command, type ) \
-    OSX_RUNINMAIN_POINTER( GetSalData()->mpFirstInstance, command, type )
+    OSX_RUNINMAIN_POINTER( GetSalData()->mpInstance, command, type )
 
 #define OSX_SALDATA_RUNINMAIN_UNION( command, member ) \
-    OSX_RUNINMAIN_UNION( GetSalData()->mpFirstInstance, command, member )
+    OSX_RUNINMAIN_UNION( GetSalData()->mpInstance, command, member )
 
 #endif // INCLUDED_VCL_INC_OSX_RUNINMAIN_HXX
 
diff --git a/vcl/inc/osx/saldata.hxx b/vcl/inc/osx/saldata.hxx
index 5ec684b83973..357a2df6a74b 100644
--- a/vcl/inc/osx/saldata.hxx
+++ b/vcl/inc/osx/saldata.hxx
@@ -63,7 +63,7 @@ class SalData
 {
 public:
     SALTIMERPROC                                  mpTimerProc;      // timer callback proc
-    AquaSalInstance                              *mpFirstInstance;  // pointer of first instance
+    AquaSalInstance                              *mpInstance;
     std::list<AquaSalFrame*>                      maPresentationFrames;  // list of frames in presentation mode
     SalObject                                    *mpFirstObject;    // pointer of first object window
     SalVirtualDevice                             *mpFirstVD;        // first VirDev
diff --git a/vcl/inc/osx/salframe.h b/vcl/inc/osx/salframe.h
index f8cef1834106..55779e6868be 100644
--- a/vcl/inc/osx/salframe.h
+++ b/vcl/inc/osx/salframe.h
@@ -206,7 +206,7 @@ private: // data
 
 inline bool AquaSalFrame::isAlive( const AquaSalFrame* pFrame )
 {
-    AquaSalInstance *pInst = GetSalData()->mpFirstInstance;
+    AquaSalInstance *pInst = GetSalData()->mpInstance;
     return pInst && pInst->isFrameAlive( pFrame );
 }
 
diff --git a/vcl/osx/saldata.cxx b/vcl/osx/saldata.cxx
index de139319e8bd..a445e5cfb7ad 100644
--- a/vcl/osx/saldata.cxx
+++ b/vcl/osx/saldata.cxx
@@ -37,7 +37,7 @@ static void SAL_CALL releasePool( void* pPool )
 SalData::SalData()
 :
     mpTimerProc( nullptr ),
-    mpFirstInstance( nullptr ),
+    mpInstance( nullptr ),
     mpFirstObject( nullptr ),
     mpFirstVD( nullptr ),
     mpFirstPrinter( nullptr ),
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index dcdfe6d9c936..ff87c83e3205 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -87,12 +87,12 @@ AquaSalFrame::AquaSalFrame( SalFrame* pParent, SalFrameStyleFlags salFrameStyle
     initWindowAndView();
 
     SalData* pSalData = GetSalData();
-    pSalData->mpFirstInstance->insertFrame( this );
+    pSalData->mpInstance->insertFrame( this );
 }
 
 AquaSalFrame::~AquaSalFrame()
 {
-    assert( GetSalData()->mpFirstInstance->IsMainThread() );
+    assert( GetSalData()->mpInstance->IsMainThread() );
 
     // if the frame is destroyed and has the current menubar
     // set the default menubar
@@ -105,7 +105,7 @@ AquaSalFrame::~AquaSalFrame()
     [SalFrameView unsetMouseFrame: this];
 
     SalData* pSalData = GetSalData();
-    pSalData->mpFirstInstance->eraseFrame( this );
+    pSalData->mpInstance->eraseFrame( this );
     pSalData->maPresentationFrames.remove( this );
 
     SAL_WARN_IF( this == s_pCaptureFrame, "vcl", "capture frame destroyed" );
@@ -294,7 +294,7 @@ void AquaSalFrame::ReleaseGraphics( SalGraphics *pGraphics )
 
 bool AquaSalFrame::PostEvent(ImplSVEvent* pData)
 {
-    GetSalData()->mpFirstInstance->PostEvent( this, pData, SalEvent::UserEvent );
+    GetSalData()->mpInstance->PostEvent( this, pData, SalEvent::UserEvent );
     return TRUE;
 }
 
diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm
index 184c5bc15b70..1f0a3690bb70 100644
--- a/vcl/osx/salframeview.mm
+++ b/vcl/osx/salframeview.mm
@@ -221,7 +221,7 @@ static AquaSalFrame* getMouseContainerFrame()
 
 -(void)displayIfNeeded
 {
-    if( GetSalData() && GetSalData()->mpFirstInstance )
+    if( GetSalData() && GetSalData()->mpInstance )
     {
         SolarMutexGuard aGuard;
         [super displayIfNeeded];
@@ -528,13 +528,13 @@ private:
 
 -(void)drawRect: (NSRect)aRect
 {
-    if( GetSalData()->mpFirstInstance )
+    if( GetSalData()->mpInstance )
     {
         const bool bIsLiveResize = [self inLiveResize];
-        const bool bWasLiveResize = GetSalData()->mpFirstInstance->mbIsLiveResize;
+        const bool bWasLiveResize = GetSalData()->mpInstance->mbIsLiveResize;
         if ( bWasLiveResize != bIsLiveResize )
         {
-            GetSalData()->mpFirstInstance->mbIsLiveResize = bIsLiveResize;
+            GetSalData()->mpInstance->mbIsLiveResize = bIsLiveResize;
             Scheduler::ProcessTaskScheduling();
         }
     }
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 8af988a1de77..e94dae343972 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -88,7 +88,7 @@ public:
 
     virtual void Invoke() override
     {
-        AquaSalInstance *pInst = GetSalData()->mpFirstInstance;
+        AquaSalInstance *pInst = GetSalData()->mpInstance;
         SalFrame *pAnyFrame = pInst->anyFrame();
         if( pAnyFrame )
             pAnyFrame->CallCallback( SalEvent::SettingsChanged, nullptr );
@@ -271,7 +271,7 @@ SalYieldMutex::~SalYieldMutex()
 
 void SalYieldMutex::doAcquire( sal_uInt32 nLockCount )
 {
-    AquaSalInstance *pInst = GetSalData()->mpFirstInstance;
+    AquaSalInstance *pInst = GetSalData()->mpInstance;
     if ( pInst && pInst->IsMainThread() )
     {
         if ( pInst->mbNoYieldLock )
@@ -308,7 +308,7 @@ void SalYieldMutex::doAcquire( sal_uInt32 nLockCount )
 
 sal_uInt32 SalYieldMutex::doRelease( const bool bUnlockAll )
 {
-    AquaSalInstance *pInst = GetSalData()->mpFirstInstance;
+    AquaSalInstance *pInst = GetSalData()->mpInstance;
     if ( pInst->mbNoYieldLock && pInst->IsMainThread() )
         return 1;
     sal_uInt32 nCount = comphelper::GenericSolarMutex::doRelease( bUnlockAll );
@@ -321,17 +321,17 @@ sal_uInt32 SalYieldMutex::doRelease( const bool bUnlockAll )
 
 bool SalYieldMutex::IsCurrentThread() const
 {
-    if ( !GetSalData()->mpFirstInstance->mbNoYieldLock )
+    if ( !GetSalData()->mpInstance->mbNoYieldLock )
         return comphelper::GenericSolarMutex::IsCurrentThread();
     else
-        return GetSalData()->mpFirstInstance->IsMainThread();
+        return GetSalData()->mpInstance->IsMainThread();
 }
 
 // some convenience functions regarding the yield mutex, aka solar mutex
 
 bool ImplSalYieldMutexTryToAcquire()
 {
-    AquaSalInstance* pInst = GetSalData()->mpFirstInstance;
+    AquaSalInstance* pInst = GetSalData()->mpInstance;
     if ( pInst )
         return pInst->mpSalYieldMutex->tryToAcquire();
     else
@@ -340,7 +340,7 @@ bool ImplSalYieldMutexTryToAcquire()
 
 void ImplSalYieldMutexRelease()
 {
-    AquaSalInstance* pInst = GetSalData()->mpFirstInstance;
+    AquaSalInstance* pInst = GetSalData()->mpInstance;
     if ( pInst )
         pInst->mpSalYieldMutex->release();
 }
@@ -353,11 +353,11 @@ SalInstance* CreateSalInstance()
         initNSApp();
 
     SalData* pSalData = GetSalData();
-    SAL_WARN_IF( pSalData->mpFirstInstance != nullptr, "vcl", "more than one instance created" );
+    SAL_WARN_IF( pSalData->mpInstance != nullptr, "vcl", "more than one instance created" );
     AquaSalInstance* pInst = new AquaSalInstance;
 
     // init instance (only one instance in this version !!!)
-    pSalData->mpFirstInstance = pInst;
+    pSalData->mpInstance = pInst;
     // this one is for outside AquaSalInstance::Yield
     SalData::ensureThreadAutoreleasePool();
     // no focus rects on NWF
@@ -459,7 +459,7 @@ void AquaSalInstance::handleAppDefinedEvent( NSEvent* pEvent )
     case AppleRemoteControlEvent: // Defined in <apple_remote/RemoteMainController.h>
     {
         MediaCommand nCommand;
-        AquaSalInstance *pInst = GetSalData()->mpFirstInstance;
+        AquaSalInstance *pInst = GetSalData()->mpInstance;
         bool bIsFullScreenMode = false;
 
         for( auto pSalFrame : pInst->getFrames() )
@@ -618,7 +618,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
         }
 
         // collect update rectangles
-        for( auto pSalFrame : GetSalData()->mpFirstInstance->getFrames() )
+        for( auto pSalFrame : GetSalData()->mpInstance->getFrames() )
         {
             AquaSalFrame* pFrame = static_cast<AquaSalFrame*>( const_cast<SalFrame*>( pSalFrame ) );
             if( pFrame->mbShown && ! pFrame->maInvalidRect.IsEmpty() )
diff --git a/vcl/osx/salobj.cxx b/vcl/osx/salobj.cxx
index cdd60120a7ff..b6cea6e614bc 100644
--- a/vcl/osx/salobj.cxx
+++ b/vcl/osx/salobj.cxx
@@ -106,7 +106,7 @@ AquaSalObject::AquaSalObject( AquaSalFrame* pFrame, SystemWindowData const * pWi
 
 AquaSalObject::~AquaSalObject()
 {
-    assert( GetSalData()->mpFirstInstance->IsMainThread() );
+    assert( GetSalData()->mpInstance->IsMainThread() );
 
     if( maSysData.mpNSView )
     {
diff --git a/vcl/osx/salprn.cxx b/vcl/osx/salprn.cxx
index 2f8a84ed6c92..25f312b1daf9 100644
--- a/vcl/osx/salprn.cxx
+++ b/vcl/osx/salprn.cxx
@@ -358,7 +358,7 @@ bool AquaSalInfoPrinter::StartJob( const OUString* i_pFileName,
 
     bool bSuccess = false;
     bool bWasAborted = false;
-    AquaSalInstance* pInst = GetSalData()->mpFirstInstance;
+    AquaSalInstance* pInst = GetSalData()->mpInstance;
     PrintAccessoryViewState aAccViewState;
     sal_Int32 nAllPages = 0;
 
diff --git a/vcl/osx/saltimer.cxx b/vcl/osx/saltimer.cxx
index 4bc9706fc39d..30ef9ef60055 100644
--- a/vcl/osx/saltimer.cxx
+++ b/vcl/osx/saltimer.cxx
@@ -84,13 +84,13 @@ void AquaSalTimer::Start( sal_uLong nMS )
 {
     SalData* pSalData = GetSalData();
 
-    if( !pSalData->mpFirstInstance->IsMainThread() )
+    if( !pSalData->mpInstance->IsMainThread() )
     {
         ImplNSAppPostEvent( AquaSalInstance::AppStartTimerEvent, YES, nMS );
         return;
     }
 
-    if ( 0 == nMS && !pSalData->mpFirstInstance->mbIsLiveResize )
+    if ( 0 == nMS && !pSalData->mpInstance->mbIsLiveResize )
         queueDispatchTimerEvent( NO );
     else
     {
@@ -126,7 +126,7 @@ void AquaSalTimer::Start( sal_uLong nMS )
 
 void AquaSalTimer::Stop()
 {
-    assert( GetSalData()->mpFirstInstance->IsMainThread() );
+    assert( GetSalData()->mpInstance->IsMainThread() );
 
     if( m_pRunningTimer != nil )
     {
@@ -150,7 +150,7 @@ void AquaSalTimer::handleTimerElapsed()
     // Stop the timer, as it is just invalidated after the firing function
     Stop();
 
-    if ( GetSalData()->mpFirstInstance->mbIsLiveResize )
+    if ( GetSalData()->mpInstance->mbIsLiveResize )
         callTimerCallback();
     else
         queueDispatchTimerEvent( YES );
diff --git a/vcl/osx/vclnsapp.mm b/vcl/osx/vclnsapp.mm
index dafcdb97aca5..247e603644e4 100644
--- a/vcl/osx/vclnsapp.mm
+++ b/vcl/osx/vclnsapp.mm
@@ -317,7 +317,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
     {
         SolarMutexGuard aGuard;
 
-        AquaSalInstance *pInst = GetSalData()->mpFirstInstance;
+        AquaSalInstance *pInst = GetSalData()->mpInstance;
         SalFrame *pAnyFrame = pInst->anyFrame();
         if( pAnyFrame )
         {
@@ -344,7 +344,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
     (void)pNotification;
     SolarMutexGuard aGuard;
 
-    AquaSalInstance *pInst = GetSalData()->mpFirstInstance;
+    AquaSalInstance *pInst = GetSalData()->mpInstance;
     SalFrame *pAnyFrame = pInst->anyFrame();
     if(  pAnyFrame )
         pAnyFrame->CallCallback( SalEvent::SettingsChanged, nullptr );
@@ -355,7 +355,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
     (void)pNotification;
     SolarMutexGuard aGuard;
 
-    for( auto pSalFrame : GetSalData()->mpFirstInstance->getFrames() )
+    for( auto pSalFrame : GetSalData()->mpInstance->getFrames() )
     {
         AquaSalFrame *pFrame = static_cast<AquaSalFrame*>( const_cast<SalFrame*>( pSalFrame ) );
         pFrame->screenParametersChanged();
@@ -365,13 +365,13 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
 -(void)scrollbarVariantChanged: (NSNotification*) pNotification
 {
     (void)pNotification;
-    GetSalData()->mpFirstInstance->delayedSettingsChanged( true );
+    GetSalData()->mpInstance->delayedSettingsChanged( true );
 }
 
 -(void)scrollbarSettingsChanged: (NSNotification*) pNotification
 {
     (void)pNotification;
-    GetSalData()->mpFirstInstance->delayedSettingsChanged( false );
+    GetSalData()->mpInstance->delayedSettingsChanged( false );
 }
 
 -(void)addFallbackMenuItem: (NSMenuItem*)pNewItem
diff --git a/vcl/quartz/salvd.cxx b/vcl/quartz/salvd.cxx
index fe48f0b80326..26f90af338e7 100644
--- a/vcl/quartz/salvd.cxx
+++ b/vcl/quartz/salvd.cxx
@@ -255,7 +255,7 @@ bool AquaSalVirtualDevice::SetSize( long nDX, long nDY )
         AquaSalFrame* pSalFrame = mpGraphics->getGraphicsFrame();
         if( !pSalFrame || !AquaSalFrame::isAlive( pSalFrame ))
         {
-            pSalFrame = static_cast<AquaSalFrame*>( GetSalData()->mpFirstInstance->anyFrame() );
+            pSalFrame = static_cast<AquaSalFrame*>( GetSalData()->mpInstance->anyFrame() );
             if ( pSalFrame )
                 // update the frame reference
                 mpGraphics->setGraphicsFrame( pSalFrame );


More information about the Libreoffice-commits mailing list