sw/qa/extras/ooxmlexport/data/tdf125324.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport13.cxx | 7 +++++++ sw/source/filter/ww8/docxattributeoutput.cxx | 6 ++---- 3 files changed, 9 insertions(+), 4 deletions(-)
New commits: commit 48653935ec71ab703c3a4c387dc192bae4643356 Author: Patrick Jaap <patrick.j...@tu-dresden.de> AuthorDate: Mon Jun 3 17:27:03 2019 +0200 Commit: Patrick Jaap <patrick.j...@tu-dresden.de> CommitDate: Fri Jun 7 08:58:30 2019 +0200 tdf#125324 table export: do not ignore default values It seems like Writer default values for table positioning differ from OOXML spec. if nothing is given. So write them anyway during export. Change-Id: If5bf77de71b457a826be8f1559212e7d06c5237c Reviewed-on: https://gerrit.libreoffice.org/73402 Tested-by: Jenkins Reviewed-by: Patrick Jaap <patrick.j...@tu-dresden.de> (cherry picked from commit dac2ff37431151d13589801fa4767633b4df72b9) Reviewed-on: https://gerrit.libreoffice.org/73609 diff --git a/sw/qa/extras/ooxmlexport/data/tdf125324.docx b/sw/qa/extras/ooxmlexport/data/tdf125324.docx new file mode 100644 index 000000000000..9382e295f00c Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf125324.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx index 804d25b9612e..e392644f0de3 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx @@ -348,6 +348,13 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf125657, "tdf125657.docx") checkAttrIsInt("b"); } +DECLARE_OOXMLEXPORT_TEST(testTdf125324, "tdf125324.docx") +{ + discardDumpedLayout(); + xmlDocPtr pXmlDoc = parseLayoutDump(); + assertXPath(pXmlDoc, "/root/page/body/txt[2]/anchored/fly/tab/infos/bounds", "top", "4193"); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 5f0b20865008..a41f5dc96dce 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -3799,15 +3799,13 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t OString sTblpYSpec = convertToOOXMLVertOrient( pFrame->GetFrameFormat().GetVertOrient().GetVertOrient() ); sOrientation = convertToOOXMLVertOrientRel( pFrame->GetFrameFormat().GetVertOrient().GetRelationOrient() ); - if(sOrientation != "page") // do not write default - attrListTablePos->add( FSNS( XML_w, XML_vertAnchor ), sOrientation.getStr() ); + attrListTablePos->add( FSNS( XML_w, XML_vertAnchor ), sOrientation.getStr() ); if( !sTblpYSpec.isEmpty() ) attrListTablePos->add( FSNS( XML_w, XML_tblpYSpec ), sTblpYSpec.getStr() ); sOrientation = convertToOOXMLHoriOrientRel( pFrame->GetFrameFormat().GetHoriOrient().GetRelationOrient() ); - if(sOrientation != "page") // do not wirte default - attrListTablePos->add( FSNS( XML_w, XML_horzAnchor ), sOrientation.getStr() ); + attrListTablePos->add( FSNS( XML_w, XML_horzAnchor ), sOrientation.getStr() ); if( !sTblpXSpec.isEmpty() ) attrListTablePos->add( FSNS( XML_w, XML_tblpXSpec ), sTblpXSpec.getStr() ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits