[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sw/source
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Tue Aug 13 10:58:56 UTC 2019
sw/source/filter/ww8/docxsdrexport.cxx | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
New commits:
commit 026d2fb2b79837ee8d31efd90cbe3b735445f956
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Tue Aug 13 10:29:40 2019 +0200
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Tue Aug 13 12:58:19 2019 +0200
bccu#4204: Writer: Saving this damaged file as DOCX crashes
Change-Id: I526864d6a425220d342bcf0b5a195f420cbf1563
Reviewed-on: https://gerrit.libreoffice.org/77382
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index 69c0e5f3e578..6ff1bdb54b8c 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -1365,14 +1365,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->m_pBodyPrAttrList->hasAttribute(XML_lIns))
- m_pImpl->m_pBodyPrAttrList->add(XML_lIns, OString::number(0));
- if (!m_pImpl->m_pBodyPrAttrList->hasAttribute(XML_tIns))
- m_pImpl->m_pBodyPrAttrList->add(XML_tIns, OString::number(0));
- if (!m_pImpl->m_pBodyPrAttrList->hasAttribute(XML_rIns))
- m_pImpl->m_pBodyPrAttrList->add(XML_rIns, OString::number(0));
- if (!m_pImpl->m_pBodyPrAttrList->hasAttribute(XML_bIns))
- m_pImpl->m_pBodyPrAttrList->add(XML_bIns, OString::number(0));
+ if(m_pImpl->m_pBodyPrAttrList)
+ {
+ if (!m_pImpl->m_pBodyPrAttrList->hasAttribute(XML_lIns))
+ m_pImpl->m_pBodyPrAttrList->add(XML_lIns, OString::number(0));
+ if (!m_pImpl->m_pBodyPrAttrList->hasAttribute(XML_tIns))
+ m_pImpl->m_pBodyPrAttrList->add(XML_tIns, OString::number(0));
+ if (!m_pImpl->m_pBodyPrAttrList->hasAttribute(XML_rIns))
+ m_pImpl->m_pBodyPrAttrList->add(XML_rIns, OString::number(0));
+ if (!m_pImpl->m_pBodyPrAttrList->hasAttribute(XML_bIns))
+ m_pImpl->m_pBodyPrAttrList->add(XML_bIns, OString::number(0));
+ }
sax_fastparser::XFastAttributeListRef xBodyPrAttrList(m_pImpl->m_pBodyPrAttrList);
m_pImpl->m_pBodyPrAttrList = nullptr;
More information about the Libreoffice-commits
mailing list