summaryrefslogtreecommitdiff
path: root/canvas
AgeCommit message (Collapse)AuthorFilesLines
2020-08-17tdf#135094 cairo canvas: fix black slide containing a very small imageMiklos Vajna1-4/+17
Don't paint when the area would be 0, that would not be visible anyway, and the _cairo_matrix_to_pixman_matrix_offset() call would fail with CAIRO_INT_STATUS_INVALID_MATRIX in _pixman_image_set_properties(), failing the render of the whole slide. Also, warn in case the painting fails, so the next time something breaks, it's easier to find the problematic place. [ No testcase, our tests are typically headless and currently SvpSalGraphics::SupportsCairo() reports false, so this would be tricky to test. ] (cherry picked from commit 78036f74fa74ee2552e79064660634e1342692ff) Change-Id: I7cdb9462ff8155232ea51abf321b365c2219575b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100850 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-06tdf#42949 Fix IWYU warnings in canvas/*/*cxxGabor Kelemen49-234/+46
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ie1f6fe98f4e8bc792f5eae1ccdd697c997707004 Reviewed-on: https://gerrit.libreoffice.org/81930 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-10-30tdf#42949 Fix IWYU warnings in canvas/source/*/*hxxGabor Kelemen56-122/+66
Except directx/ Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I4504e087edfd837a3a91df49e296bbf40778b030 Reviewed-on: https://gerrit.libreoffice.org/81586 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-10-11tdf#40534 correctly match page with memory slabJan-Marek Glogowski2-52/+24
LO has a page manager to match system memory backbuffers with graphics memory on DX accelerated Windows. Internally this uses an other rectangle implementation, the SurfaceRect, which had some great comments like: // a size of [0,0] therefore denotes a one-by-one rectangle. In commit 230dbe2e43f3ee2cd285f9cdfe0d57e1ca08b8fe ("#144866# Add one pixel border around textures, a bunch of drivers clobber those with dirt), the allocation was increased by a pixel border, but this doesn't work correctly, because now an allocation of the page size wouldn't fit anymore into a page, because the pages size is decreased before comparison. In the end the mixup suffered from hard to handle off-by-one problems. This patch fixes the bug, but eventually SurfaceRect should be replaced by an extended basegfx::B2IBox. But since B2IBox uses two ranges, instead of a point and a size, it would need a lot of conversations to I2Point and I2Size objects with the current Page::insert algorithm. Change-Id: Ia725b4f8ed4fb270f2eb3734e492062bc7f13793 Reviewed-on: https://gerrit.libreoffice.org/80628 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-10-05The SystemEnvData passed into the canvas factories appears to be unusedStephan Bergmann7-53/+48
It was passed in as aArg[1] ever since d551190e8311242eadda4a3e82efff160175cb04 "INTEGRATION: CWS canvas05", but I can't find any current use of that specific argument in canvas/source/ (assuming that all the factories are implemented there), nor can I find any trace in the git history of it ever havig been used. That means that Window::GetSystemDataAny is unused now and can be removed. Change-Id: I16efe548afb5cc3e0606cffea135f7e6674d5def Reviewed-on: https://gerrit.libreoffice.org/80295 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-05The checks should apparenty be maArguments.getLength() >= 5Stephan Bergmann2-2/+2
...given that maArguments[4] is accessed two lines further down, in both cases. Looks like typos in b6a7c4da52acf45a7b69d1e81cf9548f8552752e "INTEGRATION: CWS canvas05". Change-Id: Iee8a111126f2b81c9e586fe8e3c569fbd81dd8f4 Reviewed-on: https://gerrit.libreoffice.org/80289 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-04Related: tdf#127529 make it harder to misunderstand this VirtualDevice ctorCaolán McNamara1-2/+2
Change-Id: I250bc68da118a994a2e0ff8ab9eb11112827756d Reviewed-on: https://gerrit.libreoffice.org/80158 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-02loplugin:fragiledestructor (clang-cl)Stephan Bergmann1-1/+1
Change-Id: Ibf5b8022df00bb6c49b53853811b6503146dddd7 Reviewed-on: https://gerrit.libreoffice.org/79971 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-01loplugin:data (clang-cl)Stephan Bergmann3-9/+9
Change-Id: Ib8b2bc1c5f7b27a646036ce23cae2b6a06edd038 Reviewed-on: https://gerrit.libreoffice.org/79922 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-01loplugin:stringconstant (clang-cl)Stephan Bergmann6-7/+7
Change-Id: Id1a82cea4444255fdb693e126b7571a406094624 Reviewed-on: https://gerrit.libreoffice.org/79916 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-01loplugin:simplifyconstruct (clang-cl)Stephan Bergmann1-1/+1
Change-Id: I08da288a88c2bce1d4250ec77f17bd483e6bc09c Reviewed-on: https://gerrit.libreoffice.org/79911 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-01lok jsdialogs: Introduce dumping of widgets hierarchy to vcl::Window.Jan Holesovsky1-8/+8
Change-Id: Ie3267e1f888df371d281e81ead437a150aa8dc1c Reviewed-on: https://gerrit.libreoffice.org/79796 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2019-09-26remove internal use of 16-bit packed formatsNoel Grandin1-6/+0
none of our supported hardware uses these any more Change-Id: Ic95d6df619a05df0bec1f5870596cb2bb3bcc6cb Reviewed-on: https://gerrit.libreoffice.org/79476 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-25cid#1251600 Uncaught exceptionCaolán McNamara1-5/+0
we don't need this hunk of code for the demo anyway Change-Id: I45e30d9ae190b443d15fa0933241fb75c0fbb8b1 Reviewed-on: https://gerrit.libreoffice.org/78071 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-08-22loplugin:constmethod in canvas,comphelperNoel Grandin11-20/+20
Change-Id: I8790355369159b2325d3992712b2f65e0401db86 Reviewed-on: https://gerrit.libreoffice.org/77930 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-16Fix typosAndrea Gelmini1-1/+1
Change-Id: I207333e9bafc5d6c38ffa53a303046e437b7a815 Reviewed-on: https://gerrit.libreoffice.org/77607 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-16use more TOOLS_WARN_EXCEPTIONNoel Grandin1-2/+2
Change-Id: Ic21ea11ff106e0732bb8fa600ef39a549d7bda86 Reviewed-on: https://gerrit.libreoffice.org/77569 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): canvasStephan Bergmann17-17/+17
Change-Id: Ia01e9c6a5a730e0efe97a9315810a5dfef5ec98f Reviewed-on: https://gerrit.libreoffice.org/76693 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-27tdf#74702: vcl add OutputDevice::Flush() to remove GetOutDevType()Chris Sherlock1-12/+4
Change-Id: I3e8775845e471517945876a48696747a46e5270a Reviewed-on: https://gerrit.libreoffice.org/75616 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-07-19loplugin:referencecasting in canvas..chart2Noel Grandin4-18/+11
Change-Id: I3a3671b5c44d1a7e5ca320d3d76dd5d902382cbc Reviewed-on: https://gerrit.libreoffice.org/75935 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-19cid#1448246 Result is not floating-pointCaolán McNamara1-1/+1
Change-Id: I96fb06ffec6f8196dfa01ff13d45c1f618e671fc Reviewed-on: https://gerrit.libreoffice.org/75905 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-16cid#1448384 Calling risky randCaolán McNamara1-2/+3
Change-Id: I4787c004ca73cb3496a33c06c03ea4cd988b72ad Reviewed-on: https://gerrit.libreoffice.org/75712 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-04remove some unneede vcl/bitmap.hxx includesNoel Grandin4-4/+0
Change-Id: Ibdc79538276992193e61f6dc16ddd3fd1ab80b82 Reviewed-on: https://gerrit.libreoffice.org/75069 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-11Use hasElements to check Sequence emptiness in accessibility..canvasArkadiy Illarionov14-24/+24
Similar to clang-tidy readability-container-size-empty Change-Id: I24c3f04b4eed3c1cd973166885660f113a26844f Reviewed-on: https://gerrit.libreoffice.org/71805 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-28Log used / selected canvas serviceJan-Marek Glogowski1-6/+13
Change-Id: If62dcbffe6514966418bbf78ef3392cc3219f159 Reviewed-on: https://gerrit.libreoffice.org/73074 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-05-22New loplugin:dataStephan Bergmann2-3/+3
...following up on 1453c2c8f13bac64ecd1981af7cebf1c421808ac "prefer vector::data to &vector[0]" Change-Id: I7c113747d92d144a521d49b89384dd8bf1215c01 Reviewed-on: https://gerrit.libreoffice.org/72765 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-22fix complex transformation in CanvasHelper::fillTexturedPolyPolygon()Luboš Luňák1-7/+29
There's pretty much the same code in CanvasHelper::fillTexturedPolyPolygon() that has received various fixes over the time, but this code not, so fix it as well. Change-Id: I7293d4d67dff2d5276928bb3ab25adfb883ce3ca Reviewed-on: https://gerrit.libreoffice.org/72700 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-05-13fix wrong SET/QUERY flags passed to uno::ReferenceNoel Grandin2-4/+4
By creating deleted methods for the wrong calls. Avoids the compiler needing to construct a temporary Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a Reviewed-on: https://gerrit.libreoffice.org/72103 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-08improve tools::Rectangle->basegfx::B2?Rectangle conversionNoel Grandin1-3/+2
Improve the conversion method to do something reasonable with empty Rectangle. Use the conversion method in more places. Change-Id: I48c13f3d6dae71f39f03f7939101e545c8125503 Reviewed-on: https://gerrit.libreoffice.org/71853 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-04-25Cut down on -pthread/-lpthread proliferationStephan Bergmann1-1/+0
Building against libstdc++ effectively always requires -pthread anyway (as various standard C++ headers require it, see the comment added to solenv/gbuild/platform/unxgcc.mk), so many explicit uses of -pthread/-lpthread can be removed. Doing a (partial) test build on Linux with Clang -stdlib=libc++ suggests that libc++ indeed doesn't need -pthread as libstdc++ does. The remaining uses of -pthread/-lpthread are mostly in configure.ac for the various BSDs (which somebody else might want to clean up now), and related to external projects. I tried to be careful to remove -pthread/-lpthread from makefiles only when C++ object files are involved (so -pthread will now be included on the link command line by default). Change-Id: I936e082839cb9a434bd273ce5a1f187a4245dfa1 Reviewed-on: https://gerrit.libreoffice.org/71291 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-04-15remove or change salbtype.hxx includes with the specific oneTomaž Vajngerl1-1/+0
We probably don't need salbtype.hxx include, but if we do we can now change it with a more specific one - namely BitmapPalette.hxx in most cases. This doesn't yet touch the includes in VCL. Change-Id: Ie3067ccb2eec425650b41ce7fca48e368215f489 Reviewed-on: https://gerrit.libreoffice.org/70761 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-04-12loplugin:sequentialassign in accessiblity..canvasNoel Grandin1-2/+1
Change-Id: I984717138ac85c1af5fc363fda06f5c2b5497965 Reviewed-on: https://gerrit.libreoffice.org/70641 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-10Fix typoAndrea Gelmini1-1/+1
Change-Id: Id9d19965511760839e8e93488b1cc6a98fbd4a5c Reviewed-on: https://gerrit.libreoffice.org/70493 Tested-by: Jenkins Reviewed-by: himajin100000 <himajin100000@gmail.com> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-05Replace legacy dynamically-loaded functions with statically linked onesMike Kaganski1-45/+1
We don't need the dynamic load complexity for these now with baseline Windows version being Windows 7 SP1. Stuff used only for compatibility with older versions was dumped. Change-Id: I810f271796cfd875cfa18a3081c9ad444fe57b3e Reviewed-on: https://gerrit.libreoffice.org/70321 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-04Fix typoAndrea Gelmini1-2/+2
Change-Id: I472dbda6c7323e1ec97a1664fa0e6633e7fa90c9 Reviewed-on: https://gerrit.libreoffice.org/70227 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-03-27loplugin:typedefparam (clang-cl)Stephan Bergmann3-4/+4
Change-Id: I07604028845c49cc084927e21db7f21c5d053bab Reviewed-on: https://gerrit.libreoffice.org/69796 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-03-27loplugin:unnecessaryparen (clang-cl)Stephan Bergmann1-2/+2
Change-Id: I0ce344a2a69604467d5bf579a2fdcaae172d5f54 Reviewed-on: https://gerrit.libreoffice.org/69788 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-03-06loplugin:unnecessaryparen improve member expressionNoel Grandin1-2/+2
Change-Id: I304621018cb1e2a47e478e86df4229bcf2176741 Reviewed-on: https://gerrit.libreoffice.org/68757 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-05re-land "new loplugin typedefparam""Noel Grandin2-3/+3
This reverts commit c9bb48386bad7d2a40e6958883328145ae439cad, and adds a bunch more fixes. Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a Reviewed-on: https://gerrit.libreoffice.org/68680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-04Revert "new loplugin typedefparam"Noel Grandin2-3/+3
This reverts commit 9865440d217d975206a3f91612f0666312bc8fd8. This is not ready to land yet, seems like the latest update of the logic reveals a bunch more places I need to fix before it can land.
2019-03-04new loplugin typedefparamNoel Grandin2-3/+3
verify that parameters use the exact same typedef-names (if any) in definition and declaration Change-Id: I55d2817f599b0253904dce2d35a1a93967e15a77 Reviewed-on: https://gerrit.libreoffice.org/68439 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-25tdf#42949 Fix IWYU warnings in include/canvas/Gabor Kelemen21-0/+29
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I93d516146ba44d83f84cb245e712ef6d14634a18 Reviewed-on: https://gerrit.libreoffice.org/68035 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-19Some uses of C++17 class template argument deductionStephan Bergmann1-1/+1
Change-Id: I47c469c0fcdff41d83729be9489c946e81ef3686 Reviewed-on: https://gerrit.libreoffice.org/68020 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-19pretty up logging of exceptionsNoel Grandin1-2/+3
Add exceptionToString() and getCaughtExceptionAsString() methods in tools. Use the new methods in DbgUnhandledException() Add special-case case code for most of the exceptions that contain extra fields, so all of the relevant data ends up in the log Change-Id: I376f6549b4d7bd480202f8bff17a454657c75ece Reviewed-on: https://gerrit.libreoffice.org/67857 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-08loplugin:indentation in canvas..chart2Noel Grandin3-3/+5
Change-Id: I9ef57a2e9aaf298f4cfd029aa9b8143871b1bc21 Reviewed-on: https://gerrit.libreoffice.org/67526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-31loplugin:unnecessaryparen (clang-cl)Stephan Bergmann1-2/+2
Change-Id: I0cd14e0ace9c9d2fcd880477b0485295e3010b71 Reviewed-on: https://gerrit.libreoffice.org/67138 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-30loplugin:redundantinline (clang-cl)Stephan Bergmann2-5/+5
Change-Id: Ib6320ddc049e93cca4c5931ad28d1873d34bd8b4 Reviewed-on: https://gerrit.libreoffice.org/67137 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-24loplugin:constparams in basctl..chart2Noel Grandin1-1/+1
Change-Id: I9ac9a34ba58f411d5aad235407553df63216319c Reviewed-on: https://gerrit.libreoffice.org/66791 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-15tdf#42949 Fix IWYU warnings in include/toolkit/*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Icebcf1a6ab073dce935a74ce79ee0f302b62e8a8 Reviewed-on: https://gerrit.libreoffice.org/65947 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-08convert "*xxx.get()" to "*xxx"Noel Grandin11-16/+16
Change-Id: Ic307226591ff9702957ccdec486ccf70357eb6d9 Reviewed-on: https://gerrit.libreoffice.org/65951 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>