Commit Graph
623 Commits
Author SHA1 Message Date
Julien Nabet 7260cd5381 Use for-range loop in include/comphelper
Change-Id: I9b8a7e873eef56c704fa6c09d37d51a0ea913a92
Reviewed-on: https://gerrit.libreoffice.org/52075
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-29 20:33:24 +02:00
Tor Lillqvist ea23987d9a Mask away the extra bits from vt before switching
Change-Id: Ie05fd6c9e6b47c4aae9410833aae9bd5ba23ff40
2018-03-26 19:56:33 +03:00
Arnaud Versini dd5df4ccb3 accessibility: simplify OCommonAccessibleText
Change-Id: Ied5520179d15f0a854c16b14f5a5e6b84cef1300
Reviewed-on: https://gerrit.libreoffice.org/51514
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
2018-03-25 12:57:21 +02:00
Tor Lillqvist 9c7f19a6a3 Fix copy-paste error
Change-Id: I01b20482aefadb1a755cc1d2f5705b2f7f7cf739
2018-03-25 12:55:37 +03:00
Tor Lillqvist 584063ccaa Add BSTR handling
Change-Id: I89fcb37a5848120d5a3b2d73d40384c18d6cc069
2018-03-19 20:34:58 +02:00
Michael Meeks 25e4b59b2e First cut at annotating 'exotic' filters.
The idea being that we can improve security by warning for these.

Change-Id: I7d993417bfb6a8fe868bc3e07ccbcfe71bf285ff
Reviewed-on: https://gerrit.libreoffice.org/50387
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2018-03-16 21:33:50 +01:00
Tor Lillqvist 4fa902d1c1 Add IMarshal2 to IIDs recognized
Change-Id: Ib5a1da6666ff3a136c05374f10b7ca138c14492d
2018-03-14 14:02:07 +02: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 7960ccb41d loplugin:constantparam in canvas..comphelper
Change-Id: Ia666cb46c409852a13789389c032f0ce4377c0d5
Reviewed-on: https://gerrit.libreoffice.org/50927
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-08 10:34:50 +01:00
Noel Grandin bb7ade140d loplugin:unusedmethods
Change-Id: Id6b4edd265cb6bef31c72e2a0a440211d51c7c33
Reviewed-on: https://gerrit.libreoffice.org/50900
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-08 08:44:32 +01:00
Andrea Gelmini 240e67e37e Fix typos
Change-Id: I005023337dbe593e0ac1d76f7b10848d24f314a5
Reviewed-on: https://gerrit.libreoffice.org/50785
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-03-06 09:42:04 +01:00
Eike Rathke 94fa259e76 Introduce DocPasswordHelper::GetOoxHashAsVector() with salt value vector
In preparation to use this in AgileEngine.

Change-Id: I45fb6ba24b759a72af0c7afa22eae75f1ae728ce
2018-02-26 22:03:42 +01:00
Eike Rathke 5a1fabb996 Introduce enum comphelper::Hash::IterCount instead of bool
Clarifies intention, and with IterCount::NONE prepared to handle
something like old PBKDF1, if anything actually used that. See
https://tools.ietf.org/html/rfc8018#section-5.1 where iteration
count is not part of the re-hash.

Change-Id: I5f97ca7a91f611eced8ced0a0c64961c04535d36
2018-02-26 20:06:56 +01:00
Eike Rathke 238c6a45e0 Remove LittleEndian constraint, will handle that in calculateHash()
Change-Id: I2534f3fa75484a2bb5f0c3d4bee3fca4f843095f
2018-02-26 13:34:24 +01:00
Eike Rathke 530465964a Prepare to handle OOXML Agile Encryption password hash as well
... that prepends the iteration count to the hash instead of
appending it

Change-Id: I090393e6337c110029e35baaa259b40ef4e5d416
2018-02-26 13:19:12 +01:00
Eike Rathke 384954795c Move convenience abstractions to DocPasswordHelper, tdf#104250 follow-up
Change-Id: If0775ccf14b631918e51342a767412948e812c87
2018-02-26 12:15:17 +01:00
Stephan Bergmann fa2a43c290 EventHolder used in dynamic_cast should better be SAL_DLLPUBLIC_RTTI
...so that the dynamic_cast is guaranteed to work on macOS (where RTTI
equivalence is determined by address, not by strcmp).  The relevant dynamic_castis in DocumentEventNotifier_Impl::processEvent in
dbaccess/source/core/dataaccess/documenteventnotifier.cxx, and at least during a
`make check` it appears to only be fed dbaccess::DocumentEventHolder (aka
comphelper::EventHolder<css::document::DocumentEvent>) instances also created in
documenteventnotifier.cxx (so the dynamic_cast happens to work fine also on
macOS in that case).  But better be conservative and mark EventHodler as
SAL_DLLPUBLIC_RTTI after all.

Change-Id: I99c842418d3f51265d96b8deb0dfc6c7a1540be5
Reviewed-on: https://gerrit.libreoffice.org/50258
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-02-24 15:15:54 +01:00
Eike Rathke 89182507aa Hash Base64, Sequence and cleansing, tdf#104250 prep
Change-Id: I58d48b8caa780138b8431bec9db20c9d0e9abce7
2018-02-24 11:47:09 +01:00
Eike Rathke 556c2eaffc Implement OOXML password hashing algorithm, tdf#104250 prep
As per https://msdn.microsoft.com/en-us/library/dd920692

Change-Id: Iebacaf3549dab28fd3033f9c241130fd66782b25
Reviewed-on: https://gerrit.libreoffice.org/50259
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
2018-02-24 11:28:54 +01:00
Stephan Bergmann 6e0f60fa4a Add wrongly formatted file to blacklist
Change-Id: Ia9ec032eb40e4152e881b466311f7e34c845addc
2018-02-22 08:36:23 +01:00
Tor Lillqvist 515885f39e Manually recognize some IIDs that don't have cleartext names in the Registry
Change-Id: I9deadfdd324f9b9014fef8370593e107302ed843
2018-02-21 23:27:01 +02:00
Tor Lillqvist 032c49b986 Do what the TODO said
Change-Id: I6358b550482188c6fdaf0cd01af353850d12138b
2018-02-15 15:44:44 +02:00
Tor Lillqvist 1647bfa019 Apply clang-format
Change-Id: I089cdb8c770df5e8c99d55870061a18645b2cd05
2018-02-15 14:17:35 +02:00
Tor Lillqvist d1416444e5 Add debug output operator for VARIANT
Change-Id: I3994f0444b2f415e55645f890a84e42e66512d03
2018-02-15 14:17:35 +02:00
Tor Lillqvist 09cb65bb92 Make this work also outside LibreOffice code (for test programs)
If LIBO_INTERNAL_ONLY is not defined, just include <windows.h>
directly. Don't use OUStrings.

Change-Id: I9ddaab6029c5198538c47b623457f4ff2089e3f6
2018-02-15 12:21:08 +02:00
Tor Lillqvist ceb082c94f Add debug output operator for IID
This file is the place for future similar additions.

Change-Id: Ibe168731ed97fe2366afb89409fe5ae2afa711e4
2018-02-08 12:54:11 +02:00
Noel Grandin f38e35338e clean up some include guard terminators
found with
   git grep -n -A10 '#endif // INCLUDED' | grep -v endif | grep -v vim |
grep -v -- '--'

Change-Id: I7ae67cd7c1313e76f059fb8e6afb723caca8a6d7
Reviewed-on: https://gerrit.libreoffice.org/49244
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-06 07:38:58 +01:00
Manuj Vashist 68d9583db4 tdf#108523 Removed @author annotations.
Change-Id: I6a60128c413beab6cabb857c073607e15ddbc98f
Reviewed-on: https://gerrit.libreoffice.org/49215
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-02-05 11:19:23 +01:00
Noel Grandin ae5f89fdcc split out SFX_METRIC_ITEM into separate field
instead of overloading the nMemberId field
and thus fix various places that were effectively setting the METRIC
flag and causing a warning in SvxUnoConvertToMM

And fix bug in
    sw/source/core/unocore/unomap.cxx
where the PropertyAttribute::READONLY was in the wrong place,
ever since
    commit 84a3db80b4
    Date:   Mon Sep 18 23:08:29 2000 +0000
    initial import

Change-Id: Ifc2bf56709f19aea75300b2fda62ce551efc26af
Reviewed-on: https://gerrit.libreoffice.org/48950
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-01 12:34:37 +01:00
Jan Holesovsky 3a68b21c21 lok: Allow whitelisting languages that should be used by LibreOfficeKit.
LOK may get way too many languages if there are dictionaries for them
installed which blows the pre-init to >2G easily; let's allow limiting that.

Also make the preloading of languages work with the internal spell checking
dictionaries and thesauri.

Change-Id: I77119970030a7386a5cccbe4fdc89b15eab56ef1
Reviewed-on: https://gerrit.libreoffice.org/48720
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-01-27 11:04:32 +01:00
Andrea Gelmini 72c68a3d17 Fix typos
Change-Id: I914ac70f39028caebafb874e871f11017fda7795
Reviewed-on: https://gerrit.libreoffice.org/48682
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-01-27 08:45:03 +01:00
Noel Grandin 0f28c8612f loplugin:unused-returns in basegfx..cppcanvas
Change-Id: I32dc8c92871c8349651d2f4204a332d387e6e1b2
Reviewed-on: https://gerrit.libreoffice.org/48428
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-25 13:51:24 +01:00
Michael Stahl 6339072a56 comphelper: put some include guards around stark naked header
Change-Id: I407dc215ea6948518d0d744c73ff2de717063962
2018-01-16 22:35:14 +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
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
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 b088da2a7a More loplugin:cstylecast: comphelper
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: I71a5092b344f206f2c7de606f2739d3b6e2cf0bb
2018-01-12 20:27:56 +01:00
Noel Grandin 21e0d8162a loplugin:unusedfields
fix the ReturnStmt check

Change-Id: I95076076bd1313d23798c4615ea12910c86ed9a8
Reviewed-on: https://gerrit.libreoffice.org/47309
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-04 07:17:23 +01:00
Andrea Gelmini e4404de895 Fix typos
Change-Id: I361b5283b092171eaaaf46fa3c1fb13faa53bd7a
Reviewed-on: https://gerrit.libreoffice.org/46821
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-20 10:43:47 +01:00
Mike Kaganski a784ac2daf loplugin:unusedindex
Change-Id: I80c0a8dbfda14e54fcfaf33a241c83bad8495db1
Reviewed-on: https://gerrit.libreoffice.org/46833
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-12-20 08:34:51 +01:00
Jan Holesovsky e16852cd1b lokdialog: Allow windows / dialogs in different languages.
Change-Id: I9f32161981aed73e6d97696e5f976af276d1625a
Reviewed-on: https://gerrit.libreoffice.org/46327
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/46775
Tested-by: Jenkins <ci@libreoffice.org>
2017-12-19 17:23:01 +01:00
Noel Grandin a5be07d6b6 inline use-once typedefs
Change-Id: I5c3ffc03c26b3428f1f336e6ecba7838a1cf1157
Reviewed-on: https://gerrit.libreoffice.org/46764
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-19 11:57:57 +01:00
Marco Cecchetti 2c79d99858 lok: calc: LOK_FEATURE_RANGE_HEADERS
For allowing the client to enable/disable the new range based header
data

Change-Id: I95da8ec3e48137fb75b9b22af3bb1296001ba9ca
Reviewed-on: https://gerrit.libreoffice.org/46095
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
(cherry picked from commit 069cf9321be51e7203e336e0e87d8ba7dc9b729e)
Reviewed-on: https://gerrit.libreoffice.org/46570
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2017-12-15 18:20:36 +01:00
Samuel Mehrbrodt c85d8064cb Move generateGUIDString to comphelper
and remove duplicate method

Change-Id: Ic513a780f3b9b526c3abd0f273ad9c230ffbb373
Reviewed-on: https://gerrit.libreoffice.org/46233
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-12-12 08:46:34 +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
Noel Grandin dd0dceb511 loplugin:salcall handle static methods
Change-Id: Id6820abec4b8ca8bee26d62b333fd30b42a14aec
Reviewed-on: https://gerrit.libreoffice.org/46007
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-07 11:25:55 +01:00
Noel Grandin f7a57f3a1b loplugin:countusersofdefaultparams in comphelper
Change-Id: Idb704adbe78a42bf2f2aaf7f6110698d5559e836
Reviewed-on: https://gerrit.libreoffice.org/45936
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-07 07:19:46 +01:00
Caolán McNamara e6928ce494 coverity#1401328 Uncaught exception
Change-Id: I358b3c410bc7871c7184da4959b24b9f52b4a4d7
Reviewed-on: https://gerrit.libreoffice.org/45892
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-06 09:55:34 +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
Samuel Mehrbrodt 32efde5cef tdf#113696 Add mimetype to image element
Otherwise browsers don't recognize base64 encoded svg files.

Change-Id: I54d0b87c52a1ca9da1d820751ae32159b88ed28f
Reviewed-on: https://gerrit.libreoffice.org/45528
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-11-30 17:42:42 +01:00