sw/qa/extras/ooxmlexport/ooxmlexport3.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit e538c63c0d55b581332f4146dab26e26eb611dce
Author:     Justin Luth <justin.l...@collabora.com>
AuthorDate: Thu Aug 27 16:36:19 2020 +0300
Commit:     Justin Luth <justin_l...@sil.org>
CommitDate: Thu Aug 27 20:54:39 2020 +0200

    related tdf#132149 ww8 export: unit test to prevent bad fix
    
    The unit test I am using for this patch writes out landscape
    attribute, but provides portrait width/height values.
    
    I was tempted to just "fix" the values on export, but this
    existing document shows that w/h trump p/l in LO
    (and Word does the same). So that should also round-trip,
    and this test will ensure that keeps happening.
    
    Change-Id: Ib55cb799462abd1039ce7c1c935b3f66761a5dc2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101479
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <justin_l...@sil.org>

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
index 504be6950cd0..2596c8d5d5e4 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
@@ -322,6 +322,12 @@ DECLARE_OOXMLEXPORT_TEST(testCalendar3, "calendar3.docx")
     uno::Reference<text::XTextRange> xCell2(xTable->getCellByName("A1"), 
uno::UNO_QUERY);
     CPPUNIT_ASSERT_EQUAL(sal_Int32(0x2E74B5), 
getProperty<sal_Int32>(getRun(getParagraphOfText(1, xCell2->getText()), 1), 
"CharColor"));
     CPPUNIT_ASSERT_EQUAL(20.f, getProperty<float>(getRun(getParagraphOfText(1, 
xCell2->getText()),1), "CharHeight"));
+
+    // tdf#132149 Despite specifying portrait, the page size's specified width 
is greater than its height.
+    // Both Word and LO display it as landscape, so ensure that it round-trips 
with landscape dimentions.
+    uno::Reference<beans::XPropertySet> 
xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+    CPPUNIT_ASSERT_EQUAL_MESSAGE("Page Width (mm) ", sal_Int32(148), 
getProperty<sal_Int32>(xPageStyle, "Width") / 100);
+    CPPUNIT_ASSERT_EQUAL_MESSAGE("Page Height (mm)", sal_Int32(105), 
getProperty<sal_Int32>(xPageStyle, "Height") / 100);
 }
 
 DECLARE_OOXMLEXPORT_TEST(testCalendar4, "calendar4.docx")
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to