Kaydet (Commit) cb2bcac3 authored tarafından npower Developer's avatar npower Developer

remove some stray instances of lcl_getObject ( now implemented in ModuleInfoHelper::getObjectName )

üst 7780dbea
...@@ -108,8 +108,6 @@ DBG_NAME( ModulWindow ) ...@@ -108,8 +108,6 @@ DBG_NAME( ModulWindow )
TYPEINIT1( ModulWindow , IDEBaseWindow ); 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 ) void lcl_PrintHeader( Printer* pPrinter, USHORT nPages, USHORT nCurPage, const String& rTitle, bool bOutput )
{ {
short nLeftMargin = LMARGPRN; short nLeftMargin = LMARGPRN;
...@@ -1417,7 +1415,7 @@ BasicEntryDescriptor ModulWindow::CreateEntryDescriptor() ...@@ -1417,7 +1415,7 @@ BasicEntryDescriptor ModulWindow::CreateEntryDescriptor()
if( xLib.is() ) if( xLib.is() )
{ {
String sObjName; String sObjName;
lcl_getObjectName( xLib, aModName, sObjName ); ModuleInfoHelper::getObjectName( xLib, aModName, sObjName );
if( sObjName.Len() ) if( sObjName.Len() )
{ {
aModName.AppendAscii(" (").Append(sObjName).AppendAscii(")"); aModName.AppendAscii(" (").Append(sObjName).AppendAscii(")");
......
...@@ -60,29 +60,6 @@ using namespace ::com::sun::star; ...@@ -60,29 +60,6 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
namespace css = ::com::sun::star; 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 ) IMPL_LINK_INLINE_START( BasicIDEShell, ObjectDialogCancelHdl, ObjectCatalog *, EMPTYARG )
{ {
ShowObjectDialog( FALSE, TRUE ); ShowObjectDialog( FALSE, TRUE );
...@@ -306,7 +283,7 @@ ModulWindow* BasicIDEShell::CreateBasWin( const ScriptDocument& rDocument, const ...@@ -306,7 +283,7 @@ ModulWindow* BasicIDEShell::CreateBasWin( const ScriptDocument& rDocument, const
// display a nice friendly name in the ObjectModule tab, // display a nice friendly name in the ObjectModule tab,
// combining the objectname and module name, e.g. Sheet1 ( Financials ) // combining the objectname and module name, e.g. Sheet1 ( Financials )
String sObjName; String sObjName;
lcl_getObjectName( xLib, rModName, sObjName ); ModuleInfoHelper::getObjectName( xLib, rModName, sObjName );
if( sObjName.Len() ) if( sObjName.Len() )
{ {
aModName.AppendAscii(" (").Append(sObjName).AppendAscii(")"); aModName.AppendAscii(" (").Append(sObjName).AppendAscii(")");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment