summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorAkshay Deep <akshaydeepiitr@gmail.com>2016-06-05 07:10:26 +0530
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2016-06-06 09:26:12 +0000
commit1efbab1eb4e01ae3116301df861067a2e488c717 (patch)
treec52936d457ee777233bfee83169c250df29a7135 /sfx2
parentf944195baabfda068cc37bd4e8ddf60e6cc990b7 (diff)
Hitting return in search field should not open a template
Change-Id: I85d8096489debdbda1b3883f9335dd1218e567ec Reviewed-on: https://gerrit.libreoffice.org/25915 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/templatedlg.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 14181cfe3f22..db75aa7e8343 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() )
@@ -915,6 +916,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();