diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-06-27 10:26:55 +0200 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-06-27 17:08:04 +0200 |
commit | d92aa2f445662aa9ca7d81fef1e667bcae031fc6 (patch) | |
tree | a773275c7753286fbf116eef4d20c1f31bb6b123 /sfx2/source/view | |
parent | 556981f07815a0de0ad3576ba6f8639671a6c13c (diff) |
remove SFX_APP() macro that was a mer wrapper for SfxGetApp()
Change-Id: I480a789c767dd671775c9d70d96bf71908f21f5b
Diffstat (limited to 'sfx2/source/view')
-rw-r--r-- | sfx2/source/view/frame.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/view/frmload.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/view/sfxbasecontroller.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 38 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm2.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/viewprn.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 20 |
7 files changed, 43 insertions, 43 deletions
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]; |