Commit Graph
596 Commits
Author SHA1 Message Date
Andrea Gelmini d3c5f8323e Fix typos
Change-Id: I7e55a26f1bc242e2cf458b92db5ee8645c370581

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209814
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 15:13:12 +02:00
Gabor Kelemen 0bdcfc2900 tdf#146619 Use more forward declarations in include/unotools/
This shaves off some 40M of input

Change-Id: I12e10deb87ceea1f7a23f3de4ea624befe187c3f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198238
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-02-05 17:35:46 +01:00
Akaki Dzidziguri 37c5a752ee tdf#158237 Use C++20 contains() in migration
Change-Id: Iff1cbd72a655985c59a0ef848f9773148e375382
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194298
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2025-12-12 14:31:07 +01:00
Mike Kaganski 7b04ef05cd Drop some uses Sequence::getConstArray
Similar to commit b280efcb9b
(Drop some uses Sequence::getConstArray, 2025-12-07).

Change-Id: Ieac325a660fe64e8172c5ed139380caa3d26a73c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195200
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-12-08 10:00:21 +01:00
Gabor Kelemen 3765f46745 tdf#146619 Run IWYU on desktop/
Change-Id: Iff8f62782c3935e012574ea29877495fb2aa34ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189779
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-09-13 09:23:36 +02:00
Caolán McNamara 3d36a94b25 cid#1660296 Variable copied when it could be moved
and

cid#1660283 Variable copied when it could be moved
cid#1660278 Variable copied when it could be moved
cid#1660277 Variable copied when it could be moved
cid#1660272 Variable copied when it could be moved
cid#1660271 Variable copied when it could be moved
cid#1660269 Variable copied when it could be moved
cid#1660257 Variable copied when it could be moved
cid#1660251 Variable copied when it could be moved

Change-Id: I6684eaf2162dd3550e2eab3f72cccbaa09448f43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188925
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-04 22:05:59 +02:00
Caolán McNamara 51d5b49113 cid#1660519 Variable copied when it could be moved
and

cid#1660298 Variable copied when it could be moved
cid#1660297 Variable copied when it could be moved

Change-Id: I1e9ca4c5eb25606540f807cc4894c06646159dc9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188904
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-04 12:38:14 +02:00
Gabor Kelemen 227939ee4c Remove obsolete fw declarations from desktop/ drawinglayer/
found with bin/find-unneeded-includes --fwdecl

Change-Id: I61ee34a26ed75c0bbbf4dae0359bfeeea37b4296
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183883
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2025-04-17 00:22:31 +02:00
Simon Chenery 7e4acdc2f7 tdf#145614 Convert #define MAX_HEADER_LENGTH to constexpr
Change-Id: Ie61197b62e8cc7d329da04fdf9ed8d2f1c190854
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181920
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
2025-03-03 20:02:00 +01:00
Simon Chenery 4cc35cf5d5 tdf#163738 use insert function instead of for loop in migration.cxx
Change-Id: Icf49d59fa56b6c7074abd476deeca040ea4c178f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180801
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2025-02-03 11:34:18 +01:00
Noel Grandin 40afc6f25a clang-tidy: performance-unnecessary-copy-initialization in desktop
Change-Id: I0e6ce8858fc058403020e2db863730f04cac70db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176392
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-11 15:47:17 +01:00
Noel Grandin ed0b12f4ea no need to take a copy of the getProcessComponentContext return value
we can just take a "const &".

(found by running clang-tidy with the
performance-unnecessary-copy-initialization warning)

Change-Id: I20fd208c65303da78170b1ac06c638fdf3aa094b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176267
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-08 15:23:52 +01:00
Caolán McNamara 6f1508f4de cid#1555767 COPY_INSTEAD_OF_MOVE
and

cid#1555770 COPY_INSTEAD_OF_MOVE
cid#1555788 COPY_INSTEAD_OF_MOVE
cid#1555789 COPY_INSTEAD_OF_MOVE
cid#1555798 COPY_INSTEAD_OF_MOVE
cid#1555816 COPY_INSTEAD_OF_MOVE
cid#1555822 COPY_INSTEAD_OF_MOVE
cid#1555835 COPY_INSTEAD_OF_MOVE
cid#1555845 COPY_INSTEAD_OF_MOVE
cid#1555859 COPY_INSTEAD_OF_MOVE
cid#1555864 COPY_INSTEAD_OF_MOVE
cid#1555868 COPY_INSTEAD_OF_MOVE
cid#1555892 COPY_INSTEAD_OF_MOVE
cid#1555896 COPY_INSTEAD_OF_MOVE
cid#1555921 COPY_INSTEAD_OF_MOVE
cid#1555932 COPY_INSTEAD_OF_MOVE
cid#1555935 COPY_INSTEAD_OF_MOVE
cid#1555944 COPY_INSTEAD_OF_MOVE
cid#1555952 COPY_INSTEAD_OF_MOVE
cid#1555985 COPY_INSTEAD_OF_MOVE
cid#1556024 COPY_INSTEAD_OF_MOVE
cid#1556038 COPY_INSTEAD_OF_MOVE
cid#1556042 COPY_INSTEAD_OF_MOVE
cid#1556044 COPY_INSTEAD_OF_MOVE
cid#1556060 COPY_INSTEAD_OF_MOVE
cid#1556083 COPY_INSTEAD_OF_MOVE
cid#1556085 COPY_INSTEAD_OF_MOVE
cid#1556090 COPY_INSTEAD_OF_MOVE
cid#1556136 COPY_INSTEAD_OF_MOVE
cid#1556157 COPY_INSTEAD_OF_MOVE
cid#1556159 COPY_INSTEAD_OF_MOVE
cid#1556172 COPY_INSTEAD_OF_MOVE
cid#1556179 COPY_INSTEAD_OF_MOVE
cid#1556187 COPY_INSTEAD_OF_MOVE
cid#1556255 COPY_INSTEAD_OF_MOVE
cid#1556256 COPY_INSTEAD_OF_MOVE
cid#1556266 COPY_INSTEAD_OF_MOVE
cid#1556275 COPY_INSTEAD_OF_MOVE
cid#1556290 COPY_INSTEAD_OF_MOVE
cid#1556294 COPY_INSTEAD_OF_MOVE
cid#1556301 COPY_INSTEAD_OF_MOVE
cid#1556311 COPY_INSTEAD_OF_MOVE
cid#1556318 COPY_INSTEAD_OF_MOVE
cid#1556326 COPY_INSTEAD_OF_MOVE
cid#1556369 COPY_INSTEAD_OF_MOVE
cid#1556374 COPY_INSTEAD_OF_MOVE
cid#1556387 COPY_INSTEAD_OF_MOVE
cid#1556388 COPY_INSTEAD_OF_MOVE
cid#1556417 COPY_INSTEAD_OF_MOVE
cid#1556425 COPY_INSTEAD_OF_MOVE
cid#1556435 COPY_INSTEAD_OF_MOVE
cid#1556495 COPY_INSTEAD_OF_MOVE
cid#1556497 COPY_INSTEAD_OF_MOVE
cid#1556501 COPY_INSTEAD_OF_MOVE
cid#1556503 COPY_INSTEAD_OF_MOVE
cid#1556520 COPY_INSTEAD_OF_MOVE
cid#1556523 COPY_INSTEAD_OF_MOVE
cid#1556562 COPY_INSTEAD_OF_MOVE
cid#1556573 COPY_INSTEAD_OF_MOVE
cid#1556576 COPY_INSTEAD_OF_MOVE
cid#1556598 COPY_INSTEAD_OF_MOVE
cid#1556615 COPY_INSTEAD_OF_MOVE
cid#1556626 COPY_INSTEAD_OF_MOVE
cid#1556671 COPY_INSTEAD_OF_MOVE
cid#1556689 COPY_INSTEAD_OF_MOVE
cid#1556701 COPY_INSTEAD_OF_MOVE
cid#1556713 COPY_INSTEAD_OF_MOVE
cid#1556758 COPY_INSTEAD_OF_MOVE
cid#1556759 COPY_INSTEAD_OF_MOVE
cid#1556788 COPY_INSTEAD_OF_MOVE
cid#1556811 COPY_INSTEAD_OF_MOVE
cid#1556821 COPY_INSTEAD_OF_MOVE
cid#1556824 COPY_INSTEAD_OF_MOVE
cid#1556825 COPY_INSTEAD_OF_MOVE
cid#1556862 COPY_INSTEAD_OF_MOVE

Change-Id: I4925a79688a983bb07252600430039ec0bcb75b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175678
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-10-26 19:25:03 +02:00
Caolán McNamara d5ad9c0777 cid#1556086 COPY_INSTEAD_OF_MOVE
and

cid#1556087 COPY_INSTEAD_OF_MOVE
cid#1556093 COPY_INSTEAD_OF_MOVE
cid#1556094 COPY_INSTEAD_OF_MOVE
cid#1556105 COPY_INSTEAD_OF_MOVE
cid#1556121 COPY_INSTEAD_OF_MOVE
cid#1556184 COPY_INSTEAD_OF_MOVE
cid#1556399 COPY_INSTEAD_OF_MOVE
cid#1556405 COPY_INSTEAD_OF_MOVE
cid#1556419 COPY_INSTEAD_OF_MOVE
cid#1556421 COPY_INSTEAD_OF_MOVE
cid#1556444 COPY_INSTEAD_OF_MOVE
cid#1556448 COPY_INSTEAD_OF_MOVE
cid#1556457 COPY_INSTEAD_OF_MOVE
cid#1556468 COPY_INSTEAD_OF_MOVE

Change-Id: I1f352682daebd4e3ed2e7fe669aa0943dcc33edd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171372
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-08-02 10:05:45 +02:00
Gabor Kelemen e1a351ca19 Remove now unneeded osl/diagnose.h
followup to commit 57c228803e

Change-Id: Iebfb23bb65e2bf898bf27f367cc9641f47a14cf3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167998
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2024-07-20 10:20:31 +02:00
Noel Grandin 9422879a5c loplugin:ostr in desktop
Change-Id: Ib43d1c3a182badddd870bcb8e052ac7fd0a16fc5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167270
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-07 14:41:40 +02:00
Rafał Dobrakowski 75706c003c tdf#146619 Remove unused #includes from C/C++ files
the 'desktop' module was cleaned

Change-Id: Ia7dcb77a42ca7f9be67e30d10cd54697bf93b6d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165663
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-04-02 17:27:27 +02:00
Mike Kaganski 0fa827dbb2 Drop std::as_const from css::uno::Sequence iterations
Obsoleted by commit 2484de6728 (Remove
non-const Sequence::begin()/end() in internal code, 2021-10-15) and
commit fb3c04bd19 (Drop non-const
Sequence::operator[] in internal code, 2021-11-05).

Change-Id: Idbafef5d34c0d4771cbbf75b9db9712e504164cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162640
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-27 12:43:48 +01:00
Stephan Bergmann 326a8d5dd2 Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: desktop
Change-Id: I896fb07e753bfd7be5df892b1608954ad6a9cece
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158188
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-19 18:49:36 +02:00
Noel Grandin 0193b284e8 new loplugin:constexprliteral
OUStringLiteral should be declared constexpr, to enforce
that it is initialised at compile-time and not runtime.

This seems to make a different at least on Visual Studio

Change-Id: I1698f5fa22ddb480347c2f4d444530c2e0e88d92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153499
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-26 13:12:31 +02:00
Noel Grandin d638a512ac loplugin:stringadd in d*
after my patch to merge the bufferadd loplugin into stringadd

Change-Id: I625a0adf89f54ea25f0377a266c37acf9a37d723
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149550
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-25 06:21:25 +00:00
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
Julien Nabet c4fb915213 [loplugin:fakebool] in desktop
/home/julien/lo/libreoffice/desktop/source/migration/migration.cxx:628:5: error: VarDecl, use "bool" instead of '::sal_Bool' (aka 'unsigned char') [loplugin:fakebool]
    auto const hasCurrent = set->hasByName(currentName);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/julien/lo/libreoffice/desktop/source/migration/migration.cxx:629:5: error: VarDecl, use "bool" instead of '::sal_Bool' (aka 'unsigned char') [loplugin:fakebool]
    auto const hasMigrated = set->hasByName(migratedName);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/julien/lo/libreoffice/desktop/source/migration/migration.cxx:647:5: error: VarDecl, use "bool" instead of '::sal_Bool' (aka 'unsigned char') [loplugin:fakebool]
    auto const hasMigrated = set->hasByName(migratedName);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

since 7f04bb393f
Clean up color scheme migration

Change-Id: I2a06b73cecc4812d2876689f22ba89eba12b308f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140024
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-09-15 20:28:17 +02:00
Stephan Bergmann 7f04bb393f Clean up color scheme migration
...avoiding to have code in configmgr that knows about the details of the data
stored in the configuration.  (See the comments starting at
<https://gerrit.libreoffice.org/c/core/+/139690/9#message-44703a2529c07bf1b0202ed3a232aa661784b159>
"Migrating product name related color schemes between different versions" for
details.)

This reverts the dubious changes of 583ea856f2
"Migrating product name related color schemes between different versions" in
configmgr and offapi.  (Also, this moves the computation of sMigratedProductName
in MigrationImpl::copyConfig, desktop/source/migration/migration.cxx, to a saner
location than in the middle of the "check if the shared
registrymodifications.xcu file exists" block where that
583ea856f2 had placed it.)

Change-Id: I7ab3d57db19065c7c818e697300a2abd9e7f72bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139963
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-09-15 14:27:31 +02:00
Andrea Gelmini 0484d071bf Fix typo
Change-Id: Ibdcc95a3275b4af1b278a5d069c19f47e3e2c8d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139874
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-09-14 06:46:14 +02:00
Balazs Varga 583ea856f2 Migrating product name related color schemes between different versions
Making work to migrate product name related color schemes
with different kind of product names. For example from a product
named by LibreOffice to a product named by LibreOfficeDev.

Change-Id: Iabef982216f126b781df122ed258816af2ae337c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139690
Tested-by: Jenkins
Tested-by: Gabor Kelemen <kelemeng@ubuntu.com>
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2022-09-13 19:50:00 +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
Noel Grandin b33227d80b clang-tidy modernize-pass-by-value in desktop
Change-Id: Ie9c1cd41c5944b901f4ec6c1e4ffd8608c063ffa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135317
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-03 08:13:09 +02:00
Stephan Bergmann 3705139a8e Just use Any ctor instead of makeAny in desktop
Change-Id: Ieca85ea1b822ffa80420ed1cb6950bdedd15d000
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133828
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-04 19:28:34 +02:00
Noel Grandin 5200a73627 use more string_view in various
found by examining uses of OUString::copy() for likely places

Change-Id: I6ff20e7b273ad6005410b82719183c1122f8c018
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133617
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-01 08:30:18 +02:00
Noel Grandin d3849255b7 use more string_view in INetURLObject
Change-Id: I4462f7cf4740fa4d1b129d76a0775f4250f41bbd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133555
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-29 08:53:22 +02:00
Noel Grandin ab699bfdb3 new loplugin:stringviewvar looks for OUString vars that can be
... that can be string_view

Change-Id: I0ddf66725e08b58e866a764f57200dd188b9f639
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133066
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-19 18:31:10 +02:00
Noel Grandin cbaf1fbaa6 loplugin:stringview more o3tl conversion
look for call sequences that can use string_view and the new o3tl
functions in o3tl/string_view.hxx

Also add a few more wrappers to said #include file

Change-Id: I05d8752cc67a7b55b0b57e8eed803bd06bfcd9ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132840
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-12 12:42:15 +02:00
Mike Kaganski a23a7eea5c Avoid OUStringBuffer::toString where possible
Change-Id: I99abbe97a48b2077e28d6221fb70036e5e412657
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127479
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-26 20:36:26 +01:00
Noel Grandin 9444c925b2 new loplugin:stringliteraldefine
look for
   #define FOO "foo"
that can be converted into OUStringLiteral.

This is the first pass of this plugin, only doing those #define which
are local to a single compilation unit.

Change-Id: Ic8610e29ec42c36d03db5014a93c244315d5bbea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124962
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-10 19:10:31 +01:00
Mike Kaganski 471f5ab323 Prepare for removal of non-const operator[] from Sequence in desktop
Change-Id: I76959f62d46e12d984fe4c7be74e5857399e9126
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124358
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-30 17:39:47 +02:00
Noel Grandin ebb636473f loplugin:moveparam in desktop
Change-Id: Ie96a3887876bf9a0bb13ae4a69d1685186a4e9b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123384
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-11 15:13:39 +02:00
Julien Nabet 7e7dd7f152 drop 'using namespace std' in desktop, e*, f*
Change-Id: I277dc957798093001f9a3935f97db8ac0314e6a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123022
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-03 19:27:50 +02:00
Stephan Bergmann 09fc313702 Extend loplugin:stringviewparam to starts/endsWith: desktop
Change-Id: I42fa4d25eca6b2c5d14212eca3a6ebc7146cce5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122500
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-23 08:49:35 +02:00
Mike Kaganski a0656ec6fc const OUString -> const OUStringLiteral
Mostly automated rewrite

Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-25 10:06:26 +01:00
Noel f0c0796cb9 loplugin:refcounting in desktop
Change-Id: If62998173edb3961beb32de484eba000bd28f4d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111301
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-22 11:08:55 +01:00
Caolán McNamara ac396f2f6b fix coverity parse errors
Change-Id: I3a1179947704452e3ffec02be59d0f7bf0b75ab0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109017
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-09 13:01:49 +01:00
Stephan Bergmann a3d0091d18 New loplugin:stringliteralvar
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for
details.

(Turned some affected variables in included files into inline variables, to
avoid GCC warnings about unused variables.)

Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-26 14:51:15 +01:00
Noel 8332d6d820 loplugin:stringviewparam include comparisons with string literals
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-30 12:32:14 +01:00
Noel bb06f51308 loplugin:stringviewparam extend to comparison operators
which means that some call sites have to change to use
unicode string literals i.e. u"foo" instead of "foo"

Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-24 09:45:04 +01:00
Philipp Hofer eedafe6e5c tdf#123936 Formatting files in module desktop with clang-format
Change-Id: I39856d77a2ef506612b68fccfd0ba9c9d6b1debc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105661
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-11-13 15:15:34 +01:00
Noel 93c64a61f2 loplugin:stringview
Add new methods "subView" to O(U)String to return substring views
of the underlying data.

Add a clang plugin to warn when replacing existing calls to copy()
would be better to use subView().

Change-Id: I03a5732431ce60808946f2ce2c923b22845689ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105420
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-11 11:58:37 +01:00
Gabor Kelemen 433e60eb52 tdf#42949 Fix new IWYU warnings in directories d*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I8f3cd05dbd86bd22fd84d767adc44fc2b0c89404
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105468
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-09 16:04:18 +01:00
Noel 268a49f473 loplugin:reducevarscope in desktop..emfio
Change-Id: I25ca760ae15114ada621d928997a7117401c75d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103811
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-02 10:46:46 +02:00
Andrea Gelmini 450d2c5810 Fix typo in code
It passed "make check" on Linux

Change-Id: I4d3ce4571881fd75bcdf3b70f3b34fd71e573099
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103246
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-09-23 18:54:31 +02:00