Commit Graph

25 Commits

Author SHA1 Message Date
184a00b962 loplugin: inlinesimplememberfunctions
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-09 10:10:13 +02:00
8f97326bdd So ZCodec::ReadAsynchron was wrong in using a persistent mpIStm after all
The fun thing is that with the (only) call-site to ReadAsynchron in
PNGReaderImpl::ImplReadIDAT (vcl/source/gdi/pngread.cxx) passing in rIStm
references to stack-allocated SvMemoryStream instances, mpIStm could point to an
old, destroyed instance from a previous call, but which would have been located
at exactly the same stack address as the currently passed in rIStm, so the wrong
mpIStm->Read call would effectively behaved exactly the same as a correct
rIStm.Read call.

This went unnoticed "since the beginning" until AddressSanitizer's
UseAfterReturn check came along...

Change-Id: I7c75ed2d36a4c24c111d88eff647816bd2c5dbca
2014-05-21 18:29:57 +02:00
c5a603ce24 ZCodec::mpIStm is apparently(?) effectively only used by ReadAsynchron
...(which can be called multiple times in a row).  But which actually looks
wrong...

Change-Id: I2e4914e6fed8ced383e430699dd462add9da8c08
2014-05-21 18:29:57 +02:00
66351a678e Split ZCodec::ImplInitBuf into InitCompress, InitDecompress
Change-Id: I2714b1f1dadc74f8501203bc8b0722c56c9c5fb9
2014-05-21 17:35:56 +02:00
1c92fbf4fd Replace ZCodec::mbInit with sane enum
...and document how the member functions are supposed to be called from client
code.

Change-Id: Ia4847945e4a361c43a0ed001e3e78e901c9abcad
2014-05-21 17:03:41 +02:00
4d2113250f ZCodec::UpdateCRC is private
Change-Id: I2103f8a323d0454bdd1c779aadb99889ae1cf6e5
2014-05-21 15:30:18 +02:00
b928cfb512 Remove unused ZCodec::IsFinished
Change-Id: I9741daf288c11dc8e0f0ad2f64e934e814c3ef8a
2014-05-21 15:30:18 +02:00
47169087c1 Remove unnecessary GZCodec derivation
Change-Id: Id710a1fe4a3c1593add69bb2a7014d26f9499e87
2014-05-21 15:30:16 +02:00
a1ec916df8 Remove unused ZCODEC_BEST_SPEED, ZCODEC_BEST_COMPRESSION macros
Change-Id: Ibdf211b858c25a4b301cbde3dcab3a51765e4050
2014-05-21 15:30:16 +02:00
200d530f47 Split ZCodec::BeginCompression param into its 3 independent components
Change-Id: I275abafe81c8bb617c70646244b14f6cecc33854
2014-05-21 15:30:16 +02:00
e05a200249 Remove unnecessary ZCODEC_DEFAULT macro
Change-Id: I57a5a14a51c0441e0fed006457ac95057f188462
2014-05-21 15:30:15 +02:00
201d429ad0 Remove unnecessary ZCODEC_DEFAULT_STRATEGY macro
...and directly use zlib.h's Z_DEFAULT_STRATEGY

Change-Id: Ibf528cbc32afec4d442656aa2963f50c0875d6a5
2014-05-21 15:30:15 +02:00
a34d0fb56f Remove unused ZCODEC_ZFILTERED, ZCODEC_ZHUFFMAN_ONLY macros
Change-Id: Ie02fb495beebd02d8331e547cbe6648dc70f241f
2014-05-21 15:30:14 +02:00
b2e5b0ec14 Remove unnecessary DEFAULT_IN/OUT_BUFSIZE macros
Change-Id: Icd509f55b3f91c4ce3b21bfa3a501d99532539d9
2014-05-21 15:30:14 +02:00
5271e5b01b nMemUsage is always MAX_MEM_USAGE
...so just use zlib.h's MAX_MEM_LEVEL directly.

Change-Id: I76d73f665df242bfb180b76aa7054cf8ddbe9e67
2014-05-21 15:30:14 +02:00
fe1e1d1292 A single ZCodec ctor suffices
Change-Id: Ib831b80afcdde98928a2759616810923348f65e8
2014-05-21 15:30:13 +02:00
faac2327e9 Clean-up C-style (void) parameter lists
Change-Id: I41da8920e33dfdd0f1483ea2d7cf67111224b441
2014-05-21 15:30:13 +02:00
362d4f0cd4 Explicitly mark overriding destructors as "virtual"
It appears that the C++ standard allows overriding destructors to be marked
"override," but at least some MSVC versions complain about it, so at least make
sure such destructors are explicitly marked "virtual."

Change-Id: I0e1cafa7584fd16ebdce61f569eae2373a71b0a1
2014-04-01 19:22:54 +02:00
70cc2b191b First batch of adding SAL_OVERRRIDE to overriding function declarations
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.

Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-03-26 16:39:26 +01:00
409727fa65 fdo#63154 Remove unused solar.h reference in tools
Change-Id: Icd21bbc91ae3587140fe8b0982fc8223fed0903b
Reviewed-on: https://gerrit.libreoffice.org/8505
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-03-09 11:25:45 -05:00
3db6d2cb99 GCC 4.9, LTO: libvcl uses GZCodec but it is not linked with the implementation
This is not valid C++ and GCC now resolves the virtual calls and inlines
destructor that leads to undefined symbols.

Change-Id: I841d25bc6f994f0e73665b174994f9471597131e
2014-02-18 19:57:31 +01:00
b43343b0e7 fdo#65108 inter-module includes <> include/tools
Change-Id: I5f44f041e465230d10d562e8bd6f141848465e07
2013-11-09 18:48:48 -06:00
4e0670b763 fixincludeguards.sh: include/{toolkit,tools}
Change-Id: I5572c320431222be2405f8c2dc8adeafe4f3828b
2013-10-23 23:22:29 +02:00
710f41b7ae Clean String and sal_Bool in tools
Change-Id: I6a92196f33d7a5278c7dcc426112e9c56d582655
Reviewed-on: https://gerrit.libreoffice.org/4627
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2013-06-30 04:58:49 +00:00
b9337e22ce execute move of global headers
see https://gerrit.libreoffice.org/#/c/3367/
and Change-Id: I00c96fa77d04b33a6f8c8cd3490dfcd9bdc9e84a for details

Change-Id: I199a75bc4042af20817265d5ef85b1134a96ff5a
2013-04-23 22:20:31 +02:00