You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ha...@apache.org on 2014/05/17 11:39:40 UTC
svn commit: r1595437 - in /openoffice/trunk/main/basctl/source/basicide:
objdlg.cxx objdlg.hxx
Author: hanya
Date: Sat May 17 09:39:39 2014
New Revision: 1595437
URL: http://svn.apache.org/r1595437
Log:
#i76558# jump by Enter key on the Object catalog
Modified:
openoffice/trunk/main/basctl/source/basicide/objdlg.cxx
openoffice/trunk/main/basctl/source/basicide/objdlg.hxx
Modified: openoffice/trunk/main/basctl/source/basicide/objdlg.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/basctl/source/basicide/objdlg.cxx?rev=1595437&r1=1595436&r2=1595437&view=diff
==============================================================================
--- openoffice/trunk/main/basctl/source/basicide/objdlg.cxx (original)
+++ openoffice/trunk/main/basctl/source/basicide/objdlg.cxx Sat May 17 09:39:39 2014
@@ -64,26 +64,41 @@ void ObjectTreeListBox::MouseButtonDown(
{
BasicTreeListBox::MouseButtonDown( rMEvt );
- if ( rMEvt.IsLeft() && ( rMEvt.GetClicks() == 2 ) )
- {
- BasicEntryDescriptor aDesc( GetEntryDescriptor( GetCurEntry() ) );
+ if ( rMEvt.IsLeft() && ( rMEvt.GetClicks() == 2 ) )
+ {
+ OpenCurrent();
+ }
+}
- if ( aDesc.GetType() == OBJ_TYPE_METHOD )
- {
- BasicIDEShell* pIDEShell = IDE_DLL()->GetShell();
- SfxViewFrame* pViewFrame = pIDEShell ? pIDEShell->GetViewFrame() : NULL;
- SfxDispatcher* pDispatcher = pViewFrame ? pViewFrame->GetDispatcher() : NULL;
- if( pDispatcher )
- {
- SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, aDesc.GetDocument(), aDesc.GetLibName(), aDesc.GetName(),
- aDesc.GetMethodName(), ConvertType( aDesc.GetType() ) );
- pDispatcher->Execute( SID_BASICIDE_SHOWSBX,
- SFX_CALLMODE_SYNCHRON, &aSbxItem, 0L );
- }
- }
- }
+void ObjectTreeListBox::KeyInput( const KeyEvent& rEvt )
+{
+ if ( rEvt.GetKeyCode() == KEY_RETURN && OpenCurrent() )
+ {
+ return;
+ }
+ BasicTreeListBox::KeyInput( rEvt );
}
+bool ObjectTreeListBox::OpenCurrent()
+{
+ BasicEntryDescriptor aDesc( GetEntryDescriptor( GetCurEntry() ) );
+
+ if ( aDesc.GetType() == OBJ_TYPE_METHOD )
+ {
+ BasicIDEShell* pIDEShell = IDE_DLL()->GetShell();
+ SfxViewFrame* pViewFrame = pIDEShell ? pIDEShell->GetViewFrame() : NULL;
+ SfxDispatcher* pDispatcher = pViewFrame ? pViewFrame->GetDispatcher() : NULL;
+ if( pDispatcher )
+ {
+ SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, aDesc.GetDocument(), aDesc.GetLibName(), aDesc.GetName(),
+ aDesc.GetMethodName(), ConvertType( aDesc.GetType() ) );
+ pDispatcher->Execute( SID_BASICIDE_SHOWSBX,
+ SFX_CALLMODE_SYNCHRON, &aSbxItem, 0L );
+ return true;
+ }
+ }
+ return false;
+}
ObjectCatalog::ObjectCatalog( Window * pParent )
Modified: openoffice/trunk/main/basctl/source/basicide/objdlg.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/basctl/source/basicide/objdlg.hxx?rev=1595437&r1=1595436&r2=1595437&view=diff
==============================================================================
--- openoffice/trunk/main/basctl/source/basicide/objdlg.hxx (original)
+++ openoffice/trunk/main/basctl/source/basicide/objdlg.hxx Sat May 17 09:39:39 2014
@@ -40,7 +40,9 @@ private:
virtual void Command( const CommandEvent& rCEvt );
virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void KeyInput( const KeyEvent& rEvt );
+ bool OpenCurrent();
public:
ObjectTreeListBox( Window* pParent, const ResId& rRes );
~ObjectTreeListBox();