summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorUray M. János <uray.janos@gmail.com>2012-08-30 11:23:16 +0200
committerAndras Timar <atimar@suse.com>2012-08-30 12:57:40 +0000
commitf8182a1c53c2ccccbc77444d58ffb140b39ea798 (patch)
tree6a5ed4f42d1a1666527c0fd2a20f2e3c40817af9 /basctl
parent1191f4e432d3cb49662e6133411af3a2faf10a7a (diff)
Object Catalog: double-click to modules and dialogs
In Basic IDE in Object Catalog, only methods could be loaded by double-click. Now modules and dialogs can be too. Change-Id: If1c4412d2f6d35e6d1cbf48e700e2566dad9e97a Reviewed-on: https://gerrit.libreoffice.org/515 Reviewed-by: Andras Timar <atimar@suse.com> Tested-by: Andras Timar <atimar@suse.com>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/bastype2.cxx31
1 files changed, 21 insertions, 10 deletions
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index 40c84a2c99a3..4b8b1e47f096 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -907,17 +907,28 @@ void TreeListBox::MouseButtonDown( const MouseEvent& rMEvt )
SvTreeListBox::MouseButtonDown( rMEvt );
if ( rMEvt.IsLeft() && ( rMEvt.GetClicks() == 2 ) )
{
- EntryDescriptor aDesc( GetEntryDescriptor( GetCurEntry() ) );
-
- if ( aDesc.GetType() == OBJ_TYPE_METHOD )
+ EntryDescriptor aDesc = GetEntryDescriptor(GetCurEntry());
+ switch (aDesc.GetType())
{
- if (SfxDispatcher* pDispatcher = GetDispatcher())
- {
- 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 );
- }
+ case OBJ_TYPE_METHOD:
+ case OBJ_TYPE_MODULE:
+ case OBJ_TYPE_DIALOG:
+ if (SfxDispatcher* pDispatcher = GetDispatcher())
+ {
+ 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
+ );
+ }
+ break;
+
+ default:
+ break;
}
}
}