diff options
author | Uray M. János <uray.janos@gmail.com> | 2012-07-24 11:29:57 +0200 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2012-07-25 10:13:28 +0100 |
commit | 44e8b1c8ad917d3c4ed7efe9169e5197801198f2 (patch) | |
tree | fdfecf70844448ac90d91e55b514b3b12ebe1385 /basctl | |
parent | a5947d14c278446b44fd76050103d16dd768601c (diff) |
fdo#50633 IDE: select current module in Object Catalog on open
Change-Id: Ieea731b0ed8eefdab616ed1f778b445aae14191c
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/basides1.cxx | 1 | ||||
-rw-r--r-- | basctl/source/basicide/basidesh.cxx | 6 | ||||
-rw-r--r-- | basctl/source/basicide/objdlg.cxx | 7 | ||||
-rw-r--r-- | basctl/source/basicide/objdlg.hxx | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index 0f5d524ef099..b342255d4da7 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -1205,6 +1205,7 @@ void BasicIDEShell::SetCurWindow( IDEBaseWindow* pNewWin, sal_Bool bUpdateTabBar GetViewFrame()->GetWindow().SetHelpId( HID_BASICIDE_MODULWINDOW ); SfxObjectShell::SetCurrentComponent( NULL ); } + pModulLayout->GetObjectCatalog().SetCurrentEntry(pCurWin); SetUndoManager( pCurWin ? pCurWin->GetUndoManager() : 0 ); InvalidateBasicIDESlots(); EnableScrollbars( pCurWin ? sal_True : sal_False ); diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index c51cb0a123ba..e2a088415406 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -542,11 +542,7 @@ void BasicIDEShell::ShowObjectDialog( sal_Bool bShow, sal_Bool bCreateOrDestroy if ( pObjectCatalog ) { pObjectCatalog->SetCancelHdl( LINK( this, BasicIDEShell, ObjectDialogCancelHdl ) ); - BasicEntryDescriptor aDesc; - IDEBaseWindow* pCurWin_ = GetCurWindow(); - if ( pCurWin_ ) - aDesc = pCurWin_->CreateEntryDescriptor(); - pObjectCatalog->SetCurrentEntry( aDesc ); + pObjectCatalog->SetCurrentEntry(pCurWin); } } diff --git a/basctl/source/basicide/objdlg.cxx b/basctl/source/basicide/objdlg.cxx index 10435948397e..64935bb8331e 100644 --- a/basctl/source/basicide/objdlg.cxx +++ b/basctl/source/basicide/objdlg.cxx @@ -223,9 +223,12 @@ void ObjectCatalog::UpdateEntries() aMacroTreeList.UpdateEntries(); } -void ObjectCatalog::SetCurrentEntry( BasicEntryDescriptor& rDesc ) +void ObjectCatalog::SetCurrentEntry (IDEBaseWindow* pCurWin) { - aMacroTreeList.SetCurrentEntry( rDesc ); + BasicEntryDescriptor aDesc; + if (pCurWin) + aDesc = pCurWin->CreateEntryDescriptor(); + aMacroTreeList.SetCurrentEntry(aDesc); } ObjectCatalogToolBox_Impl::ObjectCatalogToolBox_Impl( diff --git a/basctl/source/basicide/objdlg.hxx b/basctl/source/basicide/objdlg.hxx index c0c3c454ca60..f82ae0e114b3 100644 --- a/basctl/source/basicide/objdlg.hxx +++ b/basctl/source/basicide/objdlg.hxx @@ -64,7 +64,7 @@ public: virtual ~ObjectCatalog(); void UpdateEntries(); - void SetCurrentEntry( BasicEntryDescriptor& rDesc ); + void SetCurrentEntry (IDEBaseWindow* pCurWin); void SetCancelHdl( const Link& rLink ) { aCancelHdl = rLink; } }; |