Commit graph

1951 commits

Author SHA1 Message Date
Mike Kaganski
3d236177be Deduplicate O(U)StringConcatenation
And use an overloaded helper function with a better (?) unified name
to show that the result is not an O(U)String.

Change-Id: I8956338b05d02bf46a6185828130ea8ef145d46b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141203
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-11 12:46:01 +02:00
Martin Schumann
42fe257fa4 tdf#151314 add Betterbird to Thunderbird-like mail clients in senddoc.sh
Change-Id: Ie145aba936138968b31f1f89d85ad23ad937a367
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141158
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-10-10 16:55:54 +02:00
Noel Grandin
4b95451f85 split utl::TempFile into fast and named variants
which makes it easier to know what each variant requires
to stay on it's happy path

Change-Id: I3275a2543573367714bc78092e882f6535507285
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140469
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-29 09:11:18 +02:00
Mahdi Tizabi
cab4fd84ff tdf#42982 Improved UNO API error reporting
Making `RuntimeException` instances's messages in  'SyncDbusSessionHelper.hxx' more clear.

Change-Id: I40105102f8785536d29e103a44d20d11c68943bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136629
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-09-15 15:10:35 +02:00
Mike Kaganski
6daa9cd133 Inline some macro wizardry
Change-Id: Ice11a7b004ae39b6e455efa8f9cee62225d55147
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139032
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-30 14:43:27 +02:00
Stephan Bergmann
91ba9654ba Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxx
...so that its TOOLS_WARN_EXCEPTION can be used in
comphelper/source/misc/logging.cxx in a follow-up commit.  (And while at it,
rename from diangose_ex.h to the more appropriate diagnose_ex.hxx.  The
comphelper module is sufficiently low-level for this immediate use case, so use
that at least for now; o3tl might be even more suitable but doesn't have a
Library until now.  Also, for the immediate use case it would have sufficed to
only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION,
TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of
include/tools/diagnose_ex.h into an additional new
include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move
the complete include file as is.)

Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-18 17:10:19 +02:00
Vasily Melenchuk
772f7a2dc3 tdf#150161: senddoc: use corrected name url: original can be a file path
...and in this case file name will be not parsed and --attach-name
parameter will be empty. This leads to missing file name of
attachment. In case of Thunderbird it is not a big problem,
but Outlook does not want to attach .tmp files: it is "potentially
unsafe attachment".

Change-Id: I7c2f696391e1183211a169b08004c6668771f288
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137480
Tested-by: Gabor Kelemen <kelemeng@ubuntu.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-07-27 14:27:03 +02:00
Noel Grandin
aa2067dda6 elide some makeStringAndClear() calls
Change-Id: Iccdb04df53bc981e2240240daddf15e9e1bb5a16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137310
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-22 11:13:28 +02:00
Mike Kaganski
2a71977494 tdf#126263: do not try to delete non-temporary files
Change-Id: I5df7db7eac6224fce833e6b9d4ea220cade44e4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136483
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-06-27 13:59:47 +02:00
Mike Kaganski
738e0bd68c tdf#126263: make sure to convert system path to file URLs
Change-Id: Ia21f29e3a1eb078a7df2366399c59d46ab26ff3a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136482
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-06-27 13:59:36 +02:00
Stephan Bergmann
0bbbde84b0 tdf#140886: Make "Do you really want to open it?" more reliable
70009098fd "tdf#128969: Let the user explicitly
decide to execute an external program" had shoehorned that new warning dialog
into the existing XSystemShellExecute::execute IllegalArgumentException return
path, which caused some issues:  For example, it caused the warning dialog to
reappear after you acknowledged it on macOS (see comment at
<https://bugs.documentfoundation.org/show_bug.cgi?id=140886#c10> "Allow
hyperlink opening on file with execute bit set ref. CVE-2019-9847"), and it
caused the warning dialog to erroneously appear for a non-existing file on
Windows (see comment at
<https://gerrit.libreoffice.org/c/core/+/124422/2#message-ac76b728fedc53e7d0a04c99f00364068b51a8ea>
"tdf#128969: Let the user explicitly decide to execute an external program").

So rather than reusing IllegalArgumentException for this case, use a different
kind of exception to trigger that warning dialog.  The existing
AccessControlException (which is also a RuntimeException) happened to fit more
or less well.

Change-Id: I3f743c21be48d54f10951006ef3d7172e23e9076
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135524
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-09 11:17:14 +02:00
Stephan Bergmann
da3aa26efd Library_syssh must link against expat when using StaticLibrary_shell_xmlparser
...which in turn uses expat, so this caused a Linux build of mine to fail with

> [LNK] Library/libsysshlo.so
> ld.lld: error: undefined symbol: XML_ParserCreate
> >>> referenced by xml_parser.cxx:74 (shell/source/all/xml_parser.cxx:74)
> >>>               xml_parser.o:(xml_parser::xml_parser()) in archive workdir/LinkTarget/StaticLibrary/libshell_xmlparser.a

etc.  (No idea why that only started to hit me now, seemingly out of the blue,
but it looks plausible that we need that fix.)

Change-Id: I1d0efabf8cc809bd82ce30ec67d16ce1eb547de0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134167
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-11 16:16:35 +02:00
Stephan Bergmann
7c5d3d74ee Just use Any ctor instead of makeAny (Linux, sequel)
Change-Id: Idcf537a838bb0e47cfa31db8bc09e477b277ee37
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133875
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-05 11:44:48 +02:00
Stephan Bergmann
a1c62cfc60 Just use Any ctor instead of makeAny (macOS)
Change-Id: I6c185eecf943205f78567393f0ef588580ee4dab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133821
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-04 15:26:09 +02:00
Stephan Bergmann
b34f6f3b5a Just use Any ctor instead of makeAny in shell
Change-Id: I08f061d2d7feda582cd2495ac4b11d2ac0a6bbc2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133782
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-04 06:54:00 +02:00
Samuel Mehrbrodt
675788b208 Extend UNO API for custom jump lists
* Allow to display the recent/frequent files
* Allow adding items to the "Tasks" category
* Allow adding multiple categories

Follow-up to 7efd22c912

Change-Id: I860d44c1a0d9bc8200529c908b6103741dc37bb5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133367
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-04-26 11:46:17 +02:00
Stephan Bergmann
6fd447aaf2 loplugin:stringviewparam
Change-Id: I6b7e0482fca0d1b82afa13131ef5206763e1ccb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133032
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-15 13:42:34 +02:00
Stephan Bergmann
dcd969ba52 loplugin:stringviewparam
Change-Id: Ie9dc89642c197baaf1ecfdfcd340cb6a427147ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133033
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-15 08:38:07 +02:00
Stephan Bergmann
7e3d93fd57 Various loplugin warnings (in new Windows-only code)
Change-Id: I78863816c9ad520e0fc4919aeaa2e25ff768d451
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132765
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-10 10:54:32 +02:00
Andrea Gelmini
cbdd82ef1d Remove execution bits from data files
Change-Id: I2d3e00a93cb4f089c043c0067c8026cc9fc78301
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132329
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2022-03-31 14:51:18 +02:00
Samuel Mehrbrodt
7efd22c912 Add UNO API for custom Jump Lists
Allows adding custom jump list categories to Windows Task Bar

Change-Id: I13b6c3ad5de386cf74e2b346f10889bc46a8ad4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131540
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-03-30 12:14:28 +02:00
Stephan Bergmann
d501a1c00c loplugin:trivialconstructor
Change-Id: I44c7a934c2d2fec16bb5d8e90c9186030934a021
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132016
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-24 09:27:56 +01:00
Stephan Bergmann
c1ac79906b Handle symlinks
LIBREOFFICE-PQ967WYM

Change-Id: I5e4df92401e009fe6b7238565d1223cfb77d10ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130930
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-03 18:59:16 +01:00
Caolán McNamara
3e67678af2 add to suffix denylist
add the macOS specific suffixes from
https: //support.google.com/mail/answer/6590?hl=en#zippy=%2Cmessages-that-have-attachments

Change-Id: I3a834694e3aefb757974cd00ade009874c68c8b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130397
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-02-24 08:54:18 +01:00
Caolán McNamara
4751853b19 add to suffix denylist
mostly https: //support.google.com/mail/answer/6590?hl=en#zippy=%2Cmessages-that-have-attachments

but see also:
https://www.howtogeek.com/137270/50-file-extensions-that-are-potentially-dangerous-on-windows

Change-Id: Ibe3abbdcdb6f82a73d245318ef97d86789d00523
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130394
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-23 15:41:41 +01:00
Caolán McNamara
ff66c1d82b sort these alphabetically
Change-Id: I03f89dd78908d08534413c0fe6a753e3346b3738
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130336
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-22 13:40:46 +01:00
Renwa Hiwa
0b0b1820d2 Better handling of msi
LIBREOFFICE-SK4E5D8N

Change-Id: I44f25a47ab6ffeb9d2b679874c8c96af1319eb2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130335
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-22 12:40:12 +01:00
Renwa Hiwa
7d92ec5ae1 Better handling of terminals
LIBREOFFICE-3MQTR80G

Change-Id: Ifa52d7f65aae473056202b46788c5870a8ce38c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130085
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-17 19:43:46 +01:00
Caolán McNamara
0a1d94d58d Revert "add webloc and url extensions"
This reverts commit e4c3fa614d.

Reason for revert: there's no evidence that they should be in this list

Change-Id: I8aa5f8a6beaf578feb76684cad5f6a69e17e2b2a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129624
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-09 20:57:51 +01:00
Caolán McNamara
e4c3fa614d add webloc and url extensions
Change-Id: I02b959f6bcdff5657525a6fd45d12c31315c1a68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129715
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-09 13:05:44 +01:00
Renwa Hiwa
7484c3393d Better handling of inetlocs
LIBREOFFICE-39BBF6YM

Change-Id: Iadae856a524a0ccda238785f60c8f3459e7b6157
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129714
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2022-02-09 13:05:28 +01:00
Caolán McNamara
f6180e3e87 rhbz#2047319 drop the SolarMutex before QApplication::init()
https://invent.kde.org/qt/qt/qtwayland/-/merge_requests/24#note_383915

reproducible with with qt5-qtwayland-5.15.2-17.fc35.x86_64 and
export OOO_FORCE_DESKTOP=plasma5
export SAL_USE_VCLPLUGIN=gtk3

Change-Id: Icdf6b8709865c723c266e6400169b33639a1b0e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129373
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2022-02-03 17:16:12 +01:00
Jan-Marek Glogowski
972aa39fb9 WASM open links in new browser tabs
I quickly gave up trying to understand what exactly clashes
between the Emscripten macros and OUString templates /
initializers. Not sure it can actually be "fixed".

Also disables the makeshared clang compilerplugin; currently
there is no way to get rid of all the false positive hits
when assigning the std::shared_ptr from a function instead of
a constructor call.

Change-Id: I8b13f179629ea63ff221584030556d2bedadc01b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128604
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-20 10:26:04 +01:00
Mike Kaganski
d0445802a8 Use WindowsErrorString instead of FormatMessageW
Change-Id: I183f19f6abd4ca3f54d13533c8551deb09cd9458
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128118
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-01-08 10:07:54 +01:00
Mike Kaganski
d75bf2c770 tdf#146554: use GetModuleHandleExW instead of GetModuleHandleW
This allows to avoid use of module name when obtaining current module
handle, which needs to be synchronized and thus is error-prone.

Change-Id: I2f0e0af7f616c3582b0a3271cf9e06420a9dfc8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127993
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-01-05 13:12:00 +01:00
Jan-Marek Glogowski
9f33f046f0 lngconvex is just a build-tool for Windows
Change-Id: I0395b5d14babe14301bd89f79f87eaa02c0ab7f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127912
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-03 22:49:07 +01:00
Jan-Marek Glogowski
17608c5718 Refactor some buildsytem stuff (mostly whitespace)
Change-Id: Idfca786ecc7251e08525bd5b45936143727c43d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126731
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-13 16:48:47 +01:00
Stephan Bergmann
db3a61cd95 Generally determine Rdb content from gb_*_set_componentfile calls
...instead of by listing the content somewhat redundantly in the Rdb_*.mk
files, to avoid duplication of logic for components that are only built
conditionally (and thus should only be included conditionally in the
corresponding Rdb).  To achieve that, add an "rdb" parameter to
gb_ComponentTarget_ComponentTarget (and to the gb_*_set_componentfile macros
that internally call gb_ComponentTarget_ComponentTarget), which is used to make
the appropriate gb_Rdb_add_component call internally from within
gb_ComponentTarget_ComponentTarget.  (As a special case,
gb_CppunitTest_set_componentfile shall not call gb_Rdb_add_component, as that
has already been done by the corresponding gb_Library_set_componentfile call, so
allow the gb_ComponentTarget_ComponentTarget "rdb" parameter to be empty to
support that special case.)

Most Rdb_*.mk files are thus mostly empty now.  One exception is
i18npool/Rdb_saxparser.mk, which duplicates some of the Rdb_services content as
needed during the build in CustomTarget_i18npool/localedata.

1c9a40299d "gbuild: create services.rdb from built
components" had already tried to do something similar (in addition to other
things) under a new --enable-services-rdb-from-build option.  However, that
approach had four drawbacks that this approach here addresses (and which thus
partly reverts 1c9a40299d):

1  Rdb_services shall not contain the component files of all libraries that are
built.  While that commit filtered out the component files that go into
Rdb_ure/services (ure/Rdb_ure.mk), it failed to filter out the component files
that go into others like Rdb_postgresql-sdbc
(connectivity/Rdb_postgresql-sdbc.mk).

2  The code added by that commit to Makefile.gbuild codified the knowledge that
there is an Rdb_services, which is brittle.

3  The code added by that commit to solenv/gbuild/Rdb.mk codified the knowledge
(for gb_Rdb__URECOMPONENTS) that there is an Rdb_ure/services, which is brittle.

4  Introducing an --enable-services-rdb-from-build option needlessly provided
two different ways how the content of Rdb_services is assembled.

The changes done here would leave --enable-services-rdb-from-build as a
misnomer, as it no longer controls how Rdb_services is assembled.  I thus
renamed it to --enable-customtarget-components, as that is apparently what it
still does now.

Change-Id: Ia5e8df4b640146c77421fcec6daa11a9cd260265
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126577
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-10 08:14:24 +01:00
Noel Grandin
ec1c4c4930 O[U]String::replaceAt overloads that take string_view
which results in lots of nice string_view improvements picked up by the
plugins

Change-Id: Ib0ec3887816b3d4436d003b739d9814f83e244b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125657
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-23 14:00:08 +01:00
Mike Kaganski
c6af59b234 Prepare for removal of non-const operator[] from Sequence in shell
Change-Id: Ie7792d0aa3f404d9177a1eb6f75569577fc3d6a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124388
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-30 23:18:51 +02:00
Julien Nabet
bf82274d32 drop 'using namespace std' in sax/sc/scaddins/sfx2/shell
Change-Id: I422a6d5b0151115203fd2d7c0fc5597903d3ec8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123064
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-04 22:25:07 +02:00
Stephan Bergmann
ad1557f5d7 A more lightweight O[U]StringConcatenation
...compared to a full-blown O[U]String, for temporary objects holding an
O[U]StringConcat result that can then be used as a std::[u16]string_view.

It's instructive to see how some invocations of operator ==, operator !=, and
O[U]StringBuffer::insert with an O[U]StringConcat argument required implicit
materialization of an O[U]String temporary, and how that expensive operation has
now been made explicit with the explicit O[U]StringConcatenation ctor.

(The additional operator == and operator != overloads are necessary because the
overloads taking two std::[u16]string_view parameters wouldn't even be found
here with ADL.  And the OUString-related ones would cause ambiguities in at
least sal/qa/rtl/strings/test_oustring_stringliterals.cxx built with
RTL_STRING_UNITTEST, so have simply been disabled for that special test-code
case.)

Change-Id: Id29799fa8da21a09ff9794cbc7cc9b366e6803b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122890
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-03 19:50:44 +02:00
Stephan Bergmann
bf59a45b04 Extended loplugin:referencecasting/redundantcast (clang-cl): shell
Change-Id: Iee72782ca3f9e536b391cc45d910792f66ce01a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122884
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-30 15:09:21 +02:00
Stephan Bergmann
a93c3f2eb0 GError::message is UTF-8
This caused CppunitTest_sw_dialogs_test to fail for LO_TEST_LOCALE=or hitting

> sal/rtl/ustring.cxx:530: void rtl_uString_newFromAscii(rtl_uString**, const char*): Assertion `static_cast<unsigned char>(*pCharStr) < 0x80' failed.

at

> #4  0x00007fd18a844f74 in rtl_uString_newFromAscii(rtl_uString**, char const*) (ppThis=0x7ffcb73e6e90, pCharStr=0x6191180 "ସମୟ ସୀମା ପହଞ୍ଚିଯାଇଛି") at sal/rtl/ustring.cxx:530
> #5  0x00007fd1525af9c1 in rtl::OUString::createFromAscii(char const*) (value=0x6191180 "ସମୟ ସୀମା ପହଞ୍ଚିଯାଇଛି") at include/rtl/ustring.hxx:3328
> #6  0x00007fd1525ad026 in (anonymous namespace)::GErrorWrapper::~GErrorWrapper() (this=0x7ffcb73e6f38, __in_chrg=<optimized out>) at shell/source/sessioninstall/SyncDbusSessionHelper.cxx:35
> #7  0x00007fd1525ad6a5 in (anonymous namespace)::request(char const*, com::sun::uno::Sequence<rtl::OUString> const&, std::u16string_view) (method=0x7fd1525b481d "InstallFontconfigResources", resources=uno::Sequence of length 1 = {...}, interaction=u"hide-finished") at shell/source/sessioninstall/SyncDbusSessionHelper.cxx:91
> #8  0x00007fd1525ada9d in shell::sessioninstall::SyncDbusSessionHelper::InstallFontconfigResources(com::sun::uno::Sequence<rtl::OUString> const&, rtl::OUString const&) (this=0x5d22380, resources=uno::Sequence of length 1 = {...}, interaction="hide-finished") at shell/source/sessioninstall/SyncDbusSessionHelper.cxx:158
> #9  0x00007fd178670daa in psp::PrintFontManager::autoInstallFontLangSupport(Timer*) (this=0x2e3ed90) at vcl/unx/generic/fontmanager/fontconfig.cxx:962
> #10 0x00007fd178670cd9 in psp::PrintFontManager::LinkStubautoInstallFontLangSupport(void*, Timer*) (instance=0x2e3ed90, data=0x2e3efa0) at vcl/unx/generic/fontmanager/fontconfig.cxx:956
> #11 0x00007fd178341e03 in Link<Timer*, void>::Call(Timer*) const (this=0x2e3efc0, data=0x2e3efa0) at include/tools/link.hxx:111
[...]

(But probably better to use the lenient OUString-from-rtl_TextEncoding ctor
rather than OUString::fromUtf8, in case GError::message happens to not contain
proper UTF-8 after all, which would make the latter assert.)

Change-Id: I61fede4576988c5f7f35bb071ab3f2c0e7a15aa1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122599
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-24 20:53:42 +02:00
Noel Grandin
34a9f93018 clang-tidy:readability-redundant-member-init
Change-Id: I396b83c089fef3aeb7789c17a3013ce61691504e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121489
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-02 16:06:48 +02:00
Caolán McNamara
626cf24313 drop final boost::noncopyable use
we replaced all the others, so replace this one too

Change-Id: If744a834e754126921e392d32af44797bd5d634d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120278
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-10 20:24:00 +02:00
Stephan Bergmann
43542cc07e Missing include
(for std::unique_ptr, with recent libstdc++ 12 trunk)

Change-Id: I61b7823dd740ea7cdfe0d7403a50ac73b24d1c4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120229
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-10 07:39:00 +02:00
Noel Grandin
14cfff500e Pass context and resource string down to boost::locale separately
because this is often on a hot path, and we can avoid the splitting and
joining of strings like this.

Change-Id: Ia36047209368ca53431178c2e8723a18cfe8260a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119220
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-05 09:39:11 +02:00
Collabora
2d04d7cc55 do not use "using namespace std" in headers
It's a bad style, doing that in headers can affect many source files
(especially with PCH used).

Change-Id: Ic9091a1d018e74606c9fa95df71a55faaa93d4ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119011
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-07-23 10:32:08 +02:00
Stephan Bergmann
7d5346eb09 -Werror,-Wunused-but-set-parameter (clang-cl 13 trunk)
...revealing that these places apparently wanted to assign to *pClassID rather
than pClassID ever since their introduction with
b718f390bf "INTEGRATION: CWS desktintgr01" and
9b1b1b0081 "INTEGRATION: CWS desktintgr02"

Change-Id: I672684739fd2722c5e804f47790884174c576369
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117840
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-06-25 21:10:28 +02:00