diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-11-01 15:17:35 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-11-01 15:17:35 +0100 |
commit | 952bfc2f29732777c0cdd79170f6a47ecc3ac4c7 (patch) | |
tree | 1130753e877b38e2c6bd0bbe589fd6ecbfb86d1b /sfx2/source/appl/appbas.cxx | |
parent | 3af1f2b59fa68612d988b38b14a58c2acc7eb829 (diff) |
undoapi: removed SfxApplication::IsInBasicCall
It checked a counter for being != 0 which, effectively, was set to 1 at application
startup, and never reset to 0 (though incremented and decremented by calls to Enter/LeaveBasicCall).
So, IsInBasicCall was meaningless.
Consequently, Enter/LeaveBasicCall collapse to empty operations, not doing anything anymore.
Will (hopefully) remove those, too, but need them for the moment to track and judge, guess, basic calls ...
Diffstat (limited to 'sfx2/source/appl/appbas.cxx')
-rw-r--r-- | sfx2/source/appl/appbas.cxx | 96 |
1 files changed, 2 insertions, 94 deletions
diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx index 10c4a6bc6797..71c2508e7e6a 100644 --- a/sfx2/source/appl/appbas.cxx +++ b/sfx2/source/appl/appbas.cxx @@ -257,12 +257,6 @@ SbxVariable* MakeVariable( StarBASIC *pBas, SbxObject *pObject, BasicManager* SfxApplication::GetBasicManager() { -// DBG_ASSERT( pAppData_Impl->nBasicCallLevel != 0, -// "unnecessary call to GetBasicManager() - inefficient!" ); - if ( pAppData_Impl->nBasicCallLevel == 0 ) - // sicherheitshalber - EnterBasicCall(); - return BasicManagerRepository::getApplicationBasicManager( true ); } @@ -293,102 +287,16 @@ StarBASIC* SfxApplication::GetBasic() //-------------------------------------------------------------------- -FASTBOOL SfxApplication::IsInBasicCall() const -{ - return 0 != pAppData_Impl->nBasicCallLevel; -} - -//-------------------------------------------------------------------- - void SfxApplication::EnterBasicCall() { - if ( 1 == ++pAppData_Impl->nBasicCallLevel ) - { - DBG_TRACE( "SfxShellObject: BASIC-on-demand" ); - - // das kann l"anger dauern, da Progress nicht geht, wenigstens Sanduhr -//(mba)/task SfxWaitCursor aWait; - - // zuerst das BASIC laden - GetBasic(); -/* - // als erstes SfxShellObject das SbxObject der SfxApplication erzeugen - SbxObject *pSbx = GetSbxObject(); - DBG_ASSERT( pSbx, "SfxShellObject: can't create SbxObject for SfxApplication" ); - - // die SbxObjects aller Module erzeugen - SfxModuleArr_Impl& rArr = GetModules_Impl(); - for ( sal_uInt16 n = 0; n < rArr.Count(); ++n ) - { - SfxModule *pMod = rArr.GetObject(n); - if ( pMod->IsLoaded() ) - { - pSbx = pMod->GetSbxObject(); - DBG_ASSERT( pSbx, "SfxModule: can't create SbxObject" ); - } - } - - // die SbxObjects aller Tasks erzeugen - for ( SfxTask *pTask = SfxTask::GetFirst(); pTask; pTask = SfxTask::GetNext( *pTask ) ) - pTask->GetSbxObject(); - - // die SbxObjects aller SfxObjectShells erzeugen (ggf. Frame-los!) - for ( SfxObjectShell *pObjSh = SfxObjectShell::GetFirst( NULL, sal_False ); - pObjSh; - pObjSh = SfxObjectShell::GetNext(*pObjSh, NULL, sal_False) ) - { - // kein IP-Object oder wenn doch dann initialisiert? - SvStorageRef aStorage; - if ( !pObjSh->IsHandsOff() ) - aStorage = pObjSh->GetStorage(); - if ( !pObjSh->GetInPlaceObject() || aStorage.Is() ) - { - DBG( DbgOutf( "SfxShellObject: BASIC-on-demand for %s", - pObjSh->SfxShell::GetName().GetBuffer() ) ); - pSbx = pObjSh->GetSbxObject(); - DBG_ASSERT( pSbx, "SfxShellObject: can't create SbxObject" ); - } - } - - // die SbxObjects der SfxShells auf den Stacks der Frames erzeugen - for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst(0,sal_False); - pFrame; - pFrame = SfxViewFrame::GetNext(*pFrame,0,0,sal_False) ) - { - // den Dispatcher des Frames rausholen - SfxDispatcher *pDispat = pFrame->GetDispatcher(); - pDispat->Flush(); - - // "uber alle SfxShells auf dem Stack des Dispatchers iterieren - // Frame selbst wird ausgespart, da er indirekt angezogen wird, - // sofern er ein Dokument enth"alt. - for ( sal_uInt16 nStackIdx = pDispat->GetShellLevel(*pFrame); - 0 != nStackIdx; - --nStackIdx ) - { - DBG( DbgOutf( "SfxShellObject: BASIC-on-demand for level %u", nStackIdx-1 ); ) - pSbx = pDispat->GetShell(nStackIdx - 1)->GetSbxObject(); - DBG_ASSERT( pSbx, "SfxShellObject: can't create SbxObject" ); - } - - if ( !pFrame->GetObjectShell() ) - { - DBG( DbgOutf( "SfxShellObject: BASIC-on-demand for empty frame" ); ) - pSbx = pFrame->GetSbxObject(); - DBG_ASSERT( pSbx, "SfxShellObject: can't create SbxObject" ); - } - } -*/ - // Factories anmelden -// SbxBase::AddFactory( new SfxSbxObjectFactory_Impl ); - } + // TODO: remove this no-op } //-------------------------------------------------------------------- void SfxApplication::LeaveBasicCall() { - --pAppData_Impl->nBasicCallLevel; + // TODO: remove this no-op } //------------------------------------------------------------------------- |