Commit Graph
1672 Commits
Author SHA1 Message Date
Caolán McNamara 374599f8c2 weld SvxCharacterMap dialog
and SmSymDefineDialog

There's a whole bunch of interrelated stuff which needs to work at the same
time.

add menu support, keyboard support, better mouse support,
a gtk scrollable adaptor to support pseudo scrolling drawing bodge,
plugable uitest support for custom widgets, plugable a11y support
for custom widgets via the existing atk_object_wrapper_new wrapper
for XAccessible

In this specific case, change SvxCharacterMap from something that has an
internal scrollbar to a scrolledwindow where the scrollbar is external, which
drops the need for the a11y impl of SvxCharacterMap to emulate being a scrolled
window and internal table and just needs the table a11y impl

Change-Id: Ia2743d6958021c525a1900154dcbb69ae33fc400
Reviewed-on: https://gerrit.libreoffice.org/52084
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-30 14:32:12 +02:00
Julien Nabet 840cb33c41 Typos concerning hierarchy
Change-Id: Ied3c6d1513f2181a5f7da2904a0df2f806146cec
Reviewed-on: https://gerrit.libreoffice.org/51465
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-17 18:56:05 +01:00
himajin100000 32f42d093d tdf#116351: fix re-use of AttributeList on PGP manifest
multiple attributes of the same name on the same element,
because AttributeList was wrongly re-used

Change-Id: I29b2317ce3d836d7349fa0474709726bed2c5ad4
Reviewed-on: https://gerrit.libreoffice.org/51087
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-03-14 00:19:38 +01:00
Ashod Nakashian 8f79f22a8d oox: preserve the ContentType of custom files
Generic logic to preserve custom files with
their correct ContentType. Standard default
file extensions with respective ContentType
preserved in [Content_Types].xml.

Change-Id: I651ed691e9a4745cd2cb4b3c4d4c5fd7287b66c2
Reviewed-on: https://gerrit.libreoffice.org/50856
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2018-03-08 12:40:19 +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
Noel Grandin 08ab1f46b1 loplugin:oncevar extend to tools/gen.hxx types
Change-Id: I5c75875da44334569c02e2ff039b33c38397a0a2
Reviewed-on: https://gerrit.libreoffice.org/50283
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-26 07:21:04 +01:00
Caolán McNamara ff6def51db forcepoint #5 check for short read
a zip file within a structured storage stream. underlying storage stream
claims larger size that it can satisfy on read

Change-Id: I8516b12df33ad78b2525192826f5e3aef2622eb8
Reviewed-on: https://gerrit.libreoffice.org/50238
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-23 18:10:46 +01:00
Andrea Gelmini 2dda7cca6f Fix typos
Change-Id: Icee735b303ca72bba7b2680676b0c0092d27e2ec
Reviewed-on: https://gerrit.libreoffice.org/49699
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-02-14 08:56:10 +01:00
Ashod Nakashian 97a73d2772 oox: cosmetic cleanup
Change-Id: Ifafd7338ddfec8b707b5ddf4acb39512faf186da
Reviewed-on: https://gerrit.libreoffice.org/49325
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2018-02-14 01:04:11 +01:00
Ashod Nakashian 00492aff75 ofopxml: always generate default application/xml
MS Office always sets the application/xml entry
but LO doesn't preserve unknown entries.
Since this is a standard and always-set entry
LO should always stamp it as well.

Change-Id: I28b47634f2aa1fec233c9184deb65fd43f2f3ae8
Reviewed-on: https://gerrit.libreoffice.org/48724
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2018-02-14 01:02:33 +01:00
Stephan Bergmann 37413f569a Prevent MemoryByteGrabber from ever taking temporaries again
...after c99527385a "MemoryByteGrabber sequence
has to exist for Grabber lifetime"

Change-Id: Idcb7548aaa7741e8e535024ba36c7a171a6c2fb4
2018-02-07 14:30:56 +01:00
Caolán McNamara c99527385a MemoryByteGrabber sequence has to exist for Grabber lifetime
it just takes a c++ ref, so a temp is an unsuitable arg

Change-Id: I40490e94d977df91b985bc4ae458b68ee85d5dfe
Reviewed-on: https://gerrit.libreoffice.org/49321
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-07 10:05:19 +01:00
Noel Grandin 4417f37dd8 loplugin:useuniqueptr in OInputCompStream
Change-Id: I49fb71aa4319f6ac245885535e8afe855113e162
Reviewed-on: https://gerrit.libreoffice.org/48557
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-25 14:12:43 +01:00
Caolán McNamara 713b261b59 crashtesting: failure on import with bogus values
regression from...

commit 7d8e94444d
Date:   Thu Jan 11 08:47:15 2018 +0200

    convert a<b?a:b to std::min(a,b)

cause old promotion was to the largest type, so with a large 64bit nDiff and
any 32bit nRequestedBytes the nRequestedBytes was promoted to 64bit, found to
be smaller than nDiff, then would fit in 32bit. newer code cast both to 32bit,
resulting in a negative nDiff which was smaller than nRequestedBytes, but going
on to cause havoc.

Change-Id: I9eb5c61302b3dccf5333c4dfbf9ac92ce49585b5
Reviewed-on: https://gerrit.libreoffice.org/48155
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-19 09:51:45 +01:00
Noel Grandin 7d8e94444d convert a<b?a:b to std::min(a,b)
with something like

    git grep -nP '(.*)\s*<\s*(.*)\s*\?\s*\g1\s*:\s*\g2' -- *.?xx

Change-Id: Id5078b35961847feb78a66204fdb7598ee63fd23
Note: we also convert a>b?b:a
Reviewed-on: https://gerrit.libreoffice.org/47736
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-15 07:26:17 +01:00
Thorsten Behrens 39805f6518 tdf#114550 don't use PBKDF2 in package for gpg encryption
No need to derive password-based key, simply skip rtl_digest_PBKDF2
for the gpg4libre case.

Also pass down PBKDF2 iteration count from ZipPackage, which knows
about GPG encryption, instead of just always setting it in package
stream.

We otherwise needlessly iterate session key also for gpg encrypted
storages.

Change-Id: Ic96b2193f8541bbd109795fb9c0212a0a10c7344
Reviewed-on: https://gerrit.libreoffice.org/47783
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-13 14:36:27 +01:00
Thorsten Behrens 6df0c7bc23 tdf#114550 recognize sym key & init vec as valid f/ decrypt
Otherwise package code would _only_ try to decrypt for salt and
iteration count present, which does not make sense for gpg.

Change-Id: Ie366f086a3c14d6b54b91b4edee8cfef1a42c44b
Reviewed-on: https://gerrit.libreoffice.org/47782
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-13 14:35:01 +01:00
Thorsten Behrens ca6f3d7a56 gpg4libre: open encrypted files also via gpg
Adds code to sfx2 and package to try gpg4libre for extracting
session keys, and use them in turn to decrypt odf storage.

Change-Id: I1f626143e6c8443b4ad0c4fc5bdbd5ab8d56a451
Reviewed-on: https://gerrit.libreoffice.org/47780
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-13 14:32:48 +01:00
Thorsten Behrens d17bff6e03 gpg4libre: import PGP encryption manifest
Change-Id: Iadd7f8f1194299cb50907d8594114c89c668ebd0
Reviewed-on: https://gerrit.libreoffice.org/46462
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-13 14:31:15 +01:00
Michael Stahl 50382b9e92 tdf#114939 package: change ODF 1.1 export to use real SHA1
Change-Id: I20d4965cc467df56536ca03b773b3f0f61b1f2a3
2018-01-12 23:31:44 +01:00
Michael Stahl 9188ea83c3 tdf#114939 package,comphelper: Try both real SHA1 and StarOffice SHA1
... when importing ODF documents.

In CreatePackageEncryptionData(), add a 3rd SHA1 password hash,
PackageSHA1CorrectEncryptionKey, to EncryptionData.

Use it in ZipPackageStream::getDataStream(), which has 3 fall-backs
for SHA1 bugs now.

Also add a CorrectSHA1DigestContext, to be used together with
PackageSHA1CorrectEncryptionKey, and rename the existing one to
StarOfficeSHA1DigestContext, to be used together with the existing
2 PackageSHA1{UTF8,MS1252}EncryptionKey.

The fallback won't be used very often anyway: for the password SHA1
to be wrong, you need a password between 52 and 55 bytes long,
and for the SHA1/1K checksum to be wrong, you need a file
smaller than 1K with compressed size mod 64 between 52 and 55;
all XML files have enough random "chaff" added to be too large.

Test that we can read both correct SHA1 and StarOffice SHA1.

Change-Id: I988fa489b5e40c7657f404f18538f637d54d28f1
2018-01-12 23:31:43 +01:00
Stephan Bergmann 359dce1260 More loplugin:cstylecast: package
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: I0b588ac0743df25fd3eb3ac019fe6bd5360e5b0b
2018-01-12 20:18:47 +01:00
Miklos Vajna 16a5223616 ODT export: handle NoFileSync store option
SfxMedium already had a m_bDisableFileSync member; if the medium has a
storage, then forward this flag to it, so at the end
SwitchablePersistenceStream::waitForCompletion() (and the called
fileaccess::XStream_impl::waitForCompletion()) does not call
osl_syncFile(), either.

Times for 100 hello world inputs: 12594 -> 5281 ms is spent in XHTML-load + ODT
export + close (42% of original).

Change-Id: I2aab6c9e6baf133b211620004dcea66bd41ffc6f
Reviewed-on: https://gerrit.libreoffice.org/47766
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-01-12 12:04:44 +01:00
Michael Meeks dc885c071b tdf#114819 - include the synthetic encrpytion header into the size.
Change-Id: I090347046725a1ebb7a36f465654c29f7443d20d
Reviewed-on: https://gerrit.libreoffice.org/47467
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-01-06 16:00:26 +01:00
Caolán McNamara 84d0b4fcfb ofz#4806 Infinite loop
Change-Id: I89a24fa3ce4034ef207233b96c5e26a7b7787444
Reviewed-on: https://gerrit.libreoffice.org/47096
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-27 21:42:12 +01:00
Caolán McNamara 28d9059cee ofz#4734 Null-deref
Change-Id: I9b0a5c1e14e95a686986975921f3adb769caad29
Reviewed-on: https://gerrit.libreoffice.org/47020
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-25 21:53:42 +01:00
Stephan Bergmann 6f4f5677ac No need to keep these whitelisted functions decorated with SAL_CALL
The only effect SAL_CALL effectively has on LO-internal code is to change non-
static member functions from __thiscall to __cdecl in MSVC (where all other
functions are __cdecl by default, anyway).  (For 3rd-party code, it could be
argued that SAL_CALL is useful on function declarations in the URE stable
interface other than non-static member functions, too, in case 3rd-party code
uses a compiler switch to change the default calling convention to something
other than __cdecl.  But loplugin:salcall exempts the URE stable interface,
anyway.)

One could argue that SAL_CALL, even if today it effectively only affects non-
static member functions in MSVC, could be extended in the future to affect more
functions on more platforms.  However, the current code would already not
support that.  For example, 3af500580b
"loplugin:salcall fix functions" changed FrameControl_createInstance in
UnoControls/source/base/registercontrols.cxx to no longer be SAL_CALL, even
though its address (in ctl_component_getFacrory, in the same file) is passed to
cppuhelper::createSingleFactory as an argument of type
cppu::ComponentInstantiation, which is a pointer to SAL_CALL function.

Change-Id: I3acbf7314a3d7868ed70e35bb5c47bc11a0b7ff6
Reviewed-on: https://gerrit.libreoffice.org/46436
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-14 13:03:06 +01:00
Ilmari Lauhakangas 7d202623b0 Fix typos and grammar
Change-Id: I4143da3c5a809118d57849664f6ab1d2e775837f
Reviewed-on: https://gerrit.libreoffice.org/46253
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-11 22:51:01 +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
Jochen Nitschke 0201942d31 remove unused osl/time.h includes ..
and some more in base64.cxx

Change-Id: I31c9f23d3bd11f5482774e976a7c40025ffcfb86
Reviewed-on: https://gerrit.libreoffice.org/46157
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-10 12:29:50 +01:00
Thorsten Behrens c83b09ab19 rtlRandomPool: remove pointless seeding with system time
Change-Id: I88647a66a72d092303560a4348ce3dc55ee6c321
Reviewed-on: https://gerrit.libreoffice.org/46055
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-12-08 11:57:55 +01:00
Thorsten Behrens 0a58fdfdf4 gpg4libre: [API CHANGE] add storage helper for GPG encryption data
OpenPGP encryption needs to pass down slightly different meta data
to package / zip storage.

Change-Id: Idba9ad7a821cb33070cf5e5a0f79ae55db99b276
2017-12-07 18:21:02 +01:00
Thorsten Behrens 3f775118a6 gpg4libre: add manifest entries for gpg encryption
Change-Id: I71bd7e2c6c73d997fa1ed5bb36fdc2873daca10c
2017-12-07 18:21:02 +01:00
Noel Grandin 9a06b99d2f loplugin:salcall fix non-virtual methods
first, since those are safer to change than virtual methods

Change-Id: Ie3b624019d75ee2b793cee33b3c5f64e994e8bfe
Reviewed-on: https://gerrit.libreoffice.org/45798
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-05 07:32:46 +01:00
Noel Grandin eaf89e477a loplugin:countusersofdefaultparams in editeng..package
Change-Id: I4c20235a04d9ab5ea5edbb6b1b2413677b18a305
Reviewed-on: https://gerrit.libreoffice.org/45795
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-05 07:32:33 +01:00
Caolán McNamara 8d0a90825a ofz#4502 Direct-leak
Change-Id: I1323aa7033c68802384c9b984b52a6c6f1156094
Reviewed-on: https://gerrit.libreoffice.org/45714
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-02 21:16:01 +01:00
Caolán McNamara 1c53061bb9 improve scoping
Change-Id: I4b42d1357e951acda8e7cdba416dc298f260a541
Reviewed-on: https://gerrit.libreoffice.org/45713
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-02 18:21:43 +01:00
Caolán McNamara aeff597714 ofz#4491 Bad-Cast
Change-Id: Ibee0c3e51ecd2b976d67c3ab28cabf0acb10c6b8
Reviewed-on: https://gerrit.libreoffice.org/45659
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-02 12:48:26 +01:00
Caolán McNamara a426cf6034 ofz: Direct-leak
Change-Id: Id94586cc659a5e504c727c570dc9fc60c85c8820
2017-11-29 20:49:35 +00:00
Caolán McNamara 0c4b1eae34 keep track of available data
Change-Id: Idc54cdef0f3a4355a7e26f25cdc5b50d65d9d583
Reviewed-on: https://gerrit.libreoffice.org/45351
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-27 17:37:46 +01:00
Caolán McNamara 2a7fa39bc1 fix attempt to save and rethrow exception
Change-Id: Idff6ffef536d87d85f1092b3316d65da83527711
Reviewed-on: https://gerrit.libreoffice.org/45229
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-24 20:56:44 +01:00
Noel Grandin 3dde9d988f loplugin:constparams in various(1)
Change-Id: Ic80ca59abc3e104c7adf0c1eff1d16addf48bc8b
Reviewed-on: https://gerrit.libreoffice.org/44261
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-04 07:50:01 +01:00
Stephan Bergmann 14d9b07fb5 -Werror,-Wunused-private-field
Change-Id: I4ba10f68cf87315a9a3f6970338b8d9f6ac7a62c
2017-11-01 10:34:37 +01:00
Noel Grandin ee1d6af9b7 loplugin:finalclasses in package
Change-Id: I020ea1f3bea5c3deab05b9a2154102548c7622cf
Reviewed-on: https://gerrit.libreoffice.org/44132
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-01 07:14:39 +01:00
Stephan Bergmann a50d42929a loplugin:includeform: package
Change-Id: I64200b2d03d579c5c83d1ec0cc8aaa839edaa7ed
2017-10-23 22:45:59 +02:00
Noel Grandin 87a9979c89 overload std::hash for OUString and OString
no need to explicitly specify it anymore

Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec
Reviewed-on: https://gerrit.libreoffice.org/43567
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23 08:15:35 +02:00
Caolán McNamara e26f8d2592 coverity#1401307 document checked 'Uncaught exception'
markup std::unique_ptr where coverity warns a dtor might throw exceptions which
won't throw in practice, or where std::terminate is an acceptable response if
they do

Change-Id: Icc99cdecf8d8b011e599574f0a05b59efd1c65c2
Reviewed-on: https://gerrit.libreoffice.org/41561
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-21 10:36:39 +02:00
Julien Nabet c95221f151 Replace list by vector InputStreamsList_Impl (package)
Change-Id: I4f03ddff09b8b7bb92dd1a9d2aeec279835c81b4
Reviewed-on: https://gerrit.libreoffice.org/43294
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-10 22:08:27 +02:00
Noel Grandin 2c05d758b2 add << operator for css::uno::Exception
Change-Id: Ia23dafd07133779144965682df3b7125a3214235
Reviewed-on: https://gerrit.libreoffice.org/43046
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-10-04 15:18:00 +02:00
Noel Grandin d3971ec256 new loplugin:blockblock
Change-Id: I7b68b70fa4c7234e8882f7627026959a596968fd
Reviewed-on: https://gerrit.libreoffice.org/43025
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-03 08:41:11 +02:00