[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - sfx2/source
Joren De Cuyper
jorendc at libreoffice.org
Fri Feb 7 12:14:54 PST 2014
sfx2/source/control/templatesearchview.cxx | 10 ++++++++++
sfx2/source/doc/templatedlg.cxx | 1 +
sfx2/source/inc/templatesearchview.hxx | 8 ++++++++
3 files changed, 19 insertions(+)
New commits:
commit 497a36366efece255303a82f6ea0c96677f3ae9f
Author: Joren De Cuyper <jorendc at libreoffice.org>
Date: Fri Feb 7 15:08:12 2014 +0100
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 at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 96e7225260aac0815643a4043f4ddb4e6b5764a1)
Reviewed-on: https://gerrit.libreoffice.org/7924
diff --git a/sfx2/source/control/templatesearchview.cxx b/sfx2/source/control/templatesearchview.cxx
index 2942b66..f0b87d2 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 a31c235..e6e464c 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -236,6 +236,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 a6a81a3..f1bb49c 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 // __SFX2_TEMPLATESEARCHVIEW_HXX__
More information about the Libreoffice-commits
mailing list