diff options
author | Joren De Cuyper <jorendc@libreoffice.org> | 2014-02-07 15:08:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-07 20:14:33 +0000 |
commit | af32163ce76cf1fb2087486f0dff03f3d45ab548 (patch) | |
tree | bf7bd69bd0efbdbd796c7ecd56e994e108da98a7 | |
parent | e44e7942929ba063715861abe53412c6d867cd50 (diff) |
fdo#65430 add OnItemDblClicked and setOpenTemplateHdl in templateSearchView
Currently only templateAbstractView had such handler, which are
templateLocalView and templateRemoteView are based on.
Change-Id: I6694d0804a8b7e58abc0ddc970e811d053394d6f
Reviewed-on: https://gerrit.libreoffice.org/7918
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 96e7225260aac0815643a4043f4ddb4e6b5764a1)
Reviewed-on: https://gerrit.libreoffice.org/7923
-rw-r--r-- | sfx2/source/control/templatesearchview.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.cxx | 1 | ||||
-rw-r--r-- | sfx2/source/inc/templatesearchview.hxx | 8 |
3 files changed, 19 insertions, 0 deletions
diff --git a/sfx2/source/control/templatesearchview.cxx b/sfx2/source/control/templatesearchview.cxx index 87bd69cd6653..7ebfbeb56995 100644 --- a/sfx2/source/control/templatesearchview.cxx +++ b/sfx2/source/control/templatesearchview.cxx @@ -20,6 +20,16 @@ TemplateSearchView::~TemplateSearchView () { } +void TemplateSearchView::setOpenTemplateHdl(const Link &rLink) +{ + maOpenTemplateHdl = rLink; +} + +void TemplateSearchView::OnItemDblClicked (ThumbnailViewItem *pItem) +{ + maOpenTemplateHdl.Call(pItem); +} + void TemplateSearchView::AppendItem(sal_uInt16 nAssocItemId, sal_uInt16 nRegionId, sal_uInt16 nIdx, const OUString &rTitle, const OUString &rSubtitle, const OUString &rPath, diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index ea350319e9f0..e2b81d554fa9 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -241,6 +241,7 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg (Window *parent) TEMPLATE_ITEM_PADDING); mpSearchView->setItemStateHdl(LINK(this,SfxTemplateManagerDlg,TVItemStateHdl)); + mpSearchView->setOpenTemplateHdl(LINK(this,SfxTemplateManagerDlg,OpenTemplateHdl)); maTabControl.SetActivatePageHdl(LINK(this,SfxTemplateManagerDlg,ActivatePageHdl)); diff --git a/sfx2/source/inc/templatesearchview.hxx b/sfx2/source/inc/templatesearchview.hxx index 2b35ded447c0..f8c6e98501df 100644 --- a/sfx2/source/inc/templatesearchview.hxx +++ b/sfx2/source/inc/templatesearchview.hxx @@ -20,9 +20,17 @@ public: virtual ~TemplateSearchView(); + void setOpenTemplateHdl (const Link &rLink); + void AppendItem(sal_uInt16 nAssocItemId, sal_uInt16 nRegionId, sal_uInt16 nIdx, const OUString &rTitle, const OUString &rSubtitle, const OUString &rPath, const BitmapEx &rImage ); + +protected: + virtual void OnItemDblClicked(ThumbnailViewItem *pItem); + +protected: + Link maOpenTemplateHdl; }; #endif // INCLUDED_SFX2_SOURCE_INC_TEMPLATESEARCHVIEW_HXX |