diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-10-05 15:34:50 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-10-05 15:34:50 +0100 |
commit | 449dcb850de1ee4fb718d659034fc0c8b0b99583 (patch) | |
tree | c736ba05701266b203564ed3f7e11024b611283a /sc/source/ui/navipi | |
parent | 43b13e9b73e425683977473ab171e1e140dba6cc (diff) |
don't need a custom class to respond to a new selected listbox entry
Change-Id: I68de5be394af8e9c9dcfa69a7e45d80a501b8b7e
Diffstat (limited to 'sc/source/ui/navipi')
-rw-r--r-- | sc/source/ui/navipi/navipi.cxx | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index ef6e00bd46c2..410f30fd9811 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -290,24 +290,12 @@ void RowEdit::ExecuteRow() rDlg.SetCurrentCell( nCol-1, nRow-1 ); } -// class ScDocListBox - -ScDocListBox::ScDocListBox( ScNavigatorDlg* pParent, const ResId& rResId ) - : ListBox ( pParent, rResId ), - rDlg ( *pParent ) -{ -} - -ScDocListBox::~ScDocListBox() -{ -} - -void ScDocListBox::Select() +IMPL_LINK(ScNavigatorDlg, DocumentSelectHdl, ListBox&, rListBox, void) { ScNavigatorDlg::ReleaseFocus(); - OUString aDocName = GetSelectEntry(); - rDlg.aLbEntries->SelectDoc( aDocName ); + OUString aDocName = rListBox.GetSelectEntry(); + aLbEntries->SelectDoc(aDocName); } // class CommandToolBox @@ -557,7 +545,7 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, vcl aTbxCmd ( VclPtr<CommandToolBox>::Create( this, ScResId( TBX_CMD ) ) ), aLbEntries ( VclPtr<ScContentTree>::Create( this, ScResId( LB_ENTRIES ) ) ), aWndScenarios( VclPtr<ScScenarioWindow>::Create( this,ScResId( STR_QHLP_SCEN_LISTBOX), ScResId(STR_QHLP_SCEN_COMMENT)) ), - aLbDocuments( VclPtr<ScDocListBox>::Create( this, ScResId( LB_DOCUMENTS ) ) ), + aLbDocuments( VclPtr<ListBox>::Create( this, ScResId( LB_DOCUMENTS ) ) ), aStrDragMode ( ScResId( STR_DRAGMODE ) ), aStrDisplay ( ScResId( STR_DISPLAY ) ), aStrActiveWin( ScResId( STR_ACTIVEWIN ) ), @@ -579,6 +567,7 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, vcl // eListMode is set from outside, Root further below aLbDocuments->SetDropDownLineCount(9); + aLbDocuments->SetSelectHdl(LINK(this, ScNavigatorDlg, DocumentSelectHdl)); aStrActive = " (" + OUString( ScResId( STR_ACTIVE ) ) + ")"; // " (active)" |