[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sw/qa sw/source

Patrick Jaap (via logerrit) logerrit at kemper.freedesktop.org
Fri Jun 7 09:49:10 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 a62583681703f28bb421da26e343fd0be9f8fe50
Author:     Patrick Jaap <patrick.jaap at tu-dresden.de>
AuthorDate: Mon Jun 3 17:27:03 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Jun 7 11:48:35 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>
    (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 at collabora.com>

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 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() );


More information about the Libreoffice-commits mailing list