From e0d373bf5328bfe84079f094dd605bb8f4337330 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 6 Oct 2016 15:50:13 +0200 Subject: tdf#101813 sw,sfx2: enable inserting master document as section Traditionally only ordinary com.sun.star.text.TextDocument could be inserted as a section but then commit 3da8f3680556e0163f660a0a159930337c8c32ff unintentionally enabled inserting everything, including master documents (com.sun.star.text.GlobalDocument). I'm really not sure if this should be allowed or not but apparently somebody finds it useful so here we add some crude hacks to enable it (to be reverted in case it causes trouble). (regression? from 805fd1ca343d6295b8114a24cc29bdac332f266d) Change-Id: I439b2516fcbe54977ff04e487a920acd38c27152 --- sw/source/ui/dialog/uiregionsw.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source/ui') diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 51f1c74608b4..496654aaeb76 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -1316,7 +1316,7 @@ IMPL_LINK( SwEditRegionDlg, DlgClosedHdl, sfx2::FileDialogHelper *, _pFileDlg, v OUString sFileName, sFilterName, sPassword; if ( _pFileDlg->GetError() == ERRCODE_NONE ) { - std::unique_ptr pMedium(m_pDocInserter->CreateMedium()); + std::unique_ptr pMedium(m_pDocInserter->CreateMedium("sglobal")); if ( pMedium ) { sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE ); @@ -1783,7 +1783,7 @@ IMPL_LINK( SwInsertSectionTabPage, DlgClosedHdl, sfx2::FileDialogHelper *, _pFil { if ( _pFileDlg->GetError() == ERRCODE_NONE ) { - std::unique_ptr pMedium(m_pDocInserter->CreateMedium()); + std::unique_ptr pMedium(m_pDocInserter->CreateMedium("sglobal")); if ( pMedium ) { m_sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE ); -- cgit v1.2.3