[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sw/source
Michael Stahl
Michael.Stahl at cib.de
Tue Jul 10 11:03:56 UTC 2018
sw/source/uibase/uiview/view2.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 41ffdacaaadce2c1bbbff216c86359e9813efb21
Author: Michael Stahl <Michael.Stahl at cib.de>
Date: Mon Jul 9 17:57:13 2018 +0200
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 805fd1ca343d6295b8114a24cc29bdac332f266d)
Change-Id: I7dc0dd4789fba8b61625ca8eae74a864aea383b0
Reviewed-on: https://gerrit.libreoffice.org/57193
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
(cherry picked from commit 572b298e636612416b8223ff6e6f2d26ab51a243)
Reviewed-on: https://gerrit.libreoffice.org/57222
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 87e42fcb7131..4a76ca612eef 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -2108,7 +2108,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
);
More information about the Libreoffice-commits
mailing list