tdf#157363 remove pre text when pasting simple HTML
appends to https://gerrit.libreoffice.org/c/core/+/158659
handling of pre text didn't make it into sd code
Change-Id: Ie396b487f451e163b9e59b585c988f9b1b5b669e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159361
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index 3f04c25..e92a0dd 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -29,6 +29,7 @@
#include <svx/xlnclit.hxx>
#include <svx/svdpagv.hxx>
#include <sfx2/docfile.hxx>
+#include <sfx2/mieclip.hxx>
#include <svx/svdoole2.hxx>
#include <svx/svdograf.hxx>
#include <svx/svdundo.hxx>
@@ -1502,6 +1503,7 @@
xStm->Seek(0);
OutlinerView* pOLV = GetTextEditOutlinerView();
+ MSE40HTMLClipFormatObj aMSE40HTMLClipFormatObj;
if (pOLV)
{
@@ -1511,7 +1513,8 @@
if (aRect.Contains(aPos) || (!bDrag && IsTextEdit()))
{
// mba: clipboard always must contain absolute URLs (could be from alien source)
- pOLV->Read(*xStm, EETextFormat::Html, mpDocSh->GetHeaderAttributes());
+ SvStream* pHtmlStream = aMSE40HTMLClipFormatObj.IsValid(*xStm);
+ pOLV->Read(*pHtmlStream, EETextFormat::Html, mpDocSh->GetHeaderAttributes());
bReturn = true;
}
}