summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2017-06-06use member initialization listCaolán McNamara
Change-Id: Iedfc255306428a4354bb73a67da4f93c714e7817
2017-06-06add COVERITY_NOEXCEPT_FALSECaolán McNamara
to markup dtors that coverity warns might throw exceptions which won't throw in practice, or where std::terminate is an acceptable response if they do Change-Id: I32b94814e8245372e1d1dc36be0d81e3564042f4 Reviewed-on: https://gerrit.libreoffice.org/38318 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-06tdf#99680 unittest to ensure there are no empty clipping regionsVasily Melenchuk
Change-Id: Id4565858b0135b3177044558db87a68ef828955b Reviewed-on: https://gerrit.libreoffice.org/38403 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-06replace PRINTER_OK with ERRORCODE_NONENoel Grandin
since the first is #define'd to the second, and offers no extra value Change-Id: Id3ce344e246d88b34d0e0fc2619da13f67587000 Reviewed-on: https://gerrit.libreoffice.org/38409 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-06tdf#94632 Enable sifr dark and set fallbackYousuf Philips
Change-Id: If77b33acf4f8d3e2e9c38b3e5ef359a1fc966910 Reviewed-on: https://gerrit.libreoffice.org/38387 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Yousuf Philips <philipz85@hotmail.com>
2017-06-05typosJulien Nabet
Change-Id: I3a28b5ce7464de724799997234925533d45f6121 Reviewed-on: https://gerrit.libreoffice.org/38420 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-05Improved loplugin:cstylecast to reference types: vclStephan Bergmann
Change-Id: I86d31a6dcd01700d6ac8712134f82f0cc83e46f6
2017-06-05Improved loplugin:redundantcast, const/static_cast combinations: vclStephan Bergmann
Change-Id: I1d104fc0dbaa75a401eb9c405062c157f29ef42c
2017-06-05spelling instanciate -> instantiateNoel Grandin
Change-Id: Ic1393da64328c0dc7e2860334b204139bf537d81 Reviewed-on: https://gerrit.libreoffice.org/38401 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-05clang-tidy performance-unnecessary-value-paramNoel Grandin
Change-Id: I6ed8c54c7c45931d91709cc818f2483c70197192 Reviewed-on: https://gerrit.libreoffice.org/38400 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-04wrong qpwfuzzer libsCaolán McNamara
Change-Id: I558061f6a7671109bfe095e22940428b88e7076a
2017-06-04no need to construct unique_ptr hereJochen Nitschke
and std::move is not needed when returning unique_ptr Change-Id: I9b4d2d6b8a41b570a9bd99e44a743ff161b78c59 Reviewed-on: https://gerrit.libreoffice.org/38385 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-03add quattro pro fuzzerCaolán McNamara
Change-Id: Ic9ba37af508eabce528ea57ae5839b1cd603b3e1
2017-06-02PPD parsing: set default as well as value, add more parsing info.Michael Meeks
Change-Id: I44ea2518d957b5ceee70df1b9a15779ffd5eb7a4 Reviewed-on: https://gerrit.libreoffice.org/38317 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-06-02Improved loplugin:redundantcast const_cast handling: vclStephan Bergmann
Change-Id: I7ecc72d4a5a68db8755ff0147fa1326e33827a82
2017-06-02no need to assign a nullptr after a bad_allocNoel Grandin
since if the allocation failed, the assignment would never happen Also use early exit to simplify the code in X11SalBitmap::ImplCreateDIB Change-Id: I73301bfad6492c2b42c08744c24cfb78237983f0 Reviewed-on: https://gerrit.libreoffice.org/38346 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-02rework ScQProReader to take SvStream instead of SfxMediumCaolán McNamara
its only uses the stream anyway and this makes it far easier to build a fuzzer on Change-Id: I4aa8b56d4b041708c4de1730d503641ab23c14e8
2017-06-02Improved loplugin:redundantcast static_cast handling: vclStephan Bergmann
Change-Id: I3cf2f05b0076c6c99b84eef4246d3d5c149d6f3d
2017-06-02convert GRFILTER constants to ERRCODE_GRFILTER_Noel Grandin
since various code mixes these constants in with ErrCode values from other code, let us just make it into real ErrCode values. Change-Id: Ifa3d0f7526172609a44e6749bed9f730ab6b1a95 Reviewed-on: https://gerrit.libreoffice.org/38313 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-01ofz#1605 check multiply and shiftCaolán McNamara
Change-Id: I6aad9ad23e7bf080b3b610223f92df7074530beb Reviewed-on: https://gerrit.libreoffice.org/37632 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-01add ww8 fuzzerCaolán McNamara
Change-Id: Icb8b385e3c59b6476ac58da5e76bbe73eaa82d88
2017-06-01tdf#99680 modified clipping for PDF exportVasily Melenchuk
If clipping is requested, but no clipping region is defined, clipping is ignored. Change-Id: I793c1de1f4f6b0203727c0ff6aa8adecc43ad413 Reviewed-on: https://gerrit.libreoffice.org/38021 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-05-31clang-tidy readability-redundant-control-flowNoel Grandin
Change-Id: I832f7ef0f1bd55e365db7e49823fe8bc30390c04 Reviewed-on: https://gerrit.libreoffice.org/38215 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-30remove duplicate 'using namespace'Jochen Nitschke
Change-Id: I7f8828f677cfb588135ff75c03ffb75895773440 Reviewed-on: https://gerrit.libreoffice.org/38201 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-30vcl: replace dynamic lookups of Windows 7 APIs with static callsMichael Stahl
Change-Id: I5d4c4bb98e271e69c45b8e7f989f9b21d287c0bb
2017-05-30tdf#107682 - Repeated images replace correct ones in exported PDFMarco Cecchetti
The problem was due to the buffer acquire methods: in Bitmap::Checksum (old implementation) Bitmap::AcquireReadAccess is used to get the bitmap buffer: indeed this method relies on SalBitmap::AcquireBuffer (which is used in the new implementation) but in case the buffer acquisition fails, instead of giving up, it tries to update the imp bitmap instance embedded in the bitmap (see BitmapInfoAccess::ImplCreate). The solution is to perform this further attemp in Bitmap::Checksum when the value returned by ImpBitmap::GetChecksum is 0. Change-Id: Ib901ac941db57756e9a951bacbc573ca206316e0 Reviewed-on: https://gerrit.libreoffice.org/38165 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2017-05-30loplugin:stringcopy (macOS)Stephan Bergmann
Change-Id: I917982ff7cd6e342125dc4349de7d16e1dad9f22
2017-05-30Revert "make LANGUAGE setting universal, not just gtk specific"Caolán McNamara
poxy cppunit tests can't use config here This reverts commit f55eeb7a45998d16eb0fe49088e172ce45ac4f2b.
2017-05-30make LANGUAGE setting universal, not just gtk specificCaolán McNamara
Change-Id: I5ff01f0232391933ad3704af6f2c2100d923c1fd
2017-05-30teach redundantcast plugin about functional castsNoel Grandin
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0 Reviewed-on: https://gerrit.libreoffice.org/37910 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-29vcl PDF export, nss: use comphelper::HashMiklos Vajna
Allows removing the own HashContextScope, which did part of what is now provided by comphelper. Change-Id: I601a1cf841cdf1a094a71646d4a1eb042d42e985 Reviewed-on: https://gerrit.libreoffice.org/38155 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-05-29remove some unnecessary OString constructor callsNoel Grandin
Change-Id: I11358f17770cacb2a33011797f4be82dc02340b7 Reviewed-on: https://gerrit.libreoffice.org/38130 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-28remove unnecessary use of OString::getStrNoel Grandin
Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: https://gerrit.libreoffice.org/38058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-28cppcheck: duplicateExpressionJochen Nitschke
> Same expression on both sides of '|' we don't need WB_CLOSEABLE in the mask if we add it anyway ever since commit a0e2cc39e2c9d1284ef17180b6ab659a1dd2c540 Date: Tue Aug 7 10:54:21 2001 +0000 #77230# - Close() works now correct Change-Id: I13d0f2ee8d12a9ab35080a1db09d398c7ac2cdb9 Reviewed-on: https://gerrit.libreoffice.org/38103 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-05-26Resolves: tdf##108069 2nd OpenGLContext::init should dispose earlier resultsCaolán McNamara
Change-Id: If6bb9517a4081576347d71ddf26d020119d34247
2017-05-25tdf#108056 PDF export: work with double page sizeMiklos Vajna
Our coordinate system has the origo in the top left corner, PDF's one is at the bottom left corner. So the page height affects the coordinate of all widths and y positions. That page width is 870.25 in the case of the bugdoc, but it was handled as 870 due to the integer rounding. The coordinates and heights are now closer to the expected ones. Change-Id: I9c7d77298df3850bbc170c9ace18120900d7e3fa Reviewed-on: https://gerrit.libreoffice.org/38030 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-05-25Bypass PdfExportTest::testTdf107868() in 64-bit WindowsMark Hung
It also failed with VS2015. Just bypass it now. Change-Id: Ic657d1d341e8c9598e163f5f32b6e0bbee3959e4 Reviewed-on: https://gerrit.libreoffice.org/37987 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
2017-05-25loplugin:constantparamNoel Grandin
add the results files so I can just see the diff in future Change-Id: Ia20a1aa6418be95ed620719cde340c00b7b053e1 Reviewed-on: https://gerrit.libreoffice.org/37988 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-24vcl: parallelize JPEG import from ImportGraphics()Miklos Vajna
Just the expensive, pixel reading part, not the bitmap creation, which isn't thread-safe. Change-Id: I3723d80aa29ee5f2e604800cb2061c59b0b0324d Reviewed-on: https://gerrit.libreoffice.org/37978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-05-24vcl: factor out graphic import filter state to GraphicImportContextMiklos Vajna
Have all the data needed to read pixel data at one place. Change-Id: Ie00b154b941c775d6ff4bf11019464423b3e2425 Reviewed-on: https://gerrit.libreoffice.org/37975 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-05-24For some reason PdfExportTest::testTdf107868() fails in a 64-bit VS2017 buildTor Lillqvist
Just bypass it for now then. Change-Id: I78b088dd35b37378f1d29833b08cfd7afd6b5133
2017-05-23vcl GraphicFilter: invoke JPEG import directly in ImportGraphics()Miklos Vajna
So that later the two ImportJPEG() calls can be invoked in separate for loops. Change-Id: I7b806d7c604d406411d5113731229eb9f761eee4 Reviewed-on: https://gerrit.libreoffice.org/37955 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-05-23vcl GraphicFilter: add ImportGraphics()Miklos Vajna
This is similar to ImportGraphic(), but can handle multiple streams with one function call. Change-Id: I8d5dc8de64321c3c1fb9e1037527b411fd68dca8 Reviewed-on: https://gerrit.libreoffice.org/37953 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-05-23enhance useuniqueptr lopluginNoel Grandin
teach it to look for the following sequence in a destructor: delete m_pfoo; m_pfoo = nullptr; Change-Id: Icd6271a63a024e32b53cc9e599f8f59952160380 Reviewed-on: https://gerrit.libreoffice.org/37900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-23tdf#105461 PDF export of editeng fill color: restrict to logic map modesMiklos Vajna
The original use case was Writer/Impress shape text, but when the map mode is pixels, the reference device gives bogus values for the PixelToLogic() calls, affecting e.g. form controls. Just go back to the old way of not painting the background for those. Change-Id: I52f1901af15732274915fa3c77c06909b5164afb Reviewed-on: https://gerrit.libreoffice.org/37919 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-05-23test for DejaVuSansRene Engelhard
Change-Id: I963c9a9ac0239af5550de50f39f080b9f19d494f
2017-05-22tdf#103896: Fix wrong leading and trailing tabs within dialogs on macOSThorsten Wagner
Change-Id: Ia18b530f3cfd48273ae00471e23131cae0df9eda Reviewed-on: https://gerrit.libreoffice.org/37123 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-05-21if X11/Xregion.h is universally available, we can use that insteadCaolán McNamara
Change-Id: I6ede6066037bb97b927faefacfd9a149ac2a0eac Reviewed-on: https://gerrit.libreoffice.org/37881 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-21XRegion has to match the "real" XRegion structureCaolán McNamara
i.e. same as... commit 5470a365f25e5052b4dd74f76aa2196f0d70934b Author: Caolán McNamara <caolanm@redhat.com> Date: Wed Nov 25 10:04:37 2015 +0000 XRegion has to match the "real" XRegion structure, even if we don't use some of the fields regression from commit dd351dd728687cffe432ce0ec9367ceb80e097fb Date: Tue Nov 24 08:50:39 2015 +0200 loplugin:unusedfields in vcl/ Change-Id: I8314eae6d507b6a7fb847d593458e15e666230c8
2017-05-21cppcheck: unusedStructMemberJochen Nitschke
Change-Id: I1e2859e7a12a61db953be12f11149aaecb462b5b Reviewed-on: https://gerrit.libreoffice.org/37871 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>