CWS-TOOLING: integrate CWS mib18
This commit is contained in:
commit
60fa42701a
3 changed files with 25 additions and 11 deletions
|
@ -365,7 +365,7 @@ BOOL ModulWindow::BasicExecute()
|
|||
break;
|
||||
}
|
||||
}
|
||||
else if ( !pMethod || ( nStart < nCurMethodStart ) )
|
||||
else if ( !pMethod || ( nStart < nCurMethodStart && !pM->IsHidden() ) )
|
||||
{
|
||||
pMethod = pM;
|
||||
nCurMethodStart = nStart;
|
||||
|
|
|
@ -364,13 +364,23 @@ Sequence< ::rtl::OUString > GetMethodNames( const ScriptDocument& rDocument, con
|
|||
SbModuleRef xModule = new SbModule( rModName );
|
||||
xModule->SetSource32( aOUSource );
|
||||
USHORT nCount = xModule->GetMethods()->Count();
|
||||
aSeqMethods.realloc( nCount );
|
||||
|
||||
USHORT nRealCount = nCount;
|
||||
for ( USHORT i = 0; i < nCount; i++ )
|
||||
{
|
||||
SbMethod* pMethod = (SbMethod*)xModule->GetMethods()->Get( i );
|
||||
if( pMethod->IsHidden() )
|
||||
--nRealCount;
|
||||
}
|
||||
aSeqMethods.realloc( nRealCount );
|
||||
|
||||
USHORT iTarget = 0;
|
||||
for ( USHORT i = 0 ; i < nCount; ++i )
|
||||
{
|
||||
SbMethod* pMethod = (SbMethod*)xModule->GetMethods()->Get( i );
|
||||
if( pMethod->IsHidden() )
|
||||
continue;
|
||||
DBG_ASSERT( pMethod, "Method not found! (NULL)" );
|
||||
aSeqMethods.getArray()[ i ] = pMethod->GetName();
|
||||
aSeqMethods.getArray()[ iTarget++ ] = pMethod->GetName();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -392,7 +402,7 @@ BOOL HasMethod( const ScriptDocument& rDocument, const String& rLibName, const S
|
|||
if ( pMethods )
|
||||
{
|
||||
SbMethod* pMethod = (SbMethod*)pMethods->Find( rMethName, SbxCLASS_METHOD );
|
||||
if ( pMethod )
|
||||
if ( pMethod && !pMethod->IsHidden() )
|
||||
bHasMethod = TRUE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -554,11 +554,15 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox )
|
|||
// Die Macros sollen in der Reihenfolge angezeigt werden,
|
||||
// wie sie im Modul stehen.
|
||||
MacroList aMacros;
|
||||
USHORT nMacros = pModule->GetMethods()->Count();
|
||||
USHORT nMethod;
|
||||
for ( nMethod = 0; nMethod < nMacros; nMethod++ )
|
||||
USHORT nMacroCount = pModule->GetMethods()->Count();
|
||||
USHORT nRealMacroCount = 0;
|
||||
USHORT iMeth;
|
||||
for ( iMeth = 0; iMeth < nMacroCount; iMeth++ )
|
||||
{
|
||||
SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Get( nMethod );
|
||||
SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Get( iMeth );
|
||||
if( pMethod->IsHidden() )
|
||||
continue;
|
||||
++nRealMacroCount;
|
||||
DBG_ASSERT( pMethod, "Methode nicht gefunden! (NULL)" );
|
||||
ULONG nPos = LIST_APPEND;
|
||||
// Eventuell weiter vorne ?
|
||||
|
@ -580,8 +584,8 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox )
|
|||
}
|
||||
|
||||
aMacroBox.SetUpdateMode( FALSE );
|
||||
for ( nMethod = 0; nMethod < nMacros; nMethod++ )
|
||||
aMacroBox.InsertEntry( aMacros.GetObject( nMethod )->GetName() );
|
||||
for ( iMeth = 0; iMeth < nRealMacroCount; iMeth++ )
|
||||
aMacroBox.InsertEntry( aMacros.GetObject( iMeth )->GetName() );
|
||||
aMacroBox.SetUpdateMode( TRUE );
|
||||
|
||||
if ( aMacroBox.GetEntryCount() )
|
||||
|
|
Loading…
Reference in a new issue