100 Commits
Author SHA1 Message Date
Stephan Bergmann 0e2ad911d9 Avoid deprecated std::filesystem::path::string
...and std::filesystem::path::generic_string, which at least GCC 17 trunk
libstdc++ now flags for C++26 (--with-latest-c++) as

> In file included from engine/codemaker/source/netmaker/netproduce.cxx:19:
> engine/codemaker/source/netmaker/csharpfile.hxx:28:53: error: 'string' is deprecated: use 'display_string' or 'native_encoded_string' instead [-Werror,-Wdeprecated-declarations]
>    28 |     std::string getPath() const { return m_filePath.string(); }
>       |                                                     ^
> ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/fs_path.h:465:5: note: 'string' has been explicitly marked deprecated here
>   465 |     _GLIBCXX26_DEPRECATED_SUGGEST("display_string' or 'native_encoded_string")
>       |     ^
> ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/x86_64-pc-linux-gnu/bits/c++config.h:160:45: note: expanded from macro '_GLIBCXX26_DEPRECATED_SUGGEST'
>   160 | # define _GLIBCXX26_DEPRECATED_SUGGEST(ALT) _GLIBCXX_DEPRECATED_SUGGEST(ALT)
>       |                                             ^
> ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/x86_64-pc-linux-gnu/bits/c++config.h:112:19: note: expanded from macro '_GLIBCXX_DEPRECATED_SUGGEST'
>   112 |   __attribute__ ((__deprecated__ ("use '" ALT "' instead")))
>       |                   ^

since
<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=341ad729c2c93b9f01854913b0404e4fc8958512>
"libstdc++: Add (generic_)display_string and (generic_)native_encoded_string to
filesystem::path".

Occurrences that are obviously meant for display purposes are #if-conditionally
replaced with the new display_string, while all other occurrences are left using
the (non-deprecated) [generic_]string<char> template instantiation, matching the
original code.  (Where, for C++26, the latter could also be replaced with the
new [generic_]native_encoded_string, aka [generic_]system_encoded_string; see
<https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p2319r5.html>
"Prevent path presentation problems" and
<https://cplusplus.github.io/LWG/issue4512> "The system_encoded_string() and
generic_system_encoded_string() member functions of std::filesystem::path are
misnamed" for details.)

Signed-off-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Change-Id: I7c79c8522608550bb1e0f4cb8e4824480952446b
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3987
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit f320d95d89ecc9bea81182795969f83b05ec903c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206226
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-09 09:52:05 +02:00
Stephan Bergmann be2cfec1f8 This code apparently wants to use std::multimap::lower_bound
...(which returns the first element in the range of equivalent ones) rather than
std::multimap::find (which returns a random element from the range of equivalent
ones).  This e.g. caused SIGSEGV during CppunitTest_sw_filters_test when using a
libc++ built with -DLIBCXX_HARDENING_MODE=debug (which does return a random
element, rather than the first, from std::multimap::find), and the

>                         ++aTOCStyleIter;

a few lines further down could thus try to go beyond the end of aMap.

Change-Id: I7646a41d203b458bccc451ee74c2840af3870255
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191406
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2025-09-24 07:58:07 +02:00
Stephan Bergmann 1edb882cd0 external/nss: Fix -Wincompatible-pointer-types
...on macOS, where connectx(2) "appeared in Darwin 15.0.0" according to its man
page, and where recent Clang with
<https://github.com/llvm/llvm-project/commit/b24769855d97697de08e2296a548c033f193caf4>
"[Clang] [Sema] Make `-Wincompatible-pointer-types` an error by default
(#157364)" now started to fail with

> ../../../../pr/src/pthreads/ptio.c:2046:58: error: incompatible pointer types passing 'PRInt32 *' (aka 'int *') to parameter of type 'size_t *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
>  2046 |                         CONNECT_DATA_IDEMPOTENT, iov, 1, &bytes, NULL);
>       |                                                          ^~~~~~
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk/usr/include/sys/socket.h:741:49: note: passing argument to parameter here
>   741 |     const struct iovec *, unsigned int, size_t *, sae_connid_t *);
>       |                                                 ^
> ../../../../pr/src/pthreads/ptio.c:2045:11: warning: unused variable 'rv' [-Wunused-variable]
>  2045 |   PRInt32 rv = connectx(fd->secret->md.osfd, &endpoints, SAE_ASSOCID_ANY,
>       |           ^~

Change-Id: I047a987e443ab0283f38d997d03062fe969a65c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191375
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2025-09-23 12:24:15 +02:00
Stephan Bergmann 66e783a224 loplugin:unreffun (on macOS)
Change-Id: Id2c7fc8fae748b1a96dcb72061cbad7a7a6deb26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191374
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2025-09-23 11:40:03 +02:00
Stephan Bergmann c7d1e00d1e loplugin:external
Change-Id: I15c91df5990a4c998fff09be720c9ede7949603a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191358
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2025-09-22 20:25:24 +02:00
Stephan Bergmann f0f1c92091 Missing include (for getenv)
Change-Id: I7bc04264cf9e5ad3553a9f8c5b071b905bdb2f3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191357
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2025-09-22 20:25:08 +02:00
Stephan Bergmann 403acbc185 Missing includes
Change-Id: I07cfc6e899435ff8e6412287a7412c0495c1b4e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188920
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2025-08-04 17:15:30 +02:00
Stephan Bergmann 4ed544aef3 Missing include
Change-Id: I0857b8acfdcf0af350747ad2ff6b255477a812f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188919
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2025-08-04 16:27:03 +02:00
Stephan Bergmann 8bc1db4d29 Some loplugin warning fixes in (Emscripten-only) embindtest.cxx
...for loplugin:unoany, loplugin:fakebool, and loplugin:refcounting

Change-Id: Ib3278b126c3ea792c93cbf57f2414fd316278b88
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186560
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-06-16 17:19:14 +02:00
Stephan Bergmann a6c5e17177 Implement XServiceInfo for (Emscripten-only) embindtest.Test
...so that CppunitTest_services wouldn't fail with

> postprocess/qa/services.cxx:341:(anonymous namespace)::Test::test
> assertion failed
> - Expression: info.is()
> - instantiating "org.libreoffice.comp.embindtest.Test" via "org.libreoffice.embindtest.Test" does not provide XServiceInfo

Change-Id: I83721006bfd8b71b488b15c41e81df9c5d0d755e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186559
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-06-16 15:12:50 +02:00
Stephan Bergmann 6696e63b9f distclean generated sysui/desktop/macosx/LaunchConstraint.plist
...introduced with 22ab2bec71 "mac: add parent
launch-constraint to packaged framework/helpers"

Change-Id: I3305be40b6166586b23cb1c5976ef920af4f0ab1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186327
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-06-10 21:40:57 +02:00
Stephan Bergmann c5ea665b41 Avoid float-divide-by-zero
...during CppunitTest_sw_uiwriter6

> /sw/source/core/text/portxt.cxx:496:54: runtime error: division by zero
>     #0 0x7f3faa259544 in SwTextPortion::Format_(SwTextFormatInfo&) /sw/source/core/text/portxt.cxx:496:54
>     #1 0x7f3faa264f98 in SwTextPortion::Format(SwTextFormatInfo&) /sw/source/core/text/portxt.cxx:705:12
>     #2 0x7f3fa9f699c2 in SwTextFormatter::BuildPortions(SwTextFormatInfo&) /sw/source/core/text/itrform2.cxx:615:27
>     #3 0x7f3fa9f9e70a in SwTextFormatter::FormatLine(o3tl::strong_int<int, Tag_TextFrameIndex>) /sw/source/core/text/itrform2.cxx:2078:9
>     #4 0x7f3fa9d3b4e8 in SwTextFrame::FormatLine(SwTextFormatter&, bool) /sw/source/core/text/frmform.cxx:1460:44
>     #5 0x7f3fa9d4addd in SwTextFrame::Format_(SwTextFormatter&, SwTextFormatInfo&, bool) /sw/source/core/text/frmform.cxx:1827:23
>     #6 0x7f3fa9d508a7 in SwTextFrame::FormatImpl(OutputDevice*, SwParaPortion*, std::__debug::vector<SwAnchoredObject*, std::allocator<SwAnchoredObject*> >&) /sw/source/core/text/frmform.cxx:2018:5
>     #7 0x7f3fa9d5712d in SwTextFrame::Format(OutputDevice*, SwBorderAttrs const*) /sw/source/core/text/frmform.cxx:2270:17
>     #8 0x7f3fa8dd35a4 in SwContentFrame::MakeAll(OutputDevice*) /sw/source/core/layout/calcmove.cxx:1624:17
>     #9 0x7f3fa8da3621 in SwFrame::OptPrepareMake() /sw/source/core/layout/calcmove.cxx:420:9
>     #10 0x7f3fa91cc5d0 in SwFrame::OptCalc() const /sw/source/core/inc/frame.hxx:1123:37
>     #11 0x7f3fa91afa95 in SwLayAction::FormatContent_(SwContentFrame const*, SwPageFrame const*) /sw/source/core/layout/layact.cxx:1997:19
>     #12 0x7f3fa919afba in SwLayAction::FormatContent(SwPageFrame*) /sw/source/core/layout/layact.cxx:1818:13
>     #13 0x7f3fa917f171 in SwLayAction::InternalAction(OutputDevice*) /sw/source/core/layout/layact.cxx:622:31
>     #14 0x7f3fa91795e7 in SwLayAction::Action(OutputDevice*) /sw/source/core/layout/layact.cxx:397:5
>     #15 0x7f3fabd82d01 in SwViewShell::ImplEndAction(bool) /sw/source/core/view/viewsh.cxx:348:17
>     #16 0x7f3fabd80ce1 in SwViewShell::EndAction(bool) /sw/source/core/view/viewsh.cxx:295:9
>     #17 0x7f3fa61c1184 in SwCursorShell::EndAction(bool) /sw/source/core/crsr/crsrsh.cxx:266:18
>     #18 0x7f3fabd80671 in SwViewShell::EndAllAction() /sw/source/core/view/viewsh.cxx:282:23
>     #19 0x7f3fa8585747 in SwEditShell::TransliterateText(TransliterationFlags) /sw/source/core/edit/editsh.cxx:1072:5
>     #20 0x7f3fadf22817 in SwTextShell::ExecRotateTransliteration(SfxRequest&) /sw/source/uibase/shells/textsh.cxx:901:17
>     #21 0x7f3fadf21e64 in SfxStubSwTextShellExecRotateTransliteration(SfxShell*, SfxRequest&) /workdir/SdiTarget/sw/sdi/swslots.hxx:3235:1
>     #22 0x7f3fcb7fe85c in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) /sfx2/source/control/dispatch.cxx:256:9
>     #23 0x7f3fcb814465 in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) /sfx2/source/control/dispatch.cxx:755:9
>     #24 0x7f3fcb79a417 in SfxBindings::Execute_Impl(SfxRequest&, SfxSlot const*, SfxShell*) /sfx2/source/control/bindings.cxx:1046:22
>     #25 0x7f3fcbbfda37 in SfxDispatchController_Impl::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /sfx2/source/control/unoctitm.cxx:736:53
>     #26 0x7f3fcbc003e1 in SfxOfficeDispatch::dispatchWithNotification(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /sfx2/source/control/unoctitm.cxx:271:16
>     #27 0x7f3f7bfaedc6 in framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatch> const&, com::sun::star::util::URL const&, bool, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx:164:30
>     #28 0x7f3f7bfadc9b in framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx:121:16
>     #29 0x7f3f7bfaf674 in non-virtual thunk to framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx
>     #30 0x7f3f9c13c6ac in unotest::MacrosTest::dispatchCommand(com::sun::star::uno::Reference<com::sun::star::lang::XComponent> const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /unotest/source/cpp/macros_test.cxx:96:33
>     #31 0x7f3fd95dba24 in testTdf157937::TestBody() /sw/qa/extras/uiwriter/uiwriter6.cxx:685:5

(<https://ci.libreoffice.org/job/lo_ubsan/3587/>) after
529755f091 "tdf#166113 sw smart justify: adjust
algorithm for interoperability", assuming that "0" was rather meant to be "1"

Change-Id: Ife289c280ca3ba9c05eea315b82ffebec8e84845
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186316
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: László Németh <nemeth@numbertext.org>
2025-06-10 11:10:40 +02:00
Stephan Bergmann 19c32b44fe Missing include (for SHRT_MIN/MAX)
Change-Id: I1755b440515724315aa2e540fe3de4a473371dc4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186304
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-06-10 08:42:00 +02:00
Stephan Bergmann 0084c2b22c Missing include (for LONG_MAX)
Change-Id: I8f03310ab1b5da503670f77bf9c5211e956dd48c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186305
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-06-10 07:28:49 +02:00
Stephan Bergmann 6ebc3c540f Missing include (for USHRT_MAX)
Change-Id: I9d2a59fd198679c2a7a7ce124e2548f2add61d6d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186303
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-06-10 07:28:40 +02:00
Stephan Bergmann 8157e4b56d Missing include (for TOOLS_WARN_EXCEPTION)
...after 6cf20bff72 "find-unneeded-includes:
handle IWYU warnings about Qt headers"

Change-Id: I8849517d75e776e39509cd94c7d0e35d4d744dc4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186140
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-06-03 09:38:18 +02:00
Stephan Bergmann f974edd5f7 Guard concurrent access of TimerManagerImpl::m_pImpl
...which was found to be a potential issue while inspecting
0117608965 "Timer - shutdown and re-start
salhelper::Timer thread." and its follow-up
c6c8e1c325 "don't return impl by shared_ptr"

Change-Id: I6a515b3b3c84a3010d90d115c801f2e5cbcc245a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185894
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-05-27 15:16:21 +02:00
Stephan Bergmann 28b1b9af5e Emscripten: Move execute_browser to the browser main thread
...so that it can reference the JS `window` object (e.g., when clicking on "Help
- About LibreOffice - Credits")

Change-Id: Ia08226af7bbf5a503be9e0b81c27217ad2775269
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185801
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2025-05-26 17:31:51 +02:00
Stephan Bergmann b91912e8ee HEAPU16 and HEAPU32 are no longer exported by default by recent Emscripten
...after
<https://github.com/emscripten-core/emscripten/commit/96986d06700f1f8da3f77d80ff6a73d8c69e16df>
"Don't export memory views by default (#24079)", but are used in
static/source/unoembindhelpers/PrimaryBindings.cxx, so export them explicitly

Change-Id: I0bbcb36443bb92589df9c81630baffba9a8c7223
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185717
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2025-05-24 22:04:11 +02:00
Stephan Bergmann d0f6c4c0da UBSan vclplug_gtk3 needs ScrollbarValue RTTI now
...as running soffice started to report

> warn:sal.osl:2389442:2389442:sal/osl/unx/module.cxx:103: dlopen(.../instdir/program/libvclplug_gtk3lo.so, 257): .../instdir/program/libvclplug_gtk3lo.so: undefined symbol: _ZTI14ScrollbarValue

for me after 7bb189c3c2 "tdf#97228 change
scrollbarvalue code from include/vcl to vcl/" had removed the SAL_DLLPUBLIC_RTTI
that had been present in the old include/vcl/salnativewidgets.hxx

Change-Id: I4c8b7c1e94f1e3d823a59b8bb4479dc32b005854
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185347
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-05-15 12:00:10 +02:00
Stephan Bergmann 5b8f9514a3 Silence new Clang 21 trunk -Werror,-Wunnecessary-virtual-specifier
...in CompilerTest_compilerplugins_clang,

> [CPT] compilerplugins/clang/test/fragiledestructor.cxx
> error: 'expected-error' diagnostics expected but not seen:
>   File compilerplugins/clang/test/fragiledestructor.cxx Line 26 (directive at compilerplugins/clang/test/fragiledestructor.cxx:27): calling virtual method from destructor, either make the virtual method final, or make this class final [loplugin:fragiledestructor]
>   File compilerplugins/clang/test/fragiledestructor.cxx Line 53 (directive at compilerplugins/clang/test/fragiledestructor.cxx:54): calling virtual method from destructor, either make the virtual method final, or make this class final [loplugin:fragiledestructor]
> error: 'expected-error' diagnostics seen but not expected:
>   File compilerplugins/clang/test/fragiledestructor.cxx Line 39: virtual method 'f' is inside a 'final' class and can never be overridden
> error: 'expected-note' diagnostics expected but not seen:
>   File compilerplugins/clang/test/fragiledestructor.cxx Line 28 (directive at compilerplugins/clang/test/fragiledestructor.cxx:29): callee method here [loplugin:fragiledestructor]
>   File compilerplugins/clang/test/fragiledestructor.cxx Line 48 (directive at compilerplugins/clang/test/fragiledestructor.cxx:49): callee method here [loplugin:fragiledestructor]

Change-Id: Ie6484149b902e217a54b7b9423627e608d349d15
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185221
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2025-05-13 11:19:35 +02:00
Stephan Bergmann 2129691310 external/icu: New Clang 21 trunk -Werror,-Wunnecessary-virtual-specifier
> [CXX] svl/source/misc/PasswordHelper.cxx
> In file included from svl/source/misc/PasswordHelper.cxx:25:
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:148:28: error: virtual method 'clone' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   148 |     virtual RegexPattern  *clone() const;
>       |                            ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:328:22: error: virtual method 'flags' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   328 |     virtual uint32_t flags() const;
>       |                      ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:347:27: error: virtual method 'matcher' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   347 |     virtual RegexMatcher *matcher(const UnicodeString &input,
>       |                           ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:379:27: error: virtual method 'matcher' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   379 |     virtual RegexMatcher *matcher(UErrorCode  &status) const;
>       |                           ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:428:27: error: virtual method 'pattern' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   428 |     virtual UnicodeString pattern() const;
>       |                           ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:441:20: error: virtual method 'patternText' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   441 |     virtual UText *patternText(UErrorCode      &status) const;
>       |                    ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:457:21: error: virtual method 'groupNumberFromName' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   457 |     virtual int32_t groupNumberFromName(const UnicodeString &groupName, UErrorCode &status) const;
>       |                     ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:476:21: error: virtual method 'groupNumberFromName' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   476 |     virtual int32_t groupNumberFromName(const char *groupName, int32_t nameLength, UErrorCode &status) const;
>       |                     ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:517:22: error: virtual method 'split' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   517 |     virtual int32_t  split(const UnicodeString &input,
>       |                      ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:561:22: error: virtual method 'split' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   561 |     virtual int32_t  split(UText *input,
>       |                      ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:770:19: error: virtual method 'matches' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   770 |     virtual UBool matches(UErrorCode &status);
>       |                   ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:783:19: error: virtual method 'matches' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   783 |     virtual UBool matches(int64_t startIndex, UErrorCode &status);
>       |                   ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:799:19: error: virtual method 'lookingAt' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   799 |     virtual UBool lookingAt(UErrorCode &status);
>       |                   ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:815:19: error: virtual method 'lookingAt' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   815 |     virtual UBool lookingAt(int64_t startIndex, UErrorCode &status);
>       |                   ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:830:19: error: virtual method 'find' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   830 |     virtual UBool find();
>       |                   ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:847:19: error: virtual method 'find' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   847 |     virtual UBool find(UErrorCode &status);
>       |                   ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:858:19: error: virtual method 'find' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   858 |     virtual UBool find(int64_t start, UErrorCode &status);
>       |                   ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:870:27: error: virtual method 'group' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   870 |     virtual UnicodeString group(UErrorCode &status) const;
>       |                           ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:890:27: error: virtual method 'group' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   890 |     virtual UnicodeString group(int32_t groupNum, UErrorCode &status) const;
>       |                           ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:897:21: error: virtual method 'groupCount' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   897 |     virtual int32_t groupCount() const;
>       |                     ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:914:20: error: virtual method 'group' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   914 |     virtual UText *group(UText *dest, int64_t &group_len, UErrorCode &status) const;
>       |                    ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:936:20: error: virtual method 'group' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   936 |     virtual UText *group(int32_t groupNum, UText *dest, int64_t &group_len, UErrorCode &status) const;
>       |                    ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:945:21: error: virtual method 'start' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   945 |     virtual int32_t start(UErrorCode &status) const;
>       |                     ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:954:21: error: virtual method 'start64' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   954 |     virtual int64_t start64(UErrorCode &status) const;
>       |                     ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:970:21: error: virtual method 'start' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   970 |     virtual int32_t start(int32_t group, UErrorCode &status) const;
>       |                     ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:985:21: error: virtual method 'start64' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   985 |     virtual int64_t start64(int32_t group, UErrorCode &status) const;
>       |                     ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1000:21: error: virtual method 'end' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1000 |     virtual int32_t end(UErrorCode &status) const;
>       |                     ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1015:21: error: virtual method 'end64' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1015 |     virtual int64_t end64(UErrorCode &status) const;
>       |                     ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1035:21: error: virtual method 'end' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1035 |     virtual int32_t end(int32_t group, UErrorCode &status) const;
>       |                     ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1054:21: error: virtual method 'end64' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1054 |     virtual int64_t end64(int32_t group, UErrorCode &status) const;
>       |                     ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1064:27: error: virtual method 'reset' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1064 |     virtual RegexMatcher &reset();
>       |                           ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1082:27: error: virtual method 'reset' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1082 |     virtual RegexMatcher &reset(int64_t index, UErrorCode &status);
>       |                           ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1102:27: error: virtual method 'reset' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1102 |     virtual RegexMatcher &reset(const UnicodeString &input);
>       |                           ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1118:27: error: virtual method 'reset' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1118 |     virtual RegexMatcher &reset(UText *input);
>       |                           ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1145:27: error: virtual method 'refreshInputText' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1145 |     virtual RegexMatcher &refreshInputText(UText *input, UErrorCode &status);
>       |                           ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1170:34: error: virtual method 'input' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1170 |     virtual const UnicodeString &input() const;
>       |                                  ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1180:20: error: virtual method 'inputText' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1180 |     virtual UText *inputText() const;
>       |                    ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1192:20: error: virtual method 'getInput' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1192 |     virtual UText *getInput(UText *dest, UErrorCode &status) const;
>       |                    ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1213:28: error: virtual method 'region' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1213 |      virtual RegexMatcher &region(int64_t start, int64_t limit, UErrorCode &status);
>       |                            ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1226:28: error: virtual method 'region' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1226 |      virtual RegexMatcher &region(int64_t regionStart, int64_t regionLimit, int64_t startIndex, UErrorCode &status);
>       |                            ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1236:22: error: virtual method 'regionStart' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1236 |      virtual int32_t regionStart() const;
>       |                      ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1246:22: error: virtual method 'regionStart64' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1246 |      virtual int64_t regionStart64() const;
>       |                      ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1257:23: error: virtual method 'regionEnd' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1257 |       virtual int32_t regionEnd() const;
>       |                       ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1267:23: error: virtual method 'regionEnd64' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1267 |       virtual int64_t regionEnd64() const;
>       |                       ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1277:21: error: virtual method 'hasTransparentBounds' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1277 |       virtual UBool hasTransparentBounds() const;
>       |                     ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1297:29: error: virtual method 'useTransparentBounds' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1297 |       virtual RegexMatcher &useTransparentBounds(UBool b);
>       |                             ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1307:21: error: virtual method 'hasAnchoringBounds' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1307 |       virtual UBool hasAnchoringBounds() const;
>       |                     ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1322:29: error: virtual method 'useAnchoringBounds' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1322 |       virtual RegexMatcher &useAnchoringBounds(UBool b);
>       |                             ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1337:21: error: virtual method 'hitEnd' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1337 |       virtual UBool hitEnd() const;
>       |                     ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1348:21: error: virtual method 'requireEnd' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1348 |       virtual UBool requireEnd() const;
>       |                     ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1356:33: error: virtual method 'pattern' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1356 |     virtual const RegexPattern &pattern() const;
>       |                                 ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1375:27: error: virtual method 'replaceAll' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1375 |     virtual UnicodeString replaceAll(const UnicodeString &replacement, UErrorCode &status);
>       |                           ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1398:20: error: virtual method 'replaceAll' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1398 |     virtual UText *replaceAll(UText *replacement, UText *dest, UErrorCode &status);
>       |                    ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1421:27: error: virtual method 'replaceFirst' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1421 |     virtual UnicodeString replaceFirst(const UnicodeString &replacement, UErrorCode &status);
>       |                           ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1448:20: error: virtual method 'replaceFirst' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1448 |     virtual UText *replaceFirst(UText *replacement, UText *dest, UErrorCode &status);
>       |                    ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1478:27: error: virtual method 'appendReplacement' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1478 |     virtual RegexMatcher &appendReplacement(UnicodeString &dest,
>       |                           ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1509:27: error: virtual method 'appendReplacement' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1509 |     virtual RegexMatcher &appendReplacement(UText *dest,
>       |                           ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1523:28: error: virtual method 'appendTail' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1523 |     virtual UnicodeString &appendTail(UnicodeString &dest);
>       |                            ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1539:20: error: virtual method 'appendTail' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1539 |     virtual UText *appendTail(UText *dest, UErrorCode &status);
>       |                    ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1565:22: error: virtual method 'split' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1565 |     virtual int32_t  split(const UnicodeString &input,
>       |                      ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1594:22: error: virtual method 'split' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1594 |     virtual int32_t  split(UText *input,
>       |                      ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1620:18: error: virtual method 'setTimeLimit' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1620 |     virtual void setTimeLimit(int32_t limit, UErrorCode &status);
>       |                  ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1628:21: error: virtual method 'getTimeLimit' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1628 |     virtual int32_t getTimeLimit() const;
>       |                     ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1651:18: error: virtual method 'setStackLimit' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1651 |     virtual void setStackLimit(int32_t  limit, UErrorCode &status);
>       |                  ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1660:22: error: virtual method 'getStackLimit' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1660 |     virtual int32_t  getStackLimit() const;
>       |                      ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1676:18: error: virtual method 'setMatchCallback' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1676 |     virtual void setMatchCallback(URegexMatchCallback     *callback,
>       |                  ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1691:18: error: virtual method 'getMatchCallback' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1691 |     virtual void getMatchCallback(URegexMatchCallback     *&callback,
>       |                  ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1709:18: error: virtual method 'setFindProgressCallback' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1709 |     virtual void setFindProgressCallback(URegexFindProgressCallback      *callback,
>       |                  ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/regex.h:1724:18: error: virtual method 'getFindProgressCallback' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1724 |     virtual void getFindProgressCallback(URegexFindProgressCallback      *&callback,
>       |                  ^

and

> [CXX] i18npool/source/collator/collator_unicode.cxx
> In file included from i18npool/source/collator/collator_unicode.cxx:29:
> In file included from i18npool/inc/collator_unicode.hxx:26:
> In file included from workdir/UnpackedTarball/icu/source/i18n/unicode/tblcoll.h:71:
> In file included from workdir/UnpackedTarball/icu/source/i18n/unicode/coll.h:70:
> workdir/UnpackedTarball/icu/source/common/unicode/uniset.h:498:18: error: virtual method 'operator==' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   498 |     virtual bool operator==(const UnicodeSet& o) const;
>       |                  ^
> workdir/UnpackedTarball/icu/source/common/unicode/uniset.h:525:21: error: virtual method 'hashCode' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   525 |     virtual int32_t hashCode() const;
>       |                     ^
> workdir/UnpackedTarball/icu/source/common/unicode/uniset.h:795:21: error: virtual method 'size' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   795 |     virtual int32_t size() const;
>       |                     ^
> workdir/UnpackedTarball/icu/source/common/unicode/uniset.h:803:19: error: virtual method 'isEmpty' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   803 |     virtual UBool isEmpty() const;
>       |                   ^
> workdir/UnpackedTarball/icu/source/common/unicode/uniset.h:828:19: error: virtual method 'contains' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   828 |     virtual UBool contains(UChar32 start, UChar32 end) const;
>       |                   ^
> workdir/UnpackedTarball/icu/source/common/unicode/uniset.h:846:19: error: virtual method 'containsAll' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   846 |     virtual UBool containsAll(const UnicodeSet& c) const;
>       |                   ^
> workdir/UnpackedTarball/icu/source/common/unicode/uniset.h:1234:25: error: virtual method 'add' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1234 |     virtual UnicodeSet& add(UChar32 start, UChar32 end);
>       |                         ^
> workdir/UnpackedTarball/icu/source/common/unicode/uniset.h:1340:25: error: virtual method 'retain' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1340 |     virtual UnicodeSet& retain(UChar32 start, UChar32 end);
>       |                         ^
> workdir/UnpackedTarball/icu/source/common/unicode/uniset.h:1378:25: error: virtual method 'remove' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1378 |     virtual UnicodeSet& remove(UChar32 start, UChar32 end);
>       |                         ^
> workdir/UnpackedTarball/icu/source/common/unicode/uniset.h:1415:25: error: virtual method 'complement' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1415 |     virtual UnicodeSet& complement();
>       |                         ^
> workdir/UnpackedTarball/icu/source/common/unicode/uniset.h:1429:25: error: virtual method 'complement' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1429 |     virtual UnicodeSet& complement(UChar32 start, UChar32 end);
>       |                         ^
> workdir/UnpackedTarball/icu/source/common/unicode/uniset.h:1466:25: error: virtual method 'addAll' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1466 |     virtual UnicodeSet& addAll(const UnicodeSet& c);
>       |                         ^
> workdir/UnpackedTarball/icu/source/common/unicode/uniset.h:1479:25: error: virtual method 'retainAll' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1479 |     virtual UnicodeSet& retainAll(const UnicodeSet& c);
>       |                         ^
> workdir/UnpackedTarball/icu/source/common/unicode/uniset.h:1492:25: error: virtual method 'removeAll' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1492 |     virtual UnicodeSet& removeAll(const UnicodeSet& c);
>       |                         ^
> workdir/UnpackedTarball/icu/source/common/unicode/uniset.h:1504:25: error: virtual method 'complementAll' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1504 |     virtual UnicodeSet& complementAll(const UnicodeSet& c);
>       |                         ^
> workdir/UnpackedTarball/icu/source/common/unicode/uniset.h:1512:25: error: virtual method 'clear' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1512 |     virtual UnicodeSet& clear();
>       |                         ^
> workdir/UnpackedTarball/icu/source/common/unicode/uniset.h:1549:25: error: virtual method 'removeAllStrings' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1549 |     virtual UnicodeSet &removeAllStrings();
>       |                         ^
> workdir/UnpackedTarball/icu/source/common/unicode/uniset.h:1558:21: error: virtual method 'getRangeCount' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1558 |     virtual int32_t getRangeCount() const;
>       |                     ^
> workdir/UnpackedTarball/icu/source/common/unicode/uniset.h:1567:21: error: virtual method 'getRangeStart' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1567 |     virtual UChar32 getRangeStart(int32_t index) const;
>       |                     ^
> workdir/UnpackedTarball/icu/source/common/unicode/uniset.h:1576:21: error: virtual method 'getRangeEnd' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1576 |     virtual UChar32 getRangeEnd(int32_t index) const;
>       |                     ^
> workdir/UnpackedTarball/icu/source/common/unicode/uniset.h:1634:25: error: virtual method 'compact' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>  1634 |     virtual UnicodeSet& compact();
>       |                         ^
> In file included from i18npool/source/collator/collator_unicode.cxx:29:
> In file included from i18npool/inc/collator_unicode.hxx:26:
> workdir/UnpackedTarball/icu/source/i18n/unicode/tblcoll.h:245:39: error: virtual method 'createCollationElementIterator' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   245 |     virtual CollationElementIterator* createCollationElementIterator(
>       |                                       ^
> workdir/UnpackedTarball/icu/source/i18n/unicode/tblcoll.h:257:39: error: virtual method 'createCollationElementIterator' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
>   257 |     virtual CollationElementIterator* createCollationElementIterator(
>       |                                       ^

etc.

Change-Id: Id2e6c2ac7b10a625b9698644c310a32b0f4b4aa2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185220
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-05-13 08:15:35 +02:00
Stephan Bergmann 887804deb5 New Clang 21 trunk -Werror,-Wunnecessary-virtual-specifier
...warning about non-overriding virtual dtors in final classes.  Every single
one of these might or might not be suspicious (e.g., in some cases it might be
better to have a virtual dtor in a derived-from class).  Also, for some of the
virtual dtors, making them non-virtual then caused

> error: unnecessary user-declared destructor [loplugin:unnecessaryoverride]

so those were removed completely.

Change-Id: If0ee71645a347d6096b65988c56f627c42fe54b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185223
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-05-12 23:11:05 +02:00
Stephan Bergmann c46d5d9eff New Clang 21 trunk -Werror,-Wunnecessary-virtual-specifier
...warning about non-overriding virtual functions in final classes

Change-Id: Id8c6b5c946ee51dc58bc6f3d7aec0f0bf450e6d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185222
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-05-12 17:30:55 +02:00
Stephan Bergmann 4d5203851b Flatpak build needs external/libeot now
...after be12bc0284 "make libeot enabled by
default on Linux and macOS"

Change-Id: I08f405a47bf452e5e96ac3c60990c5e73a6846b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185212
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-05-12 17:00:31 +02:00
Stephan Bergmann df2423ac93 CppunitTest_sd_font_embedding_tests also needs the ASan hack
...from e854abe076 "Avoid external processes
picking up instdir/program/libnspr4.so", to avoid

> Test name: testExportEmbeddedFontsPPTX::TestBody
> equality assertion failed
> - Expected: 0
> - Actual  : 32512
> - failed to execute: sh .../bin/officeotron.sh .../tmp/libtest_sd_font_embedding_tests.so1z20bm.tmp > .../tmp/libtest_sd_font_embedding_tests.so1z20bo.tmp 2>&1
> java: symbol lookup error: .../instdir/program/libnspr4.so: undefined symbol: __asan_init

Change-Id: I13732bc79b36621413ca6cea8ae37419795160a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185087
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-05-09 11:51:30 +02:00
Stephan Bergmann 17d2a10303 external/libeot: Silence invalid-shift-base
...as seen during CppunitTest_sd_font_embedding_tests,

> src/EOT.c:15:68: runtime error: left shift of 160 by 24 places cannot be represented in type 'int'
>     #0 0x7f0b39e71791 in EOTreadU32LE (/instdir/program/libvcllo.so+0xbbb0791)
>     #1 0x7f0b39e73882 in EOTfillMetadataSpecifyingVersion (/instdir/program/libvcllo.so+0xbbb2882)
>     #2 0x7f0b39e754a6 in EOTfillMetadata (/instdir/program/libvcllo.so+0xbbb44a6)
>     #3 0x7f0b39e7129e in EOT2ttf_buffer (/instdir/program/libvcllo.so+0xbbb029e)
>     #4 0x7f0b35eb77d9 in EmbeddedFontsHelper::addEmbeddedFont(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&, std::basic_string_view<char16_t, std::char_traits<char16_t> >, std::__debug::vector<unsigned char, std::allocator<unsigned char> > const&, bool, bool) /vcl/source/gdi/embeddedfontshelper.cxx:120:13
>     #5 0x7f0acf649034 in oox::ppt::EmbeddedFontListContext::onEndElement() /oox/source/ppt/EmbeddedFontListContext.cxx:96:30
>     #6 0x7f0ace1879d4 in oox::core::ContextHandler2Helper::implEndElement(int) /oox/source/core/contexthandler2.cxx:124:9
>     #7 0x7f0ace2287c6 in oox::core::FragmentHandler2::endFastElement(int) /oox/source/core/fragmenthandler2.cxx:91:5
>     #8 0x7f0b07f340ca in (anonymous namespace)::Entity::endElement() /sax/source/fastparser/fastparser.cxx:515:27
>     #9 0x7f0b07f33a98 in sax_fastparser::FastSaxParserImpl::callbackEndElement() /sax/source/fastparser/fastparser.cxx:1340:17
>     #10 0x7f0b07f23a24 in (anonymous namespace)::call_callbackEndElement(void*, unsigned char const*, unsigned char const*, unsigned char const*) /sax/source/fastparser/fastparser.cxx:339:18
>     #11 0x7f0b4391eb84 in xmlParseEndTag2 /workdir/UnpackedTarball/libxml2/parser.c:9632:2
>     #12 0x7f0b438d0124 in xmlParseTryOrFinish /workdir/UnpackedTarball/libxml2/parser.c:11374:14
>     #13 0x7f0b438c4f6c in xmlParseChunk /workdir/UnpackedTarball/libxml2/parser.c:11640:5
>     #14 0x7f0b07f1e811 in sax_fastparser::FastSaxParserImpl::parse() /sax/source/fastparser/fastparser.cxx:1091:21
>     #15 0x7f0b07f18318 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:895:9
>     #16 0x7f0b07f39a50 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:1479:13
>     #17 0x7f0ace1b2541 in oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) /oox/source/core/fastparser.cxx:121:15
>     #18 0x7f0ace1b2cd8 in oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) /oox/source/core/fastparser.cxx:129:5
>     #19 0x7f0ace2871ce in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) /oox/source/core/xmlfilterbase.cxx:421:21
>     #20 0x7f0ace285a1d in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&) /oox/source/core/xmlfilterbase.cxx:351:12
>     #21 0x7f0acf65bbb2 in oox::ppt::PowerPointImport::importDocument() /oox/source/ppt/pptimport.cxx:109:17
>     #22 0x7f0ace1c54ab in oox::core::FilterBase::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /oox/source/core/filterbase.cxx:486:49
>     #23 0x7f0acf65f687 in oox::ppt::PowerPointImport::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /oox/source/ppt/pptimport.cxx:214:24
>     #24 0x7f0af938ff1a in SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) /sfx2/source/doc/objstor.cxx:2685:34
>     #25 0x7f0b01e1acd1 in sd::DrawDocShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) /sd/source/ui/docshell/docshel4.cxx:458:39
>     #26 0x7f0af9342ab1 in SfxObjectShell::DoLoad(SfxMedium*) /sfx2/source/doc/objstor.cxx:768:23
>     #27 0x7f0af95d3e84 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/sfxbasemodel.cxx:1986:36
>     #28 0x7f0af9e36f00 in (anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) /sfx2/source/view/frmload.cxx:771:28
>     #29 0x7f0ac5b19f36 in framework::LoadEnv::impl_loadContent() /framework/source/loadenv/loadenv.cxx:1180:37
>     #30 0x7f0ac5b10dd2 in framework::LoadEnv::start() /framework/source/loadenv/loadenv.cxx:415:20
>     #31 0x7f0ac5b09292 in framework::LoadEnv::startLoading(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, rtl::OUString const&, int, LoadEnvFeatures) /framework/source/loadenv/loadenv.cxx:311:5
>     #32 0x7f0ac5b04674 in framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/loadenv/loadenv.cxx:167:14
>     #33 0x7f0ac5bd9348 in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/desktop.cxx:594:16
>     #34 0x7f0ac5bd96c6 in non-virtual thunk to framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/desktop.cxx
>     #35 0x7f0adc8e6a09 in unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /unotest/source/cpp/macros_test.cxx:72:62
>     #36 0x7f0af3eb9f62 in UnoApiTest::loadWithParams(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /test/source/unoapi_test.cxx:125:19
>     #37 0x7f0af3eb9098 in UnoApiTest::loadFromURL(rtl::OUString const&, char const*) /test/source/unoapi_test.cxx:107:5
>     #38 0x7f0af3eba994 in UnoApiTest::loadFromFile(std::basic_string_view<char16_t, std::char_traits<char16_t> >, char const*) /test/source/unoapi_test.cxx:132:5
>     #39 0x7f0b0e518798 in SdModelTestBase::createSdImpressDoc(char const*, char const*) /sd/qa/unit/sdmodeltestbase.hxx:54:13
>     #40 0x7f0b0e50fa7d in testRoundtripEmbeddedFontsPPTX::TestBody() /sd/qa/unit/FontEmbeddingTest.cxx:49:5

(<https://ci.libreoffice.org/job/lo_ubsan/3555/>)

Change-Id: I0fed461981c812a10ee88ea44629afe6c76525ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185086
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-05-09 11:51:17 +02:00
Stephan Bergmann a3c7481469 external/libeot: Conditionally --enable/disable-debug
But --enable-debug also unconditionally enables -Werror, and which would start
to cause lots of warning errors, so patch that out.

Change-Id: I9df4b3c924d6490c4f0c01d68808fb875e0517ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185085
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-05-09 11:51:06 +02:00
Stephan Bergmann b663c39157 -Werror,-Wunused-private-field
...after 7bc7ff06d7 "Remove 'StandardDir'"

Change-Id: I5d8ccfad8b1dcf7578687c2651ff4c91bb68937b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185078
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-05-09 10:15:15 +02:00
Stephan Bergmann fd8b519023 Avoid misaligned-pointer-use
...after d0ee08cfbf "oox: export embedded font
used in a presentation document" caused CppunitTest_vcl_font_ttf_structure_test
to fail with

> vcl/qa/cppunit/font/TTFStructureTest.cxx:47:5: runtime error: member call on misaligned address 0x7de9211e0262 for type 'o3tl::sal_uInt32_BE', which requires 4 byte alignment
> 0x7de9211e0262: note: pointer points here
>  00 00  00 00 80 00 00 af 10 00  20 48 00 00 00 00 00 00  00 00 57 33 43 00 00 40  00 20 f0 02 03 20
>               ^
>  #0 in (anonymous namespace)::testReadTTFStructure::TestBody() at vcl/qa/cppunit/font/TTFStructureTest.cxx:47:5

Change-Id: I4d46decd497fccf7eecdb38764ac82ed2a68b5d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184829
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-04-30 17:00:24 +02:00
Stephan Bergmann 648d97619c Fix tar extraction issues when running as root
Following up on 20b48ed9e3 "Fix check-if-root for
github.com/flathub-infra/vorarbeiter", the next issue those new github actions
based flathub test builds run into is

> tar: configure: Cannot change ownership to uid 1000, gid 1000: Invalid argument

etc. from the various UnpackedTarball targets.  The reason is that at least GNU
tar 1.35 defaults to --same-owner when run as root.  I hope the --no-same-owner
countermeasure is available on all the GNU and BSD tar versions that we care
about (it is at least supported by /usr/bin/tar bsdtar 3.5.3 on macOS Sequoia
15.4.1).

Change-Id: Ie9a17856f9bca752817d914e6dd1b9cb2b5ea699
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184645
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-04-25 22:28:34 +02:00
Stephan Bergmann dfbdb858e2 Instead of warning and failing, just do the right thing
After df83ad933b "fix harfbuzz build with
--enable-python=fully-internal on linux", my --enable-python=fully-internal
Linux builds that auto-detect MESON=/usr/bin/meson started to emit a configure
warning

> * WARNING : using internal python with a meson launcher might not work, best to use MESON=/path/to/meson.py in autogen.input

and then fail to build ExternalProject_harfbuzz with

> Traceback (most recent call last):
>   File "/home/sberg/lo/core/instdir/program/python-core-3.11.12/lib/importlib/metadata/__init__.py", line 563, in from_name
>     return next(cls.discover(name=name))
>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> StopIteration
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File "/usr/bin/meson", line 33, in <module>
>     sys.exit(load_entry_point('meson==1.7.0', 'console_scripts', 'meson')())
>              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/bin/meson", line 22, in importlib_load_entry_point
>     for entry_point in distribution(dist_name).entry_points
>                        ^^^^^^^^^^^^^^^^^^^^^^^
>   File "/home/sberg/lo/core/instdir/program/python-core-3.11.12/lib/importlib/metadata/__init__.py", line 982, in distribution
>     return Distribution.from_name(distribution_name)
>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/home/sberg/lo/core/instdir/program/python-core-3.11.12/lib/importlib/metadata/__init__.py", line 565, in from_name
>     raise PackageNotFoundError(name)
> importlib.metadata.PackageNotFoundError: No package metadata was found for meson

So better add back the idea from 736998ccef "Only
run meson from python when it apparently needs to be" (that had been removed
with df83ad933b "fix harfbuzz build with
--enable-python=fully-internal on linux") to treat a Meson executable that
doesn't advertise itself as being a Python script as just any plain executable,
which we don't throw at our --enable-python=fully-internal interpreter.  (Just
like, say, an Emscripten build of LO uses an emcc compiler executable that
internally uses Python, and onto which we don't force our
--enable-python=fully-internal interpreter, either.)

Change-Id: I13965ef08043f350e9614bd61a469708b7faf27b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184626
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-04-25 20:38:53 +02:00
Stephan Bergmann 20b48ed9e3 Fix check-if-root for github.com/flathub-infra/vorarbeiter
Pushing PRs to <https://github.com/flathub/org.libreoffice.LibreOffice> used to
trigger test builds on <https://buildbot.flathub.org/#/>, but has apparently
changed recently to triggering test builds on some github actions based
infrastructure, which then failed our check-if-root (see e.g.,
<https://github.com/flathub/org.libreoffice.LibreOffice/pull/323#issuecomment-2829465141>),
because systemd-detect-virt is apparently not available in those containers.
But those containers apparently do have container=flatpak in their env, so add
back the check for that from e19b67dcf5 "allow
building as root inside a container without complaint" (which had been removed
by 1eb1836178 "use systemd-detect-virt to detect
building as root in container").

Change-Id: Ib3cc5911826644ddfb4a9b6afb0da653c0546a1a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184614
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-04-25 13:09:52 +02:00
Stephan Bergmann 00e64d0490 Latest VS 2022 Preview is 17.14.0 Preview 4.0 now
..while latest proper VS 2022 is 17.13.6

Change-Id: I1c72cb27b00bee0ce7a382988c34a43e6a0d111a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184518
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-04-23 20:49:28 +02:00
Stephan Bergmann 17679f5cac Pass NINJA into Meson in ExternalProject_harfbuzz
...otherwise my macOS build with autogen.input containing (among others)

> NINJA=/Users/stephan/lo/lode/opt/bin/ninja

would have failed building ExternalProject_harfbuzz with

> ERROR: Could not detect Ninja v1.8.2 or newer

Change-Id: I39260ae7fea9808fe26b9e63c3c7aaaa4c27103d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184502
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-04-23 19:03:08 +02:00
Stephan Bergmann d0e6d192c2 These bogus -Wdangling-reference still hit with current GCC 16 trunk
Change-Id: I228e0b148d77b973afb4e35b8976438ba5a95967
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184517
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2025-04-23 19:02:52 +02:00
Stephan Bergmann f5cca58c2e Compare normalized nanosec timestamps in TemplateFolderCacheImpl::equalStates
After 9830fd36db "date/time IDL datatypes
incompatible change", 4fa553e407 "fdo#62088: Fix
regression introduced by the DateTime incompatible change." had fixed
writing/reading timestamps to/from the .templdir.cache file, by cutting from
nanosecond precision back to 1/100th-second precision.  But in the call to
TemplateFolderCacheImpl::equalState, the (cut-down) timestamps read from the
.templdir.cache file were then compared against (not--cut-down) timestamps
reported by the filesystem, potentially causing equalState to erroneously return
false.  (This is only relevant on Windows, as the non-Windows implementation in
sal/osl/unx/file_stat.cxx always sets Nanonsec = 0 for all the timestamps it
reports.)

Change-Id: I34b99024531d4d2e49bb53450e8f6fd13397f237
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184505
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-04-23 16:42:34 +02:00
Stephan Bergmann 28e542dc61 Avoid loplugin:redundantcast on macOS with recent LLVM 21 trunk
...including
<https://github.com/llvm/llvm-project/commit/b6b025797245a5e5416b522df041252e3c4ff868>
"Fix the signature for __builtin___clear_cache (#134376)", which now caused

> bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx:601:9: error: redundant reinterpret_cast, result is implicitly cast to void pointer [loplugin:redundantcast]
>   601 |         reinterpret_cast<char *>(const_cast<unsigned char *>(begin)),
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx:602:9: error: redundant reinterpret_cast, result is implicitly cast to void pointer [loplugin:redundantcast]
>   602 |         reinterpret_cast<char *>(const_cast<unsigned char *>(end)));
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Change-Id: I38e230af517a71016a7afaea4b72ffc91b00ef3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184499
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-04-23 15:22:09 +02:00
Stephan Bergmann fae15203e8 Emscripten: Provide Module.script
...which is useful for some downstream scripts

Change-Id: Ibf9d336fb4ad018dcaa5ed460cac1e8e5030ab50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184334
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2025-04-17 19:49:21 +02:00
Stephan Bergmann 36a4455b19 Fix the build
...after abc8ea2da2 "tdf#165742 Step 2: Create a
ChartType derived class for chartex funnel chart." got merged after
1aa34c45b6 "fold DataSeriesHelper functions into
DataSeries" and thus started to cause

> /Volumes/lode/lode/jenkins/workspace/lo_tb_master_mac_dbg/chart2/source/model/template/FunnelChartTypeTemplate.cxx:151:23: error: no member named 'setPropertyAlsoToAllAttributedDataPoints' in namespace 'chart::DataSeriesHelper'
>     DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints(xSeries, "BorderStyle",
>     ~~~~~~~~~~~~~~~~~~^
> /Volumes/lode/lode/jenkins/workspace/lo_tb_master_mac_dbg/chart2/source/model/template/FunnelChartTypeTemplate.cxx:161:27: error: no member named 'setPropertyAlsoToAllAttributedDataPoints' in namespace 'chart::DataSeriesHelper'
>         DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints(xSeries, "Geometry3D",
>         ~~~~~~~~~~~~~~~~~~^

(<https://ci.libreoffice.org//job/lo_tb_master_mac_dbg/50335/>) etc.

Change-Id: If9ebdc92b00511144ec9ed556aa80b1f49a0399e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184323
Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-04-17 15:00:15 +02:00
Stephan Bergmann 39bd06ad1e Hack to keep popup menus alive long enough for Emscripten Qt5
This fixes <https://github.com/allotropia/zetajs/issues/12> "Is it possible to
make context menu work?"

Change-Id: Ib89b638dd94210bae13017554c30c3172e299102
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184315
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2025-04-17 12:09:07 +02:00
Stephan Bergmann 736998ccef Only run meson from python when it apparently needs to be
...where "apparently needs to be" is approximated by the meson executable being
named *.py (which, in turn is approximated by some GNU Make $(filter) check).
This follows up on ae24fc8c63 "harfbuzz: migrate
to meson" and should avoid e.g. issues with --enable-python=fully-internal on
Linux like

> Traceback (most recent call last):
>   File "/home/sberg/lo/core/instdir/program/python-core-3.11.12/lib/importlib/metadata/__init__.py", line 563, in from_name
>     return next(cls.discover(name=name))
>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> StopIteration
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File "/usr/bin/meson", line 33, in <module>
>     sys.exit(load_entry_point('meson==1.7.0', 'console_scripts', 'meson')())
>              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/bin/meson", line 22, in importlib_load_entry_point
>     for entry_point in distribution(dist_name).entry_points
>                        ^^^^^^^^^^^^^^^^^^^^^^^
>   File "/home/sberg/lo/core/instdir/program/python-core-3.11.12/lib/importlib/metadata/__init__.py", line 982, in distribution
>     return Distribution.from_name(distribution_name)
>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/home/sberg/lo/core/instdir/program/python-core-3.11.12/lib/importlib/metadata/__init__.py", line 565, in from_name
>     raise PackageNotFoundError(name)
> importlib.metadata.PackageNotFoundError: No package metadata was found for meson
> make[1]: *** [/home/sberg/lo/core/external/harfbuzz/ExternalProject_harfbuzz.mk:47: /home/sberg/lo/core/workdir/ExternalProject/harfbuzz/build] Error 1

(<https://gerrit.libreoffice.org/c/core/+/183345/22#message-66c17b20610944c79d6d7206a62869ad430c3a60>
"harfbuzz: migrate to meson")

Change-Id: I44da7aebdc35a4be838046f0b065f1b646487156
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184254
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-04-16 12:22:51 +02:00
Stephan Bergmann 2adacda491 Add a test for three-segment ${file:segment:key} bootstrap references
Change-Id: I6d99cbdc5924b0afefaa1f5f7316824b81ccb474
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184179
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-04-15 08:01:29 +02:00
Stephan Bergmann 91fb11d1b2 Atomically write line plus newline into $SAL_LOG_FILE
At least on Windows, I see log files in the wild that have multiple lines from
different threads combined into one.  This has apparently been broken by
9f02755955 "WNT: allow to set log level/path from
file" switching to a use of std::endl, for unclear reasons.  (But, compared to
the version preceding that, keep the

  s << '\n';

after the ANDROID and sal_use_syslog branches, assuming those don't want a
newline added anyway.)

Change-Id: Ie68e015e594918d3480d05c741f83948f1c3d69e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183718
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2025-04-10 12:03:05 +02:00
Stephan Bergmann fd417165be Adapt external/epm to changed default patchlevel
...from 3709789a58 "gbuild: set default patchlevel
to 1", which broke --enable-epm

Change-Id: I20566b7b899a226b010f071d4e6a5db6e8a3da63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183864
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-04-09 10:00:49 +02:00
Stephan Bergmann 025bc00528 Adapt external/xsltml to changed default patchlevel
...from 3709789a58 "gbuild: set default patchlevel
to 1", which broke --enable-ext-wiki-publisher builds

Change-Id: Ieb21b5198257a655377652c457242a0e22fc9c95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183863
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-04-09 09:27:44 +02:00
Stephan Bergmann 538f3a4a82 Remove obsolete comment
...after 3709789a58 "gbuild: set default
patchlevel to 1"

Change-Id: I284e23d489a86ad59cf1623d11deebc363941e79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183862
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-04-09 09:27:10 +02:00
Stephan Bergmann 8b263f3a0b SAL_INFO when vnd.sun.star.expand is considered exotic
As discussed in the appertaining comments at
<https://gerrit.libreoffice.org/c/core/+/176645/3#message-1209b271ac4a330311eb90b2d6c16bbff57842ef>,
836d73a651 "consider VndSunStarExpand an exotic
protocol" may have been a bit brittle:  "[vnd.sun.star.expand] originated from
the UNO configuration infrastructure, but indeed hard to tell if it then found
reasonable uses outside that area.  I guess the best we can do is get it in,
maybe mention it in the release notes, and see."  Turns out it is used at least
to handle %origin% in extensions, where that change caused
<https://bugs.documentfoundation.org/show_bug.cgi?id=165851> "Installing custom
default template via extension stopped working".

So to be better prepared to track down potential further breakage caused by that
change, note cases where it (legitimately or problematically) hits with a
SAL_INFO.

Change-Id: If742f4f0b0f223e5acf346d294567ccc09eaf49b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183659
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-04-03 11:46:56 +02:00
Stephan Bergmann 274f1fb5f4 Fix some --without-system-jpeg builds
...like <https://ci.libreoffice.org/job/lo_daily_tb_linux_wasm/1026/>,

> wasm-ld: error: /home/tdf/lode/jenkins/workspace/lo_gerrit/tb/build_master/workdir/LinkTarget/StaticLibrary/liblibjpeg-turbo.a(jchuff.o): undefined symbol: jpeg_nbits_table

apparently broken with 451a7e9c43 "libjpeg-turbo:
upgrade to 3.0.4".  But just enabling the missing
workdir/UnpackedTarball/libjpeg-turbo/jpeg_nbits.cxx then caused

> workdir/UnpackedTarball/libjpeg-turbo/jpeg_nbits.c:29:27: error: expected ';' after top level declarator
>    29 | const unsigned char HIDDEN jpeg_nbits_table[65536] = {
>       |                           ^
>       |                           ;

so tweak external/libjpeg-turbo/jconfigint.h a bit more (cf.
workdir/UnpackedTarball/libjpeg-turbo/CMakeLists.txt and
workdir/UnpackedTarball/libjpeg-turbo/jconfigint.h.in).

Change-Id: I3ca1c78b467fb9f1d7584799591dbb8a797320ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183653
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-04-03 11:13:30 +02:00
Stephan Bergmann ff3c48c213 Fill in the flatpak appdata screenshot captions
...that had been left empty when they had been introduced in
<https://git.libreoffice.org/dev-tools/+/f96d7afbf282e5621697aca84177e42fe2cc2255%5E!>
"Adapt org.libreoffice.LibreOffice.appdata.xml".  (This should avoid the warning
"appstream-screenshot-missing-caption: One or more screenshots are missing
captions in the Metainfo file" from `flatpak run --command=flatpak-builder-lint
org.flatpak.Builder repo repo`, see
<https://docs.flathub.org/docs/for-app-authors/submission#run-the-linter>.)

Change-Id: Ib1f3a629cbb19229408f8d476a37385678a607d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183634
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-04-02 18:51:34 +02:00
Stephan Bergmann c36f235651 Drop .desktop suffix from flatpak appdata id
...that had been like that (for reasons that escape me now) ever since
<https://git.libreoffice.org/dev-tools/+/cb6ca493be62b59aa16c7ec6a051e594a1d92f18%5E!>
"Create a single-app LibreOffice.flatpak", but which causes an error
"appstream-id-mismatch-flatpak-id: The ID tag:
org.libreoffice.LibreOffice.desktop in Metainfo does not match the FLATPAK_ID:
org.libreoffice.LibreOffice" from `flatpak run --command=flatpak-builder-lint
org.flatpak.Builder repo repo` (see
<https://docs.flathub.org/docs/for-app-authors/submission#run-the-linter>)

Change-Id: I0823020e6de20930b1ef8d5205fcf49ac2319a92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183633
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-04-02 18:51:11 +02:00
Stephan Bergmann 08ef545000 configmgr: Let XRegistryKey::getLongValue return boolean values, too
Ever since 21d42ab495 "#75148# check security and
netaccess are set now", getJavaPropsFromSafetySettings in
stoc/source/javavm/javavm.cxx tries to read a Security property (of type
xs:boolean in officecfg/registry/schema/org/openoffice/Office/Java.xcs) via
XRegistryKey::getLongValue.  While this may have worked with the previous
configmgr implementation, it now just always caused an exception (that would
have been swalled in initVMConfiguration in stoc/source/javavm/javavm.cxx).

Not sure if there are any other places where code expects to read a boolean
property value from the configuration via XRegistryKey::getLongValue, but lets
better add that (back) as a (hopefully) harmless extension.

Change-Id: I33ca60595da8fd79fb9250d74f36be0b328d610f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183269
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-03-24 17:02:26 +01:00
Stephan Bergmann 941213ec20 Avoid exception when reading nil NetAccess value
The NetAccess property in
officecfg/registry/schema/org/openoffice/Office/Java.xcs is nillable and has no
default value, so reading it here via XRegistryKey::getLongValue would typically
have caused an exception (that would have been swallowed in initVMConfiguration,
but would have caused the remainder of getJavaPropsFromSafetySettings to be
skipped).

Change-Id: If53986900917de20366f9517b9eae16227d69cf8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183268
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2025-03-24 17:01:58 +01:00
Stephan Bergmann b936f80d96 Adapt to LLVM 21 trunk MemberPointerType change
<github.com/llvm/llvm-project/commit/14f7bd63b95d0f61a6f47119ac66398ca230559a>
"Reland: [clang] preserve class type sugar when taking pointer to member
(#132401)"

Change-Id: Ie409324fcf3b98cd733cc46e06ee9e99dc140968
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183250
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-03-24 07:29:56 +01:00
Stephan Bergmann cbe801780a Emscripten Qt5: Reliably send cut/copy data to browser Clipboard API
Change-Id: I11204b77649e0543f5350546505dbe965a2a471c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183160
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-03-20 16:50:37 +01:00
Stephan Bergmann 1d8ff7bd62 XClipboardOwner::lostOwnership is documented to take the old content
...so passing in the clear()'ed m_aContents is apparently a bug introduced in
4df7758dbd "INTEGRATION: CWS vcl17 (1.9.52); FILE
MERGED".  (But convert back to the name xTrans introduced there; it looks more
meaningful than the xKeepAlive to which it had been renamed in
b9fe4f26ea "rename some local variables".)

Change-Id: I05254d7f06a956655fdc215c8956aa5f207de42f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183137
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-03-19 20:43:25 +01:00
Stephan Bergmann bc77818fc7 Remove some redundant uses of o3tl::narrowing
...that narrowed to exactly the parameter type taken by InsUInt16 and InsInt16,
respectively

Change-Id: I59ffd4543d7c40867714dd90786a4366711fa234
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183136
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-03-19 20:35:20 +01:00
Stephan Bergmann 08d2454dd9 loplugin:nullptr
Change-Id: I088338591dbacc41a0465d2e5e42f74f0c4dc258
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183012
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2025-03-17 08:35:00 +01:00
Stephan Bergmann 493e37d16c Avoid -Werror,-Wnull-dereference
Change-Id: Ibfc0111a61817b7cf8c5b60d3f9563fd3cf05c5c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183011
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2025-03-17 07:53:47 +01:00
Stephan Bergmann 8192e71eca Simplify OUString -> std::u16string_view
...following up on 26d0af9ddc "Revert 'tdf#158068:
Replace with static constexpr O(U)String'"

Change-Id: I75464cc7ad310f48d0a79662a5e952d0debeda91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183010
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-03-17 07:52:15 +01:00
Stephan Bergmann f8a08b2515 -Werror,-Wunused-private-field
...since 98b86bff2c "tdf#165606 sd: fix master
slide panel doesn't resized correctly"

Change-Id: Ie67b2cdbb9b870aa299b33ad0b8428ce7eb88618
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182996
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-03-16 13:14:29 +01:00
Stephan Bergmann 21aad3fb12 UBSan apparently needs ScDatabaseRangeObj RTTI now
...as CppunitTest_sc_dataprovider started to fail with

> [_RUN_____] ScDataProvidersTest::testCSVImport
> warn:sal.osl:2875534:2875534:sal/osl/unx/module.cxx:103: dlopen(/home/sberg/lo/core/instdir/program/libscfiltlo.so, 1): /home/sberg/lo/core/instdir/program/libscfiltlo.so: undefined symbol: _ZTI18ScDatabaseRangeObj

Change-Id: I4c75c770951dd7ed6506ecd35fd574c28c41381d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182995
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-03-16 13:14:06 +01:00
Stephan Bergmann 26d0af9ddc Revert "tdf#158068: Replace with static constexpr O(U)String"
This reverts commit 817cb41005, as it causes

> desktop/source/app/crashreport.cxx:197:26: error: view pointing into temporary i.e. dangling [loplugin:stringviewdangle]
>   197 |         aCommandSeperator=u","_ustr;
>       |         ~~~~~~~~~~~~~~~~~^~~~~~~~~~

Change-Id: I787e4997c536f8bb37973da33c9ca1d660f2698c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182993
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-03-16 12:27:53 +01:00
Stephan Bergmann 4f03d1c238 css.lang.XSingleServiceFactory must not be @deprecated
...which caused cppumaker to emit the corresponding C++ class as
SAL_DEPRECATED_INTERNAL (since 44ea5d1414 "Adding
SAL_DEPRECATED_INTERNAL to an implementation function is pointless"), which
caused compilers to emit warnings upon its legitimate uses in external
!LIBO_INTERNAL_ONLY code

Change-Id: I8043506cd11658164e68f8743702acbc1a8213f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182832
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-03-12 17:21:17 +01:00
Stephan Bergmann 376466a745 Emscripten: Pre-cancel synchronous execution of modal dialogs
...which would run into Application::Yield -> std::abort, so better live with
this hack for now.  (The way forward would be to either asyncify relevant
dialogs, or move to Qt6 and --enable-emscripten-jspi.)

Change-Id: I143747cc32fb163e4908fa42b031e4eaea697d29
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182731
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2025-03-10 13:55:42 +01:00
Stephan Bergmann 8888e6f42d Emscripten: Hack to not call Application::Yield when loading xslt
...fixing one part of <https://github.com/allotropia/zetajs/issues/11> "The
conversion of PPTX and XLSX files failed."

Change-Id: I9f4dc63f424eeafd36c139c64260b179cb9ff24c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182718
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2025-03-10 13:55:03 +01:00
Stephan Bergmann 541eacf801 Reinstate the JDK_SECURITYMANAGER_DISALLOWED_FOR_BUILD workaround
...for Java versions < 24.  As discussed in the comments starting at
<https://gerrit.libreoffice.org/c/core/+/132558/4#message-4fd391160f395455362289909dadb7d2663f4ff2>
"Allow building against JDK 18", the previous
35d9ec3e59 "Remove the
JDK_SECURITYMANAGER_DISALLOWED_FOR_BUILD workaround" had started to resurface
the old "exception and build failure with JDK 21/22/23 on macOS Sequoia."

So keep the workaround for Java versions < 24, and hope that we won't run into
scenarios where we combine a Java version >= 24 (for which the workaround would
cause the new build failure) with an Ant version that requires the workaround.

Change-Id: Ib886f68d5c17ace2384f22672dcc2d0478830228
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182454
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2025-03-04 11:43:20 +01:00
Stephan Bergmann 8f8e84eddb Missing test dependency
> [_RUN_____] CRMDBTest::testCRMDatabase
[...]
> java.lang.ClassNotFoundException: org.hsqldb.jdbcDriver
> 	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:349)
> 	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:557)
> 	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:490)
> unknown:0:CRMDBTest::testCRMDatabase
> An uncaught UNO exception
> - com.sun.star.sdbc.SQLException: {Message: "The driver class “org.hsqldb.jdbcDriver” could not be loaded.The additional driver class path is “vnd.sun.star.expand:$LO_JAVA_DIR/hsqldb.jar vnd.sun.star.expand:$LO_JAVA_DIR/sdbc_hsqldb.jar”. at /home/sberg/lo/core/connectivity/source/drivers/jdbc/JConnection.cxx:674", Context: @0x7b373fdfdb70, SQLState: "", ErrorCode: 1000, NextException: com.sun.star.sdbc.SQLException: {Message: "org.hsqldb.jdbcDriver at /home/sberg/lo/core/connectivity/source/drivers/jdbc/Object.cxx:185", Context: @0x7b373fd19b70, SQLState: "", ErrorCode: -1, NextException: void: void}}

Change-Id: I4aeadfcf2a5c82eea4bf1fd646bceba4e8da5f4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182422
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2025-03-03 13:43:37 +01:00
Stephan Bergmann 35d9ec3e59 Remove the JDK_SECURITYMANAGER_DISALLOWED_FOR_BUILD workaround
...that had been introduced with 19de5d97ef "Allow
building against JDK 18" to work around odd failures of ExternalProject_hsqldb
with whatever versions of JDK 18 and Ant I had been using at that time.

However, with java-latest-openjdk-24.0.0.0.36-1.rolling.fc41.x86_64 that
workaround now started to make ExternalProject_hsqldb fail for me with

> ERROR: JVMTI: 112(JVMTI_ERROR_WRONG_PHASE): Cannot get thread info
> ERROR: JVMTI: 112(JVMTI_ERROR_WRONG_PHASE): jvmtiEnv::GetLoadedClasses()
> Error occurred during initialization of VM
> java.lang.Error: A command line option has attempted to allow or enable the Security Manager. Enabling a Security Manager is not supported.
> 	at java.lang.System.initPhase3(java.base@24/System.java:1947)

apparently because of <https://openjdk.org/projects/jdk/24/>'s
<https://openjdk.org/jeps/486> "JEP 486: Permanently Disable the Security
Manager".

But with the ant-1.10.14-13.fc41.noarch I'm using now, neither
java-21-openjdk-21.0.6.0.7-6.fc41 (I no longer have the problematic-back-then
JDK 18) nor java-latest-openjdk-24.0.0.0.36-1.rolling.fc41.x86_64 appear to need
that workaround anymore anyway (presumably because "an updated version of Apache
Ant [has] become available", as discussed in the commit message of that
19de5d97ef).

Change-Id: Id13b57559df486012c888247c96323716168c97d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182419
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-03-03 10:27:06 +01:00
Stephan Bergmann 5f46f5b730 Work around epm failure with readme file gone from SDK
...with 01ae181574 "Remove readme file from SDK",
after which Linux --with-package-format=deb or --with-package-format=rpm builds
had started to fail with errors like

> : *****************************************************************
> : ERROR: ERROR: Could not find readme file README_en-US (C) at /home/sberg/lo2/source/solenv/bin/modules/installer/epmfile.pm line 488.
> : *****************************************************************
>
> make[1]: *** [/home/sberg/lo2/source/instsetoo_native/CustomTarget_install.mk:123: sdkoo‧en-US‧_SDK‧‧deb‧nostrip] Error 1

epm demands a %readme line in its input (cf.

>   if (!dist->product[0] ||
>       !dist->copyright[0] ||
>       !dist->vendor[0] ||
>       !dist->license[0] ||
>       !dist->readme[0] ||
>       !dist->version[0])
>   {
>     fputs("epm: Error - missing %product, %copyright, %vendor, %license,\n", stderr);
>     fputs("     %readme, or %version attributes in list file!\n", stderr);

in workdir/UnpackedTarball/epm/epm.c), but doesn't seem to actually need it, at
least in this scenario.  So use NO_README_IN_ROOTDIR, which happens to be set
exactly for LibreOffice_SDK and LibreOfficeDev_SDK in
instsetoo_native/util/openoffice.lst.in, as a flag to provide a dummy %readme
line for epm, which appears to work well.

Change-Id: I350c5914cd7b6d2f61cdd3d1ed4db7f7cc50c627
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182285
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-02-27 16:16:58 +01:00
Stephan Bergmann e1e6f5c7d0 Remove workaround for old Android NDK
...which had been added with 41ab6a5dfa "struct SN
needs a strict weak ordering operator <" and should no longer be necessary
since2b68bf57789714bf79b5bd1fc3e4e9ad586b7c31 "android: Update minimum NDK
version to 27"

Change-Id: I8a2fb01804ed6220bb927175992b4d5015b0d7e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182281
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-02-27 13:38:07 +01:00
Stephan Bergmann 2933da2006 Emscripten: Let runUnoScriptUrls handle all scripts in one go
...so that the !HAVE_EMSCRIPTEN_PROXY_TO_PTHREAD case (introduced in
bc60c54878 "If necessary, fall back to an
approximation of WorkerGlobalScope.importScripts") can make sure that one script
is fully evaluated before the next is loaded, to avoid a race when some script
depends on an earlier script

Change-Id: I5fca4d7aa5d7e9b8d86b59667c599f62f1f3064c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181905
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2025-02-20 08:09:33 +01:00
Stephan Bergmann 7a84593ec1 Create Data on demand in comphelper::emscriptenthreading::getData
...and get rid of comphelper::emscriptenthreading::setUp.  This will help with a
potentially forthcoming change to move initUno in desktop/source/app/appinit.cxx
to the eventHandlerThread (so code in both desktop and in vcl/qt5 would need the
comphelper::emscriptenthreading::Data and it would be unclear which should call
setUp).

Change-Id: I157f80a450d8eeabd6d0317c881c6a9ea67fc59a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181908
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2025-02-19 23:25:55 +01:00
Stephan Bergmann 5e1973754a Redesign comphelper::emscriptenthreading::Data::eventHandlerThread
Instead of being a thread that keeps blocking in C++
emscripten::ProxyingQueue::execute(), make it a thread that immediately goes
back to the browser event loop via emscripten_exit_with_live_runtime().  (Which
will eventually allow setupMainChannel from desktop/source/app/appinit.cxx to
run on that thread and receive the "LOWA-channel" JS message event.)

The thread is detached now and no longer joined in
comphelper::emscriptenthreading::tearDown, but that was mostly academic anyway
(as LOWA doesn't terminate in the traditional sense, and just stops when you
close its browser tab).

Change-Id: I32270cfc602549cf26b99c6f66811b3aca5ea5c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181907
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2025-02-19 23:25:42 +01:00
Stephan Bergmann 71e781cbe5 Introduce DBG_TESTNOTSOLARMUTEX, to complement DBG_TESTSOLARMUTEX
...and use it in one place for the experimental Emscripten Qt6
JSPI/non-PROXY_TO_PTHREAD mode (where I have a hunch that some of the deadlocks
I experience in that experimental mode are due to a mis-locked SolarMutex)

Change-Id: Ifb335202569b7d2beecd7a502064ebcfdaaddbab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181872
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-02-19 12:38:29 +01:00
Stephan Bergmann ce4e8a5686 Emscripten: Make --with-main-module easier to extend in the future
...beyond calc and writer

Change-Id: I68a1e65cc45c4188c50b27172d644818ac874def
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181856
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2025-02-19 09:52:35 +01:00
Stephan Bergmann fe678ffc6f Emscripten: No need to pass --with-main-module into build configure
No idea why 97ee126d69 "WASM add Calc as optional
build result, make it build & run" had added that.  ENABLE_WASM_STRIP_CALC and
ENABLE_WASM_STRIP_WRITER will always be set to empty values in config_build.mk
anyway.

Change-Id: I07a3863f8396149481507f5ed558d130e34a44dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181855
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2025-02-19 09:52:26 +01:00
Stephan Bergmann 46cadd6b03 Some more need for EmscriptenLightweightRunInMainThread
This code can be reached e.g. when
<https://github.com/allotropia/zetajs/blob/main/examples/simple-examples/rainbow_writer.js>
is executed not on the main browser thread,

> Aborted(Assertion failed: invalid handle: 14)
> threadPrintErr	@	soffice.js:900
> abort	@	soffice.js:1202
> assert	@	soffice.js:658
> toValue	@	soffice.js:7308
> __emval_call_method	@	soffice.js:9856
> $QWasmWindow::frameMargins() const	@	soffice.wasm:0x83de160
> $QWasmWindow::setGeometry(QRect const&)	@	soffice.wasm:0x83dd1a6
> $QWindow::setGeometry(QRect const&)	@	soffice.wasm:0x7cfd8a1
> $QWindow::setPosition(int, int)	@	soffice.wasm:0x7cff114
> $QWidgetPrivate::setGeometry_sys(int, int, int, int, bool)	@	soffice.wasm:0x8041fd9
> $QWidget::move(QPoint const&)	@	soffice.wasm:0x80419ab
> $QtFrame::SetScreenNumber(unsigned int)	@	soffice.wasm:0x65b5c61
> $QtFrame::ShowFullScreen(bool, long)	@	soffice.wasm:0x65b418f
> $non-virtual thunk to QtFrame::ShowFullScreen(bool, long)	@	soffice.wasm:0x65b4231
> $WorkWindow::ShowFullScreenMode(bool)	@	soffice.wasm:0x1553b3f
> $VCLXTopWindow::setFullScreen(unsigned char)	@	soffice.wasm:0x123f6b4
> $non-virtual thunk to VCLXTopWindow::setFullScreen(unsigned char)	@	soffice.wasm:0x123f727
> $callVirtualFunction_vii	@	soffice.wasm:0x659ab75
> $callVirtualFunction(std::__2::basic_string_view<char, std::__2::char_traits<char>>, unsigned long, unsigned long long const*, void*)	@	soffice.wasm:0x6526a40
> $(anonymous namespace)::call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, _typelib_TypeDescriptionReference*, long, _typelib_MethodParameter*, void*, void**, _uno_Any**)	@	soffice.wasm:0x651f2ea
> $unoInterfaceProxyDispatch	@	soffice.wasm:0x651e742
> $stoc_corefl::(anonymous namespace)::IdlAttributeFieldImpl::set(com::sun::star::uno::Any&, com::sun::star::uno::Any const&)	@	soffice.wasm:0x64ec9ec
> $non-virtual thunk to stoc_corefl::(anonymous namespace)::IdlAttributeFieldImpl::set(com::sun::star::uno::Any&, com::sun::star::uno::Any const&)	@	soffice.wasm:0x64ecb76
> $(anonymous namespace)::ImplIntrospectionAccess::setPropertyValue(rtl::OUString const&, com::sun::star::uno::Any const&)	@	soffice.wasm:0x64a4ec4
> $non-virtual thunk to (anonymous namespace)::ImplIntrospectionAccess::setPropertyValue(rtl::OUString const&, com::sun::star::uno::Any const&)	@	soffice.wasm:0x64a8b18
> $stoc_inv::(anonymous namespace)::Invocation_Impl::setValue(rtl::OUString const&, com::sun::star::uno::Any const&)	@	soffice.wasm:0x64b3e81
> $non-virtual thunk to stoc_inv::(anonymous namespace)::Invocation_Impl::setValue(rtl::OUString const&, com::sun::star::uno::Any const&)	@	soffice.wasm:0x64b66bc
> $emscripten::internal::MethodInvoker<emscripten::internal::rvp::default_tag, void (com::sun::star::script::XInvocation::*)(rtl::OUString const&, com::sun::star::uno::Any const&), void, com::sun::star::script::XInvocation*, rtl::OUString const&, com::sun::star::uno::Any const&>::invoke(void (com::sun::star::script::XInvocation::* const&)(rtl::OUString const&, com::sun::star::uno::Any const&), com::sun::star::script::XInvocation*, rtl::OUString*, com::sun::star::uno::Any*)	@	soffice.wasm:0x48dbe6
> uno_Type_com$sun$star$script$XInvocation.setValue	@	VM1145:10
> invokeSetter	@	zeta.js:444
> Object.defineProperty.set	@	zeta.js:485
> (anonymous)	@	rainbow_writer.js:36
> setInterval
> demo	@	rainbow_writer.js:36

Change-Id: I9380e2aba1d87cef6ce858b7755bdd3f01484021
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181832
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-02-18 16:01:25 +01:00
Stephan Bergmann 1f24fd9376 Emscripten: Add ClassHandle to EXPORTED_RUNTIME_METHODS
...as it is used since the initial commit of
<https://github.com/allotropia/zetajs/blob/7122b81eface9d435fe4e4dd7b65582e30e1368b/source/jsuno.js#L65>
(and where it should arguably be used as Module.ClassHandle rather than just as
plain ClassHandle, but which requires it to be listed in
EXPORTED_RUNTIME_METHODS)

Change-Id: Ic2f32eab8e61d06a0c68241a46cda3d81a121dda
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181831
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-02-18 14:29:13 +01:00
Stephan Bergmann 6bb0c4ee58 Missing delete of emscriptenthreading::Data
...lacking from 3645088025 "Experimental
Emscripten Qt6 --enable-emscripten-proxy-to-pthread ersatz", but rather academic
anyway, as LOWA doesn't terminate in the traditional sense (and just stops when
you close its browser tab)

Change-Id: I04d5ccbd5b9fa8350a9e3d949bf3903bc4692c53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181823
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-02-18 12:52:43 +01:00
Stephan Bergmann 696c241c03 Some more need for EmscriptenLightweightRunInMainThread
Calls to qApp->devicePixelRatio() can internally call out to
main-browser-thread-only JS objects when the data keeps getting invalidated by
e.g.

>       setInterval(function() { window.dispatchEvent(new Event('resize')); }, 1000);

at
<https://github.com/allotropia/zetajs/commit/c7d80ed5c2d7336d0daedf8c34ac4055fb7f9626#diff-9fc68f096a70ca06e4a5b52d47a44abebeec78c757dab340b9b177cac35a65a8R42>.

Change-Id: Ic1387f2a49c9a231842d88b6220f8efc8bc32479
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181682
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2025-02-17 10:54:52 +01:00
Stephan Bergmann 1c928cb4f3 Support non-void QtInstance::EmscriptenLightweightRunInMainThread return types
Change-Id: Ic0e02dd21c6dd59dc89088c3e797788bcea91273
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181763
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-02-17 10:54:42 +01:00
Stephan Bergmann bc60c54878 If necessary, fall back to an approximation of WorkerGlobalScope.importScripts
...for --disable-emscripten-proxy-to-pthread, where runUnoScriptUrl is run on
the browser main thread

Change-Id: I49c44219b7f77bbc8552994fe3e8483ae0e138fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181663
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-02-14 14:46:54 +01:00
Stephan Bergmann d64d8bd8bc Instances of salhelper::Thread must not be allocated on the stack
...as salhelper::Thread::onTerminated() calls
salhelper::SimpleReferenceObject::release() calls delete this

Change-Id: I3d64882dab014e270806fcc12461f816bc9d101d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181631
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-02-13 22:48:35 +01:00
Stephan Bergmann 5c357a4c66 Fix plain LOWA build
...after 3645088025 "Experimental Emscripten Qt6
--enable-emscripten-proxy-to-pthread ersatz" made it fail with

> em++: error: undefined exported symbol: "__ZN10emscripten8internal13MethodInvokerINS0_3rvp11default_tagEMN7qstdweb13EventListenerEFvNS_3valEEvPS5_JS6_EE6invokeERKS8_S9_PNS_7_EM_VALE" [-Wundefined] [-Werror]

when linking Executable_soffice_bin

Change-Id: Ia8089e0b7f6330b42ffcdeba80cc8636bf1ea314
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181492
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-02-12 16:45:56 +01:00
Stephan Bergmann 3645088025 Experimental Emscripten Qt6 --enable-emscripten-proxy-to-pthread ersatz
With Qt5, the (enabled by default) --enable-emscripten-proxy-to-pthread (i.e.,
leveraging Emscripten's -sPROXY_TO_PTHREAD) works reasonably well with the
handful of hacks we added to our Qt5 5.15.2+wasm branch.  However, for Qt6 any
necessary hacking there would need to be excessive and looks unrealistic (see
the mailing list thread starting at
<https://lists.qt-project.org/pipermail/development/2024-December/045960.html>
"[Development] Wasm: Support for Emscripten PROXY_TO_PTHREAD?" and the
presentation at
<https://fosdem.org/2025/schedule/event/fosdem-2025-5169-lowa-in-need-of-a-vcl-plug/>).

But when leveraging the upcoming browser support for JSPI (through Emscripten's
-sJSPI, Qt6's -feature-wasm-jspi, and our --enable-emscripten-jspi), it looks
feasible to leave the Qt6 code alone and instead of proxying the complete
application main thread (including the Qt6 event handling) off the browser main
thread to an additional thread (automatically set up through Emscripten
-sPROXY_TO_PTHREAD), to just proxy some of the LO event handling off the browser
main thread to an additional thread (set up through a new
comphelper::emscriptenthreading::setUp).  That way, problematic LO code that is
triggered from event handling (like "Tools - Extensions..." wanting to spawn
additional threads, which requires the browser main thread to be unblocked) can
be offloaded to the additional thread and get the browser main thread unblocked.

Thus there is a new "Emscripten Qt6 JSPI/non-PROXY_TO_PTHREAD" mode now (via
--enable-qt6 --enable-emscripten-jspi --disable-emscripten-proxy-to-pthread).
It is still experimental and known to occasionally hang and crash, but has been
seen to generally work at least with recent emsdk 4.0.3 and a recent Qt dev
branch (towards Qt 6.10, built with -feature-wasm-jspi) and running on recent
Chrome 132 with "Experimental WebAssembly JavaScript Promise Integration (JSPI)"
enabled under <chrome://flags>.

There are two places where code is proxied off the browser main thread to the
additional thread:  One is QtInstance::ProcessEvent, the other is invoking
certain kinds of tasks (just "vcl::Dialog maLayoutIdle", for now) in
Scheduler::CallbackTaskScheduling (unconditionally proxying off all kinds of
tasks there appeared to cause more issues than it would solve).  For the latter,
the concept of "transferability" has been added to class Task; the new
Emscripten mode is the only case making use of that concept.

Also for the latter, it is important that the browser main thread does not get
blocked at the

>     SolarMutexGuard aGuard;

in QtTimer::timeoutActivated when such a timer event happens while the
additional thread has the SolarMutex locked and tries to do something that
requires the browser main thread to not be blocked (like spawning additional
threads upon "Tools - Extensions...").  Therefore, as a bad hack, and only for
the new Emscripen mode, that SolarMutexGuard has been moved from
QtTimer::timeoutActivated down to the call of pTask->Invoke() in
Scheduler::CallbackTaskScheduling (see the two TODO comments added to the code).
This appears to work relatively well, but is still a bad hack that should rather
be done properly.

And then there's some code across vcl/qt5 that may now end up running proxied
off the browser main thread, but which actually requires to be run on the
browser main thread (because, e.g., it calls into Qt6 code that accesses JS
entities that are only available there).  Those places use a newly introduced
QtInstance::EmscriptenLightweightRunInMainThread that takes some code via a
lambda:  For the new Emscripten mode, the code is explicitly proxied back to the
browser main thread, while in all other cases it is run directly in place.

Some further notes:

* -sPTHREAD_POOL_SIZE needed to be bumped by one, to accommodate for the
  additional new thread.

* The code requires two additional JSPI "entry points",
  _emscripten_check_mailbox (to complement the suspension in
  QtInstance::ProcessEvent) and the invocation of the Qt6-internal
  qstdweb::EventListener::handleEvent (to complement a Qt6-internal suspension
  point hit when e.g. doing "Tools - Extension Manager..." and clicking "Add").

* The new Emscripten mode requires -fexperimental-library (for std::jthread and
  std::stop_token) when building at least with emsdk 4.0.3, but it shouldn't
  hurt to have that switch enabled unconditionally for Emscripten builds (which
  are self-contained, so can't be hit by any compatibility issues that switch
  might cause).

Change-Id: Id3b13e2cc3c304b072f388c6d736e7e663b36c58
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181424
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-12 13:14:26 +01:00
Stephan Bergmann a0ffaeeff9 Shrink critical section into writeModFile
...from the calling configmgr::Components::WriteThread::execute.  This is
relevant at least for an upcoming Emscripten Qt6 JSPI/non-PROXY_TO_PTHREAD mode,
where part of the LO event handling (which would normally take place on the main
thread) will be offloaded to an additional thread.  There, opening e.g. a fresh
Writer document shortly after starting LO could have lead to a deadlock:

The configmgrWriter thread had the configmgr::Components mutex locked and tried
to do a mkdir, which it needs to proxy to the main thread on Emscripten,

> $emscripten_futex_wait (soffice.wasm:0x83dbf64)
> $__timedwait_cp (soffice.wasm:0x83e7f34)
> $__pthread_cond_timedwait (soffice.wasm:0x83e8168)
> $pthread_cond_wait (soffice.wasm:0x83e85a2)
> $emscripten_proxy_sync_with_ctx (soffice.wasm:0x83e6709)
> $emscripten_proxy_sync (soffice.wasm:0x83e6a08)
> $_emscripten_run_on_main_thread_js (soffice.wasm:0x83e6d77)
> ret.<computed> (soffice.js:8709)
> (anonymous) (soffice.js:1285)
> proxyToMainThread (soffice.js:1617)
> ___syscall_mkdirat (soffice.js:6613)
> $mkdir (soffice.wasm:0x83e3e0a)
> $osl::mkdir(rtl::OString const&, unsigned int) (soffice.wasm:0xbce7b3)
> $create_dir_with_callback(char*, void (*)(void*, _rtl_uString*), void*) (soffice.wasm:0xbdc4d6)
> $create_dir_recursively_(char*, void (*)(void*, _rtl_uString*), void*) (soffice.wasm:0xbdc422)
> $osl_createDirectoryPath (soffice.wasm:0xbdc35f)
> $configmgr::writeModFile(configmgr::Components&, rtl::OUString const&, configmgr::Data const&) (soffice.wasm:0x4218d80)
> $configmgr::Components::WriteThread::execute() (soffice.wasm:0x41f561d)
> $non-virtual thunk to salhelper::Thread::run() (soffice.wasm:0xd369fd)
> $threadFunc (soffice.wasm:0xd36890)
> $osl_thread_start_Impl(void*) (soffice.wasm:0xbca617)

...while the main thread was serving a proxied call from the additional "event
handling offload" thread, during which it accesses configmgr code and tried to
lock the configmgr::Components mutex,

> $a_cas_p (soffice.wasm:0x83dc0d9)
> $futex_wait_main_browser_thread (soffice.wasm:0x83dbfed)
> $emscripten_futex_wait (soffice.wasm:0x83dbf23)
> $__timedwait_cp (soffice.wasm:0x83e7f34)
> $__timedwait (soffice.wasm:0x83e7fd2)
> $__pthread_mutex_timedlock (soffice.wasm:0x83e9323)
> $__pthread_mutex_lock (soffice.wasm:0x83e9208)
> $osl_acquireMutex (soffice.wasm:0xbbc750)
> $configmgr::Access::thisIs(int) (soffice.wasm:0x41dc351)
> $configmgr::Access::getByName(rtl::OUString const&) (soffice.wasm:0x41e13b3)
> $non-virtual thunk to configmgr::Access::getByName(rtl::OUString const&) (soffice.wasm:0x41e159a)
> $comphelper::detail::ConfigurationWrapper::getPropertyValue(std::__2::basic_string_view<char16_t, std::__2::char_traits<char16_t>>) const (soffice.wasm:0xc2f8fe)
> $comphelper::ConfigurationProperty<officecfg::Office::Common::Misc::ViewerAppMode, bool>::get(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (soffice.wasm:0xdfbc05)
> $SfxDispatcher::FindServer_(unsigned short, SfxSlotServer&) (soffice.wasm:0xdfb6d4)
> $SfxDispatcher::GetShellAndSlot_Impl(unsigned short, SfxShell**, SfxSlot const**, bool, bool) (soffice.wasm:0xdfb398)
> $SfxDispatcher::QueryState(unsigned short, com::sun::star::uno::Any&) (soffice.wasm:0xe01fe3)
> $SfxDispatchController_Impl::addStatusListener(com::sun::star::uno::Reference<com::sun::star::frame::XStatusListener> const&, com::sun::star::util::URL const&) (soffice.wasm:0xe1d5bd)
> $SfxOfficeDispatch::addStatusListener(com::sun::star::uno::Reference<com::sun::star::frame::XStatusListener> const&, com::sun::star::util::URL const&) (soffice.wasm:0xe1d4ce)
> $non-virtual thunk to SfxOfficeDispatch::addStatusListener(com::sun::star::uno::Reference<com::sun::star::frame::XStatusListener> const&, com::sun::star::util::URL const&) (soffice.wasm:0xe1daa6)
> $svt::PopupMenuControllerBase::updateCommand(rtl::OUString const&) (soffice.wasm:0x20cd630)
> $svt::PopupMenuControllerBase::updatePopupMenu() (soffice.wasm:0x20cd460)
> $framework::HeaderMenuController::updatePopupMenu() (soffice.wasm:0x29a0323)
> $svt::PopupMenuControllerBase::setPopupMenu(com::sun::star::uno::Reference<com::sun::star::awt::XPopupMenu> const&) (soffice.wasm:0x20cf1bb)
> $non-virtual thunk to svt::PopupMenuControllerBase::setPopupMenu(com::sun::star::uno::Reference<com::sun::star::awt::XPopupMenu> const&) (soffice.wasm:0x20cf1e0)
> $framework::MenuBarManager::CreatePopupMenuController(framework::MenuBarManager::MenuItemHandler*, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&) (soffice.wasm:0x217c209)
> $framework::MenuBarManager::Activate(Menu*) (soffice.wasm:0x218130b)
> $framework::MenuBarManager::Activate(Menu*) (soffice.wasm:0x2180b17)
> $framework::MenuBarManager::LinkStubActivate(void*, Menu*) (soffice.wasm:0x2180126)
> $Menu::Activate() (soffice.wasm:0x14d68e0)
> $Menu::HandleMenuActivateEvent(Menu*) const (soffice.wasm:0x14df42c)
> $QtMenu::DoFullMenuUpdate(Menu*) (soffice.wasm:0x6617932)
> $QtMenu::SetFrame(SalFrame const*) (soffice.wasm:0x661738a)
> $std::__2::__function::__func<QtMenu::SetFrame(SalFrame const*)::$_0, std::__2::allocator<QtMenu::SetFrame(SalFrame const*)::$_0>, void ()>::operator()() (soffice.wasm:0x661c275)
> $QtInstance::EmscriptenProxyToMainThread(std::__2::function<void ()>)::$_0::__invoke(void*) (soffice.wasm:0x65b24e4)

Change-Id: Iee58b86a96147273b7ae288524513e0d174287a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181353
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-02-10 17:38:57 +01:00
Stephan Bergmann 437b4d802c Fix default value of Emscripten --with-main-module
...broken by 12ed25fb94 "Support Emscripten
--with-main-module="

Change-Id: I0dc3e32e4fbc0f4c90fd11b6ac56ec3ac6d67ae5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181259
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-02-07 17:49:30 +01:00
Stephan Bergmann 9b81a98953 Introduce loplugin:mustoverride
...to find derived classes that do not directly override SfxPoolItem::ItemType.
Most of the cases that the plugin flagged were classes that are apparently not
meant to be instantiated themselves (so I added pure virtual overrides there),
but SdrMeasureFormatStringItem appears to genuinely have missed it
DECLARE_ITEM_TYPE_FUNCTION stanza.

Change-Id: Iec40080377f26cc4fa2c8cff735d5f0d3bd60509
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181211
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-02-07 12:53:35 +01:00
Stephan Bergmann 6e1026caca external/firebird: Avoid ODR violation issues from sanitizer builds
My local ASan/UBSan builds of d37c60c5e2b793c0934d431e59c8cb3ff1a170b6
"external/firebird: Drop -fno-rtti from sanitizer builds" against LLVM 21 trunk
had been fine, but <https://ci.libreoffice.org/job/lo_ubsan/3459/> against
lode's LLVM 12.0.1 started to fail with

> ==3374322==ERROR: AddressSanitizer: odr-violation (0x0000007af7a0):
>   [1] size=16 'typeinfo for Firebird::Exception' /home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/UnpackedTarball/firebird/src/common/fb_exception.cpp
>   [2] size=16 'typeinfo for Firebird::Exception' /home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/UnpackedTarball/firebird/src/common/fb_exception.cpp
> These globals were registered at these points:
>   [1]:
>     #0 0x440738 in __asan_register_globals.part.0 /home/tdf/lode/packages/llvm-llvmorg-12.0.1.src/compiler-rt/lib/asan/asan_globals.cpp:360:3
>     #1 0x68237b in asan.module_ctor (/workdir/UnpackedTarball/firebird/gen/Debug/firebird/bin/isql+0x68237b)
>
>   [2]:
>     #0 0x440738 in __asan_register_globals.part.0 /home/tdf/lode/packages/llvm-llvmorg-12.0.1.src/compiler-rt/lib/asan/asan_globals.cpp:360:3
>     #1 0x7f5ccdec01ab in asan.module_ctor (/workdir/UnpackedTarball/firebird/gen/Debug/firebird/lib/libfbclient.so.2+0x9b41ab)

What appears to make a difference there is
<https://github.com/llvm/llvm-project/commit/1ada819c237bf724e6eaa1c82b2742e3eb57a5d5>
"[asan] Default to -fsanitize-address-use-odr-indicator for non-Windows", first
appearing in LLVM 16:  My local ASan/UBSan LLVM 21 trunk build, which builds
external/firebird fine, has

> 0000000000ee5166 B __odr_asan_gen__ZTIN8Firebird9ExceptionE
> 000000000045b960 D _ZTIN8Firebird9ExceptionE

in workdir/UnpackedTarball/firebird/gen/Debug/firebird/bin/isql and

> 0000000000e49920 b __odr_asan_gen__ZTIN8Firebird9ExceptionE
> 0000000000b9d100 D _ZTIN8Firebird9ExceptionE

in workdir/UnpackedTarball/firebird/gen/Debug/firebird/lib/libfbclient.so.2, but
when I rebuild it with -fno-sanitize-address-use-odr-indicator, it has only

> 000000000045bbc0 D _ZTIN8Firebird9ExceptionE

in workdir/UnpackedTarball/firebird/gen/Debug/firebird/bin/isql and only

> 0000000000b9d1c0 D _ZTIN8Firebird9ExceptionE

in workdir/UnpackedTarball/firebird/gen/Debug/firebird/lib/libfbclient.so.2, and
fails the same way as <https://ci.libreoffice.org/job/lo_ubsan/3459/>.

So make the "Drop -fno-rtti" patch depend on Clang >= 16 (recorded, for
simplicity, with a bespoke new CLANG_16 config_host.mk variable).

Change-Id: I70a8ce8eb535265d592d470718d6b3a6765d5bcd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181235
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2025-02-07 11:38:12 +01:00
Stephan Bergmann a03edb923d external/firebird: Drop -fno-rtti from sanitizer builds
Until now, at least Clang silently drops -fsanitize=vptr (which needs RTTI, and
which is by default included in -fsanitize=undefined) from -fsanitize=undefined,
that's how external/firebird (which uses -fno-rtti) worked for now with
-fsanitize=undefined.  However, Clang is planing to break -fsanitize=vptr out of
-fsanitize=undefined (see
<https://discourse.llvm.org/t/rfc-remove-vptr-from-undefined/83830> "[RFC]
Remove `vptr` from `undefined`"), so to be prepared for that I started to do my
local ASan/UBSan build with an explicit -fsanitize=vptr already.  Which thus
started to cause

> clang++: error: invalid argument '-fsanitize=vptr' not allowed with '-fno-rtti'

But there appears to be no good reason to do such instrumented builds with
-fno-rtti anyway.

Change-Id: I9f579846a6c0f666d071d3432d17b266d8ef339e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181213
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-02-06 16:47:11 +01:00
Stephan Bergmann aabf7c44ec Update the reference rdbs to libreoffice-25.2.0.3
.../master/instdir/sdk/bin/unoidl-read --published \
 .../libreoffice-25.2.0.3/instdir/program/types.rdb \
 >.../master/udkapi/type_reference/udkapi.idl

.../master/instdir/sdk/bin/unoidl-read --published \
 .../libreoffice-25.2.0.3/instdir/program/types.rdb \
 .../libreoffice-25.2.0.3/instdir/program/types/offapi.rdb \
 >.../master/offapi/type_reference/offapi.idl

Change-Id: I427bd420baab08fd25fc85f03cf2861372b8a8b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181212
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-02-06 16:19:11 +01:00
Stephan Bergmann 12ed25fb94 Support Emscripten --with-main-module=
...i.e., stripping both Calc and Writer, which comes in handy when trying e.g.
-fsanitize=address and the resulting binary would otherwise become too large.

(Which also unearthed that the StartModule/menubar/menubar.xml had erroneously
been added to the Writer section of static/CustomTarget_emscripten_fs_image.mk
ever since 88b94aafc2 "WASM create and link the
Emscripten FS image".)

Change-Id: Ia880040f51f15d33ed447a1c69838fa807f48ade
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181188
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2025-02-05 20:31:58 +01:00
Stephan Bergmann f1ab3ac055 For Emscripten, always assume we run inside soffice
...and not in some unopkg process.  The checks done here would not work for
Emscripten, where osl_getExecutableFile returns some generic "./this.program",
and where we don't set up the office pipe.

Change-Id: Iac3fead3eaa0ac9cfc9dbcf3c01cd9f12df5548b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181161
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-02-05 15:41:41 +01:00
Stephan Bergmann d2dd5bf00a Actually make wrapped_iterator a bidirectional_iterator
...which it claims to be.  Also, builds against recent LLVM 20 trunk libc++ (on
macOS) had started to fail with

> In file included from sc/source/core/tool/scmatrix.cxx:20:
> In file included from sc/inc/scmatrix.hxx:22:
> In file included from sc/inc/address.hxx:30:
> In file included from sc/inc/types.hxx:14:
> In file included from external/boost/include/boost/intrusive_ptr.hpp:30:
> In file included from workdir/UnpackedTarball/boost/boost/intrusive_ptr.hpp:16:
> In file included from workdir/UnpackedTarball/boost/boost/smart_ptr/intrusive_ptr.hpp:20:
> In file included from ~/llvm/inst/bin/../include/c++/v1/functional:557:
> In file included from ~/llvm/inst/bin/../include/c++/v1/__functional/boyer_moore_searcher.h:25:
> ~/llvm/inst/bin/../include/c++/v1/__vector/vector.h:1043:20: error: no matching function for call to object of type 'const __copy_n'
>  1043 |       auto __mid = ranges::copy_n(std::move(__first), size(), this->__begin_).in;
>       |                    ^~~~~~~~~~~~~~
> ~/llvm/inst/bin/../include/c++/v1/__vector/vector.h:317:5: note: in instantiation of function template specialization 'std::vector<double>::__assign_with_size<(anonymous namespace)::wrapped_iterator<mdds::mtv::default_element_block<10, double>, matop::(anonymous namespace)::MatOp<(lambda at sc/source/core/tool/scmatrix.cxx:3596:17)>, double>, (anonymous namespace)::wrapped_iterator<mdds::mtv::default_element_block<10, double>, matop::(anonymous namespace)::MatOp<(lambda at sc/source/core/tool/scmatrix.cxx:3596:17)>, double>>' requested here
>   317 |     __assign_with_size(__first, __last, std::distance(__first, __last));
>       |     ^
> workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/../types.hpp:335:15: note: in instantiation of function template specialization 'std::vector<double>::assign<(anonymous namespace)::wrapped_iterator<mdds::mtv::default_element_block<10, double>, matop::(anonymous namespace)::MatOp<(lambda at sc/source/core/tool/scmatrix.cxx:3596:17)>, double>, 0>' requested here
>   335 |         m_vec.assign(first, last);
>       |               ^
> workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/../types.hpp:718:11: note: in instantiation of function template specialization 'mdds::mtv::delayed_delete_vector<double>::assign<(anonymous namespace)::wrapped_iterator<mdds::mtv::default_element_block<10, double>, matop::(anonymous namespace)::MatOp<(lambda at sc/source/core/tool/scmatrix.cxx:3596:17)>, double>>' requested here
>   718 |         d.assign(it_begin, it_end);
>       |           ^
> workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/../standard_element_blocks.hpp:73:1: note: in instantiation of function template specialization 'mdds::mtv::element_block<mdds::mtv::default_element_block<10, double>, 10, double, mdds::mtv::delayed_delete_vector>::assign_values<(anonymous namespace)::wrapped_iterator<mdds::mtv::default_element_block<10, double>, matop::(anonymous namespace)::MatOp<(lambda at sc/source/core/tool/scmatrix.cxx:3596:17)>, double>>' requested here
>    73 | MDDS_MTV_DEFINE_ELEMENT_CALLBACKS(double, element_type_double, 0.0, double_element_block)
>       | ^
> workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/macro.hpp:101:21: note: expanded from macro 'MDDS_MTV_DEFINE_ELEMENT_CALLBACKS'
>   101 |         block_type::assign_values(dest, it_begin, it_end); \
>       |                     ^
> workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:2545:13: note: in instantiation of function template specialization 'mdds::mtv::mdds_mtv_assign_values<(anonymous namespace)::wrapped_iterator<mdds::mtv::default_element_block<10, double>, matop::(anonymous namespace)::MatOp<(lambda at sc/source/core/tool/scmatrix.cxx:3596:17)>, double>>' requested here
>  2545 |             mdds_mtv_assign_values(*blk_data, *it_begin, it_begin, it_end);
>       |             ^
> workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:2519:16: note: (skipping 3 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
>  2519 |         return set_cells_to_single_block(row, end_row, block_index1, it_begin, it_end);
>       |                ^
> sc/source/core/tool/scmatrix.cxx:2419:29: note: in instantiation of function template specialization 'mdds::multi_type_matrix<(anonymous namespace)::matrix_traits>::set<(anonymous namespace)::wrapped_iterator<mdds::mtv::default_element_block<10, double>, matop::(anonymous namespace)::MatOp<(lambda at sc/source/core/tool/scmatrix.cxx:3596:17)>, double>>' requested here
>  2419 |                 pos = mrMat.set(pos,aFunc.begin(), aFunc.end());
>       |                             ^
> workdir/UnpackedTarball/mdds/include/mdds/multi_type_matrix.hpp:191:13: note: in instantiation of member function '(anonymous namespace)::MatrixOpWrapper<matop::(anonymous namespace)::MatOp<(lambda at sc/source/core/tool/scmatrix.cxx:3596:17)>>::operator()' requested here
>   191 |             m_func(mtm_node);
>       |             ^
> ~/llvm/inst/bin/../include/c++/v1/__algorithm/for_each.h:33:5: note: in instantiation of member function 'mdds::multi_type_matrix<(anonymous namespace)::matrix_traits>::walk_func<(anonymous namespace)::MatrixOpWrapper<matop::(anonymous namespace)::MatOp<(lambda at sc/source/core/tool/scmatrix.cxx:3596:17)>>>::operator()' requested here
>    33 |     __f(*__first);
>       |     ^
> sc/source/core/tool/scmatrix.cxx:2468:11: note: in instantiation of function template specialization 'mdds::multi_type_matrix<(anonymous namespace)::matrix_traits>::walk<(anonymous namespace)::MatrixOpWrapper<matop::(anonymous namespace)::MatOp<(lambda at sc/source/core/tool/scmatrix.cxx:3596:17)>>>' requested here
>  2468 |     maMat.walk(aFunc);
>       |           ^
> sc/source/core/tool/scmatrix.cxx:3598:12: note: in instantiation of function template specialization 'ScMatrixImpl::ApplyOperation<matop::(anonymous namespace)::MatOp<(lambda at sc/source/core/tool/scmatrix.cxx:3596:17)>>' requested here
>  3598 |     pImpl->ApplyOperation(aOp, *rMat.pImpl);
>       |            ^
> ~/llvm/inst/bin/../include/c++/v1/__algorithm/ranges_copy_n.h:64:3: note: candidate template ignored: constraints not satisfied [with _Ip = __libcpp_remove_reference_t<wrapped_iterator<default_element_block<10, double, mdds::mtv::delayed_delete_vector>, MatOp<(lambda at sc/source/core/tool/scmatrix.cxx:3596:17)>, double> &>, _Op = pointer]
>    64 |   operator()(_Ip __first, iter_difference_t<_Ip> __n, _Op __result) const {
>       |   ^
> ~/llvm/inst/bin/../include/c++/v1/__algorithm/ranges_copy_n.h:61:13: note: because '(anonymous namespace)::wrapped_iterator<mdds::mtv::default_element_block<10, double>, matop::(anonymous namespace)::MatOp<(lambda at sc/source/core/tool/scmatrix.cxx:3596:17)>, double>' does not satisfy 'input_iterator'
>    61 |   template <input_iterator _Ip, weakly_incrementable _Op>
>       |             ^
> ~/llvm/inst/bin/../include/c++/v1/__iterator/concepts.h:154:26: note: because '(anonymous namespace)::wrapped_iterator<mdds::mtv::default_element_block<10, double>, matop::(anonymous namespace)::MatOp<(lambda at sc/source/core/tool/scmatrix.cxx:3596:17)>, double>' does not satisfy 'input_or_output_iterator'
>   154 | concept input_iterator = input_or_output_iterator<_Ip> && indirectly_readable<_Ip> && requires {
>       |                          ^
> ~/llvm/inst/bin/../include/c++/v1/__iterator/concepts.h:135:6: note: because '(anonymous namespace)::wrapped_iterator<mdds::mtv::default_element_block<10, double>, matop::(anonymous namespace)::MatOp<(lambda at sc/source/core/tool/scmatrix.cxx:3596:17)>, double>' does not satisfy 'weakly_incrementable'
>   135 | } && weakly_incrementable<_Ip>;
>       |      ^
> ~/llvm/inst/bin/../include/c++/v1/__iterator/concepts.h:122:10: note: because '__i++' would be invalid: cannot increment value of type '(anonymous namespace)::wrapped_iterator<mdds::mtv::default_element_block<10, double>, matop::(anonymous namespace)::MatOp<(lambda at sc/source/core/tool/scmatrix.cxx:3596:17)>, double>'
>   122 |       __i++;                      // not required to be equality-preserving
>       |          ^

etc.

Change-Id: I1c49823d462c67bb73b16453ea44e5f2fe19d2e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181111
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-02-04 15:56:30 +01:00
Stephan Bergmann 222ff8ce8e Avoid -Werror,-Wunused-parameter
> /Volumes/lode/lode/jenkins/workspace/lo_tb_master_mac/vcl/quartz/salvd.cxx:120:22: error: unused parameter 'pGraphic' [-Werror,-Wunused-parameter]
>     AquaSalGraphics* pGraphic, tools::Long &nDX, tools::Long &nDY,
>                      ^

(<https://ci.libreoffice.org/job/lo_tb_master_mac/52565/>) since
a46c265051 "split CreateVirtualDevice into two
methods".  (The argument to

>     mpGraphics = new AquaSalGraphics( /*pGraphic*/ );

had been commented out ever since the code got introduced in
f0faedb959 "INTEGRATION: CWS aquabmpfix01
(1.22.12); FILE MERGED".)

Change-Id: I476bba0fe65005bbd8f95e7185639e0a6629affd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181101
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-02-04 14:59:39 +01:00
Stephan Bergmann 375c3952c0 Revert "remove unnecessary cairo soname patch"
This reverts commit 3500c44bcc.

Reason for revert: At least for Linux --without-system-cairo builds, this causes
workdir/UnpackedTarball/cairo/src/.libs/libcairo.so (which is the lib that other
libs like Library_drawinglayer and Library_vcl will link against) to have an
SONAME of libcairo.so.2 (instead of libcairo-lo.so.2), so at runtime libs like
instdir/program/libdrawinglayerlo.so and instdir/program/libvcllo.so will have a
NEEDED of libcairo.so.2 (instead of libcairo-lo.so.2), so will pick up whatever
system libcairo.so.2 (/usr/lib64/libcairo.so.2 from cairo-1.18.2-2.fc41.x86_64,
in my case) instead of instdir/program/libcairo-lo.so.2, which caused e.g.
CppunitTest_vcl_bitmap_render_test
CPPUNIT_TEST_NAME=BitmapRenderTest::testTdf113918 to happen to fail for me with

> [_RUN_____] BitmapRenderTest::testTdf113918
> warn:vcl.gdi:2234659:2234659:vcl/headless/CairoCommon.cxx:1619: unsupported SvpSalGraphics::drawAlphaBitmap case
> vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx:100:BitmapRenderTest::testTdf113918
> equality assertion failed
> - Expected: rgba[ffffffff]
> - Actual  : rgba[008000ff]

Change-Id: I9a2a64197185b7c057352c3fb7f3e3f6dbcf70db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180884
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-01-29 14:45:54 +01:00
Stephan Bergmann b18a03d80e SAL_INFO the result of checkCoordinateLimitWorkaroundNeededForUsedCairo
Change-Id: I88a021042ccf4e69d550a15eb9555c8f36437c8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180887
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-01-29 13:43:50 +01:00
Stephan Bergmann 795e6f6f3e Introduce EMSCRIPTEN_EXTRA_QTLOADER_CONFIG
for use in Emscripten --enable-qt6 builds, to e.g. add command line arguments
(like --writer) into qt_soffice.html.

For standard --enable-qt5 Emscripten builds, it works to specify an

> EMSCRIPTEN_EXTRA_SOFFICE_PRE_JS=/path/to/include.js

containing

> Module.arguments = ['--writer'];

to make qt_soffice.html open a Writer document.  Due to how the Qt loading has
changed in Qt6, that no longer works for --enable-qt6 Emscripten builds.  But
what works there now is to instead specify an

> EMSCRIPTEN_EXTRA_QTLOADER_CONFIG=arguments:['--writer']

(The sed -z option that is necessary to replace text spanning a newline is a
non-standard GNU extension, but lets assume that this is only executed for
cross-builds from Linux that use GNU sed.)

Change-Id: I31372a7a1f8fccbe0fe2594614bf5846e5e5c95f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180821
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-01-28 13:20:25 +01:00
Stephan Bergmann eabe32cb18 Fix "Remove a hack at least for Emscripten --enable-qt6"
...following up on 862e86d187, where I had screwed
up (and thanks to Michael Weghorn for spotting)

Change-Id: I0e5c6b4c12b6609021fe8ff7e0ad092d736728db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180813
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-01-28 09:28:49 +01:00