external/libeot/0001-const-up-tripletEncodings.patch |   54 +++++++++++++++++++
 external/libeot/UnpackedTarball_libeot.mk            |    2 
 i18npool/source/calendar/calendar_gregorian.cxx      |    4 -
 3 files changed, 58 insertions(+), 2 deletions(-)

New commits:
commit 27943324726c52027b527ceb4fa7646c6f21ed17
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Jul 13 20:52:07 2025 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Jul 14 22:47:42 2025 +0200

    use other constructor for a single unicode char
    
    Change-Id: I4ba15532bbe0f12272b1a18069380927914474bc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187829
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins

diff --git a/i18npool/source/calendar/calendar_gregorian.cxx 
b/i18npool/source/calendar/calendar_gregorian.cxx
index a6e2febe553e..1282d400fc79 100644
--- a/i18npool/source/calendar/calendar_gregorian.cxx
+++ b/i18npool/source/calendar/calendar_gregorian.cxx
@@ -1030,8 +1030,8 @@ Calendar_gregorian::getDisplayStringImpl( sal_Int32 
nCalendarDisplayCode, sal_In
                 nCalendarDisplayCode == CalendarDisplayCode::LONG_YEAR)
             && (nNativeNumberMode == NativeNumberMode::NATNUM1 ||
                 nNativeNumberMode == NativeNumberMode::NATNUM2)) {
-            static sal_Unicode gan = 0x5143;
-            return OUString(&gan, 1);
+            constexpr sal_Unicode gan = 0x5143;
+            return OUString(gan);
         }
         sal_Int16 nNatNum = NatNumForCalendar(aLocale, nCalendarDisplayCode, 
nNativeNumberMode, value);
         if (nNatNum > 0)
commit 63612c3d5c0dfe7ff0ef84d6ceaf1c1d2ce8e98f
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Jul 13 19:49:59 2025 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Jul 14 22:47:34 2025 +0200

    const up libeot
    
    Change-Id: Ifd8a774365b8c343e214660942d9bac4d52462b9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187822
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins

diff --git a/external/libeot/0001-const-up-tripletEncodings.patch 
b/external/libeot/0001-const-up-tripletEncodings.patch
new file mode 100644
index 000000000000..a4b26b2fa0a1
--- /dev/null
+++ b/external/libeot/0001-const-up-tripletEncodings.patch
@@ -0,0 +1,54 @@
+From 1cb423d68e647e0c99e397cd6cf04272240ee86d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolan.mcnam...@collabora.com>
+Date: Sun, 13 Jul 2025 19:43:51 +0100
+Subject: [PATCH] const up tripletEncodings
+
+moves tripletEncodings out of the .data section
+---
+ src/ctf/parseCTF.c      | 2 +-
+ src/triplet_encodings.c | 2 +-
+ src/triplet_encodings.h | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/ctf/parseCTF.c b/src/ctf/parseCTF.c
+index 3ec938d..231a85e 100644
+--- a/src/ctf/parseCTF.c
++++ b/src/ctf/parseCTF.c
+@@ -424,7 +424,7 @@
+   unsigned currX = 0, currY = 0;
+   for (unsigned i = 0; i < totalPoints; ++i)
+   {
+-    struct TripletEncoding enc = tripletEncodings[flags[i] & 0x7F];
++    const struct TripletEncoding enc = tripletEncodings[flags[i] & 0x7F];
+     unsigned moreBytes = enc.byteCount - 1;
+     if (in->pos + moreBytes > in->size)
+     {
+diff --git a/src/triplet_encodings.c b/src/triplet_encodings.c
+index 899eadb..81e9ae0 100644
+--- a/src/triplet_encodings.c
++++ b/src/triplet_encodings.c
+@@ -4,7 +4,7 @@
+  */
+ 
+ #include "triplet_encodings.h"
+-struct TripletEncoding tripletEncodings[] = {{2, 0, 8, 0, 0, 0, -1},
++const struct TripletEncoding tripletEncodings[] = {{2, 0, 8, 0, 0, 0, -1},
+ {2, 0, 8, 0, 0, 0, 1},
+ {2, 0, 8, 0, 256, 0, -1},
+ {2, 0, 8, 0, 256, 0, 1},
+diff --git a/src/triplet_encodings.h b/src/triplet_encodings.h
+index 972145f..40a7537 100644
+--- a/src/triplet_encodings.h
++++ b/src/triplet_encodings.h
+@@ -17,7 +17,7 @@
+   int ySign;
+ };
+ 
+-extern struct TripletEncoding tripletEncodings[];
++extern const struct TripletEncoding tripletEncodings[];
+ 
+ #endif /* #define __LIBEOT_TRIPLET_ENCODINGS_H__ */
+ 
+-- 
+2.49.0
+
diff --git a/external/libeot/UnpackedTarball_libeot.mk 
b/external/libeot/UnpackedTarball_libeot.mk
index 40ac1cbb0b94..532afa5adea3 100644
--- a/external/libeot/UnpackedTarball_libeot.mk
+++ b/external/libeot/UnpackedTarball_libeot.mk
@@ -11,6 +11,8 @@ libeot_patches :=
 libeot_patches += 0001-remove-unused-err.h.patch
 libeot_patches += debug-no-werror.patch.0
 libeot_patches += ubsan.patch.0
+# upstreamed as: https://github.com/umanwizard/libeot/pull/14
+libeot_patches += 0001-const-up-tripletEncodings.patch
 
 $(eval $(call gb_UnpackedTarball_UnpackedTarball,libeot))
 

Reply via email to