download.lst                        |    4 ++--
 sw/qa/extras/uiwriter/uiwriter4.cxx |   35 +++++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+), 2 deletions(-)

New commits:
commit 09dfe214a30f58ddcd7a857db8f5eee68d4cef2a
Author:     László Németh <[email protected]>
AuthorDate: Mon Apr 4 10:26:50 2022 +0200
Commit:     László Németh <[email protected]>
CommitDate: Mon Apr 4 19:06:44 2022 +0200

    tdf#147546 bump libnumbertext to 1.0.10
    
    fixing only regression of hu_Hung
    transliteration of punctuation marks.
    Add unit test for the fix.
    
    Regression from commit 98fd4fcdc61202846e0957cb6aaed9e4a2d2c520
    "tdf#136368 bump to libnumbertext 1.0.8".
    
    (cherry picked from commit d925d1ca9e03863650dd3e450331598624f21724)
    Change-Id: Ie92cad96f48f0a7f735bc9cde93a0fded4681800
    
    Conflicts:
            sw/qa/extras/uiwriter/uiwriter6.cxx
    
    Change-Id: I7b49467943c97582dba0e5aca20c02a92c43deff
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132492
    Tested-by: László Németh <[email protected]>
    Reviewed-by: László Németh <[email protected]>

diff --git a/download.lst b/download.lst
index 081ea2ad1e5f..f3cdbb1dafa1 100644
--- a/download.lst
+++ b/download.lst
@@ -160,8 +160,8 @@ export LIBGPGERROR_SHA256SUM := 
a9ab83ca7acc442a5bd846a75b920285ff79bdb4e3d34aa3
 export LIBGPGERROR_TARBALL := libgpg-error-1.43.tar.bz2
 export LIBLANGTAG_SHA256SUM := 
1f12a20a02ec3a8d22e54dedb8b683a43c9c160bda1ba337bf1060607ae733bd
 export LIBLANGTAG_TARBALL := liblangtag-0.6.3.tar.bz2
-export LIBNUMBERTEXT_SHA256SUM := 
db9060d208501bd7bc06300a55d8489d29dd560ee0fbbd0f41b78af56816680c
-export LIBNUMBERTEXT_TARBALL := libnumbertext-1.0.8.tar.xz
+export LIBNUMBERTEXT_SHA256SUM := 
a285573864eaac8d36a0f66d946e9b1d3cf01c5d93d31fda00264a76f2633beb
+export LIBNUMBERTEXT_TARBALL := libnumbertext-1.0.10.tar.xz
 export LIBTOMMATH_SHA256SUM := 
083daa92d8ee6f4af96a6143b12d7fc8fe1a547e14f862304f7281f8f7347483
 export LIBTOMMATH_TARBALL := ltm-1.0.zip
 export XMLSEC_SHA256SUM := 
26041d35a20a245ed5a2fb9ee075f10825664d274220cb5190340fa87a4d0931
diff --git a/sw/qa/extras/uiwriter/uiwriter4.cxx 
b/sw/qa/extras/uiwriter/uiwriter4.cxx
index aa807418e348..fc7bd27e3124 100644
--- a/sw/qa/extras/uiwriter/uiwriter4.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter4.cxx
@@ -3963,6 +3963,41 @@ void SwUiWriterTest4::testTdf133589()
     pWrtShell->AutoCorrect(corr, ' ');
     sReplaced += u"𐳺𐳺𐳿𐳼𐳼 ";
     CPPUNIT_ASSERT_EQUAL(sReplaced, 
static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText());
+
+    // tdf#147546 transliterate punctuation marks
+
+    // question mark
+    pWrtShell->Insert(u"Kérdőjel");
+    pWrtShell->AutoCorrect(corr, '?');
+    sReplaced += u"𐲓𐳋𐳢𐳇𐳟𐳒𐳉𐳖";
+    OUString sReplaced2(sReplaced + "?");
+    CPPUNIT_ASSERT_EQUAL(sReplaced2, 
static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText());
+    pWrtShell->AutoCorrect(corr, ' ');
+    sReplaced += u"⸮ ";
+    CPPUNIT_ASSERT_EQUAL(sReplaced, 
static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText());
+    // comma
+    pWrtShell->Insert(u"Vessző");
+    pWrtShell->AutoCorrect(corr, ',');
+    sReplaced += u"𐲮𐳉𐳥𐳥𐳟";
+    sReplaced2 = sReplaced + ",";
+    CPPUNIT_ASSERT_EQUAL(sReplaced2, 
static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText());
+    pWrtShell->AutoCorrect(corr, ' ');
+    sReplaced += u"⹁ ";
+    CPPUNIT_ASSERT_EQUAL(sReplaced, 
static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText());
+    // semicolon
+    pWrtShell->Insert(u"pontosvessző");
+    pWrtShell->AutoCorrect(corr, ';');
+    sReplaced += u"𐳠𐳛𐳙𐳦𐳛𐳤𐳮𐳉𐳥𐳥𐳟";
+    sReplaced2 = sReplaced + ";";
+    CPPUNIT_ASSERT_EQUAL(sReplaced2, 
static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText());
+    pWrtShell->AutoCorrect(corr, ' ');
+    sReplaced += u"⁏ ";
+    CPPUNIT_ASSERT_EQUAL(sReplaced, 
static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText());
+    // quotation marks
+    pWrtShell->Insert(u"„idézőjel”");
+    pWrtShell->AutoCorrect(corr, ' ');
+    sReplaced += u"⹂𐳐𐳇𐳋𐳯𐳟𐳒𐳉𐳖‟ ";
+    CPPUNIT_ASSERT_EQUAL(sReplaced, 
static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText());
 }
 
 void SwUiWriterTest4::testTdf143176()

Reply via email to