diff options
author | Khaled Hosny <khaled@libreoffice.org> | 2023-06-14 13:38:20 +0300 |
---|---|---|
committer | خالد حسني <khaled@libreoffice.org> | 2023-06-14 16:05:51 +0200 |
commit | adc69b98197637b738f18d9a51d248e305247126 (patch) | |
tree | 0081b13f5c0a64c5a5d42a4fbd2b2e179a64f0fe /sw/qa/core/text/text.cxx | |
parent | 91b87ab5ed1d0c3eacf9bf295999bf1786beac34 (diff) |
tdf#139863: Add test
Change-Id: Ia3cb97203b71204688e8911668a274ac491af2bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153045
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
Diffstat (limited to 'sw/qa/core/text/text.cxx')
-rw-r--r-- | sw/qa/core/text/text.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx index 4ba02f7b3135..c961562b3c9e 100644 --- a/sw/qa/core/text/text.cxx +++ b/sw/qa/core/text/text.cxx @@ -1355,6 +1355,22 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf89288) "PortionType::Kern"); } +CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf139863) +{ + // Given a document with 2 paragraphs of mixed Complex scripts: + createSwDoc("tdf139863.fodt"); + + // When laying out that document: + xmlDocUniquePtr pXmlDoc = parseLayoutDump(); + + // Then make sure the text is not split into multiple portions. + // Without the fix we don’t even reach here, as the old code resulted in a + // lone surrogate which can’t be converted to UTF-8 for the layout dump and + // we get an assert in OString::toUtf8(). + assertXPath(pXmlDoc, "//body/txt[1]/SwParaPortion/SwLineLayout/child::*", 1); + assertXPath(pXmlDoc, "//body/txt[2]/SwParaPortion/SwLineLayout/child::*", 1); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |