[Libreoffice-commits] core.git: sw/source
Caolán McNamara
caolanm at redhat.com
Mon Dec 18 20:33:30 UTC 2017
sw/source/filter/html/htmlgrin.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit ff2f33a9b9b2c4ca797193696d76c28344cee9f0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Dec 18 12:32:49 2017 +0000
ofz: reject graphics with bad anchors
Change-Id: I9fc514f50843408981b53bdfb3131895b95e15eb
Reviewed-on: https://gerrit.libreoffice.org/46712
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 53842661bd95..53ec083588ce 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -715,6 +715,10 @@ IMAGE_SETEVENT:
aFrameSize.SetHeightPercent( nPrcHeight );
aFrameSet.Put( aFrameSize );
+ const SwNodeType eNodeType = m_pPam->GetNode().GetNodeType();
+ if (eNodeType != SwNodeType::Text && eNodeType != SwNodeType::Table)
+ return;
+
// passing empty sGrfNm here, means we don't want the graphic to be linked
SwFrameFormat *const pFlyFormat =
m_xDoc->getIDocumentContentOperations().InsertGraphic(
More information about the Libreoffice-commits
mailing list