diff options
author | Mark Hung <marklh9@gmail.com> | 2018-04-24 21:26:49 +0800 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-04-26 17:16:53 +0200 |
commit | 4fb081704811b66194ea11e528ad792957b7ccfd (patch) | |
tree | 51d74a4fde41ad0887b124d02400d1b71479c65d /writerperfect/qa | |
parent | tdf#115600 Display messages in FindBar for Section navigation (diff) | |
download | core-4fb081704811b66194ea11e528ad792957b7ccfd.tar.gz core-4fb081704811b66194ea11e528ad792957b7ccfd.zip |
tdf#116822 export ruby text and base text to epub.
Backport aa254c9e6f2d1ecfa2512111746a77c05ba9717f from libepubgen,
implement XMLRubyContext, XMLRubyTextContext, XMLRubyBaseContext.
Character formats of ruby text, ruby alignment, and ruby position
are not implemented yet.
Change-Id: I6c3708e6bc8e9e36a68171a037fd393f45d8d34f
Reviewed-on: https://gerrit.libreoffice.org/53408
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'writerperfect/qa')
-rw-r--r-- | writerperfect/qa/unit/EPUBExportTest.cxx | 10 | ||||
-rw-r--r-- | writerperfect/qa/unit/data/writer/epubexport/simple-ruby.odt | bin | 0 -> 8307 bytes |
2 files changed, 10 insertions, 0 deletions
diff --git a/writerperfect/qa/unit/EPUBExportTest.cxx b/writerperfect/qa/unit/EPUBExportTest.cxx index ce8f2964b0b7..90e97ba77799 100644 --- a/writerperfect/qa/unit/EPUBExportTest.cxx +++ b/writerperfect/qa/unit/EPUBExportTest.cxx @@ -103,6 +103,7 @@ public: void testTdf115623SingleWritingMode(); void testTdf115623SplitByChapter(); void testTdf115623ManyPageSpans(); + void testSimpleRuby(); CPPUNIT_TEST_SUITE(EPUBExportTest); CPPUNIT_TEST(testOutlineLevel); @@ -152,6 +153,7 @@ public: CPPUNIT_TEST(testTdf115623SingleWritingMode); CPPUNIT_TEST(testTdf115623SplitByChapter); CPPUNIT_TEST(testTdf115623ManyPageSpans); + CPPUNIT_TEST(testSimpleRuby); CPPUNIT_TEST_SUITE_END(); }; @@ -967,6 +969,14 @@ void EPUBExportTest::testTdf115623ManyPageSpans() } } +void EPUBExportTest::testSimpleRuby() +{ + createDoc("simple-ruby.odt", {}); + mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml"); + assertXPathContent(mpXmlDoc, "//xhtml:body/xhtml:p/xhtml:ruby/xhtml:span", "base text"); + assertXPathContent(mpXmlDoc, "//xhtml:body/xhtml:p/xhtml:ruby/xhtml:rt", "ruby text"); +} + CPPUNIT_TEST_SUITE_REGISTRATION(EPUBExportTest); } diff --git a/writerperfect/qa/unit/data/writer/epubexport/simple-ruby.odt b/writerperfect/qa/unit/data/writer/epubexport/simple-ruby.odt Binary files differnew file mode 100644 index 000000000000..160dd00ee1e7 --- /dev/null +++ b/writerperfect/qa/unit/data/writer/epubexport/simple-ruby.odt |