diff options
author | npower Developer <npower@openoffice.org> | 2010-04-20 10:31:03 +0100 |
---|---|---|
committer | npower Developer <npower@openoffice.org> | 2010-04-20 10:31:03 +0100 |
commit | 20f890a83eae0eb9e829cc6fb0790146c19a830a (patch) | |
tree | c8cb64366c5d53f13d2531894fcf3019cbb1b5b6 /basctl | |
parent | 734f4532a5f48c78ef83c9b3a1e2cecef67871c5 (diff) |
remove some stray instances of lcl_getObject ( now implemented in ModuleInfoHelper::getObjectName )
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/baside2.cxx | 4 | ||||
-rw-r--r-- | basctl/source/basicide/basides2.cxx | 25 |
2 files changed, 2 insertions, 27 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index ba33ca5bc..e91857293 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -108,8 +108,6 @@ DBG_NAME( ModulWindow ) TYPEINIT1( ModulWindow , IDEBaseWindow ); -void lcl_getObjectName( const uno::Reference< container::XNameContainer >& rLib, const String& rModName, String& rObjName ); - void lcl_PrintHeader( Printer* pPrinter, USHORT nPages, USHORT nCurPage, const String& rTitle, bool bOutput ) { short nLeftMargin = LMARGPRN; @@ -1417,7 +1415,7 @@ BasicEntryDescriptor ModulWindow::CreateEntryDescriptor() if( xLib.is() ) { String sObjName; - lcl_getObjectName( xLib, aModName, sObjName ); + ModuleInfoHelper::getObjectName( xLib, aModName, sObjName ); if( sObjName.Len() ) { aModName.AppendAscii(" (").Append(sObjName).AppendAscii(")"); diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx index 025e0943b..a51ecf0a8 100644 --- a/basctl/source/basicide/basides2.cxx +++ b/basctl/source/basicide/basides2.cxx @@ -60,29 +60,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; namespace css = ::com::sun::star; -void lcl_getObjectName( const uno::Reference< container::XNameContainer >& rLib, const String& rModName, String& rObjName ) -{ - try - { - uno::Reference< script::XVBAModuleInfo > xVBAModuleInfo( rLib, uno::UNO_QUERY ); - if ( xVBAModuleInfo.is() && xVBAModuleInfo->hasModuleInfo( rModName ) ) - { - script::ModuleInfo aModuleInfo = xVBAModuleInfo->getModuleInfo( rModName ); - uno::Any aObject( aModuleInfo.ModuleObject ); - uno::Reference< lang::XServiceInfo > xServiceInfo( aObject, uno::UNO_QUERY ); - if( xServiceInfo.is() && xServiceInfo->supportsService( rtl::OUString::createFromAscii( "ooo.vba.excel.Worksheet" ) ) ) - { - uno::Reference< container::XNamed > xNamed( aObject, uno::UNO_QUERY ); - if( xNamed.is() ) - rObjName = xNamed->getName(); - } - } - } - catch( uno::Exception& ) - { - } -} - IMPL_LINK_INLINE_START( BasicIDEShell, ObjectDialogCancelHdl, ObjectCatalog *, EMPTYARG ) { ShowObjectDialog( FALSE, TRUE ); @@ -306,7 +283,7 @@ ModulWindow* BasicIDEShell::CreateBasWin( const ScriptDocument& rDocument, const // display a nice friendly name in the ObjectModule tab, // combining the objectname and module name, e.g. Sheet1 ( Financials ) String sObjName; - lcl_getObjectName( xLib, rModName, sObjName ); + ModuleInfoHelper::getObjectName( xLib, rModName, sObjName ); if( sObjName.Len() ) { aModName.AppendAscii(" (").Append(sObjName).AppendAscii(")"); |