diff options
Diffstat (limited to 'basctl/source/basicide/basides2.cxx')
-rw-r--r-- | basctl/source/basicide/basides2.cxx | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx index 8da483e209d4..c6f6a77a9446 100644 --- a/basctl/source/basicide/basides2.cxx +++ b/basctl/source/basicide/basides2.cxx @@ -301,21 +301,18 @@ ModulWindow* BasicIDEShell::CreateBasWin( const ScriptDocument& rDocument, const } DBG_ASSERT( nKey, "CreateBasWin: Kein Key- Fenster nicht gefunden!" ); } - if( nKey ) + if( nKey && xLib.is() && rDocument.isInVBAMode() ) { - if( xLib.is() ) + // 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 ); + if( sObjName.Len() ) { - // 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 ); - if( sObjName.Len() ) - { - aModName.AppendAscii(" (").Append(sObjName).AppendAscii(")"); - } + aModName.AppendAscii(" (").Append(sObjName).AppendAscii(")"); } - pTabBar->InsertPage( (USHORT)nKey, aModName ); } + pTabBar->InsertPage( (USHORT)nKey, aModName ); pTabBar->Sort(); pWin->GrabScrollBars( &aHScrollBar, &aVScrollBar ); if ( !pCurWin ) |