summaryrefslogtreecommitdiff
path: root/vcl/source/window
AgeCommit message (Collapse)Author
2019-06-13remove some unneeded includesCaolán McNamara
Change-Id: I4722cc32e79cb9bd3708a66be127e097fdb84aed Reviewed-on: https://gerrit.libreoffice.org/73838 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-13tdf#42949 Fix IWYU warnings in vcl/inc/*Gabor Kelemen
Platform-specific subdirs are left alone: android, ios, osx, quartz, win Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Icbb906b7fbc960240c73c56d3dae2a78b06a0f53 Reviewed-on: https://gerrit.libreoffice.org/73754 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-06-12tdf#125692 SalObject always holds a SystemChildWindowJan-Marek Glogowski
Let's just face reality and store it as a VclPtr. And this is needed, because Qt, like VCL, uses deferred deletion, and has no way to filter events to QObjects out of its event queue easily. This way the qt5 plugin can report focus changes for SalObjects without a crash, which happens when you close a presentation with a video by click. And in addition it reverts the workaround introduced in commit e770bacc85a0 ("Qt5 workaround modal change after show bug"), as it seems this bug is a use-after-free error, introduced by LO. Thanks Michael Weghorn for catching that! Maybe someone should also rename SalObject... Change-Id: I0bc64ea64f95dfc7a838799c4a04de183adfefcf Reviewed-on: https://gerrit.libreoffice.org/73567 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-06-12weld OrganizeDialogCaolán McNamara
Change-Id: I976edb0b49c8439d1723be4544b10a5375b8e1d3 Reviewed-on: https://gerrit.libreoffice.org/73755 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-12loplugin:unusedfieldsNoel Grandin
Change-Id: I0bd600b59b2bc4b50eb2d32e95c9d1167fdf2eab Reviewed-on: https://gerrit.libreoffice.org/73823 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-08loplugin:unusedmethodsNoel Grandin
Change-Id: I52efd8d843d0e4cc7a6adefb0eb95aa50469af38 Reviewed-on: https://gerrit.libreoffice.org/73693 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-08tdf#125673 KDE5 implement a KDE5SalVirtualDeviceJan-Marek Glogowski
We just need AcquireGraphics() to return a KDE5Graphics. Otherwise the BufferDevice's SVP will use a SvpSalGraphics instead of the KDE5Graphics, which knows about Qt's theming. Change-Id: I0ea646df260f2067d61c753f03dee01a003f382a Reviewed-on: https://gerrit.libreoffice.org/73673 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-06-07android: Fix build after welding AboutDialog.Jan Holesovsky
Without this, the vcl's AboutDialog conflicts with the AboutDialog from cui during linking of liblo-native-code.so. Change-Id: Ie6e5ddd52bb7bdee1c7d53c37ea566d7ce6c9385 Reviewed-on: https://gerrit.libreoffice.org/73613 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2019-06-07drop some unneeded includesCaolán McNamara
Change-Id: Ifdafc97c8616da5d844a1ade7694265a833e8f53 Reviewed-on: https://gerrit.libreoffice.org/73598 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-06lok: 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>
2019-06-06weld AboutDialogCaolán McNamara
use a native GtkAboutDialog on that platform and refactor the current cui about dialog body to form the body of a vcl AboutDialog use add_button to add the buttons to whichever is preferred of the headerbar or action-area Change-Id: I67e0b36dcb8d3fa08ec4f0397b0f6185b0778675 Reviewed-on: https://gerrit.libreoffice.org/73439 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-31tdf#125550 vcl menu bar / floating window: fix text colorMiklos Vajna
Regression from commit e8d5b8beb5958147235ff955ed38c47b51d860ff (tdf#113714 vcl menu bar window: avoid flicker, 2019-05-20), the problem was that a freshly created VirtualDevice doesn't have the default text color, so we need to initialize that explicitly based on the render context text color. Also introduce a BufferDevice to do this initialization, instead of fixing this in MenuBarWindow::Paint(), then copy&pasting the fix to MenuFloatingWindow::Paint(). Change-Id: Ib171cd52e7cabe0bc3c639821f558d8303039fe6 Reviewed-on: https://gerrit.libreoffice.org/73269 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-05-24tdf#101443 Calc multiline input bar reworkedThorsten Wagner
Change-Id: Ic35c9898624f0c13b6d64725808e765a64c17081 Reviewed-on: https://gerrit.libreoffice.org/71937 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2019-05-24A CALCINPUTLINE is not an EditStephan Bergmann
Under ASan, clicking into the Calc "input line" control (in the toolbars) caused > ==26138==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x616000107a4c at pc 0x7fc890d792cb bp 0x7fff4cab6d90 sp 0x7fff4cab6d88 > READ of size 1 at 0x616000107a4c thread T0 > #0 in Edit::IsPassword() const at include/vcl/edit.hxx:285:38 > #1 in vcl::Window::getDefaultAccessibleRole() const at vcl/source/window/accessibility.cxx:327:73 [...] > 0x616000107a4c is located 116 bytes to the right of 600-byte region [0x616000107780,0x6160001079d8) > allocated by thread T0 here: > #0 in operator new(unsigned long) at /data/sbergman/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cc:105:3 > #1 in VclPtr<ScInputBarGroup> VclPtr<ScInputBarGroup>::Create<vcl::Window*&, ScTabViewShell*&>(vcl::Window*&, ScTabViewShell*&) at include/vcl/vclptr.hxx:129:42 > #2 in lcl_chooseRuntimeImpl(vcl::Window*, SfxBindings const*) at sc/source/ui/app/inputwin.cxx:157:12 This looks like it got broken with cca4d9ab39499562614f0f778a2fffe5a40fde88 "convert WB_PASSWORD to a bool field on Edit" assuming that a Window of type CALCINPUTLINE derives from Edit, even though ScInputBarGroup does not. Change-Id: I1457c6cd07477ee0fa868c3949105aa96116a366 Reviewed-on: https://gerrit.libreoffice.org/72893 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-22VCL refactor duplicate code in ToolboxJan-Marek Glogowski
Moves duplicate code from ImplInitSettings and ApplySettings into their own functions. Change-Id: I65b5a052b171a661ee22762e373745c28779a9e9 Reviewed-on: https://gerrit.libreoffice.org/72790 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-05-22VCL replace some code with common function callsJan-Marek Glogowski
Replaces some code with calls to ApplyControlForeground and ApplyControlFont. Change-Id: I16837ad7c48ed46fa48b1f2a33a84c7e94f63482 Reviewed-on: https://gerrit.libreoffice.org/72789 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-05-22tdf#108909 vcl menu bar window: fix missing highlight on mouse overMiklos Vajna
Regression from commit 458a827e96523ac52d021f1fd3653b5a734940c0 (further refactor Menu to use RenderContext, 2015-05-15), the problem was that this highlight on the menu bar on mouse move was only part of the incremental paint, never the full paint. So when that commit removed incremental paint, we lost highlight on mouse move (move only, click is there). Later commit 843b9d5dba5098c2676491dda66bed31e57f4329 (VCL add support for rollover menubars, 2016-09-22) added this code back, conditionally for the case when there is not enough space for the menu bar horizontally. So fix the lack of highlight on plain mouse move by unconditionally highlighting the rolled over item, even if there is enough horizontal space. Change-Id: I357001f2e65f843444ed0ffbe470667dfc5d5aa3 Reviewed-on: https://gerrit.libreoffice.org/72774 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-05-21tdf#125415 vcl menu floating window: avoid flickerMiklos Vajna
This is similar to e8d5b8beb5958147235ff955ed38c47b51d860ff (tdf#113714 vcl menu bar window: avoid flicker, 2019-05-20), except that was for the menu bar window, and this is for the floating window opening from that one. Change-Id: Ib24f4999ad3e8cbbecc058368e9d112e106e9178 Reviewed-on: https://gerrit.libreoffice.org/72688 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-05-21tdf#125413 vcl menu bar window: fix non-NWF backgroundMiklos Vajna
Windows (by default) and gtk3 paints its own background, but e.g. the Linux gen backend does not; so make sure that we not only copy from the buffer, but also initialize it. This restores the gradient background of the main menu with the Linux gen backend. Change-Id: I5ce8cc734f64bc1d57d343caf22071e6aa63a69f Reviewed-on: https://gerrit.libreoffice.org/72676 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-05-21Resolves: tdf#125394 consider unwelded dialogsCaolán McNamara
Change-Id: Ic66a622bb8b5481656ffe8e29a345a435042402e Reviewed-on: https://gerrit.libreoffice.org/72625 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-21tdf#125370 Fix crash when opening basic editorSamuel Mehrbrodt
Change-Id: I036a0e58bb763912f6ed0df0c964331754756628 Reviewed-on: https://gerrit.libreoffice.org/72609 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-21tdf#125397: Avoid crash if GetpApp() returns null, can happen on iOS at leastTor Lillqvist
Change-Id: Ib0dfb00c6a00640fe35769f21f167bf3eae8769b
2019-05-20tdf#113714 vcl menu bar window: avoid flickerMiklos Vajna
Regression from commit 458a827e96523ac52d021f1fd3653b5a734940c0 (further refactor Menu to use RenderContext, 2015-05-15), if we do full paint instead of incremental paint, then need to ensure that an intermediate state is not painted. Paint happens at idle time by default on Windows (OpenGL) and also on Linux (gtk3), but some other backends like Windows GDI had flicker, this fixes the problem. Change-Id: I530166cea93513aec4648dd0a385359f4b998b6f Reviewed-on: https://gerrit.libreoffice.org/72610 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-05-18remove remaining '0' responsesCaolán McNamara
Change-Id: I3134c8dcc92b82ab2c6008b3e39443a360f576eb Reviewed-on: https://gerrit.libreoffice.org/72499 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-17weld SvxIMapDlgCaolán McNamara
Change-Id: I5418176a015e61ef8eee4c2acd8e84b008f76f82 Reviewed-on: https://gerrit.libreoffice.org/72249 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-17allow closing welded dialogs to be cancelledCaolán McNamara
from both directions of window manager close button and esc Change-Id: I3c7bd6f67e3100f5dd3ab04456ad9aa5100c472c Reviewed-on: https://gerrit.libreoffice.org/72319 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-16tdf#125170 Deliver mouse events also when clicking into document contentSamuel Mehrbrodt
Event listeners are added once VCLXWindow::SetWindow is called. This never happened for the document content window. So we need to call Window::GetComponentInterface which will create an XWindowPeer and then call UnoWrapper::SetWindowInterface which calls VCLXWindow::SetWindow. After that, event listeners are registered so that we can deliver events. Change-Id: I2ed01f1ab20d87fedc4803bdbd96f5ef14d40043 Reviewed-on: https://gerrit.libreoffice.org/71948 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-15Move FindFocusedEditableText from gtk* into vclJan-Marek Glogowski
Now that it will be used by four VCL plugins, move its code into the common VCL library. The none-XAccessibility, none-UNO version used on Windows needs much more work to function with various widgets (including some API refactoring IMHO). (see ImplHandleSalSurroundingTextRequest and friends). Change-Id: I0fdf72336a66fc578b18b1edc8f8627d5dfdc57f Reviewed-on: https://gerrit.libreoffice.org/72364 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-05-15import GtkStatusbar same as GtkBoxCaolán McNamara
Change-Id: I44c2358659081d4990f5a7398a79249fb35c9c19 Reviewed-on: https://gerrit.libreoffice.org/72358 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-14Resolves: tdf#125266 hang on selecting read online helpCaolán McNamara
Change-Id: I46d14df66c529495a7e9f1596fcdbb0b093810c5 Reviewed-on: https://gerrit.libreoffice.org/72298 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-14Switch everyone to stricter GetColorErrorJan-Marek Glogowski
This replaces the variant in Color with the stricter one of BitmapColor. I couldn't find any reasoning for the lazy variant used in Color. Change-Id: I6dab3ab94a7f24ef5e80299d64267e3be8df888c Reviewed-on: https://gerrit.libreoffice.org/72234 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-05-13fix wrong SET/QUERY flags passed to uno::ReferenceNoel Grandin
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-11weld conditional formattingCaolán McNamara
Change-Id: Ia9c99a17d5a95d67a412cfde959192c99caa70be Reviewed-on: https://gerrit.libreoffice.org/71956 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-10Related: tdf#125198 centralize notifyWindow:created to one placeCaolán McNamara
Change-Id: I2729cb85f156ddafec69cc3280e9d8544f7c6182 Reviewed-on: https://gerrit.libreoffice.org/72117 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-10Resolves: tdf#125198 modeless dialog not appearing in onlineCaolán McNamara
Change-Id: I01916000ba2300a3905fe606301abd8ddadd3770 Reviewed-on: https://gerrit.libreoffice.org/72113 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-09loplugin:unusedmethodsNoel Grandin
Change-Id: I7b4d2e5e611935284e2902b0089950768dfb7717 Reviewed-on: https://gerrit.libreoffice.org/72036 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-04tdf#105881 Toolbar keyboard navigation fixesJim Raykowski
This patch makes toolbar keyboard navigation wrap to the begining or end toolbar item and enables access to the overflow menu using the keyboard. Change-Id: I5975b0f731beb00cf26f8e8a33e6ea4fa9322881 Reviewed-on: https://gerrit.libreoffice.org/71718 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2019-05-03Compile the DebugEventInjector code always, not only when OSL_DEBUG_LEVEL > 0Tor Lillqvist
Otherwise if you happen to compile vcl/source/app/svmain.cxx with OSL_DEBUG_LEVEL > 0 but not this file, you get an undefined symbol DebugEventInjector::getCreate(). In general I think our intent is that ideally it should be possible to compile an arbitrary selection of source files with OSL_DEBUG_LEVEL=0, and others with OSL_DEBUG_LEVEL=1. (For debugging functionality that does require consistency across the codebase, we have DBG_UTIL.) Note that DebugEventInjector::getCreate() will be called from InitVCL() only when svmain.cxx is compiled with OSL_DEBUG_LEVEL > 0, though. So for a "production" build with no debug compilation, this change has no run-time effect. Change-Id: I3411edfbbbaae21561363634e5eec5ac0cf53418 Reviewed-on: https://gerrit.libreoffice.org/71757 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2019-05-03libreofficekit: send show/hide messages for dialogsSzymon Kłos
Change-Id: I2b3ff5e5122b2be099be500ac544bf81f8d1b2ae Reviewed-on: https://gerrit.libreoffice.org/71544 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2019-05-02clamp to target type boundsCaolán McNamara
Change-Id: I8d3f7653b7e9b64a2f433b4ebfb8a0fef1522e93 Reviewed-on: https://gerrit.libreoffice.org/71637 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-02Use hasElements to check Sequence emptiness in [v-x]*Arkadiy Illarionov
Similar to clang-tidy readability-container-size-empty Change-Id: I71e7af4ac3043d8d40922e99f8a4798f0993294c Reviewed-on: https://gerrit.libreoffice.org/71603 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-01lok: 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/71395 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-05-01weld ScPivotLayoutDialogCaolán McNamara
Change-Id: I821ee682bf5b65774a609227811365b94ae2063e Reviewed-on: https://gerrit.libreoffice.org/71547 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-30improve loplugin:stringconstantNoel Grandin
to find more places we can elide the OUString() constructor at call sites Change-Id: Ie09f3c61f2c4b4959c97dc98ebcbaf7c51d5d713 Reviewed-on: https://gerrit.libreoffice.org/71514 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-28tdf#120703 PVS: V581 ifs with identical conditionsMike Kaganski
V581 The conditional expressions of the 'if' statements situated alongside each other are identical. Change-Id: I11fa13677c7980e6ac17fc4358406472ee784e41 Reviewed-on: https://gerrit.libreoffice.org/71446 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-19drop some unneeded includesCaolán McNamara
Change-Id: Idde1f747f500d94b3191a97e7d502794cc2b8450 Reviewed-on: https://gerrit.libreoffice.org/70972 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-17Initialize ImplCursorData members as requiredStephan Bergmann
mbCurVisible is immediately read in ImplPrepForDraw, which inits some more members but not mnStyle which is then read in ImplCursorInvert. Regression introduced with b9c10ee923308f336a694bbc0212396ed5317b6a "weld ClassificationDialog", found when valgrind'ing UITest_classification. Change-Id: I986af0531e250953b8e45c914997b31c53a9ba91 Reviewed-on: https://gerrit.libreoffice.org/70876 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-04-15loplugin:sequentialassign in vclNoel Grandin
Change-Id: I530b81b3258a6e1c1456da53bfe1285f14aee712 Reviewed-on: https://gerrit.libreoffice.org/70734 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-10tdf#42949 Fix IWYU warnings in include/vclGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. There were some changes since last run and some omitted files Change-Id: I666ac8ed7d06684e252ca590e3d7d454e9e10975 Reviewed-on: https://gerrit.libreoffice.org/70497 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-10clang-tidy: Fix suspicious catches of WIP unhandled-self-assignment checkTamás Zolnai
Change-Id: I1cb16b180f4cc5bf4d65485f03c44a06414d3580 Reviewed-on: https://gerrit.libreoffice.org/70481 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>