summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2021-07-03cid#1486702 Uncaught exceptionCaolán McNamara
Change-Id: I672c406368f0fd8762349c993cd3febbe5720b2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118351 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-07-02vcl: drop GenericUnixSalDataTypeJan-Marek Glogowski
It's just used for a singke assert and SalData is generally just used as a static cast. Change-Id: I8d74e82e511413d940a3f200f022a9204e588cd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118288 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-07-02gtk4: reenable some more working dialogsCaolán McNamara
Change-Id: Iff3ac86df4b1d028500356ae744e68a0b4712aae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118317 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-07-02convert SvSortMode to scoped enumNoel Grandin
Change-Id: Ic137e1918f8fa33fbfe6a622be20aa4001172e2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118280 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-02convert AccessibleBrowseBoxObjType to scoped enumNoel Grandin
Change-Id: Iaf764c905d080e4decabd853bd3847b34cb79cdd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118279 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-02tdf#143149 fix crash if app exits while print progress is runningCaolán McNamara
dismiss the dialog if its parent goes away, but leave the print job running Change-Id: Ic29ee0300a7d9476ad27a2594a555312e30c74f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118244 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-07-02tdf#142923 Deleting comment in Writer leaves visual artifact behindNoel Grandin
regression from commit 9abedad72c73ad83b66f3f8d261efdc5ce889683 Date: Sun Mar 28 10:28:45 2021 +0200 Drop Window::IsDisposed Change-Id: Ib804a1b42ea6be97b69184c76e67636f5b082974 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118224 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-01tdf#143059 sw export: fix assert crashAttila Szűcs
Incomplete reset in SkiaSalBitmap::ResetAllData() was followed by a broken scaling of a dummy image without buffer/image data. SvxLineStyleToolBoxControl::statusChanged(....) creates a dummy image via GetBitmapForUISolidLine... deleted its image/buffer data immediately ("no line style" dummy image preview for the line style popup list). But the dummy image wasn't ready, it still needed postponed scaling processed by the GPU. This information wasn't reset by Erase, and without pixel data it couldn't be scaled, so this dummy image became a forever "not ready"/ "waiting to be scaled" image. There are parts in the code that require that the image is already scaled... These parts check if scalings are ended with the assert(mPixelsSize == mSize). Note: Use the following method to start LO with Skia in Linux SAL_USE_VCLPLUGIN=gen SAL_ENABLESKIA=1 ./soffice Co-authored-by: Tibor Nagy (NISZ) Change-Id: I5099eb8671a1c5d16668743f26feb47fe99cd70e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118204 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-07-01exclude some tests for non-default DPINoel Grandin
Change-Id: I579a25040f42fd930a59079f430423806544752b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118222 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-01svp: a bit more correct focus handlingJan-Marek Glogowski
Took me a while to realize, that the focus handling after closing a dialog was somehow broken. This isn't a really good solution, because we can still focus invisble frames, but that is at least needed for CppunitTest_sd_tiledrendering and the reason that crashes for non-headless VCL plugins. Change-Id: I272837bd965439c5c0cd9c8bcbc9d51e3018fdf3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118130 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-07-01BmpCombine::And is deadNoel Grandin
ever since commit ddd2639a482befb4a3bf1f75a88e66c21a691b67 Date: Sat Feb 27 15:50:37 2021 +0200 drop mask from BitmapEx Change-Id: I45fae0140067e2bfe5ce1ae2f5014ce733835ef1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118220 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-01loplugin:unusedmethodsNoel Grandin
Change-Id: I3ff5333c1e73ca61b0a7339e4b7dcfce211b88e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118207 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-30svp: add ostream<< for SvpSalFrameJan-Marek Glogowski
... and also store the window title. Change-Id: I20d8b30f6e8e5c48740fe569d9689a117db11e6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118129 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-06-30tdf#70633 unset Alt if detected as AltGr in both KeyInput branchesCaolán McNamara
we are unsetting Alt if the modifier is AltGr in one SalEvent::KeyInput case but not in another. If I replicate the unset of Alt if AlrGr in the other place then both UTF-16 parts of the codepoint get accepted and the described input case works Change-Id: Ifa8a5afbb1853ef3d5f388fd5e7bd3bbc048e260 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118170 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-30tdf#143113 fix crash in dndCaolán McNamara
Change-Id: Ifab741494e4cc6e51ca4cd89b57c3600d80dca44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118163 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-30WinFloatRound has the same content as FRoundCaolán McNamara
Change-Id: Iaf1565d937ded7ab675ab216aef0100dd7af92e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118136 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-30Purge out rtl::math::setNanBaiXiaochun
Change-Id: If8794c105e279afd4437517d3e61f2f900eb6490 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118123 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-29gtk4: add some more known working dialogsCaolán McNamara
Change-Id: Ie6794832ac1c836b25761240dc4e563d896c36f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118128 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-29gtk[3|4] add a catch-all AnyInput for under X tooCaolán McNamara
which is needed for gtk4, enable it for gtk3 as well, if that turns out to be a problem for some reason then that's easily fixed Change-Id: Ie3a1875d7930f4db4ff03d085bae07f1646f6e36 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118127 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-29gtk[3|4] AnyInput wasn't doing anything useful under waylandCaolán McNamara
which is going to be the case for all backends under gtk4 at least detect if there is evidence that the VCL_INPUT_ANY condition is true to curtail the idle spellchecking (etc) writer loop in favor of user interaction Change-Id: Id1cefd720a921e3a0d1d403769c544c15c6360e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118126 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-29gtk3: match VCL_INPUT_ANY with or without TIMER if there's pending gdk eventsCaolán McNamara
Change-Id: Ia3ab9993569a5eac8a1811c0187c4256dce72d50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118125 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-29tdf#143088 multiple Application::EventListeners is expensiveCaolán McNamara
use a Window level Listener and a WindowChild Listener instead An example for the need to listener to children is the calc conditional formatting dialog where clicking on any subentry of an collapsed entry is expected to expand that entry Change-Id: Ifead2fc1b75457d3ad314fdf15d343395afae6d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118086 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-29Related: tdf#143088 listen to DefaultWindow for Settings changedCaolán McNamara
having multiple Application::EventListener are expensive while a Window::EventListener is cheap and in this document there are thousands of comments so having thousands of EventListeners is problematic. under gtk with start center open use gnome-tweaks to toggle in/out of a dark theme and the branding logo should continue to switch dark/light variants Change-Id: I64fd12e4bcb8e4fd131effe94e6882e54cfcaf19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118083 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-29gdk_events_pending->gdk_display_has_pendingCaolán McNamara
the latter at least still exists, if mostly private, in GTK4 Change-Id: I0c008b505823d3f2b1ea332a9602399b77fd29c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118050 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-28UIObjectUnoObj::executeAction does not need mutable state in UIObjectUnoObjStephan Bergmann
...as none of the state (now stored in struct Notifier) needs to outlive the invocation of executeAction. This change makes mReady monotonic, which makes it easier to reason about (and allows to substantially shrink the range of the mMutex lock in executeAction). Change-Id: I0a4dd4a286773fd09c469cb7fd625c1444424e98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118031 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-06-28Test SvpSalYieldMutex like DBG_TESTSOLARMUTEXJan-Marek Glogowski
Introduce and use DBG_TESTSVPYIELDMUTEX. Change-Id: I002fa8faf744d69ab00ceeddda4f56b46aec0b34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118015 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-06-28loplugin:indentation (macOS)Stephan Bergmann
Change-Id: Ia7b33ee93dbb4d27a2387af6e2dd247b5f0b0788 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118026 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-06-28Remove dubious lone mutex lockStephan Bergmann
...introduced with 70f89e6b9f89177fc60f9cc9b55a87fdc5c6017f "uitest: move the processing of actions into the idle handler", for no apparent reason. (This change will allow to get rid of mMutex as a member of UIObjectUnoObj in a later commit.) Change-Id: I1964eb1c4a1b4f790e689e55d4af8a0390cb4d5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118024 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-06-28No need for these function arguments to be captured in UIObjectUnoObjStephan Bergmann
The lambda that uses them will never outlive the invocation of UIObjectUnoObj::executeAction. Change-Id: Icc5098a99389f7c70b69ca790acb4709f55b4dad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118025 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-06-28No need to Stop() a Timer before Start()Jan-Marek Glogowski
Start() resets a timer per default, otherwise check IsActive(). Also add a debug name to it. Change-Id: I1588161bb3fead42c3b26282dfa05d149aa94c52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118020 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-06-28Add FloatTransparent cppunit test to vcl.panoskorovesis
The test draws a transparent, along with a second metafile and tests their attributes. Change-Id: I42b6ff6eec29fecdafc7f634551c894a16b63173 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117694 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-06-28Add EPS cppunit test to vcl.panoskorovesis
The test creates an EPS along with a second metafile and tests their attributes. mtfxmldump.cxx was edited to support EPS. Change-Id: I43495304aaf191e1a8ad034b96ff59de085a0630 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117702 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-06-28gtk4: protect signal_selected with SolarMutexCaolán McNamara
Change-Id: Ie296e3f64607bfc00dbedb204f09be97b143892e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118003 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-28drop some unneeded ifdefsCaolán McNamara
Change-Id: I3e323ed5afb2245b28e42992e2ff00a153a8873c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117998 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-28gtk4: gtk_grab_add/gtk_grab_remove doesn't exist in gtk4Caolán McNamara
in the public api anyway, fudge this for now Change-Id: I44fff4e1dffb390664234ace7337c8ffaff6df90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117997 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-28gtk4: add key-pressed/key-released supportCaolán McNamara
Change-Id: If06e8ce0d351a4761622d3824add29ebe9383210 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117995 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-28gtk4: implement focus in/out for IMHandlerCaolán McNamara
Change-Id: Id8183b18622a26c0b61c3165b364ecc1d3e3e5bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117994 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-28gtk4: adapt to GtkCellRendererClass changesCaolán McNamara
Change-Id: Id5b52f9a3502cecfe693dadea6642dbed3a18aa2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117960 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-28loplugin:indentation improve checks for brace alignmentNoel Grandin
Change-Id: I333100fda7e181f68f36b03279b3fbb8cb768310 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117615 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-28use the standard macros to generate custom_cell_renderer_get_typeCaolán McNamara
Change-Id: Ie0c15c0d97616d1b5a6afcdc72cba7247e22d999 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117959 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-28split out customcellrenderer codeCaolán McNamara
Change-Id: Ia2803f6eab14ee7aeb697fb039f4e6dbdefa25e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117958 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-28loplugin:finalclasses in vclNoel Grandin
Change-Id: I0bad93927248e5d8d19a69661a1b243e55791fd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117889 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-27gtk4: restore original parent if there was oneCaolán McNamara
Change-Id: Ia3d8da14f545deace3024823b4cf8453937e3f82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117957 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-27rename CustomCellRendererSurface to shorter CustomCellRendererCaolán McNamara
Change-Id: I8fa2d75d0c24f4e211136c929b8fd6f8466eb311 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117956 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-27Silence UBSan dynamic-type-mismatch for VclPtr member in GObjectStephan Bergmann
...that wasn't properly initialized (in an --enable-dbgutil build; see also <https://gerrit.libreoffice.org/c/core/+/117878> "There appears to be no reason for (DBG_UTIL-only) ~VclPtr to be virtual", but even when VclPtr has no vtable, it arguably is to properly con- and destruct CustomCellRendererSurface::device). For example, in Writer clicking on the "Styles" icon in the side bar: > vcl/unx/gtk3/gtkinst.cxx:15144:10: runtime error: member call on address 0x625001b42668 which does not point to an object of type 'VclPtr<VirtualDevice>' > 0x625001b42668: note: object has invalid vptr > 50 62 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 8a f0 00 30 60 00 00 80 f8 19 02 > ^~~~~~~~~~~~~~~~~~~~~~~ > invalid vptr > #0 in (anonymous namespace)::ensure_device((anonymous namespace)::CustomCellRendererSurface*, weld::Widget*) at vcl/unx/gtk3/gtkinst.cxx:15144:10 Change-Id: Ic6ab75668e5b3ecca6d1e5743ed1907c8cbdb143 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117915 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-27Immediately schedule Tasks on start per defaultJan-Marek Glogowski
While writing a new Task, I was wondering, why it didn't schedule immediatly after calling Start(). Turned out Start() wasn't even calling Task::StartTimer(...) to trigger / wake up the Scheduler. So this changes Task's Start() to call StartTimer(0) to immediatly trigger the Scheduler at the end of Start(), but Tasks can opt out of it, if they aren't ready yet (like Timers). Change-Id: Ia2fdb45f502866c83f432b045e70bf27ccb61012 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117947 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-06-27Indicate the file in error in (vcl/UnoGraphicProvider)Julien Nabet
Change-Id: I7f379bf189071893d3b9eeb813ea9e570922fee3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117946 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-06-26Add ProfileZone to scaleDown() and scaleUp() in BitmapScaleSuperFilterTor Lillqvist
Change-Id: Ibc98d1e5ba24f98c437468d3f9a469725892e7d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117768 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-06-26gtk4: reenable calc format page dialogCaolán McNamara
Change-Id: Ie47c2b6be6e83f01a0c095484b65b1604db0cefe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117911 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-25gtk4: reenable calc format cells dialogCaolán McNamara
Change-Id: I512339745cb8f0e34068c38b88f1f53953ed8f06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117907 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>