summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-10-06 15:50:13 +0200
committerMichael Stahl <mstahl@redhat.com>2016-10-06 18:07:50 +0200
commite0d373bf5328bfe84079f094dd605bb8f4337330 (patch)
treef8cb0a10bebf5d4268c9b1837df61c1753392eb2 /sw/source/ui
parentc13a19d462ef595201447272e357a65f5c005521 (diff)
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
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx4
1 files changed, 2 insertions, 2 deletions
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<SfxMedium> pMedium(m_pDocInserter->CreateMedium());
+ std::unique_ptr<SfxMedium> 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<SfxMedium> pMedium(m_pDocInserter->CreateMedium());
+ std::unique_ptr<SfxMedium> pMedium(m_pDocInserter->CreateMedium("sglobal"));
if ( pMedium )
{
m_sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE );