Kaydet (Commit) c9f3c508 authored tarafından Tsutomu Uchino's avatar Tsutomu Uchino Kaydeden (comit) Caolán McNamara

Resolves: #i76558# jump by Enter key on the Object catalog

(cherry picked from commit 7bc75c1a)

Conflicts:
	basctl/source/basicide/objdlg.cxx
	basctl/source/basicide/objdlg.hxx

Change-Id: Id3fa3686fd60df192c02cc8137c9bc59e68c1d49
üst ca0be674
......@@ -922,32 +922,47 @@ void TreeListBox::MouseButtonDown( const MouseEvent& rMEvt )
SvTreeListBox::MouseButtonDown( rMEvt );
if ( rMEvt.IsLeft() && ( rMEvt.GetClicks() == 2 ) )
{
EntryDescriptor aDesc = GetEntryDescriptor(GetCurEntry());
switch (aDesc.GetType())
{
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;
OpenCurrent();
}
}
default:
break;
}
void TreeListBox::KeyInput( const KeyEvent& rEvt )
{
if ( rEvt.GetKeyCode() == KEY_RETURN && OpenCurrent() )
{
return;
}
SvTreeListBox::KeyInput( rEvt );
}
bool TreeListBox::OpenCurrent()
{
EntryDescriptor aDesc = GetEntryDescriptor(GetCurEntry());
switch (aDesc.GetType())
{
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
);
return true;
}
break;
default:
break;
}
return false;
}
} // namespace basctl
......
......@@ -185,7 +185,9 @@ protected:
virtual void ExpandedHdl() SAL_OVERRIDE;
virtual SvTreeListEntry* CloneEntry( SvTreeListEntry* pSource ) SAL_OVERRIDE;
virtual bool ExpandingHdl() SAL_OVERRIDE;
virtual void KeyInput( const KeyEvent& rEvt ) SAL_OVERRIDE;
bool OpenCurrent();
void ImpCreateLibEntries( SvTreeListEntry* pShellRootEntry, const ScriptDocument& rDocument, LibraryLocation eLocation );
void ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName );
void ImpCreateLibSubEntriesInVBAMode( SvTreeListEntry* pLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment