summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/appbas.cxx
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2001-12-19 16:54:02 +0000
committerMathias Bauer <mba@openoffice.org>2001-12-19 16:54:02 +0000
commit0f0fa66478773fc2f1bd6829600e7a2d1b38b97d (patch)
tree167903f2c38536192d182c8d8b7fdcae6beda830 /sfx2/source/appl/appbas.cxx
parent41da1edcbf000123c0fdd29fa5a7a473fe0964cc (diff)
#96074#: use pThisDocument to remember actual ThisComponent variable
Diffstat (limited to 'sfx2/source/appl/appbas.cxx')
-rw-r--r--sfx2/source/appl/appbas.cxx31
1 files changed, 6 insertions, 25 deletions
diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx
index 5de91ef7d9..1ca4a7f5a2 100644
--- a/sfx2/source/appl/appbas.cxx
+++ b/sfx2/source/appl/appbas.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: appbas.cxx,v $
*
- * $Revision: 1.24 $
+ * $Revision: 1.25 $
*
- * last change: $Author: cd $ $Date: 2001-12-06 07:39:37 $
+ * last change: $Author: mba $ $Date: 2001-12-19 17:54:02 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -270,7 +270,7 @@ String lcl_GetVersionString(ResMgr* pImpResMgr)
if ( aVersion.Len() == 0 )
DBG_ERROR( "No BUILDID in bootstrap file found" );
-
+
aVersion.Erase( 0, aVersion.Search( ':' ) + 1 );
aVersion.Erase( aVersion.Search( ')' ) );
return aVersion;
@@ -666,28 +666,7 @@ BasicManager* SfxApplication::GetBasicManager()
// globale Variablen
StarBASIC *pBas = pImp->pBasicMgr->GetLib(0);
sal_Bool bBasicWasModified = pBas->IsModified();
-/*
- MakeVariable( pBas, pAppObj, "ActiveModule", SID_ACTIVEMODULE|0x20000 );
- MakeVariable( pBas, pAppObj, "ActiveDocument", SID_ACTIVEDOCUMENT|0x20000 );
- MakeVariable( pBas, pAppObj, "ActiveWindow", SID_ACTIVEWINDOW|0x20000 );
- MakeVariable( pBas, pAppObj, "ActiveTask", SID_ACTIVETASK|0x20000 );
- MakeVariable( pBas, pAppObj, "Application", SID_APPLICATION );
- MakeVariable( pBas, pAppObj, "Selection", SID_SELECTION|0x20000 );
- MakeVariable( pBas, pAppObj, "Documents", SID_DOCUMENTS|0x40000 );
- MakeVariable( pBas, pAppObj, "Windows", SID_WINDOWS|0x40000 );
- MakeVariable( pBas, pAppObj, "StarWriter", SID_STARWRITER|0x20000 );
- MakeVariable( pBas, pAppObj, "StarDraw", SID_STARDRAW|0x20000 );
- MakeVariable( pBas, pAppObj, "StarCalc", SID_STARCALC|0x20000 );
- MakeVariable( pBas, pAppObj, "LanguageId", SID_LANGUAGEID, SbxUSHORT );
- MakeVariable( pBas, pAppObj, "CountryId", SID_COUNTRYID, SbxUSHORT );
- // MI: wenn der drin ist, findet BASIC die Datenbank-Wizard Makros
- // nicht mehr - warum auch immer
- MakeVariable( pBas, pAppObj, "ThisDocument", SID_THISDOCUMENT|0x20000 );
- MakeVariable( pBas, pAppObj, "ThisWindow", SID_THISWINDOW|0x20000 );
- MakeVariable( pBas, pAppObj, "ThisComponent", 0x20000 );
- MakeVariable( pBas, pAppObj, "SubstPathVars", SID_SUBSTPATHVARS,SbxSTRING, SbxCLASS_METHOD );
-*/
- // ::com::sun::star::frame::Desktop
+
Reference< ::com::sun::star::lang::XMultiServiceFactory > xSMgr = ::comphelper::getProcessServiceFactory();
Any aDesktop;
Reference< XDesktop > xDesktop( xSMgr->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop")), UNO_QUERY );
@@ -734,6 +713,7 @@ BasicManager* SfxApplication::GetBasicManager()
aAny <<= xInterface;
}
+ SFX_APP()->Get_Impl()->pThisDocument = pDoc;
xUnoObj = GetSbUnoObject( DEFINE_CONST_UNICODE("ThisComponent"), aAny );
xUnoObj->SetFlag( SBX_DONTSTORE );
pBas->Insert( xUnoObj );
@@ -745,6 +725,7 @@ BasicManager* SfxApplication::GetBasicManager()
if ( !bBasicWasModified )
pBas->SetModified( sal_False );
}
+
return pImp->pBasicMgr;
}