summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2020-05-20jsdialog: react on button state changeSzymon Kłos
Change-Id: I19b8b4f123373da1acc7e2815086a67bcdb43e76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94148 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94556 Tested-by: Jenkins
2020-05-20vcl: refactor by creating SetBackgroundColorAndBounds() functionChris Sherlock
Change-Id: If547bde70db4e5a22bcbb9fc004cc575a62b23b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94395 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-20vcl: refactor by creating RecordMapModeChanges() functionChris Sherlock
Change-Id: I5f0b8b9e0d85cdd71dffdc1f9f95d4660a7e0a0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94394 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-20vcl: refactor by creating GetActionAfterBackgroundAction() functionChris Sherlock
Change-Id: Ice78e9433863be8966cd5b9caac663e684332f71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94393 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-20Drop workarounds for what looks like an MSVC compiler glitchStephan Bergmann
...now that 02b1a8f533d88c90004b1ea294f853f4b73f8c01 "Fix ambiguous symbol" removed the---apparently unnecessary---using directive from vcl/jsdialog/jsdialogbuilder.cxx, which had presumably caused the MSVC compilation error documented in dd5852f47beceb4a3b3f869cf6d3c24f3bf90ef4 "Work around what looks like an MSVC compiler glitch". I have no idea what the other ::MenuButton qualification, added with 02b1a8f533d88c90004b1ea294f853f4b73f8c01 in addition to the using-directive removal, was supposed to be good for, but lets assume that it is not actually needed as a workaround in any other build scenarios either and remove it too. Change-Id: Ib896562579c81d1b49e7edab47bc7cded445d46c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94541 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-20jsdialog: Common weld::Widget implementationSzymon Kłos
Change-Id: Iab21652c6abaf143fb421d6030f6acc394733bcb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94073 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94489 Tested-by: Jenkins
2020-05-19loplugin:constantparamNoel Grandin
Change-Id: Ifa90e9721edeacd4fd78fde968b81aab873e2061 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94497 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-19jsdialog: weld::ComboBoxSzymon Kłos
Change-Id: I672d2fd170e94e0b3e05384461983e5ae4a0ab35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94072 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94488 Tested-by: Jenkins
2020-05-19tdf#98493, tdf#133079: sc: Add UItestXisco Fauli
Change-Id: I04794bb7313f6ecd32088f8e7aa57e898f8ba427 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94493 Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-05-19Resend jsdialog on entry changeSzymon Kłos
Change-Id: Ic255b8ba56f5b355a95ddc9a9587e1747b66702a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94071 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94487 Tested-by: Jenkins
2020-05-19Fix ambiguous symbolSzymon Kłos
Change-Id: I62aa1fcbc8dd80bf7ef377776a54d3af78248af9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94480 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-19Work around what looks like an MSVC compiler glitchStephan Bergmann
I got > [build CXX] vcl/jsdialog/jsdialogbuilder.cxx > C:\lo\core\vcl\inc\salvtables.hxx(841): error C2872: 'MenuButton': ambiguous symbol > C:\lo\core\include\vcl/menubtn.hxx(31): note: could be 'MenuButton' > C:\lo\core\include\vcl/weld.hxx(1320): note: or 'weld::MenuButton' > C:\lo\core\vcl\inc\salvtables.hxx(834): note: while compiling class template member function 'void SalInstanceComboBox<ComboBox>::set_item_menu(const rtl::OString &,weld::Menu *)' > C:\lo\core\vcl\inc\salvtables.hxx(932): note: see reference to class template instantiation 'SalInstanceComboBox<ComboBox>' being compiled > make[1]: *** [C:/lo/core/solenv/gbuild/LinkTarget.mk:306: C:/lo/core/workdir/CxxObject/vcl/jsdialog/jsdialogbuilder.o] Error 2 now with VS 2019 16.5.5 (and --disable-pch, should that make a difference), for reasons that are not clear to me. Change-Id: Id6aeef671f807ca59cad9d65578031b323ed697c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94476 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-19Avoid UB when calling setjmpStephan Bergmann
The C standard (and thus by reference also the C++ standard) has very picky constraints how invocations of the setjmp macro need to appear to not cause undefined behavior. Change-Id: I09418de340a044e4309261bae9816ca746700858 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94474 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-19Removed duplicated includeAndrea Gelmini
Change-Id: Iee07f7fd011c17e583854a7cc0dfa25fce3ec948 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94469 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-05-18Move comment closer to where it belongsMike Kaganski
The comment was introduced in commit bc584ddc617f1b6be2cd3b330c2b999ec8f376a4, when a check for mpAlphaVDev was introduced. Later the code was refactored, so the relation of the comment to the code was lost. Change-Id: Ie258720be9aaa67a8ec8ad3b5a1c7f068e453d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94284 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-18don't bother undoing the replacement of combobox if unparentedCaolán McNamara
as seen in tdf#133098 example Change-Id: I58bf5c5c931cbd1f002ff28f6844d0bebcdd1913 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94440 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-18tdf#133098 cannot truly unparent a vcl widgetCaolán McNamara
once is created it cannot truly get unparented like a gtk one can, so if we want to "unparent" it, move it to be a child of the hidden DefaultWindow instead Change-Id: I25efa497b99471b5b1df55c6e6a2a6890982b781 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94441 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-18Create weld::Builder implementation for JSDialogSzymon Kłos
and use for WordCountDialog on mobile Change-Id: I12c3455ff9b16c30918067f9282b72f49141a308 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94041 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94055 Tested-by: Jenkins
2020-05-18Simplify this a bitMike Kaganski
Change-Id: Ie821c4e74e936557df0ad9fb5ab4b469dc8dc683 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94285 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-18Make Chart Creation Wizard asyncSzymon Kłos
* FuInsertChart as a memeber in ScTabViewShell stores instance is needed to react on the dialog's result * CreationWizardUnoDlg converted to XAsynchronousExecutableDialog added dialog close handler which notifies listeners In the Online dialog become dead after closing, additional PostUserEvent was needed to kill the dialog after real close (without it user needed to select any cell to close dialog) * Reuse in Writer Change-Id: Ib09b5d83af9e1aa67218e093aa161419e8ddb922 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90380 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-18loplugin:unusedfieldsNoel Grandin
Change-Id: I8796c0937fe4b046d9a13e2e50368e45e0e45611 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94404 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-17tdf#74702 vcl: extract GetOutputBoundsClipRegion()Chris Sherlock
Change-Id: Icc1b53f068b94ff3b3f26b144f366344dcbff2ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94345 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-17vcl: slide aCCList ccloser to where it is first usedChris Sherlock
Change-Id: Ic7799492a709c53324780d44040034a83ef854a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94344 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-17vcl: refactor by creating OutputDevice::ClearStack()Chris Sherlock
Change-Id: Ica4400cdb1e5c24dfb302426548ac976da802c74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94343 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-17GdkEventKey::state can contain states, e.g. num lock, which we don't useCaolán McNamara
Change-Id: I280777c1524de2b640564183461903fd80d345be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94387 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-16loplugin:unusedmethodsNoel Grandin
Change-Id: I52187eccf6170f64d38c673a86dc80818813efa6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94328 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-15ReleaseHbFont is unusedCaolán McNamara
LogicalFontInstance dtor does call hb_font_destroy though Change-Id: I59d9711f1934966cddd73c5e62c8929f08b1359a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94335 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-15if GetFontCharMap returns true xFontCharMap was resetCaolán McNamara
so there's no point in initially assign a FontCharMap to it on entry Change-Id: Ibf6e05a2b2f6709c57b12810b6989f98cfc6db30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94333 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-15loplugin:unnecessaryvirtualNoel Grandin
Change-Id: Ibb37c7e840a32453b1d52854d5f958c0285cd26a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94326 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-15do not cache SkBitmap in SkiaSalBitmapLuboš Luňák
It doesn't make much sense anymore to keep it around, it's now used only by GetAsSkImage(), which is only called from GetSkImage() and GetSkAlphaImage(), and it's unlikely one SkiaSalBitmap would be used both as a bitmap and an alpha mask. In Vulkan mode this should save the memory (in raster mode the memory is shared by the SkImage). Change-Id: I5818a462aca85906f2e82cd951b6241d954723c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94228 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-05-15Fix typosAndrea Gelmini
Change-Id: Ie2549b9cbf9b5f756fcb6d2ebb4676828f7e9a87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94321 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-05-15vcl: move functionality into FindIncompletelyOccludedBackground()Chris Sherlock
Change-Id: I228d58c8b16152491e9b46c837f4fbbf9e50a6d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94024 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-15vcl: new local function setComponentsSizeAndColor()Chris Sherlock
Change-Id: Icc837d6f90578dbae3c757d673334facd49a1109 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94023 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-15vcl: move functionality out of checkRect(), rendering function obsoleteChris Sherlock
Change-Id: Iabbc82d9b31438169351eca370ae42729babd10a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94022 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-15tdf#133053 reset after clear so avoid later assertCaolán McNamara
Change-Id: Ib2b637c8a6d5af04256bfd9631e43d334343b610 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94265 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-15do not hardcode a BitmapChecksum in a testLuboš Luňák
The checksum depends on this like RGB vs BGR and changing the VCL backend to e.g. Skia breaks this. Change-Id: I5bb3f4c009327c92683bfa575bd1510e3a1ea826 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94224 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-15tdf#131333 SalMenus propogate to parent their selected id conditionallyCaolán McNamara
Menu::Select depends on its handler returning false to allow propogating a submens's selected id to its parent menu to become its selected id. without this, while gen menus already have propogated this to its parent in MenuFloatingWindow::EndExecute, SalMenus as used under kf5/macOS won't propogate the selected id Change-Id: I1d87cb0deacdf5fbfb837acc21c2d23b79525aae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94263 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-15use more try_emplaceNoel Grandin
specifically looking for the pattern if (map.find(...) == map.end() map[...] = value Change-Id: I99f20d73f6e71a10726c9d39d8644c2e51120091 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94151 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-15vcl: refactor - move rect coverage check out of checkRectChris Sherlock
Change-Id: I68d24fd0b94286155750ccb5fa83bf7a897ada5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94021 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-14Keep order of GDK input events intactStephan Bergmann
As explained at <https://bugzilla.redhat.com/show_bug.cgi?id=1377293#c12> "[Wayland] When typing fast at high CPU load, LibreOffice breaks key (letter) order": "with a local LO master --with-lang=ALL ASan+UBSan build (i.e., which executes somewhat slowly): When typing 'file' in Writer right after it started up (but no longer after more typing), that gets garbled as 'fiel'." The reason for that (but probably not for the original issue reported in that rhbz#1377293) apparently was: Two GDK_KEY_PRESS events (A and B) were in the GTK event queue. GtkInstance::AnyInput consumed only A, because it broke from the first while loop as soon as it saw the first event of appropriate type. In the second while loop it put A back on the end of the GTK event loop, so that it now followed B. GtkSalFrame::signalKey (vcl/unx/gtk3/gtk3gtkframe.cxx) thus received the events in the wrong order. Dropping the "break" also reveals that GtkInstance::AnyInput should obviously use a queue (i.e., deque) rather than a stack to hold the events it consumed and needs to re-enqueue. This appears to be a regression introduced with 658954e8b50fc264428402dc5a95b0d6f690d191 "Resolves: fdo#48011 writer idle-callbacks are halting when events pending". Change-Id: I87d601df118a20ea3dd59e9cebbcf5176db04be8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94202 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Jenkins
2020-05-14tdf#132788 vcl: fix redraw on theme changeMiklos Vajna
Regression from commit f4e0cc1ff145287f80738f070a8c46a64b2f76d1 (tdf#92079 vcl: fix missing image background on dialog from basic, 2019-06-13), the original scenario was about an unexpected change from bitmap wallpaper to a non-bitmap one. That means the condition for the above change can be more strict: just restore the old wallpaper if it's now a non-bitmap one, otherwise leave it alone. This way the above scenario keeps working and changing themes again doesn't require a restart of the process. Change-Id: I256372ad30184cc150d6819dd61cdd38af7d83ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94189 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-05-14Move SalInstanceCheckButton to header fileSzymon Kłos
Change-Id: Id6597cd259abefe69a61f0ab414c6bd2114c9749 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94100 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-14Move SalInstanceMessageDialog to header fileSzymon Kłos
Change-Id: Ie982bae356f3e13ec40012e5dd9bac45887d2925 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94098 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-14Fix typoAndrea Gelmini
Change-Id: Ia8cdd792feae51a9089badb55b8622e6b58b19a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94025 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-05-14cache Skia' drawAlphaBitmap() in raster mode (tdf#104878)Luboš Luňák
Moving the mouse with the bug document triggers repeated calls to drawAlphaBitmap(), which is somewhat costly if not GPU-accelerated. Now the main cost in that bugreport is generating the frames all over again. Change-Id: Ic44811c713a745459f0af811c3d55038c944d89e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94152 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-05-14cache results of Skia's drawTransformedBitmap() (tdf#132438)Luboš Luňák
E.g. scrolling in Writer with a huge image inserted requires scaling down on every paint, so cache the result if it's expensive. Change-Id: I9db040eab47e0e9d7fd416ad064caf0301d346fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94118 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-05-14vcl: move transparency checks into MetaAction and GDIMetaFileChris Sherlock
I want to remove the final bits of meOutDevType but need to refactor the function OutputDevice::RemoveTransparenciesFromMetaFile(). This is the start. Change-Id: I7c5330540fb396f033b40831b24028c7bfec4832 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93940 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-13Use statics initializers instead of checksMike Kaganski
Change-Id: I8c474a35e3c4b9a202e4003c6b895f18ac88fb09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94001 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-13tdf#49247: draw soft edgesMike Kaganski
This factors out the common code for blurring used both in glow and soft edges into ProcessAndBlurAlphaMask. Also this reverts commit a98bdbae459ad7341bf7f484c402e77e4062cd16, since its use was removed from VclPixelProcessor2D. Change-Id: Icd7fdb06bef3932ff3b9ce7e283b515b15d246a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94087 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-13Fix translation domains in .ui filesGabor Kelemen
Found with bin/ui-checkdomain.sh Change-Id: I2a3ec2593b9ce0a19efced9020b95dff796e4702 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94153 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Jenkins