Commit Graph
1029 Commits
Author SHA1 Message Date
Caolán McNamara f8ed170f27 help: give every libxslt preference a value, not just one of them
A preference left unset keeps whatever libxslt defaults to, so name each
one instead of only XSLT_SECPREF_READ_FILE.

Reads over the network are allowed as well now, as a help page pulls in
another page through a vnd.sun.star.help URL and libxslt counts any
scheme other than file as a network read.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I1ad16fe7244505ae6122a1a272597464612f099d
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9935
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit d8923fe423af48cb02a60b01ec881aa12f6c14ca)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210432
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-14 12:56:39 +02:00
Andrea Gelmini 15987f31c1 Fix typos in code
Change-Id: Ifec2516549a6230096c857567b33c3543da8d113
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209745
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2026-08-24 09:13:34 +02:00
Simon Chenery 628c3f7b5a tdf#145614 avoid #define COMMAND_COUNT
Change-Id: I0782f734dee6e34acd48f1b569590da9e9f1d78f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194825
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2025-12-13 10:06:39 +01:00
Caolán McNamara 6fc58fb3a4 cid#1660346 Variable copied when it could be moved
and

cid#1660344 Variable copied when it could be moved
cid#1660343 Variable copied when it could be moved
cid#1660341 Variable copied when it could be moved
cid#1660339 Variable copied when it could be moved
cid#1660337 Variable copied when it could be moved
cid#1660335 Variable copied when it could be moved
cid#1660334 Variable copied when it could be moved

Change-Id: I3758a4228d5e848750b4ef37296b4d38b5d3e31c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188850
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-03 12:18:26 +02:00
Gabor Kelemen b52384de6f Remove obsolete fw declarations from writerperfect/ xml{help,script,security}
found with bin/find-unneeded-includes --fwdecl

Change-Id: Ib5cfbeea3a5811f770dc82d31000e88ec0ea19d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184009
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-05-20 12:20:47 +02:00
Noel Grandin 7e17a9b4ed loplugin:unusedfields
Change-Id: I4b02379e872e49dc5a3ecdbb5bc74e237ba61c01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185412
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-05-16 17:32:36 +02:00
Julien Nabet 13a3a28969 Related tdf#165980: now cxxhelp/provider/inputstream is useless, get rid of it
Change-Id: I3f1c71cc83f6f086c472a94adb8d5b916d1c8526
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184827
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2025-04-30 15:40:59 +02:00
Julien Nabet 871dc7bce1 tdf#165980: fix crash when launching help with "--with-help"
assertion:
5  0x00007f0f5578cf2a in ByteGrabber::ByteGrabber (this=0x558123967710, xIstream=uno::Reference to (chelp::XInputStream_impl *) 0x558124099a20)
   at /home/julien/lo/libo_perf/package/source/zipapi/ByteGrabber.cxx:44
6  0x00007f0f557a0793 in ZipFile::ZipFile
   (this=0x558123967640, aMutexHolder=empty rtl::Reference, xInput=uno::Reference to (chelp::XInputStream_impl *) 0x558124099a20, xContext=uno::Reference to (cppu::(anonymous namespace)::ComponentContext *) 0x558121aacc48, bInitialise=true, bForceRecovery=false, checks=ZipFile::Checks::Default) at /home/julien/lo/libo_perf/package/source/zipapi/ZipFile.cxx:90
7  0x00007f0f5580208d in std::_Construct<ZipFile, rtl::Reference<comphelper::RefCountedMutex>&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream>&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool, bool&, ZipFile::Checks> (__p=0x558123967640) at /usr/include/c++/14/bits/stl_construct.h:119
8  0x00007f0f557ffb2d in std::_Optional_payload_base<ZipFile>::_M_construct<rtl::Reference<comphelper::RefCountedMutex>&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream>&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool, bool&, ZipFile::Checks> (this=0x558123967640) at /usr/include/c++/14/optional:274
9  0x00007f0f557fd87d in std::_Optional_base_impl<ZipFile, std::_Optional_base<ZipFile, false, false> >::_M_construct<rtl::Reference<comphelper::RefCountedMutex>&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream>&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool, bool&, ZipFile::Checks> (this=0x558123967640) at /usr/include/c++/14/optional:455
10 0x00007f0f557f9186 in std::optional<ZipFile>::emplace<rtl::Reference<comphelper::RefCountedMutex>&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream>&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool, bool&, ZipFile::Checks> (this=0x558123967640) at /usr/include/c++/14/optional:916
11 0x00007f0f557e63f3 in ZipPackage::initialize (this=0x558123967510, aArguments=uno::Sequence of length 2 = {...}) at /home/julien/lo/libo_perf/package/source/zippackage/ZipPackage.cxx:893
12 0x00007f0f876d6b87 in cppuhelper::ServiceManager::Data::Implementation::doCreateInstanceWithArguments
   (this=0x558121b4fd80, context=uno::Reference to (cppu::(anonymous namespace)::ComponentContext *) 0x558121aacc48, arguments=uno::Sequence of length 2 = {...})
   at /home/julien/lo/libo_perf/cppuhelper/source/servicemanager.cxx:728
13 0x00007f0f876d6884 in cppuhelper::ServiceManager::Data::Implementation::createInstanceWithArguments
   (this=0x558121b4fd80, context=uno::Reference to (cppu::(anonymous namespace)::ComponentContext *) 0x558121aacc48, singletonRequest=false, arguments=uno::Sequence of length 2 = {...})
   at /home/julien/lo/libo_perf/cppuhelper/source/servicemanager.cxx:690
14 0x00007f0f876d9860 in cppuhelper::ServiceManager::createInstanceWithArgumentsAndContext
   (this=0x558121ab2c10, ServiceSpecifier="com.sun.star.packages.comp.ZipPackage", Arguments=uno::Sequence of length 2 = {...}, Context=uno::Reference to (cppu::(anonymous namespace)::ComponentContext *) 0x558121aacc48) at /home/julien/lo/libo_perf/cppuhelper/source/servicemanager.cxx:1015
15 0x00007f0f5552856d in chelp::Databases::jarFile (this=0x55812318ee80, rGuard=..., jar=u"shared.jar", Language="fr") at /home/julien/lo/libo_perf/xmlhelp/source/cxxhelp/provider/databases.cxx:842
16 0x00007f0f5552c519 in chelp::JarFileIterator::nextJarFile (this=0x7ffc4d067e80, rGuard=..., o_xParentPackageBundle=empty uno::Reference, o_pExtensionPath=0x0, o_pExtensionRegistryPath=0x0)
   at /home/julien/lo/libo_perf/xmlhelp/source/cxxhelp/provider/databases.cxx:1593

See almost full bt here:
https://bugs.documentfoundation.org/attachment.cgi?id=200590&action=edit

The way to retrieve the zip content (Jar is a zip) since the stream didn't implement comphelper::ByteReader.
Instead of changing XInputStream_impl to implement it, I thought it could be interesting to copy a bulletproof way
from by using ZipPackageHelper in unotools/source/misc/ZipPackageHelper.cxx

m_aZipFileTable is now completely useless (BTW compilerplugins/clang/unusedfields.writeonly.results already indicated
that the member was only written)

If if it works well, we could get rid of xmlhelp/source/cxxhelp/provider/inputstream.hxx and cxx associated.

Change-Id: Ie9c3b5808c835206830e87b129efcdf98ba505af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184732
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-04-30 13:40:13 +02:00
Noel Grandin 09e2627a83 use more concrete UNO types in some local vars
found by a little plugin I created.

Plugin parked into store/ folder because it needs hand-holding
when run.

Change-Id: I2b4da7378f0becbc5f020ac9e78cd765aa0119b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181768
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-02-26 16:56:56 +01:00
Noel Grandin e23be78a6a clang-tidy: performance-unnecessary-copy-initialization in xmloff
Change-Id: I086167b3d24c125efac99180012e32d9851d49ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176444
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-12 11:15:26 +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
Noel Grandin e1ecd89204 loplugin:passstuffbyref in ucb..xmlsecurity
Change-Id: I734a4ca69e1b2770613beb3a05d770b7fc7343b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176203
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-07 14:31:24 +01:00
Noel Grandin 2596131a1f cid#1607687 Overflowed constant
This code does not appear to be handling the case where there
is no anchor correctly, all the way back to

    commit c5718b9414
    Author: Andreas Bille <abi@openoffice.org>
    Date:   Wed Oct 31 12:08:14 2001 +0000
    #83054#
    Now reading the necessary variables( provider.cxx ),

Change-Id: Ia8f514a95ca2e3ae17129b34f0ed444cd9d0ade8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174122
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-28 20:09:32 +02:00
Noel Grandin 1bbcc3fdf3 O[U]String overloads that return view for rest parameter
Add new overloads to OUString methods that have a
"OUString* rest" style parameter.

Instead return a view, which does not require allocation.

To avoid overload ambiguity, split the methods into
different variants that do not use default parameters.

Change-Id: I1aa366115750f1f7ea4fe665804195f59f7c4b69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167632
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-07-25 13:29:11 +02:00
Noel Grandin 86a827da7c loplugin:unusedfields
Change-Id: I4bc67811e228b4806db9f9b9bf9fb0de0eb36de2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169263
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-06-20 14:03:21 +02:00
Noel Grandin bab6d9c44b use more officecfg in xmlhelp::Databases
Change-Id: Iba6c3d0ed3d4d029a4497f56a8412c88bde5246c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167702
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-16 10:57:12 +02:00
Noel Grandin f3cced4ab2 use more officecfg in xmlhelp::TVChildTarget
Change-Id: I3d5762e275317937c4ce3aafaf9e3a359efc2907
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167703
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-05-16 08:47:32 +02:00
Noel Grandin eee70d4e77 loplugin:ostr in xmlhelp
Change-Id: I8330bfe9cd4f551824b0c908f7902f10b1111efb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167669
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-15 18:04:00 +02:00
varshneydevansh 0859e497be tdf#145539 convert const char[] in files to constexpr OUStringLiteral
OStringLiteral represent read-only memory for string literal while
OUString is a dynamic string class with reference counting
hence use OUString when you need reference counting, string
manipulation along with _ustr suffix.

Change-Id: Ib566df156d81c7527f5650bcc6bd5db6509128cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162911
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-02-14 09:58:21 +01:00
Caolán McNamara 5202a6fe01 cid#1545244 COPY_INSTEAD_OF_MOVE
and

cid#1546433 COPY_INSTEAD_OF_MOVE
cid#1546428 COPY_INSTEAD_OF_MOVE
cid#1546175 COPY_INSTEAD_OF_MOVE
cid#1545866 COPY_INSTEAD_OF_MOVE

Change-Id: I1d1e684faa422654fd90513cf459cde58d3d8914
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162298
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-19 14:53:48 +01:00
Caolán McNamara 0cfb4aa262 cid#1546354 COPY_INSTEAD_OF_MOVE
and

cid#1546319 COPY_INSTEAD_OF_MOVE
cid#1546286 COPY_INSTEAD_OF_MOVE
cid#1546283 COPY_INSTEAD_OF_MOVE
cid#1546191 COPY_INSTEAD_OF_MOVE
cid#1545953 COPY_INSTEAD_OF_MOVE
cid#1545874 COPY_INSTEAD_OF_MOVE
cid#1545857 COPY_INSTEAD_OF_MOVE
cid#1545781 COPY_INSTEAD_OF_MOVE
cid#1545765 COPY_INSTEAD_OF_MOVE
cid#1545546 COPY_INSTEAD_OF_MOVE
cid#1545338 COPY_INSTEAD_OF_MOVE
cid#1545190 COPY_INSTEAD_OF_MOVE
cid#1545272 COPY_INSTEAD_OF_MOVE
cid#1545242 COPY_INSTEAD_OF_MOVE
cid#1545229 COPY_INSTEAD_OF_MOVE

Change-Id: I88813d9dbd87ce10375db8198028f8b70e23f0fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162027
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-13 22:53:50 +01:00
Caolán McNamara 95e12eaebc cid#1545789 COPY_INSTEAD_OF_MOVE
and

cid#1545791 COPY_INSTEAD_OF_MOVE
cid#1545800 COPY_INSTEAD_OF_MOVE
cid#1545806 COPY_INSTEAD_OF_MOVE
cid#1545817 COPY_INSTEAD_OF_MOVE
cid#1545832 COPY_INSTEAD_OF_MOVE
cid#1545834 COPY_INSTEAD_OF_MOVE
cid#1545841 COPY_INSTEAD_OF_MOVE
cid#1545848 COPY_INSTEAD_OF_MOVE
cid#1545852 COPY_INSTEAD_OF_MOVE
cid#1545854 COPY_INSTEAD_OF_MOVE
cid#1545864 COPY_INSTEAD_OF_MOVE
cid#1545875 COPY_INSTEAD_OF_MOVE
cid#1545882 COPY_INSTEAD_OF_MOVE
cid#1545900 COPY_INSTEAD_OF_MOVE
cid#1545901 COPY_INSTEAD_OF_MOVE
cid#1545908 COPY_INSTEAD_OF_MOVE
cid#1545921 COPY_INSTEAD_OF_MOVE
cid#1546054 COPY_INSTEAD_OF_MOVE
cid#1546145 COPY_INSTEAD_OF_MOVE
cid#1546146 COPY_INSTEAD_OF_MOVE

Change-Id: I8b23d0457cb293aa0e33593131224c1cdd1d8eb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160545
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-10 20:27:43 +01:00
Stephan Bergmann 692a116c27 Extended loplugin:ostr: xmlhelp
Change-Id: Ic8247396b1cd2152cdac6e3728d1828bea6f452c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160094
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2023-11-29 19:37:57 +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 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 bd6fb0cd3e Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]String
...in include files.  This is a mix of automatic rewriting in include files and
manual fixups (mostly addressing loplugin:redundantfcast) in source files that
include those.

Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-23 11:04:42 +02:00
Mike Kaganski 31a5426172 Use getXWeak in xmlhelp
Change-Id: Iaea6bf7c539d1ab5e0399e07531be08f2764f488
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150887
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-05-06 12:27:42 +02:00
Michael Stahl 5195530f3a xmlhelp: fix lots of deadlocks
Not sure if any of this makes sense but it doesn't deadlock immediatly.

(regression from comit 2c37a0ca31)

Change-Id: I4a5e01acb06b56a78453900a143d36cad1156f21
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150431
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-04-18 11:28:20 +02:00
Noel Grandin c45bc08dc6 loplugin:stringview whitelist getLength and isEmpty
Change-Id: I38f3410c0b25ff579879b9de1f266af4d8fd51e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150256
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-12 12:57:22 +02:00
Noel Grandin 42cd2550cf fix calls to OStringToOUString
after commit d7910847fb.

Thanks to mike kaganski for spotting this.

Change-Id: Ie7272b6f97e3b292439aedb3a163bf00ca26f852
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150181
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-10 13:31:41 +02:00
Noel Grandin eaf071397a new loplugin:unnecessarygetstr
which prevents constructing unnecessary temporaries via getStr()

Change-Id: I9ca70893a10e954b5ee0e6ad6098660ee24c2bef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150170
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-09 20:51:44 +02:00
Noel Grandin d7910847fb use more OStringToOUString
both because it is more obvious to read, and it takes a string_view,
which is handy

Change-Id: Ic201cfa0434446f51436d23c33d3f1a919ed65be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150167
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-09 19:27:44 +02:00
Noel Grandin 3fbadf2801 use more OUStringToOString
which makes it easier to pass around string_view in a few places.

Change-Id: Icbbb7f56494986582f1c3272404775bd98031240
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150129
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-09 16:28:13 +02:00
Noel Grandin 47cd9b65ef fix deadlock in xmlhelper::Databases
after
    commit 2c37a0ca31
    Author: Noel Grandin <noel.grandin@collabora.co.uk>
    Date:   Tue Feb 21 15:35:20 2023 +0200
    osl::Mutex->std::mutex in xmlhelp::Databases

Change-Id: I3cce9bcd9c6c9d55c5162fdfd351048d16574477
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147459
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-22 13:12:04 +00:00
Noel Grandin 2c37a0ca31 osl::Mutex->std::mutex in xmlhelp::Databases
Change-Id: Icaf279275c35abbfd6408807729030f82fc5d753
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147419
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-22 09:16:01 +00:00
Noel Grandin e171af99c0 osl::Mutex->std::mutex in ResultSetBase
Change-Id: I6f0afa46ad84782c3f7219bcb1b28d5627063bcb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147418
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-22 06:17:39 +00:00
Noel Grandin 5465a60ec2 loplugin:implinheritancehelper in xmlhelp
use more ImplInheritanceHelper to reduce boilerplate

Change-Id: Ie8104d40dd13b02f19bcaf1806255446d17b25a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144443
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-12-20 06:05:05 +00: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
Caolán McNamara ed4bf43b0b cid#1507489 Big parameter passed by value
and

cid#1507490 Big parameter passed by value

Change-Id: I53a8ee3fd0312de6fecd39238eff90cfff5b3261
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137588
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-07-29 20:53:40 +02:00
Noel Grandin 44a11bb8c9 clang-tidy modernize-pass-by-value in xml*
Change-Id: I9bd5f6adfd138c391d76aebfe08ba01e6b3ab3bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137550
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-28 10:42:37 +02:00
Stephan Bergmann 75fe405132 Just use Any ctor instead of makeAny in xmlhelp
Change-Id: I1e8d144e8a011868bdd0083bccd90ee80eabbe66
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133701
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-02 20:02:03 +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 558aaa9ed2 use more string_view in xml*
Change-Id: Ie219cb3feb98660463858d00f82f882881946ad0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133072
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-15 20:11:48 +02:00
Noel Grandin fdfd517a6f loplugin:stringviewparam whitelist some more functions
for which we have o3tl:: equivalents

Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13 08:38:53 +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
Luboš Luňák 4256c764ae do not pass XComponentContext to officecfg::...::get() calls
It's used only for the ConfigurationWrapper singleton, so it's used
only the first time and then ignored. It also causes calls to
comphelper::getProcessComponentContext() for every single invocation
despite the value not being needed, and the calls may not be cheap
(it's ~5% CPU during ODS save because relatively frequent calls
to officecfg::Office::Common::Save::ODF::DefaultVersion::get()).

Change-Id: I02c17a1a9cb498aeef220ddd5a0bde5523cb0ffb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131056
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-07 15:37:22 +01:00
Noel Grandin 6da12ca82d loplugin:stringliteraldefine in various
Change-Id: Ib482e3982128dc47d88a79478d80eef43745d1b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126086
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-30 14:07:26 +01:00
Noel Grandin 557beef6a9 use more OInterfaceContainerHelper3 in xmlhelp
Change-Id: I6271459b655d09cff595e7e6eb604d5e16a8ccc2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126064
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-30 09:50:53 +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 cae7b855a5 Prepare for removal of non-const operator[] from Sequence in xmlhelp
Change-Id: I58c6fd9abf53a9ce3b16a31e7452bb5cb895e669
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124415
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-01 07:44:25 +01:00