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 /sc/source | |
parent | 556981f07815a0de0ad3576ba6f8639671a6c13c (diff) |
remove SFX_APP() macro that was a mer wrapper for SfxGetApp()
Change-Id: I480a789c767dd671775c9d70d96bf71908f21f5b
Diffstat (limited to 'sc/source')
41 files changed, 116 insertions, 116 deletions
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx index bcd66e053a14..f1bd6bdb4c37 100644 --- a/sc/source/core/data/validat.cxx +++ b/sc/source/core/data/validat.cxx @@ -305,7 +305,7 @@ bool ScValidationData::DoMacro( const ScAddress& rPos, const OUString& rInput, if ( pObject->GetParent() ) aBasicStr = pObject->GetParent()->GetName(); // Dokumentenbasic else - aBasicStr = SFX_APP()->GetName(); // Applikationsbasic + aBasicStr = SfxGetpApp()->GetName(); // Applikationsbasic // Parameter fuer Makro SbxArrayRef refPar = new SbxArray; diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 2af538343666..cec91da3c58c 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -2771,7 +2771,7 @@ bool ScCompiler::IsMacro( const OUString& rName ) StarBASIC* pObj = 0; SfxObjectShell* pDocSh = pDoc->GetDocumentShell(); - SfxApplication* pSfxApp = SFX_APP(); + SfxApplication* pSfxApp = SfxGetpApp(); try { diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index 3238d066f9d6..3406027b7885 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -3156,7 +3156,7 @@ void ScInterpreter::ScMacro() } else { - aBasicStr = SFX_APP()->GetName(); // Applikationsbasic + aBasicStr = SfxGetpApp()->GetName(); // Applikationsbasic } // Parameter-Array zusammenbauen diff --git a/sc/source/core/tool/progress.cxx b/sc/source/core/tool/progress.cxx index c1d2991b1fdb..2877a131849c 100644 --- a/sc/source/core/tool/progress.cxx +++ b/sc/source/core/tool/progress.cxx @@ -87,7 +87,7 @@ ScProgress::ScProgress( SfxObjectShell* pObjSh, const OUString& rText, pProgress = NULL; } } - else if ( SFX_APP()->IsDowning() ) + else if ( SfxGetpApp()->IsDowning() ) { // This happens. E.g. when saving the clipboard-content as OLE when closing the app. // In this case a SfxProgress would produce dirt in memory. diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index a28ddc76ebb9..2b7020251f85 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -1627,7 +1627,7 @@ void ScInputHandler::ViewShellGone(ScTabViewShell* pViewSh) // Executed synchron EnterHandler(); bFormulaMode = false; pRefViewSh = NULL; - SFX_APP()->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) ); SC_MOD()->SetRefInputHdl(NULL); if (pInputWin) pInputWin->SetFormulaMode(false); @@ -2118,7 +2118,7 @@ void ScInputHandler::DataChanged( bool bFromTopNotify, bool bSetModified ) void ScInputHandler::UpdateFormulaMode() { - SfxApplication* pSfxApp = SFX_APP(); + SfxApplication* pSfxApp = SfxGetpApp(); bool bIsFormula = !bProtected && pEngine->GetParagraphCount() == 1; if (bIsFormula) @@ -2362,7 +2362,7 @@ void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode ) bool bMatrix = ( nBlockMode == SC_ENTER_MATRIX ); - SfxApplication* pSfxApp = SFX_APP(); + SfxApplication* pSfxApp = SfxGetpApp(); EditTextObject* pObject = NULL; ScPatternAttr* pCellAttrs = NULL; bool bForget = false; // Remove due to validity? @@ -2712,7 +2712,7 @@ void ScInputHandler::CancelHandler() pExecuteSh->ActiveGrabFocus(); } bFormulaMode = false; - SFX_APP()->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) ); SC_MOD()->SetRefInputHdl(NULL); if (pInputWin) pInputWin->SetFormulaMode(false); @@ -3436,7 +3436,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState, } if (bStopEditing) - SFX_APP()->Broadcast( SfxSimpleHint( FID_KILLEDITVIEW ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( FID_KILLEDITVIEW ) ); // As long as the content is not edited, turn off online spelling. // Online spelling is turned back on in StartTable, after setting diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 57e5bec06e35..a2e557ee272a 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -2063,12 +2063,12 @@ ScPosWnd::ScPosWnd( Window* pParent ) : FillRangeNames(); - StartListening( *SFX_APP() ); // For Navigator rangename updates + StartListening( *SfxGetpApp() ); // For Navigator rangename updates } ScPosWnd::~ScPosWnd() { - EndListening( *SFX_APP() ); + EndListening( *SfxGetpApp() ); HideTip(); diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 5cd585106fc0..d534592df90d 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -185,7 +185,7 @@ ScModule::ScModule( SfxObjectFactory* pFact ) : SetPool( pMessagePool ); ScGlobal::InitTextHeight( pMessagePool ); - StartListening( *SFX_APP() ); // for SFX_HINT_DEINITIALIZING + StartListening( *SfxGetpApp() ); // for SFX_HINT_DEINITIALIZING } ScModule::~ScModule() @@ -972,7 +972,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) bool bSaveInputOptions = false; bool bCompileErrorCells = false; - // SFX_APP()->SetOptions( rOptSet ); + // SfxGetpApp()->SetOptions( rOptSet ); // No more linguistics if (rOptSet.HasItem(SID_ATTR_METRIC, &pItem)) @@ -1253,7 +1253,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) SetPrintOptions( rNewOpt ); // broadcast causes all previews to recalc page numbers - SFX_APP()->Broadcast( SfxSimpleHint( SID_SCPRINTOPTIONS ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SID_SCPRINTOPTIONS ) ); } if ( bSaveAppOptions ) @@ -1408,7 +1408,7 @@ bool ScModule::InputKeyEvent( const KeyEvent& rKEvt, bool bStartEdit ) void ScModule::InputEnterHandler( sal_uInt8 nBlockMode ) { - if ( !SFX_APP()->IsDowning() ) // Not when quitting the program + if ( !SfxGetpApp()->IsDowning() ) // Not when quitting the program { ScInputHandler* pHdl = GetInputHdl(); if (pHdl) @@ -1555,7 +1555,7 @@ void ScModule::SetRefDialog( sal_uInt16 nId, bool bVis, SfxViewFrame* pViewFrm ) pViewFrm->SetChildWindow( nId, bVis ); } - SfxApplication* pSfxApp = SFX_APP(); + SfxApplication* pSfxApp = SfxGetpApp(); pSfxApp->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) ); } } @@ -2003,7 +2003,7 @@ SfxItemSet* ScModule::CreateItemSet( sal_uInt16 nId ) ScUserListItem aULItem( SCITEM_USERLIST ); ScUserList* pUL = ScGlobal::GetUserList(); - // SFX_APP()->GetOptions( aSet ); + // SfxGetpApp()->GetOptions( aSet ); pRet->Put( SfxUInt16Item( SID_ATTR_METRIC, sal::static_int_cast<sal_uInt16>(rAppOpt.GetAppMetric()) ) ); diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx index 92e8f6848cfb..6cfaafa88fbd 100644 --- a/sc/source/ui/dbgui/validate.cxx +++ b/sc/source/ui/dbgui/validate.cxx @@ -80,7 +80,7 @@ static const sal_uInt16 pValueRanges[] = ScValidationDlg::ScValidationDlg(Window* pParent, const SfxItemSet* pArgSet, ScTabViewShell *pTabViewSh, SfxBindings *pB /*= NULL*/) - : ScValidationDlgBase(pParent ? pParent : SFX_APP()->GetTopWindow(), + : ScValidationDlgBase(pParent ? pParent : SfxGetpApp()->GetTopWindow(), "ValidationDialog", "modules/scalc/ui/validationdialog.ui", pArgSet, pB) , m_pTabVwSh(pTabViewSh) , m_nValuePageId(0) diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index 0c8e5d1dc63c..1c7ad537da3f 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -104,7 +104,7 @@ bool ScDBDocFunc::AddDBRange( const OUString& rName, const ScRange& rRange, bool } aModificator.SetDocumentModified(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); return true; } @@ -137,7 +137,7 @@ bool ScDBDocFunc::DeleteDBRange(const OUString& rName) } aModificator.SetDocumentModified(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); bDone = true; } @@ -184,7 +184,7 @@ bool ScDBDocFunc::RenameDBRange( const OUString& rOld, const OUString& rNew ) delete pUndoColl; aModificator.SetDocumentModified(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); bDone = true; } } diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index f45db67ef0b9..fd1d5ce6bfdf 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -2016,7 +2016,7 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, aModificator.SetDocumentModified(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); return bSuccess; } @@ -2493,7 +2493,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, aModificator.SetDocumentModified(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); return true; } @@ -2840,7 +2840,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, aModificator.SetDocumentModified(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); delete pClipDoc; return true; @@ -2988,7 +2988,7 @@ bool ScDocFunc::InsertTable( SCTAB nTab, const OUString& rName, bool bRecord, bo rDocShell.PostPaintExtras(); aModificator.SetDocumentModified(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); bSuccess = true; } else if (!bApi) @@ -3083,7 +3083,7 @@ bool ScDocFunc::DeleteTable( SCTAB nTab, bool bRecord, bool /* bApi */ ) rDocShell.PostPaintExtras(); aModificator.SetDocumentModified(); - SfxApplication* pSfxApp = SFX_APP(); // Navigator + SfxApplication* pSfxApp = SfxGetpApp(); // Navigator pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); @@ -3144,7 +3144,7 @@ bool ScDocFunc::SetTableVisible( SCTAB nTab, bool bVisible, bool bApi ) if (!bVisible) rDocShell.Broadcast( ScTablesHint( SC_TAB_HIDDEN, nTab ) ); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); rDocShell.PostPaint(0,0,0,MAXCOL,MAXROW,MAXTAB, PAINT_EXTRAS); aModificator.SetDocumentModified(); @@ -3208,7 +3208,7 @@ bool ScDocFunc::RenameTable( SCTAB nTab, const OUString& rName, bool bRecord, bo } rDocShell.PostPaintExtras(); aModificator.SetDocumentModified(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); bSuccess = true; } @@ -3245,7 +3245,7 @@ bool ScDocFunc::SetTabBgColor( SCTAB nTab, const Color& rColor, bool bRecord, bo rDocShell.PostPaintExtras(); ScDocShellModificator aModificator( rDocShell ); aModificator.SetDocumentModified(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); bSuccess = true; } @@ -4843,7 +4843,7 @@ bool ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc, SCTA if (bModifyDoc) { aModificator.SetDocumentModified(); - SFX_APP()->Broadcast( SfxSimpleHint(SC_HINT_AREAS_CHANGED) ); + SfxGetpApp()->Broadcast( SfxSimpleHint(SC_HINT_AREAS_CHANGED) ); } return true; @@ -4867,7 +4867,7 @@ void ScDocFunc::ModifyAllRangeNames( const boost::ptr_map<OUString, ScRangeName> rDoc.PostprocessRangeNameUpdate(); aModificator.SetDocumentModified(); - SFX_APP()->Broadcast(SfxSimpleHint(SC_HINT_AREAS_CHANGED)); + SfxGetpApp()->Broadcast(SfxSimpleHint(SC_HINT_AREAS_CHANGED)); } void ScDocFunc::CreateOneName( ScRangeName& rList, @@ -5018,7 +5018,7 @@ bool ScDocFunc::CreateNames( const ScRange& rRange, sal_uInt16 nFlags, bool bApi bDone = ModifyRangeNames( aNewRanges, aTab ); aModificator.SetDocumentModified(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) ); } return bDone; @@ -5261,7 +5261,7 @@ bool ScDocFunc::InsertAreaLink( const OUString& rFile, const OUString& rFilter, if (pBindings) pBindings->Invalidate( SID_LINKS ); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator return true; } @@ -5354,7 +5354,7 @@ void ScDocFunc::ReplaceConditionalFormat( sal_uLong nOldFormat, ScConditionalFor rDocShell.PostPaint(*pRepaintRange, PAINT_GRID); aModificator.SetDocumentModified(); - SFX_APP()->Broadcast(SfxSimpleHint(SC_HINT_AREAS_CHANGED)); + SfxGetpApp()->Broadcast(SfxSimpleHint(SC_HINT_AREAS_CHANGED)); } void ScDocFunc::SetConditionalFormatList( ScConditionalFormatList* pList, SCTAB nTab ) @@ -5384,7 +5384,7 @@ void ScDocFunc::SetConditionalFormatList( ScConditionalFormatList* pList, SCTAB rDoc.SetStreamValid(nTab, false); aModificator.SetDocumentModified(); - SFX_APP()->Broadcast(SfxSimpleHint(SC_HINT_AREAS_CHANGED)); + SfxGetpApp()->Broadcast(SfxSimpleHint(SC_HINT_AREAS_CHANGED)); } void ScDocFunc::EnterListAction( sal_uInt16 nNameResId ) diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 1e5e4486c6c2..92cc36ca2b14 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -623,7 +623,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) case SFX_HINT_TITLECHANGED: aDocument.SetName( SfxShell::GetName() ); // RegisterNewTargetNames gibts nicht mehr - SFX_APP()->Broadcast(SfxSimpleHint( SC_HINT_DOCNAME_CHANGED )); // Navigator + SfxGetpApp()->Broadcast(SfxSimpleHint( SC_HINT_DOCNAME_CHANGED )); // Navigator break; } } @@ -2725,7 +2725,7 @@ ScDocShell::~ScDocShell() delete pAutoStyleList; - SfxApplication *pSfxApp = SFX_APP(); + SfxApplication *pSfxApp = SfxGetpApp(); if ( pSfxApp->GetDdeService() ) // Delete DDE for Document pSfxApp->RemoveDdeTopic( this ); @@ -2855,7 +2855,7 @@ void ScDocShell::SetDrawModified( bool bIsModified /* = true */ ) if ( aDocument.IsChartListenerCollectionNeedsUpdate() ) { aDocument.UpdateChartListenerCollection(); - SFX_APP()->Broadcast(SfxSimpleHint( SC_HINT_DRAW_CHANGED )); // Navigator + SfxGetpApp()->Broadcast(SfxSimpleHint( SC_HINT_DRAW_CHANGED )); // Navigator } SC_MOD()->AnythingChanged(); } diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index e3eb97b3ecf5..8544435181f5 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -82,7 +82,7 @@ void ScDocShell::PostEditView( ScEditEngineDefaulter* pEditEngine, const ScAddre void ScDocShell::PostDataChanged() { Broadcast( SfxSimpleHint( FID_DATACHANGED ) ); - SFX_APP()->Broadcast(SfxSimpleHint( FID_ANYDATACHANGED )); // Navigator + SfxGetpApp()->Broadcast(SfxSimpleHint( FID_ANYDATACHANGED )); // Navigator aDocument.ClearFormulaContext(); //! Navigator direkt benachrichtigen! } diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 0f5a9cffdab5..2aa636ae3f4e 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -660,7 +660,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) rReq.Ignore(); break; } - SfxApplication* pApp = SFX_APP(); + SfxApplication* pApp = SfxGetpApp(); const SfxPoolItem* pItem; SfxMedium* pMed = NULL; if ( pReqArgs && diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx index d9ba6d37c5e8..7d0698119dda 100644 --- a/sc/source/ui/docshell/docsh5.cxx +++ b/sc/source/ui/docshell/docsh5.cxx @@ -299,7 +299,7 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe // "Import1" etc am Navigator bekanntmachen if (eMode==SC_DB_IMPORT) - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); } pData = pNoNameData; } @@ -741,7 +741,7 @@ void ScDocShell::ModifyScenario( SCTAB nTab, const OUString& rName, const OUStri aModificator.SetDocumentModified(); if (!aOldName.equals(rName)) - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); SfxBindings* pBindings = GetViewBindings(); if (pBindings) @@ -807,7 +807,7 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const OUString& rName, const OUStrin PostPaintExtras(); // Tabellenreiter aModificator.SetDocumentModified(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); return nNewTab; } @@ -978,7 +978,7 @@ bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, bool bCopy, bool bRec PostPaintGridAll(); PostPaintExtras(); aModificator.SetDocumentModified(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); return true; } diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index f251164af674..6757d36291e8 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -2352,7 +2352,7 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, OUSt setRelativeFileName(nFileId, aStr); } - SfxItemSet* pSet = new SfxAllItemSet(SFX_APP()->GetPool()); + SfxItemSet* pSet = new SfxAllItemSet(SfxGetpApp()->GetPool()); if (!aOptions.isEmpty()) pSet->Put(SfxStringItem(SID_FILE_FILTEROPTIONS, aOptions)); diff --git a/sc/source/ui/docshell/servobj.cxx b/sc/source/ui/docshell/servobj.cxx index b23f9c751930..39d3ee1494df 100644 --- a/sc/source/ui/docshell/servobj.cxx +++ b/sc/source/ui/docshell/servobj.cxx @@ -103,7 +103,7 @@ ScServerObject::ScServerObject( ScDocShell* pShell, const OUString& rItem ) : pDocSh->GetDocument().StartListeningArea( aRange, &aForwarder ); StartListening(*pDocSh); // um mitzubekommen, wenn die DocShell geloescht wird - StartListening(*SFX_APP()); // for SC_HINT_AREAS_CHANGED + StartListening(*SfxGetpApp()); // for SC_HINT_AREAS_CHANGED } ScServerObject::~ScServerObject() @@ -121,7 +121,7 @@ void ScServerObject::Clear() pTemp->GetDocument().EndListeningArea( aRange, &aForwarder ); pTemp->GetDocument().GetLinkManager()->RemoveServer( this ); EndListening(*pTemp); - EndListening(*SFX_APP()); + EndListening(*SfxGetpApp()); } } @@ -156,7 +156,7 @@ bool ScServerObject::GetData( EndListeningAll(); pDocSh->GetDocument().StartListeningArea( aRange, &aForwarder ); StartListening(*pDocSh); - StartListening(*SFX_APP()); + StartListening(*SfxGetpApp()); bRefreshListener = false; } @@ -206,7 +206,7 @@ void ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) if ( rHint.ISA(SfxSimpleHint) && ((const SfxSimpleHint&)rHint).GetId() == SFX_HINT_DYING ) { pDocSh = NULL; - EndListening(*SFX_APP()); + EndListening(*SfxGetpApp()); // don't access DocShell anymore for EndListening etc. } } diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx index 9059a27a67f1..8ece986b7a10 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -190,7 +190,7 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilter, aOptions = *pNewOptions; // ItemSet immer anlegen, damit die DocShell die Optionen setzen kann - SfxItemSet* pSet = new SfxAllItemSet( SFX_APP()->GetPool() ); + SfxItemSet* pSet = new SfxAllItemSet( SfxGetpApp()->GetPool() ); if (!aOptions.isEmpty()) pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, aOptions ) ); @@ -507,7 +507,7 @@ SfxMedium* ScDocumentLoader::CreateMedium( const OUString& rFileName, const SfxF const OUString& rOptions ) { // Always create SfxItemSet so ScDocShell can set options. - SfxItemSet* pSet = new SfxAllItemSet( SFX_APP()->GetPool() ); + SfxItemSet* pSet = new SfxAllItemSet( SfxGetpApp()->GetPool() ); if ( !rOptions.isEmpty() ) pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, rOptions ) ); diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx index aec10e8b2905..ec6d47f18aba 100644 --- a/sc/source/ui/drawfunc/drawsh.cxx +++ b/sc/source/ui/drawfunc/drawsh.cxx @@ -316,7 +316,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq ) void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, Window* pWin ) { - SvxMacroItem aItem ( SFX_APP()->GetPool().GetWhich( SID_ATTR_MACROITEM ) ); + SvxMacroItem aItem ( SfxGetpApp()->GetPool().GetWhich( SID_ATTR_MACROITEM ) ); ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, true ); if ( !pInfo->GetMacro().isEmpty() ) { @@ -327,7 +327,7 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, Window* pWin ) } // create empty itemset for macro-dlg - boost::scoped_ptr<SfxItemSet> pItemSet(new SfxItemSet(SFX_APP()->GetPool(), SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, SID_EVENTCONFIG, SID_EVENTCONFIG, 0 )); + boost::scoped_ptr<SfxItemSet> pItemSet(new SfxItemSet(SfxGetpApp()->GetPool(), SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, SID_EVENTCONFIG, SID_EVENTCONFIG, 0 )); pItemSet->Put ( aItem, SID_ATTR_MACROITEM ); SfxEventNamesItem aNamesItem(SID_EVENTCONFIG); diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx index 4d284152d3ec..37db74e89197 100644 --- a/sc/source/ui/miscdlgs/anyrefdg.cxx +++ b/sc/source/ui/miscdlgs/anyrefdg.cxx @@ -611,7 +611,7 @@ void ScFormulaReferenceHelper::ToggleCollapsed( formula::RefEdit* pEdit, formula bool ScFormulaReferenceHelper::DoClose( sal_uInt16 nId ) { - SfxApplication* pSfxApp = SFX_APP(); + SfxApplication* pSfxApp = SfxGetpApp(); SetDispatcherLock( false ); //! here and in dtor ? diff --git a/sc/source/ui/namedlg/namedefdlg.cxx b/sc/source/ui/namedlg/namedefdlg.cxx index b05d69b66352..36a36d01feb6 100644 --- a/sc/source/ui/namedlg/namedefdlg.cxx +++ b/sc/source/ui/namedlg/namedefdlg.cxx @@ -244,7 +244,7 @@ void ScNameDefDlg::AddPushed() // call invalidates the stream if (nTab != -1) mpDoc->SetStreamValid(nTab, false); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) ); mpDocShell->SetDocumentModified(); Close(); } diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index 9da736c2c130..70624af0cfb5 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -628,7 +628,7 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, Win rBindings.LEAVEREGISTRATIONS(); - StartListening( *(SFX_APP()) ); + StartListening( *(SfxGetpApp()) ); StartListening( rBindings ); aLbDocuments.Hide(); // bei NAV_LMODE_NONE gibts die nicht @@ -690,7 +690,7 @@ ScNavigatorDlg::~ScNavigatorDlg() delete [] ppBoundItems; delete pMarkArea; - EndListening( *(SFX_APP()) ); + EndListening( *(SfxGetpApp()) ); EndListening( rBindings ); } diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index 71281465b35a..982925d8c3ab 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -513,7 +513,7 @@ void ScUndoDeleteCells::Undo() BeginUndo(); DoChange( true ); EndUndo(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Selection not until EndUndo ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); @@ -536,7 +536,7 @@ void ScUndoDeleteCells::Redo() BeginRedo(); DoChange( false); EndRedo(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if (pViewShell) @@ -695,7 +695,7 @@ void ScUndoDeleteMulti::Undo() //! since no data for selection exist EndUndo(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); } void ScUndoDeleteMulti::Redo() @@ -722,7 +722,7 @@ void ScUndoDeleteMulti::Redo() DoChange(); EndRedo(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); } void ScUndoDeleteMulti::Repeat(SfxRepeatTarget& rTarget) @@ -1073,7 +1073,7 @@ void ScUndoPaste::Undo() if (!maBlockRanges.empty()) ShowTable(*maBlockRanges.front()); EndUndo(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); } void ScUndoPaste::Redo() @@ -1084,7 +1084,7 @@ void ScUndoPaste::Redo() DoChange( false ); EnableDrawAdjust( &rDoc, true ); //! include in ScBlockUndo? EndRedo(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); } void ScUndoPaste::Repeat(SfxRepeatTarget& rTarget) @@ -1291,7 +1291,7 @@ void ScUndoDragDrop::Undo() } EndUndo(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); } void ScUndoDragDrop::Redo() @@ -1375,7 +1375,7 @@ void ScUndoDragDrop::Redo() EnableDrawAdjust( &rDoc, true ); //! include in ScBlockUndo? EndRedo(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); } void ScUndoDragDrop::Repeat(SfxRepeatTarget& /* rTarget */) diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx index e80c5265969b..661f3e95c460 100644 --- a/sc/source/ui/undo/undoblk3.cxx +++ b/sc/source/ui/undo/undoblk3.cxx @@ -1526,7 +1526,7 @@ void ScUndoInsertAreaLink::Undo() if (pLink) pLinkManager->Remove( pLink ); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator } void ScUndoInsertAreaLink::Redo() @@ -1542,7 +1542,7 @@ void ScUndoInsertAreaLink::Redo() pLink->Update(); pLink->SetInCreate( false ); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator } void ScUndoInsertAreaLink::Repeat(SfxRepeatTarget& /* rTarget */) @@ -1591,7 +1591,7 @@ void ScUndoRemoveAreaLink::Undo() pLink->Update(); pLink->SetInCreate( false ); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator } void ScUndoRemoveAreaLink::Redo() @@ -1604,7 +1604,7 @@ void ScUndoRemoveAreaLink::Redo() if (pLink) pLinkManager->Remove( pLink ); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator } void ScUndoRemoveAreaLink::Repeat(SfxRepeatTarget& /* rTarget */) diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx index 8e6c7cfb391a..5ece768fa2e0 100644 --- a/sc/source/ui/undo/undocell.cxx +++ b/sc/source/ui/undo/undocell.cxx @@ -1010,7 +1010,7 @@ void ScUndoRangeNames::DoChange( bool bUndo ) rDoc.PostprocessRangeNameUpdate(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) ); } void ScUndoRangeNames::Undo() diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx index 4d6111befdae..b6bc5d614a33 100644 --- a/sc/source/ui/undo/undodat.cxx +++ b/sc/source/ui/undo/undodat.cxx @@ -1135,7 +1135,7 @@ void ScUndoDBData::Undo() rDoc.CompileDBFormula( false ); // CompileFormulaString rDoc.SetAutoCalc( bOldAutoCalc ); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); EndUndo(); } @@ -1153,7 +1153,7 @@ void ScUndoDBData::Redo() rDoc.CompileDBFormula( false ); // CompileFormulaString rDoc.SetAutoCalc( bOldAutoCalc ); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); EndRedo(); } @@ -1974,7 +1974,7 @@ void ScUndoDataForm::Undo() DoChange( true ); ShowTable( aBlockRange ); EndUndo(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); } void ScUndoDataForm::Redo() @@ -1985,7 +1985,7 @@ void ScUndoDataForm::Redo() DoChange( false ); EnableDrawAdjust( &rDoc, true ); //! include in ScBlockUndo? EndRedo(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); } void ScUndoDataForm::Repeat(SfxRepeatTarget& /*rTarget*/) diff --git a/sc/source/ui/undo/undorangename.cxx b/sc/source/ui/undo/undorangename.cxx index 4c06b2948b4c..8eafa6bf8dde 100644 --- a/sc/source/ui/undo/undorangename.cxx +++ b/sc/source/ui/undo/undorangename.cxx @@ -80,7 +80,7 @@ void ScUndoAllRangeNames::DoChange(const boost::ptr_map<OUString, ScRangeName>& rDoc.SetAllRangeNames(rNames); rDoc.PostprocessRangeNameUpdate(); - SFX_APP()->Broadcast(SfxSimpleHint(SC_HINT_AREAS_CHANGED)); + SfxGetpApp()->Broadcast(SfxSimpleHint(SC_HINT_AREAS_CHANGED)); } ScUndoAddRangeData::ScUndoAddRangeData(ScDocShell* pDocSh, ScRangeData* pRangeData, SCTAB nTab) : @@ -109,7 +109,7 @@ void ScUndoAddRangeData::Undo() pRangeName = rDoc.GetRangeName( mnTab ); } pRangeName->erase(*mpRangeData); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) ); } @@ -126,7 +126,7 @@ void ScUndoAddRangeData::Redo() pRangeName = rDoc.GetRangeName( mnTab ); } pRangeName->insert(new ScRangeData(*mpRangeData)); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) ); } void ScUndoAddRangeData::Repeat(SfxRepeatTarget& /*rTarget*/) diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx index 67772dc5d1a0..b5091d5954f0 100644 --- a/sc/source/ui/undo/undotab.cxx +++ b/sc/source/ui/undo/undotab.cxx @@ -377,7 +377,7 @@ void ScUndoDeleteTab::Undo() { pDocShell->Broadcast( ScTablesHint( SC_TAB_INSERTED, theTabs[i]) ); } - SfxApplication* pSfxApp = SFX_APP(); // Navigator + SfxApplication* pSfxApp = SfxGetpApp(); // Navigator pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); @@ -448,7 +448,7 @@ void ScUndoRenameTab::DoChange( SCTAB nTabP, const OUString& rName ) const ScDocument& rDoc = pDocShell->GetDocument(); rDoc.RenameTab( nTabP, rName ); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); // Navigator + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); // Navigator pDocShell->PostPaintGridAll(); pDocShell->PostPaintExtras(); @@ -556,7 +556,7 @@ void ScUndoMoveTab::DoChange( bool bUndo ) const } } - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); // Navigator + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); // Navigator pDocShell->PostPaintGridAll(); pDocShell->PostPaintExtras(); @@ -617,7 +617,7 @@ void ScUndoCopyTab::DoChange() const if (pViewShell) pViewShell->SetTabNo((*mpOldTabs)[0],true); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); // Navigator + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); // Navigator pDocShell->PostPaintGridAll(); pDocShell->PostPaintExtras(); @@ -836,7 +836,7 @@ void ScUndoMakeScenario::Undo() if (pViewShell) pViewShell->SetTabNo( nSrcTab, true ); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); // SetTabNo(...,sal_True) for all views to sync with drawing layer pages pDocShell->Broadcast( SfxSimpleHint( SC_HINT_FORCESETTAB ) ); @@ -860,7 +860,7 @@ void ScUndoMakeScenario::Redo() if (pViewShell) pViewShell->SetTabNo( nDestTab, true ); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); } void ScUndoMakeScenario::Repeat(SfxRepeatTarget& rTarget) @@ -915,7 +915,7 @@ void ScUndoImportTab::DoChange() const } } - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); // Navigator + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); // Navigator pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID | PAINT_TOP | PAINT_LEFT | PAINT_EXTRAS ); } @@ -1140,7 +1140,7 @@ void ScUndoShowHideTab::DoChange( bool bShowP ) const pViewShell->SetTabNo(nTab,true); } - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); pDocShell->SetDocumentModified(); } @@ -1425,7 +1425,7 @@ void ScUndoScenarioFlags::Undo() pViewShell->UpdateInputHandler(); if ( aOldName != aNewName ) - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); } void ScUndoScenarioFlags::Redo() @@ -1442,7 +1442,7 @@ void ScUndoScenarioFlags::Redo() pViewShell->UpdateInputHandler(); if ( aOldName != aNewName ) - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); } void ScUndoScenarioFlags::Repeat(SfxRepeatTarget& /* rTarget */) diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx index 4d165df38136..e10ec30807e2 100644 --- a/sc/source/ui/unoobj/appluno.cxx +++ b/sc/source/ui/unoobj/appluno.cxx @@ -496,7 +496,7 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue( ScPrintOptions aPrintOpt(pScMod->GetPrintOptions()); aPrintOpt.SetSkipEmpty( !ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); // reversed pScMod->SetPrintOptions( aPrintOpt ); - SFX_APP()->Broadcast( SfxSimpleHint( SID_SCPRINTOPTIONS ) ); // update previews + SfxGetpApp()->Broadcast( SfxSimpleHint( SID_SCPRINTOPTIONS ) ); // update previews } if ( bSaveApp ) diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx index b171bf69a637..4d4a9b723c50 100644 --- a/sc/source/ui/unoobj/funcuno.cxx +++ b/sc/source/ui/unoobj/funcuno.cxx @@ -179,7 +179,7 @@ ScFunctionAccess::ScFunctionAccess() : mbArray( true ), // default according to behaviour of older Office versions mbValid( true ) { - StartListening( *SFX_APP() ); // for SFX_HINT_DEINITIALIZING + StartListening( *SfxGetpApp() ); // for SFX_HINT_DEINITIALIZING } ScFunctionAccess::~ScFunctionAccess() diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx index d4836851eefa..859117a4b4bb 100644 --- a/sc/source/ui/unoobj/servuno.cxx +++ b/sc/source/ui/unoobj/servuno.cxx @@ -614,7 +614,7 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance( aArgs[ 0 ] <<= pDocShell->GetModel(); xRet = ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( OUString( "ooo.vba.excel.Globals" ), aArgs ); pDocShell->GetBasicManager()->SetGlobalUNOConstant( "VBAGlobals", uno::Any( xRet ) ); - BasicManager* pAppMgr = SFX_APP()->GetBasicManager(); + BasicManager* pAppMgr = SfxGetpApp()->GetBasicManager(); if ( pAppMgr ) pAppMgr->SetGlobalUNOConstant( "ThisExcelDoc", aArgs[ 0 ] ); diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx index b2c825786e76..604a714b30a4 100644 --- a/sc/source/ui/unoobj/viewuno.cxx +++ b/sc/source/ui/unoobj/viewuno.cxx @@ -1741,7 +1741,7 @@ void ScTabViewObj::SelectionChanged() // will cause the style dialog to be raised so we go // direct here ScFormatShell aShell( &GetViewShell()->GetViewData() ); - SfxAllItemSet reqList( SFX_APP()->GetPool() ); + SfxAllItemSet reqList( SfxGetpApp()->GetPool() ); SfxRequest aReq( SID_STYLE_END_PREVIEW, 0, reqList ); aShell.ExecuteStyle( aReq ); lang::EventObject aEvent; diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index 81aafa2bc0a7..6426232641be 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -463,7 +463,7 @@ ScVbaApplication::Windows( const uno::Any& aIndex ) throw (uno::RuntimeExceptio void SAL_CALL ScVbaApplication::wait( double time ) throw (uno::RuntimeException, std::exception) { - StarBASIC* pBasic = SFX_APP()->GetBasic(); + StarBASIC* pBasic = SfxGetpApp()->GetBasic(); SbxArrayRef aArgs = new SbxArray; SbxVariableRef aRef = new SbxVariable; aRef->PutDouble( time ); @@ -1238,7 +1238,7 @@ ScVbaApplication::getDisplayFormulaBar() if ( pViewShell ) { SfxBoolItem sfxFormBar( FID_TOGGLEINPUTLINE); - SfxAllItemSet reqList( SFX_APP()->GetPool() ); + SfxAllItemSet reqList( SfxGetpApp()->GetPool() ); reqList.Put( sfxFormBar ); pViewShell->GetState( reqList ); @@ -1257,7 +1257,7 @@ ScVbaApplication::setDisplayFormulaBar( sal_Bool _displayformulabar ) if ( pViewShell && ( _displayformulabar != getDisplayFormulaBar() ) ) { SfxBoolItem sfxFormBar( FID_TOGGLEINPUTLINE, _displayformulabar); - SfxAllItemSet reqList( SFX_APP()->GetPool() ); + SfxAllItemSet reqList( SfxGetpApp()->GetPool() ); SfxRequest aReq( FID_TOGGLEINPUTLINE, 0, reqList ); pViewShell->Execute( aReq ); } @@ -1266,7 +1266,7 @@ ScVbaApplication::setDisplayFormulaBar( sal_Bool _displayformulabar ) uno::Any SAL_CALL ScVbaApplication::Caller( const uno::Any& /*aIndex*/ ) throw ( uno::RuntimeException, std::exception ) { - StarBASIC* pBasic = SFX_APP()->GetBasic(); + StarBASIC* pBasic = SfxGetpApp()->GetBasic(); SbMethod* pMeth = (SbMethod*)pBasic->GetRtl()->Find( OUString("FuncCaller"), SbxCLASS_METHOD ); uno::Any aRet; if ( pMeth ) diff --git a/sc/source/ui/vba/vbahelper.cxx b/sc/source/ui/vba/vbahelper.cxx index 662ffec00358..a29ae357f88f 100644 --- a/sc/source/ui/vba/vbahelper.cxx +++ b/sc/source/ui/vba/vbahelper.cxx @@ -232,7 +232,7 @@ void implnPasteSpecial(sal_uInt16 nFlags,sal_uInt16 nFunction,sal_Bool bSkipEmpt getCurrentDocument() throw (uno::RuntimeException) { uno::Reference< frame::XModel > xModel; - SbxObject* pBasic = dynamic_cast< SbxObject* > ( SFX_APP()->GetBasic() ); + SbxObject* pBasic = dynamic_cast< SbxObject* > ( SfxGetpApp()->GetBasic() ); SbxObject* basicChosen = pBasic ; if ( basicChosen == NULL) { @@ -405,7 +405,7 @@ void PrintOutHelper( const uno::Any& From, const uno::Any& To, const uno::Any& C pViewFrame = pViewShell->GetViewFrame(); if ( pViewFrame ) { - SfxAllItemSet aArgs( SFX_APP()->GetPool() ); + SfxAllItemSet aArgs( SfxGetpApp()->GetPool() ); SfxBoolItem sfxCollate( SID_PRINT_COLLATE, bCollate ); aArgs.Put( sfxCollate, sfxCollate.Which() ); diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 521f224e8d40..a14bb3129903 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -3574,7 +3574,7 @@ ScVbaRange::End( ::sal_Int32 Direction ) throw (uno::RuntimeException, std::exc SfxViewFrame* pViewFrame = excel::getViewFrame( xModel ); if ( pViewFrame ) { - SfxAllItemSet aArgs( SFX_APP()->GetPool() ); + SfxAllItemSet aArgs( SfxGetpApp()->GetPool() ); // Hoping this will make sure this slot is called // synchronously SfxBoolItem sfxAsync( SID_ASYNCHRON, false ); diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx index 3472140c0cb3..a1a5fc215a5b 100644 --- a/sc/source/ui/view/dbfunc.cxx +++ b/sc/source/ui/view/dbfunc.cxx @@ -226,7 +226,7 @@ void ScDBFunc::NotifyCloseDbNameDlg( const ScDBCollection& rNewColl, const std:: pOldColl = NULL; pDocShell->PostPaint(ScRange(0, 0, 0, MAXCOL, MAXROW, MAXTAB), PAINT_GRID); aModificator.SetDocumentModified(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); if (bRecord) { diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index 09293c01589e..ba0d50d20f17 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -626,7 +626,7 @@ bool ScDBFunc::MakePivotTable( if ( bNewTable ) { pDocSh->PostPaintExtras(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); } return bSuccess; diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index 691d2b0b17a6..121a9cc2509e 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -135,7 +135,7 @@ void ScPreviewShell::Construct( Window* pParent ) SetPool( &SC_MOD()->GetPool() ); SetWindow( pPreview ); StartListening(*pDocShell,true); - StartListening(*SFX_APP(),true); // #i62045# #i62046# application is needed for Calc's own hints + StartListening(*SfxGetpApp(),true); // #i62045# #i62046# application is needed for Calc's own hints SfxBroadcaster* pDrawBC = pDocShell->GetDocument().GetDrawBroadcaster(); if (pDrawBC) StartListening(*pDrawBC); @@ -192,7 +192,7 @@ ScPreviewShell::~ScPreviewShell() SfxBroadcaster* pDrawBC = pDocShell->GetDocument().GetDrawBroadcaster(); if (pDrawBC) EndListening(*pDrawBC); - EndListening(*SFX_APP()); + EndListening(*SfxGetpApp()); EndListening(*pDocShell); SetWindow(0); diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index ed254f05b2d6..f46b5bf22683 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -165,7 +165,7 @@ void ScTabViewShell::Activate(bool bMDI) if ( bFirstActivate ) { - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_NAVIGATOR_UPDATEALL ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_NAVIGATOR_UPDATEALL ) ); bFirstActivate = false; // ReadExtOptions (view settings from Excel import) must also be done @@ -1566,7 +1566,7 @@ bool ScTabViewShell::KeyInput( const KeyEvent &rKeyEvent ) void ScTabViewShell::Construct( sal_uInt8 nForceDesignMode ) { - SfxApplication* pSfxApp = SFX_APP(); + SfxApplication* pSfxApp = SfxGetpApp(); ScDocShell* pDocSh = GetViewData().GetDocShell(); ScDocument& rDoc = pDocSh->GetDocument(); bReadOnly = pDocSh->IsReadOnly(); @@ -1819,7 +1819,7 @@ ScTabViewShell::~ScTabViewShell() ScDocShell* pDocSh = GetViewData().GetDocShell(); EndListening(*pDocSh); EndListening(*GetViewFrame()); - EndListening(*SFX_APP()); // #i62045# #i62046# needed now - SfxViewShell no longer does it + EndListening(*SfxGetpApp()); // #i62045# #i62046# needed now - SfxViewShell no longer does it SC_MOD()->ViewShellGone(this); diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index b3fb6a345b34..858bfa773ee7 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -367,7 +367,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq) { pDlg->Execute(); rBindings.Invalidate( nSlot ); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator rReq.Done(); } } diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 5cdb61095d98..84044529dee2 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -1892,7 +1892,7 @@ bool ScViewFunc::InsertTables(std::vector<OUString>& aNames, SCTAB nTab, SetTabNo( nTab, true ); pDocSh->PostPaintExtras(); pDocSh->SetDocumentModified(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); return true; } else @@ -1923,7 +1923,7 @@ bool ScViewFunc::AppendTable( const OUString& rName, bool bRecord ) SetTabNo( nTab, true ); pDocSh->PostPaintExtras(); pDocSh->SetDocumentModified(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); return true; } else @@ -1982,7 +1982,7 @@ bool ScViewFunc::DeleteTables( const SCTAB nTab, SCTAB nSheets ) pDocSh->PostPaintExtras(); pDocSh->SetDocumentModified(); - SfxApplication* pSfxApp = SFX_APP(); // Navigator + SfxApplication* pSfxApp = SfxGetpApp(); // Navigator pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); @@ -2106,7 +2106,7 @@ bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, bool bRecord ) pDocSh->PostPaintExtras(); pDocSh->SetDocumentModified(); - SfxApplication* pSfxApp = SFX_APP(); // Navigator + SfxApplication* pSfxApp = SfxGetpApp(); // Navigator pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); @@ -2305,7 +2305,7 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell, pDocSh->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID | PAINT_TOP | PAINT_LEFT | PAINT_EXTRAS ); - SfxApplication* pSfxApp = SFX_APP(); + SfxApplication* pSfxApp = SfxGetpApp(); pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) ); @@ -2535,7 +2535,7 @@ void ScViewFunc::MoveTable( TheTabs.clear(); pDestShell->SetDocumentModified(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); } else { @@ -2692,7 +2692,7 @@ void ScViewFunc::ShowTable( const std::vector<OUString>& rNames ) { rDoc.SetVisible( nPos, true ); SetTabNo( nPos, true ); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); if (!bFound) bFound = true; if (bUndo) @@ -2752,7 +2752,7 @@ void ScViewFunc::HideTable( const ScMarkData& rMark ) } // Update views - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); pDocSh->PostPaint(0,0,0,MAXCOL,MAXROW,MAXTAB, PAINT_EXTRAS); pDocSh->SetDocumentModified(); } diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index ed0d0f5e91e0..b139987730f5 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -1727,7 +1727,7 @@ void ScViewFunc::DeleteMulti( bool bRows, bool bRecord ) nCurX = static_cast<SCCOL>(aSpans[0].mnStart); SetCursor( nCurX, nCurY ); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); } // delete contents @@ -2784,7 +2784,7 @@ bool ScViewFunc::InsertName( const OUString& rName, const OUString& rSymbol, rDoc.PostprocessRangeNameUpdate(); aModificator.SetDocumentModified(); - SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) ); } delete pNewEntry; // if it wasn't inserted |