diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-03-26 16:27:17 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-03-28 22:07:06 +0100 |
commit | 3e078e17ee2144fb976a7e6b9227152113cea0d4 (patch) | |
tree | 01faab7d3c82c5b027b42a6722700736b249a775 /sfx2/source/inc | |
parent | 1e2868296730d3548574f61a3c6e323aa5c0598a (diff) |
weld SfxTemplateManagerDlg
like expert configuration change the gear menu not to display a down indicator
and use CommandEvent to distinguish mouse/non-mouse context menus
Change-Id: I64bb660a9c7dacb5b90b240d9d76d29324c5fd9f
Reviewed-on: https://gerrit.libreoffice.org/69893
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2/source/inc')
-rw-r--r-- | sfx2/source/inc/templatesearchview.hxx | 13 | ||||
-rw-r--r-- | sfx2/source/inc/templatesearchviewitem.hxx | 2 |
2 files changed, 8 insertions, 7 deletions
diff --git a/sfx2/source/inc/templatesearchview.hxx b/sfx2/source/inc/templatesearchview.hxx index 9e5fd4134995..ae7658f3ae44 100644 --- a/sfx2/source/inc/templatesearchview.hxx +++ b/sfx2/source/inc/templatesearchview.hxx @@ -16,15 +16,16 @@ class TemplateViewItem; class PopupMenu; class Menu; -class TemplateSearchView final : public ThumbnailView +class TemplateSearchView final : public SfxThumbnailView { public: - TemplateSearchView ( vcl::Window* pParent); + TemplateSearchView(std::unique_ptr<weld::ScrolledWindow> xWindow, + std::unique_ptr<weld::Menu> xMenu); void setOpenTemplateHdl (const Link<ThumbnailViewItem*, void> &rLink); - DECL_LINK(ContextMenuSelectHdl, Menu*, bool); + void ContextMenuSelectHdl(const OString& rIdent); void setCreateContextMenuHdl(const Link<ThumbnailViewItem*,void> &rLink); @@ -45,11 +46,11 @@ public: private: virtual void OnItemDblClicked(ThumbnailViewItem *pItem) override; - virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; + virtual bool MouseButtonDown( const MouseEvent& rMEvt ) override; - virtual void Command( const CommandEvent& rCEvt ) override; + virtual bool ContextMenu(const CommandEvent& rPos) override; - virtual void KeyInput( const KeyEvent& rKEvt ) override; + virtual bool KeyInput( const KeyEvent& rKEvt ) override; TemplateViewItem *maSelectedItem; diff --git a/sfx2/source/inc/templatesearchviewitem.hxx b/sfx2/source/inc/templatesearchviewitem.hxx index 6e1b7d39cc93..4df92e8916e1 100644 --- a/sfx2/source/inc/templatesearchviewitem.hxx +++ b/sfx2/source/inc/templatesearchviewitem.hxx @@ -14,7 +14,7 @@ struct TemplateSearchViewItem : public TemplateViewItem { - TemplateSearchViewItem (ThumbnailView &rView, sal_uInt16 nId) + TemplateSearchViewItem (ThumbnailViewBase &rView, sal_uInt16 nId) : TemplateViewItem(rView, nId) , mnAssocId(0) {} |