sw/qa/extras/ooxmlexport/data/tdf112287.docx      |binary
 sw/qa/extras/ooxmlexport/ooxmlexport5.cxx         |   11 +++++++++++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |    2 +-
 3 files changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 9615e7b2d91eb1754caf85055753505ea6db201b
Author:     Tibor Nagy <nagy.tib...@nisz.hu>
AuthorDate: Wed May 6 11:15:35 2020 +0200
Commit:     Gabor Kelemen <kelemen.gab...@nisz.hu>
CommitDate: Tue Jul 14 00:14:57 2020 +0200

    tdf#112287 DOCX frame import: fix default vAnchor
    
    Vertical frame alignment was calculated from above
    margin instead of the bottom one, resulting bad
    positions, when vAnchor wasn't defined.
    
    Co-author: Attila Bakos (NISZ)
    
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93556
    Tested-by: László Németh <nem...@numbertext.org>
    Reviewed-by: László Németh <nem...@numbertext.org>
    (cherry picked from commit f5636817e7677a3081263df9004940a7d5ac54af)
    
    Change-Id: I81bcf53ec826d5dcc9790c661d784b507d9ababc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98644
    Tested-by: Gabor Kelemen <kelemen.gab...@nisz.hu>
    Reviewed-by: Gabor Kelemen <kelemen.gab...@nisz.hu>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf112287.docx 
b/sw/qa/extras/ooxmlexport/data/tdf112287.docx
new file mode 100644
index 000000000000..3464e28985da
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf112287.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index 87795d6ba6c6..bfdab8a541aa 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -1225,6 +1225,17 @@ DECLARE_OOXMLEXPORT_TEST(testNonBMPChar, 
"nonbmpchar.docx")
     CPPUNIT_ASSERT_EQUAL(aExpected, xTextRange1->getString());
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf112287, "tdf112287.docx")
+{
+    // tdf#131775: Check if correct spaceing.
+
+    xmlDocPtr pXmlDocument = parseExport("word/document.xml");
+    if (!pXmlDocument)
+        return;
+
+    assertXPath(pXmlDocument, 
"/w:document/w:body/w:p[2]/w:pPr/w:framePr","vAnchor","margin");
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 0777188dedba..8cdf3e741f27 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1151,7 +1151,7 @@ void DomainMapper_Impl::CheckUnregisteredFrameConversion( 
)
             
aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_VERT_ORIENT_RELATION),
 sal_Int16(
                 rAppendContext.pLastParagraphProperties->GetvAnchor() >= 0 ?
                     rAppendContext.pLastParagraphProperties->GetvAnchor() :
-                    pStyleProperties->GetvAnchor() >= 0 ? 
pStyleProperties->GetvAnchor() : text::RelOrientation::FRAME )));
+                    pStyleProperties->GetvAnchor() >= 0 ? 
pStyleProperties->GetvAnchor() : text::RelOrientation::PAGE_PRINT_AREA )));
 
             
aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_SURROUND),
                 rAppendContext.pLastParagraphProperties->GetWrap() != 
text::WrapTextMode::WrapTextMode_MAKE_FIXED_SIZE
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to