summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-03-26 16:27:17 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-03-28 22:07:06 +0100
commit3e078e17ee2144fb976a7e6b9227152113cea0d4 (patch)
tree01faab7d3c82c5b027b42a6722700736b249a775 /sd
parent1e2868296730d3548574f61a3c6e323aa5c0598a (diff)
weld SfxTemplateManagerDlg
like expert configuration change the gear menu not to display a down indicator and use CommandEvent to distinguish mouse/non-mouse context menus Change-Id: I64bb660a9c7dacb5b90b240d9d76d29324c5fd9f Reviewed-on: https://gerrit.libreoffice.org/69893 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/app/sdmod1.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 42bde350851f..f60e2ee4d0b8 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -475,15 +475,16 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest const & rReq )
if(bStartWithTemplate)
{
//Launch TemplateSelectionDialog
- ScopedVclPtrInstance< SfxTemplateSelectionDlg > aTemplDlg( SfxGetpApp()->GetTopWindow());
- aTemplDlg->Execute();
+ vcl::Window* pTopLevel = SfxGetpApp()->GetTopWindow();
+ SfxTemplateSelectionDlg aTemplDlg(pTopLevel ? pTopLevel->GetFrameWeld() : nullptr);
+ aTemplDlg.run();
//check to disable the dialog
- pOpt->SetStartWithTemplate( aTemplDlg->IsStartWithTemplate() );
+ pOpt->SetStartWithTemplate( aTemplDlg.IsStartWithTemplate() );
//pFrame is loaded with the desired template
- if(!aTemplDlg->getTemplatePath().isEmpty())
- pFrame = CreateFromTemplate(aTemplDlg->getTemplatePath(), xTargetFrame);
+ if (!aTemplDlg.getTemplatePath().isEmpty())
+ pFrame = CreateFromTemplate(aTemplDlg.getTemplatePath(), xTargetFrame);
}
}