check for SfxApplication::Get means SfxGetpApp is just SfxApplication::Get

Change-Id: I12953d93c81bd60ad27284ac0b62c4435ac9e390
This commit is contained in:
Caolán McNamara
2017-02-25 20:52:54 +00:00
parent a493900e95
commit a91dc9ebb4
2 changed files with 4 additions and 3 deletions

View File

@@ -771,9 +771,9 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const css::util::URL& aURL,
pItem = pDispatcher->Execute( GetId(), nCall, nullptr, &aInternalSet, nModifier );
// no bindings, no invalidate ( usually done in SfxDispatcher::Call_Impl()! )
if ( SfxApplication::Get() )
if (SfxApplication* pApp = SfxApplication::Get())
{
SfxDispatcher* pAppDispat = SfxGetpApp()->GetAppDispatcher_Impl();
SfxDispatcher* pAppDispat = pApp->GetAppDispatcher_Impl();
if ( pAppDispat )
{
const SfxPoolItem* pState=nullptr;

View File

@@ -1461,7 +1461,8 @@ void SfxViewFrame::KillDispatcher_Impl()
SfxViewFrame* SfxViewFrame::Current()
{
return SfxApplication::Get() ? SfxGetpApp()->Get_Impl()->pViewFrame : nullptr;
SfxApplication* pApp = SfxApplication::Get();
return pApp ? pApp->Get_Impl()->pViewFrame : nullptr;
}
// returns the first window of spec. type viewing the specified doc.