diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2017-12-27 18:06:35 +0100 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2017-12-27 20:21:47 +0100 |
commit | 89bd93fc1a5277f4e7ffcea74d4087b63736ae97 (patch) | |
tree | b3a67e0ad739c7fa04d06286715085248f145331 /sw/source | |
parent | abec3df5d8412231ccad7fefd9dd2b222269ed22 (diff) |
tdf#113399: DOT IMPORT, DOCX EXPORT: Page number not shown correctly
We need to export 0 padding explicitely to DOCX file.
Change-Id: I7126cfd1dbf4ebd1fb5e09c3642e0da159488258
Reviewed-on: https://gerrit.libreoffice.org/47090
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/filter/ww8/docxsdrexport.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index be5df4433546..29b32272f66d 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -1602,6 +1602,19 @@ void DocxSdrExport::writeDMLTextFrame(ww8::Frame const* pParentFrame, int nAncho pFS->endElementNS(XML_w, XML_txbxContent); pFS->endElementNS(XML_wps, XML_txbx); } + + // 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 explicitely + 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; if (!bTextBoxOnly) |