100 Commits
Author SHA1 Message Date
Stephan Bergmann 8e0ffffe60 Directly use std::cmp_*, drop o3tl::cmp_*
Change-Id: Ic6e6f1f10cd016550df38118c4e7fdba4d3c4b6d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158513
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2025-04-24 10:07:03 +02:00
Stephan Bergmann afe00aba4e Disambiguate pattern rules in extras/CustomTarget_autotext{share,user}.mk
One of my builds using make-4.4-3.fc38.x86_64 started to consistently fail now
with

> [ZIP] autotext/user/mytexts.bau
> S=... && I=$S/instdir && W=$S/workdir &&  cd $W/CustomTarget/extras/source/autotext/user/mytexts/ && zip -q0X --filesync --must-match $W/CustomTarget/extras/source/autotext/user/mytexts.bau mimetype && zip -qrX --must-match $W/CustomTarget/extras/source/autotext/user/mytexts.bau
>
> zip error: Nothing to do! (.../workdir/CustomTarget/extras/source/autotext/user/mytexts.bau)
> make: *** [.../extras/CustomTarget_autotextshare.mk:3668: .../workdir/CustomTarget/extras/source/autotext/user/mytexts.bau] Error 12
> make: *** Deleting file '.../workdir/CustomTarget/extras/source/autotext/user/mytexts.bau'

It turned out that this didn't use the expected

> $(call gb_CustomTarget_get_workdir,extras/source/autotext/user)/%.bau

rule in extras/CustomTarget_autotextuser.mk (with a stem of "mytexts"), but
rather the

> $(call gb_CustomTarget_get_workdir,extras/source/autotext)/%.bau

rule in extras/CustomTarget_autotextshare.mk (with a stem of "user/mytexts").
But in that mismatched rule the part

> $(call extras_AUTOTEXTSHARE_XMLFILES_RELATIVE,$*)

then expanded to nothing, calling zip with an empty list of files, which makes
zip fail.

No idea why this apparently worked reliably in the past, and why it started to
fail for just this one build scenario of mine (it still worked for other builds
also using make-4.4-3.fc38.x86_64 now).

Change-Id: I643fb0835313cacca5b64416006a3573e559ae78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148946
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2025-02-07 07:58:28 +01:00
Stephan Bergmann d98e014cf6 Extended loplugin:ostr manual changes
I had done these a while ago, when I looked into extending loplugin:ostr to do
more automatic rewriting, and these were places where I needed to do something
manually, for one reason or another, because the automatic rewriting would not
pick it up correctly.

However, I got distracted, and a wholesale automatic rewrite would still run
into cases where an _ostr/_ustr instance from a library's .rodata would still be
referenced after the library has already been dlcose'd.  So I never came around
to finishing all that.

But there appears to be renewed interest in (automatic) rewritings here now, so
it probably makes sense if I share this part of my work anyway.

Change-Id: I3da9d38398e4bca373cb0000a9d34b49a36ad58a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166792
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2024-04-28 11:29:52 +02:00
Stephan Bergmann 76400f6609 Step 3 of removing cargo-cult pragma pack around rtl_[u]String
see 8ae3ae4bf7 "Step 1 of removing cargo-cult
pragma pack around rtl_[u]String"

Change-Id: If6c2ea0ab2e7e61cdbc880d7b27d2af7f816e66d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158568
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2023-12-11 23:03:53 +01:00
Stephan Bergmann 7575e8afca loplugin:ostr (macOS)
Change-Id: I1b169e0c170c26a49941d22f0982a24ef547f941
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160391
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2023-12-07 07:15:25 +01:00
Stephan Bergmann 8b5bb37cc4 loplugin:ostr (macOS)
Change-Id: I85ecdf188dc394d6175a2dd7338147a057fa7766
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160392
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2023-12-06 16:38:22 +01:00
Stephan Bergmann babee57de8 Extended loplugin:ostr: cui
Change-Id: I2cdd90f8eafab4900c42c706da2abc38077f6103
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159720
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 10:16:05 +01:00
Stephan Bergmann 46617d95f4 Extended loplugin:ostr: canvas
Change-Id: I7c5ee1eb15a4464c9dfc2e292df3e6adf71d3956
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159726
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 10:00:14 +01:00
Stephan Bergmann 730a704f7f Extended loplugin:ostr: bridges
Change-Id: I8eefb64e75933ea9a4fbadb501182fc61bbf11b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159727
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 09:40:49 +01:00
Stephan Bergmann 5c374284b7 Extended loplugin:ostr: connectivity
Change-Id: I284c896777c4f62499eb6b7c0a9883d9abf8d1f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159721
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 09:40:37 +01:00
Stephan Bergmann 1cb523eee4 Extended loplugin:ostr: basic
Change-Id: I041913b1fe2722145d770e5cdcf90cdf22957873
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159728
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 09:17:06 +01:00
Stephan Bergmann 727b2720d7 Extended loplugin:ostr: dbaccess
Change-Id: Ib6a310f78d8f168e5524d4115cf6f00d679b7cbb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159719
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 09:16:50 +01:00
Stephan Bergmann 99b9bc7659 Extended loplugin:ostr: codemaker
Change-Id: I7a8eddee0ecf7ab38cc356c157e9832b715da4c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159724
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 09:16:38 +01:00
Stephan Bergmann 3caea32ae4 Extended loplugin:ostr: chart2
Change-Id: I544f7286ff28cd105fa9dc7bff2712aebb3d5a45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159725
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 09:16:11 +01:00
Stephan Bergmann 8ef2b4b4c6 Extended loplugin:ostr: configmgr
Change-Id: If9cc1f0c18a5fa344a433b338f81d191340e70f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159722
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 08:53:42 +01:00
Stephan Bergmann 5ac4adaf02 Extended loplugin:ostr: comphelper
Change-Id: I338c3c263e940bbe6071827b2e19763b7dadc2e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159723
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 08:31:47 +01:00
Stephan Bergmann e66ccbecfb Extended loplugin:ostr: emfio
Change-Id: Ida43018a83c68f5d20dbee30325b8f32099e5b1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159713
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 08:25:16 +01:00
Stephan Bergmann c860e7cc97 Extended loplugin:ostr: editeng
Change-Id: I5dbd4047d2b66c12475020abfdd2b8f16d65a8f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159714
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 07:55:09 +01:00
Stephan Bergmann 2718e9c1d5 Extended loplugin:ostr: l10ntools
Change-Id: I6c46535568ac6c29784e9336198b51c79c9e3859
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159695
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 07:28:07 +01:00
Stephan Bergmann fa7dd627c9 Extended loplugin:ostr: o3tl
Change-Id: Iac716011fd421c6dd0d40cf81dc6cbebb1ae4e71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159693
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 07:27:41 +01:00
Stephan Bergmann f8087b516a Extended loplugin:ostr: idl
Change-Id: I22adb7f3750f1e1b9910f37046c5da98ac7ab5be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159697
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 07:27:30 +01:00
Stephan Bergmann 1b19c6b7d0 Extended loplugin:ostr: filter
Change-Id: I1c45cecb97789a3fc229084de1b7b4968d6069c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159699
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 07:27:05 +01:00
Stephan Bergmann f94351f54b Extended loplugin:ostr: i18npool
Change-Id: Ia0a844bc6e3f27758c869f5e229097085288e8bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159698
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 07:26:48 +01:00
Stephan Bergmann cdb5f9595f Extended loplugin:ostr: jvmfwk
Change-Id: Ibb17d89a5ed618b4d5e6be9ac9ee89e2751c3ed7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159696
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 07:26:38 +01:00
Stephan Bergmann 042a87dbd1 Extended loplugin:ostr: linguistic
Change-Id: I74b95a853a142da3e2df5b974a13d991f13d28eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159694
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 07:26:24 +01:00
Stephan Bergmann f94987039b Extended loplugin:ostr: extensions
Change-Id: I0c70fc1d42031a5a6ebd900cd20b1e7e40d9352d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159703
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 07:26:11 +01:00
Stephan Bergmann b5da85150d Extended loplugin:ostr: desktop
Change-Id: I0c86c1207f906e19c770b71ae1c5daec1c912845
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159717
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 07:26:01 +01:00
Stephan Bergmann 3e5edde173 Extended loplugin:ostr: drawinglayer
Change-Id: If37d6fac8e1cabd7c1609c26259366fb0d3d81ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159716
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 07:25:46 +01:00
Stephan Bergmann baecfd2179 Extended loplugin:ostr: sfx2
Change-Id: I7b2988ed246a0b1b0af0721521ba738ba3de2f27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159677
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 23:23:49 +01:00
Stephan Bergmann 235ae98ae6 Extended loplugin:ostr: opencl
Change-Id: I126ed9e9fca6d1ab8d4e42ec0fe1ffb33a5f8ae8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159689
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 22:35:12 +01:00
Stephan Bergmann f53172a114 Extended loplugin:ostr: oox
Change-Id: Ic3ee80433571767dba9de1ecfb00d2d96beae4db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159690
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 22:04:26 +01:00
Stephan Bergmann 1f43e2071f Extended loplugin:ostr: sax
Change-Id: Icf6ffbc746dbbc790a5a248002ecd161413f120c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159681
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 22:04:09 +01:00
Stephan Bergmann 95ffa27c59 Extended loplugin:ostr: sal
Change-Id: Ic8a02784acb9f8981249689541bb6cba1b7fbfb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159682
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 21:19:40 +01:00
Stephan Bergmann 115e7a00c3 Extended loplugin:ostr: pyuno
Change-Id: Ie8ec1e8b3debd1501b16d40567a063390749a19b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159683
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 20:39:16 +01:00
Stephan Bergmann c7526e303f Extended loplugin:ostr: sd
Change-Id: Iadfe05a173bacd236086728ac23de1e610f0bf27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159679
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 20:38:53 +01:00
Stephan Bergmann 099be392bf Extended loplugin:ostr: sc
Change-Id: I44536a13f4c31558671c1166d06b7f6216456641
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159680
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 20:38:33 +01:00
Stephan Bergmann 0962258708 Extended loplugin:ostr: xmlsecurity
Change-Id: I639bf4af888e5af615379515d92ad70025d8ac15
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159660
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 20:38:12 +01:00
Stephan Bergmann 9407c1f96a Extended loplugin:ostr: sdext
Change-Id: If4e8ccf288846fc768b3e035706a8bd0b2207f4f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159678
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 20:37:56 +01:00
Stephan Bergmann 142beb47ac Extended loplugin:ostr: svgio
Change-Id: I5a93e5f0a3cfc0fd85ac53ba2f58131561508386
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159675
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 20:37:38 +01:00
Stephan Bergmann 75d2569293 Extended loplugin:ostr: starmath
Change-Id: I24ab27d0f92d2d5d10ca2694138d7964ae947b62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159676
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 20:37:13 +01:00
Stephan Bergmann 6ccd536aae Extended loplugin:ostr: svtools
Change-Id: I4aa6ab1c132a5666b0ee4a4e9f68aaca58a38ceb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159672
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 18:27:05 +01:00
Stephan Bergmann 23641bffb7 Extended loplugin:ostr: svl
Change-Id: Ia74b15213a05da36f48932811d70d231ec7ee164
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159673
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 18:26:53 +01:00
Stephan Bergmann 85c25ec9f1 Extended loplugin:ostr: xmlhelp
Change-Id: I8be963a7a2befe95ce30027c3298e1a41b217d0b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159663
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 17:30:10 +01:00
Stephan Bergmann 79e8a54893 Extended loplugin:ostr: svx
Change-Id: I290b1c60c8030b5345a1c2fa3816e83e21967cf6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159671
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 17:29:59 +01:00
Stephan Bergmann 7724e504be Extended loplugin:ostr: sw
Change-Id: I210f61f6d90776b086b7058fb1a831d235699fb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159670
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 17:29:47 +01:00
Stephan Bergmann 35972b1fbe Extended loplugin:ostr: test
Change-Id: Ia4dfbd1afcf01028d8292ca656979d7017196244
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159669
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 17:29:33 +01:00
Stephan Bergmann a0d6538341 Extended loplugin:ostr: unodevtools
Change-Id: If72d80bd748186b974b37d58aa1469af1ffdb34d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159667
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 17:29:19 +01:00
Stephan Bergmann db9104a366 Extended loplugin:ostr: tools
Change-Id: I70df74d005c7fca14b1bcb70f4870023bd3af4a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159668
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 17:29:09 +01:00
Stephan Bergmann 156e7eafd7 Extended loplugin:ostr: xmlscript
Change-Id: I1b476b6fb89ee04b4427ba1210eee9811a722f0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159661
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 17:28:56 +01:00
Stephan Bergmann 56c89190a2 Extended loplugin:ostr: vcl
Change-Id: I2a9d5383d1831d8bf61e5280d66556d71fccae52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159666
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 15:23:35 +01:00
Stephan Bergmann e4d8f186d0 Extended loplugin:ostr: writerperfect
Change-Id: Ib942f7725e224b7c4beaca4cd4d86b83f60cd3f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159664
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 15:23:17 +01:00
Stephan Bergmann 694763542e Extended loplugin:ostr: writerfilter
Change-Id: I83bdd43357d07bce18a2cf286e639c816846e7d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159665
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 14:42:30 +01:00
Stephan Bergmann 0ea539f0ea Extended loplugin:ostr: xmloff
Change-Id: I87e53216693f2d6489a1dd80e62141ca5621a87f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159662
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 14:42:16 +01:00
Stephan Bergmann 533e993f2d Don't reuse --unit values across (sequential, even) systemd-run invocations
At least some old versions of systemd-run apparently have occasional issues when
sequential invocations reuse the same --unit value, as
<https://ci.libreoffice.org/job/lo_ubsan/2982/> now (i.e., after the machine was
updated to auto-detect --with-coredumpctl) failed with

> [build CUT] basctl_dialogs_test
> LO_TEST_LOCALE=de
> Running scope as unit: -home-tdf-lode-jenkins-workspace-lo_ubsan-workdir-CppunitTest-basctl_dialogs_test.test:20231117013657:704127.scope
[...]
> LO_TEST_LOCALE=en-US
> Running scope as unit: -home-tdf-lode-jenkins-workspace-lo_ubsan-workdir-CppunitTest-basctl_dialogs_test.test:20231117013657:704127.scope
[...]
> LO_TEST_LOCALE=fi
> Failed to start transient scope unit: Unit -home-tdf-lode-jenkins-workspace-lo_ubsan-workdir-CppunitTest-basctl_dialogs_test.test:20231117013657:704127.scope already exists.

Change-Id: If009e26231228bec739637e4140be90c0b86d6b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159569
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-17 16:57:01 +01:00
Stephan Bergmann 63a5687e84 Missing parenthesis
...from e514f1a462 "fix --enable-wix switch - that
didn't do anything"

Change-Id: I4d8124152d5dcb97a11d6fced071ac428ac09bb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159551
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-17 09:59:25 +01:00
Stephan Bergmann 363b4078be Manual extended loplugin:ostr change
Change-Id: I003851390566dfe2b98cecc88afc8153f061ad68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159522
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-17 08:12:20 +01:00
Stephan Bergmann a93dd64747 Manual extended loplugin:ostr change
Change-Id: Ic0418ba78851183deba2555943cf26934b982378
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159521
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-17 08:12:01 +01:00
Stephan Bergmann 51d9c9899f Extend a loplugin:ostr check from OUString to OString
Change-Id: I0776ab0ab376d6181461d2c144a4107b06233829
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159470
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-15 19:16:51 +01:00
Stephan Bergmann 2a242032f9 Add back test for struct initialization
...that had been removed as part of f99bee8103
"Delete OUString UTF-16 string literal ctor/assignment op"

Change-Id: I22423306ab35dcb580ecc90daea3219b6c1578b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159446
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-15 17:20:38 +01:00
Stephan Bergmann f9ac0d2bbb Dispose some test components
Otherwise, JunitTest_forms_unoapi_2 left behind two instances of
frm::OGridControlModel.

Change-Id: Idaf7bae26b18e20821968ebf52e7864043963e03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159422
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-14 18:48:47 +01:00
Stephan Bergmann b6583a9283 Adapt compilerplugins/clang/test/fieldcast.cxx to clang-cl
...where loplugin:locking2 is disabled

Change-Id: Id58cbedab191c59b901ef1a0e0dd82b8f8438c4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159400
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-14 10:23:46 +01:00
Stephan Bergmann c8dfb25a77 Drop DEBUGSPRMREADER code
Change-Id: Id204eae97850ef9c99229c1316090010013b06e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159367
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-13 14:43:49 +01:00
Stephan Bergmann 42de667705 -Werror,-Wunused-private-field
Change-Id: I6bc93f212c687c908e68b2fbbced03f19f40844e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159351
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-13 07:20:36 +01:00
Stephan Bergmann c1bd25e467 Disable flakey navigator UITest again
f2ba17fecb "disable more flakey navigator UITest",
then 0a0c5a5b05 "UITest_sw_navigator: avoid
oneprocess" enabled it again, apparently in the false hopes that non-oneprocess
would magically fix this issue.  But this still causes frequent failures, e.g.,
<https://ci.libreoffice.org//job/lo_ubsan/2974/> failed with

> ======================================================================
> FAIL: test_tdf134390 (navigator.navigator)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/home/tdf/lode/jenkins/workspace/lo_ubsan/sc/qa/uitest/calc_tests8/navigator.py", line 145, in test_tdf134390
>     self.assertEqual(get_state_as_dict(xColumn)['Value'], '2')
> AssertionError: '1' != '2'
> - 1
> + 2

and <https://ci.libreoffice.org//job/lo_ubsan/2975/> failed with

> ======================================================================
> FAIL: test_tdf134390 (navigator.navigator)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/home/tdf/lode/jenkins/workspace/lo_ubsan/sc/qa/uitest/calc_tests8/navigator.py", line 145, in test_tdf134390
>     self.assertEqual(get_state_as_dict(xColumn)['Value'], '2')
> AssertionError: '53' != '2'
> - 53
> + 2

Change-Id: I39e878c20085cca3233f7c8859b9a1d28fcc56c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159262
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-10 13:33:26 +01:00
Stephan Bergmann 2368e09cd1 Disable flakey navigator UITest again
f2ba17fecb "disable more flakey navigator UITest",
then 0a0c5a5b05 "UITest_sw_navigator: avoid
oneprocess" enabled it again, apparently in the false hopes that non-oneprocess
would magically fix this issue.  But this still hangs frequently, e.g.
<https://ci.libreoffice.org//job/lo_tb_master_linux_dbg/45650/> hung here (and
got killed by kill-wrapper) with the python.bin process at

> Thread 1 (Thread 0x7f85438bbb80 (LWP 217701) "python3"):
> Traceback (most recent call first):
>   <built-in method sleep of module object at remote 0x7f854143b728>
>   File "/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/uitest/test.py", line 72, in wait_until_property_is_updated
>     time.sleep(DEFAULT_SLEEP)
>   File "/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/sw/qa/uitest/navigator/tdf154521.py", line 158, in test_query_selected_bookmark
>     self.ui_test.wait_until_property_is_updated(xContentTree, "SelectEntryText", "Bookmark 2")
>   File "/usr/lib64/python3.6/unittest/case.py", line 622, in run
>     testMethod()
>   File "/usr/lib64/python3.6/unittest/case.py", line 670, in __call__
>     return self.run(*args, **kwds)
>   File "/usr/lib64/python3.6/unittest/suite.py", line 122, in run
>     test(result)
>   File "/usr/lib64/python3.6/unittest/suite.py", line 84, in __call__
>     return self.run(*args, **kwds)
>   File "/usr/lib64/python3.6/unittest/runner.py", line 176, in run
>     test(result)
>   File "/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/test_main.py", line 138, in <module>
>     result = unittest.TextTestRunner(stream=sys.stdout, verbosity=2).run(test_suite)

and the soffice.bin process just idling with nothing going on.

Change-Id: I44a38b12050cfe2cf4831631406df9018018e2ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159260
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-10 10:45:31 +01:00
Stephan Bergmann 4897083c12 Move "Acceptor already exists" warning to where it belongs
036ed05fe3 "MWS_SRX644: migrate branch mws_srx644
-> HEAD" had added this with misleading indentation, so it (apparently
accidentally) did not pertain to the "aAcceptString was found in the map of
already existing acceptors" case.  Then 4acffc240b
"catch by const reference" fixed the indentation, but left the warning at the
apparently wrong place.

Change-Id: Ie73368bc1294e9b716e3fca75e12363cb6240fdd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159157
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-09 09:06:22 +01:00
Stephan Bergmann c254acddbc loplugin:unnecessarygetstr (clang-cl)
Change-Id: I79a1902fb1241f95fd4fa963918207154ae2347b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159134
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-09 07:36:23 +01:00
Stephan Bergmann a116e4f1a7 loplugin:unnecessarygetstr (clang-cl)
(Thanks to Mike Kaganski for noticing the gotcha here that a naive replacement
with

> std::wstring(const wstring& str, size_type pos)

would do something rather different than

> std::wstring(const wchar_t* s, size_type n)

does.)

Change-Id: I78837c014cdc154f276db1a11a87aaf74319a9fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159114
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-09 07:36:06 +01:00
Stephan Bergmann aea53c0ed1 loplugin:unreffun (clang-cl)
...and make things private/protected, while at it

Change-Id: I5854f55dfe073e30b853c0d3bbafc4b7293c7f0b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159132
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-08 22:50:26 +01:00
Stephan Bergmann 79ac262c92 Avoid initialization-order-fiasco in DBG_UTIL code
...as reported by <https://ci.libreoffice.org/job/lo_ubsan/2973/> during e.g.
Gallery_backgrounds, when initializing the global variable

> const Cell OBJ_CELL_NONE;

at svx/source/dialog/framelinkarray.cxx:281,

> ==519895==ERROR: AddressSanitizer: initialization-order-fiasco on address 0x7fb3dc3e5570 at pc 0x7fb3daee1c56 bp 0x7ffe54584480 sp 0x7ffe54584478
> READ of size 8 at 0x7fb3dc3e5570 thread T0
>     #0 0x7fb3daee1c55 in std::_Hashtable<SfxPoolItem const*, SfxPoolItem const*, std::allocator<SfxPoolItem const*>, std::__detail::_Identity, std::equal_to<SfxPoolItem const*>, std::hash<SfxPoolItem const*>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, true, true> >::bucket_count() const /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/hashtable.h:673:16
>     #1 0x7fb3daee1648 in std::__cxx1998::unordered_set<SfxPoolItem const*, std::hash<SfxPoolItem const*>, std::equal_to<SfxPoolItem const*>, std::allocator<SfxPoolItem const*> >::bucket_count() const /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/unordered_set.h:755:21
>     #2 0x7fb3daeb1088 in std::__debug::unordered_set<SfxPoolItem const*, std::hash<SfxPoolItem const*>, std::equal_to<SfxPoolItem const*>, std::allocator<SfxPoolItem const*> >::insert(SfxPoolItem const*&&) /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/debug/unordered_set:369:35
>     #3 0x7fb3db01987c in SfxPoolItem::SfxPoolItem(unsigned short) /svl/source/items/poolitem.cxx:506:28
>     #4 0x7fb3cb2fddb4 in svx::frame::(anonymous namespace)::Cell::Cell() /svx/source/dialog/framelinkarray.cxx:204:5
>     #5 0x7fb3cafa3b6f in __cxx_global_var_init.1 /svx/source/dialog/framelinkarray.cxx:281:12
>     #6 0x7fb3cafa3ba9 in _GLOBAL__sub_I_framelinkarray.cxx /svx/source/dialog/framelinkarray.cxx
>     #7 0x7fb3e6821f19 in call_init.part.0 /usr/src/debug/glibc-2.28-225.el8_8.6.x86_64/elf/dl-init.c:72:3
>     #8 0x7fb3e6822019 in call_init /usr/src/debug/glibc-2.28-225.el8_8.6.x86_64/elf/dl-init.c:118:11
>     #9 0x7fb3e6822019 in _dl_init /usr/src/debug/glibc-2.28-225.el8_8.6.x86_64/elf/dl-init.c:119:5
>     #10 0x7fb3e6836cb9  (/lib64/ld-linux-x86-64.so.2+0x1dcb9)
>
> 0x7fb3dc3e5570 is located 48 bytes inside of global variable 'incarnatedSfxPoolItems' defined in '/home/tdf/lode/jenkins/workspace/lo_ubsan/svl/source/items/poolitem.cxx:473:47' (0x7fb3dc3e5540) of size 96
>   registered at:
>     #0 0x43c078 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 0x7fb3db01e7cb in asan.module_ctor (/instdir/program/libsvllo.so+0xb3c7cb)

Change-Id: I490fb232e0944f18c49b734c621e1bf0c318baff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159120
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-08 22:50:10 +01:00
Stephan Bergmann 4726801b3f loplugin:external -> loplugin:conststringvar -> loplugin:redundantstatic
Change-Id: If5705fdf626ea9096e1d80b614d1907ec6b66bb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159110
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-08 22:49:47 +01:00
Stephan Bergmann c0e516609b loplugin:stringstatic, lopluign:ostr (clang-cl)
Change-Id: I7a928a2385286f6d1ab3887c8d315af3f47c052d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159135
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-08 18:58:40 +01:00
Stephan Bergmann c3c56b8560 Adapt expected diagnostic output to clang-cl and the MSVC standard library
Change-Id: Ie416e4170280b9f05ecac359655e71f65a525592
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159131
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-08 18:57:55 +01:00
Stephan Bergmann 0a2622760a Drop presumably redundant null check
In a18bdb3bc0 "Integrate branch of IAccessible2",
this had originally been

>     if (pAgent && pAgent->IsStateManageDescendant(pXAccessible))
>     {
>         return;
>     }

so lets assume the `pAgent` check was only there to avoid a null deref

Change-Id: I320c181ff7d86d7c328bf9e5139dce2df1facb7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159130
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2023-11-08 18:57:36 +01:00
Stephan Bergmann 94dbf63dcd -Werror,-Wmissing-field-initializers (clang-cl)
Change-Id: I14c0d223b5f92456c9f160933e3f1eb99bfc6cd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159133
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-08 18:57:03 +01:00
Stephan Bergmann b1afd3413d Adapt compilerplugins/clang/test/locking2.cxx to clang-cl
...where loplugin:locking2 is disabled

Change-Id: Ie6a241ac49670e47001cba67c7af9996623a23ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159109
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-08 17:05:25 +01:00
Stephan Bergmann e624979ce4 loplugin:unnecessarygetstr (clang-cl)
Change-Id: Ic0ec1614d48382bb5735a67bf9588657b9ebd521
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159106
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-08 14:32:49 +01:00
Stephan Bergmann 3cd08e3b3c loplugin:staticaccess (clang-cl)
Change-Id: Ifa06de5d3798bc426678aa7e3bec339282061bb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159112
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-08 13:46:14 +01:00
Stephan Bergmann 71d9e8d3e4 Adapt loplugin:stringconcatliterals to clang-cl
...whose handling of PredefinedExpr (representing `__func__`) deliberately
differs in IgnoreParens and IgnoreParenImpCasts, see the comment in
StringConcatLiterals::isStringLiteral

Change-Id: I8b001d65369adc3d2a2c47e0cf32578a72ef4eec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159111
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-08 13:44:52 +01:00
Stephan Bergmann 7763190f7e loplugin:unnecessaryparen
Change-Id: Ic236de610c956c81f7eb8b0c27cee0b0ed6910ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159055
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-07 10:28:39 +01:00
Stephan Bergmann c662c66829 Fix SwLanguageIterator::Next for RES_TXTATR_AUTOFMT
...following advice by mstahl, as discussed in the comments starting at
<https://gerrit.libreoffice.org/c/core/+/158732/2#message-053bc195667ee3ba396ed12a85f3af8d4b7e5efc>
"tdf#157667 sw track changes: fix cycle case on multiple words", which had
started to cause

> /sw/inc/txatritr.hxx:69:18: runtime error: downcast of address 0x603001b45d90 which does not point to an object of type 'const SvxLanguageItem'
> 0x603001b45d90: note: object is of type 'SwFormatAutoFormat'
>  00 00 00 00  f0 0f 53 4e 3b 7f 00 00  02 00 00 00 32 00 90 be  20 31 36 00 80 60 00 00  c0 5d b4 01
>               ^~~~~~~~~~~~~~~~~~~~~~~
>               vptr for 'SwFormatAutoFormat'
>     #0 0x7f3b45ef75d2 in SwLanguageIterator::GetLanguage() const /sw/inc/txatritr.hxx:69:18
>     #1 0x7f3b45ee2765 in SwTextNode::TransliterateText(utl::TransliterationWrapper&, int, int, SwUndoTransliterate*, bool) /sw/source/core/txtnode/txtedt.cxx:1980:32
>     #2 0x7f3b429f1d40 in sw::DocumentContentOperationsManager::TransliterateText(SwPaM const&, utl::TransliterationWrapper&) /sw/source/core/doc/DocumentContentOperationsManager.cxx:3186:15
>     #3 0x7f3b43a52777 in SwEditShell::TransliterateText(TransliterationFlags) /sw/source/core/edit/editsh.cxx:1076:51
>     #4 0x7f3b49118c97 in SwTextShell::ExecRotateTransliteration(SfxRequest const&) /sw/source/uibase/shells/textsh.cxx:866:20
>     #5 0x7f3b49118984 in SfxStubSwTextShellExecRotateTransliteration(SfxShell*, SfxRequest&) /workdir/SdiTarget/sw/sdi/swslots.hxx:3194:1
>     #6 0x7f3b6529ff75 in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) /sfx2/source/control/dispatch.cxx:254:9
>     #7 0x7f3b652b5e85 in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) /sfx2/source/control/dispatch.cxx:753:9
>     #8 0x7f3b65240e3b in SfxBindings::Execute_Impl(SfxRequest&, SfxSlot const*, SfxShell*) /sfx2/source/control/bindings.cxx:1061:22
>     #9 0x7f3b656c2760 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:688:53
>     #10 0x7f3b656c4ec1 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:266:16
>     #11 0x7f3b193705a6 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:163:30
>     #12 0x7f3b1936f482 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:120:16
>     #13 0x7f3b19370e54 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
>     #14 0x7f3b3810b5e9 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:94:33
>     #15 0x7f3b7245e5fd in testTdf157667::TestBody() /sw/qa/extras/uiwriter/uiwriter6.cxx:793:5

Change-Id: I0e0545a134d86a333b971da83a66f58c5e70f601
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159002
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-07 07:05:29 +01:00
Stephan Bergmann b21cab3f17 Make CustomTarget_odk/build-examples_java more robust against localized envs
At least on Linux, with a --with-lang=ALL build, `LANGUAGE=de make
CustomTarget_odk/build-examples_java' would fail, as it would ask for license
agreement in German rather than English (presumably because the code in
getUILangFromEnvironment, i18nlangtag/source/isolang/inunx.cxx, inspects the
LANGUAGE env var fist thing), so would expect a "ja" rather than the "yes" we
feed into stdin.

Change-Id: If285e4458e0706102a62f4e0094e5144575ccf7b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158998
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-06 21:18:20 +01:00
Stephan Bergmann c9cedde7c0 Adapt to various Clang 18 trunk enum rework
<https://github.com/llvm/llvm-project/commit/a9070f22a29e28f7d6f83c24a8dd88f3a94969ae>
"[clang][NFC] Refactor `CXXConstructExpr::ConstructionKind`",
<https://github.com/llvm/llvm-project/commit/c23aaa410358b9f9c364ddaaeb6b2069b185a99b>
"[clang][NFC] Refactor `CharacterLiteral::CharacterKind`",
<https://github.com/llvm/llvm-project/commit/3e6ce58701a3a8463b53fb3fd2023c02b4e90554>
"[clang][NFC] Refactor `StringLiteral::StringKind`",
<https://github.com/llvm/llvm-project/commit/edd690b02e16e991393bf7f67631196942369aed>
"[clang][NFC] Refactor `TagTypeKind` (#71160)"

Change-Id: Ice802f6d662494781ad22fcf11ea5006de918254
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158983
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-06 21:17:59 +01:00
Stephan Bergmann 5fb20ede2f loplugin:ostr: Warn about literals that could be string_view
...inspired by d4f4a40186 "This function takes a
string view - no need in OUString literal", but this found no further cases

Change-Id: I1429950afdb6fff8ed1d28f5fbb4c445fb6bfb12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158954
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-05 23:20:55 +01:00
Stephan Bergmann 5323c18753 Adapt to Clang 18 trunk Linkage rework
<https://github.com/llvm/llvm-project/commit/8775947633bf189e1847707932b1015f04640ea0>
"[clang][NFC] Refactor clang::Linkage"

Change-Id: I35e3a3c7e3de29e4f3b9ee8dfc34e39ba2aa1c70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158919
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-04 09:51:18 +01:00
Stephan Bergmann cef555e9a4 Make ExternalReferenceUriTranslator more robust against broken UTF-8
<https://lists.freedesktop.org/archives/libreoffice/2023-November/091151.html>
"CppunitTest_stoc_uriproc failed on Windows" reports that
translateToExternal("file:///abc/%feef") produces an empty string (indicating
failure) instead of "file:///abc/%FEef" (as expected in
stoc/test/uriproc/test_uriproc.cxx) when osl_getThreadTextEncoding() is Shift
JIS.

This was due to how the call to rtl::Uri::encode in
Translator::translateToExternal (in
stoc/source/uriproc/ExternalUriReferenceTranslator.cxx) behaved:  It internally
interpreted its input "%FE" as the single-byte Shift JIS character 0xFE.  Which
gets mapped to U+2122 as an extension (see "APPLE additions over SJIS, we
convert this like Apple, because I think, this gives better result, then [sic]
we take a replacement char" in sal/textenc/tcvtjp6.tab) in readUcs4, but which
in turn doesn't get mapped back to any Shift JIS character in writeEscapeChar.

Translator::translateToExternal is the only user of
rtl_UriEncodeStrictKeepEscapes, as introduced by
6ff5d3341d "INTEGRATION: CWS c07v013_SRC680
(1.4.40); FILE MERGED: 2007/06/21 13:00:56 sb 1.4.40.1: #b6550116# Made
XExternalUriReferenceTranslator.translateToExternal more robust when the input
URL contains spurious non--UTF-8 octets like %FE (which are now copied verbatim,
instead of signalling error)."

To make the claim true that such "spurious non--UTF-8 octets like %FE" are
always "copied verbatim", regardless of text encoding being used, repurpose
rtl_UriEncodeStrictKeepEscapes to always treat any escape sequences that are
present as (potentially broken) UTF-8.

Change-Id: I0fa0b14d3e3d44e4b5514e1b73c84c407a947ce9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158888
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-03 17:26:58 +01:00
Stephan Bergmann d614b08b7f Suppress loplugin:redundantfcast also around C++20 CXXParenListInitExpr
...which is used by
<https://github.com/llvm/llvm-project/commit/95a4c0c83554c025ef709a6805e67233d0dedba0>
"[clang] Reland parenthesized aggregate init patches" for the
__cpp_aggregate_paren_init feature implemented since Clang 16, and which had
caused bogus warnings in patch set 1 of
<https://gerrit.libreoffice.org/c/core/+/158838/1> "tdf#157028 vcl: PDF export:
inline OBJR dictionaries"

Change-Id: Id4118ce8d53902388ca3a80ad03f12b59e3a35e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158842
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-03 08:11:59 +01:00
Stephan Bergmann c1f95f01e0 Fix typo
...spotted by Ilmari

Change-Id: I7414d77d91a4d11d16de1417e60cddf72a0746c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158782
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-02 09:31:55 +01:00
Stephan Bergmann 5f0e243159 Adapt to Clang 18 trunk ElaboratedTypeKeyword rework
<https://github.com/llvm/llvm-project/commit/4ad2ada5216ee2bb3c334a3233a9ab51f2521b82>
"[clang][NFC] Refactor ElaboratedTypeKeyword"

Change-Id: I1ee6592fe76bb484441ca859986e7217eaba58f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158764
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-02 07:46:28 +01:00
Stephan Bergmann f029f8dfb0 Various -Werror,-Wvla-cxx-extension
...as enabled by default now in recent Clang 18 trunk

Change-Id: I59f9bbdf2ce064f170df01e6d7ec2341884ab5e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158563
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-27 22:12:07 +02:00
Stephan Bergmann 30027d95f9 Step 2 of removing cargo-cult pragma pack around rtl_[u]String
see 8ae3ae4bf7 "Step 1 of removing cargo-cult
pragma pack around rtl_[u]String"

Change-Id: Ie9140b92da8895c4991a7f449359bb1747fdb23d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158553
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-27 15:50:09 +02:00
Stephan Bergmann 0b663a28b4 At least use the oldest available -std:c++14 for MSVC gb_CXX03FLAGS
...if we don't have a proper -std:c++03 available

Change-Id: Iffef738be486b402a2b6af1a2761eb905ac4ddf2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158550
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-27 13:28:44 +02:00
Stephan Bergmann 819f87faee Explicitly build the ODK examples against C++03
...similarly to how CppunitTest_odk_checkapi already builds with C++03 to detect
inadvertent uses of newer features in code that is meant to be still compatible
with C++03.  And fix any uses of newer features that had already crept in.

Change-Id: I9fb4013099c1dff2c1ad5fba8fc93d9aa4efbde8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158523
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-27 11:16:00 +02:00
Stephan Bergmann 550eb0d451 Clarify that o3tl::cmp_* is still needed for LLVM 12 libc++ for now
...which is apparently used by Android builds, so
<https://gerrit.libreoffice.org/c/core/+/158513> "Directly use std::cmp_*, drop
o3tl::cmp_*" cannot go in, yet

Change-Id: If8b3ef1e647b6e33c43d0fe5737daf63eda0b761
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158524
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-27 11:11:00 +02:00
Stephan Bergmann fa91d0a3e8 Replace use of "Calibri" and "Calibri Light" with "Noto Sans"
...in CppunitTest_chart2_xshape, which had caused
<https://buildbot.flathub.org/#/builders/6/builds/75165> to fail with

> diff.cxx:324:Assertion
> Test name: Chart2XShapeTest::testTdf149204
> assertion failed
> - Expression: valInTolerance
> - 3511; Found Value: 3485; Tolerance: 1; Relative: 0
>
> diff.cxx:265:Assertion
> Test name: Chart2XShapeTest::testPieChartLabels1
> double equality assertion failed
> - Expected: 8383
> - Actual  : 8399
> - Delta   : 1e-08
> - Reference: /run/build/libreoffice/chart2/qa/extras/xshape/data/reference/tdf90839-1.xml
> - Node: /XShapes/XShape[2]/XShapes/XShape[3]/XShapes/XShape[2]
> - Attr: positionX
>
> diff.cxx:324:Assertion
> Test name: Chart2XShapeTest::testPieChartLabels2
> assertion failed
> - Expression: valInTolerance
> - 3124; Found Value: 2966; Tolerance: 1; Relative: 0
>
> diff.cxx:324:Assertion
> Test name: Chart2XShapeTest::testPieChartLabels3
> assertion failed
> - Expression: valInTolerance
> - 3124; Found Value: 2966; Tolerance: 1; Relative: 0
>
> diff.cxx:324:Assertion
> Test name: Chart2XShapeTest::testPieChartLabels4
> assertion failed
> - Expression: valInTolerance
> - 2768; Found Value: 2531; Tolerance: 1; Relative: 0

Change-Id: I518d37bedf7d8738396e05011223bd970786a45a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158377
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-26 19:08:47 +02:00
Stephan Bergmann b36b24ecfb Use std::from_chars
(which also makes readInt32 report failure, instead of running into UB, when the
read value is out of range)

Change-Id: I8449e4fe696c9b0ab5b868127ef517dc080c31ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158489
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-26 19:08:08 +02:00
Stephan Bergmann 0f132270b4 No --without-fonts gb_CppunitTest_set_non_application_font_use,*,abort
...which had caused an (explicit --without-fonts) Fedora build to hit the
std::abort in PrintFontManager::Substitute
(vcl/unx/generic/fontmanager/fontconfig.cxx) during
CppunitTest_sd_import_tests-smartart's testTdf134221::TestBody, apparently for
some aTargetName = "DejaVu Sans"

Change-Id: I3b050eb3225595e6ce22a8df22dbb11f920cac4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158492
Reviewed-by: Dan Horák <dan@danny.cz>
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-26 17:03:30 +02:00
Stephan Bergmann dcaa2c4870 Use std::signed_integral concept
...which, unlike std::is_signed, also requires that T is an integer type, not
just any arithmetic type, but which appears to fit well here anyway.

But LLVM 12 libc++, which is apparently used by Android builds, only provides a
bare-bones <concepts> that lacks std::signed_integral (among others), so for now
introduce o3tl/concepts.hxx providing what's missing (incl. std::integral and
std::unsigned_integral, for some kind of consistency).

Change-Id: I1c37d37fa1b57b5e3bf24c9e44f3973003905cb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158406
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-25 10:27:26 +02:00
Stephan Bergmann 3d58f3c0c2 Use requires-clauses
Change-Id: I27c990f27023aba5e77c6b406d7dbdcc898054ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158405
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-24 22:46:25 +02:00
Stephan Bergmann 9d5e8d5f5b tdf#153519 Another TreeListEntryUIObject heap-use-after-free
...similar to the one addressed with the commits leading up to
9a23ded274 "Fix thinko when to sleep"

Change-Id: I8114c6647e06ceb202cd790af691ecc18e9d4e17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158373
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-24 11:13:38 +02:00