diff options
author | Andreas Bregas <ab@openoffice.org> | 2010-08-06 09:35:51 +0200 |
---|---|---|
committer | Andreas Bregas <ab@openoffice.org> | 2010-08-06 09:35:51 +0200 |
commit | 329c134bc2d01d41a2ab41cbe5a856b764dcf409 (patch) | |
tree | e5ee094f0c0e76d93f31a7e48b46b4055edaaf06 /basctl | |
parent | 8f28b3c61f002a5a59953526a6465ef43d72f03d (diff) |
mib18: #163121# Declare Rework
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/baside2.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/basobj2.cxx | 18 | ||||
-rw-r--r-- | basctl/source/basicide/macrodlg.cxx | 16 |
3 files changed, 25 insertions, 11 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 1c9e37ad6..93625b0ba 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -365,7 +365,7 @@ BOOL ModulWindow::BasicExecute() break; } } - else if ( !pMethod || ( nStart < nCurMethodStart ) ) + else if ( !pMethod || ( nStart < nCurMethodStart && !pM->IsHidden() ) ) { pMethod = pM; nCurMethodStart = nStart; diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx index cf5386b1e..9f9af5724 100644 --- a/basctl/source/basicide/basobj2.cxx +++ b/basctl/source/basicide/basobj2.cxx @@ -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; } } diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx index cfd9e06f4..8073b48d1 100644 --- a/basctl/source/basicide/macrodlg.cxx +++ b/basctl/source/basicide/macrodlg.cxx @@ -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() ) |