[Libreoffice-commits] .: Branch 'libreoffice-4-0' - sfx2/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Jan 10 01:44:34 PST 2013
sfx2/source/doc/templatedlg.cxx | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
New commits:
commit 62dc5dfcf2af93a35beb96bebe63b7e8ac652fb5
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date: Wed Jan 9 11:58:39 2013 +0100
Template Manager: don't deselect item after setting default template
Change-Id: I860fb2c91d6843a1d5345ab2cf9270473f73f5bc
Reviewed-on: https://gerrit.libreoffice.org/1611
Reviewed-by: Miklos Vajna <vmiklos at suse.cz>
Tested-by: Miklos Vajna <vmiklos at suse.cz>
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 282372d..bff2dc1 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -1069,19 +1069,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();
+ }
}
}
More information about the Libreoffice-commits
mailing list