1466 Commits

Author SHA1 Message Date
Samuel Mehrbrodt
0ea920eeb3 No need to use a shared ptr here
Change-Id: Ia3d2f019689efe990cbbde11e9c27a80fd95ae0a
Reviewed-on: https://gerrit.libreoffice.org/35252
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-03-16 12:55:45 +00:00
Samuel Mehrbrodt
6bcc2e1b3c gpg4libre: More details for certificates
Change-Id: I9eee6c55d7ec27e28d844de2ed544040b07fa501
Reviewed-on: https://gerrit.libreoffice.org/35203
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-03-16 11:27:55 +00:00
Samuel Mehrbrodt
2237f08812 gpg4libre: Add certificate usage to gpg certificates
Change-Id: I72c83724fcbd380e477a90a3e6db32406f68899b
Reviewed-on: https://gerrit.libreoffice.org/35192
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-03-16 11:11:56 +00:00
Miklos Vajna
9dd836e4f6 xmlsecurity: use auto when declaring iterators
Change-Id: Ie56c0c0e1917f159957babca346f1a3fa04bc629
Reviewed-on: https://gerrit.libreoffice.org/35253
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-16 11:08:34 +00:00
Samuel Mehrbrodt
fa05bf54c9 gpg4libre: Don't mark all keys as private
Only those that can sign (have a private key)

Change-Id: I1c8b553a788a14c236022c819cbc346fc4735daf
Reviewed-on: https://gerrit.libreoffice.org/35202
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-03-15 14:09:19 +00:00
Samuel Mehrbrodt
c1800a7b42 Fix variable names: FixedText, not FixedImage
Change-Id: I5e87305e3d4ada4b7595ab8aac55b42bc091e031
Reviewed-on: https://gerrit.libreoffice.org/35211
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-03-15 12:23:07 +00:00
Samuel Mehrbrodt
763d5df50a gpg4libre: Don't show certificate path when there is no hierarchy
Gpg private keys have no parents

Change-Id: Ie41269c3c49569ea142a01c8eef0f58a636d9eb7
Reviewed-on: https://gerrit.libreoffice.org/35208
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-03-15 10:56:50 +00:00
Samuel Mehrbrodt
e26b5b4fb7 gpg4libre: Improve certificate details view
* Remove SQL Syntax highlighting
* Add a vertical scrollbar if neccessary

Change-Id: Ib1de2694761ef650ccef16a5b5773c7be0602682
Reviewed-on: https://gerrit.libreoffice.org/35210
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-03-15 10:35:25 +00:00
Samuel Mehrbrodt
47596612d1 gpg4libre: Show "issued to/by" only if they contain a value
Change-Id: If815c09fc6701682d6ee3e1feaf3c45ff09646aa
Reviewed-on: https://gerrit.libreoffice.org/35209
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-03-15 09:58:31 +00:00
Stephan Bergmann
fe7a5fe993 loplugin:subtlezeroinit (clang-cl)
Change-Id: I0a36bcf15fff74ed2f707608e04ad6596614dfd1
2017-03-14 14:49:58 +01:00
Andrea Gelmini
f727186145 Fix typos
Change-Id: I23b16792005d66588e3439eb6482adda96c45673
Reviewed-on: https://gerrit.libreoffice.org/35064
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-11 12:13:42 +00:00
Miklos Vajna
90d88b6e46 xmlsecurity: remove unused XMLEncryptionTemplateImpl
Not needed since commit 0649622956431e0a1955cb80d1175025401ab5e5
(loplugin:unusedmethods, 2017-02-21).

Change-Id: I5e8699174202c17309198e541dc904dc1b47a534
Reviewed-on: https://gerrit.libreoffice.org/35031
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-10 11:08:22 +00:00
Samuel Mehrbrodt
6f20dd1815 gpg4libre: Remove deprecated dynamic exception specifications
Change-Id: I3bec4570149af50fad5eef33bafb9842ab598798
Reviewed-on: https://gerrit.libreoffice.org/34967
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-03-08 10:31:47 +00:00
Caolán McNamara
3ecca2522d coverity#1402074 Resource leak
and

coverity#1402075 Resource leak
coverity#1402076 Resource leak

Change-Id: I41f2ad480a43e3563b08a6316d4e74bfe8efd378
2017-03-07 09:06:06 +00:00
Stephan Bergmann
6117ae2bd3 -Werror,-Wunused-private-field
Change-Id: I8e39763e781121932a0200e59760b49d7edcbfdd
2017-03-04 23:09:13 +01:00
Samuel Mehrbrodt
88ac77c0bc gpg4libre: List and view GPG keys
* Add GPG implementation of css::xml::crypto UNO interfaces (part of that is only stub atm)
* List gpg keys along with other certificates
* Viewing gpg certificates: Not all properties are implemented yet

Change-Id: I7f60b26efe949a94bf8fe1b8d4d428002c2995b1
Reviewed-on: https://gerrit.libreoffice.org/33843
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Siegmund Gorr <siegmund.gorr@cib.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-03-04 10:26:43 +00:00
Miklos Vajna
42460fd4eb xmlsecurity: avoid using the SerialNumberAdapter wrapper
This service is only used in xmlsecurity and it's a wrapper around two
free functions in the same module.

Change-Id: Ibc5a026b51eda6c2b4b27b7254dedc220dbf909a
Reviewed-on: https://gerrit.libreoffice.org/34772
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-02 08:35:54 +00:00
Samuel Mehrbrodt
62e5c2422c CertificateViewer: Don't crash with empty certificate path
gpg4libre

Change-Id: I4e3d59331a93c0bee98bcc493c2a6aca11005ec4
Reviewed-on: https://gerrit.libreoffice.org/34741
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-03-01 12:51:36 +00:00
Noel Grandin
198c41c4fe new loplugin unoany
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89
Reviewed-on: https://gerrit.libreoffice.org/34714
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-28 10:17:47 +00:00
Miklos Vajna
64bac5c0f0 tdf#105093 vcl PDF export: add embedded video testcase
Fails with commit 4ad249af88d15f2c8a09f0721a59d82718fcc201 (tdf#105093
sd PDF export: handle embedded videos, 2017-01-04) reverted.

Change-Id: I413ec9a5da3c0783541dcd28fb9a62dd896f955b
Reviewed-on: https://gerrit.libreoffice.org/34681
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-02-27 15:35:48 +00:00
Miklos Vajna
a9a9b8155f xmlsecurity PDF verify: fix parsing of nested dictionaries
This is triggered by an upcoming unit test for tdf#105093.

Change-Id: I3c8e8662fcadaea1f6e19bf6194d8159916f368b
Reviewed-on: https://gerrit.libreoffice.org/34678
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-02-27 13:28:10 +00:00
Miklos Vajna
4e203ca391 tdf#105461 vcl: add text highlight textcase
Fails with commit ee32c7d8083ae1449d6b379034be92995c142da9 (tdf#105461
PDF export: handle text fill color, 2017-02-01) reverted.

Change-Id: I3628a16d0810e3be3fb352340d06cdba472dcd3f
Reviewed-on: https://gerrit.libreoffice.org/34621
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-02-27 08:11:16 +00:00
Miklos Vajna
58eac1105f vcl: add initial CppunitTest_vcl_pdfexport
Invoke the PDF export filter and then use the PDF tokenizer from
xmlsecurity to assert the contents of created PDF file. The testcase
fails with commit 6db0f1feb1d9931d2726dd11a889c58815710ce0 (tdf#106059
PDF export: create a reference XObject for PDF images, 2017-02-22)
reverted.

Change-Id: I90526fef41d9560ae447f586df766bc50a491c43
Reviewed-on: https://gerrit.libreoffice.org/34609
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-02-24 15:49:15 +00:00
Miklos Vajna
7737457558 xmlsecurity PDF verify: handle multiple startxref in the last 1024 bytes
Usually this is not a problem, but it's easy to construct a document
manually that contains multiple startxref tokens at the last 1024 bytes.
Make sure we read the last of those, not the first one.

This is triggered by an upcoming unit test for tdf#106059.

Change-Id: I94fbb5d407c4a03b7c2c6e207200127bb374e750
Reviewed-on: https://gerrit.libreoffice.org/34607
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-02-24 12:45:51 +00:00
Samuel Mehrbrodt
baee96e04a Remove commented out code
Change-Id: I1da07c52380e543b80c7725a8420c1927743257d
Reviewed-on: https://gerrit.libreoffice.org/34587
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-02-23 16:47:24 +00:00
Samuel Mehrbrodt
3788d6a264 Remove commented out code
Change-Id: I36e5f4072ac52a3073d13e4ad5185ead7611e722
Reviewed-on: https://gerrit.libreoffice.org/34586
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-02-23 16:36:21 +00:00
Samuel Mehrbrodt
f827e119a3 Reduce indentation
Change-Id: Ie4578e45205ebf206a752651901f488a7edd648d
Reviewed-on: https://gerrit.libreoffice.org/34541
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-02-23 14:16:00 +00:00
Noel Grandin
0649622956 loplugin:unusedmethods
Change-Id: I52a9f16f3ed543a3c83ca111df70e3f7ae1ef33c
Reviewed-on: https://gerrit.libreoffice.org/34508
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-21 10:07:37 +00:00
Stephan Bergmann
7dedccd06d loplugin:subtlezeroinit: xmlsecurity
Change-Id: Ife06c74e1665273350b497a1a584d7f76297c13d
2017-02-21 07:34:54 +01:00
Jochen Nitschke
696479aafa cppcheck: redundantAssignment
Change-Id: I4537ced9dafb5b20dbf8cfb7d335698536067c49
Reviewed-on: https://gerrit.libreoffice.org/34436
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-20 06:04:06 +00:00
Miklos Vajna
99263598bf xmlsecurity: remove unused DecryptorImpl
No longer necessary since commit 50669de68785d61534c4c3fe101fd8e1d12fae65
(xmlsecurity: remove unused xsec_fw_component_getFactory(), 2017-02-02).

Change-Id: I24ee6fcd01a238151058559a7bf994e27b7b64cf
Reviewed-on: https://gerrit.libreoffice.org/34332
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-02-16 10:49:19 +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
Noel Grandin
a4d0ec84da convert SvtSecurityOptions::EOption to scoped enum
and drop unused E_MACRO_DISABLE enumerator

Change-Id: I0bd706d4d4e1d8b9004e68c9e77c11410c62a64a
Reviewed-on: https://gerrit.libreoffice.org/34067
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-10 06:05:54 +00:00
Miklos Vajna
91af0067c9 xmlsecurity: remove unused EncryptorImpl
No longer necessary since commit
50669de68785d61534c4c3fe101fd8e1d12fae65 (xmlsecurity: remove unused
xsec_fw_component_getFactory(), 2017-02-02).

Change-Id: Ibbc78888abcd1cb6d7f242c93f28cdaf836cca14
2017-02-09 11:50:12 +01:00
Stephan Bergmann
fed3783e77 Add missing #includes
...like 6dce9c6757823b9e89863716ae70ff4e8ddd4e60, for Windows-only code

Change-Id: I35f37aae2e6f55ff8ed82afc710a9b59a43b028c
2017-02-08 08:40:06 +01:00
Stephan Bergmann
6dce9c6757 Add missing #includes
...and remove some unncessary using directives/declarations, in preparation of
removing now-unnecessary #includes from cppumaker-generated files, post
e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception
specifications".

Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-02-06 17:21:16 +01:00
Julien Nabet
223f1f2b81 Typos
Change-Id: I36f443c266670bd26aa6b813075e18653f372f52
Reviewed-on: https://gerrit.libreoffice.org/33900
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-02-03 21:09:44 +00:00
Stephan Bergmann
5595ee701e loplugin:useuniqueptr
Change-Id: I3a246a22baaac8195dc1b94c42994de7d80e8336
2017-02-02 15:17:52 +01:00
Miklos Vajna
50669de687 xmlsecurity: remove unused xsec_fw_component_getFactory()
No longer needed since commit a4af8986c94ff2d1bea0c21f798330efcc97b133
([API CHANGE] offapi: remove unused xsec_fw UNO services, 2017-01-26).

Change-Id: I428c07bfe2846cdc54b35a62554a21197e62245f
2017-02-02 11:56:26 +01:00
Miklos Vajna
68c58b4691 xmlsecurity: various small cleanups
Change-Id: Id713460036331fd9f98fd1eca85ca61f57cf5afe
Reviewed-on: https://gerrit.libreoffice.org/33779
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-02-01 12:01:24 +00:00
Noel Grandin
1c3e84d819 teach lolugin:stringconstant about calling constructors
so we can remove unnecessary calls to the OUString(literal) constructor
when calling constructors like this:
   Foo(OUString("xxx"), 1)

Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36
Reviewed-on: https://gerrit.libreoffice.org/33698
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-31 08:56:20 +00:00
Julien Nabet
018ed00d5b cppcheck: postfix operator
Change-Id: I2b6f0c922b0e70ecbf79f60831ff5d71cd1438fb
Reviewed-on: https://gerrit.libreoffice.org/33656
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-29 09:46:36 +00:00
Noel Grandin
f1d83ac45f loplugin:stringconstant check for unnecessary OUString constructor..
..calls when creating exceptions

Change-Id: I3bc58a5aa4dc6f0508ecb88b3a843b96b8c7ebfe
Reviewed-on: https://gerrit.libreoffice.org/33617
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-28 09:22:55 +00:00
Noel Grandin
4142e0a0c0 loplugin: unnecessary destructor writerfilter..xmloff
Change-Id: I511822dc874101ed3b9850b015b746a86d26c3b5
Reviewed-on: https://gerrit.libreoffice.org/33578
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-27 06:51:11 +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
Stephan Bergmann
8cb18eb82d loplugin:dynexcspec (clang-cl), xmlsecurity
Change-Id: Iaa817d1da0c648c3a1feb0ef1e4500808a868644
2017-01-20 11:53:29 +01:00
Stephan Bergmann
8ccd11e1ae New loplugin:dynexcspec: Add @throws documentation, xmlsecurity
Change-Id: I2447c028add359952e4bd36dbdc1d5431fe48104
2017-01-19 18:03:08 +01:00
Miklos Vajna
716db7dd4a xmlsecurity: hold XMLEncryptionTemplateImpl by rtl::Reference
Going via UNO for a class in the same directory is an overkill.

Change-Id: Ia06561a95cd10a7aa52a1b84598f88c43e57e7a1
Reviewed-on: https://gerrit.libreoffice.org/33300
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-01-19 10:02:48 +00:00
Caolán McNamara
f6572fa96c tweak to avoid coverity#1371169 Missing move assignment operator
Change-Id: I0d29ce18c19c26a7526dad98d77db4670d0c5303
2017-01-19 10:02:13 +00:00
Caolán McNamara
16c9933666 convert to std::vector
Change-Id: I77ac7701ccb35aa32152d85a20fc59ed0bd942cf
2017-01-18 21:33:47 +00:00