summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorRafael Dominguez <venccsralph@gmail.com>2012-08-14 17:05:39 -0430
committerRafael Dominguez <venccsralph@gmail.com>2012-08-15 07:18:24 -0430
commit1e8ad45394fed750f893a3de0f83ff75fd8aa14e (patch)
treea321f9f94ea96066fefcd377247c9c37e7e0e5a3 /sfx2
parent7f2dd9ce821923f4f1bb3fe5034c902cc76c372a (diff)
Hide commands that are only for one selected template.
Change-Id: Ib785e13402ec56bdc30a554c4fef6c81803db90f
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/templatedlg.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 04bbddcc623d..403c767b782a 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -493,7 +493,11 @@ IMPL_LINK(SfxTemplateManagerDlg, TVTemplateStateHdl, const ThumbnailViewItem*, p
mpTemplateBar->Show();
}
else
+ {
+ mpTemplateBar->HideItem(TBI_TEMPLATE_EDIT);
+ mpTemplateBar->HideItem(TBI_TEMPLATE_PROPERTIES);
mpTemplateBar->HideItem(TBI_TEMPLATE_DEFAULT);
+ }
maSelTemplates.insert(pItem);
}
@@ -510,7 +514,11 @@ IMPL_LINK(SfxTemplateManagerDlg, TVTemplateStateHdl, const ThumbnailViewItem*, p
mpActionBar->Show();
}
else if (maSelTemplates.size() == 1)
+ {
+ mpTemplateBar->ShowItem(TBI_TEMPLATE_EDIT);
+ mpTemplateBar->ShowItem(TBI_TEMPLATE_PROPERTIES);
mpTemplateBar->ShowItem(TBI_TEMPLATE_DEFAULT);
+ }
}
}