[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - sw/source
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Wed Aug 14 09:53:48 UTC 2019
sw/source/filter/ww8/docxsdrexport.cxx | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
New commits:
commit 0f7eb072fdc2d5b4ee1690597dafc475a611f007
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Tue Aug 13 14:27:05 2019 +0200
Commit: Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Wed Aug 14 11:53:06 2019 +0200
Writer: Saving a damaged file as DOCX crashes
Change-Id: I42de376c69d0b1caa0a03622506d1bf6385ca57e
Reviewed-on: https://gerrit.libreoffice.org/77412
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
(cherry picked from commit de8415ff5a730465258cd5f0ab7c0d989ba5518d)
Reviewed-on: https://gerrit.libreoffice.org/77444
Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index 84943a518cac..9369552b0bfd 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -1422,14 +1422,17 @@ void DocxSdrExport::writeDMLTextFrame(ww8::Frame const* pParentFrame, int nAncho
// We need to init padding to 0, if it's not set.
// In LO the default is 0 and so ins attributes are not set when padding is 0
// but in MSO the default is 254 / 127, so we need to set 0 padding explicitly
- if (!m_pImpl->getBodyPrAttrList()->hasAttribute(XML_lIns))
- m_pImpl->getBodyPrAttrList()->add(XML_lIns, OString::number(0));
- if (!m_pImpl->getBodyPrAttrList()->hasAttribute(XML_tIns))
- m_pImpl->getBodyPrAttrList()->add(XML_tIns, OString::number(0));
- if (!m_pImpl->getBodyPrAttrList()->hasAttribute(XML_rIns))
- m_pImpl->getBodyPrAttrList()->add(XML_rIns, OString::number(0));
- if (!m_pImpl->getBodyPrAttrList()->hasAttribute(XML_bIns))
- m_pImpl->getBodyPrAttrList()->add(XML_bIns, OString::number(0));
+ if (m_pImpl->getBodyPrAttrList())
+ {
+ if (!m_pImpl->getBodyPrAttrList()->hasAttribute(XML_lIns))
+ m_pImpl->getBodyPrAttrList()->add(XML_lIns, OString::number(0));
+ if (!m_pImpl->getBodyPrAttrList()->hasAttribute(XML_tIns))
+ m_pImpl->getBodyPrAttrList()->add(XML_tIns, OString::number(0));
+ if (!m_pImpl->getBodyPrAttrList()->hasAttribute(XML_rIns))
+ m_pImpl->getBodyPrAttrList()->add(XML_rIns, OString::number(0));
+ if (!m_pImpl->getBodyPrAttrList()->hasAttribute(XML_bIns))
+ m_pImpl->getBodyPrAttrList()->add(XML_bIns, OString::number(0));
+ }
sax_fastparser::XFastAttributeListRef xBodyPrAttrList(m_pImpl->getBodyPrAttrList());
m_pImpl->setBodyPrAttrList(nullptr);
More information about the Libreoffice-commits
mailing list