summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Benisch <tbe@openoffice.org>2001-10-24 16:00:15 +0000
committerThomas Benisch <tbe@openoffice.org>2001-10-24 16:00:15 +0000
commit39c960343eb478ee3787945fd624e42da9ec69bd (patch)
tree018f4ab6c36ffa3adb2b3a7e8bb1c8e5d2c3066b
parentc9c530f9de875b9419da22703c37a1cd5f2e320d (diff)
#93748# selection in BasicTreeListBox
-rw-r--r--basctl/source/basicide/bastype2.cxx16
-rw-r--r--basctl/source/basicide/bastype3.cxx4
-rw-r--r--basctl/source/basicide/macrodlg.cxx10
-rw-r--r--basctl/source/basicide/moduldl2.cxx11
4 files changed, 25 insertions, 16 deletions
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index c3e54b3e4eef..7a3dab694633 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: bastype2.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: tbe $ $Date: 2001-09-03 11:49:01 $
+ * last change: $Author: tbe $ $Date: 2001-10-24 17:00:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -284,12 +284,22 @@ void BasicTreeListBox::UpdateEntries()
while ( pEntry )
{
BOOL bFound = FindVariable( pEntry ) ? TRUE : FALSE;
+
+ // probably it's a BasicManager
if ( !bFound && !GetModel()->GetDepth( pEntry ) )
{
- // Vielleicht ist es ein BasicManager?
bFound = BasicIDE::FindBasicManager( GetEntryText( pEntry ) ) ? TRUE : FALSE;
}
+ // probably it's an unloaded library
+ // (FindVariable fails for unloaded libraries!)
+ if ( !bFound && GetModel()->GetDepth( pEntry ) == 1 )
+ {
+ BasicManager* pBasMgr = BasicIDE::FindBasicManager( GetEntryText( GetParent( pEntry ) ) );
+ if ( pBasMgr )
+ bFound = pBasMgr->HasLib( GetEntryText( pEntry ) );
+ }
+
if ( bFound )
pLastValid = pEntry;
else
diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx
index e35f32a55d75..a4bd8380f9e3 100644
--- a/basctl/source/basicide/bastype3.cxx
+++ b/basctl/source/basicide/bastype3.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: bastype3.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: tbe $ $Date: 2001-08-29 12:23:06 $
+ * last change: $Author: tbe $ $Date: 2001-10-24 17:00:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index 1bc57388ebc9..74d2cd9c9312 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: macrodlg.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: tbe $ $Date: 2001-09-27 15:53:26 $
+ * last change: $Author: tbe $ $Date: 2001-10-24 17:00:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -279,8 +279,10 @@ short __EXPORT MacroChooser::Execute()
}
else
{
- // Erstes Macro selektieren:
- SvLBoxEntry* pEntry = aBasicBox.GetEntry( 0 );
+ // select first macro
+ SvLBoxEntry* pEntry = aBasicBox.FindLibEntry( SFX_APP()->GetBasicManager()->GetLib( String::CreateFromAscii("Standard") ) );
+ if ( !pEntry )
+ pEntry = aBasicBox.GetEntry( 0 );
// SvLBoxEntry* pFirstEntry = pEntry;
SvLBoxEntry* pLastValid = pEntry;
while ( pEntry )
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index b8dd16e8019b..422fadbc3958 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: moduldl2.cxx,v $
*
- * $Revision: 1.21 $
+ * $Revision: 1.22 $
*
- * last change: $Author: tbe $ $Date: 2001-10-22 15:33:31 $
+ * last change: $Author: tbe $ $Date: 2001-10-24 17:00:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -420,6 +420,7 @@ void LibPage::NewLib()
*/
SvLBoxEntry* pEntry = aLibBox.InsertEntry( aLibName );
+ aLibBox.SetCurEntry( pEntry );
//USHORT nPos = (USHORT)aLibBox.GetModel()->GetAbsPos( pEntry );
//aLibBox.CheckEntryPos( nPos, bLoaded );
@@ -733,14 +734,10 @@ void LibPage::SetCurLib()
for ( sal_Int32 i = 0 ; i < nLibCount ; i++ )
ImpInsertLibEntry( pLibNames[ i ], i );
- aLibBox.SetCurEntry( aLibBox.GetEntry( 0 ) );
- /*
- String aStdLibName = String::CreateFromAscii("Standard");
- SvLBoxEntry* pEntry = aLibBox.FindEntry( aStdLibName );
+ SvLBoxEntry* pEntry = aLibBox.FindEntry( String::CreateFromAscii("Standard") );
if ( !pEntry )
pEntry = aLibBox.GetEntry( 0 );
aLibBox.SetCurEntry( pEntry );
- */
}
}