Commit Graph

329 Commits

Author SHA1 Message Date
1fc2fe74f2 loplugin:nullptr (automatic rewrite)
Change-Id: I1e5338558bc57afe51db57655550e9b7246f7214
2015-11-10 10:31:33 +01:00
912c034453 Don't check version field from local ZIP header
Our current Maven based Java toolchain produces JARs, which
have a different "version needed to extract" in the ZIP local
and central directory header.

I had a look at 7zip and unzip and they already ignore the version
but compare other data LO already ignores - sig. The "standard"
document from PKWARE doesn't help.

So just compare the file path and calculate the data offset and
otherwise ignore all (duplicated) information from the local index
and rely on a correct central directory entry. Various programs
produce(d) "broken" ZIP files; even LO at some point (see git log).

Change-Id: I8d63abb0d49a1087c7654f401b62355c147c3118
Reviewed-on: https://gerrit.libreoffice.org/19779
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2015-11-05 16:00:58 +00:00
5ced1a6e42 use uno::Reference::set method instead of assignment
Change-Id: I1c7240fe2e2b5eb825f028ca7502e5ba8793046b
2015-11-04 14:42:23 +02:00
8d80b5be02 com::sun::star->css in package,pyuno
Change-Id: I7b7b0e7fea2d1a2b9f6f5501ad5e0b8c1b4a17b9
2015-10-23 15:14:45 +02:00
b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
5ba6aafa20 package: tdf#88206 replace cppu::WeakImplHelper* etc.
with the variadic variants.

Change-Id: If88e1d741075e86997c91dc2c59eeebe45f67c1f
Reviewed-on: https://gerrit.libreoffice.org/17980
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-26 06:35:34 +00:00
ef698035aa Related: tdf#88314 delete temp files
clear to close the inputstream before attempting to delete the temp file, which
is plausible as the windows-specific failure in earlier attempts at this

Change-Id: I751aa3a098dd960f56b77a5f5fc93783c1060556
Reviewed-on: https://gerrit.libreoffice.org/17531
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-07 07:53:18 +00:00
458bf08125 Resolves: tdf#88314 close temp file after each thread completed
Change-Id: Ic2eec30cfb5f61c53777eefeeb8bad6f552da2fc
Reviewed-on: https://gerrit.libreoffice.org/17355
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-05 22:15:54 +00:00
33a21d37f3 Revert "Resolves: tdf#88314 close temp file after each thread completes"
This reverts commit 738cf411e9315d17c7eb8be47ded643a00dfe5c5.

It brokes windows in https://gerrit.libreoffice.org/#/c/17289/
as per http://ci.libreoffice.org/job/lo_gerrit_master/4465/Gerrit=Gerrit,Platform=Windows/

was pushed despite that.. :-(
2015-07-26 00:23:50 -05:00
738cf411e9 Resolves: tdf#88314 close temp file after each thread completes
and reopen them when we need their data.

That way we don't have as many open files as substreams in the
package, so we don't run out of file handles

Change-Id: Ic124e275abf15f4578c77ee271d185f40cb844b1
Reviewed-on: https://gerrit.libreoffice.org/17289
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-07-24 13:24:55 +00:00
a792aa2c48 loplugin:unusedmethods toolkit,package
Change-Id: I83618cd2fd12fb0c1691dc7255fc7192e68649cd
Reviewed-on: https://gerrit.libreoffice.org/17031
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-14 09:28:14 +00:00
e546ed01e6 loplugin:unusedmethods package
Change-Id: I19d6bbb9288d72b99d1023b4983b1c3fff7570e8
Reviewed-on: https://gerrit.libreoffice.org/16811
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-07 11:01:11 +00:00
371200675c drop yet another reimplementation of rtl::Reference (SotMutexHolderRef)
Change-Id: I57f9dff931242405420bd45fae7ec5f13718707f
2015-06-29 09:16:18 +02:00
05661623c7 uncaught exceptions in parallel deflate threads on re-export of HTB23106 odgs
Change-Id: Ib6aef478b8dcf1c7a7262ab60eef4d44da0de632
2015-06-05 11:46:47 +01:00
0a48e0fb4e loplugin:simplifybool
Change-Id: Ia4177cf1a4b0c06ef614b54298fd6f9224956afc
2015-04-24 12:36:25 +02:00
2240118177 Improved loplugin:literaltoboolconversion looking into cond. exprs.
...automatic rewriter fixes

Change-Id: I6b04ca80f08f8a71ff94e309fd52f44d736751ee
2015-04-23 18:39:07 +02:00
71b809959b remove unnecessary use of void in function declarations
ie.
    void f(void);
becomes
    void f();

I used the following command to make the changes:

  git grep -lP '\(\s*void\s*\)' -- *.cxx \
    | xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;'

and ran it for both .cxx and .hxx files.

Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd
2015-04-15 11:47:12 +02:00
b857703113 const_cast: convert some C-style casts and remove some redundant ones
Change-Id: I313d61fc6e7be3a5513da83d3de9202237306739
2015-03-26 15:33:33 +01:00
858e455634 loplugin:constantfunction: various
Change-Id: I6eddda9f4b31c7ce413c328b6a857a81bd222eed
2015-03-24 10:51:22 +02:00
00173d8c3a Some more loplugin:cstylecast: package
Change-Id: Icf7351082cf63aeb70ec47a8562a89d452ae9d8e
2015-01-20 09:06:50 +01:00
238ce4af68 remove unnecessary casts
leftovers from conversion of SvStream operator>> to Write methods

Change-Id: Id1d1e60ae42afb689910845a3c6ec75e3388fb56
2015-01-15 13:32:15 +02:00
5484475fc1 include algorithm
Change-Id: I55abf17a1da2616ca2b1303747ca8cc7e402634e
2015-01-02 17:03:55 +00:00
65e7851444 include algorithm
Change-Id: Icd44b7c128bf72236206d7c753a9ef986f50dad2
2015-01-02 16:44:34 +00:00
f92183833f package: Better to use temporary files for huge memory zip streams
ZipPackageBuffer was holding the whole compressed data stream in one
uno::Sequence which seems to be a lot for big documents in some cases.

Change-Id: Ib10d00ac54df9674231f4bbf047fab7e9b0a7d45
2014-12-14 00:21:20 +01:00
43eca2d9f8 package: Create memory buffer only when we need it - if we use parallelism
Otherwise write directly to the resulting zip file.

Change-Id: I75097969f0cccf0b45da591c71221e5ae18668cb
2014-12-14 00:21:18 +01:00
2c2e80da68 callcatcher: remove newly unused code
and rework reads to just return the read value

Change-Id: I5d2f01064465c65859ec4ba031ec9dfa16403487
2014-12-12 11:49:03 +00:00
70d4989c27 remove operator>> methods
in favour of ReadXXX methods.

Change-Id: I242b92da7dbcafe22aef69dc7348ac58dadc9241
2014-12-11 14:57:34 +02:00
0674dd36b6 coverity#1242675 Untrusted value as argument
Change-Id: Id1f1ff8de23b041742d2a8286b78312529f6566e
2014-11-21 11:55:12 +00:00
319524767e coverity#1242675 Untrusted value as argument
Change-Id: I1d8f32095f297919dc3ccab51093295f8c31707d
2014-11-19 11:01:07 +00:00
6a0fe37dec sal: clean up public headers with include-what-you-use
Sadly cannot forward declare "struct {...} TimeValue;".

rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h
was painful enough for now...

Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05
2014-11-17 11:06:53 +01:00
7088166a67 Simplify input parameters to just take the sequence
Change-Id: Ic2538ca8b0f7261064e1dfbf3884dd452003c797
2014-11-17 10:49:23 +01:00
fbf714b456 package: Finally implement parallel zip entries deflating
For that:
1, create ZipPackageStream::successfullyWritten to be called after
the content is written
2, Do not take mutex when reading from WrapStreamForShare - threads should
be using different streams anyway, but there is only one common mutex. :-/

Change-Id: I90303e49206b19454dd4141e24cc8be29c433045
2014-11-17 10:49:23 +01:00
db5552631b package: Call writeLOC always after putNextEntry explicitly
Preparation step to parallel deflating.
Rename putNextEntry to setEntry and make it a static function.
We need to call setEntry before starting thread but writeLOC after.

Change-Id: I99a9ffa7dc4c18b47c621847b48bf8469bfb789a
2014-11-17 10:49:22 +01:00
30f80f12fb package: Do not use hacky bit 1<<4 in ZipEntry::nFlag
Change-Id: I504f5c0c9aa9b655ffb53d9820a33677dad6aa08
2014-11-17 10:49:22 +01:00
ef8e7eabe1 There is no XZipOutputEntry interface
Change-Id: Ib8fa3351ba25416a13d6c8bf63bd5fc8e43703c5
2014-11-17 10:49:22 +01:00
3e3b8483d7 package: Use memory stream for compressing zip entries
Change-Id: Ibf81dc3cd8a9a9da3dfd6ee6e587a522c4d56a44
2014-11-17 10:49:21 +01:00
3e7ab1ac1d ZipOutputEntry: m_pCurrentEntry is always set
Change-Id: Ib6a69a83f4a378df838b2231b9eba7fba49cd9f1
2014-11-17 10:49:21 +01:00
4d1cb2dc5f package: Zipping STORED entry is the same as rawWrite and we don't encrypt it
Change-Id: Ie3f8ac261a70c9a2b5182fc7d36938d0a46ec045
2014-11-17 10:49:21 +01:00
2d92a84a6a package: Move most ZipOutputEntry's methods back to ZipOutputStream
We want to use ZipOutputEntry only for deflating (and maybe rename it).
ca13a9377e4a36436e4c82bb33648d0f3b6db6f5 was not a good idea because the
data still needs to be written sequentially anyway. Otherwise it's hard
to get offset positions of individual entries right.

Since this commit rawCloseEntry needs to be called always; also when we
use write&closeEntry because we don't call writeEXT in closeEntry
anymore.
Need to rename and add comments later.

Change-Id: I03bd48ca6e108e6253a77a137746165909ca3c3d
2014-11-17 10:49:20 +01:00
3a8bddc18e package: Add ZipOutputEntry to isolate deflating of streams.
Preparation commit for deflating streams in parallel.
We still use the same single XOutputStream (ByteChucker :-) for
sequential writing but this can now be changed more easily.

Change-Id: Idf26cc2187461660e31ac2e12c4708e761596fb2
2014-10-23 14:30:30 +02:00
87cb3a7c96 unusedcode: Remove Deflater::setLevel
Which makes bSetParams always false; remove that too, together with nLevel.

Change-Id: I94a4ec14b2b2c498d749ef72c1b6b118bba37076
2014-10-22 16:03:20 +02:00
ae0756d826 ZipOutputStream: No need to explicitly set default values
Change-Id: Ia3a20e0692e658d847e1b825fc97e32ac8a1854b
2014-10-10 13:50:04 +02:00
04ebf43708 package: ZipOutputStream: prefix members
Change-Id: I9cc21ba87484560ec0db5424800dd67f80e00540
2014-10-10 13:50:03 +02:00
9bac4d413e typo: more then -> more than
Change-Id: I2e477d66f25bde7256938ccb1f95ab26add24922
2014-08-01 23:40:12 +09:00
184a00b962 loplugin: inlinesimplememberfunctions
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-09 10:10:13 +02:00
7e4c6e1ff1 remove unnecessary linefeeds from the end of exception messages
Change-Id: Id1d7971639b2496dbe0274423ff4150d9295e8d6
2014-05-29 09:01:39 +02:00
e7bc3cab01 remove boilerplate in UNO Exception constructor calls
Now that we have default values for Exception constructor params,
remove lots of boilerplate code.

Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74
2014-05-23 15:06:00 +02:00
3c1e30b77d Correct common misspellings, and remove some ASCII art along the way.
Change-Id: I42787db31769e8bde984c5f4f0aa90335e889b1c
Reviewed-on: https://gerrit.libreoffice.org/9356
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
2014-05-17 12:38:38 +00:00
8c004aa108 cid#982783 Unintentional integer overflow
Change-Id: Ida52d1fbe3d84c9c0070c91ae24cae58dc4aa13f
2014-05-14 09:49:08 +02:00
5df6dcf747 package: sal_Bool->bool
Change-Id: I05dd5070d0618ef7539b26c7edcaf01b0a84732c
2014-04-22 09:53:14 +02:00