summaryrefslogtreecommitdiff
path: root/basctl/source/basicide/bastype2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basctl/source/basicide/bastype2.cxx')
-rw-r--r--basctl/source/basicide/bastype2.cxx27
1 files changed, 26 insertions, 1 deletions
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index abacd01b802c..3703776ef9ef 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -33,7 +33,9 @@
#include <ide_pch.hxx>
-
+#include "basidesh.hxx"
+#include "iderdll.hxx"
+#include "iderdll2.hxx"
#include <basidesh.hrc>
#include <bastypes.hxx>
#include <bastype2.hxx>
@@ -879,4 +881,27 @@ void BasicTreeListBox::SetCurrentEntry( BasicEntryDescriptor& rDesc )
SetCurEntry( pCurEntry );
}
+void BasicTreeListBox::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ SvTreeListBox::MouseButtonDown( rMEvt );
+ if ( rMEvt.IsLeft() && ( rMEvt.GetClicks() == 2 ) )
+ {
+ BasicEntryDescriptor aDesc( GetEntryDescriptor( GetCurEntry() ) );
+
+ if ( aDesc.GetType() == OBJ_TYPE_METHOD )
+ {
+ BasicIDEShell* pIDEShell = BasicIDEGlobals::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 );
+ }
+ }
+ }
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */