summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2014-06-27 10:26:55 +0200
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-06-27 17:08:04 +0200
commitd92aa2f445662aa9ca7d81fef1e667bcae031fc6 (patch)
treea773275c7753286fbf116eef4d20c1f31bb6b123 /sfx2/source
parent556981f07815a0de0ad3576ba6f8639671a6c13c (diff)
remove SFX_APP() macro that was a mer wrapper for SfxGetApp()
Change-Id: I480a789c767dd671775c9d70d96bf71908f21f5b
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/appl/appbaslib.cxx8
-rw-r--r--sfx2/source/appl/appcfg.cxx2
-rw-r--r--sfx2/source/appl/appdde.cxx8
-rw-r--r--sfx2/source/appl/appdispatchprovider.cxx6
-rw-r--r--sfx2/source/appl/appinit.cxx4
-rw-r--r--sfx2/source/appl/appopen.cxx6
-rw-r--r--sfx2/source/appl/childwin.cxx8
-rw-r--r--sfx2/source/appl/linkmgr2.cxx2
-rw-r--r--sfx2/source/appl/macroloader.cxx2
-rw-r--r--sfx2/source/appl/module.cxx4
-rw-r--r--sfx2/source/appl/sfxpicklist.cxx6
-rw-r--r--sfx2/source/appl/shutdownicon.cxx2
-rw-r--r--sfx2/source/appl/workwin.cxx4
-rw-r--r--sfx2/source/bastyp/progress.cxx16
-rw-r--r--sfx2/source/control/bindings.cxx16
-rw-r--r--sfx2/source/control/dispatch.cxx22
-rw-r--r--sfx2/source/control/msgpool.cxx2
-rw-r--r--sfx2/source/control/objface.cxx4
-rw-r--r--sfx2/source/control/statcach.cxx2
-rw-r--r--sfx2/source/control/unoctitm.cxx8
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx8
-rw-r--r--sfx2/source/dialog/mgetempl.cxx2
-rw-r--r--sfx2/source/dialog/tabdlg.cxx8
-rw-r--r--sfx2/source/dialog/templdlg.cxx6
-rw-r--r--sfx2/source/doc/docfile.cxx10
-rw-r--r--sfx2/source/doc/docinsert.cxx10
-rw-r--r--sfx2/source/doc/frmdescr.cxx4
-rw-r--r--sfx2/source/doc/guisaveas.cxx2
-rw-r--r--sfx2/source/doc/new.cxx2
-rw-r--r--sfx2/source/doc/objcont.cxx2
-rw-r--r--sfx2/source/doc/objembed.cxx2
-rw-r--r--sfx2/source/doc/objmisc.cxx14
-rw-r--r--sfx2/source/doc/objserv.cxx2
-rw-r--r--sfx2/source/doc/objstor.cxx10
-rw-r--r--sfx2/source/doc/objxtor.cxx8
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx26
-rw-r--r--sfx2/source/doc/templatedlg.cxx2
-rw-r--r--sfx2/source/menu/mnuitem.cxx4
-rw-r--r--sfx2/source/menu/virtmenu.cxx2
-rw-r--r--sfx2/source/notify/eventsupplier.cxx6
-rw-r--r--sfx2/source/notify/globalevents.cxx2
-rw-r--r--sfx2/source/sidebar/Theme.cxx2
-rw-r--r--sfx2/source/statbar/stbitem.cxx4
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx8
-rw-r--r--sfx2/source/view/frame.cxx8
-rw-r--r--sfx2/source/view/frmload.cxx10
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx6
-rw-r--r--sfx2/source/view/viewfrm.cxx38
-rw-r--r--sfx2/source/view/viewfrm2.cxx2
-rw-r--r--sfx2/source/view/viewprn.cxx2
-rw-r--r--sfx2/source/view/viewsh.cxx20
51 files changed, 182 insertions, 182 deletions
diff --git a/sfx2/source/appl/appbaslib.cxx b/sfx2/source/appl/appbaslib.cxx
index d22dc48030d4..3eee7e575b68 100644
--- a/sfx2/source/appl/appbaslib.cxx
+++ b/sfx2/source/appl/appbaslib.cxx
@@ -160,8 +160,8 @@ com_sun_star_comp_sfx2_ApplicationDialogLibraryContainer_get_implementation(
css::uno::XComponentContext *,
css::uno::Sequence<css::uno::Any> const &)
{
- SFX_APP()->GetBasicManager();
- return SFX_APP()->GetDialogContainer();
+ SfxGetpApp()->GetBasicManager();
+ return SfxGetpApp()->GetDialogContainer();
}
@@ -172,8 +172,8 @@ com_sun_star_comp_sfx2_ApplicationScriptLibraryContainer_get_implementation(
css::uno::XComponentContext *,
css::uno::Sequence<css::uno::Any> const &)
{
- SFX_APP()->GetBasicManager();
- return SFX_APP()->GetBasicContainer();
+ SfxGetpApp()->GetBasicManager();
+ return SfxGetpApp()->GetBasicContainer();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 225fc4cb2c75..23d464219295 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -140,7 +140,7 @@ IMPL_LINK(SfxEventAsyncer_Impl, TimerHdl, Timer*, pAsyncTimer)
OSL_TRACE( "%s", aTmp.getStr() );
}
#endif
- SFX_APP()->Broadcast( aHint );
+ SfxGetpApp()->Broadcast( aHint );
if ( xRef.Is() )
xRef->Broadcast( aHint );
delete this;
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index c034467d832e..9d3d63429e32 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -129,7 +129,7 @@ bool ImplDdeService::MakeTopic( const OUString& rNm )
OUString sTmp( pShell->GetTitle(SFX_TITLE_FULLNAME) );
if( sNm == sTmp.toAsciiLowerCase() )
{
- SFX_APP()->AddDdeTopic( pShell );
+ SfxGetpApp()->AddDdeTopic( pShell );
bRet = true;
break;
}
@@ -148,7 +148,7 @@ bool ImplDdeService::MakeTopic( const OUString& rNm )
SfxBoolItem aNewView(SID_OPEN_NEW_VIEW, sal_True);
SfxBoolItem aSilent(SID_SILENT, sal_True);
- SfxDispatcher* pDispatcher = SFX_APP()->GetDispatcher_Impl();
+ SfxDispatcher* pDispatcher = SfxGetpApp()->GetDispatcher_Impl();
const SfxPoolItem* pRet = pDispatcher->Execute( SID_OPENDOC,
SFX_CALLMODE_SYNCHRON,
&aName, &aNewView,
@@ -159,7 +159,7 @@ bool ImplDdeService::MakeTopic( const OUString& rNm )
0 != ( pShell = ((SfxViewFrameItem*)pRet)
->GetFrame()->GetObjectShell() ) )
{
- SFX_APP()->AddDdeTopic( pShell );
+ SfxGetpApp()->AddDdeTopic( pShell );
bRet = true;
}
}
@@ -192,7 +192,7 @@ OUString ImplDdeService::Topics()
bool ImplDdeService::SysTopicExecute( const OUString* pStr )
{
- return SFX_APP()->DdeExecute( *pStr );
+ return SfxGetpApp()->DdeExecute( *pStr );
}
#endif
diff --git a/sfx2/source/appl/appdispatchprovider.cxx b/sfx2/source/appl/appdispatchprovider.cxx
index 740b052206b8..53c33651aa39 100644
--- a/sfx2/source/appl/appdispatchprovider.cxx
+++ b/sfx2/source/appl/appdispatchprovider.cxx
@@ -136,7 +136,7 @@ Reference < XDispatch > SAL_CALL SfxAppDispatchProvider::queryDispatch(
bool bMasterCommand( false );
Reference < XDispatch > xDisp;
const SfxSlot* pSlot = 0;
- SfxDispatcher* pAppDisp = SFX_APP()->GetAppDispatcher_Impl();
+ SfxDispatcher* pAppDisp = SfxGetpApp()->GetAppDispatcher_Impl();
if ( aURL.Protocol == "slot:" || aURL.Protocol == "commandId:" )
{
nId = (sal_uInt16) aURL.Path.toInt32();
@@ -182,7 +182,7 @@ throw (uno::RuntimeException, std::exception)
SolarMutexGuard aGuard;
std::list< sal_Int16 > aGroupList;
- SfxSlotPool* pAppSlotPool = &SFX_APP()->GetAppSlotPool_Impl();
+ SfxSlotPool* pAppSlotPool = &SfxGetpApp()->GetAppSlotPool_Impl();
const sal_uIntPtr nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG );
@@ -215,7 +215,7 @@ throw (uno::RuntimeException, std::exception)
std::list< frame::DispatchInformation > aCmdList;
SolarMutexGuard aGuard;
- SfxSlotPool* pAppSlotPool = &SFX_APP()->GetAppSlotPool_Impl();
+ SfxSlotPool* pAppSlotPool = &SfxGetpApp()->GetAppSlotPool_Impl();
if ( pAppSlotPool )
{
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 04bb2db70ee6..9f2c54868c34 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -94,7 +94,7 @@ void SAL_CALL SfxTerminateListener_Impl::disposing( const EventObject& ) throw(
void SAL_CALL SfxTerminateListener_Impl::queryTermination( const EventObject& ) throw(TerminationVetoException, RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- if ( !SFX_APP()->QueryExit_Impl() )
+ if ( !SfxGetpApp()->QueryExit_Impl() )
throw TerminationVetoException();
}
@@ -111,7 +111,7 @@ void SAL_CALL SfxTerminateListener_Impl::notifyTermination( const EventObject& a
// Application::Quit(), which is asynchronous (PostUserEvent) - disable!
Timer::ImplDeInitTimer();
- SfxApplication* pApp = SFX_APP();
+ SfxApplication* pApp = SfxGetpApp();
pApp->Broadcast( SfxSimpleHint( SFX_HINT_DEINITIALIZING ) );
pApp->Get_Impl()->pAppDispatch->ReleaseAll();
pApp->Get_Impl()->pAppDispatch->release();
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 9c1362074d59..8cb4630a5f5b 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -439,7 +439,7 @@ void SfxApplication::NewDocDirectExec_Impl( SfxRequest& rReq )
if ( pDefaultNameItem )
aReq.AppendItem( *pDefaultNameItem );
- SFX_APP()->ExecuteSlot( aReq );
+ SfxGetpApp()->ExecuteSlot( aReq );
const SfxViewFrameItem* pItem = PTR_CAST( SfxViewFrameItem, aReq.GetReturnValue() );
if ( pItem )
rReq.SetReturnValue( SfxFrameItem( 0, pItem->GetFrame() ) );
@@ -831,7 +831,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
if ( eMode == SvtExtendedSecurityOptions::OPEN_NEVER && aINetProtocol != INET_PROT_VND_SUN_STAR_HELP )
{
SolarMutexGuard aGuard;
- Window *pWindow = SFX_APP()->GetTopWindow();
+ Window *pWindow = SfxGetpApp()->GetTopWindow();
WarningBox aSecurityWarningBox( pWindow, SfxResId( RID_SECURITY_WARNING_NO_HYPERLINKS ));
aSecurityWarningBox.SetText( SfxResId(RID_SECURITY_WARNING_TITLE).toString() );
@@ -840,7 +840,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
}
aTypeName = xTypeDetection->queryTypeByURL( aURL.Main );
- SfxFilterMatcher& rMatcher = SFX_APP()->GetFilterMatcher();
+ SfxFilterMatcher& rMatcher = SfxGetpApp()->GetFilterMatcher();
const SfxFilter* pFilter = rMatcher.GetFilter4EA( aTypeName );
if (!pFilter || !lcl_isFilterNativelySupported(*pFilter))
{
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 85d4d68f39d4..1397e3403b2a 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -200,7 +200,7 @@ SfxChildWindow* SfxChildWindow::CreateChildWindow( sal_uInt16 nId,
// First search for ChildWindow in SDT; "Overloading has to be realized
// by using ChildWindowContext
- SfxApplication *pApp = SFX_APP();
+ SfxApplication *pApp = SfxGetpApp();
{
SfxChildWinFactArr_Impl &rFactories = pApp->GetChildWinFactories_Impl();
for ( sal_uInt16 nFactory = 0; nFactory < rFactories.size(); ++nFactory )
@@ -418,7 +418,7 @@ void SfxChildWindow::CreateContext( sal_uInt16 nContextId, SfxBindings& rBinding
{
SfxChildWindowContext *pCon = NULL;
SfxChildWinFactory* pFact=0;
- SfxApplication *pApp = SFX_APP();
+ SfxApplication *pApp = SfxGetpApp();
SfxDispatcher *pDisp = rBindings.GetDispatcher_Impl();
SfxModule *pMod = pDisp ? SfxModule::GetActiveModule( pDisp->GetFrame() ) :0;
if ( pMod )
@@ -748,12 +748,12 @@ bool SfxChildWindow::CanGetFocus() const
void SfxChildWindowContext::RegisterChildWindowContext(SfxModule* pMod, sal_uInt16 nId, SfxChildWinContextFactory* pFact)
{
- SFX_APP()->RegisterChildWindowContext_Impl( pMod, nId, pFact );
+ SfxGetpApp()->RegisterChildWindowContext_Impl( pMod, nId, pFact );
}
void SfxChildWindow::RegisterChildWindow(SfxModule* pMod, SfxChildWinFactory* pFact)
{
- SFX_APP()->RegisterChildWindow_Impl( pMod, pFact );
+ SfxGetpApp()->RegisterChildWindow_Impl( pMod, pFact );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 291671305a44..501ec5457d00 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -662,7 +662,7 @@ bool SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
SfxBoolItem aDdeConnect(SID_DDE_RECONNECT_ONLOAD, false);
// #i14200# (DDE-link crashes wordprocessor)
- SfxAllItemSet aArgs( SFX_APP()->GetPool() );
+ SfxAllItemSet aArgs( SfxGetpApp()->GetPool() );
aArgs.Put(aReferer);
aArgs.Put(aTarget);
aArgs.Put(aHidden);
diff --git a/sfx2/source/appl/macroloader.cxx b/sfx2/source/appl/macroloader.cxx
index f51b7a0781e1..0505c3885b09 100644
--- a/sfx2/source/appl/macroloader.cxx
+++ b/sfx2/source/appl/macroloader.cxx
@@ -207,7 +207,7 @@ ErrCode SfxMacroLoader::loadMacro( const OUString& rURL, com::sun::star::uno::An
OUString aMacro( rURL );
sal_Int32 nHashPos = aMacro.indexOf( '/', 8 );
sal_Int32 nArgsPos = aMacro.indexOf( '(' );
- BasicManager *pAppMgr = SFX_APP()->GetBasicManager();
+ BasicManager *pAppMgr = SfxGetpApp()->GetBasicManager();
BasicManager *pBasMgr = 0;
ErrCode nErr = ERRCODE_NONE;
diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx
index 32508b602dca..fe416c37431d 100644
--- a/sfx2/source/appl/module.cxx
+++ b/sfx2/source/appl/module.cxx
@@ -127,7 +127,7 @@ void SfxModule::Construct_Impl()
{
if( !bDummy )
{
- SfxApplication *pApp = SFX_APP();
+ SfxApplication *pApp = SfxGetpApp();
SfxModuleArr_Impl& rArr = GetModules_Impl();
SfxModule* pPtr = (SfxModule*)this;
rArr.push_back( pPtr );
@@ -151,7 +151,7 @@ SfxModule::~SfxModule()
{
if( !bDummy )
{
- if ( SFX_APP()->Get_Impl() )
+ if ( SfxGetpApp()->Get_Impl() )
{
// The module will be destroyed before the Deinitialize,
// so remove from the array
diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index 19c1c313fbbd..c405a7ef1e9a 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -240,7 +240,7 @@ SfxPickList::SfxPickList( sal_uInt32 nAllowedMenuSize ) :
{
m_xStringLength = new StringLength;
m_nAllowedMenuSize = ::std::min( m_nAllowedMenuSize, (sal_uInt32)PICKLIST_MAXSIZE );
- StartListening( *SFX_APP() );
+ StartListening( *SfxGetpApp() );
}
SfxPickList::~SfxPickList()
@@ -335,7 +335,7 @@ void SfxPickList::ExecuteEntry( sal_uInt32 nIndex )
if ( pPick )
{
- SfxRequest aReq( SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, SFX_APP()->GetPool() );
+ SfxRequest aReq( SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, SfxGetpApp()->GetPool() );
aReq.AppendItem( SfxStringItem( SID_FILE_NAME, pPick->aName ));
aReq.AppendItem( SfxStringItem( SID_REFERER, "private:user" ) );
aReq.AppendItem( SfxStringItem( SID_TARGETNAME, "_default" ) );
@@ -352,7 +352,7 @@ void SfxPickList::ExecuteEntry( sal_uInt32 nIndex )
aReq.AppendItem(SfxStringItem( SID_FILTER_NAME, aFilter ));
aReq.AppendItem( SfxBoolItem( SID_TEMPLATE, false ) );
- SFX_APP()->ExecuteSlot( aReq );
+ SfxGetpApp()->ExecuteSlot( aReq );
}
}
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index 9a5c9e4247fc..05c8c62e9bde 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -520,7 +520,7 @@ IMPL_STATIC_LINK( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, EMPTYAR
if ( !aFilterName.isEmpty() )
{
- const SfxFilter* pFilter = SFX_APP()->GetFilterMatcher().GetFilter4UIName( aFilterName, 0, SFX_FILTER_NOTINFILEDLG );
+ const SfxFilter* pFilter = SfxGetpApp()->GetFilterMatcher().GetFilter4UIName( aFilterName, 0, SFX_FILTER_NOTINFILEDLG );
if ( pFilter )
{
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 392ba876a134..b2ba60f85a23 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -1325,7 +1325,7 @@ void SfxWorkWindow::UpdateObjectBars_Impl()
}
// you realize what is needed often (saves Code and execution time)
- SFX_APP();
+ SfxGetpApp();
Reference< com::sun::star::beans::XPropertySet > xPropSet( GetFrameInterface(), UNO_QUERY );
Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager;
@@ -2431,7 +2431,7 @@ void SfxWorkWindow::InitializeChild_Impl(SfxChildWin_Impl *pCW)
}
SfxChildWinFactory* pFact=0;
- SfxApplication *pApp = SFX_APP();
+ SfxApplication *pApp = SfxGetpApp();
{
SfxChildWinFactArr_Impl &rFactories = pApp->GetChildWinFactories_Impl();
for ( sal_uInt16 nFactory = 0; nFactory < rFactories.size(); ++nFactory )
diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx
index 2b4a51a83d90..83410b689f1b 100644
--- a/sfx2/source/bastyp/progress.cxx
+++ b/sfx2/source/bastyp/progress.cxx
@@ -97,7 +97,7 @@ void SfxProgress_Impl::Enable_Impl( bool bEnable )
}
if ( !pDoc )
- SFX_APP()->GetAppDispatcher_Impl()->Lock( !bEnable );
+ SfxGetpApp()->GetAppDispatcher_Impl()->Lock( !bEnable );
}
@@ -170,7 +170,7 @@ SfxProgress::SfxProgress
if ( pObjSh )
pObjSh->SetProgress_Impl(this);
else if( !pImp->pActiveProgress )
- SFX_APP()->SetProgress_Impl(this);
+ SfxGetpApp()->SetProgress_Impl(this);
Resume();
}
@@ -218,7 +218,7 @@ void SfxProgress::Stop()
if ( pImp->xObjSh.Is() )
pImp->xObjSh->SetProgress_Impl(0);
else
- SFX_APP()->SetProgress_Impl(0);
+ SfxGetpApp()->SetProgress_Impl(0);
if ( pImp->bLocked )
pImp->Enable_Impl(true);
}
@@ -320,7 +320,7 @@ bool SfxProgress::SetState
}
else if ( pImp->pView )
{
- pImp->pWorkWin = SFX_APP()->GetWorkWindow_Impl( pImp->pView );
+ pImp->pWorkWin = SfxGetpApp()->GetWorkWindow_Impl( pImp->pView );
if ( pImp->pWorkWin )
pImp->xStatusInd = pImp->pWorkWin->GetStatusIndicator();
}
@@ -454,7 +454,7 @@ void SfxProgress::Reschedule()
SFX_STACK(SfxProgress::Reschedule);
if( pImp->pActiveProgress ) return;
- SfxApplication* pApp = SFX_APP();
+ SfxApplication* pApp = SfxGetpApp();
if ( pImp->bLocked && 0 == pApp->Get_Impl()->nRescheduleLocks )
{
SfxAppData_Impl *pAppData = pApp->Get_Impl();
@@ -509,7 +509,7 @@ SfxProgress* SfxProgress::GetActiveProgress
if ( pDocSh )
pProgress = pDocSh->GetProgress();
if ( !pProgress )
- pProgress = SFX_APP()->GetProgress();
+ pProgress = SfxGetpApp()->GetProgress();
return pProgress;
}
@@ -517,14 +517,14 @@ SfxProgress* SfxProgress::GetActiveProgress
void SfxProgress::EnterLock()
{
- SFX_APP()->Get_Impl()->nRescheduleLocks++;
+ SfxGetpApp()->Get_Impl()->nRescheduleLocks++;
}
void SfxProgress::LeaveLock()
{
- SfxAppData_Impl *pImp = SFX_APP()->Get_Impl();
+ SfxAppData_Impl *pImp = SfxGetpApp()->Get_Impl();
DBG_ASSERT( 0 != pImp->nRescheduleLocks, "SFxProgress::LeaveLock but no locks" );
pImp->nRescheduleLocks--;
}
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index b83ef08d9e44..8b1175375a4f 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -649,7 +649,7 @@ void SfxBindings::InvalidateAll
// everything is already set dirty or downing => nothing to do
if ( !pDispatcher ||
( pImp->bAllDirty && ( !bWithMsg || pImp->bAllMsgDirty ) ) ||
- SFX_APP()->IsDowning() )
+ SfxGetpApp()->IsDowning() )
{
return;
}
@@ -693,7 +693,7 @@ void SfxBindings::Invalidate
pImp->pSubBindings->Invalidate( pIds );
// everything is already set dirty or downing => nothing to do
- if ( !pDispatcher || pImp->bAllDirty || SFX_APP()->IsDowning() )
+ if ( !pDispatcher || pImp->bAllDirty || SfxGetpApp()->IsDowning() )
return;
// Search binary in always smaller areas
@@ -742,7 +742,7 @@ void SfxBindings::InvalidateShell
if ( pImp->pSubBindings )
pImp->pSubBindings->InvalidateShell( rSh, bDeep );
- if ( !pDispatcher || pImp->bAllDirty || SFX_APP()->IsDowning() )
+ if ( !pDispatcher || pImp->bAllDirty || SfxGetpApp()->IsDowning() )
return;
// flush now already, it is done in GetShellLevel (rsh) anyway,
@@ -751,7 +751,7 @@ void SfxBindings::InvalidateShell
if ( !pDispatcher ||
( pImp->bAllDirty && pImp->bAllMsgDirty ) ||
- SFX_APP()->IsDowning() )
+ SfxGetpApp()->IsDowning() )
{
// if the next one is anyway, then all the servers are collected
return;
@@ -799,7 +799,7 @@ void SfxBindings::Invalidate
if ( pImp->pSubBindings )
pImp->pSubBindings->Invalidate( nId );
- if ( !pDispatcher || pImp->bAllDirty || SFX_APP()->IsDowning() )
+ if ( !pDispatcher || pImp->bAllDirty || SfxGetpApp()->IsDowning() )
return;
SfxStateCache* pCache = GetStateCache(nId);
@@ -830,7 +830,7 @@ void SfxBindings::Invalidate
if ( pImp->pSubBindings )
pImp->pSubBindings->Invalidate( nId, bWithItem, bWithMsg );
- if ( SFX_APP()->IsDowning() )
+ if ( SfxGetpApp()->IsDowning() )
return;
SfxStateCache* pCache = GetStateCache(nId);
@@ -1535,7 +1535,7 @@ IMPL_LINK( SfxBindings, NextJob_Impl, Timer *, pTimer )
return sal_True;
}
- SfxApplication *pSfxApp = SFX_APP();
+ SfxApplication *pSfxApp = SfxGetpApp();
if( pDispatcher )
pDispatcher->Update_Impl();
@@ -1705,7 +1705,7 @@ void SfxBindings::LeaveRegistrations( sal_uInt16 nLevel, const char *pFile, int
pImp->nOwnRegLevel--;
// check if this is the outer most level
- if ( --nRegLevel == 0 && !SFX_APP()->IsDowning() )
+ if ( --nRegLevel == 0 && !SfxGetpApp()->IsDowning() )
{
if ( pImp->bContextChanged )
{
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 4f8bccae90dc..f7a83c1649f9 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -422,7 +422,7 @@ SfxDispatcher::~SfxDispatcher()
*pImp->pInCallAliveFlag = false;
// Get bindings and application
- SfxApplication *pSfxApp = SFX_APP();
+ SfxApplication *pSfxApp = SfxGetpApp();
SfxBindings* pBindings = GetBindings();
// When not flushed, revive the bindings
@@ -472,7 +472,7 @@ void SfxDispatcher::Pop
bool bUntil = (nMode & SFX_SHELL_POP_UNTIL) == SFX_SHELL_POP_UNTIL;
bool bPush = (nMode & SFX_SHELL_PUSH) == SFX_SHELL_PUSH;
- SfxApplication *pSfxApp = SFX_APP();
+ SfxApplication *pSfxApp = SfxGetpApp();
SAL_INFO(
"sfx.control",
@@ -792,7 +792,7 @@ void SfxDispatcher::DoDeactivate_Impl( bool bMDI, SfxViewFrame* pNew )
{
SFX_STACK(SfxDispatcher::DoDeactivate);
- SfxApplication *pSfxApp = SFX_APP();
+ SfxApplication *pSfxApp = SfxGetpApp();
if ( bMDI )
{
@@ -1092,7 +1092,7 @@ const SfxPoolItem* SfxDispatcher::Execute
pReq->SetModifier( nModi );
if( pInternalArgs && *pInternalArgs)
{
- SfxAllItemSet aSet( SFX_APP()->GetPool() );
+ SfxAllItemSet aSet( SfxGetpApp()->GetPool() );
for ( const SfxPoolItem **pArg = pInternalArgs; *pArg; ++pArg )
aSet.Put( **pArg );
pReq->SetInternalArgs_Impl( aSet );
@@ -1249,7 +1249,7 @@ IMPL_LINK( SfxDispatcher, PostMsgHandler, SfxRequest*, pReq )
const SfxSlot *pSlot = aSvr.GetSlot();
SfxShell *pSh = GetShell(aSvr.GetShellLevel());
- DBG( SfxApplication *pSfxApp = SFX_APP() );
+ DBG( SfxApplication *pSfxApp = SfxGetpApp() );
DBG( pSfxApp->EnterAsynchronCall_Impl() );
// When the pSlot is a "Pseudoslot" for macros or Verbs, it can
@@ -1312,7 +1312,7 @@ void SfxDispatcher::Update_Impl( bool bForce )
if ( !pImp->pFrame )
return;
- SFX_APP(); // -Wall is this required???
+ SfxGetpApp(); // -Wall is this required???
SfxDispatcher *pDisp = this;
bool bUpdate = bForce;
while ( pDisp && pDisp->pImp->pFrame )
@@ -1413,7 +1413,7 @@ void SfxDispatcher::Update_Impl( bool bForce )
void SfxDispatcher::_Update_Impl( bool bUIActive, bool bIsMDIApp, bool bIsIPOwner, SfxWorkWindow *pTaskWin )
{
- SFX_APP();
+ SfxGetpApp();
SfxWorkWindow *pWorkWin = pImp->pFrame->GetFrame().GetWorkWindow_Impl();
bool bIsActive = false;
bool bIsTaskActive = false;
@@ -1604,7 +1604,7 @@ void SfxDispatcher::FlushImpl()
return;
}
- SfxApplication *pSfxApp = SFX_APP();
+ SfxApplication *pSfxApp = SfxGetpApp();
// Re-build the true stack in the first round
std::deque<SfxToDo_Impl> aToDoCopy;
@@ -2112,7 +2112,7 @@ bool SfxDispatcher::_FillState
SfxPopupMenuManager* SfxDispatcher::Popup( sal_uInt16 nConfigId,Window *pWin, const Point *pPos )
{
- SfxDispatcher &rDisp = *SFX_APP()->GetDispatcher_Impl();
+ SfxDispatcher &rDisp = *SfxGetpApp()->GetDispatcher_Impl();
sal_uInt16 nShLevel = 0;
SfxShell *pSh;
@@ -2138,7 +2138,7 @@ SfxPopupMenuManager* SfxDispatcher::Popup( sal_uInt16 nConfigId,Window *pWin, co
void SfxDispatcher::ExecutePopup( sal_uInt16 nConfigId, Window *pWin, const Point *pPos )
{
- SfxDispatcher &rDisp = *SFX_APP()->GetDispatcher_Impl();
+ SfxDispatcher &rDisp = *SfxGetpApp()->GetDispatcher_Impl();
sal_uInt16 nShLevel = 0;
SfxShell *pSh;
@@ -2337,7 +2337,7 @@ void SfxDispatcher::RemoveShell_Impl( SfxShell& rShell )
}
}
- if ( !SFX_APP()->IsDowning() )
+ if ( !SfxGetpApp()->IsDowning() )
{
pImp->bUpdated = false;
pImp->pCachedServ1 = 0;
diff --git a/sfx2/source/control/msgpool.cxx b/sfx2/source/control/msgpool.cxx
index 352de2c113cd..f059dada9385 100644
--- a/sfx2/source/control/msgpool.cxx
+++ b/sfx2/source/control/msgpool.cxx
@@ -322,7 +322,7 @@ SfxSlotPool& SfxSlotPool::GetSlotPool( SfxViewFrame *pFrame )
if ( pMod && pMod->GetSlotPool() )
return *pMod->GetSlotPool();
else
- return *SFX_APP()->Get_Impl()->pSlotPool;
+ return *SfxGetpApp()->Get_Impl()->pSlotPool;
}
diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx
index 59347e6c5428..fe5248375bb3 100644
--- a/sfx2/source/control/objface.cxx
+++ b/sfx2/source/control/objface.cxx
@@ -134,7 +134,7 @@ void SfxInterface::Register( SfxModule* pMod )
if ( pMod )
pMod->GetSlotPool()->RegisterInterface(*this);
else
- SFX_APP()->GetAppSlotPool_Impl().RegisterInterface(*this);
+ SfxGetpApp()->GetAppSlotPool_Impl().RegisterInterface(*this);
}
void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, sal_uInt16 nSlotCount )
@@ -295,7 +295,7 @@ SfxInterface::~SfxInterface()
if ( pMod )
pMod->GetSlotPool()->ReleaseInterface(*this);
else
- SFX_APP()->GetAppSlotPool_Impl().ReleaseInterface(*this);
+ SfxGetpApp()->GetAppSlotPool_Impl().ReleaseInterface(*this);
}
}
diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx
index 940be5f191c4..8ee8d72a6699 100644
--- a/sfx2/source/control/statcach.cxx
+++ b/sfx2/source/control/statcach.cxx
@@ -280,7 +280,7 @@ const SfxSlotServer* SfxStateCache::GetSlotServer( SfxDispatcher &rDispat , cons
// If this dispatch object does not use the wanted dispatcher or the AppDispatcher, it's treated like any other UNO component
// (intercepting by internal dispatches)
SfxDispatcher *pDispatcher = pDisp->GetDispatcher_Impl();
- if ( pDispatcher == &rDispat || pDispatcher == SFX_APP()->GetAppDispatcher_Impl() )
+ if ( pDispatcher == &rDispat || pDispatcher == SfxGetpApp()->GetAppDispatcher_Impl() )
{
// so we can use it directly
bSlotDirty = false;
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 400063f815e6..1c44eb6f115b 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -686,7 +686,7 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const ::com::sun::star::util
// ~CntItemPool:
if (pDispatcher)
{
- SfxAllItemSet aInternalSet( SFX_APP()->GetPool() );
+ SfxAllItemSet aInternalSet( SfxGetpApp()->GetPool() );
if (xFrameRef.is()) // an empty set is no problem ... but an empty frame reference can be a problem !
aInternalSet.Put( SfxUnoFrameItem( SID_FILLFRAME, xFrameRef ) );
@@ -742,9 +742,9 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const ::com::sun::star::util
}
else
{
- eMapUnit = GetCoreMetric( SFX_APP()->GetPool(), GetId() );
+ eMapUnit = GetCoreMetric( SfxGetpApp()->GetPool(), GetId() );
// AppDispatcher
- SfxAllItemSet aSet( SFX_APP()->GetPool() );
+ SfxAllItemSet aSet( SfxGetpApp()->GetPool() );
TransformParameters( GetId(), lNewArgs, aSet );
if ( aSet.Count() )
@@ -756,7 +756,7 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const ::com::sun::star::util
// no bindings, no invalidate ( usually done in SfxDispatcher::Call_Impl()! )
if ( SfxApplication::Get() )
{
- SfxDispatcher* pAppDispat = SFX_APP()->GetAppDispatcher_Impl();
+ SfxDispatcher* pAppDispat = SfxGetpApp()->GetAppDispatcher_Impl();
if ( pAppDispat )
{
const SfxPoolItem* pState=0;
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index ecda3b483cc2..78015cd9c94f 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -1414,7 +1414,7 @@ ErrCode FileDialogHelper_Impl::execute( std::vector<OUString>& rpURLList,
{
// create an itemset if there is no
if( !rpSet )
- rpSet = new SfxAllItemSet( SFX_APP()->GetPool() );
+ rpSet = new SfxAllItemSet( SfxGetpApp()->GetPool() );
// the item should remain only if it was set by the dialog
rpSet->ClearItem( SID_SELECTION );
@@ -1707,7 +1707,7 @@ void FileDialogHelper_Impl::addFilters( const OUString& rFactory,
// we still need a matcher to convert UI names to filter names
if ( rFactory.isEmpty() )
{
- SfxApplication *pSfxApp = SFX_APP();
+ SfxApplication *pSfxApp = SfxGetpApp();
mpMatcher = &pSfxApp->GetFilterMatcher();
mbDeleteMatcher = false;
}
@@ -1994,7 +1994,7 @@ void FileDialogHelper_Impl::saveConfig()
aDlgOpt.SetUserItem( USERITEM_NAME, makeAny( OUString( aUserData ) ) );
}
- SfxApplication *pSfxApp = SFX_APP();
+ SfxApplication *pSfxApp = SfxGetpApp();
pSfxApp->SetLastDir_Impl( getPath() );
}
@@ -2002,7 +2002,7 @@ namespace
{
static OUString getInitPath( const OUString& _rFallback, const sal_Int32 _nFallbackToken )
{
- SfxApplication *pSfxApp = SFX_APP();
+ SfxApplication *pSfxApp = SfxGetpApp();
OUString sPath = pSfxApp->GetLastDir_Impl();
if ( sPath.isEmpty() )
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index 14934e683fc0..41830a187fc6 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -74,7 +74,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(Window* pParent, const SfxItemS
// this Page needs ExchangeSupport
SetExchangeSupport();
- ResMgr* pResMgr = SFX_APP()->GetModule_Impl()->GetResMgr();
+ ResMgr* pResMgr = SfxGetpApp()->GetModule_Impl()->GetResMgr();
OSL_ENSURE( pResMgr, "No ResMgr in Module" );
pFamilies = new SfxStyleFamilies( ResId( DLG_STYLE_DESIGNER, *pResMgr ) );
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 3bc6a7f828d5..debeb01b59f9 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -642,7 +642,7 @@ void SfxTabDialog::Start_Impl()
nActPage = nAppPageId;
else
{
- sal_uInt16 nAutoTabPageId = SFX_APP()->Get_Impl()->nAutoTabPageId;
+ sal_uInt16 nAutoTabPageId = SfxGetpApp()->Get_Impl()->nAutoTabPageId;
if ( nAutoTabPageId )
nActPage = nAutoTabPageId;
}
@@ -925,7 +925,7 @@ SfxItemSet* SfxTabDialog::CreateInputItemSet( sal_uInt16 )
{
SAL_WARN( "sfx.dialog", "CreateInputItemSet not implemented" );
- return new SfxAllItemSet( SFX_APP()->GetPool() );
+ return new SfxAllItemSet( SfxGetpApp()->GetPool() );
}
@@ -1162,7 +1162,7 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
sal_uInt16 nId = pTabCtrl->GetCurPageId();
DBG_ASSERT( pImpl->aData.size(), "no Pages registered" );
- SFX_APP();
+ SfxGetpApp();
// Tab Page schon da?
SfxTabPage* pTabPage = dynamic_cast<SfxTabPage*> (pTabCtrl->GetTabPage( nId ));
@@ -1260,7 +1260,7 @@ IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl )
{
sal_uInt16 nId = pTabCtrl->GetCurPageId();
- SFX_APP();
+ SfxGetpApp();
SfxTabPage *pPage = dynamic_cast<SfxTabPage*> (pTabCtrl->GetTabPage( nId ));
DBG_ASSERT( pPage, "no active Page" );
if (!pPage)
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 56396a7ded49..a2912eae8f29 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -1715,7 +1715,7 @@ bool SfxCommonTemplateDialog_Impl::Execute_Impl(
sal_uInt16 nId, const OUString &rStr, const OUString& rRefStr, sal_uInt16 nFamily,
sal_uInt16 nMask, sal_uInt16 *pIdx, const sal_uInt16* pModifier)
{
- SfxDispatcher &rDispatcher = *SFX_APP()->GetDispatcher_Impl();
+ SfxDispatcher &rDispatcher = *SfxGetpApp()->GetDispatcher_Impl();
SfxStringItem aItem(nId, rStr);
SfxUInt16Item aFamily(SID_STYLE_FAMILY, nFamily);
SfxUInt16Item aMask( SID_STYLE_MASK, nMask );
@@ -1927,7 +1927,7 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(sal_uInt16 nEntry)
break;
}
case SID_TEMPLATE_LOAD:
- SFX_APP()->GetDispatcher_Impl()->Execute(nEntry);
+ SfxGetpApp()->GetDispatcher_Impl()->Execute(nEntry);
break;
default: OSL_FAIL("not implemented"); break;
}
@@ -2117,7 +2117,7 @@ void SfxCommonTemplateDialog_Impl::DeleteHdl(void *)
if ( bUsedStyle )
{
#if defined UNX
- QueryBox aBox( SFX_APP()->GetTopWindow(), WB_YES_NO | WB_DEF_NO, aMsg );
+ QueryBox aBox( SfxGetpApp()->GetTopWindow(), WB_YES_NO | WB_DEF_NO, aMsg );
#else
QueryBox aBox( GetWindow(), WB_YES_NO | WB_DEF_NO , aMsg );
#endif
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index b70421e04b84..4cb807d7d821 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -2822,7 +2822,7 @@ SfxMedium::SfxMedium(const OUString &rName, const OUString &rReferer, StreamMode
SfxMedium::SfxMedium( const uno::Sequence<beans::PropertyValue>& aArgs ) :
pImp(new SfxMedium_Impl(this))
{
- SfxAllItemSet *pParams = new SfxAllItemSet( SFX_APP()->GetPool() );
+ SfxAllItemSet *pParams = new SfxAllItemSet( SfxGetpApp()->GetPool() );
pImp->m_pSet = pParams;
TransformParameters( SID_OPENDOC, aArgs, *pParams );
@@ -2839,7 +2839,7 @@ SfxMedium::SfxMedium( const uno::Sequence<beans::PropertyValue>& aArgs ) :
if (aFilterProvider.isEmpty())
{
// This is a conventional filter type.
- pImp->m_pFilter = SFX_APP()->GetFilterMatcher().GetFilter4FilterName( aFilterName );
+ pImp->m_pFilter = SfxGetpApp()->GetFilterMatcher().GetFilter4FilterName( aFilterName );
}
else
{
@@ -2892,7 +2892,7 @@ SfxMedium::SfxMedium( const uno::Reference < embed::XStorage >& rStor, const OUS
pImp(new SfxMedium_Impl(this))
{
OUString aType = SfxFilter::GetTypeFromStorage(rStor);
- pImp->m_pFilter = SFX_APP()->GetFilterMatcher().GetFilter4EA( aType );
+ pImp->m_pFilter = SfxGetpApp()->GetFilterMatcher().GetFilter4EA( aType );
DBG_ASSERT( pImp->m_pFilter, "No Filter for storage found!" );
Init_Impl();
@@ -2910,7 +2910,7 @@ SfxMedium::SfxMedium( const uno::Reference < embed::XStorage >& rStor, const OUS
SfxMedium::SfxMedium( const uno::Reference < embed::XStorage >& rStor, const OUString& rBaseURL, const OUString &rTypeName, const SfxItemSet* p ) :
pImp(new SfxMedium_Impl(this))
{
- pImp->m_pFilter = SFX_APP()->GetFilterMatcher().GetFilter4EA( rTypeName );
+ pImp->m_pFilter = SfxGetpApp()->GetFilterMatcher().GetFilter4EA( rTypeName );
DBG_ASSERT( pImp->m_pFilter, "No Filter for storage found!" );
Init_Impl();
@@ -3015,7 +3015,7 @@ SfxItemSet* SfxMedium::GetItemSet() const
{
// this method *must* return an ItemSet, returning NULL can cause crashes
if (!pImp->m_pSet)
- pImp->m_pSet = new SfxAllItemSet( SFX_APP()->GetPool() );
+ pImp->m_pSet = new SfxAllItemSet( SfxGetpApp()->GetPool() );
return pImp->m_pSet;
}
diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx
index ce2b0c22ebba..e51854ebe18e 100644
--- a/sfx2/source/doc/docinsert.cxx
+++ b/sfx2/source/doc/docinsert.cxx
@@ -87,7 +87,7 @@ SfxMedium* DocumentInserter::CreateMedium()
OUString sURL(m_pURLList[0]);
pMedium = new SfxMedium(
sURL, SFX_STREAM_READONLY,
- SFX_APP()->GetFilterMatcher().GetFilter4FilterName( m_sFilter ), m_pItemSet );
+ SfxGetpApp()->GetFilterMatcher().GetFilter4FilterName( m_sFilter ), m_pItemSet );
pMedium->UseInteractionHandler( true );
SfxFilterMatcher* pMatcher = NULL;
if ( !m_sDocFactory.isEmpty() )
@@ -102,7 +102,7 @@ SfxMedium* DocumentInserter::CreateMedium()
else
DELETEZ( pMedium );
- if ( pMedium && CheckPasswd_Impl( 0, SFX_APP()->GetPool(), pMedium ) == ERRCODE_ABORT )
+ if ( pMedium && CheckPasswd_Impl( 0, SfxGetpApp()->GetPool(), pMedium ) == ERRCODE_ABORT )
pMedium = NULL;
DELETEZ( pMatcher );
@@ -120,7 +120,7 @@ SfxMediumList* DocumentInserter::CreateMediumList()
{
SfxMedium* pMedium = new SfxMedium(
*i, SFX_STREAM_READONLY,
- SFX_APP()->GetFilterMatcher().GetFilter4FilterName( m_sFilter ), m_pItemSet );
+ SfxGetpApp()->GetFilterMatcher().GetFilter4FilterName( m_sFilter ), m_pItemSet );
pMedium->UseInteractionHandler( true );
@@ -132,7 +132,7 @@ SfxMediumList* DocumentInserter::CreateMediumList()
else
DELETEZ( pMedium );
- if( pMedium && CheckPasswd_Impl( 0, SFX_APP()->GetPool(), pMedium ) != ERRCODE_ABORT )
+ if( pMedium && CheckPasswd_Impl( 0, SfxGetpApp()->GetPool(), pMedium ) != ERRCODE_ABORT )
pMediumList->push_back( pMedium );
else
delete pMedium;
@@ -173,7 +173,7 @@ IMPL_LINK_NOARG(DocumentInserter, DialogClosedHdl)
if ( xCtrlAccess.is() )
{
// always create a new itemset
- m_pItemSet = new SfxAllItemSet( SFX_APP()->GetPool() );
+ m_pItemSet = new SfxAllItemSet( SfxGetpApp()->GetPool() );
short nDlgType = m_pFileDlg->GetDialogType();
bool bHasPassword = (
diff --git a/sfx2/source/doc/frmdescr.cxx b/sfx2/source/doc/frmdescr.cxx
index e1fc9b4721b2..6b9e23663f67 100644
--- a/sfx2/source/doc/frmdescr.cxx
+++ b/sfx2/source/doc/frmdescr.cxx
@@ -64,7 +64,7 @@ SfxFrameDescriptor::~SfxFrameDescriptor()
SfxItemSet* SfxFrameDescriptor::GetArgs()
{
if( !pImp->pArgs )
- pImp->pArgs = new SfxAllItemSet( SFX_APP()->GetPool() );
+ pImp->pArgs = new SfxAllItemSet( SfxGetpApp()->GetPool() );
return pImp->pArgs;
}
@@ -118,7 +118,7 @@ SfxFrameDescriptor* SfxFrameDescriptor::Clone( bool bWithIds ) const
if( pImp->pArgs )
{
// Currently in the clone of SfxAllItemSets there is still a bug ...
- pFrame->pImp->pArgs = new SfxAllItemSet( SFX_APP()->GetPool() );
+ pFrame->pImp->pArgs = new SfxAllItemSet( SfxGetpApp()->GetPool() );
pFrame->pImp->pArgs->Put(*pImp->pArgs);
}
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 85a9947c267a..b6efad193fbc 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -1048,7 +1048,7 @@ bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
// generate SidSet from MediaDescriptor and provide it into FileDialog
// than merge changed SidSet back
- SfxAllItemSet aDialogParams( SFX_APP()->GetPool() );
+ SfxAllItemSet aDialogParams( SfxGetpApp()->GetPool() );
SfxItemSet* pDialogParams = &aDialogParams;
TransformParameters( nSlotID,
GetMediaDescr().getAsConstPropertyValueList(),
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index 77680ff2c5f6..9997782dc649 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -219,7 +219,7 @@ IMPL_LINK_NOARG(SfxNewFileDialog_Impl, Update)
Window *pParent = Application::GetDefDialogParent();
Application::SetDefDialogParent( pAntiImpl );
SfxErrorContext eEC(ERRCTX_SFX_LOADTEMPLATE,pAntiImpl);
- SfxApplication *pSfxApp = SFX_APP();
+ SfxApplication *pSfxApp = SfxGetpApp();
sal_uIntPtr lErr;
SfxItemSet* pSet = new SfxAllItemSet( pSfxApp->GetPool() );
pSet->Put( SfxBoolItem( SID_TEMPLATE, true ) );
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 7bba8d6b791c..33700ffc22f7 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -527,7 +527,7 @@ void SfxObjectShell::ResetFromTemplate( const OUString& rTemplateName, const OUS
if( ::utl::LocalFileHelper::IsLocalFile( rFileName ) )
{
OUString aFoundName;
- if( SFX_APP()->Get_Impl()->GetDocumentTemplates()->GetFull( OUString(), rTemplateName, aFoundName ) )
+ if( SfxGetpApp()->Get_Impl()->GetDocumentTemplates()->GetFull( OUString(), rTemplateName, aFoundName ) )
{
INetURLObject aObj( rFileName );
xDocProps->setTemplateURL( aObj.GetMainURL(INetURLObject::DECODE_TO_IURI) );
diff --git a/sfx2/source/doc/objembed.cxx b/sfx2/source/doc/objembed.cxx
index c4c95e3c351b..7c69dc8a6238 100644
--- a/sfx2/source/doc/objembed.cxx
+++ b/sfx2/source/doc/objembed.cxx
@@ -123,7 +123,7 @@ void SfxObjectShell::SetVisArea( const Rectangle & rVisArea )
if ( IsEnableSetModified() )
SetModified( true );
- SFX_APP()->NotifyEvent(SfxEventHint( SFX_EVENT_VISAREACHANGED, GlobalEventConfig::GetEventName(STR_EVENT_VISAREACHANGED), this));
+ SfxGetpApp()->NotifyEvent(SfxEventHint( SFX_EVENT_VISAREACHANGED, GlobalEventConfig::GetEventName(STR_EVENT_VISAREACHANGED), this));
}
}
}
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index f296e98df93f..34fe8656a537 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -366,7 +366,7 @@ void SfxObjectShell::ModifyChanged()
Invalidate( SID_MACRO_SIGNATURE );
Broadcast( SfxSimpleHint( SFX_HINT_TITLECHANGED ) ); // xmlsec05, signed state might change in title...
- SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_MODIFYCHANGED, GlobalEventConfig::GetEventName(STR_EVENT_MODIFYCHANGED), this ) );
+ SfxGetpApp()->NotifyEvent( SfxEventHint( SFX_EVENT_MODIFYCHANGED, GlobalEventConfig::GetEventName(STR_EVENT_MODIFYCHANGED), this ) );
}
@@ -486,7 +486,7 @@ void SfxObjectShell::SetModalMode_Impl( bool bModal )
if ( !pImp->bModalMode != !bModal )
{
// Central count
- sal_uInt16 &rDocModalCount = SFX_APP()->Get_Impl()->nDocModalMode;
+ sal_uInt16 &rDocModalCount = SfxGetpApp()->Get_Impl()->nDocModalMode;
if ( bModal )
++rDocModalCount;
else
@@ -728,7 +728,7 @@ void SfxObjectShell::SetTitle
&& !IsDocShared() )
return;
- SfxApplication *pSfxApp = SFX_APP();
+ SfxApplication *pSfxApp = SfxGetpApp();
// If possible relase the unnamed number.
if ( pImp->bIsNamedVisible && USHRT_MAX != pImp->nVisualDocumentNumber )
@@ -972,7 +972,7 @@ void SfxObjectShell::SetNamedVisibility_Impl()
pImp->bIsNamedVisible = true;
if ( !HasName() && USHRT_MAX == pImp->nVisualDocumentNumber && pImp->aTitle.isEmpty() )
{
- pImp->nVisualDocumentNumber = SFX_APP()->GetFreeIndex();
+ pImp->nVisualDocumentNumber = SfxGetpApp()->GetFreeIndex();
Broadcast( SfxSimpleHint(SFX_HINT_TITLECHANGED) );
}
}
@@ -1018,7 +1018,7 @@ void SfxObjectShell::SetProgress_Impl
void SfxObjectShell::PostActivateEvent_Impl( SfxViewFrame* pFrame )
{
- SfxApplication* pSfxApp = SFX_APP();
+ SfxApplication* pSfxApp = SfxGetpApp();
if ( !pSfxApp->IsDowning() && !IsLoading() && pFrame && !pFrame->GetFrame().IsClosing_Impl() )
{
SFX_ITEMSET_ARG( pMedium->GetItemSet(), pHiddenItem, SfxBoolItem, SID_HIDDEN, false );
@@ -1447,7 +1447,7 @@ void AutoReloadTimer_Impl::Timeout()
return;
}
- SfxAllItemSet aSet( SFX_APP()->GetPool() );
+ SfxAllItemSet aSet( SfxGetpApp()->GetPool() );
aSet.Put( SfxBoolItem( SID_AUTOLOAD, true ) );
if ( !aUrl.isEmpty() )
aSet.Put( SfxStringItem( SID_FILE_NAME, aUrl ) );
@@ -1475,7 +1475,7 @@ ErrCode SfxObjectShell::CallBasic( const OUString& rMacro,
const OUString& rBasic, SbxArray* pArgs,
SbxValue* pRet )
{
- SfxApplication* pApp = SFX_APP();
+ SfxApplication* pApp = SfxGetpApp();
if( pApp->GetName() != rBasic )
{
if ( !AdjustMacroMode( OUString() ) )
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 707fd3c57eeb..f389232cd63f 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1272,7 +1272,7 @@ void SfxObjectShell::ExecView_Impl(SfxRequest &rReq)
{
SfxStringItem aName( SID_FILE_NAME, aFileName );
SfxBoolItem aCreateView( SID_OPEN_NEW_VIEW, true );
- SFX_APP()->GetAppDispatcher_Impl()->Execute(
+ SfxGetpApp()->GetAppDispatcher_Impl()->Execute(
SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, &aName,
&aCreateView, 0L);
}
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 1e37373efdd7..3f789e004f5b 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -572,7 +572,7 @@ bool SfxObjectShell::ImportFromGeneratedStream_Impl(
else
pMedium->SetStorage_Impl( xStorage );
- SfxAllItemSet aSet( SFX_APP()->GetPool() );
+ SfxAllItemSet aSet( SfxGetpApp()->GetPool() );
TransformParameters( SID_OPENDOC, rMediaDescr, aSet );
pMedium->GetItemSet()->Put( aSet );
pMedium->CanDisposeStorage_Impl( false );
@@ -1349,7 +1349,7 @@ bool SfxObjectShell::SaveTo_Impl
// a draw document ), the ClassId of the destination storage is different from the ClassId of this
// document. It can be retrieved from the default filter for the desired target format
long nFormat = rMedium.GetFilter()->GetFormat();
- SfxFilterMatcher& rMatcher = SFX_APP()->GetFilterMatcher();
+ SfxFilterMatcher& rMatcher = SfxGetpApp()->GetFilterMatcher();
const SfxFilter *pFilt = rMatcher.GetFilter4ClipBoardId( nFormat );
if ( pFilt )
{
@@ -3050,7 +3050,7 @@ bool SfxObjectShell::LoadOwnFormat( SfxMedium& rMedium )
{
// Password
SFX_ITEMSET_ARG( rMedium.GetItemSet(), pPasswdItem, SfxStringItem, SID_PASSWORD, false );
- if ( pPasswdItem || ERRCODE_IO_ABORT != CheckPasswd_Impl( this, SFX_APP()->GetPool(), pMedium ) )
+ if ( pPasswdItem || ERRCODE_IO_ABORT != CheckPasswd_Impl( this, SfxGetpApp()->GetPool(), pMedium ) )
{
uno::Sequence< beans::NamedValue > aEncryptionData;
if ( GetEncryptionData_Impl(pMedium->GetItemSet(), aEncryptionData) )
@@ -3119,7 +3119,7 @@ uno::Reference< embed::XStorage > SfxObjectShell::GetStorage()
SetupStorage( pImp->m_xDocStorage, SOFFICE_FILEFORMAT_CURRENT, false, false );
pImp->m_bCreateTempStor = false;
- SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_STORAGECHANGED, GlobalEventConfig::GetEventName(STR_EVENT_STORAGECHANGED), this ) );
+ SfxGetpApp()->NotifyEvent( SfxEventHint( SFX_EVENT_STORAGECHANGED, GlobalEventConfig::GetEventName(STR_EVENT_STORAGECHANGED), this ) );
}
catch( uno::Exception& )
{
@@ -3271,7 +3271,7 @@ bool SfxObjectShell::SaveCompleted( const uno::Reference< embed::XStorage >& xSt
if ( bSendNotification )
{
- SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_STORAGECHANGED, GlobalEventConfig::GetEventName(STR_EVENT_STORAGECHANGED), this ) );
+ SfxGetpApp()->NotifyEvent( SfxEventHint( SFX_EVENT_STORAGECHANGED, GlobalEventConfig::GetEventName(STR_EVENT_STORAGECHANGED), this ) );
}
return bResult;
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index e3eff9571c23..9ce512b21582 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -188,7 +188,7 @@ void SAL_CALL SfxModelListener_Impl::disposing( const com::sun::star::lang::Even
VBAConstantNameMap::iterator aIt = s_aRegisteredVBAConstants.find( _rEvent.Source.get() );
if ( aIt != s_aRegisteredVBAConstants.end() )
{
- if ( BasicManager* pAppMgr = SFX_APP()->GetBasicManager() )
+ if ( BasicManager* pAppMgr = SfxGetpApp()->GetBasicManager() )
pAppMgr->SetGlobalUNOConstant( aIt->second.getStr(), Any( Reference< XInterface >() ) );
s_aRegisteredVBAConstants.erase( aIt );
}
@@ -267,7 +267,7 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell )
,m_bModifyPasswordEntered( false )
{
SfxObjectShell* pDoc = &_rDocShell;
- SfxObjectShellArr_Impl &rArr = SFX_APP()->GetObjectShells_Impl();
+ SfxObjectShellArr_Impl &rArr = SfxGetpApp()->GetObjectShells_Impl();
rArr.push_back( pDoc );
bInList = true;
}
@@ -359,7 +359,7 @@ SfxObjectShell::~SfxObjectShell()
DELETEX(AutoReloadTimer_Impl, pImp->pReloadTimer );
- SfxApplication *pSfxApp = SFX_APP();
+ SfxApplication *pSfxApp = SfxGetpApp();
if ( USHRT_MAX != pImp->nVisualDocumentNumber )
pSfxApp->ReleaseIndex(pImp->nVisualDocumentNumber);
@@ -462,7 +462,7 @@ bool SfxObjectShell::Close()
if ( pImp->bClosing )
{
// remove from Document list
- SfxApplication *pSfxApp = SFX_APP();
+ SfxApplication *pSfxApp = SfxGetpApp();
SfxObjectShellArr_Impl &rDocs = pSfxApp->GetObjectShells_Impl();
SfxObjectShellArr_Impl::iterator it = std::find( rDocs.begin(), rDocs.end(), this );
if ( it != rDocs.end() )
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 64b2fb2d47a0..eb5088541155 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1091,7 +1091,7 @@ void SAL_CALL SfxBaseModel::connectController( const Reference< frame::XControll
pViewFrame->UpdateDocument_Impl();
const OUString sDocumentURL = GetObjectShell()->GetMedium()->GetName();
if ( !sDocumentURL.isEmpty() )
- SFX_APP()->Broadcast( SfxStringHint( SID_OPENURL, sDocumentURL ) );
+ SfxGetpApp()->Broadcast( SfxStringHint( SID_OPENURL, sDocumentURL ) );
}
}
@@ -1572,10 +1572,10 @@ void SAL_CALL SfxBaseModel::storeSelf( const Sequence< beans::PropertyValue >
}
}
- SfxAllItemSet *pParams = new SfxAllItemSet( SFX_APP()->GetPool() );
+ SfxAllItemSet *pParams = new SfxAllItemSet( SfxGetpApp()->GetPool() );
TransformParameters( nSlotId, aArgs, *pParams );
- SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_SAVEDOC, GlobalEventConfig::GetEventName(STR_EVENT_SAVEDOC), m_pData->m_pObjectShell ) );
+ SfxGetpApp()->NotifyEvent( SfxEventHint( SFX_EVENT_SAVEDOC, GlobalEventConfig::GetEventName(STR_EVENT_SAVEDOC), m_pData->m_pObjectShell ) );
bool bRet = false;
@@ -1616,7 +1616,7 @@ void SAL_CALL SfxBaseModel::storeSelf( const Sequence< beans::PropertyValue >
m_pData->m_pObjectShell->AddLog( OUString( OSL_LOG_PREFIX "successful saving." ) );
m_pData->m_aPreusedFilterName = GetMediumFilterName_Impl();
- SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_SAVEDOCDONE, GlobalEventConfig::GetEventName(STR_EVENT_SAVEDOCDONE), m_pData->m_pObjectShell ) );
+ SfxGetpApp()->NotifyEvent( SfxEventHint( SFX_EVENT_SAVEDOCDONE, GlobalEventConfig::GetEventName(STR_EVENT_SAVEDOCDONE), m_pData->m_pObjectShell ) );
}
else
{
@@ -1624,7 +1624,7 @@ void SAL_CALL SfxBaseModel::storeSelf( const Sequence< beans::PropertyValue >
m_pData->m_pObjectShell->StoreLog();
// write the contents of the logger to the file
- SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_SAVEDOCFAILED, GlobalEventConfig::GetEventName(STR_EVENT_SAVEDOCFAILED), m_pData->m_pObjectShell ) );
+ SfxGetpApp()->NotifyEvent( SfxEventHint( SFX_EVENT_SAVEDOCFAILED, GlobalEventConfig::GetEventName(STR_EVENT_SAVEDOCFAILED), m_pData->m_pObjectShell ) );
throw task::ErrorCodeIOException(
"SfxBaseModel::storeSelf: 0x" + OUString::number(nErrCode, 16),
@@ -1904,7 +1904,7 @@ void SAL_CALL SfxBaseModel::load( const Sequence< beans::PropertyValue >& seqA
{
// file recovery: restore original filter
SFX_ITEMSET_ARG( pMedium->GetItemSet(), pFilterItem, SfxStringItem, SID_FILTER_NAME, false );
- SfxFilterMatcher& rMatcher = SFX_APP()->GetFilterMatcher();
+ SfxFilterMatcher& rMatcher = SfxGetpApp()->GetFilterMatcher();
const SfxFilter* pSetFilter = rMatcher.GetFilter4FilterName( pFilterItem->GetValue() );
pMedium->SetFilter( pSetFilter );
m_pData->m_pObjectShell->SetModified(true);
@@ -3006,10 +3006,10 @@ void SfxBaseModel::impl_store( const OUString& sURL
if ( !bSaved && m_pData->m_pObjectShell )
{
- SFX_APP()->NotifyEvent( SfxEventHint( bSaveTo ? SFX_EVENT_SAVETODOC : SFX_EVENT_SAVEASDOC, GlobalEventConfig::GetEventName( bSaveTo ? STR_EVENT_SAVETODOC : STR_EVENT_SAVEASDOC ),
+ SfxGetpApp()->NotifyEvent( SfxEventHint( bSaveTo ? SFX_EVENT_SAVETODOC : SFX_EVENT_SAVEASDOC, GlobalEventConfig::GetEventName( bSaveTo ? STR_EVENT_SAVETODOC : STR_EVENT_SAVEASDOC ),
m_pData->m_pObjectShell ) );
- SfxAllItemSet *aParams = new SfxAllItemSet( SFX_APP()->GetPool() );
+ SfxAllItemSet *aParams = new SfxAllItemSet( SfxGetpApp()->GetPool() );
aParams->Put( SfxStringItem( SID_FILE_NAME, sURL ) );
if ( bSaveTo )
aParams->Put( SfxBoolItem( SID_SAVETO, true ) );
@@ -3106,14 +3106,14 @@ void SfxBaseModel::impl_store( const OUString& sURL
m_pData->m_aPreusedFilterName = GetMediumFilterName_Impl();
m_pData->m_pObjectShell->SetModifyPasswordEntered();
- SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_SAVEASDOCDONE, GlobalEventConfig::GetEventName(STR_EVENT_SAVEASDOCDONE), m_pData->m_pObjectShell ) );
+ SfxGetpApp()->NotifyEvent( SfxEventHint( SFX_EVENT_SAVEASDOCDONE, GlobalEventConfig::GetEventName(STR_EVENT_SAVEASDOCDONE), m_pData->m_pObjectShell ) );
}
else
{
m_pData->m_pObjectShell->SetModifyPasswordHash( nOldModifyPasswordHash );
m_pData->m_pObjectShell->SetModifyPasswordInfo( aOldModifyPasswordInfo );
- SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_SAVETODOCDONE, GlobalEventConfig::GetEventName(STR_EVENT_SAVETODOCDONE), m_pData->m_pObjectShell ) );
+ SfxGetpApp()->NotifyEvent( SfxEventHint( SFX_EVENT_SAVETODOCDONE, GlobalEventConfig::GetEventName(STR_EVENT_SAVETODOCDONE), m_pData->m_pObjectShell ) );
}
}
else
@@ -3126,7 +3126,7 @@ void SfxBaseModel::impl_store( const OUString& sURL
m_pData->m_pObjectShell->SetModifyPasswordInfo( aOldModifyPasswordInfo );
- SFX_APP()->NotifyEvent( SfxEventHint( bSaveTo ? SFX_EVENT_SAVETODOCFAILED : SFX_EVENT_SAVEASDOCFAILED, GlobalEventConfig::GetEventName( bSaveTo ? STR_EVENT_SAVETODOCFAILED : STR_EVENT_SAVEASDOCFAILED),
+ SfxGetpApp()->NotifyEvent( SfxEventHint( bSaveTo ? SFX_EVENT_SAVETODOCFAILED : SFX_EVENT_SAVEASDOCFAILED, GlobalEventConfig::GetEventName( bSaveTo ? STR_EVENT_SAVETODOCFAILED : STR_EVENT_SAVEASDOCFAILED),
m_pData->m_pObjectShell ) );
throw task::ErrorCodeIOException(
@@ -3735,7 +3735,7 @@ void SAL_CALL SfxBaseModel::loadFromStorage( const Reference< embed::XStorage >&
// after i36090 is fixed the pool from object shell can be used
// SfxAllItemSet aSet( m_pData->m_pObjectShell->GetPool() );
- SfxAllItemSet aSet( SFX_APP()->GetPool() );
+ SfxAllItemSet aSet( SfxGetpApp()->GetPool() );
// the BaseURL is part of the ItemSet
SfxMedium* pMedium = new SfxMedium( xStorage, OUString() );
@@ -3784,7 +3784,7 @@ void SAL_CALL SfxBaseModel::storeToStorage( const Reference< embed::XStorage >&
if( pItem )
{
OUString aFilterName = pItem->GetValue();
- const SfxFilter* pFilter = SFX_APP()->GetFilterMatcher().GetFilter4FilterName( aFilterName );
+ const SfxFilter* pFilter = SfxGetpApp()->GetFilterMatcher().GetFilter4FilterName( aFilterName );
if ( pFilter && pFilter->UsesStorage() )
nVersion = pFilter->GetVersion();
}
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 2f917961b1f5..019fa7e9a81d 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -1690,7 +1690,7 @@ static bool lcl_getServiceName ( const OUString &rFileURL, OUString &rName )
sal_uIntPtr nFormat = SotStorage::GetFormatID( xStorage );
- const SfxFilter* pFilter = SFX_APP()->GetFilterMatcher().GetFilter4ClipBoardId( nFormat );
+ const SfxFilter* pFilter = SfxGetpApp()->GetFilterMatcher().GetFilter4ClipBoardId( nFormat );
if ( pFilter )
{
diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx
index a4da1786b269..3ce93a96a785 100644
--- a/sfx2/source/menu/mnuitem.cxx
+++ b/sfx2/source/menu/mnuitem.cxx
@@ -252,7 +252,7 @@ void SfxMenuControl::RegisterControl( sal_uInt16 nSlotId, SfxModule *pMod )
void SfxMenuControl::RegisterMenuControl(SfxModule* pMod, SfxMenuCtrlFactory* pFact)
{
- SFX_APP()->RegisterMenuControl_Impl( pMod, pFact );
+ SfxGetpApp()->RegisterMenuControl_Impl( pMod, pFact );
}
SfxMenuControl* SfxMenuControl::CreateControl( sal_uInt16 nId, Menu &rMenu, SfxBindings &rBindings )
@@ -260,7 +260,7 @@ SfxMenuControl* SfxMenuControl::CreateControl( sal_uInt16 nId, Menu &rMenu, SfxB
TypeId aSlotType = SFX_SLOTPOOL().GetSlotType(nId);
if ( aSlotType )
{
- SfxApplication *pApp = SFX_APP();
+ SfxApplication *pApp = SfxGetpApp();
SfxDispatcher *pDisp = rBindings.GetDispatcher_Impl();
SfxModule *pMod = pDisp ? SfxModule::GetActiveModule( pDisp->GetFrame() ) :0;
if ( pMod )
diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx
index b4861cb14bd9..434198de89f9 100644
--- a/sfx2/source/menu/virtmenu.cxx
+++ b/sfx2/source/menu/virtmenu.cxx
@@ -327,7 +327,7 @@ void SfxVirtualMenu::CreateFromSVMenu()
pItems = new SfxMenuControl[nCount];
// remember some values
- SFX_APP();
+ SfxGetpApp();
const int bOleServer = sal_False;
const int bMac = sal_False;
SvtMenuOptions aOptions;
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index 9832c47e3492..311faf5fb795 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -395,7 +395,7 @@ SvxMacro* SfxEvents_Impl::ConvertToMacro( const uno::Any& rElement, SfxObjectShe
if ( !aMacroName.isEmpty() )
{
if ( aLibrary == "application" )
- aLibrary = SFX_APP()->GetName();
+ aLibrary = SfxGetpApp()->GetName();
else
aLibrary = "";
pMacro = new SvxMacro( aMacroName, aLibrary, eType );
@@ -448,7 +448,7 @@ void SfxEvents_Impl::NormalizeMacro( const ::comphelper::NamedValueCollection& i
if ( aBasMgrName == "." )
aLibrary = pDoc->GetTitle();
else
- aLibrary = SFX_APP()->GetName();
+ aLibrary = SfxGetpApp()->GetName();
// Get the macro name
aMacroName = aScript.copy( nHashPos+1, nArgsPos - nHashPos - 1 );
@@ -462,7 +462,7 @@ void SfxEvents_Impl::NormalizeMacro( const ::comphelper::NamedValueCollection& i
else if ( !aMacroName.isEmpty() )
{
aScript = OUString( MACRO_PRFIX );
- if ( aLibrary != SFX_APP()->GetName() && aLibrary != "StarDesktop" && aLibrary != "application" )
+ if ( aLibrary != SfxGetpApp()->GetName() && aLibrary != "StarDesktop" && aLibrary != "application" )
aScript += OUString('.');
aScript += OUString('/');
diff --git a/sfx2/source/notify/globalevents.cxx b/sfx2/source/notify/globalevents.cxx
index fa0949382212..04aef56c3c3f 100644
--- a/sfx2/source/notify/globalevents.cxx
+++ b/sfx2/source/notify/globalevents.cxx
@@ -236,7 +236,7 @@ SfxGlobalEvents_Impl::SfxGlobalEvents_Impl( const uno::Reference < uno::XCompone
, pImp (0 )
{
m_refCount++;
- SFX_APP();
+ SfxGetpApp();
pImp = new GlobalEventConfig();
m_xEvents = pImp;
m_refCount--;
diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx
index e38d3bd082c6..2f5d228236f4 100644
--- a/sfx2/source/sidebar/Theme.cxx
+++ b/sfx2/source/sidebar/Theme.cxx
@@ -36,7 +36,7 @@ namespace sfx2 { namespace sidebar {
Theme& Theme::GetCurrentTheme()
{
- return SFX_APP()->GetSidebarTheme();
+ return SfxGetpApp()->GetSidebarTheme();
}
Theme::Theme()
diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx
index df13974eb563..882c4ea5d398 100644
--- a/sfx2/source/statbar/stbitem.cxx
+++ b/sfx2/source/statbar/stbitem.cxx
@@ -626,7 +626,7 @@ SfxStatusBarControl* SfxStatusBarControl::CreateControl
)
{
SolarMutexGuard aGuard;
- SfxApplication *pApp = SFX_APP();
+ SfxApplication *pApp = SfxGetpApp();
SfxSlotPool *pSlotPool;
if ( pMod )
@@ -665,7 +665,7 @@ SfxStatusBarControl* SfxStatusBarControl::CreateControl
void SfxStatusBarControl::RegisterStatusBarControl(SfxModule* pMod, SfxStbCtrlFactory* pFact)
{
- SFX_APP()->RegisterStatusBarControl_Impl( pMod, pFact );
+ SfxGetpApp()->RegisterStatusBarControl_Impl( pMod, pFact );
}
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index 73380fde79fb..8c443f11c605 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -302,14 +302,14 @@ void SAL_CALL SfxToolBoxControl::dispose() throw (::com::sun::star::uno::Runtime
void SfxToolBoxControl::RegisterToolBoxControl( SfxModule* pMod, SfxTbxCtrlFactory* pFact)
{
- SFX_APP()->RegisterToolBoxControl_Impl( pMod, pFact );
+ SfxGetpApp()->RegisterToolBoxControl_Impl( pMod, pFact );
}
SfxToolBoxControl* SfxToolBoxControl::CreateControl( sal_uInt16 nSlotId, sal_uInt16 nTbxId, ToolBox *pBox, SfxModule* pMod )
{
SolarMutexGuard aGuard;
- SfxApplication *pApp = SFX_APP();
+ SfxApplication *pApp = SfxGetpApp();
SfxSlotPool *pSlotPool;
if ( pMod )
@@ -1130,7 +1130,7 @@ SfxPopupWindow::SfxPopupWindow(
sal_uInt16 nId,
const Reference< XFrame >& rFrame,
WinBits nBits ) :
- FloatingWindow( SFX_APP()->GetTopWindow(), nBits )
+ FloatingWindow( SfxGetpApp()->GetTopWindow(), nBits )
, m_bFloating( false )
, m_bCascading( false )
, m_nId( nId )
@@ -1148,7 +1148,7 @@ SfxPopupWindow::SfxPopupWindow(
sal_uInt16 nId,
const Reference< XFrame >& rFrame,
const ResId &rId ) :
- FloatingWindow( SFX_APP()->GetTopWindow(), rId )
+ FloatingWindow( SfxGetpApp()->GetTopWindow(), rId )
, m_bFloating( false )
, m_bCascading( false )
, m_nId( nId )
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index 416f08502350..26c6b5fe539d 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -213,7 +213,7 @@ bool SfxFrame::PrepareClose_Impl( bool bUI )
bOther = ( &pFrame->GetFrame() != this );
}
- SFX_APP()->NotifyEvent( SfxViewEventHint(SFX_EVENT_PREPARECLOSEVIEW, GlobalEventConfig::GetEventName( STR_EVENT_PREPARECLOSEVIEW ), pCur, GetController() ) );
+ SfxGetpApp()->NotifyEvent( SfxViewEventHint(SFX_EVENT_PREPARECLOSEVIEW, GlobalEventConfig::GetEventName( STR_EVENT_PREPARECLOSEVIEW ), pCur, GetController() ) );
if ( bOther )
// if there are other views only the current view of this frame must be asked
@@ -518,13 +518,13 @@ bool SfxFrame::IsParent( SfxFrame *pFrame ) const
void SfxFrame::InsertTopFrame_Impl( SfxFrame* pFrame )
{
- SfxFrameArr_Impl& rArr = *SFX_APP()->Get_Impl()->pTopFrames;
+ SfxFrameArr_Impl& rArr = *SfxGetpApp()->Get_Impl()->pTopFrames;
rArr.push_back( pFrame );
}
void SfxFrame::RemoveTopFrame_Impl( SfxFrame* pFrame )
{
- SfxFrameArr_Impl& rArr = *SFX_APP()->Get_Impl()->pTopFrames;
+ SfxFrameArr_Impl& rArr = *SfxGetpApp()->Get_Impl()->pTopFrames;
SfxFrameArr_Impl::iterator it = std::find( rArr.begin(), rArr.end(), pFrame );
if ( it != rArr.end() )
rArr.erase( it );
@@ -955,7 +955,7 @@ const SfxPoolItem* SfxFrame::OpenDocumentSynchron( SfxItemSet& i_rSet, const Ref
{
i_rSet.Put( SfxUnoFrameItem( SID_FILLFRAME, i_rTargetFrame ) );
i_rSet.ClearItem( SID_TARGETNAME );
- return SFX_APP()->GetDispatcher_Impl()->Execute( SID_OPENDOC, SFX_CALLMODE_SYNCHRON, i_rSet );
+ return SfxGetpApp()->GetDispatcher_Impl()->Execute( SID_OPENDOC, SFX_CALLMODE_SYNCHRON, i_rSet );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
index afbf092142f6..4dec0d6470d7 100644
--- a/sfx2/source/view/frmload.cxx
+++ b/sfx2/source/view/frmload.cxx
@@ -262,7 +262,7 @@ const SfxFilter* SfxFrameLoader_Impl::impl_getFilterFromServiceName_nothrow( con
m_aContext->getServiceManager()->createInstanceWithContext("com.sun.star.document.FilterFactory", m_aContext),
UNO_QUERY_THROW );
- const SfxFilterMatcher& rMatcher = SFX_APP()->GetFilterMatcher();
+ const SfxFilterMatcher& rMatcher = SfxGetpApp()->GetFilterMatcher();
const SfxFilterFlags nMust = SFX_FILTER_IMPORT;
const SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED;
@@ -343,11 +343,11 @@ namespace
bool SfxFrameLoader_Impl::impl_createNewDocWithSlotParam( const sal_uInt16 _nSlotID, const Reference< XFrame >& i_rxFrame,
const bool i_bHidden )
{
- SfxRequest aRequest( _nSlotID, SFX_CALLMODE_SYNCHRON, SFX_APP()->GetPool() );
+ SfxRequest aRequest( _nSlotID, SFX_CALLMODE_SYNCHRON, SfxGetpApp()->GetPool() );
aRequest.AppendItem( SfxUnoFrameItem( SID_FILLFRAME, i_rxFrame ) );
if ( i_bHidden )
aRequest.AppendItem( SfxBoolItem( SID_HIDDEN, true ) );
- return lcl_getDispatchResult( SFX_APP()->ExecuteSlot( aRequest ) );
+ return lcl_getDispatchResult( SfxGetpApp()->ExecuteSlot( aRequest ) );
}
@@ -360,7 +360,7 @@ void SfxFrameLoader_Impl::impl_determineFilter( ::comphelper::NamedValueCollecti
const Reference< XInteractionHandler >
xInteraction = io_rDescriptor.getOrDefault( "InteractionHandler", Reference< XInteractionHandler >() );
- const SfxFilterMatcher& rMatcher = SFX_APP()->GetFilterMatcher();
+ const SfxFilterMatcher& rMatcher = SfxGetpApp()->GetFilterMatcher();
const SfxFilter* pFilter = NULL;
// get filter by its name directly ...
@@ -443,7 +443,7 @@ bool SfxFrameLoader_Impl::impl_determineTemplateDocument( ::comphelper::NamedVal
{
// detect the filter for the template. Might still be NULL (if the template is broken, or does not
// exist, or some such), but this is handled by our caller the same way as if no template/URL was present.
- const SfxFilter* pTemplateFilter = impl_detectFilterForURL( sTemplateURL, io_rDescriptor, SFX_APP()->GetFilterMatcher() );
+ const SfxFilter* pTemplateFilter = impl_detectFilterForURL( sTemplateURL, io_rDescriptor, SfxGetpApp()->GetFilterMatcher() );
if ( pTemplateFilter )
{
// load the template document, but, well, "as template"
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 51c73c1a8c9c..fb06fe630225 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -572,7 +572,7 @@ void SAL_CALL SfxBaseController::attachFrame( const Reference< frame::XFrame >&
// attaching the frame to the controller is the last step in the creation of a new view, so notify this
SfxViewEventHint aHint( SFX_EVENT_VIEWCREATED, GlobalEventConfig::GetEventName( STR_EVENT_VIEWCREATED ), m_pData->m_pViewShell->GetObjectShell(), Reference< frame::XController2 >( this ) );
- SFX_APP()->NotifyEvent( aHint );
+ SfxGetpApp()->NotifyEvent( aHint );
}
}
}
@@ -1000,9 +1000,9 @@ void SAL_CALL SfxBaseController::dispose() throw( RuntimeException, std::excepti
pView = SfxViewFrame::GetNext( *pView, pDoc );
}
- SFX_APP()->NotifyEvent( SfxViewEventHint(SFX_EVENT_CLOSEVIEW, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEVIEW ), pDoc, Reference< frame::XController2 >( this ) ) );
+ SfxGetpApp()->NotifyEvent( SfxViewEventHint(SFX_EVENT_CLOSEVIEW, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEVIEW ), pDoc, Reference< frame::XController2 >( this ) ) );
if ( !pView )
- SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_CLOSEDOC, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEDOC ), pDoc) );
+ SfxGetpApp()->NotifyEvent( SfxEventHint(SFX_EVENT_CLOSEDOC, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEDOC ), pDoc) );
Reference< frame::XModel > xModel = pDoc->GetModel();
Reference < util::XCloseable > xCloseable( xModel, uno::UNO_QUERY );
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 84d0a711c2e7..6a6db38de0d3 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -339,7 +339,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
SFX_ITEMSET_ARG( pSh->GetMedium()->GetItemSet(), pItem, SfxBoolItem, SID_VIEWONLY, false );
if ( pItem && pItem->GetValue() )
{
- SfxApplication* pApp = SFX_APP();
+ SfxApplication* pApp = SfxGetpApp();
SfxAllItemSet aSet( pApp->GetPool() );
aSet.Put( SfxStringItem( SID_FILE_NAME, pMed->GetURLObject().GetMainURL(INetURLObject::NO_DECODE) ) );
aSet.Put( SfxBoolItem( SID_TEMPLATE, true ) );
@@ -494,7 +494,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
QueryBox aBox( &GetWindow(), SfxResId(MSG_QUERY_OPENASTEMPLATE) );
if ( RET_YES == aBox.Execute() )
{
- SfxApplication* pApp = SFX_APP();
+ SfxApplication* pApp = SfxGetpApp();
SfxAllItemSet aSet( pApp->GetPool() );
aSet.Put( SfxStringItem( SID_FILE_NAME, pMed->GetName() ) );
SFX_ITEMSET_ARG( pMed->GetItemSet(), pReferer, SfxStringItem, SID_REFERER, false );
@@ -546,7 +546,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
// despite this is not!
if ( !pSh || !pSh->CanReload_Impl() )
break;
- SfxApplication* pApp = SFX_APP();
+ SfxApplication* pApp = SfxGetpApp();
SFX_REQUEST_ARG(rReq, pForceReloadItem, SfxBoolItem,
SID_FORCERELOAD, false);
if( pForceReloadItem && !pForceReloadItem->GetValue() &&
@@ -815,7 +815,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
}
// Propagate document closure.
- SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_CLOSEDOC, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEDOC ), xOldObj ) );
+ SfxGetpApp()->NotifyEvent( SfxEventHint( SFX_EVENT_CLOSEDOC, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEDOC ), xOldObj ) );
}
// Record as done
@@ -1131,7 +1131,7 @@ bool SfxViewFrame::Close()
void SfxViewFrame::DoActivate( bool bUI, SfxViewFrame* pOldFrame )
{
- SFX_APP();
+ SfxGetpApp();
pDispatcher->DoActivate_Impl( bUI, pOldFrame );
@@ -1152,7 +1152,7 @@ void SfxViewFrame::DoActivate( bool bUI, SfxViewFrame* pOldFrame )
void SfxViewFrame::DoDeactivate(bool bUI, SfxViewFrame* pNewFrame )
{
- SFX_APP();
+ SfxGetpApp();
pDispatcher->DoDeactivate_Impl( bUI, pNewFrame );
// If this ViewFrame has got a parent and this is not a parent of the
@@ -1384,7 +1384,7 @@ void SfxViewFrame::Construct_Impl( SfxObjectShell *pObjSh )
pImp->aMargin = Size( -1, -1 );
pImp->pWindow = 0;
- SetPool( &SFX_APP()->GetPool() );
+ SetPool( &SfxGetpApp()->GetPool() );
pDispatcher = new SfxDispatcher(this);
if ( !GetBindings().GetDispatcher() )
GetBindings().SetDispatcher( pDispatcher );
@@ -1395,7 +1395,7 @@ void SfxViewFrame::Construct_Impl( SfxObjectShell *pObjSh )
if ( pObjSh )
{
- pDispatcher->Push( *SFX_APP() );
+ pDispatcher->Push( *SfxGetpApp() );
SfxModule* pModule = xObjSh->GetModule();
if( pModule )
pDispatcher->Push( *pModule );
@@ -1410,12 +1410,12 @@ void SfxViewFrame::Construct_Impl( SfxObjectShell *pObjSh )
}
else
{
- pDispatcher->Push( *SFX_APP() );
+ pDispatcher->Push( *SfxGetpApp() );
pDispatcher->Push( *this );
pDispatcher->Flush();
}
- SfxViewFrameArr_Impl &rViewArr = SFX_APP()->GetViewFrames_Impl();
+ SfxViewFrameArr_Impl &rViewArr = SfxGetpApp()->GetViewFrames_Impl();
rViewArr.push_back( this );
}
@@ -1469,7 +1469,7 @@ SfxViewFrame::~SfxViewFrame()
GetFrame().SetCurrentViewFrame_Impl( NULL );
// Unregister from the Frame List.
- SfxApplication *pSfxApp = SFX_APP();
+ SfxApplication *pSfxApp = SfxGetpApp();
SfxViewFrameArr_Impl &rFrames = pSfxApp->GetViewFrames_Impl();
SfxViewFrameArr_Impl::iterator it = std::find( rFrames.begin(), rFrames.end(), this );
rFrames.erase( it );
@@ -1503,7 +1503,7 @@ void SfxViewFrame::KillDispatcher_Impl()
SfxViewFrame* SfxViewFrame::Current()
{
- return SfxApplication::Get() ? SFX_APP()->Get_Impl()->pViewFrame : NULL;
+ return SfxApplication::Get() ? SfxGetpApp()->Get_Impl()->pViewFrame : NULL;
}
@@ -1514,7 +1514,7 @@ SfxViewFrame* SfxViewFrame::GetFirst
bool bOnlyIfVisible
)
{
- SfxApplication *pSfxApp = SFX_APP();
+ SfxApplication *pSfxApp = SfxGetpApp();
SfxViewFrameArr_Impl &rFrames = pSfxApp->GetViewFrames_Impl();
// search for a SfxDocument of the specified type
@@ -1539,7 +1539,7 @@ SfxViewFrame* SfxViewFrame::GetNext
bool bOnlyIfVisible
)
{
- SfxApplication *pSfxApp = SFX_APP();
+ SfxApplication *pSfxApp = SfxGetpApp();
SfxViewFrameArr_Impl &rFrames = pSfxApp->GetViewFrames_Impl();
// refind the specified predecessor
@@ -2175,7 +2175,7 @@ bool SfxViewFrame::SwitchToViewShell_Impl
return false;
}
- DBG_ASSERT( SFX_APP()->GetViewFrames_Impl().size() == SFX_APP()->GetViewShells_Impl().size(), "Inconsistent view arrays!" );
+ DBG_ASSERT( SfxGetpApp()->GetViewFrames_Impl().size() == SfxGetpApp()->GetViewShells_Impl().size(), "Inconsistent view arrays!" );
return true;
}
@@ -2566,10 +2566,10 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const OUString& sMacro )
if ( sMacro.isEmpty() )
return;
- SfxApplication* pSfxApp = SFX_APP();
+ SfxApplication* pSfxApp = SfxGetpApp();
SfxRequest aReq( SID_BASICCHOOSER, SFX_CALLMODE_SYNCHRON, pSfxApp->GetPool() );
aReq.AppendItem( SfxBoolItem(SID_RECORDMACRO,true) );
- const SfxPoolItem* pRet = SFX_APP()->ExecuteSlot( aReq );
+ const SfxPoolItem* pRet = SfxGetpApp()->ExecuteSlot( aReq );
OUString aScriptURL;
if ( pRet )
aScriptURL = ((SfxStringItem*)pRet)->GetValue();
@@ -2637,7 +2637,7 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const OUString& sMacro )
com::sun::star::uno::Reference< com::sun::star::script::XLibraryContainer > xLibCont;
if ( aLocation.equalsIgnoreAsciiCase( "application" ) )
{
- xLibCont = SFX_APP()->GetBasicContainer();
+ xLibCont = SfxGetpApp()->GetBasicContainer();
}
else if ( aLocation.equalsIgnoreAsciiCase( "document" ) )
{
@@ -3275,7 +3275,7 @@ void SfxViewFrame::UpdateDocument_Impl()
void SfxViewFrame::SetViewFrame( SfxViewFrame* pFrame )
{
- SFX_APP()->SetViewFrame_Impl( pFrame );
+ SfxGetpApp()->SetViewFrame_Impl( pFrame );
}
diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx
index 9a7f23667c0d..9590acc75922 100644
--- a/sfx2/source/view/viewfrm2.cxx
+++ b/sfx2/source/view/viewfrm2.cxx
@@ -224,7 +224,7 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
aReq.AppendItem( SfxStringItem( SID_FILE_NAME, aFact ) );
aReq.AppendItem( SfxFrameItem( SID_DOCFRAME, &GetFrame() ) );
aReq.AppendItem( SfxStringItem( SID_TARGETNAME, OUString( "_blank" ) ) );
- SFX_APP()->ExecuteSlot( aReq );
+ SfxGetpApp()->ExecuteSlot( aReq );
const SfxViewFrameItem* pItem = PTR_CAST( SfxViewFrameItem, aReq.GetReturnValue() );
if ( pItem )
rReq.SetReturnValue( SfxFrameItem( 0, pItem->GetFrame() ) );
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 8007221e9230..267ab28c4e1f 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -318,7 +318,7 @@ void SfxPrinterController::jobStarted()
now.GetNanoSec(), now.GetSec(), now.GetMin(), now.GetHour(),
now.GetDay(), now.GetMonth(), now.GetYear(), false) );
- SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_PRINTDOC, GlobalEventConfig::GetEventName( STR_EVENT_PRINTDOC ), mpObjectShell ) );
+ SfxGetpApp()->NotifyEvent( SfxEventHint(SFX_EVENT_PRINTDOC, GlobalEventConfig::GetEventName( STR_EVENT_PRINTDOC ), mpObjectShell ) );
uno::Sequence < beans::PropertyValue > aOpts;
aOpts = getJobProperties( aOpts );
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index c8b8eb7e26fe..c4cd7c2ae588 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -556,7 +556,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
if ( eResult == SfxMailModel::SEND_MAIL_ERROR )
{
- InfoBox aBox( SFX_APP()->GetTopWindow(), SfxResId( MSG_ERROR_SEND_MAIL ));
+ InfoBox aBox( SfxGetpApp()->GetTopWindow(), SfxResId( MSG_ERROR_SEND_MAIL ));
aBox.Execute();
rReq.Ignore();
}
@@ -576,7 +576,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
SfxMailModel::SendMailResult eResult = aModel.SaveAndSend( xFrame, OUString() );
if( eResult == SfxMailModel::SEND_MAIL_ERROR )
{
- InfoBox aBox( SFX_APP()->GetTopWindow(), SfxResId( MSG_ERROR_SEND_MAIL ));
+ InfoBox aBox( SfxGetpApp()->GetTopWindow(), SfxResId( MSG_ERROR_SEND_MAIL ));
aBox.Execute();
rReq.Ignore();
}
@@ -1206,7 +1206,7 @@ void SfxViewShell::SetWindow
pWindow->GrabFocus();
//TODO/CLEANUP
//Do we still need this Method?!
- //SFX_APP()->GrabFocus( pWindow );
+ //SfxGetpApp()->GrabFocus( pWindow );
}
@@ -1238,7 +1238,7 @@ SfxViewShell::SfxViewShell
StartListening(*pViewFrame->GetObjectShell());
// Insert into list
- SfxViewShellArr_Impl &rViewArr = SFX_APP()->GetViewShells_Impl();
+ SfxViewShellArr_Impl &rViewArr = SfxGetpApp()->GetViewShells_Impl();
rViewArr.push_back(this);
}
@@ -1249,7 +1249,7 @@ SfxViewShell::~SfxViewShell()
// Remove from list
const SfxViewShell *pThis = this;
- SfxViewShellArr_Impl &rViewArr = SFX_APP()->GetViewShells_Impl();
+ SfxViewShellArr_Impl &rViewArr = SfxGetpApp()->GetViewShells_Impl();
SfxViewShellArr_Impl::iterator it = std::find( rViewArr.begin(), rViewArr.end(), pThis );
rViewArr.erase( it );
@@ -1484,8 +1484,8 @@ SfxViewShell* SfxViewShell::GetFirst
)
{
// search for a SfxViewShell of the specified type
- SfxViewShellArr_Impl &rShells = SFX_APP()->GetViewShells_Impl();
- SfxViewFrameArr_Impl &rFrames = SFX_APP()->GetViewFrames_Impl();
+ SfxViewShellArr_Impl &rShells = SfxGetpApp()->GetViewShells_Impl();
+ SfxViewFrameArr_Impl &rFrames = SfxGetpApp()->GetViewFrames_Impl();
for ( sal_uInt16 nPos = 0; nPos < rShells.size(); ++nPos )
{
SfxViewShell *pShell = rShells[nPos];
@@ -1521,8 +1521,8 @@ SfxViewShell* SfxViewShell::GetNext
bool bOnlyVisible
)
{
- SfxViewShellArr_Impl &rShells = SFX_APP()->GetViewShells_Impl();
- SfxViewFrameArr_Impl &rFrames = SFX_APP()->GetViewFrames_Impl();
+ SfxViewShellArr_Impl &rShells = SfxGetpApp()->GetViewShells_Impl();
+ SfxViewFrameArr_Impl &rFrames = SfxGetpApp()->GetViewFrames_Impl();
sal_uInt16 nPos;
for ( nPos = 0; nPos < rShells.size(); ++nPos )
if ( rShells[nPos] == &rPrev )
@@ -1567,7 +1567,7 @@ void SfxViewShell::Notify( SfxBroadcaster& rBC,
if ( GetController().is() )
{
// avoid access to dangling ViewShells
- SfxViewFrameArr_Impl &rFrames = SFX_APP()->GetViewFrames_Impl();
+ SfxViewFrameArr_Impl &rFrames = SfxGetpApp()->GetViewFrames_Impl();
for ( sal_uInt16 n=0; n<rFrames.size(); ++n )
{
SfxViewFrame *frame = rFrames[n];