[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - 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 af32163ce76cf1fb2087486f0dff03f3d45ab548
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/7923
diff --git a/sfx2/source/control/templatesearchview.cxx b/sfx2/source/control/templatesearchview.cxx
index 87bd69c..7ebfbeb 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 ea35031..e2b81d5 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 2b35ded..f8c6e98 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
More information about the Libreoffice-commits
mailing list