external/libnumbertext/deprecated.patch.0 |   45 ++++--------------------------
 1 file changed, 7 insertions(+), 38 deletions(-)

New commits:
commit 1e38010d31f33a3e2b0d26dd79e830ca008461e9
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Sun Mar 1 20:42:35 2026 +0100
Commit:     Andras Timar <[email protected]>
CommitDate: Wed Mar 4 13:58:08 2026 +0100

    external/libnumbertext: Silence -Werror,-Wdeprecated-declarations
    
    ...when building against emsdk 5.0.2,
    
    > In file included from Numbertext.cxx:6:
    > In file included from 
~/emsdk/5.0.2/emsdk/emscripten/main/cache/sysroot/include/c++/v1/locale:203:
    > 
~/emsdk/5.0.2/emsdk/emscripten/main/cache/sysroot/include/c++/v1/__locale_dir/wstring_convert.h:179:1:
 error: 'wstring_convert<std::codecvt_utf8<wchar_t>>' is deprecated 
[-Werror,-Wdeprecated-declarations]
    >   179 | wstring_convert<_Codecvt, _Elem, _WideAlloc, 
_ByteAlloc>::to_bytes(const _Elem* __frm, const _Elem* __frm_end) {
    >       | ^
    > 
~/emsdk/5.0.2/emsdk/emscripten/main/cache/sysroot/include/c++/v1/__locale_dir/wstring_convert.h:83:12:
 note: in instantiation of member function 
'std::wstring_convert<std::codecvt_utf8<wchar_t>>::to_bytes' requested here
    >    83 |     return to_bytes(__wstr.data(), __wstr.data() + __wstr.size());
    >       |            ^
    > Numbertext.cxx:160:22: note: in instantiation of member function 
'std::wstring_convert<std::codecvt_utf8<wchar_t>>::to_bytes' requested here
    >   160 |     return converter.to_bytes( s );
    >       |                      ^
    > 
~/emsdk/5.0.2/emsdk/emscripten/main/cache/sysroot/include/c++/v1/__locale_dir/wstring_convert.h:34:7:
 note: 'wstring_convert<std::codecvt_utf8<wchar_t>>' has been explicitly marked 
deprecated here
    >    34 | class _LIBCPP_DEPRECATED_IN_CXX17 wstring_convert {
    >       |       ^
    > 
~/emsdk/5.0.2/emsdk/emscripten/main/cache/sysroot/include/c++/v1/__config:740:41:
 note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
    >   740 | #    define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
    >       |                                         ^
    > 
~/emsdk/5.0.2/emsdk/emscripten/main/cache/sysroot/include/c++/v1/__config:713:49:
 note: expanded from macro '_LIBCPP_DEPRECATED'
    >   713 | #      define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
    >       |                                                 ^
    
    So following up on ad6ba4a3a63a25c5b9043bb5d0b178411b3eb714
    "external/libnumbertext: Silence -Werror,-Wdeprecated-declarations", move 
the
    pragma even earlier.
    
    Change-Id: I599c751e703fec4bbffde6b43385236e6f5808d6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200731
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <[email protected]>
    (cherry picked from commit 921f41924f908c1bcbceb47c80be23c5c77d1cc0)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200777
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Andras Timar <[email protected]>

diff --git a/external/libnumbertext/deprecated.patch.0 
b/external/libnumbertext/deprecated.patch.0
index 8ee86ac135c5..6c7777a37a74 100644
--- a/external/libnumbertext/deprecated.patch.0
+++ b/external/libnumbertext/deprecated.patch.0
@@ -1,43 +1,12 @@
 --- src/Numbertext.cxx
 +++ src/Numbertext.cxx
-@@ -41,7 +41,14 @@
-     std::wifstream wif(filename);
-     if (wif.fail())
-         return false;
+@@ -1,6 +1,9 @@
+  * 2018 (c) László Németh
+  * License: LGPL/BSD dual license */
+ 
 +#if defined __GNUC__
-+#pragma GCC diagnostic push
 +#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 +#endif
-     wif.imbue(std::locale(std::locale(), new std::codecvt_utf8<wchar_t>));
-+#if defined __GNUC__
-+#pragma GCC diagnostic pop
-+#endif
-     std::wstringstream wss;
-     wss << wif.rdbuf();
-     result = wss.str();
-@@ -122,8 +129,15 @@
-     MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, wstr.get(), nSize);
-     return wstr.get();
- #elif !defined NUMBERTEXT_BOOST
-+#if defined __GNUC__
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-+#endif
-     typedef std::codecvt_utf8<wchar_t> convert_type;
-     std::wstring_convert<convert_type, wchar_t> converter;
-+#if defined __GNUC__
-+#pragma GCC diagnostic pop
-+#endif
-     return converter.from_bytes( s );
- #else
-     return ::locale::conv::utf_to_utf<wchar_t>(s.c_str(), s.c_str() + 
s.size());
-@@ -138,6 +152,9 @@
-     WideCharToMultiByte(CP_UTF8, 0, s.c_str(), -1, str.get(), nSize, nullptr, 
nullptr);
-     return str.get();
- #elif !defined NUMBERTEXT_BOOST
-+#if defined __GNUC__
-+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-+#endif
-     typedef std::codecvt_utf8<wchar_t> convert_type;
-     std::wstring_convert<convert_type, wchar_t> converter;
-     return converter.to_bytes( s );
+ #include <codecvt>
+ #include <locale>
+ #include <sstream>

Reply via email to