summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2020-06-30tdf#134390 update spin button before processing activate signalCaolán McNamara
Change-Id: I698c789c9fe79e931547d8b230a4885393f5ff28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97476 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-30Related: tdf#134390 allow entry "activate" for gen spinbuttonCaolán McNamara
Change-Id: I3c497586479a08089f167ccb890e79e7b9d1f4bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97459 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-30add set_alignment to EntryCaolán McNamara
Change-Id: I004fb0e19c1bb25bdb5d11ba5d5d5f39b137874c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97423 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-30actually call Skia init functionLuboš Luňák
The SkGraphics::Init() docs say it's called by global variable initialization, but that doesn't seem to exist. Call it manually, as it decides e.g. which CPU features to use. Change-Id: I7e0e18290240ff2ae3298d5569c22f7dc083dde4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97415 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-06-30direct 8bit gray -> RGBA conversion in SkiaSalBitmapLuboš Luňák
Change-Id: Ic77f9b8f9244e7fdaca78f91686645eee421d18f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97288 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-06-30differentiate between 8bit and any-bit grey palette (tdf#121120)Luboš Luňák
Only the grey palette with 256 colors means that pixel values map directly to color values. Tdf#121120 has an image with 2-bit palette where color index 1 is (255,255,255), but that means the pixel value 1 cannot be just treated as color. Change-Id: Ifbd953af7f291e4fb8032ea0f4c33c0514770856 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97283 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-06-30Reduce code duplicationMike Kaganski
Change-Id: Ia5526e61c8dd632fbc5eae2d5c02b46b928f4fa0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97430 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-06-29tdf#74424 vcl: Flush() is implemented in OutputDevice so no need for type checkChris Sherlock
Change-Id: I12f177dadf9a637ab3ef2fa7d85fe96d1d141808 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96811 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-06-29tdf#39593 reduce copy/paste in BitmapScaleSuperFilterMesut Çifci
Change-Id: I1f6387d3ff931b0c885e0cb8ee5b99c880a1484e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94137 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-06-29tdf#134054 toolbox: respect drop-down arrow rectJan-Marek Glogowski
When centering the text and icon on the button, the code didn't take the drop-down arrow rect width into account, resulting in an overlapped arrow. This is especially visible, if the drop-down is shown and the button is wrongly highlighted. There is supposed to be some vertical mode, which I couldn't find in the GUI, so this just adapts the width in horizontal mode. Change-Id: I194780dc32db610041ad0ee45a425e1026c7c4e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97358 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-06-29jsdialog: weld drawing areaSzymon Kłos
Change-Id: I7bc75e3de99de84c59b798e4c4dad18550157e43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96851 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97396 Tested-by: Jenkins
2020-06-29jsdialog: click action for drawing areaSzymon Kłos
Change-Id: I2434bec675559a97e5d251c6d6a958464b6db034 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96853 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97395 Tested-by: Jenkins
2020-06-29pdf: add text page object attribs, refactor ImpSdrPdfImport, testsTomaž Vajngerl
This refactors ImpSdrPdfImport to push more functions into the PDFium wrapper. The focus is on text page object attributes. Change-Id: Ie1faf5e3743eec7c77050835651533f9e227c2a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97366 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-06-29pdf: support PDF Form object and getMatrixTomaž Vajngerl
Change-Id: I61f2004df7f9c9ac37959e0b50ea1ff83387c77a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97365 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-06-29pdf: add PDFiumTextPage and PDFiumPageObject + testTomaž Vajngerl
Also use it in ImpSdrPdfImport. Change-Id: I6d353ef60d036c3516448e64a50b25a9befd5db8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97364 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-06-29loplugin:unusedfieldsNoel Grandin
Change-Id: Ia0f517fba3a0660b64c97f426cc2cdfbbcd0ebad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97391 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-28Qt5 refactor mouse event fill codeJan-Marek Glogowski
Adds Qt5Widget::fillSalAbstractMouseEvent to set the common Sal*MouseEvent members. While the member functions of QMouseEvent and QWheelEvent have the same name, they aren't shared via QInputEvent, so this uses a small FILL_SAME macro for less code, Change-Id: I3e5aa52b1bf2774251d97534ce0106a27ef5899b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97343 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-06-28VCL refactor Sal*MouseEvent structuresJan-Marek Glogowski
Moves the common members of SalWheelMouseEvent and SalMouseEvent into a new SalAbstractMouseEvent. Change-Id: I68019a33be47b983976a38a1a5b8d15d12b4c504 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97342 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-06-28pdf: fix text annotation (note) modification dateTomaž Vajngerl
The modification date wasn't encolsed in brackets, which is required for the modification date. Change-Id: Icf91516436b095a8577d3ab10b2a708d10d58cb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97330 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-06-28Qt5 document some VCL (env) variablesJan-Marek Glogowski
Change-Id: I86260975c8a68318d984b768dfc8d1323fc5a06c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97339 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-06-28tdf#131991 Qt5 RTL mirror mouse wheel X positionJan-Marek Glogowski
Just like all the other events, the mouse wheels X position must be mirrord in LO RTL mode. Change-Id: I28e8da0455d941f42f869b08edcdbe570de366c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97338 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-06-27cid#1401342 Uncaught exceptionCaolán McNamara
Change-Id: Ia22ed8541f1148355d71cd5b90ad13e64c1b50c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97289 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-27cid#1464972 Unchecked dynamic_castCaolán McNamara
Change-Id: If40ee310e0a16af7ce93a5f93e2b436069aa153a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97317 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-27cid#1464969 Unchecked return valueCaolán McNamara
Change-Id: I74c1f2d3e45222be7357e0ded70beeb5437ff892 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97313 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-27map has-frame to WB_BORDERCaolán McNamara
Change-Id: I3f0aeceb3015bb09d6b82a631f3b001f9061d090 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97265 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-27those properties should use - not _Caolán McNamara
Change-Id: Ifae279b7ffd50cd7f977e0b03a9207355a9304a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97264 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-27do not use VCL scaling algorithm from SkiaLuboš Luňák
The only threaded one is "Super" (i.e. the default one), and Skia at a comparable quality seems to perform better. And the code is simpler too. Change-Id: I366197fe1a033c1f7a5f5c7f9fdcc00bff74dc11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97278 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-06-27properly copy pending scale quality in SkiaSalBitmapLuboš Luňák
EnsureBitmapData() was using Create() to make a copy of the bitmap to scale, but the quality was not copied, so it was usually at the default (and slowest) high quality. Change-Id: I7100304a935db420e2d55c2a9450016be1195965 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97277 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-06-27cache raster scaling also in Skia's drawAlphaBitmap()Luboš Luňák
Change-Id: I52849097267326cb362b113241179a766d286a6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97273 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-06-27use boost::make_shared_noinit()Luboš Luňák
The unnecessary initialization of all elements with plain boost::make_shared() actually shows up in the profiler. Change-Id: I054b13ac74362aca7f2dfa7dc746d3a80c7f1042 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97267 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-06-26use Skia's SkShader for blending bitmapsLuboš Luňák
It turns out it's sometimes more efficient to use SkCanvas::drawPaint() with SkShader::Blend() used to blend bitmaps together, rather than manually creating temporary SkImage for the blending. This way it saves memory and it also performs faster e.g. for tdf#134237, where when zoomed it processes only relevant parts of the images instead of blending a whole enlarged image). Sadly in raster mode it is sometimes still faster to cache the image (e.g. with tdf#134160), so keep the caching there as well, for when useful. Change-Id: I887ae330907100c21a0d152783fcd7e8ef230355 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97238 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-06-26extend FormattedSpinButton to allow custom input/outputCaolán McNamara
Change-Id: Ie84c1d46bc6fa3e29ed97147de486911dc6ecc0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97217 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-26SAL_DISABLE_GLYPH_CACHING is OpenGL-only againLuboš Luňák
Change-Id: Icafc5a7b7ea5bed67a0a44db6e4e92b3beba55c0
2020-06-26Upcoming improved loplugin:elidestringvar: vclStephan Bergmann
Change-Id: I4ffe3cfd0ed9a45607e978df88ae230ec04a152b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97204 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-26vcl: split off QueueInfo to own filesChris Sherlock
Change-Id: Ib2904066edd371229c5daa09b81b210e99853895 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96251 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-06-25loplugin:virtualdeadNoel Grandin
Change-Id: Idcaaecd5be080e43b731f8edcbbfb8aed5e2e28c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97048 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-25handle nullptr pointers in Skia debugging functionsLuboš Luňák
Change-Id: I2c500444f97f66b03cc0e0a27581ced4d1cfbf22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97102 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-06-25log properly the compiler used to compile SkiaLuboš Luňák
Using #define's directly from VCL will report the compiler used to compile VCL, which may be different from the one used for Skia. Also truncate the log file on opening. Change-Id: Iddf613613df20505f1abe1dd5468dcc8c7041410 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97090 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-06-25sd signature line: place shape on the correct pageMiklos Vajna
PDFDocument::Sign() had this hardcoded to always place the signature widget on the first page, add a way so that xmlsecurity/ can tell the pdf signing code to put it on an other page. This way in case the user created the signature line shape on the Nth page, it'll end up on the Nth page of the PDF result as well, as expected. Change-Id: I63decba98774151e9634ea924c2fed0f7814cb28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97045 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-06-25use tools::JsonWriter for dumping property treeNoel Grandin
Change-Id: I8f55af19ba10b71bd621e69b27000ab7cb565309 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96677 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-25loplugin:unusedfieldsNoel Grandin
Change-Id: I7d8cd41c6b4b97a6d33764a8580f08413e584a69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97046 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-24loplugin:unusedmethodsNoel Grandin
Change-Id: Ib724da1f07be9e8f4d0d505f7f2886990cab661f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97022 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-24Move DumpAsPropertyTree code to cxx fileSzymon Kłos
Change-Id: Ib450c860aa11f0e8be933de4c6e216ca9c0d0b5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97018 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-24use gtk_label_new_with_mnemonicCaolán McNamara
Change-Id: I0282e6c467cd4f07780df65f7d9bade1c377e261 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97037 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-24Move SalInstanceDrawingArea decl to header fileSzymon Kłos
Change-Id: I941b8f52a4c69c65c3ccbe08f3cf6d1427783f90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97013 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-06-24optimize AlphaMask::BlendWith()Luboš Luňák
It shows up in profiling in some cases (e.g. tdf#134160). - If it's 8-bit, simply work on scanlines instead of pixel by pixel. - The extra precision from using floats doesn't matter and the round() costs something (at least with MSVC). Change-Id: I37bbe31fae03d61946a7382de1fb79cfe2d2ec30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97010 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-06-24in Skia raster mode cache even enlarging of images (tdf#134160)Luboš Luňák
Change-Id: I842b55cd922eb0e411fd7450e84224b41ba82a2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96989 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-06-24one more BmpConversion::N8BitNoConversion for alpha hackLuboš Luňák
This was supposed to be included in 2fcfbd73768b69ba58607a054e7f851be2942992. Change-Id: I79b6f1c953784d3288d3830dbe232630aac392f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96987 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-06-24tdf#127138: Fix detection of system icon theme with Qt5/KF5Igor Poboiko
The title is self-explanatory. The QIcon::themeName() actually uses Qt Platform Abstraction plugins, i.e. it's aware of KDE preferred icon theme via Qt Plasma integration module. (note that it is _currently_ broken due to KDE bug https://bugs.kde.org/show_bug.cgi?id=402172, which causes themeName to return empty string; however, it's being worked on) Change-Id: Ibc7cf9ee9ae73b492046219487760561d7d2ea45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94691 Tested-by: Jenkins Reviewed-by: Katarina Behrens <bubli@bubli.org>
2020-06-24jsdialog: send selected tab and namesSzymon Kłos
Change-Id: I54db09a7a0311b5ed9bc0764c353b82bb99b9e41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94620 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96932 Tested-by: Jenkins