[Libreoffice-commits] core.git: vcl/qa
Hossein (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 3 14:29:29 UTC 2021
vcl/qa/cppunit/complextext.cxx | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
New commits:
commit 3b6b93e40e079d0fc93c68fbb28da0be696c2566
Author: Hossein <hossein at libreoffice.org>
AuthorDate: Sun Aug 29 19:55:09 2021 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Sep 3 16:28:54 2021 +0200
Fixing Unicode Arabic Literals
Some Unicode literals are now available inside the LibreOffice code,
so I think we can use Arabic Unicode literals directly inside
LibreOffice code. It is more intuitive, and gives better insight to
those who develop to understand what a foreign language script should
look like.
This patch consists of two things: First, converting a Unicode literal
that was consisting of \uxxxx characters into an Arabic Unicode
literal; Second, fixing an Arabic literal that was converted to shaped
characters instead of normal Arabic characters.
Change-Id: I11003cc471b2c83098cb0ebc4f4085771a132ecc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121164
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx
index 176fc1ea9df6..a578cb71acef 100644
--- a/vcl/qa/cppunit/complextext.cxx
+++ b/vcl/qa/cppunit/complextext.cxx
@@ -59,9 +59,7 @@ public:
void VclComplexTextTest::testArabic()
{
#if HAVE_MORE_FONTS
- OUString aOneTwoThree(
- u"\u0648\u0627\u062d\u0650\u062f\u0652 \u0625\u062b\u064d\u0646\u064a\u0646"
- " \u062b\u0644\u0627\u062b\u0629\u064c" );
+ OUString aOneTwoThree(u"واحِدْ إثٍنين ثلاثةٌ");
ScopedVclPtrInstance<WorkWindow> pWin(static_cast<vcl::Window *>(nullptr));
CPPUNIT_ASSERT( pWin );
@@ -123,7 +121,7 @@ void VclComplexTextTest::testKashida()
// Cache the glyph list of some Arabic text.
ScopedVclPtrInstance<VirtualDevice> pOutputDevice;
auto aText
- = OUString(u"ﻊﻨﺻﺭ ﺎﻠﻓﻮﺴﻓﻭﺭ ﻊﻨﺻﺭ ﻒﻟﺰﻳ ﺺﻠﺑ. ﺖﺘﻛﻮﻧ ﺎﻟﺩﻭﺭﺓ ﺎﻟﺭﺎﺒﻋﺓ ﻢﻧ ١٥ ﻊﻨﺻﺭﺍ.");
+ = OUString(u"عنصر الفوسفور عنصر فلزي صلب. تتكون الدورة الرابعة من 15 عنصرا.");
std::unique_ptr<SalLayout> pLayout = pOutputDevice->ImplLayout(
aText, 0, aText.getLength(), Point(0, 0), 0, nullptr, SalLayoutFlags::GlyphItemsOnly);
SalLayoutGlyphs aGlyphs = pLayout->GetGlyphs();
More information about the Libreoffice-commits
mailing list