summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sfx2/source/doc/templatedlg.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 8456d4cd7e99..afeb5a0b18d2 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -10,6 +10,7 @@
#include <sfx2/templatedlg.hxx>
#include <sfx2/inputdlg.hxx>
+#include <sfx2/module.hxx>
#include <templatesearchview.hxx>
#include <templatesearchviewitem.hxx>
@@ -215,7 +216,11 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(weld::Window *pParent)
mxMoveButton->connect_clicked(LINK(this, SfxTemplateManagerDlg, MoveClickHdl));
mxExportButton->connect_clicked(LINK(this, SfxTemplateManagerDlg, ExportClickHdl));
mxImportButton->connect_clicked(LINK(this, SfxTemplateManagerDlg, ImportClickHdl));
- mxMoreTemplatesButton->connect_clicked(LINK(this, SfxTemplateManagerDlg, LinkClickHdl));
+ // FIXME: rather than disabling make dispatchCommand(".uno:AdditionsDialog") work in start center
+ if ( !SfxModule::GetActiveModule() )
+ mxMoreTemplatesButton->set_sensitive(false);
+ else
+ mxMoreTemplatesButton->connect_clicked(LINK(this, SfxTemplateManagerDlg, LinkClickHdl));
mxListViewButton->connect_clicked(LINK(this, SfxTemplateManagerDlg, ListViewHdl));
mxThumbnailViewButton->connect_clicked(LINK(this, SfxTemplateManagerDlg, ThumbnailViewHdl));