[Libreoffice-commits] core.git: sw/source

Nikhil Walvekar nikhil.walvekar at synerzip.com
Thu Jan 2 00:17:39 PST 2014


 sw/source/filter/ww8/docxsdrexport.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 96dcea05d2aedceeb27f9506b4178c664be5f80b
Author: Nikhil Walvekar <nikhil.walvekar at synerzip.com>
Date:   Fri Dec 27 13:49:14 2013 +0530

    fdo#73046 DOCX For anchor tag relativeHeight attribute
    should be always present.
    
    Change-Id: Ib54651878b6343e2ab8bb11a13c11289dd0f72f6
    Reviewed-on: https://gerrit.libreoffice.org/7208
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index a714e55..15a7b0e 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -93,6 +93,9 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rS
         attrList->add(XML_allowOverlap, "1");   // TODO
         if (const SdrObject* pObj = pFrmFmt->FindRealSdrObject())
             attrList->add(XML_relativeHeight, OString::number(pObj->GetOrdNum()));
+        else
+            // relativeHeight is mandatory attribute, if value is not present, we must write default value
+            attrList->add(XML_relativeHeight, "0");
         sax_fastparser::XFastAttributeListRef xAttrList(attrList);
         m_pImpl->m_pSerializer->startElementNS(XML_wp, XML_anchor, xAttrList);
         m_pImpl->m_pSerializer->singleElementNS(XML_wp, XML_simplePos, XML_x, "0", XML_y, "0", FSEND);   // required, unused


More information about the Libreoffice-commits mailing list