Kaydet (Commit) dac2ff37 authored tarafından Patrick Jaap's avatar Patrick Jaap

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: 's avatarPatrick Jaap <patrick.jaap@tu-dresden.de>
üst 9118d4d2
......@@ -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: */
......@@ -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() );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment