summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2020-01-27theming: avoid continually attempting to load missing theme library.Michael Meeks
Saves a slew of system-calls. Change-Id: Ibd9b8695d071dbddd1717b5c9f3349f3696458b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86829 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2020-01-14lok: avoid emission storms of un-necessary invalidations.Michael Meeks
Common when constructing widgets with VclBuilder - which avoids the 'Show' detection Pranav introduced in 8de98e61fbc. This saves ~80% of the ~100k mostly bogus calls I get to: desktop::CallbackFlushHandler::processWindowEvent when opening and closing a few windows. Change-Id: Ie508d6e19274472b85543275aee33f078ddcbbb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86537 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2020-01-06fix backportAndras Timar
Change-Id: I75c9f5bf788fcadb9eb69a0e7e58d32779fc46a2
2020-01-06headless: optimize DrawWaveLine / drawPixel.Michael Meeks
ImplDrawWaveLine - used to render colored lines under mis-spelled and/or grammatically interesting sections uses (for better or worse) 'drawPixel' to draw the line. Implementing drawPixel with a tiny B2DPolyPolygon is easy reading but triggers the unbelievably expensive SystemDependentDataHolder paths as well as some big chunks of logic for very large numbers of pixels (if you have lots of mis-spelling this can make typing visibly slower.). Also includes other fixes: Author: Jan Holesovsky <kendy@collabora.com> Date: Wed Dec 4 18:23:22 2019 +0100 headless: Don't leak the cairo context in drawPixel(). Change-Id: If841f655ac634eee2dc7ca6e9445d2f204546545 Author: Jan Holesovsky <kendy@collabora.com> Date: Thu Dec 5 11:05:39 2019 +0100 drawPixel() should still get 'true' for bXorModeAllowed. That part of 7b267be4b2c87b2c3987d4d751307977a7d3ad41 was not necessary. Change-Id: Ie6ad513e27f820bcad5030579428374c8d22fb3d Reviewed-on: https://gerrit.libreoffice.org/81622 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/84890 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2019-09-06band-aid: deprecated-declarations related to cupsJulien Nabet
Change-Id: I07438840fc1c3cc8e70559d44954be0c49531525 Reviewed-on: https://gerrit.libreoffice.org/64191 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit e9e49fceac43476d1233ee8106cba5f4831771b9) (cherry picked from commit ca9aae711332e5affef75b1f11c45761a5a3b4a5)
2019-09-06band-aid: deprecated-declarations related to gtkJulien Nabet
Don't hesitate to revert this one but only if there's a patch to fix it. Change-Id: Ib15352e1a94d0542120f6710acfe19887494ed51 Reviewed-on: https://gerrit.libreoffice.org/61142 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 618d474f059a75c2ac04df16c830d71a88690118) (cherry picked from commit 986d47dbf57008643d8126e7d71de47f32a15508)
2019-06-17tdf#124907 vcl: react to pan gesture for listbox and other widgetscd-6.0-29Tomaž Vajngerl
Reviewed-on: https://gerrit.libreoffice.org/74087 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 08f485c6e92bd56c8c26171316b842cd213a8a09) Change-Id: I4579f8edd2bf24506b1d55a7291cd86e276f30a4 Reviewed-on: https://gerrit.libreoffice.org/74164 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2019-06-17lok: remove ext text event re-entrancy hazard.Michael Meeks
Change-Id: I7566c158330bab77589d422c61c64210727ab835 Reviewed-on: https://gerrit.libreoffice.org/73625 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/73756 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2019-05-08lok: disable VCL painting and whole window invalidation.Michael Meeks
The reasoning is somewhat complex: void Window::ImplInvalidateFrameRegion( const vcl::Region* pRegion, InvalidateFlags nFlags ) sets the mnPaintFlags on the mpWindowImpl - and then queues an idle paint. This paint in LOK mode does ~nothing - since all rendering is tiled, although amazingly it does emit eg. selection callbacks. However the paint flag - changes the behavior of Window::Update() to force a complete window invalidate. This happens, but only rarely - when a key-event manages to get into the mainloop before the idle paint handler arrives and does nothing (except clear the paint flags). So - don't do these big invalidations we don't need to in lok mode, unless it is for dialogs - which presumably Pranav wanted fixed by 625087b58f3b7. Change-Id: I88dda34b8d8bba9c89296d883ad9169fe49a7c5e Reviewed-on: https://gerrit.libreoffice.org/71396 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit d36f089b2898ed4d066fc656f36543c9e13c0f48)
2019-04-22tdf#101854 Move to CommonSalLayout removed faux bold in macosTomaž Vajngerl
Previously faux bold was drawn with setting a dictionary key kCTStrokeWidthAttributeName and a value of the stroke width. This stopped working because we don't use attributedString for drawing anymore but we always use CTFontDrawGlyphs and draw the glyphs, which doesn't have a way to set this attributes. It took me a while to find a workaround (thanks to Apple's great documentation), where we switch text drawing to fill and stroke, and after that we can modify the stroke by changing the line width. Reviewed-on: https://gerrit.libreoffice.org/71012 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit eb5606511fac2a8ee1af7cc03c12d6c5b16f7c96) Change-Id: I594fcb9c796a9c04ea8234a9938ca2f719706199
2019-04-18tdf#124032 fix Edit background drawingTomaž Vajngerl
IsPaintTransparent() is preventing to paint the background but not sure why this is needed. removing this condition doesn't seem to have any ill effects. Reviewed-on: https://gerrit.libreoffice.org/70855 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 1e917af27d18d934f3e9122aa98cd950b74ca246) Change-Id: I5ac54e208e4f1c9941beb4012aa44182d21dbed9 (cherry picked from commit 23d475949580d1b104f9bd34abe0441cfc0461ae)
2019-04-13sd: unit-test to check that PDF stream is shared among Graphic instancesAshod Nakashian
Change-Id: Iebd85e5e60c76e6d0756d15e1fa6107a3fcc837d Reviewed-on: https://gerrit.libreoffice.org/70162 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-04-12At least tell by how many ticks we are too earlyTor Lillqvist
Change-Id: I71a822495c8a41cf01efe611911afcafea81118d
2019-04-10Embedded PDF: It is a shared_ptr, no need to copy.Jan Holesovsky
Change-Id: Iedb31bbe0e81dc9568e84858d8d26eac03c47ffb Reviewed-on: https://gerrit.libreoffice.org/70208 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-04-05support opacity for widget definition draw SVGsTomaž Vajngerl
This opacity influences the whole shape (stroke and fill). Reviewed-on: https://gerrit.libreoffice.org/70292 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit fcb00ac8ebe2acb429f09ef5b728b8c73a5bbc37) Change-Id: I82e10e07dbf2f321805b55a5f4831a513e52dab8
2019-04-05fix spinbox right press SVG - plus sign didn't define a colorTomaž Vajngerl
Change-Id: I1db6c5e4841530be7d46e8829899bf3f8cef8a3b Reviewed-on: https://gerrit.libreoffice.org/70293 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 95573cad5793ab6743307890b56c205e21fe9d6d)
2019-04-05Related: tdf#124148 null-deref on clicking inside empty listboxCaolán McNamara
since... commit ce9dab8c161e29769131cec741a6a9cceec8552d Date: Thu Mar 28 17:43:29 2019 +0900 tdf#124148 add configurable margin for the listbox pop-up list Change-Id: Id0bedb86f4fb74aff230d65f1e4371959814fd0f Reviewed-on: https://gerrit.libreoffice.org/70151 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 728f074ab672469af933d492843230bd5c5bd0cd)
2019-04-04Fix compilation in !HAVE_FEATURE_PDFIUM caseTor Lillqvist
Change-Id: Ifc5e82f9bf57c76abe8810911f8f4339f9763453
2019-04-04ios widget defs: update combobox, checkbox, spinbox SVGsTomaž Vajngerl
In addition remove spinbox pressed state (it wasn't useful) and draw white filled empty rect for spinbox as we don't draw the background automatically. Change-Id: I892108c5839dc463cdb9e4f4f09276fc184f4944
2019-04-04ios theme definition: add slider disabled stateTomaž Vajngerl
Change-Id: Ie4388f00c4a0c11df77782691fe9ea7f706d2b5c Reviewed-on: https://gerrit.libreoffice.org/70231 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit aa5abc875934990d1ecec17abc6c58d51afd10b1)
2019-04-04tdf#124155 fix slider to not go beyond rect boundsTomaž Vajngerl
We need to ask the NWF for the size of the thumb and not just use the hard-coded value. Reviewed-on: https://gerrit.libreoffice.org/70201 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 9956cf0692058414ef3efdb0e8058fbb0b39f6bc) Change-Id: I98c6b5782c6a043fc358198ddf844d36d7aa90d6
2019-04-03pdfium: Returning a const std::shared_ptr<...>& is not recommended.Jan Holesovsky
Change-Id: Iff6acef712c5b95c8cc222fc5293c9304b1c03ec
2019-04-03pdfium: Use std::vector to hold the PdfData.Jan Holesovsky
This fixes the destruction of the static cache of the PDF data; without this, there were already missing uno runtime info. Change-Id: I877c9ccf96c4b7eabf3d643e17f324d86d987f94
2019-04-03pdfium: Delay the swap out.Jan Holesovsky
If we swap out too early, the constructor of GraphicObject forces a swap in, so we'd render everything during the load anyway. Change-Id: I0ea1a755242fd57ef28d082ce4bf534a32199f87 Reviewed-on: https://gerrit.libreoffice.org/56286 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-04-03pdfium: Avoid unnecessary copying + some warning fixes.Jan Holesovsky
Change-Id: I114fa6b2d3dda86c55eb245d31ca3a1019197ae9 Reviewed-on: https://gerrit.libreoffice.org/56285 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-04-03pdfium: Import PDF with unloaded images.Ashod Nakashian
Change-Id: I5e4a16ff38b9643127ce16879b35f456c13bcff8 Reviewed-on: https://gerrit.libreoffice.org/56268 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-04-03Fix linking error in the !HAVE_FEATURE_PDFIUM caseTor Lillqvist
Change-Id: I74e290ce1af4b85f6495acef4ecc9a276b6df40a
2019-04-03Fix build in !HAVE_FEATURE_PDFIUM caseTor Lillqvist
Change-Id: I99baba8734b9e03d3986e448bf278587101d24ef
2019-04-03pdfium: Keep the PDF data in memory, so that we can really share them.Jan Holesovsky
Otherwise the swap out / swap in creates new copy of the underlying PDF stream. Change-Id: I88a16a69143783a998201e183bea1a9553e337bd Reviewed-on: https://gerrit.libreoffice.org/56266 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/69626 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-04-03pdfium: Share the GfxLink for PDF files.Jan Holesovsky
Partially based on work by Ashod Nakashian, thanks! Reviewed-on: https://gerrit.libreoffice.org/56265 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> Change-Id: Id7e8c4543368b0caf3e459abaff8c53997779c83 Reviewed-on: https://gerrit.libreoffice.org/69625 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-04-03vcl: share GfxLinkAshod Nakashian
When importing PDF as images, we store the PDF stream in the GfxLink. For large PDFs storing a copy of the full PDF with each page is overkill. For example a 10MB PDF with 200 pages will consume 2GB of memory! Change-Id: I99913514cf5c562683080bc817668095bee69427 Reviewed-on: https://gerrit.libreoffice.org/55571 Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/69624 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-04-01Resolves: tdf#123175 don't use NWF to draw buttons with an overridden bgCaolán McNamara
Change-Id: I434f476f62c5c754d96eeb0cb9ad7c0b8d38ccec Reviewed-on: https://gerrit.libreoffice.org/70069 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-01tdf#124150 increase size of color valueset widgetTomaž Vajngerl
Size of the color value set can be set through settings, but there was no setter. Added a setter and set it to a bigger value so it is better suited for touch. Change-Id: I8c9b17f7379c4702b0faf7847f1e6292cd89b0d0 Reviewed-on: https://gerrit.libreoffice.org/70031 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit c2108dd683ec7ff0bcaac8456c6cce9610a2993a)
2019-04-01ios theme definition: file rename svgx -> svgTomaž Vajngerl
Change-Id: I9bebc4405185496b8243e6f7951a2a9f0b6559fb Reviewed-on: https://gerrit.libreoffice.org/69932 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 45f975f8180f782cf71173a4526d17d6e74b9583)
2019-04-01tdf#124148 add configurable margin for the listbox pop-up listTomaž Vajngerl
This is needed to increase the area of lisbox entries in the pop-up list so it is easier to select with touch. Reviewed-on: https://gerrit.libreoffice.org/69889 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit ce9dab8c161e29769131cec741a6a9cceec8552d) Change-Id: Iedb910508de26c903dc3f50f645f567d4c988940
2019-03-29Avoid dialog headings showing up as some serif font in the iOS appTor Lillqvist
Apparently the use of [UIFont systemFontOfSize:10] familyName] to get a default font family name is a bad idea. Presumably the return value from this, ".SF UI Text", is matched against the list of font family names enumerated from the system. (The "SF" apparently stands for "San Francisco".) That ".SF UI Text" is not among them, so maybe vcl chooses some arbitrary other font instead that happens to be a serif one? If we instead use "Helvetica", at least we get a sans-serif font, even if it doesn't match the system UI font exactly. Change-Id: I7ff39d8e7893ce3c27f3f12d227f87209bbc7952
2019-03-29Use the colibre icon theme in Online and appsTor Lillqvist
Change-Id: Idb79b3d4b1f14712f2e03d17fca6bec56f317edf
2019-03-28Revert "vcl: share GfxLink"Jan Holesovsky
This reverts commit c8f81dbb30e89a19bb7a82f8b52cc02b9049e717.
2019-03-28Revert "pdfium: Share the GfxLink for PDF files."Jan Holesovsky
This reverts commit 62654a8c29b945d00afe9f32e87b44ba0d8b84a2.
2019-03-28Revert "pdfium: Keep the PDF data in memory, so that we can really share them."Jan Holesovsky
This reverts commit 6a96ea6378986ad7a8951dde583ae590edae1a65.
2019-03-28Revert "Fix build in !HAVE_FEATURE_PDFIUM case"Jan Holesovsky
This reverts commit 77a735be8a2196e890e88662fe73816fa44dd023.
2019-03-28Revert "Fix linking error in the !HAVE_FEATURE_PDFIUM case"Jan Holesovsky
This reverts commit f961ebd3ea10313c409165f84ff0885fc2b09874.
2019-03-27Fix icon load error for uno commands with paramsMuhammet Kara
Change-Id: I80be21b551cbd4eb029cb660fca98aef2727d584 Reviewed-on: https://gerrit.libreoffice.org/69850 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2019-03-27Make contents of combobox follow the finger when scrolling with a pan gestureTor Lillqvist
It is the contents that we are dragging with the gesture, not the scrollbar "thumb". Before this change, the contents used to move much faster than the dragging finger. I am not sure whether it is still fully correct, though. Might be just coincidental that dividing with pVScrl->GetVisibleSize() happens to work nicely for typical comboboxes. Change-Id: Id95a4bf9d2bb4e950dd85c6bebb4d2b5f2726ee0
2019-03-27Fix linking error in the !HAVE_FEATURE_PDFIUM caseTor Lillqvist
Change-Id: I74e290ce1af4b85f6495acef4ecc9a276b6df40a
2019-03-27fix build against masterTomaž Vajngerl
Change-Id: I7ccdbc690d556ecf60ba3a98f67d5de2b0fbf434
2019-03-27tdf#124146 Support panning (pan gesture) of the combobox listTomaž Vajngerl
Change-Id: Ic57f4b784d96e69c71caa0e47dbe8117b019a712 Reviewed-on: https://gerrit.libreoffice.org/69656 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 2ccc0a9e24e3f02bfce39af922b5a4972baa2968)
2019-03-27tdf#124146 add (general) gesture event support to VCLTomaž Vajngerl
Reviewed-on: https://gerrit.libreoffice.org/69655 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 6b476080da0678faa59606ef814760bd4235de24) Change-Id: I766930bb35071442e132b91477cd3d55e8f00f48
2019-03-27Rename DrawCommand* to WidgetDrawAction*, remove unused circ drawTomaž Vajngerl
Reviewed-on: https://gerrit.libreoffice.org/69654 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit d3922a93a096e07ab54e91fd0dd7c86302f33b78) Change-Id: Icef900e75255d477812a198fdb29e0cdebba35b8
2019-03-26Fix build in !HAVE_FEATURE_PDFIUM caseTor Lillqvist
Change-Id: I99baba8734b9e03d3986e448bf278587101d24ef