summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authornpower Developer <npower@openoffice.org>2010-04-20 10:31:03 +0100
committernpower Developer <npower@openoffice.org>2010-04-20 10:31:03 +0100
commitcb2bcac3474ca249546e474134f1802b02631f64 (patch)
tree9e5ab977daf99e631507ce57d9e117697ead60c2 /basctl
parent7780dbea502bce290f94c8fe357566d45509ff55 (diff)
remove some stray instances of lcl_getObject ( now implemented in ModuleInfoHelper::getObjectName )
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/baside2.cxx4
-rw-r--r--basctl/source/basicide/basides2.cxx25
2 files changed, 2 insertions, 27 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 0fa09a00f255..71dcd25ed51a 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 c6f6a77a9446..831233e78068 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(")");