objdlg.cxx (31598a22) | objdlg.cxx (d67f091b) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 50 unchanged lines hidden (view full) --- 59void ObjectTreeListBox::Command( const CommandEvent& ) 60{ 61} 62 63void ObjectTreeListBox::MouseButtonDown( const MouseEvent& rMEvt ) 64{ 65 BasicTreeListBox::MouseButtonDown( rMEvt ); 66 | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 50 unchanged lines hidden (view full) --- 59void ObjectTreeListBox::Command( const CommandEvent& ) 60{ 61} 62 63void ObjectTreeListBox::MouseButtonDown( const MouseEvent& rMEvt ) 64{ 65 BasicTreeListBox::MouseButtonDown( rMEvt ); 66 |
67 if ( rMEvt.IsLeft() && ( rMEvt.GetClicks() == 2 ) ) 68 { 69 BasicEntryDescriptor aDesc( GetEntryDescriptor( GetCurEntry() ) ); | 67 if ( rMEvt.IsLeft() && ( rMEvt.GetClicks() == 2 ) ) 68 { 69 OpenCurrent(); 70 } 71} |
70 | 72 |
71 if ( aDesc.GetType() == OBJ_TYPE_METHOD ) 72 { 73 BasicIDEShell* pIDEShell = IDE_DLL()->GetShell(); 74 SfxViewFrame* pViewFrame = pIDEShell ? pIDEShell->GetViewFrame() : NULL; 75 SfxDispatcher* pDispatcher = pViewFrame ? pViewFrame->GetDispatcher() : NULL; 76 if( pDispatcher ) 77 { 78 SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, aDesc.GetDocument(), aDesc.GetLibName(), aDesc.GetName(), 79 aDesc.GetMethodName(), ConvertType( aDesc.GetType() ) ); 80 pDispatcher->Execute( SID_BASICIDE_SHOWSBX, 81 SFX_CALLMODE_SYNCHRON, &aSbxItem, 0L ); 82 } 83 } 84 } | 73void ObjectTreeListBox::KeyInput( const KeyEvent& rEvt ) 74{ 75 if ( rEvt.GetKeyCode() == KEY_RETURN && OpenCurrent() ) 76 { 77 return; 78 } 79 BasicTreeListBox::KeyInput( rEvt ); |
85} 86 | 80} 81 |
82bool ObjectTreeListBox::OpenCurrent() 83{ 84 BasicEntryDescriptor aDesc( GetEntryDescriptor( GetCurEntry() ) ); |
|
87 | 85 |
86 if ( aDesc.GetType() == OBJ_TYPE_METHOD ) 87 { 88 BasicIDEShell* pIDEShell = IDE_DLL()->GetShell(); 89 SfxViewFrame* pViewFrame = pIDEShell ? pIDEShell->GetViewFrame() : NULL; 90 SfxDispatcher* pDispatcher = pViewFrame ? pViewFrame->GetDispatcher() : NULL; 91 if( pDispatcher ) 92 { 93 SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, aDesc.GetDocument(), aDesc.GetLibName(), aDesc.GetName(), 94 aDesc.GetMethodName(), ConvertType( aDesc.GetType() ) ); 95 pDispatcher->Execute( SID_BASICIDE_SHOWSBX, 96 SFX_CALLMODE_SYNCHRON, &aSbxItem, 0L ); 97 return true; 98 } 99 } 100 return false; 101} |
|
88 | 102 |
103 |
|
89ObjectCatalog::ObjectCatalog( Window * pParent ) 90 :FloatingWindow( pParent, IDEResId( RID_BASICIDE_OBJCAT ) ) 91 ,aMacroTreeList( this, IDEResId( RID_TLB_MACROS ) ) 92 ,aToolBox(this, IDEResId(RID_TB_TOOLBOX), IDEResId(RID_IMGLST_TB_HC)) 93 ,aMacroDescr( this, IDEResId( RID_FT_MACRODESCR ) ) 94{ 95 FreeResource(); 96 --- 209 unchanged lines hidden --- | 104ObjectCatalog::ObjectCatalog( Window * pParent ) 105 :FloatingWindow( pParent, IDEResId( RID_BASICIDE_OBJCAT ) ) 106 ,aMacroTreeList( this, IDEResId( RID_TLB_MACROS ) ) 107 ,aToolBox(this, IDEResId(RID_TB_TOOLBOX), IDEResId(RID_IMGLST_TB_HC)) 108 ,aMacroDescr( this, IDEResId( RID_FT_MACRODESCR ) ) 109{ 110 FreeResource(); 111 --- 209 unchanged lines hidden --- |