[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - include/sfx2 sfx2/source

Akshay Deep akshaydeepiitr at gmail.com
Mon Jun 6 09:37:03 UTC 2016


 include/sfx2/templatedlg.hxx    |    1 +
 sfx2/source/doc/templatedlg.cxx |    7 +++++++
 2 files changed, 8 insertions(+)

New commits:
commit 55d75f4c28509234f70b860eeb47ca4294072695
Author: Akshay Deep <akshaydeepiitr at gmail.com>
Date:   Sun Jun 5 07:10:26 2016 +0530

    Hitting return in search field should not open a template
    
    Change-Id: I85d8096489debdbda1b3883f9335dd1218e567ec
    Reviewed-on: https://gerrit.libreoffice.org/25915
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    (cherry picked from commit 1efbab1eb4e01ae3116301df861067a2e488c717)
    Reviewed-on: https://gerrit.libreoffice.org/25958
    Reviewed-by: Akshay Deep <akshaydeepiitr at gmail.com>
    Tested-by: Akshay Deep <akshaydeepiitr at gmail.com>

diff --git a/include/sfx2/templatedlg.hxx b/include/sfx2/templatedlg.hxx
index 97fd3e5..6fbcf65 100644
--- a/include/sfx2/templatedlg.hxx
+++ b/include/sfx2/templatedlg.hxx
@@ -88,6 +88,7 @@ private:
     DECL_LINK_TYPED(DefaultTemplateHdl, ThumbnailViewItem*, void);
 
     DECL_LINK_TYPED(SearchUpdateHdl, Edit&, void);
+    DECL_LINK_TYPED(GetFocusHdl, Control&, void);
 
     void OnTemplateImportCategory(const OUString& sCategory);
     static void OnTemplateLink ();
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index cf01788..9f71a4d 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -261,6 +261,7 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(vcl::Window *parent)
 
     mpSearchFilter->SetUpdateDataHdl(LINK(this, SfxTemplateManagerDlg, SearchUpdateHdl));
     mpSearchFilter->EnableUpdateData();
+    mpSearchFilter->SetGetFocusHdl(LINK( this, SfxTemplateManagerDlg, GetFocusHdl ));
 
     SvtMiscOptions aMiscOptions;
     if ( !aMiscOptions.IsExperimentalMode() )
@@ -910,6 +911,12 @@ IMPL_LINK_NOARG_TYPED(SfxTemplateManagerDlg, SearchUpdateHdl, Edit&, void)
     }
 }
 
+IMPL_LINK_NOARG_TYPED(SfxTemplateManagerDlg, GetFocusHdl, Control&, void)
+{
+    mpCurView->deselectItems();
+    maSelTemplates.clear();
+}
+
 void SfxTemplateManagerDlg::OnTemplateState (const ThumbnailViewItem *pItem)
 {
     bool bInSelection = maSelTemplates.find(pItem) != maSelTemplates.end();


More information about the Libreoffice-commits mailing list