[Libreoffice-commits] core.git: sw/qa sw/source
Patrick Jaap (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jun 6 15:21:01 UTC 2019
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 dac2ff37431151d13589801fa4767633b4df72b9
Author: Patrick Jaap <patrick.jaap at tu-dresden.de>
AuthorDate: Mon Jun 3 17:27:03 2019 +0200
Commit: Patrick Jaap <patrick.jaap at tu-dresden.de>
CommitDate: Thu Jun 6 17:19:51 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.jaap at tu-dresden.de>
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 dfd316ee1626..f2c30c2eb654 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() );
More information about the Libreoffice-commits
mailing list