Commit graph

8966 commits

Author SHA1 Message Date
Andrea Gelmini
10a213572b Fix typo
Change-Id: I55558e5252c238be2417d370040760ed9c450a4f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137641
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-07-30 23:25:48 +02:00
Mike Kaganski
bee22fd433 Verify signing certificate cryptographically before use in tests
Documents signed using an invalid (e.g., not having a trusted root)
certificate give signatures that obviously can't pass validity tests.

Change-Id: Id4b097516e06c548ea42cad65d76bbd8a6853cc4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137620
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-07-29 22:55:07 +02:00
Mike Kaganski
8fc338f2af Better valid certificate check, consider filter data
Otherwise, testSignCertificateSubjectName that has an explicit certificate
subject name requirement would fail when user has other valid certificates,
but not this one.

Change-Id: Ic3c440a8316314c922a53a51085a3e829f235f6d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137593
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-07-29 13:28:13 +02:00
Justin Luth
fd428245bf tdf#148810 ppt import: Depth set by EE_PARA_OUTLLEVEL
It isn't enough to set Paragraph->SetDepth.
It must match the property set.

Change-Id: I96a22057c57ae869542b4ffbc069a7cd89bb06c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137543
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2022-07-29 01:45:55 +02:00
Noel Grandin
8a843f7e98 loplugin:moveit
make the plugin more conservative, so we see less false+
(although we also miss some possibilities in the process)

Change-Id: I91b1806271e7f802d7459834ab7bcc569047da3a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137342
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-25 10:04:06 +02:00
Noel Grandin
faa40c022c elide some makeStringAndClear() calls
Change-Id: I8636102554a76f2ba3f6297219b40761473a4489
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137285
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-21 11:01:22 +02:00
Miklos Vajna
7d56dae337 tdf#127236 vcl: fix missing encryption of PDF images during export
Regression from commit 78e25558e8
(tdf#106059 PDF export: create a reference XObject for JPG images with
PDF data, 2017-02-23), once a PDF image was inserted to a document, an
encrypted PDF export lost those images.

The reason for this is that we started to preserve PDF images as vector
data with the above commit, but this means we copied over PDF objects
from PDF images to the export result as-is, so encryption was not
performed for them.

Fix this by separating the write of the PDF object headers, stream
content and object footer and then calling
checkAndEnableStreamEncryption() / disableStreamEncryption() for each
object, even if it's not something our PDF export created but comes from
a PDF image.

Note that when existing PDF files are signed, PDF objects are also
copied into a vcl::filter::PDFDocument, but such PDF images are never
encrypted, so it's fine to have stub implementations in
vcl::filter::PDFDocument.

Change-Id: I2f74b9f51cd35b4319221532ca890e197bab9cf3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137242
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2022-07-20 12:54:45 +02:00
Caolán McNamara
eea7dc22c6 ofz#48643 Indirect-leak
Change-Id: Ia19f1d15e52a869baf8a869b5c3bcceaacef7887
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137129
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-07-16 20:16:50 +02:00
Noel Grandin
2d009c4057 loplugin:moveit
Change-Id: I2702e716dc669ffbb870d36d060e110288d7a744
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137043
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-14 11:18:21 +02:00
Chris Sherlock
934985becc tools: rename getHeight/Width() to GetOpenHeight/Width()
By default Rectangle uses closed interval, if we really want to use half
open intervals then we should specifically say as such in the name.

Change-Id: Id7a91120ba1a1a4bc330014216b73a692dbf03a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136575
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-11 11:06:53 +02:00
Marco Cecchetti
3170a77121 svg filter: transform animations: support for scale and translate
Now the emphasis grow and shrink animation is supported.
Now the animation engine is able to handle array of values instead of
single value param when computing the next animation state.

Change-Id: Ic200103c6c26a63de8eecc37dcd36ba1a2f0d391
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134870
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit a6ed16394c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136418
Tested-by: Jenkins
Reviewed-by: Aron Budea <aron.budea@collabora.com>
2022-07-07 05:40:03 +02:00
Caolán McNamara
e43aba4ec0 cid#707857 Uninitialized scalar field
Change-Id: Ia83a46286f16ad94e6829e9c372c4e9465f503e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136443
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-25 22:18:15 +02:00
Marco Cecchetti
32f2f43929 svg filter: support for emphasis spin animation
Partial support for transform animations.
At present only rotate is supported.

Change-Id: If9ba69ec0b74bc3b527a963cb0c0bf3a7bfa5220
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134626
Tested-by: Jenkins
Reviewed-by: Aron Budea <aron.budea@collabora.com>
2022-06-25 06:34:27 +02:00
offtkp
9a5d46070e tdf#100522 Add support for exporting SVGZ in Draw
Detect draw_svgz_Export and compress the SVG before exporting if needed

Change-Id: I7c8463292ee845a3ce2f2a3c5aa876b25dcedb2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135556
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-06-22 14:11:14 +02:00
Marco Cecchetti
0dd712ff06 impress online: not handled transform animation causes core crash
The transform animation uses the svg namespace for some attribute,
anyway the exporter was not configured for handling attribute with
such a namespace prepended.

Change-Id: Ia33f55e3589b5743352ec0a156408b374a92509b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134356
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2022-06-21 07:20:34 +02:00
Olivier Hallot
072aec1925 Bump xmlfiltertabpagegeneral.ui to latest Glade
Change-Id: I0686e41c75c9887264c619d3f477bb7ca3c3a1fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135610
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2022-06-15 16:46:57 +02:00
offtkp
376be26f4e Add support for exporting EMZ/WMZ
Split xcu files for Z compressable graphic formats. This introduces a
new option for exporting each Z compressed graphic format without
needing to check for extension.

Change type detection accordingly in graphicfilter.

Change-Id: Iabb971123f5e394196716900796632cb8ed12ece
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135181
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-06-15 15:29:01 +02:00
Olivier Hallot
817f98279b Fix extended tip
(after translation round)

Change-Id: I4eea58f44af49d19de9b1aa44fc9ad15e8edda12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135609
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2022-06-14 16:13:12 +02:00
Olivier Hallot
46927cdb83 Bump pdfviewpage.ui to latest Glade
Change-Id: Id8c5eca99cf1054587e8554581c32f4d5ca1c974
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135608
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2022-06-11 08:26:25 +02:00
Olivier Hallot
e0c5f8b4f6 Fix typo on xmlfiltertabpagegeneral.ui
Change-Id: I2bc3caa254d997c815bfd36f47504dbc70cadff8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135611
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-06-11 00:31:41 +02:00
Noel Grandin
f71606c920 new loplugin:moveit
look for local variables that can be std::move'd to parameters

off by default, since it doesn't do proper data flow analysis

Change-Id: I3403a0fcffd165bdea6a772528bc53995c5fdb40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135527
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-10 13:13:15 +02:00
Andrea Gelmini
fc12f345a7 Removed duplicated include
Change-Id: If0b82a13aa5f8fca25fec4d4c72a05a4bf9f98ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135281
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-06-02 20:54:56 +02:00
Noel Grandin
6b252b6adb clang-tidy modernize-pass-by-value in filter
Change-Id: Id55c90665eaa29ee2ece07606429411549e06b8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135242
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-01 18:52:21 +02:00
Noel Grandin
18321eb3f4 elide some OUString allocation
Change-Id: Idcb296980ea498373a0fb4f8c0c584eef2c5c9f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134922
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-25 19:00:44 +02:00
Noel Grandin
e79db65efb allow comphelper::OEnumerationByName to use a vector too for names
so we can skip some allocation.
Use a std::variant to preserve existing functionality

Change-Id: If01ebb04f7895fd52fa3f5d90648868fd38dc39e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134929
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-25 14:54:13 +02:00
Noel Grandin
912b8fa62f modernize and improve PropertySetInfo
(*) use o3tl::span for the array param, which means we don't need a null
entry to terminate the array
(*) use std::unordered_map to speed things up
(*) mark the array as static at a few more call sites

Change-Id: I05b6cae7552f44459e183ec05cb94e60edb3bfe0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134832
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-24 14:02:09 +02:00
Noel Grandin
e3f038db8a ConfigFlush can be directly instantiated here
Change-Id: I97934ecf7aafbeec3db9e7149e149a468ae21374
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134854
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-24 11:06:21 +02:00
Noel Grandin
19251d0a96 m_xRefreshBroadcaster in BaseContainer is dead code
because we are assigning a newly created object to a weak reference,
which means the newly created object is destroyed just after it is
created (verified in a debugger).

This was introduced in
    commit e03dd544ae
    Date:   Wed Jul 20 08:27:45 2005 +0000
    INTEGRATION: CWS fwk18 (1.5.224); FILE MERGED
2005/07/06 09:29:56 as 1.5.224.1: #123808# update sfx filter cache
at runtime
and
    commit 49a28fd630
    Date:   Wed Jul 20 08:27:31 2005 +0000
    INTEGRATION: CWS fwk18 (1.4.224); FILE MERGED
2005/07/14 12:22:13 as 1.4.224.2: #123808# listen on config to be
informed about changes
2005/07/06 09:29:56 as 1.4.224.1: #123808# update sfx filter cache
at runtime

Change-Id: Ic27cae4a499439009e89b003635067df440d4cf2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134853
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-24 11:06:07 +02:00
Noel Grandin
0935e997d2 avoid some unnecessary work when importing graphic
calling SetLogicRect triggers a bunch of listeners, but that work is
unnecessary while we are still loading the data

Change-Id: If71448400878a52551a1a3225d1c9cc1052f9867
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134839
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-24 09:59:31 +02:00
Noel Grandin
41bbc62f38 elide allocation of CacheItem when enumerating filters
Change-Id: I44f83485b984548118364dc58cbc3939001506d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134805
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-23 18:48:42 +02:00
Noel Grandin
ad5a41da38 reserve vector in FilterCache::getMatchingItemsByProps
Change-Id: Ic996b2d2e72c4aebc889d8c2a921b77c7c492276
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134644
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-19 22:18:44 +02:00
Noel Grandin
05b2436ce1 simplify CacheItem::update
both branches of the if can be easily accomplished with the same code

Change-Id: Iadef72b1e125a11fc27f628a26900ae30dc98220
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134479
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-17 17:36:56 +02:00
Noel Grandin
e6cca74355 tdf#121740 elide temporary CacheItem object in BaseContainer::getByName
shaves 2% off load time

Change-Id: I91cc04916d77bc7ece1561462403067478a74bca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134345
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-16 15:14:13 +02:00
Julien Nabet
4d3a9d4ffe tdf#149072: fix export PDF with PDF/UA in GUI after Index language was set
Regression of a1f9fea520
Make accessibility check dialog async

First add of m_xDialog->response(RET_OK) fixes the bug
the second one is just here to have same behaviour as before the quoted patch

Change-Id: Ib24459e4e946b83172271a9097930e5977e676be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134311
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-05-14 19:48:32 +02:00
Noel Grandin
22e08a3d8b tdf#121740 cache hashcode in SequenceAsHashMap
shaves 2% off load time

Change-Id: I5bd4eabf61205df21a27d2822acd2676a7732a3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134315
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-14 19:14:19 +02:00
Noel Grandin
652ac2fb11 cheaper to let Any do the comparison in isSubSet
rather than constructing temporary OUStrings

Change-Id: Ibb083e3fab8a465ae5288359424b297faac83617
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134317
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-14 17:30:58 +02:00
Noel Grandin
e61ce6b317 use comphelper::WeakComponentImplHelper for TerminateDetection
Change-Id: I6184bdef7b487f71549cd50c96c764a93ef791de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134274
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-14 08:39:22 +02:00
Noel Grandin
9d450875c8 only instantiate SfxFilterMatcher when we need it
Change-Id: Ibb6162ddc6bec73beef6fffc8cf53976dc82313a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134156
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-11 15:16:45 +02:00
Noel Grandin
825066456e osl::Mutex->std::mutex in filter::config::CacheUpdateListener
Change-Id: Ib791be8495f2ad2855cceb94d45f2bd0995e3710
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133975
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-07 18:00:56 +02:00
Noel Grandin
738b8f09c5 remove unnecessary sequenceToContainer
If we are not going to manipulate the resulting vector, then it is
actually slower, since we have to allocate more storage for the vector

Change-Id: I6d5f5b0150cea9e8a0663ccb1398b0237f3fca9a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133943
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-06 20:55:43 +02:00
offtkp
e9c50fbbc3 tdf#103954: Z compressed graphic formats support for EMF/WMF
- Added .emz and .wmz file opening support
- Added a function to check for Z compression that
all z comp. formats can use
- Added 3 unit tests for emf/emz/wmz files
and the example files have been checked with
a different tool (File Viewer 4)
- emf/emz file detection changed from magic byte checking
to extension checking, like wmf/wmz does

Change-Id: I3e433fd23d18482648a51cd04b8f467368e97b62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132456
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-05-06 04:02:05 +02:00
Noel Grandin
9f1701d01d use more o3tl::getToken
found by inspecting call sites of OUString::getToken

Change-Id: I4269c7476c7aa46fac39528227e350568f0eb34a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132644
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-05 12:57:00 +02:00
Stephan Bergmann
cc264e8ee7 Just use Any ctor instead of makeAny in filter
Change-Id: I68bbbc2cc80ac5efde78e10706b488bf78c058bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133816
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-04 14:09:58 +02:00
Noel Grandin
ddef1e2c01 add o3tl::equalsAscii
Change-Id: I042b8dcadbf7581de325c161763fe35aecde5ca2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133694
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-03 09:12:32 +02:00
Noel Grandin
d3849255b7 use more string_view in INetURLObject
Change-Id: I4462f7cf4740fa4d1b129d76a0775f4250f41bbd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133555
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-29 08:53:22 +02:00
Bartosz Kosiorek
8c9e6d3a99 Add initial support OfficeArtBlip TIFF format
Additionally the magic number were replaced with enum
Change-Id: I7d825ec84ff5cd5ff315ee37613e3b84cb6f0567

Change-Id: Ic33022a0e225099f2397dd300f4792055184fd10
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133526
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2022-04-28 20:40:09 +02:00
Stephan Bergmann
4049fe2148 Two more uses of rtl::createUriCharClass
...that 6a9f342add "Introduce
rtl::createUriCharClass" had missed

Change-Id: Id37399cb88df25aff22d42e889aea12c1ca90797
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133423
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-26 10:41:42 +02:00
Noel Grandin
ab699bfdb3 new loplugin:stringviewvar looks for OUString vars that can be
... that can be string_view

Change-Id: I0ddf66725e08b58e866a764f57200dd188b9f639
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133066
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-19 18:31:10 +02:00
Caolán McNamara
0ba7674c73 ofz: Timeout 23s->4s
Change-Id: I10d48584e0ab0ce52cabe8077602f557b6392492
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133012
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-15 10:17:00 +02:00
Noel Grandin
41fa4bb83a use more string_view in filter
Change-Id: Ieff65b96487051721f9016c005523f31b7415901
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132984
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-14 11:24:53 +02:00