diff options
author | Thomas Benisch <tbe@openoffice.org> | 2001-07-25 06:23:37 +0000 |
---|---|---|
committer | Thomas Benisch <tbe@openoffice.org> | 2001-07-25 06:23:37 +0000 |
commit | 1cfad4338a2bfa236dc08414b7996f1ce0679f9f (patch) | |
tree | 47302572fa8eb706206a2bb42ac50a905d627c3d | |
parent | b675fc19ad120cdda3da183ca63fb1c679ab792e (diff) |
#88563# BasicIDE load on demand
-rw-r--r-- | basctl/prj/d.lst | 1 | ||||
-rw-r--r-- | basctl/source/basicide/basides1.cxx | 6 | ||||
-rw-r--r-- | basctl/source/basicide/basobj2.cxx | 36 |
3 files changed, 30 insertions, 13 deletions
diff --git a/basctl/prj/d.lst b/basctl/prj/d.lst index cb0836b34660..33397c2f6f1b 100644 --- a/basctl/prj/d.lst +++ b/basctl/prj/d.lst @@ -15,7 +15,6 @@ touch: ..\inc\hid.lst %_DEST%\bin%_EXT%\hid.lst del %_DEST%\inc%_EXT%\baside.hxx mkdir: %_DEST%\inc%_EXT%\basctl -hedabu: ..\inc\basobj.hxx %_DEST%\inc%_EXT%\basctl\basobj.hxx hedabu: ..\source\basicide\iderdll.hxx %_DEST%\inc%_EXT%\basctl\iderdll.hxx ..\%__SRC%\lib\lib*static*.dylib %_DEST%\lib%_EXT%\lib*static*.dylib diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index e9a6a8475012..227179132d31 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -2,9 +2,9 @@ * * $RCSfile: basides1.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: tbe $ $Date: 2001-07-17 08:43:30 $ + * last change: $Author: tbe $ $Date: 2001-07-25 07:19:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -350,7 +350,7 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) break; case SID_BASICIDE_CHOOSEMACRO: { - BasicIDE::SelectMacro(); + BasicIDE::ChooseMacro(); } break; case SID_BASICIDE_CREATEMACRO: diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx index 1f7fa9b0936e..2f9450009768 100644 --- a/basctl/source/basicide/basobj2.cxx +++ b/basctl/source/basicide/basobj2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: basobj2.cxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: mba $ $Date: 2001-07-20 10:49:36 $ + * last change: $Author: tbe $ $Date: 2001-07-25 07:19:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -84,6 +84,19 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::container; +//---------------------------------------------------------------------------- + +extern "C" { + rtl_uString* basicide_choose_macro( BOOL bExecute, BOOL bChooseOnly, rtl_uString* pMacroDesc ) + { + ::rtl::OUString aMacroDesc( pMacroDesc ); + ::rtl::OUString aMacroURL = BasicIDE::ChooseMacro( bExecute, bChooseOnly, aMacroDesc ); + rtl_uString* pMacroURL = aMacroURL.pData; + rtl_uString_acquire( pMacroURL ); + + return pMacroURL; + } +} //---------------------------------------------------------------------------- @@ -111,6 +124,7 @@ SfxMacro* BasicIDE::CreateMacro() //---------------------------------------------------------------------------- +/* SbMethod* BasicIDE::ChooseMacro( BOOL bExecute, BOOL bChooseOnly ) { IDE_DLL()->GetExtraData()->ChoosingMacro() = TRUE; @@ -148,15 +162,18 @@ SbMethod* BasicIDE::ChooseMacro( BOOL bExecute, BOOL bChooseOnly ) return pMethod; } +*/ //---------------------------------------------------------------------------- +/* SbMethod* BasicIDE::ChooseMacro( BOOL bExecute, BOOL bChooseOnly, const String& rPreferredMacroDesciption ) { if ( rPreferredMacroDesciption.Len() ) IDE_DLL()->GetExtraData()->GetLastMacro() = rPreferredMacroDesciption; return BasicIDE::ChooseMacro( bExecute, bChooseOnly ); } +*/ //---------------------------------------------------------------------------- @@ -228,11 +245,12 @@ void BasicIDE::DecBasicDialogCount() //---------------------------------------------------------------------------- -String BasicIDE::SelectMacro( BOOL bExecute, BOOL bChooseOnly, const String& rPreferredMacroDesciption ) +::rtl::OUString BasicIDE::ChooseMacro( BOOL bExecute, BOOL bChooseOnly, const ::rtl::OUString& rMacroDesc ) { BASIC_MOD()->Load(); - if ( rPreferredMacroDesciption.Len() ) - IDE_DLL()->GetExtraData()->GetLastMacro() = rPreferredMacroDesciption; + + if ( rMacroDesc.getLength() ) + IDE_DLL()->GetExtraData()->GetLastMacro() = String( rMacroDesc ); IDE_DLL()->GetExtraData()->ChoosingMacro() = TRUE; SFX_APP()->EnterBasicCall(); @@ -259,15 +277,15 @@ String BasicIDE::SelectMacro( BOOL bExecute, BOOL bChooseOnly, const String& rPr if ( pMethod ) { SbModule* pModule = pMethod->GetModule(); - DBG_ASSERT(pModule, "BasicIDE::SelectMacro: No Module found!"); + DBG_ASSERT(pModule, "BasicIDE::ChooseMacro: No Module found!"); if ( pModule ) { StarBASIC* pBasic = (StarBASIC*)pModule->GetParent(); - DBG_ASSERT(pBasic, "BasicIDE::SelectMacro: No Basic found!"); + DBG_ASSERT(pBasic, "BasicIDE::ChooseMacro: No Basic found!"); if ( pBasic ) { BasicManager* pBasMgr = BasicIDE::FindBasicManager( pBasic ); - DBG_ASSERT(pBasMgr, "BasicIDE::SelectMacro: No BasicManager found!"); + DBG_ASSERT(pBasMgr, "BasicIDE::ChooseMacro: No BasicManager found!"); if ( pBasMgr ) { SfxObjectShell* pShell = BasicIDE::FindDocShell( pBasMgr ); @@ -326,7 +344,7 @@ String BasicIDE::SelectMacro( BOOL bExecute, BOOL bChooseOnly, const String& rPr SFX_APP()->LeaveBasicCall(); - return aMacroURL; + return ::rtl::OUString( aMacroURL ); } //---------------------------------------------------------------------------- |