[Libreoffice-commits] core.git: sw/qa
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Feb 13 15:47:46 UTC 2019
sw/qa/extras/layout/data/btlr-cell.odt |binary
sw/qa/extras/layout/layout.cxx | 19 +++++++++++++++++++
2 files changed, 19 insertions(+)
New commits:
commit bef3818dbedba467a257e2573e298d98062be37b
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Wed Feb 13 15:19:56 2019 +0100
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Feb 13 16:47:20 2019 +0100
sw btlr writing mode: add a layout-level test
Fails with commit e8b9572bf89f55463f2c879a401ed62efc165d95 (sw btlr
writing mode: implement initial layout, 2019-02-12) reverted.
Change-Id: Ic68ef53a8b5bf86678d7e67c9960501f23341268
Reviewed-on: https://gerrit.libreoffice.org/67776
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
Tested-by: Jenkins
diff --git a/sw/qa/extras/layout/data/btlr-cell.odt b/sw/qa/extras/layout/data/btlr-cell.odt
new file mode 100644
index 000000000000..c010fa9f51b6
Binary files /dev/null and b/sw/qa/extras/layout/data/btlr-cell.odt differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index f02d8a3fbbbc..77c826dba30d 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -67,6 +67,7 @@ public:
void testTdf122878();
void testTdf115094();
void testTdf122607();
+ void testBtlrCell();
CPPUNIT_TEST_SUITE(SwLayoutWriter);
CPPUNIT_TEST(testRedlineFootnotes);
@@ -107,6 +108,7 @@ public:
CPPUNIT_TEST(testTdf122878);
CPPUNIT_TEST(testTdf115094);
CPPUNIT_TEST(testTdf122607);
+ CPPUNIT_TEST(testBtlrCell);
CPPUNIT_TEST_SUITE_END();
private:
@@ -2787,6 +2789,23 @@ void SwLayoutWriter::testTdf122607()
"Portion", "Fax:");
}
+void SwLayoutWriter::testBtlrCell()
+{
+ SwDoc* pDoc = createDoc("btlr-cell.odt");
+ SwDocShell* pShell = pDoc->GetDocShell();
+
+ // Dump the rendering of the first page as an XML file.
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+ MetafileXmlDump dumper;
+ xmlDocPtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ // Without the accompanying fix in place, this test would have failed, as
+ // the orientation was 0 (layout did not take btlr direction request from
+ // doc model).
+ assertXPath(pXmlDoc, "//font[1]", "orientation", "900");
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SwLayoutWriter);
CPPUNIT_PLUGIN_IMPLEMENT();
More information about the Libreoffice-commits
mailing list