Commit Graph
2250 Commits
Author SHA1 Message Date
Noel Grandin 73e6a7975b loplugin:unusedmethods
Change-Id: I7805ac9bc6f8c0aa5ba4804777e7d7c2c29a78f3
Reviewed-on: https://gerrit.libreoffice.org/52066
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-29 14:45:43 +02:00
Miklos Vajna 04bfd8bf76 xmlsecurity nss: create SecurityEnvironment instances with a constructor
Change-Id: If4b18747292dd265d789b70078979361bd044fde
Reviewed-on: https://gerrit.libreoffice.org/52039
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-03-29 09:07:51 +02:00
Stephan Bergmann bda744fb53 No need to open this test doc read/write
...fail when SRCDIR is a read-only tree

Change-Id: I80a372b3eb71faed1215305a55df93390c846eed
Reviewed-on: https://gerrit.libreoffice.org/52020
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-03-28 21:17:55 +02:00
Stephan Bergmann 0ff64e31b0 Copy test doc to temp location before opening read/write
...otherwise fails if SRCDIR is a read-only tree

Change-Id: I0b81be5ba055dac133e5ee638f21c3c5f4d5736b
Reviewed-on: https://gerrit.libreoffice.org/52015
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-03-28 21:17:39 +02:00
Noel Grandin 867a22fd19 loplugin:virtualdown in xmloff/xmlsecurity
Change-Id: I884fe180be98fe29ddb7d2daf4c61f733236e8bd
Reviewed-on: https://gerrit.libreoffice.org/51987
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-28 13:01:25 +02:00
Noel Grandin 862dc17e43 loplugin:expressionalwayszero improvements
Change-Id: I00bdbc58d2295a0be30b47c85eae6b9abfec17b2
Reviewed-on: https://gerrit.libreoffice.org/51868
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-27 08:22:09 +02:00
Noel Grandin 38e7aef0fa use boost::optional in OutDevState
Change-Id: I83fb85fcba6cd2a5dc4f99fdfd3238d72afb7bc2
Reviewed-on: https://gerrit.libreoffice.org/51770
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-26 08:44:58 +02:00
Miklos Vajna b4c08ecf51 xmlsecurity: remove no longer needed Windows XP workaround
Change-Id: Id3f024fefc0b2bd6f837ecfdd907f0d107600910
Reviewed-on: https://gerrit.libreoffice.org/51759
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-03-23 13:27:34 +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 17407f808e Turn on clang-format for these files
I (tried to) keep these files consistent locally with astyle in the past,
switching to clang-format makes sure that the recent problem with introducing
inconsistencies in these files doesn't happen again.

(On the flip side, it's great to see that now others also touch this
PDF/pdfium code. :-) )

Change-Id: I6065eab77c584197a82fe48e7d3e81b445106efd
Reviewed-on: https://gerrit.libreoffice.org/51701
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-03-21 14:29:14 +01:00
Caolán McNamara 4b785097f1 drop unnecessary includes
Change-Id: I1a817d5575bbd57ecaa874a27158b9218e4210cc
Reviewed-on: https://gerrit.libreoffice.org/51603
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-20 13:08:20 +01:00
Rene Engelhard d7ecf4a4e3 properly check for gpgconf (and --create-socketdir) working
Change-Id: I21268e5950381845eb90bf66a42a99adc3821eaa
Reviewed-on: https://gerrit.libreoffice.org/51493
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-03-18 17:21:03 +01:00
Thorsten Behrens f68929ac61 gpg4libre: fix failing gpg test due to over-long filenames
With long workdir path, gpg sometimes fails with 'gpg: can't connect
to the agent: File name too long' error.
WK recommends to create preferred socket dir under /run/user, needs
prepping though via gpgconf.

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84720

Change-Id: I2edb27758b2d4581d54eabf549dcdfed0106dba4
Reviewed-on: https://gerrit.libreoffice.org/50978
Tested-by: Rene Engelhard <rene@debian.org>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-03-18 17:20:52 +01:00
Noel Grandin 2f5868c430 loplugin:redundantfcast look for redundant copies in return statements
Change-Id: I5f416c865dfe1c36018784246a8007452eb42008
Reviewed-on: https://gerrit.libreoffice.org/50996
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-12 07:37:24 +01:00
Stephan Bergmann cdd14e60bb loplugin:unnecessaryoverride (clang-cl)
Change-Id: I96c2e28f14e50eed5b729170cd30fd54f00d89f3
Reviewed-on: https://gerrit.libreoffice.org/50944
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-03-08 14:35:08 +01:00
Caolán McNamara 2374028d63 Resolves: tdf#116188 set min version on all .ui files to 3.18
which is already the min for the runtime

Change-Id: Ifebe099f1f94a36f65a31989689400327a823dcd
Reviewed-on: https://gerrit.libreoffice.org/50776
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-05 21:27:25 +01:00
Noel Grandin ddd43218e9 drop sax::tools::*base64 methods
and use the underlying comphelper methods rather. This is so that I can
break the dependency that tools has on sax, and can add methods that
make sax depend on tools.

Change-Id: I8a2d6ce2ffc3529a0020710ade6a1748ee5af7d5
Reviewed-on: https://gerrit.libreoffice.org/50767
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-05 14:25:02 +01:00
Miklos Vajna c8cd02629d forcepoint #16: fix heap-use-after-free
PDFDocument::Tokenize() in the aKeyword == "obj" case allocates a
PDFObjectElement, stores it as an owning pointer inside rElements, and
also stores two non-owning references to it in m_aOffsetObjects and
m_aIDObjects. So make sure those 2 other containers are also cleared
then elements go away.

LO_TRACE="valgrind" bin/run pdfverify <sample>

doesn't report errors anymore after the fix.

Change-Id: Ie103de3e24a1080257a79e53b994e8536a9597bc
Reviewed-on: https://gerrit.libreoffice.org/50627
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-03-02 20:09:21 +01:00
Noel Grandin 477d2ba662 delete colordata.hxx
move what we still need into color.hxx

Change-Id: Ied7e31eb16468aa334c666b1499a6262f16a6350
Reviewed-on: https://gerrit.libreoffice.org/50561
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-02 09:18:19 +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
Miklos Vajna 7ef644e7e5 xmlsecurity mscrypt: create XMLSecurityContext instances with a constructor
Change-Id: If535e153e587448232bf1451fa159d976e61be37
Reviewed-on: https://gerrit.libreoffice.org/50534
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-03-01 10:06:43 +01:00
Caolán McNamara 942f05996b convert remaining ErrorBox to weld::MessageDialog
and

convert remaining QueryBox to weld::MessageDialog

Change-Id: Ifb4c316dee8eabf57c4940c44e29c65a2781aa6c
2018-02-26 15:27:09 +00:00
Miklos Vajna 0f62b798ac xmlsecurity nss: create XMLSecurityContext instances with a constructor
Change-Id: I0133469e08b6d48aaf949e928ec4436d309963eb
Reviewed-on: https://gerrit.libreoffice.org/50223
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-02-26 09:08:52 +01:00
Caolán McNamara d75144cf44 convert remaining InfoBox to weld::MessageDialog
Change-Id: I91d828e38d96264cf4a76f30940942556b8f78d8
Reviewed-on: https://gerrit.libreoffice.org/50205
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-25 20:03:26 +01:00
Caolán McNamara 3a387e314d convert all help responses to gtk's -11
and ok responses to gtk's -5
and cancel responses to gtk's -6
and close responses to gtk's -7
and yes responses to gtk's -8
and no responses to gtk's -9

Change-Id: Ia1a261a3a711ed9f5d8c0b0c639897c3064bb08c
Reviewed-on: https://gerrit.libreoffice.org/50206
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-25 00:59:27 +01:00
Thorsten Behrens e2d8e2e0e2 tdf#115374: add GPG SEInitializer service for Windows
Amends commit 1c58b047d1, seems we
need that now on Windows, too

Change-Id: Ia0c5e1e577a4f8dfe02b4d8eda0d220fa5e5f2a1
Reviewed-on: https://gerrit.libreoffice.org/50235
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-02-23 17:11:06 +01:00
Miklos Vajna a2e53070ca xmlsecurity mscrypt: create XMLSignature instances with a constructor
Change-Id: Ie30885226d1ede4293adc888e587d6111343f5af
Reviewed-on: https://gerrit.libreoffice.org/50144
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-02-23 09:05:59 +01:00
Caolán McNamara 6a4c464b49 weld native message dialogs
just the straight-forward MessageDialog cases first

a) remove border_width from message dialog .ui so as to take
the default border width
b) retain 12 as default message dialog border for vcl widget case
c) remove layour_style from message dialog button boxes so as to
take the default mode (a no-op for vcl widget case)
d) use gtk response ids (vcl builder will converts to vcl ones)

Change-Id: I7de281093a1b64f92f71ca11e7cbba42bb658154
Reviewed-on: https://gerrit.libreoffice.org/50143
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-22 22:07:38 +01:00
Stephan Bergmann 5098f82593 Move include/sfx2/notebookbar/NotebookbarContextControl.hxx to include/vcl/
...as it is included from other include/vcl/*.hxx files.  (And moving it there
helps the heuristic in an upcoming improvement of loplugin:dyncastvisibility.)

Change-Id: I15e061fbaba8e82235afb5b312f7b38f26eec900
Reviewed-on: https://gerrit.libreoffice.org/50123
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-02-22 07:51:28 +01:00
Michael Stahl 81e4be9cd3 gpgmepp,xmlsecurity: fix testODFEncryptedGPG() failure caused...
...by CppunitTest setting LD_LIBRARY_PATH to include instdir/program.

This causes the spawned gpg-agent to load instdir/program/libassuan.so.0
instead of /usr/... and fail with:

writev(2, [{iov_base="gpg-agent", iov_len=9}, {iov_base=": ",
 iov_len=2}, {iov_base="relocation error", iov_len=16}, {iov_base=": ",
 iov_len=2}, {iov_base="gpg-agent", iov_len=9}, {iov_base=": ",
 iov_len=2}, {iov_base="symbol assuan_sock_set_system_ho"...,
 iov_len=118}, {iov_base="", iov_len=0}, {iov_base="", iov_len=0},
 {iov_base="\n", iov_len=1}], 10) = 159

The failure happens in the libreoffice-6-0 branch on Fedora 27, whereas
the master branch doesn't fail because it has a newer version of
libassuan that happens to provide the required symbol.

Fix this by applying the patch that was added for ASAN in
d15f042abd to clear LD_LIBRARY_PATH
always on Linux.

Change-Id: I6a5c7fdfdd32234f39a182581b03d79739880c11
Reviewed-on: https://gerrit.libreoffice.org/50056
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-20 20:54:32 +01:00
Miklos Vajna 48d3ff5c49 xmlsecurity nss: create XMLSignature instances with a constructor
Change-Id: Ic2968a1eda7517ba4cfb67d0cf68fb7de1ac1935
Reviewed-on: https://gerrit.libreoffice.org/49685
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-02-14 09:08:17 +01:00
Christian Lohmaier 9f36b8d029 certdialog: kille useless double-space in "Issued to "
not only is it unnecessary, it also confuses translators

Change-Id: Ifaebc150a155c44f76e3aedcf1d652bfad2c7443
2018-02-08 14:28:24 +01:00
Miklos Vajna 89fa5e45c3 xmlsecurity: fold Library_xsec_fw into Library_xmlsecurity
That little amount of code hardly justifies a separate library.

Change-Id: Idbb039f38258bc12759fcf6d29328e1afe7443ab
Reviewed-on: https://gerrit.libreoffice.org/49391
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-02-08 09:06:57 +01:00
Miklos Vajna 0833bab20b xmlsecurity: create CertificateContainer instances with a constructor
Change-Id: I42f0218a46c67062ea6eb0845d978f2630793ec0
Reviewed-on: https://gerrit.libreoffice.org/49304
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-02-07 09:24:37 +01:00
Miklos Vajna 39ba9a307d xmlsecurity: create DocumentDigitalSignatures instances with a constructor
Change-Id: I9780438c3b7f8206fad3bfe29e93d1fcf535b811
Reviewed-on: https://gerrit.libreoffice.org/49199
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-02-04 20:01:31 +01:00
Mike Kaganski 26eee611cb xmlsecurity: MSVC: pragma warning: make more specific, remove obsolete
Change-Id: I8303ba62198f4beb934623df7c52bf484a66a5e5
Reviewed-on: https://gerrit.libreoffice.org/49059
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-02-02 13:13:20 +01:00
Noel Grandin 5cb225b0b3 loplugin:useuniqueptr in SAXEventKeeperImpl
Change-Id: I1bb683dc8d492db73c2f2cc07c67b4dcb75bc1fb
Reviewed-on: https://gerrit.libreoffice.org/48558
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-25 13:05:30 +01:00
Miklos Vajna f58a16d598 tdf#114460 vcl: handle nested parentheses in PDF roundtrip
The roundtrip of the pdf image failed due to this.

Change-Id: I88a9657e242dd2659f9bf06233e5fcbfeb43ceb5
Reviewed-on: https://gerrit.libreoffice.org/48362
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-01-23 09:07:38 +01:00
Stephan Bergmann 9af8f190ed More loplugin:cstylecast on Windows
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after
cab0427cad "Enable loplugin:cstylecast for some
more cases" and a409d32e7f "More
loplugin:cstylecast"

Change-Id: Ib3355159dd08333e1b7a8d091caf2069cdcc7862
Reviewed-on: https://gerrit.libreoffice.org/48317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-23 07:54:51 +01:00
Noel Grandin be8c414567 loplugin:unusedmethods also check for functions returning bool
we were previously excluding them

Change-Id: I48a68799b0de60b4995fae541eb363e043d4dd11
Reviewed-on: https://gerrit.libreoffice.org/48167
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-19 13:26:27 +01:00
Caolán McNamara 7bcb105a9d coverity#1427630 Unchecked return value
Change-Id: If92d5b080ce9a4e28fe15da1448f74ecf0a31257
2018-01-17 13:32:35 +00:00
Thorsten Behrens 03afd4b724 tdf#115011 don't crash on non-existent gpg support
Change-Id: I90679472898648ccf0811c67c17f7bad41d4e347
Reviewed-on: https://gerrit.libreoffice.org/47984
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-16 15:27:37 +01:00
Andrea Gelmini 624f84c07e Fix typos
Change-Id: I078626eaa3155cc429320cc8c1532003b382b22a
Reviewed-on: https://gerrit.libreoffice.org/47855
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-16 12:40:51 +01:00
Stephan Bergmann c1f9d1a426 More loplugin:cstylecast: xmlsecurity
Change-Id: I3ff3df41b004a0c2cfe01da19c1a0aa6488aaead
2018-01-15 08:59:53 +01:00
Thorsten Behrens 8242c22f84 gpg4libre: add initial unit test for encryption
Load encrypted document w/ password-less key,
don't fail.

Change-Id: Id782dd865878ae7b8a60c7c80821b1370f6ac7e7
Reviewed-on: https://gerrit.libreoffice.org/47831
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-13 14:38:03 +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
Miklos Vajna 9e27e5a736 xmlsecurity: remove unused xml_security::serial_number_adapter
Change-Id: I09bc10a021fb5319cc256542206d94bc00646304
Reviewed-on: https://gerrit.libreoffice.org/47402
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-01-05 09:03:48 +01:00
Miklos Vajna 67e1e2ee40 tdf#42949 Fix some more Include What You Use warnings
Change-Id: I2040315707674dc99a37aedb96ac61dca274c13a
Reviewed-on: https://gerrit.libreoffice.org/47348
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-01-04 15:51:39 +01:00
Miklos Vajna d8efc393bf Turn on clang-format for these files
I (tried to) keep these files consistent locally with astyle in the past,
switching to clang-format makes sure that the recent problem with introducing
inconsistencies with automatic loplugin rewrites doesn't happen again.

Change-Id: If49c96b6e9e6ed50beb69c70e37125dff5607f76
Reviewed-on: https://gerrit.libreoffice.org/47332
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-01-03 22:12:15 +01:00
Noel Grandin 4855257e52 loplugin:passstuffbyref improved return in sw
Change-Id: I4484ac461761e4c46364b4f473c7e62f8ec72103
Reviewed-on: https://gerrit.libreoffice.org/47243
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-02 12:19:10 +01:00