summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2017-04-06loplugin:singlevalfieldsNoel Grandin
Change-Id: Ia681765aa1da5c80a3dbe91b7376af841a9c9ec1 Reviewed-on: https://gerrit.libreoffice.org/36145 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-06loplugin:redundantcast find cstyle double castsNoel Grandin
Change-Id: I5507be190dac781e5cdb545a60acf3d50056c9f8 Reviewed-on: https://gerrit.libreoffice.org/36187 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-06Fix crash while running the Notebookbar modeSzymon Kłos
Change-Id: Ifc9b900e49968c46768af3b9ee18bbb834f60557 Reviewed-on: https://gerrit.libreoffice.org/36165 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <eszkadev@gmail.com>
2017-04-05Related: tdf#106972 vcl PDF export, PDF images: ignore PDF >= 1.5Miklos Vajna
When copying their page steam into ours, we need to make sure their syntax is <= 1.4; so when checking if the image has PDF data, ignore the case when it has, but it's >= 1.5 (at least in the default case when not using reference XObjects). Change-Id: I6bd77803b92fe16bdd327e5e7c3d2b42adeacca4 Reviewed-on: https://gerrit.libreoffice.org/36161 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-04-05tdf#106972 vcl PDF export, PDF images: handle indirect font referencesMiklos Vajna
There were a number of problems here: - the /Resources key of a page object may be an indirect object - the /Font key of a resource object may be an indirect object - the /Length key of an object may be an indirect object So in all these cases handle not only a direct dictionary / number but also when we have a reference-to-dictionary/number. Change-Id: Ie74371f0ba43a133a1299843ef20cbfc75fe26d7
2017-04-05loplugin:redundantcast find c-style bool castsNoel Grandin
Change-Id: I3237b93babc67de12c3771aa84766c2141ca93b2 Reviewed-on: https://gerrit.libreoffice.org/36137 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-05loplugin:unreffun (clang-cl)Stephan Bergmann
Change-Id: Ie085ea716f03f6f8438fa2b9f54e46500a0c65f4
2017-04-05loplugin:constantparamNoel Grandin
Change-Id: I1996319e5b664dff95f7a9b2346aea6092d333ec Reviewed-on: https://gerrit.libreoffice.org/36070 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-04ofz#984 better match post-creation aBitmap.HasGreyPalette() logicCaolán McNamara
i.e. Bitmap::HsGreyPalette checks that the palette has entries before calling Palette::IsGreyPalette Change-Id: I287647869ad615327f3119b7798f410e22140302
2017-04-04Resolves: tdf#106725 paint default window bg before spin button bgCaolán McNamara
Change-Id: I0c7f982c3a47f45d022271eba69ebed896288d78
2017-04-04Finally switch MSVC to sal_Unicode = char16_t, tooStephan Bergmann
There is lots of (Windows-only) code that relied on sal_Unicode being the same as wchar_t, and the best change may be different in each case (and doing the changes may be somewhat error prone). So for now add SAL_U/SAL_W scaffolding functions to sal/types.h, remove their uses one by one again, and finally drop those functions again. Change-Id: I2cc791bd941d089901abb5f6fc2f05fbc49e65ea Reviewed-on: https://gerrit.libreoffice.org/36077 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04Workaround VCL complextext failure on Win7 KVM QXLJan-Marek Glogowski
My Windows 7 KVM QXL VM fails the bounding rect test with: complextext.cxx:98 VclComplexTextTest::testArabic equality .. failed - Expected: 71x14@(0,1) - Actual : 70x14@(1,1) This doesn't happen using a SSHd on Cygwin64 based session. Adding a SAL_DEBUG to WinSalGraphics::GetGlyphBoundRect shows many different glyph rects, which - probably by pure chance - almost add up to just a single pixel line missing on the left. So this simply drops the first pixel column, if the bounding rect starts with an offset. Works for me. Change-Id: Ia496a208523a9c358d4128ecad887b5c77283fbc Reviewed-on: https://gerrit.libreoffice.org/35647 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-04-04tdf#104686: do not crash if Menu has been somehow disposedAron Budea
The rare crashes in MenuFloatingWindow::ImplGetStartY() and MenuFloatingWindow::ImplScroll(bool) likely happen because of a disposed Menu. Let's guard against invalid accesses. Change-Id: Ie31240abbc48c06edd40d0a95f319725cdb3db16 Reviewed-on: https://gerrit.libreoffice.org/36026 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-04-04tdf#99352: assert on stray VclPtrs past DeInitBjoern Michaelsen
- ignore on Windows for now, as it is acting up Change-Id: I98dbb887ed556b58188870c3eb3de1327bc58109 Reviewed-on: https://gerrit.libreoffice.org/35816 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-04-04loplugin:redundantcast (clang-cl)Stephan Bergmann
Change-Id: Ie096d75c1bc774e77c589845f61276d1478234ef Reviewed-on: https://gerrit.libreoffice.org/36065 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04loplugin:loopvartoosmall (clang-cl)Stephan Bergmann
Change-Id: Ibdfdc5c66cf1e81d9e43c94df31120c476a78572 Reviewed-on: https://gerrit.libreoffice.org/36064 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04loplugin:redundantinline (clang-cl)Stephan Bergmann
Change-Id: I03a19b599005f6ef25040889a1e1802445ebf430 Reviewed-on: https://gerrit.libreoffice.org/36063 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04tdf#105162: Need to call epoxy_handle_external_wglMakeCurrent()Tor Lillqvist
Somewhere, in time before calling epoxy-wrapper OpenGL functions. This seems to be a good place. Educated guess based on debugging, turned out to work. Change-Id: Id3f1dfb0c5a9dbfb166c47ea81db902af1a4fc08
2017-04-04loplugin:unusedmethodsNoel Grandin
Change-Id: I30f9b6e68a7aa73782c980749e34f8f8d40ae57b Reviewed-on: https://gerrit.libreoffice.org/36047 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-03vcl: avoid divide by zero in PDFExtOutDevData::HasAdequateCompression()Miklos Vajna
My stub graphic import filter created a graphic with 0 data size, don't crash on that. Change-Id: Ie9b93fce1bcae04d555a0610f674603c6945a54a Reviewed-on: https://gerrit.libreoffice.org/36048 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-04-03iOS update for Rectanglejan Iversen
Updated Rectangle to tools::Rectangle Change-Id: I1577dffe8d51ac3a33bbc2e0771b338d5fdd0220
2017-04-03use actual UNO enums in vcl..xmlsecurityNoel Grandin
Change-Id: Id862544f27ebcbe8363f93dc83192d0f0cddb5cc Reviewed-on: https://gerrit.libreoffice.org/36041 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-02split up doc testing for three major variantsCaolán McNamara
Change-Id: Iac1b5cb1c209ba27d185c8a7ba1e59c663553d77
2017-04-02we're either reading or writing, not bothCaolán McNamara
Change-Id: I6b004c7f7957f3843d37063b182cac0cd07e5f44
2017-04-02SwapOutData url is always a file urlCaolán McNamara
so can just use SvFileStream here and not go through ucb Change-Id: I1d70a4e39977a178afaf7eeadb552f1bd7d9fd1a Reviewed-on: https://gerrit.libreoffice.org/36024 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-02add cgm fuzzerCaolán McNamara
Change-Id: Id3bf2bc3c50421bb46e6fbdf3c492bdd2e3a976c
2017-04-02coverity#1403662 Mixing enum typesCaolán McNamara
Change-Id: Ic5e797c65dfc736a9ef0ab14f3ae563216143947 Reviewed-on: https://gerrit.libreoffice.org/36020 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-02ofz: avoid oomCaolán McNamara
Change-Id: Ibffae78a1186492300c237e85089702491cf4a0f
2017-04-02align fftester and wmffuzzerCaolán McNamara
Change-Id: Ib0017cfd290b41fc886b5516d2f50ee219185d5a
2017-04-01add rtf fuzzerCaolán McNamara
Change-Id: I36a6294c158232bef8fceeaf5159527f467f5786
2017-04-01coverity#1403664 Dereference null return valueCaolán McNamara
and coverity#1403663 Dereference null return value Change-Id: I17b7f977e802aa5bdc5b58895fe2cdeea2c96ebe
2017-04-01adjust cgm import to make testing easierCaolán McNamara
Change-Id: I2979af77522e085075d4f1e1e379fe82e614163b
2017-04-01Get rid of magic numbersBartosz Kosiorek
Change-Id: Ia9ccacc3a21c837e69e3901e262cdd052e4be3f3 Reviewed-on: https://gerrit.libreoffice.org/35982 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-31vcl android: more adaptions to tools::RectangleMiklos Vajna
Change-Id: Id85ee2a943047c22f77a758238e51e580b7d079b
2017-03-31ofz: 0 bitcount bmps are unsupportedCaolán McNamara
Change-Id: Ibd7b25546006506350f9fc009596f2989a305a4c
2017-03-31expand forcing to mono mask during load to non-indexed sources tooCaolán McNamara
Change-Id: I38c1eec5e180d689de72413b1438c88a1085bbb5
2017-03-31vcl: attempt to blindly make androids properly rectangularMichael Stahl
Change-Id: I5d43744b754817174401558a200a4cd204779515
2017-03-31vcl kde: adapt to tools::RectangleMiklos Vajna
Blind fix, I have no idea how to install TDE today. Change-Id: I9b6143ba09353d4f3cc09eb38327d73582506087
2017-03-31tdf#106458 Color widget should list an exact number of itemsheiko tietze
mnColorValueSetMaximumRowCount set to 10 after decision from design team Change-Id: If6cf93354af6bbdbbefcd026e5aa05689acdaf93 Reviewed-on: https://gerrit.libreoffice.org/35902 Reviewed-by: Heiko Tietze <tietze.heiko@googlemail.com> Tested-by: Heiko Tietze <tietze.heiko@googlemail.com>
2017-03-31vcl kde4: adapt to tools::RectangleMiklos Vajna
Change-Id: I047a69bd084f44c7bc7a132eddf2ee09e811d783
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-30ofz#968 short-cut slow create mask when we are our own mask alreadyCaolán McNamara
Change-Id: I5969226bf2da34d34e30e44ae763792cdc072bc8 Reviewed-on: https://gerrit.libreoffice.org/35921 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-30tweak indent a littleCaolán McNamara
Change-Id: Icc3c69887a15eb0eacfa9209630a57f602c44422 Reviewed-on: https://gerrit.libreoffice.org/35920 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-30vcl PDF export, norefxobj: add test for thisMiklos Vajna
Assert two important properties: - the pdf image is described using the form xobject markup (not the reference xobject one) - the form xobject refers to a vector image, not to a bitmap one Change-Id: I94b88976c1e5392758d56254143fbeeeeba51412 Reviewed-on: https://gerrit.libreoffice.org/35901 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-30convert GradientType to scoped enumNoel Grandin
Change-Id: Ie71ead122965e967796ed01270cc2824d35905ac Reviewed-on: https://gerrit.libreoffice.org/35900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-30remove type decorations on char literalsJochen Nitschke
they are only needed where type deduction fails. left them in defines for now. Change-Id: I7f002dd6bc7acc083c73b6c64076de6dd28d0b09 Reviewed-on: https://gerrit.libreoffice.org/35893 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-30Fix overflow case returned by XmbLookupStringJulien Nabet
man of XbmLookupString when XBufferOverflow: XBufferOverflow The input string to be returned is too large for the supplied buffer_return. The required size (for XmbLookupString, Xutf8LookupString in bytes; for XwcLookup‐ String in characters) is returned as the value of the function, and the contents of buffer_return and keysym_return are not modified. The client should recall the function with the same event and a buffer of adequate size to obtain the string. So in this case retrieve length expected then call it with +1 for null termination Change-Id: I8507bb249a411c7e899746e0598f4a055a26fb19 Reviewed-on: https://gerrit.libreoffice.org/35519 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-03-30vcl PDF export, norefxobj: copy each object only onceMiklos Vajna
Even if they are referenced multiple times. This is especially important as objects can refer to each other, creating a cyclic graph. But it also makes the output a tiny bit smaller. Change-Id: I561ac319683a19a797282fe259cc68f3a4c50c3e Reviewed-on: https://gerrit.libreoffice.org/35855 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-29vcl PDF export, norefxobj: avoid replacement bitmapMiklos Vajna
The whole point of "no reference XObjects" is knowing this vector markup is supported everywhere, so no need to provide a fallback bitmap. It was already unreferenced, but now it's not even written to the file, making the PDF export result smaller. Change-Id: Idf766c8eeded4235ebea49d13698a13c6b60f014 Reviewed-on: https://gerrit.libreoffice.org/35841 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-29loplugin:unusedmethodsNoel Grandin
Change-Id: Ib008613fb06c82791c63d5b074a3e2ff1c3607a0 Reviewed-on: https://gerrit.libreoffice.org/35834 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>