Commit Graph
73 Commits
Author SHA1 Message Date
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 6f812b7ac6 XUnoTunnel->dynamic_cast in XMLElementWrapper_XmlSecImpl
Change-Id: Ie0654c8ba6367b575c289b63ac02668ae38066c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145495
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-14 09:31:29 +00:00
Mike Kaganski d12f25905c Prepare for removal of non-const operator[] from Sequence in xmlsecurity
Change-Id: I7cfcf9f9ea307bd737292e6f4f37a29f453167c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124418
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-01 09:55:03 +01:00
Mike Kaganski 96bd77de5a Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 5
- Revise uses of getSomething to use getFromUnoTunnel

Where that is impossible, use getSomething_cast to unify casting,
and minimize number of places doing low-level transformations.

The change keeps the existing tunnel references that last for the
duration of the pointers' life, because sometimes destroying such
reference may destroy the pointed object, and result in use after
free.

Change-Id: I291c33223582c34cd2c763aa8aacf0ae899ca4c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122101
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-15 06:08:27 +02:00
Noel 1e8e832784 loplugin:refcounting in xmlsecurity
Change-Id: Ic5227df4bd5b1f3dfe9cd13ae971d268a40f0fcf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111120
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-19 07:35:20 +01:00
Tarun Sharma 624ba77285 tdf#88205: Adapt uses of css::uno::Sequence to use initializer_list ctor
Change-Id: Ib7f122b20734ad51c6326e369e5e7eee1bf08a21
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109861
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-08 15:39:01 +01:00
Stephan Bergmann 35e471bb4d Adapt the remaining OUString functions to std string_view
...for LIBO_INTERNAL_ONLY.  These had been missed by
1b43cceaea "Make many OUString functions take
std::u16string_view parameters" because they did not match the multi-overload
pattern that was addressed there, but they nevertheless benefit from being
changed just as well (witness e.g. the various resulting changes from copy() to
subView()).

This showed a conversion from OStringChar to std::string_view to be missing
(while the corresponding conversion form OUStringChar to std::u16string_view was
already present).

The improvement to loplugin:stringadd became necessary to fix

> [CPT] compilerplugins/clang/test/stringadd.cxx
> error: 'error' diagnostics expected but not seen:
>   File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd]
>   File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd]
> 2 errors generated.

Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107602
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-11 21:25:10 +01:00
Noel Grandin f0da01e59f loplugin:flatten in xmlsecurity
Change-Id: Ic9e410c77a04edbd58485d4177da22e17efa8720
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99964
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-02 22:44:36 +02:00
Noel Grandin 943fbfad66 expand out some namespace aliases
Change-Id: I5fdb554a1b116824843f35645bc1cea3ca91e0f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94093
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-13 15:47:06 +02:00
Noel Grandin 9b5dad13b5 loplugin:stringadd look for unnecessary temporaries
which defeat the *StringConcat optimisation.
Also make StringConcat conversions treat a nullptr as an empty string,
to match the O*String(char*) constructors.

Change-Id: If45f5b4b6a535c97bfeeacd9ec472a7603a52e5b
Reviewed-on: https://gerrit.libreoffice.org/80724
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-14 08:26:14 +02:00
Arkadiy Illarionov f599c31fe6 tdf#39593 use isUnoTunnelId
Adapt getUnoTunnelId methods where required: rename or make public.

Change-Id: I0fd2120bf9f0ff1aa690329a65ff64a154c89315
Reviewed-on: https://gerrit.libreoffice.org/78680
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-09-06 11:55:50 +02:00
Andrea Gelmini 496f32ea2b Fix typos
Change-Id: I69e5c6d82fddd1da1e414e7764f3a5d90351a43d
Reviewed-on: https://gerrit.libreoffice.org/76377
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-31 15:17:14 +02:00
Stephan Bergmann d55e9567b5 Improved loplugin:stringconstant (now that GCC 7 supports it): xmlsecurity
Change-Id: I47c93247b9a34abf4b95966833664e63eb57f133
Reviewed-on: https://gerrit.libreoffice.org/76621
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-31 12:51:43 +02:00
Gabor Kelemen 64faea31f7 tdf#42949 Fix IWYU warnings in xmlsecurity/*cxx
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I89c77656ea4021cb16bd122cb1dd1cd803390c3d
Reviewed-on: https://gerrit.libreoffice.org/71765
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-05-09 08:58:28 +02:00
Gabor Kelemen d1ab132367 tdf#42949 Fix IWYU warnings in xmlsecurity/*hxx
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

All hxx cleaned except the ones in
xmlsecurity/source/xmlsec/mscrypt

Change-Id: I651f53c9d339208b3132f9078a5c3829ff9c5dc8
Reviewed-on: https://gerrit.libreoffice.org/71448
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-29 13:17:59 +02:00
Andrea Gelmini 8e5844ad23 Fix typo in code
Change-Id: I671749843ee14b18c4786a132ca9c6ad30efc625
Reviewed-on: https://gerrit.libreoffice.org/65732
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-12-30 09:10:32 +01:00
Miklos Vajna f3e8d0fb31 xmlsecurity: create XMLDocumentWrapper instances with a constructor
Change-Id: I23bca00fb0fbcae92e73c4a106b08edd5caf5cf9
Reviewed-on: https://gerrit.libreoffice.org/51720
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-03-22 09:05:41 +01:00
Miklos Vajna 4bb67227c1 xmlsecurity: create XMLElementWrapper instances with a constructor
Change-Id: I0fe7d0a21b0ea35b537466316a637a0a46c52fe5
Reviewed-on: https://gerrit.libreoffice.org/50601
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-03-02 08:07:52 +01:00
Stephan Bergmann e5262ed74d More loplugin:cstylecast: xmlsecurity
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files

Change-Id: Ica6e96072435aa4df4e74accdfe06f798a640bbe
2018-01-12 20:08:53 +01:00
Andrea Gelmini 677d606021 Fix typos
Change-Id: Ifcbf431291cc77ffc33cc1cbcc493181ffc9943d
Reviewed-on: https://gerrit.libreoffice.org/46634
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-17 10:18:40 +01:00
Noel Grandin 3af500580b loplugin:salcall fix functions
since cdecl is the default calling convention on Windows for
such functions, the annotation is redundant.

Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d
Reviewed-on: https://gerrit.libreoffice.org/46164
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11 12:13:46 +01:00
Stephan Bergmann 35a2b55a13 loplugin:includeform: xmlsecurity
Change-Id: I9c3eca51fec52a255fcf280fe4e5ecc2ebbee5f3
2017-10-23 22:45:46 +02:00
Thorsten Behrens cae5f2a543 gpg4libre: initial GPG signature generation
* takes XML-Sec signature template
* calculates digest for all added reference streams
* produces signature value over canonicalized signature template
* writes same as detached signature into template, streams that out

Change-Id: I303e080dc25c440175fe1ae897f03cf356d5d0f2
Reviewed-on: https://gerrit.libreoffice.org/36106
Reviewed-by: Siegmund Gorr <siegmund.gorr@cib.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-05-18 09:18:47 +02:00
Chris Sherlock 97eb00c75e revert OSL_ASSERT changes
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07 17:03:35 +10:00
Chris Sherlock a85694c4c7 tdf#43157: convert xmlsecurity module away from OSL_ASSERT to assert
Change-Id: Ib5297ceb307e8f8d475b7ff0523e6a57f72434a5
2017-05-07 13:03:03 +10:00
Andrea Gelmini 74117f9597 Fix typos
Change-Id: I901ff35ad2e0aa43a421f0996865130514a819bc
Reviewed-on: https://gerrit.libreoffice.org/35663
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-25 13:10:53 +00:00
Stephan Bergmann 8ca2d453e3 Some simplifications, using UNO_QUERY_THROW
Change-Id: I6e7555472da6b23af4c64b299182339a5b324ee9
Reviewed-on: https://gerrit.libreoffice.org/34250
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-15 14:16:26 +00:00
Stephan Bergmann e57ca02849 Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only).  See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.

Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly).  The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually).  There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).

Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code.  Missing @throws
documentation has not been applied in such manual clean-up.

Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-26 12:54:43 +00:00
Miklos Vajna a7c35729e0 xmlsecurity: hold XMLDocumentWrapper by rtl::Reference in XSecController
Going via UNO for a class in the same module is an overkill.

Change-Id: Idf706782e5844fd2e553c44966e1dd1104dce8e7
Reviewed-on: https://gerrit.libreoffice.org/32030
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-12-15 09:15:38 +00:00
Miklos Vajna 9bd471cb76 xmlsecurity: clean up not needed C2U macro in xmldocumentwrapper
Also remove some auto-generated documentation that adds no useful
information.

Change-Id: I5e5c5dd6aaa3fb6953c38d6e82fa13737217c25c
Reviewed-on: https://gerrit.libreoffice.org/31748
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-12-08 09:17:53 +00:00
Otto Kekäläinen 428e23f4f7 Fix some spelling errors in comments and strings
Change-Id: Iecd6b5e13d6be14651f77d8e37f01117ba15a11e
Reviewed-on: https://gerrit.libreoffice.org/26883
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-07-04 06:11:36 +00:00
Noel Grandin 789055bc2a clang-tidy performance-unnecessary-copy-initialization
probably not much performance benefit, but it sure is good at
identifying leftover intermediate variables from previous
refactorings.

Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657
Reviewed-on: https://gerrit.libreoffice.org/24026
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-18 07:37:31 +00:00
Noel Grandin 43d57d105d com::sun::star->css in xmlsecurity/
Change-Id: I4b89f97671ab526e5731d2f1f99802e23f3fd4b5
2016-03-14 13:28:04 +02:00
Miklos Vajna eb63915f0a xmlsecurity: clean up no longer relevant email addresses
Change-Id: I224a0914bd3506b4e2ce057c53838ec78187b060
2016-03-11 09:11:38 +01:00
Noel Grandin 96c26b0d9d use initialiser for Sequence<OUString>
using variations of:
git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)' | xargs perl -0777 -pi -e "s/Sequence<OUString> (\w+)\(1\)\;
\s*OUString\* pArray.*;
.*\[0\]\s*=\s*(\S+)\;/Sequence<OUString> \1 { \2 };/g"

Change-Id: I03c64334ff30ee14dce0d17b67f5122a3893bbe3
Reviewed-on: https://gerrit.libreoffice.org/19971
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 12:20:39 +00:00
Stephan Bergmann 3a2037b11c loplugin:nullptr (automatic rewrite)
Change-Id: I2093e93e07ff19a1a1d2c8b6f221dac2bf2a2613
2015-11-10 10:32:02 +01:00
Noel Grandin 9e8ff13eb2 use uno::Reference::set method instead of assignment
Change-Id: I60e52ef2abc3107ba77e81811dfe1bffbfd77218
2015-11-05 13:32:17 +02:00
Andrea Gelmini aade27554d Fix typos
Change-Id: I60ed5eb658d50cbc7dc572facb5463b7527b4d9b
Reviewed-on: https://gerrit.libreoffice.org/16408
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-22 12:36:21 +00:00
Stephan Bergmann 642f4e574c loplugin:cstylecast: deal with remaining pointer casts
Change-Id: Idcaafa47f1891858d2ac4cdc536065cbc127b7c4
2015-06-08 16:30:07 +02:00
Julien Nabet 16f1477a2d Remove include stdio (part7)
Change-Id: I7058ac53f4bbf96eff9a36a03279ab0753cc42ba
Reviewed-on: https://gerrit.libreoffice.org/16135
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2015-06-07 15:33:38 +00:00
Noel Grandin 4cca0169aa loplugin:staticmethods
Change-Id: I2177e424d54dc2b5e26b7bbfe073b524e9cc5bab
Reviewed-on: https://gerrit.libreoffice.org/15187
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-04-09 06:44:49 +00:00
Stephan Bergmann c5f1e8c3bb const_cast: convert some C-style casts and remove some redundant ones
Change-Id: I42fdc042ed7317b5b6c337e7b38966e616f8e24b
2015-03-26 15:33:41 +01:00
Noel Grandin 6618a6d7f2 loplugin:constantfunction: xmlsecurity
Change-Id: Iabe2b4677b75cbd4b10a55fc4b2f13ba29645cd4
2015-03-24 10:31:17 +02:00
Stephan Bergmann 2880dfe301 Some more loplugin:cstylecast: xmlsecurity
Change-Id: Iceaeefc26fec2643d3fbb916ab7719a918beb496
2015-01-20 09:06:54 +01:00
Stephan Bergmann 8d487ceba1 xmlsecurity: Use appropriate OUString functions on string constants
Change-Id: I18370f6203455cf7568e48e49b7093d114656619
2014-12-18 14:12:39 +01:00
Michael Stahl 6a0fe37dec sal: clean up public headers with include-what-you-use
Sadly cannot forward declare "struct {...} TimeValue;".

rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h
was painful enough for now...

Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05
2014-11-17 11:06:53 +01:00
Andrea Gelmini da40cac540 Fix common typos. No automatic tools. Handmade…
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959
Reviewed-on: https://gerrit.libreoffice.org/12164
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-12 11:04:11 +00:00
Noel Grandin addf55184a loplugin: cstylecast
Change-Id: I37d7c3e59f1debbee8d92e76f4d08fff773000b3
2014-10-06 07:52:55 +02:00
Stephan Bergmann 7bac68d79e Avoid incomplete type in fn sig to keep ubsan's RTTI-based checks happy
Change-Id: Id03c16337cb637c7f63fb789697c8bceec905bda
2014-08-28 16:17:35 +02:00
Thomas Arnhold 5717de74f5 create OUString from literal
Change-Id: I8198fbad20daa7262e42a452c8d81fcfa3331680
2014-08-04 15:59:06 +02:00