summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Jaap <patrick.jaap@tu-dresden.de>2019-06-03 17:27:03 +0200
committerPatrick Jaap <patrick.jaap@tu-dresden.de>2019-06-06 17:19:51 +0200
commitdac2ff37431151d13589801fa4767633b4df72b9 (patch)
tree300707c3af8cde26cac8fc48c8e6d73b9b333ce2
parent9118d4d21bcbae6a9f2ca373b528939a60992903 (diff)
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@tu-dresden.de>
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf125324.docxbin0 -> 14007 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport13.cxx7
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx6
3 files changed, 9 insertions, 4 deletions
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
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf125324.docx
Binary files 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() );