summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/pngread.cxx
AgeCommit message (Collapse)Author
2017-07-10loplugin:useuniqueptr in vclNoel Grandin
Change-Id: Ieece2f9728755a8ae91275535eaa39319eea274e Reviewed-on: https://gerrit.libreoffice.org/39740 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06teach unnecessaryparen plugin about other kinds of statementsNoel Grandin
i.e. do / while / switch Change-Id: Id0985015cc425557f9984734701d56466f8a6088 Reviewed-on: https://gerrit.libreoffice.org/39601 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-17loplugin:unusedfields in vcl part2Noel Grandin
Change-Id: Icd02f63e9738c0bb91348e2084649f9edc281e67 Reviewed-on: https://gerrit.libreoffice.org/38833 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-07revert OSL_ASSERT changesChris Sherlock
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07tdf#43157: convert most of vcl codebase away from OSL_ASSERT to assertChris Sherlock
Change-Id: Ifaae7af7169fe6c24d152f8aba51ba3ff3bdb9f8
2017-04-25clang-tidy readability-simplify-boolean-expr in vclNoel Grandin
Change-Id: I10ad38bcb5b05a754de9a396f4aaa79d97458d6f Reviewed-on: https://gerrit.libreoffice.org/36930 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-07loplugin:redundantcast find cstyle arithmetic castsNoel Grandin
Change-Id: If7c259f0d12a41182f476ddb558f7cb5f76f9577 Reviewed-on: https://gerrit.libreoffice.org/36253 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-25Fix typosAndrea Gelmini
Change-Id: I623135cd4c76dd6569f4ee521f97dee41de4cb1e Reviewed-on: https://gerrit.libreoffice.org/35660 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-23loplugins:redundantcast teach it about c-style typedef castsNoel Grandin
Change-Id: I1ac11a2481c0f4d8be1e1fd7c7637ac0ece3d65c Reviewed-on: https://gerrit.libreoffice.org/35558 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-16ofz#882: test available len against max possible compressionCaolán McNamara
Change-Id: I19867b74d860f379eae17916cc7f6415e6d20074
2017-03-09ofz#574 sanitize png palette indexesCaolán McNamara
Change-Id: I006ffdf5c8c751e7e07b133716022e2a9b154478 Reviewed-on: https://gerrit.libreoffice.org/34034 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-09fix indentCaolán McNamara
Change-Id: I00c3273754d24c933a284738efc6d8408c1e13a3
2017-03-08loplugin:loopvartoosmallStephan Bergmann
Change-Id: Ie173849c0956edf9fd111120fa4bdfb2930ab69f
2017-02-08clarify we're not setting a pal index in the maskCaolán McNamara
no logic changed intended, SetPixelIndex expands to this, just want to clarify that this is an alpha value, not an index into a palette Change-Id: Ie9bb188b116adf3eab4e2bb1d6da8badbaead88b
2017-01-10ofz#395 leak in Bitmap::AcquireWriteAccessCaolán McNamara
Change-Id: Id67f0b8e82e0730eb35a14a6080bfa5b15d365c8
2017-01-10BitmapWriteAccess* -> Bitmap::ScopedWriteAccessCaolán McNamara
Change-Id: I5b3980d8eecc61a6f63aa64a1b05c30afa2f57f7
2016-12-15teach sallogareas plugin to catch inconsistenciesNoel Grandin
Change-Id: I8bcea5ffc74d48148bea78da8c17744e288c069a Reviewed-on: https://gerrit.libreoffice.org/32004 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-06OSL_TRACE -> SAL_ in vclNoel Grandin
Change-Id: Icd317671a6b1b5356f0ccc7c59d50952fe20269b Reviewed-on: https://gerrit.libreoffice.org/31667 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-30Use smart pointers for gdi pdf functionsMark Page
Change-Id: Ia78adfbd0d07449e12a7e0d02acf8a1a1108437c Reviewed-on: https://gerrit.libreoffice.org/31421 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-10-05convert MapUnit to scoped enumNoel Grandin
I left a prefix on the names "Map" so that I would not have to re-arrange each name too much, since I can't start identifiers with digits like "100thMM" And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore. Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224 Reviewed-on: https://gerrit.libreoffice.org/29096 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-15replace sal_Size with std::size_t (or sal_uInt64 for SvStream pos)Michael Stahl
... except in include/rtl, include/sal, include/uno, where sal_Size is retained for compatibility, and where callers of rtl functions pass in pointers that are incompatible on MSVC. Change-Id: I8344453780689f5120ba0870e44965b6d292450c
2016-06-22crashtesting: fix tdf95481-1.odg reexport to odg failureCaolán McNamara
revealed since commit 81e3ca4f60e6ac0823c1233841c22a759cfe937f Author: Tor Lillqvist <tml@collabora.com> Date: Tue Jun 21 10:34:21 2016 +0300 Use real assert() instead of DBG_ASSERT() sanitize invalid palette entry indexes at the outer perimeter on initial load to try and avoid having to do it in all sort of places in the interior. png spec says that the palette has to appear before the first IDAT so we should always know the palette size here Change-Id: I6e04223adce1c88d037f9cf34862e6f54e381bb0
2016-06-06tools: rename SvStream::Read/Write to ReadBytes/WriteBytesMichael Stahl
Change-Id: Ib788a30d413436aa03f813aa2fddcbc4d6cd2f9a Reviewed-on: https://gerrit.libreoffice.org/25972 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-05-25Convert BMP_FORMAT to scoped enumNoel Grandin
Change-Id: I751ab762b6e6f961e9e73a8a2ca92a3f5a5eb1c8 Reviewed-on: https://gerrit.libreoffice.org/25189 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-10Add SAL_FALLTHROUGH, where apparently appropriateStephan Bergmann
Change-Id: I796ec3b79d7c26d9efe275b4232ae85cac80b578
2016-05-10Replace fallthrough comments with new SAL_FALLTHROUGH macroStephan Bergmann
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in preparation of enabling -Wimplicit-fallthrough. (This is only relevant for C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.) Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but that would require adding back in dependencies on boost_headers to many libraries where we carefully removed any remaining Boost dependencies only recently. (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its future evolution will not have any impact on the stable URE interface.) C++17 will have a proper [[fallthroug]], eventually removing the need for a macro altogether. Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-02-22loplugin:commaoperator in vcl/Noel Grandin
Change-Id: Ia5bbce27d9e9526122ce1e27389c7845e6709f27
2016-02-06vcl: bmpacc.hxx -> bitmapaccess.hxxChris Sherlock
Change-Id: I4bb19d6103c4a6a902d86b62a857e3478493924c
2015-12-28Typo: pysical->physicalJulien Nabet
Change-Id: I73d006ee5de8294cc0dc1cf48a77c6e4466c49ae
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I05e89f9896170d4df3d1377549ea074f06b884a0
2015-10-09clang-analyzer-deadcode.DeadStoresStephan Bergmann
Change-Id: I9e2cf9b06fcf0b0a9dfd642fa788f203ade19fe3
2015-07-13Make content of OSL_ASSERT, DBG_ASSERT, etc. visiblie in non-debug buildsStephan Bergmann
...to avoid lots of loplugin:staticmethods warnings. Also enables DBG_ASSERT etc. also for --enable-debug builds in addition to --enable-dbgutil builds. Change-Id: Ib89ecd9ab8ce7abb2c64790ace248b31f9d2b64d
2015-05-28new clang plugin: loopvartoosmallNoel Grandin
Idea from bubli - look for loops where the index variable is of such size that it cannot cover the range revealed by examining the length part of the condition. So far, I have only run the plugin up till the VCL module. Also the plugin deliberately excludes anything more complicated than a straightforward incrementing for loop. Change-Id: Ifced18b01c03ea537c64168465ce0b8287a42015
2015-04-30Get rid of the initial :: for the vcl namespaceTor Lillqvist
We used it all over the place without leading :: already anyway, even in many files in include. So let's be consistent. In the majority of cases, prefer the easier-on-the-eyes choice, not the "safe" one. In those files in include where *all* existing uses of ::vcl:: indeed used the :: prefix, there let's keep it for consistency. Change-Id: If99cb41d3bf290d38c601d91125c3c8d935e61d0
2015-04-02loplugin:staticmethodsNoel Grandin
Change-Id: Ibf0c73ac17ec19ed672f66907db47057920babca
2015-03-31cppcheck: can add explicit to ctorCaolán McNamara
Change-Id: I9b626a8c5674157033f62f5aff10259136d21a42
2015-03-31cppcheck: value that is never usedCaolán McNamara
Change-Id: If4707a661a447e5053df83c431ac9f4dab8ff5ae
2015-03-29vcl: cleanup pngreader, use unique_ptr for pImplTomaž Vajngerl
Change-Id: I36fb35338d8635e4bf1ac7c60e0f09da401406db
2015-03-26const_cast: convert some C-style casts and remove some redundant onesStephan Bergmann
Change-Id: I17c57a85bcda98ef36ddefd6562d4681d0c7d5fc
2015-01-07fdo#84938: convert STREAM_ #defines to 'enum class'Noel Grandin
Change-Id: Ibbf14c7e9a5c1883c1311d4c86f948f74f8e473e
2015-01-05fdo#84938: replace NUMBERFORMAT_INT_ constants with 'enum class'Noel Grandin
Change-Id: I9c67de31f5571b282adc132d973b79bccb35fdc9
2014-11-12valgrind+afl: check p1 at start of loopCaolán McNamara
Change-Id: I9ef947d9a9089f2bcf6c86711f10224a03abf394
2014-10-03coverity#1093225 Dereference after null checkCaolán McNamara
Change-Id: I34a7b79b4a7b5d86c3d39fd995ed3bd998eeeab8
2014-06-04coverity#1093230 Dereference before null checkCaolán McNamara
Change-Id: Id273eaf3c4fe25df9af723fbc7f774c3c61ab3de
2014-05-21ZCodec instances can be allocated on the stack just fineStephan Bergmann
Change-Id: Id115af34011fbedc93a1fea1734ea6b1e7cfafd0
2014-05-21Split ZCodec::BeginCompression param into its 3 independent componentsStephan Bergmann
Change-Id: I275abafe81c8bb617c70646244b14f6cecc33854
2014-05-21Use default argument valuesStephan Bergmann
Change-Id: I69273648155f5071b297c9c77edda58a8f25436d
2014-05-10coverity#708632 Uninitialized scalar fieldCaolán McNamara
Change-Id: Iea0a0aae7ca4f975acc0d468ad3912c38d84d57e
2014-04-02Kill superfluous vertical whitespaceTor Lillqvist
Change-Id: I81ce8fd7022bf283db668705efdfb0666f87bde9