[Libreoffice-commits] .: basctl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Aug 30 05:57:59 PDT 2012


 basctl/source/basicide/bastype2.cxx |   31 +++++++++++++++++++++----------
 1 file changed, 21 insertions(+), 10 deletions(-)

New commits:
commit f8182a1c53c2ccccbc77444d58ffb140b39ea798
Author: Uray M. János <uray.janos at gmail.com>
Date:   Thu Aug 30 11:23:16 2012 +0200

    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 at suse.com>
    Tested-by: Andras Timar <atimar at suse.com>

diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index 40c84a2..4b8b1e4 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;
         }
     }
 }


More information about the Libreoffice-commits mailing list