Kaydet (Commit) a6258368 authored tarafından Patrick Jaap's avatar Patrick Jaap Kaydeden (comit) Miklos Vajna

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>
(cherry picked from commit dac2ff37)
Reviewed-on: https://gerrit.libreoffice.org/73609
(cherry picked from commit 48653935)
Reviewed-on: https://gerrit.libreoffice.org/73641Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.com>
üst d93ebeb0
...@@ -112,6 +112,13 @@ DECLARE_OOXMLIMPORT_TEST(testTdf123460, "tdf123460.docx") ...@@ -112,6 +112,13 @@ DECLARE_OOXMLIMPORT_TEST(testTdf123460, "tdf123460.docx")
CPPUNIT_ASSERT_EQUAL(true, bCaught); 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(); CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -3859,15 +3859,13 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t ...@@ -3859,15 +3859,13 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
OString sTblpYSpec = convertToOOXMLVertOrient( pFrame->GetFrameFormat().GetVertOrient().GetVertOrient() ); OString sTblpYSpec = convertToOOXMLVertOrient( pFrame->GetFrameFormat().GetVertOrient().GetVertOrient() );
sOrientation = convertToOOXMLVertOrientRel( pFrame->GetFrameFormat().GetVertOrient().GetRelationOrient() ); 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() ) if( !sTblpYSpec.isEmpty() )
attrListTablePos->add( FSNS( XML_w, XML_tblpYSpec ), sTblpYSpec.getStr() ); attrListTablePos->add( FSNS( XML_w, XML_tblpYSpec ), sTblpYSpec.getStr() );
sOrientation = convertToOOXMLHoriOrientRel( pFrame->GetFrameFormat().GetHoriOrient().GetRelationOrient() ); 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() ) if( !sTblpXSpec.isEmpty() )
attrListTablePos->add( FSNS( XML_w, XML_tblpXSpec ), sTblpXSpec.getStr() ); 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