diff options
author | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2013-01-09 11:58:39 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2013-01-09 14:13:50 +0100 |
commit | 0c6d58df4c3994d485c174909d4317cb8616c067 (patch) | |
tree | 89b4aef0d3732cbec666c3f8f93cf38c5952648a /sfx2/source | |
parent | 4419f2438d2d63387d6aab5dfe60b4aa3f251eb5 (diff) |
Template Manager: don't deselect item after setting default template
Change-Id: I860fb2c91d6843a1d5345ab2cf9270473f73f5bc
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/doc/templatedlg.cxx | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 80f180a4b923..6b9a2c462fb9 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -1070,19 +1070,17 @@ void SfxTemplateManagerDlg::OnTemplateDelete () void SfxTemplateManagerDlg::OnTemplateAsDefault () { - assert(!maSelTemplates.empty()); - - const TemplateViewItem *pItem = static_cast<const TemplateViewItem*>(*(maSelTemplates.begin())); - - OUString aServiceName; - if (lcl_getServiceName(pItem->getPath(),aServiceName)) + if (!maSelTemplates.empty()) { - SfxObjectFactory::SetStandardTemplate(aServiceName,pItem->getPath()); + const TemplateViewItem *pItem = static_cast<const TemplateViewItem*>(*(maSelTemplates.begin())); - createDefaultTemplateMenu(); + OUString aServiceName; + if (lcl_getServiceName(pItem->getPath(),aServiceName)) + { + SfxObjectFactory::SetStandardTemplate(aServiceName,pItem->getPath()); - // clear selection and display view/action toolbars - maView->deselectOverlayItem(pItem->mnId); + createDefaultTemplateMenu(); + } } } |