diff options
author | Akshay Deep <akshaydeepiitr@gmail.com> | 2016-06-09 08:07:27 +0530 |
---|---|---|
committer | Akshay Deep <akshaydeepiitr@gmail.com> | 2016-06-09 06:22:19 +0000 |
commit | 4599858e21925f2f5febed8eebf4f5bd0fa97163 (patch) | |
tree | f12ef73b60f35de73b48e103d45faa8321bf05a0 | |
parent | 91640c080c7a0643cce95f605ca7774da4c4dd77 (diff) |
Hide Default Template icon when resetting default using toolbox menu
Change-Id: I7a3e7c9413edbdfb74e0415dd7e203d65201eb08
Reviewed-on: https://gerrit.libreoffice.org/26081
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Akshay Deep <akshaydeepiitr@gmail.com>
-rw-r--r-- | sfx2/source/control/templateabstractview.cxx | 1 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.cxx | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sfx2/source/control/templateabstractview.cxx b/sfx2/source/control/templateabstractview.cxx index 5d95c378fc4c..e19621d200ef 100644 --- a/sfx2/source/control/templateabstractview.cxx +++ b/sfx2/source/control/templateabstractview.cxx @@ -274,6 +274,7 @@ void TemplateAbstractView::RemoveDefaultTemplateIcon(const OUString& rPath) if(pViewItem->getPath().match(rPath)) { pViewItem->showDefaultIcon(false); + Invalidate(); return; } } diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 41a87402527f..9a6335aeaec8 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -628,6 +628,11 @@ IMPL_LINK_TYPED(SfxTemplateManagerDlg, DefaultTemplateMenuSelectHdl, Menu*, pMen sal_uInt16 nId = pMenu->GetCurItemId(); OUString aServiceName = SfxObjectShell::GetServiceNameFromFactory( mpTemplateDefaultMenu->GetItemCommand(nId)); + + OUString sPrevDefault = SfxObjectFactory::GetStandardTemplate( aServiceName ); + if(!sPrevDefault.isEmpty()) + mpLocalView->RemoveDefaultTemplateIcon(sPrevDefault); + SfxObjectFactory::SetStandardTemplate( aServiceName, OUString() ); createDefaultTemplateMenu(); |