summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2021-08-23first WIP version of mac skia SalGraphics backendLuboš Luňák
It doesn't yet blit to screen, but the basics should be there. Change-Id: I0f77b66756f578d84d0cee16cda00e7a2fea714f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120805 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-08-23fix skia scanline size in bitmap testLuboš Luňák
Change-Id: I22a315ca56cae80d88898e2df1ed44894c9787b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120804 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-08-23jsdialog: weld BoxSzymon Kłos
Change-Id: Ideb7b7ce8d7bf2e8494f053b13d662e19060b256 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120792 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-08-23Move SalInstanceBox decl to headerSzymon Kłos
Change-Id: I945fdbb17caf417990d3531175328099f1a6c93f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120791 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-08-23ofz: use BmpScaleFlag::Fast when recovering from bad svm mask sizeCaolán McNamara
this isn't supposed to happen and is an error recovery added by: commit baebeb7de4c5f9511e45c2846ec2a72861a948c0 Date: Fri Jul 27 14:04:19 2012 +0000 Resolves: #i120165# Adapt Mask/Alpha at BitmapEx construction... when size differs from base bitmap so use the time-cheapest scaling available Change-Id: I6ea8f458681dcb69e1c128040cc550dd86ff7151 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120855 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-23gtk4: fix buildCaolán McNamara
since... commit 0f6457b1e867c49bc82f2b18e2e462fb7100051f Date: Sat Aug 21 17:04:39 2021 +0200 don't store vcl::Font with unique_ptr Change-Id: Ib7db1a59ec328d0a387d836d813c05910a30ebc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120854 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-22no need to use unique_ptr for PolyPolygonNoel Grandin
it is already a COW type Change-Id: If28f67bff3f8df7763bf4b574b1125d568f0ee27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120821 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-22don't store vcl::Font with unique_ptrNoel Grandin
it is already a COW object, so just use std::optional Change-Id: I5ced54dbf3dc222316d9bcf3581b36e0f6e6e270 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120818 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-22speedup SkiaSalGraphicsImpl::drawPolyLineNoel Grandin
no need to convert the line to a polypoly and then unwrap the polypoly, just go straight to a poly Change-Id: I3f0ccfb7ce557dc4c6cd67e6e66a0562609ce736 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120843 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-22no need to use shared_ptr for these fields in RegionNoel Grandin
they are already COW types Change-Id: I8b673304452cc50c581be03a605efafa77175b2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120829 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-22no need to use unique_ptr for LineInfoNoel Grandin
it is already a COW type Change-Id: I32866e6741748be587cdb8af83143bc70e82318e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120820 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-20tdf#142394 return to using CAIRO_OPERATOR_SOURCE in drawBitmapCaolán McNamara
since commit cd09fc9451897e6efedbf9f5e1d5b9bd96e65cb5 Date: Mon Mar 22 19:06:15 2021 +0100 do not enable mbSupportsBitmap32 for headless (tdf#141171) turned back off the mbSupportsBitmap32 support experiemented with in commit 86ea64f216819696cd86d1926aff0a138ace2baf Date: Fri Feb 15 13:14:32 2019 +0100 Support for native 32bit Bitmap in VCL and SVP (cairo) backend Change-Id: I818c3f11d0334278a65a0e45b61141327669121d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120709 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Jenkins
2021-08-20New loplugin:unusedcapturedefaultStephan Bergmann
In sc/qa/unit/ucalc_formula.cxx, dropping the capture-default from the lExpectedinF lambda revealed that MSVC in C++17 mode (i.e., when building without --with-latest-c++) requires ROW_RANGE (a local const int variable from the enclosing TestFormula::testTdf97369) to be captured, even though all uses of that variable within the lambda body are constant expressions. That is still true at least for the latest Visual Studio 2019 version 16.11.1. (This is not an issue for the lExpectedinH and lExpectedinI lambdas a few lines further down, as they, in addition to using that ROW_RANGE, also use the local const double variables SHIFT1 and SHIFT2, whose uses are not constant expressions, so they are implicitly captured and loplugin:unusedcapturedefault does not suggest dropping those lambdas' capture-defaults in the first place.) Change-Id: Iee7efb485187cbe8eba6a2d470afca4993eb1816 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120693 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-20make BitmapPalette a COW typeNoel Grandin
so we can avoid copying it during rendering Change-Id: Id83d2bb2682f46188ee6ccc90c92d338a1e05b98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120759 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-20tdf#143957 Qt5 always create an OpenGLContextJan-Marek Glogowski
Nothing checks the result and a lot of code just uses it. Change-Id: I1a672e98d42673fd684538ead831622f6a14e9f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120761 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-08-20VCL allow plugins to declare OpenGL supportJan-Marek Glogowski
... and get rid of the whole GetBackendCapabilities, which was just overkill. Maybe this should even be some bitmap + enum + set/get function, but I'm too lazy... In the end add a bool for the OpenGL support of the VCL plugin (or maybe sticking it into ImplSVData, which is already some catchall for common VCL data). Change-Id: I9f0ececac482d8e2a94ef6024628e9631b49e773 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120760 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-08-20Convert AreaTransparencyGradientPopup to WeldToolbarPopupSzymon Kłos
Change-Id: I3cbb17de9953281e884f6c1b2984bc4865a56227 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118471 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120700 Tested-by: Jenkins
2021-08-19loplugin:sequenceloop (macOS)Stephan Bergmann
Change-Id: I5d004dfcce2ce1aad520f9e541432a60627161a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120739 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-19vcl: move ImplReleaseFonts() to outdev/font.cxxChris Sherlock
Change-Id: I4bd54c24f415e28014690fd775a3a5136d2be433 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115371 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-08-19vcl: add braces to SetBackground() function to make reading easierChris Sherlock
Change-Id: Icb91c4e8aae3f6f25515ca75a3cc230d9238dd4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115370 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-08-19vcl: move background functions to background.cxxChris Sherlock
Change-Id: Iee2e42f3881512d2e779d16505c50f76731e398a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115369 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-08-19reduce skia re-alloc costs (tdf#105575)Noel Grandin
by reserving space before building the SkPath Change-Id: Ic01f614bf574fd3252d379ed38e3039cb0c56b18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120701 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-19jsdialog: dump id for imagesSzymon Kłos
Change-Id: Ia25dde027f79bc9c3c22cbaccdb41c2ff1ae4214 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119504 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120661 Tested-by: Jenkins
2021-08-19cid#1490358 silence bogus Dereference after null checkCaolán McNamara
Change-Id: I58734852180f345ac2242d5d89e3d7e5da2ed6e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120684 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-18loplugin:constparamsNoel Grandin
Change-Id: Ic7410f836e584df45101e78e345c8b3c8d355e09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-18tdf#143114 Avoid StartDrag on TreeListBox when CaptureOnButtonArmin Le Grand (Allotropia)
The original method SvTreeListBox::StartDrag always triggers a MouseButtonUp event and tries to initiate a Drag of a Line of a TreeListBox (on MouseMove, btw). This is not wanted if the last MouseButtonDown started a ButtonActive mode and activated CaptureMouse, prepared to trigger Action on that Button on MouseButtonUp. It leads to unwanted/strange behaviour of Buttons/CheckBoxes when used in TreeListBoxes. The behaviour is also dependent on the UI implementation used under Linux (gen/gtk3_kde5/gtk3/qt5/kf5) which are all (unfortunately) behaving differently, but a first suggestion/ step to enhance the situation. Found now for gen/qt5/kf5 that when on the LineEntry, but not on the CheckBox, on MouseButtonUp the other line gets switched. Corrected that. Also moved call to base class method MouseButtonDown in SvTreeListBox to the end of function due to that call may lead to current incarnation getting disposed. That was the reason for the crash described in tdf#143749 Note: for gtk3_kde5/gtk3 there remains the problem that the CheckBoxes get switched on MouseButtonDown, butt these are generic widgets and this needs to be solved differently. Change-Id: I9b73d9a7230469664dd6041f81b399e7d933852b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120593 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2021-08-18loplugin:passstuffbyrefNoel Grandin
Change-Id: I4f01eb3842ef198f02af274f54afb2760c820a4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120655 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-18jsdialog: dump FixedImageSzymon Kłos
Change-Id: I9803558fa19ef5e508817d5db0bdeb54827f63d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118969 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120629 Tested-by: Jenkins
2021-08-18undo changes to TextAlignCaolán McNamara
revert commit 8689bd5490b473a7ffb149bbe5f7f0683f679c72 Author: Caolán McNamara <caolanm@redhat.com> Date: Thu Jul 29 20:49:29 2021 +0100 convert TextAlign to scoped enum lets leave this as it always was Change-Id: Id4d2a5644974cdd2b0ed6d361d5c52629674d057 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120626 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-18ofz#37315: Invalid-enum-valueCaolán McNamara
Change-Id: I573ecf0cd1bd7b71ebf77a503d9937ee9f9d867c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120627 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-18jsdialog: dump selected state for toolitemsSzymon Kłos
Change-Id: I8c2c017168e4feae6e24118153906ee24ed90a5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118893 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120615 Tested-by: Jenkins
2021-08-18jsdialog: send type for popup messagesSzymon Kłos
Change-Id: Ic0f189645dc9a1164cbbc528b3a5d30d72ee3333 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118552 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120613 Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2021-08-18gtk3: fix warning about GtkBin already containing a widgetCaolán McNamara
Change-Id: I9df18e9cc865a8600f26605530eb99b9ba8f0d36 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120607 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-18ofz#37305: load of value 131 which is not a valid value for type 'bool'Caolán McNamara
Change-Id: Icd535272bfc2ef62399fa889f73acd705b566973 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120622 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-18loplugin:sequenceloop also check for B2DPolyPolygonNoel Grandin
which has the same problem Change-Id: I98f9924626f26739e91d6a9d21e4276473ea314d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120620 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-17ofz: Indirect-leakCaolán McNamara
Change-Id: Ia29c771d6dbdf37b55ce0e63cc73564bcea6f5c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120346 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-17jsdialog: don't send unnecessary close messageSzymon Kłos
Change-Id: I4077c0871c7e6faf4917ad22a1a3aae8eb972961 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118549 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120569 Tested-by: Jenkins
2021-08-17jsdialog: dump image for toolitemsSzymon Kłos
Change-Id: If47eb57cc18c6f04e5b2e3a14a6bcea657e03df8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118472 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120543 Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2021-08-17jsdialog: image for radiobuttonsSzymon Kłos
Change-Id: Ic6027223c5771ffb659a4503cfd305d0decc2433 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118465 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119244 Tested-by: Jenkins
2021-08-17jsdialog: simplify popup codeSzymon Kłos
Change-Id: I3a84b1f7c8521b861e99384872127bb4d224c18b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118409 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120542 Tested-by: Jenkins
2021-08-17Remove metaact::Write and metaact.hxx:Readpanoskorovesis
Their functionality is implemented from the appropriate handlers in SvmWriter and SvmReader respectively Also remove ReadMetaAction, meta_action_name as they are not used anymore Change-Id: I10e846226426d40579310ea0e1bc411ac018991b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120471 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-08-17Move GDIMetaFile::GetChecksum to SvmWriter::GetChecksumpanoskorovesis
Move the method and update all the method calls from GDIMetaFile::GetChecksum -> SvmWriter::GetChecksum Remove the method from gdimtf Change-Id: I68e2b3cf99178947ac4f1474810dd5568f07e122 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120414 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-08-17Remove unused methods from gdimtf.hxxpanoskorovesis
Remove GDIMetaFile::Read, ReadGDIMetaFile, GDIMetaFile::Write, WriteGDIMetaFile. Their functionality is covered from SvmReader::Read and SvmWriter::Write respectively Change-Id: Id3d22e251d19c2898359a6c1dbeffbc53419540b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120409 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-08-17Replace GDIMetaFile::Write and WriteGDIMetaFile with SvmWriter::Writepanoskorovesis
Use the new write functionality. This change also sets SvmWriter::Write second argument as const, as it's value does not change Change-Id: I1620756542a0bc54b5f8fc7ce3f57d0243a2ee55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120408 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-08-16Rename setX/setY to SetPosX/SetPosY, to align with SetPosMike Kaganski
Change-Id: I856194f26fefad993f416d7b92b57a9417a3c0a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120546 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-16Drop tools::Rectangle::getX/getY, which are just duplicates of Left/TopMike Kaganski
The change allowed to simplify many places where previously this API was used, to avoid inefficient calculations (e.g., moving rectangle keeping its size, and then immediately changing the size). Change-Id: Ica2dc594d91cae83e2c2740c1f4fb23f44998916 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120461 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-16backendtest: Asymmetrical Filled Drop Like Shape testhomeboy445
Change-Id: Iacf121483aefa71d6f24e14782fcaf22c0d5d56e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118859 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-08-16Revert "tdf#143114 Avoid StartDrag on TreeListBox when CaptureOnButton"Julien Nabet
This reverts commit ca7dab5d96e73b7b4b045e2460e0b2ee150757db. It created tdf#143749 + the dup tdf#143865 Change-Id: Ibd68c45213491b0df7dc36f0418de307412499c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120531 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-08-13cid#1490210 silence Arguments in wrong orderCaolán McNamara
Change-Id: I8767fe556142ec7e3254eaff56bbb1b4eb8322e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120462 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-13no need to lookup window if cursor has not moved (tdf#105575)Noel Grandin
use a single-item cache to avoid calling WindowFromPos Change-Id: I0d42c9572d28363949e38f3e052973727a44fb4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120419 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>