diff options
author | Patrick Jaap <patrick.jaap@tu-dresden.de> | 2019-06-03 17:27:03 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-06-07 11:48:35 +0200 |
commit | a62583681703f28bb421da26e343fd0be9f8fe50 (patch) | |
tree | 7ef53b533b10c7a46c2c4e7550053ef53ad7cac7 | |
parent | d93ebeb0f785489050dcbe55c5111d639b4b4c1e (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>
(cherry picked from commit dac2ff37431151d13589801fa4767633b4df72b9)
Reviewed-on: https://gerrit.libreoffice.org/73609
(cherry picked from commit 48653935ec71ab703c3a4c387dc192bae4643356)
Reviewed-on: https://gerrit.libreoffice.org/73641
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf125324.docx | bin | 0 -> 14007 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport13.cxx | 7 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 6 |
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 Binary files differnew file mode 100644 index 000000000000..9382e295f00c --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf125324.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx index ca211e0e7eb9..d9f1978705cf 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx @@ -112,6 +112,13 @@ DECLARE_OOXMLIMPORT_TEST(testTdf123460, "tdf123460.docx") CPPUNIT_ASSERT_EQUAL(true, bCaught); } +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 39f1318f1bce..0438a1e54caf 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -3859,15 +3859,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() ); |