Commit Graph
834 Commits
Author SHA1 Message Date
Caolán McNamara 7841de4bf7 drop outdated coverity directives
Change-Id: Icbe3f0bb9433cfcf08efd28bc4eab1ba82efab74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189850
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-18 12:40:58 +02:00
Caolán McNamara e405a1fe5c QNameParam can constexpr
Change-Id: I7c1be7cb7ce0684f65fbd073523282e50e4dccd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187743
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-07-12 11:20:22 +02:00
Gabor Kelemen 0b71553e9a Remove obsolete fw declarations from xmloff/
found with bin/find-unneeded-includes --fwdecl

Change-Id: Ic1d7679fc60fb41df351cc849c2e35517b3f0e36
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184010
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2025-05-23 19:36:14 +02:00
Noel Grandin 2bd24c8bc4 no need to subclass std::vector here
Change-Id: Ief5e462f1308601bc951873537aa62a418c61893
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185397
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-05-16 17:34:45 +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
Tomaž Vajngerl 2990620e20 remove code duplication - conversion hex char to value
We use the same funciton all over the place, so create a common
function in o3tl and use that in all instances where we duplicated
the code.

Change-Id: I74091fbbde8c2ba8c7e4ab30194ab53e2a338e52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180372
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2025-01-20 01:39:16 +01:00
Bogdan Buzea ce763f282d tdf#152299 - Remove unused define(s) from C/C++ files
Change-Id: I32c8a4c8dd56ef781f40db1d3ca66823dd9b995f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177185
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
2024-12-22 18:09:53 +01:00
Mike Kaganski 877205ccb1 Simplify OOo2OasisTransformer
Change-Id: I212c3196060e4038cb265d10c841ebbbeb736ec4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178478
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-14 21:35:23 +01:00
Noel Grandin 910d3a4f04 loplugin:reftotemp in xmloff
Change-Id: I121307865a576b8d0bced6098fae37051bd531b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176503
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-13 06:34:57 +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 2bafc7384b cid#1545605 COPY_INSTEAD_OF_MOVE
and

cid#1545841 COPY_INSTEAD_OF_MOVE
cid#1554682 COPY_INSTEAD_OF_MOVE
cid#1554686 COPY_INSTEAD_OF_MOVE
cid#1554715 COPY_INSTEAD_OF_MOVE
cid#1554750 COPY_INSTEAD_OF_MOVE
cid#1554759 COPY_INSTEAD_OF_MOVE
cid#1554770 COPY_INSTEAD_OF_MOVE
cid#1554779 COPY_INSTEAD_OF_MOVE
cid#1554794 COPY_INSTEAD_OF_MOVE
cid#1554800 COPY_INSTEAD_OF_MOVE
cid#1554826 COPY_INSTEAD_OF_MOVE
cid#1554836 COPY_INSTEAD_OF_MOVE
cid#1554862 COPY_INSTEAD_OF_MOVE
cid#1554865 COPY_INSTEAD_OF_MOVE
cid#1554872 COPY_INSTEAD_OF_MOVE
cid#1554883 COPY_INSTEAD_OF_MOVE
cid#1554906 COPY_INSTEAD_OF_MOVE
cid#1554921 COPY_INSTEAD_OF_MOVE
cid#1554926 COPY_INSTEAD_OF_MOVE
cid#1554946 COPY_INSTEAD_OF_MOVE
cid#1554956 COPY_INSTEAD_OF_MOVE
cid#1554970 COPY_INSTEAD_OF_MOVE
cid#1554986 COPY_INSTEAD_OF_MOVE
cid#1554991 COPY_INSTEAD_OF_MOVE
cid#1555013 COPY_INSTEAD_OF_MOVE
cid#1555037 COPY_INSTEAD_OF_MOVE
cid#1555050 COPY_INSTEAD_OF_MOVE
cid#1555057 COPY_INSTEAD_OF_MOVE
cid#1555066 COPY_INSTEAD_OF_MOVE
cid#1555067 COPY_INSTEAD_OF_MOVE
cid#1555083 COPY_INSTEAD_OF_MOVE
cid#1555097 COPY_INSTEAD_OF_MOVE
cid#1555135 COPY_INSTEAD_OF_MOVE
cid#1555140 COPY_INSTEAD_OF_MOVE
cid#1555146 COPY_INSTEAD_OF_MOVE
cid#1555148 COPY_INSTEAD_OF_MOVE
cid#1555149 COPY_INSTEAD_OF_MOVE
cid#1555155 COPY_INSTEAD_OF_MOVE
cid#1555157 COPY_INSTEAD_OF_MOVE
cid#1555168 COPY_INSTEAD_OF_MOVE
cid#1555195 COPY_INSTEAD_OF_MOVE
cid#1555196 COPY_INSTEAD_OF_MOVE
cid#1555237 COPY_INSTEAD_OF_MOVE

Change-Id: I90531c19c28dca77fe99c72efdfc0972c311da98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175377
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-22 11:56:02 +02:00
Bogdan Buzea ff25df1804 tdf#163486: PVS: Identical branches
V1037 Two or more case-branches perform the same actions. Check lines: 92, 96

Change-Id: Ibf8ca692e5d7208d99280c14190bda35a0fd7022
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175231
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-20 10:28:56 +02:00
Noel Grandin 4000d57869 use more concrete UNO types in xmloff
Change-Id: Idf2bcf23497ef5d673ab36f776f562e8c964b3a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173270
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-12 19:27:53 +02:00
Noel Grandin 12008e1054 loplugin:ostr in xmloff
Change-Id: I24f5626e57e03217e4bcf77289c785e255b9f904
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167667
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-05-15 20:37:38 +02:00
Noel Grandin 8468794443 replace createFromAscii with OUString literals in XMLTransformerOASISEventMap
Change-Id: I48e04ebfac7898747b3481d4359f3ed4dd4c351d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167169
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-06 13:56:26 +02:00
Andrea Gelmini 7357f3ff7a Fix typo
Change-Id: I2271e31d2a57206954e166e71b16af092c11aab8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165741
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-04-03 14:25:24 +02:00
Gabor Kelemen e2e9eeb822 tdf#146619 Recheck xmloff/*cxx with IWYU
after cleaning up unused 'using namespace' clauses

Change-Id: I9e4cd3790408ae6b0379819a8275feaf67e860cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164941
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-03-29 21:19:32 +01:00
Gabor Kelemen 4496544f5d Remove unused namespaces from xmloff
Change-Id: Id46c9512b8024c9dc50edfb200599b1901fbf3c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164940
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-03-19 09:28:41 +01:00
Gabor Kelemen 7da8fce0cd tdf#146619 Recheck xmloff/*cxx with IWYU
Change-Id: I6e39a223fd567d70254998e55de5110db87ab4fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164486
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-03-12 10:37:31 +01:00
Bogdan B 7b4bf155b6 tdf#145834 Consistency for "Fontwork"
Change-Id: I5f660fac8576d96bf2d2363106be56a4d4fb4f64
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157545
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2023-10-04 18:42:36 +02:00
Vojtěch Doležal 9ffaf2cbfb Removed remaining macro concatenations from xmloff/
For PropertyMaps.cxx used:
	(MAP_FULL\( *[A-Za-z0-9_]+ *, *) => \1XML_NAMESPACE_
	(MAP_ENTRY\( *[A-Za-z0-9_]+ *, *) => \1XML_NAMESPACE_
	(MAP_ENTRY_ODF12\( *[A-Za-z0-9_]+ *, *) => \1XML_NAMESPACE_
	(MAP_ENTRY_ODF_EXT\( *[A-Za-z0-9_]+ *, *) => \1XML_NAMESPACE_
	(MAP_ENTRY_ODF_EXT_IMPORT\( *[A-Za-z0-9_]+ *, *) => \1XML_NAMESPACE_
	(MAP_CONTEXT\( *[A-Za-z0-9_]+ *, *) => \1XML_NAMESPACE_
	(MAP_SPECIAL\( *[A-Za-z0-9_]+ *, *) => \1XML_NAMESPACE_
	(MAP_SPECIAL_ODF12\( *[A-Za-z0-9_]+ *, *) => \1XML_NAMESPACE_
	(MAP_SPECIAL_ODF13\( *[A-Za-z0-9_]+ *, *) => \1XML_NAMESPACE_

For xmlexppr.cxx used:
	ENTRY\( *([A-Za-z0-9_]+) *\) => { GET_PROP_TYPE(XML_TYPE_PROP_\1), XML_\1_PROPERTIES }

For OOo2Oasis.cxx used:
	(OOO_IMPORTER\( *)([A-Za-z]+) => \1xmloff_\2_get_implementation

For xformsapi.cxx used:
	TOKEN_MAP_ENTRY\( *([A-Za-z0-9"]+) *, *([A-Za-z0-9_]+) *\) => { XML_NAMESPACE_\1, xmloff::token::XML_\2, xmloff::token::XML_\2 }

For xformsexport.cxx used:
	TABLE_ENTRY\( *([A-Za-z0-9"_]+) *, *([A-Za-z0-9"_]+) *, *([A-Za-z0-9"_]+) *, *([A-Za-z0-9"_]+) *\) => { \1, XML_NAMESPACE_\2, xmloff::token::XML_\3, \4 }

elementexport.cxx and property_meta_data.cxx done by hand.

Change-Id: Ifb0c76a60f95e74ff1f9d596afdaff138c2228c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151867
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-05-18 09:07:16 +02:00
Vojtěch Doležal 24b15bc11b Removed more constant concatenations
Change-Id: I4fce6eeb6652914e1883037b41a2dc3c09a88ada
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151826
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-05-17 08:48:43 +02:00
Noel Grandin bc2101646b loplugin:stringviewparam improvements
improve the check by checking for methods that exclude
using string_view, rather than checking for methods that
__can__ use string_view, which leads to exposing
some holes in our o3tl/string_view.hxx coverage.

Change-Id: Ic9dd60441c671f502692f9cd2a1bb67301c4b960
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150277
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-14 07:54:28 +02:00
Noel Grandin 5988a3cf91 loplugin:stringadd in xmloff
when applying my upcoming patch to also consider O[U]StringBuffer

Change-Id: Id38d983e59386554c61e9bdcd9333554bbf4665c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149756
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-30 13:53:28 +00:00
Caolán McNamara 90ffbbdcd3 cid#1519129 Improper use of negative value
Change-Id: Ib74c0734801e9f4b5cbeb9b1b19c12d5ad5eadbd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145708
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-18 12:24:54 +00:00
Mike Kaganski f2f008c52a Merge SvXMLAttributeList to comphelper::AttributeList
And simplify the latter, to always use "CDATA" type (as the former did).
"CDATA" was used in all cases but one, where an empty string was used.

Change-Id: I1b3bfae40e29628e4094d9a6e58a69a66865874c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145526
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-15 12:32:29 +00:00
Noel Grandin 68c6133e4d XUnoTunnel->dynamic_cast in XMLMutableAttributeList
Change-Id: Ia36576da1f287c9b687042eba5d429366b3db0a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145504
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-15 10:13:54 +00:00
Noel Grandin 79752f9a37 XUnoTunnel->dynamic_cast in Transformer
Change-Id: Ief186ab88bfe6f952e2e09351fdaa8e0e8a2b6be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145503
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-14 17:24:48 +00:00
Noel Grandin 776ea34dee use more string_view in xmloff
Change-Id: Ieef49d049760e557d341f1991f28333b09220c1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140336
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-21 15:46:10 +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
Andrea Gelmini 0f195db61d Fix typo
Change-Id: I75b3562ac1710c4eed32b916382ec4fff7ce7041
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137644
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-07-31 15:23:19 +02:00
Noel Grandin ca2a4a4b1c clang-tidy modernize-pass-by-value in xmloff
Change-Id: Ica07e393763343d0f5caaad6a89fa3378f6ad344
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136995
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-12 15:59:38 +02:00
Noel Grandin adf4197927 elide some string copies
Change-Id: I3e0d9f7e5a446689e007b9d01fb1c6bf9bc068e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136880
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-07 15:21:33 +02:00
Stephan Bergmann 4d55513852 Just use Any ctor instead of makeAny in xmloff
Change-Id: Ibefb18e5b798ccf1f9d7a5ba1524c9fb1e9bee32
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133700
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-03 12:10:52 +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
Andrea Gelmini e262770bf5 Fix variable name
It's just a comment, but so it is the same as in
PropertyActionsOASIS.cxx

Change-Id: I43b2b3c51f5e2e23dc273e1cf65ad7c5608b9366
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129311
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-02-02 18:35:48 +01:00
Armin Le Grand (Allotropia) 02140554ee WASM --enable-wasm-strip now skips lots of LO code
... resulting in a stripped-down, Writer-only build to decrease
the resulting WASM bytecode size.

It removes the following code from the build:
* All other major modules: Base, Calc, Chart, Draw, Impress and
  Math and related writerperfect filters
* The premultiply tables
* The (auto-)recovery functionality
* All accessibility (but not the accessibility document checker)
* The LanguageGuess component
* EPUB support
* The start center / BackingWindow
* The TipOfTheDay functionality
* The splash screen communication

Currently crashs with anything different then soffice --writer.
Closing the document also still crashes.

FYI: many of these features are now behind ENABLE_WASM_STRIP_*
defines, but they normally don't work on their own, globally!
That's because we started with stripping the main components.

Change-Id: Ib9c0f9452815910c0a2aceaf142ba1ad4a9cb0d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126182
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-20 12:28:54 +01:00
Mike Kaganski 8cb57be792 Prepare for removal of non-const operator[] from Sequence in xmloff
Change-Id: I7ea7964f76f0a5db678510ac3533003726dc49fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124416
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-01 07:11:36 +01:00
Mike Kaganski 2484de6728 Remove non-const Sequence::begin()/end() in internal code
... to avoid hidden cost of multiple COW checks, because they
call getArray() internally.
This obsoletes [loplugin:sequenceloop].

Also rename toNonConstRange to asNonConstRange, to reflect that
the result is a view of the sequence, not an independent object.

TODO: also drop non-const operator[], but introduce operator[]
in SequenceRange.

Change-Id: Idd5fd7a3400fe65274d2a6343025e2ef8911635d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123518
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-15 10:36:36 +02:00
Mike Kaganski 3f65724ec5 Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 4
- Change implementations of getSomething to use getSomethingImpl

Or where that's impossible, use getSomething_cast to unify this and
reduce number of places where we reinterpret_cast.

All static methods getting tunnel ids were renamed to getUnoTunnelId,
to comply with the convention used in <comphelper/servicehelper.hxx>.

TODO (in separate commits):
- Revise uses of getSomething to use getFromUnoTunnel

Change-Id: Ifde9e214b52e5df678de71fcc32d2199c82e85cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122100
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-15 06:08:14 +02:00
Mike Kaganski 05bc93db2d Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 1
The header got some changes:
1. Move UnoTunnelIdInit and isUnoTunnelId into 'comphelper' namespace
2. Rename UnoTunnelIdInit to UnoIdInit, as a precondition to replace
   of uses of OImplementationId with it, including in XTypeProvider
3. Introduce convenience functions 'getSomething_cast' to cast between
   sal_Int64 and object pointers uniformly.
4. Rename getUnoTunnelImplementation to getFromUnoTunnel, both to make
   it a bit shorter, and to reflect its function better. Templatize it
   to take also css::uno::Any for convenience.
5. Introduce getSomethingImpl, inspired by sw::UnoTunnelImpl; allow it
   handle cases both with and without fallback to parent.
6. Adjust UNO3_GETIMPLEMENTATION_* macros

TODO (in separate commits):
- Drop sw::UnoTunnelImpl and sw::UnoTunnelGetImplementation
- Replace all uses of OImplementationId in core with UnoIdInit
- Deprecate OImplementationId in <cppuhelper/typeprovider.hxx>
- Change implementations of getSomething to use getSomethingImpl
- Revise uses of getSomething to use getFromUnoTunnel

Change-Id: If4a3cb024130f1f552f988f0479589da1cd066e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122022
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-15 06:07:36 +02:00
Noel Grandin 41a46a306f dynamic_cast -> static_cast (tdf#130795)
the dynamic_cast is hot here,
and none of these dynamic_casts are necessary, we already assert that
they must succeed, so just use static_cast

Change-Id: I88ade90431c4da4792c778b5cdab22332ed1c428
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121637
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-04 19:21:07 +02:00
Mike Kaganski bfed58821f Drop convertMm100ToTwip in favor of the new o3tl::toTwips
Step by step, duplicates from <tools/UnitConversion.hxx> may go

Change-Id: Id4c03ff8adc120ae06dbfdbdfb4f5ff0bb51f489
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120315
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-11 14:19:24 +02:00
Caolán McNamara f62d2de95c WaE: Wodr type 'ActionMapTypesOOo' violates the C++ ODR
Change-Id: If0b83e62e6c9905b1ae391fbed7c43b379dce5db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118586
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-07-07 22:11:59 +02:00
Jan-Marek Glogowski a876055b6f Fix potential (but unlikely) overflow
warning: assuming signed overflow does not occur when assuming
that (X + c) >= X is always true [-Wstrict-overflow]
                 while( nPos < nLen )
                        ~~~~~^~~~~~

Change-Id: I95e3bb4a131eaf4e82fbc74cc0bea92930b6afe9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118159
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-06-30 14:37:02 +02:00
Tomaž Vajngerl eb6819e74a change usage of boost::hash_combine to o3tl::hash_combine
Change-Id: I840518a36ac43d36c95f38e09c7bfcfe1a25a525
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114984
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-11 12:28:24 +02:00
Stephan Bergmann 10d29c390d throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewrite
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-02 17:02:28 +02:00
Noel Grandin 07fd90cc7d rtl::Static -> function local static
Change-Id: I2071c27bdf074403ec24e67f9278ac27f9491303
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113698
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-07 08:08:44 +02:00
Vincent LE GARREC aef40e7388 tdf#124176 Use pragma once in x*
xmlhelp, xmloff, xmlsecurity

Change-Id: I80c6fa806387f3dcba8be7f93fe2fef146b033e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112050
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-03-23 13:14:42 +01:00
Noel 75894d5c6a loplugin:refcounting in xmloff
Change-Id: I739aa5914359edc4fdfdc341b09718ddbb7c04e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111121
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-19 07:35:28 +01:00