Kaydet (Commit) 434a1db8 authored tarafından Michael Stahl's avatar Michael Stahl Kaydeden (comit) Andras Timar

tdf#118578 sw: allow inserting only TextDocument

There are 3 sw document services: TextDocument, WebDocument and
GlobalDocument.

The current logic in SwView::InsertDoc() and
SwView_Impl::StartDocumentInserter() is to request a filter with the
same document service as the existing target document, so you can insert
only a GlobalDocument into a GlobalDocument, which doesn't make much
sense.

As it happens there are 2 different HTML import filters: "HTML" and
"HTML (StarWriter)", the latter using the TextDocument service.

So just hard-code to allow TextDocument regardless of the target
document.

(regression from 805fd1ca)

Change-Id: I7dc0dd4789fba8b61625ca8eae74a864aea383b0
Reviewed-on: https://gerrit.libreoffice.org/57193
Tested-by: Jenkins
Reviewed-by: 's avatarMichael Stahl <Michael.Stahl@cib.de>
(cherry picked from commit 572b298e)
Reviewed-on: https://gerrit.libreoffice.org/57223Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit 3bd5ff84)
üst ea2133dd
......@@ -2099,7 +2099,8 @@ long SwView::InsertDoc( sal_uInt16 nSlotId, const OUString& rFileName, const OUS
else
{
m_pViewImpl->StartDocumentInserter(
pDocSh->GetFactory().GetFactoryName(),
// tdf#118578 allow inserting any Writer document except GlobalDoc
SwDocShell::Factory().GetFactoryName(),
LINK( this, SwView, DialogClosedHdl ),
nSlotId
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment