summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2021-12-16unset mpMenuBarWidget when it was destroyed along with its parentCaolán McNamara
Resolves: https://github.com/flathub/org.libreoffice.LibreOffice/issues/173 Change-Id: I875cf658fb86adfa389429ead059bfd7c4f08ef4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126887 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 0e89f357b1b0bcee94568f7b221972ef3a7ba7b3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126880 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Michael Stahl <michael.stahl@allotropia.de>
2021-12-11tdf#145322, tdf#144378 fix printing for vertical writingMark Hung
Printing still uses ExTextOutRenderer to render text because Skia haven't yet support printing and DWriteTextRenderer can't bind the printer DC. ExTextOutRenderer uses win32 API ExtTextOutW. In order to renderer upright CJK text in vertical writing with that API, the HFONT created with CreateFontIndirectW needs a font name prefixed with '@'. OTOH, use '@' prefixed font with Skia break the vertical writing unit test. - WinSalGraphics::ImplDoSetFont: use '@' prefixed font name if the requested font is vertical and is for printing. - ExTextOutRenderer: use SetTextAlign and text metric tmDescent to adjust vertical glyphs. It's not consistent with Skia or DWriteTextRenderer, and is still incorrect in many cases. The patch is adapted from reverting commit 5686c1aca40beb9514d40c86b4a3780a8a1334ba Author: Mark Hung <marklh9@gmail.com> Date: Sun May 2 14:45:45 2021 +0800 vcl: use DWriteTextRenderer for vertical writing. Change-Id: Ib2d3df8b68cad4bebe0672c9da0a16b62aed99e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125978 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126545 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-12-07fix overflow in cairo downscaled bitmap cache (tdf#137719)Luboš Luňák
In my system, sizeof(long long) == sizeof(long) == 8, so multiplying by LONG_MAX overflows long long. Change-Id: Ieb9613ef05916ef24a64db69f698036ecaf194e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126456 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit f8ffc971545bb54aaebd227fa841f83660dba99c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126439 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-12-07tdf#145604 indicate the row as the target when dropping in a visual treeCaolán McNamara
and indicate between rows when dropping in a visual list, which is what we are doing for the gtk version. a visual list case is tools, customize, menu and drag and drop the assigned commands around. a visual tree case is tools, macros, organize dialogs, use libraries to create two libraries, and move to dialog and create a dialog in one library, and drop it onto the other library to move it between libraries. Change-Id: Ia8dc944c1f411b1f072ad1c8dcc755a1e44e3b05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126291 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit d6b003da6d77471e5e17a9cb6a25172d6f52da2a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126306 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-11-28Resolves: tdf#144410 show submenu indicator for color filtering optionsCaolán McNamara
includes.. 1) Related: tdf#144410 we don't want a gap in a multicol spanning separator we would need another column to show a drop down indicator, and we don't want the separators to have a visible gap in that case Change-Id: Ib45b4cda41a09b631f3ea4d4427a8073a9e243d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125900 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> 2) gtk[3|4] move the indicator to the edge Change-Id: Ib92e8f1e35e6465b52a69f3a8513068668dc6953 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125951 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-11-26Resolves: tdf#145786 get the correct bounds with window scaling enabledCaolán McNamara
the per-window/app scaling as opposed to the global desktop one which wasn't affected. the menubutton thought it saw the mouse release happen outside the window it popped up when the combobox inside it was clicked, so popped down the popup from underneath the combobox. Change-Id: Iace9538073bb2380443d87600a872e88885934d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125810 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-24tdf#129638 print preview: use new paper size after switching pageJustin Luth
This is a partial revert of LO 6.3 commit 2c23a96f7b6888c0e05fdc2aba57f03cd797b647. Change-Id: I17525d06d96779671caaa84e1e48629289453ad2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125685 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> (cherry picked from commit 324daa38a823477e1d1b650b5d91f3dc91c6a9af) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125466 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-11-23Crash around help-windows.Michael Meeks
Seems a popular way to crash: vcl::Window::ImplCallMove() vcl/source/window/event.cxx:555 vcl::Window::Show(bool, ShowFlags) [clone .localalias] /usr/include/c++/10/bits/unique_ptr.h:173 vcl::Window::Show(bool, ShowFlags) vcl/source/window/window.cxx:2345 HelpTextWindow::ImplShow() vcl/source/app/help.cxx:371 Scheduler::ProcessTaskScheduling() vcl/source/app/scheduler.cxx:495 Change-Id: I33ca0059844395c41f4d76619cca22aec81df207 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125711 Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2021-11-22Related: tdf#145786 cooperate between our own grabsCaolán McNamara
don't try to workaround a grab if the grab is done by another of our own popups, and on tearing down one of our popups, restore the grab of its parent if that parent was one of our own popups. This typically matters on X where we don't use GtkPopovers (unlike wayland, where Popovers can escape the parent window). Things to test are: writer's watermark dialog: click the color button to get the 1st level popup, then click the combobox to get the 2nd level one, select an entry to return to the 1st level. a) Clicking a valueset element should select that color, not dismiss the popup without selecting a color. b) Clicking the combobox to get the popup again should result in a popup where the focus still follows the mouse (i.e. the 1st level popup doesn't try and steal away the 2nd level grab) sidebar: same scenario as above, except a color popover parented to a sidebar pane and not a dialog. Change-Id: Ib5d765b22b8a9b6b1a7806676c8fe3cfb7709734 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125645 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-16Resolves: tdf#143511 SysObj is clipped out if the widget is out of viewCaolán McNamara
so the sizes and relative positions are invalid under gtk, unclip the SysObj when using get_extents_relative_to Change-Id: Ibdaff20531a2a40b3b9b7dc9ac880d014db07d5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125141 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-15Resolves: tdf#145567 restore focus to the usual frame focus widgetCaolán McNamara
when tearing down the start center. Don't leave the focus in an arbitrary widget. Change-Id: I82c30c94121dc43b2ea1b4fbc66a0a3e79f7e664 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124703 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-11-09Add an Intel Iris driver to Skia/Vulkan denylistIlmari Lauhakangas
From off-topic comments in tdf#144923 Change-Id: I1f91622c29d2f8e1b0acd88b6e6fe1c2d5429466 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124845 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit 7db51fdbd8c06192941666ad8f444079c334fdef) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124854 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-11-04Related: tdf#143443 remove PANGO_ATTR_ABSOLUTE_SIZE and PANGO_ATTR_SIZECaolán McNamara
when setting a new size because an absolute size set by gtk itself seems to be not overwritten by pango_attr_size_new so sometimes the size of the font in the annotation window label is too large Change-Id: Ib69eec2111336cc27d1571babcc891f16cae2f01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124482 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-10-21tdf#144222 fix pdf export with vertical layoutMark Hung
Remove the offset adjustment that is no longer necessary. That was done in every backend before, and has been removed now. We can trust what layout text provides us. Regression from: commit dd0d0b44fd1c6c0292d7b2eb3f5cf2baa21e4481 Author: Mark Hung <marklh9@gmail.com> Date: Sun May 2 15:12:46 2021 +0800 vcl: adjust LayoutText() for vertical writing. Change-Id: I077f5a5f0711444086e56e4469dbcb3010ffe661 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123682 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com> (cherry picked from commit a4244c0f05b95ded277a3a7ed217bf0451daa996) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123986 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-10-19Related: tdf#145169 warn on overwrite from gtk "save as" for remote filesCaolán McNamara
Change-Id: Idb98cd13826b6a4bdcbeee4e91dc8678f148dbdc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123781 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-19Resolves: tdf#136498 %PRODUCTNAME shown in tool tipsCaolán McNamara
Change-Id: Id9640f9b5f85a98a510307bc7debf51448c716e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123776 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2021-10-12tdf#144757 - fixed fonts not shown in font listChris Sherlock
When in font options, the Fonts in "Font Setting for HTML, Basic and SQL Sources" were not showing any fixed (non-proportional) fonts in the list when "Non-proportional fonts only" was ticked. The reason this was occuring was because we were not populating the fixed font attribute when getting the CT font descriptor. Change-Id: I06127ac48bd0f3bc9b70217b36bbf584a1b0fdc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123316 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins (cherry picked from commit d389a54e64accc3f46c1a646f947e9af9badd08e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123412 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-10-09fix "gtk_bin_remove: assertion 'priv->child == child' failed" warningCaolán McNamara
on closing a document from tdf#141633 with a combobox in the tableform. So remove the mouse event widget before we remove the combobox replacement Change-Id: I95395ba60bb5fe7cf0b6e25176d0556c6bcc6611 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123212 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-10-07Related: tdf#141633 similiarly support match spinbutton font sizeCaolán McNamara
to the desired zoomed font size in the table control Change-Id: I9aafec5b9a236bf5d140fd9b8bfc9000c3f0bf35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123147 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-10-07tdf#141633 use css instead of pango attribs for font sizeCaolán McNamara
in GtkEntry. Rendering was using the font set via pango attribs, but when measuring the mininum size gtk will use the min size of the widget font so that has to change to allow the GtkEntry to fit the size of the desired font bundle together the setting-font-via-css as "WidgetFont" Change-Id: Ic00d8b84decf528016fe47fc3b142daf3439340d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123138 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit a693009c28059435ea5bae6d89a76e2243fe7793) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123146 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-10-07Related: tdf#141633 allow "small-button" elements to shrink furtherCaolán McNamara
so they can go smaller to fit small zoom sizes for the table control Change-Id: I6df47ed57a511e3b00d10075dedfdd9f1edcc477 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123136 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 10ec02f6fe4cd2c29021b967c255ace3f71424b5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123145 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-10-06Related: tdf#141633 similiarly support match combo/listbox font sizesCaolán McNamara
to the desired zoomed font size in the table control Change-Id: Iaf3b004544fdb0311b6c67baad612ba648e8c546 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123043 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123052 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-10-05Related: tdf#141633 drawing buttons to outputdevice affects later drawingCaolán McNamara
since... commit 0b76e106b8054c91a7b7d793d9219f6ee9ae7d2c Author: Oliver Bolte <obo@openoffice.org> Date: Thu Sep 4 06:42:10 2003 +0000 INTEGRATION: CWS mt801 (1.21.132); FILE MERGED 2003/08/29 14:35:52 mt 1.21.132.1: #80064# Print button with color... In the "sample db" example (Mockup.odb) there are two buttons with a yellow background, when printed part of the table control is also incorrectly painted with a yellow background. Change-Id: I481b721801b5e1d1c78dc7a01cb20745702f5c01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122896 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-10-05tdf#144846 launch gtk3 menubar menus from LibreOffice codeCaolán McNamara
rather than using the builtin gtk mechanism so we can avoid duplicate mnemonics in the sidebar getting used instead. Change-Id: I6c761ae63ae25d835de9444b0e298c63996a83a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122928 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-10-05Resolves: tdf#143391 scrolling by an entry height taller than visible areaCaolán McNamara
leads to use of a rectangle with a negative height. Drop the attempted optimization, of reducing the area to copy to the min required, if the area is already shorter than the height of the area to scroll. Change-Id: Ic17d3d017f5280d1f6b655a2fc61627f512849cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122942 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-10-04tdf#141633 set correct font sizes in tableview child widgetsCaolán McNamara
Change-Id: Ic96a0ad8203bf3903546c0c2f07d96254ca01e4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122832 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 61050c6d7b8bceef2704eba0bfe4473ee75e669d) contains... Related: tdf#141633 PointFont gets overwritten by ControlFont Change-Id: I26ffffe7917d109ddc61fd2d2646db0988937c7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122827 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 4e2306a5e336e2b43759c9712535626d0f2c168f) Related: tdf#141633 support setting a custom font for TextView Change-Id: I4c27a21c5c682fc73c37594749627e4cc7c0822d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122833 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 4d445ac9aa43b3399a579e3dbb1aac94507c9520) tdf#141633 multiple line entry font size/zoom not taking effect The "sample db" example (Mockup.odb) has multiline entries used in its "Journal Entry" column. Those are painted by taking snapshots of a never-really-shown textview widget. But the textview is always drawn using its original default font size and changing the page zoom and/or font size had no effect on the size of text in the "Journal Entry" column. explicitly emit style_updated to get the GtkTextView to sync its font size from the css changed by the set_font Change-Id: Ic7d644b13c28f30a2c646b9d4098ea6e7f0dab81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122889 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 36d5e26549b273118cea8969c43ef5ad3845f8df) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123041 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-10-01Resolves: tdf#140992 Paste/Cut should mark Edit as modifiedCaolán McNamara
Change-Id: Id56b5bf2e922394da7e730f4bab652808253c54e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122857 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2021-09-30Resolves: tdf#143487 don't draw a border at all for DrawFrameStyle::NONECaolán McNamara
Change-Id: I7794376c9475a32276d23135365c99a3f6fb7d84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122142 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit dedb3337291c09c85262ca08bacd01e8e5901d22) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122741 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-09-29Resolves: tdf#144783 shift+RETURN not searching backwardsCaolán McNamara
In gtk nothing is happening, in gen its searching forwards. Align backends so that Activate is emitted only on a bare return in both and then handle shift+RETURN explicitly for the search widget Change-Id: I142002bbaf6b3aca83800a442096a4b1024fe097 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122748 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-09-29tdf#144139 don't crash when OutputDevice is a printerCaolán McNamara
Change-Id: Ia3843966949b8164b01cecd762ea2b5c5bf0339b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122777 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit a0f6d3865dd113f38fd3aa673075e9fecd06f3cd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122791 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-09-27Related: tdf#144091 svx: fix interaction of transp cell fill and transp shadowMiklos Vajna
This is a follow-up to commit 37a52d30bbfcf1d073779b50139c4dafa507be4b (tdf#144091 svx: fix unwanted blur of shadow from table cell fill, 2021-09-20), where it turned out that the original bugdoc was just a special case of almost full transparency (80%), that's why avoiding the blur fixed the problem. A more general approach instead is to multiply the alpha or the cell fill of table shapes and the alpha of the shadow itself. The end result is the same (80% transparency) for the first bugdoc, but this gives back the blur on the second bugdoc. (cherry picked from commit 00fa364a2403dc23a786d3f91fde06e10b3a4a9a) Conflicts: drawinglayer/source/primitive2d/shadowprimitive2d.cxx drawinglayer/source/processor2d/vclpixelprocessor2d.cxx include/drawinglayer/primitive2d/BufferedDecompositionPrimitive2D.hxx svx/source/sdr/primitive2d/sdrdecompositiontools.cxx Change-Id: I63560e3a73473c70157ecee8365ec7154217f269 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122565 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-25tdf#144585 Qt5 restore old VCL popup handlingJan-Marek Glogowski
So while it works with X11, the Wayland situation seems much worse. Eventually we want to use Qt::Popup as a window type, because that implies special handling for Wayland, but the additional private Qt mechanisms this implies conflict with VCL handling, especially input + focus handling with ComboBox. I'll re-check (again) how Qt itself implements this and maybe that solution is adaptable to VCL. This re-introduces the problem, that "DropDown/PopUp stays open and in FG when changing app on Linux desktop (keyboard, ALT+TAB)", original reported as part of tdf#143114, which is some kind of kf5 catchall bug report. Just revert for 7-2. Hope we find a better solution on master, which can be backported later. This revert includes: - "tdf#144037 Qt5 just close popup with mouse outside" commit 7c1f4284562e905372b5c14b6017f1eb438f54b5 - "tdf#143580 Qt5 don't use Qt::Popup for FLOAT wins" commit ea2f19827db330a21c7962bdd13b1b838821bd4c - "Qt5 fix Qt::Popup window handling" commit 7e6fee830116823b9cd8e46d6962df4ea2bc1ea6 Change-Id: Ibf56187e00232f6c75cdbbc82ce915f80214a136 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122356 Tested-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-09-24Related: tdf#142704 ReadStringHook may not be set in testing configurationsCaolán McNamara
Change-Id: Iab2cd0cccb781a39af7b9315ccf8c242a2cc49a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122438 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-09-23tdf#144624 Prevent infinite recursion when loading SVG iconAleksei Nikiforov
When Generic/X11 VCL backend plugin loads SVG icon, it creates virtual device for rasterizing an SVG icon, which in turn tries to load an SVG icon, and thus infinite recursion happens. Change-Id: I7559b6255e6718e64ef4a6e7c79d597375e5823a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122344 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 9b4478e62c712ef0f75c4a001e260dfdd6b3ca4c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122518
2021-09-23Resolves: tdf#142704 %PRODUCTNAME shown in gtk3 extended tipsCaolán McNamara
Change-Id: I61d8b83ce326816c498f54e3cfc053270d82c1a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122433 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-09-14tdf#142415 mouse events not propogated to table control event handlersCaolán McNamara
handle this with explicit callbacks from the cell widget for those events Change-Id: Ie605ca4286afc0fbd321f339fb7963771a303df5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122063 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-09-13crashtesting: threaded scaling crash on re-export of ooo24840-1.sxw to odtCaolán McNamara
#13 0x00007f1cb843752a in o3tl::cow_wrapper<ImplBitmapPalette, o3tl::UnsafeRefCountingPolicy>::operator->() (this=0x5596086d5968) at include/o3tl/cow_wrapper.hxx:329 __PRETTY_FUNCTION__ = "BitmapColor& BitmapPalette::operator[](sal_uInt16)" #14 0x00007f1cb843752a in BitmapPalette::operator[](unsigned short) (this=0x5596086d5968, nIndex=nIndex@entry=0) at vcl/source/bitmap/bitmappalette.cxx:139 __PRETTY_FUNCTION__ = "BitmapColor& BitmapPalette::operator[](sal_uInt16)" #15 0x00007f1cb849f5f5 in BitmapInfoAccess::GetPaletteColor(unsigned short) const (nColor=0, this=0x5596085989f0) at include/vcl/BitmapInfoAccess.hxx:114 __PRETTY_FUNCTION__ = "const BitmapColor& BitmapInfoAccess::GetPaletteColor(sal_uInt16) const" the mpBuffer member of BitmapInfoAccess is BitmapBuffer* mpBuffer; not const BitmapBuffer* mpBuffer; so mpBuffer->maPalette.foo() calls non-const variants of foo(), (BitmapPalette::operator[](unsigned short) in this case), which is presumably non the expected outcome, as the copy-on-write mpImpl of BitmapPalette unsafely creates a new copy its internals on the first dereference of mpImpl in a non-const method. Change-Id: I1ebb3c67386a9028e5b8bab4b2d1cc5862700aa1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121888 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-09-13tdf#144412 Qt5 reset m_nModKeyCode on key inputJan-Marek Glogowski
Switching the input direction on Ctrl + L/R-Shift is actually no bug but a feature. It is triggered on key release, so it can be distinguished from / doesn't interfere with shortcut handling. That's what should happen. So trying to implement that behaviour correctly and seeing the appearingly wrong modifier events for gtk3, I found gtk3 resets the frames persistent mnModKeyCode for key input events, which also seems to fix the problem for qt5. Some additional discussion is also in tdf#103158. Regression from commit 862fdb98ca271b60a831cd5420fd16d5f9c1c747 ("tdf#143298 Qt5 send SalEvent::KeyModChange events"). Change-Id: Iafcd1db7abcdf078001ca0602ae6e374f2a169ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121858 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 61cb81d67ebf6b342a1cdb46bf6eb25a49eb5ff4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121887 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-09-09tdf#142458 Set correct ScrolledWindow BorderWidth in the ctorCaolán McNamara
and keep it updated when the relevant properties that affect it change. This avoids the problem that the borderwidth can change during "Paint" (which is something we strongly want to avoid). a problem since: commit f39f21d92ec83c3a5062f29dd26214fc83012c06 Date: Thu Nov 19 11:51:13 2020 +0100 tdf#138010 (IV) VclScrolledWindow: Use actual border width and then remove the potential change of BorderWidth during paint Change-Id: I2ec317d86687fdb75e6323905f6d1c3b8fc655e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121557 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-09-08tdf#142129 vcl: add unit testMichael Stahl
Reportedly bug was fixed by commit 5fc6a601d7a1978db291fd0f7dcec638a7c25651 Change-Id: Iee32cacff0c939bdf498e9dc8102eb2d22a5a1c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121776 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 992f878e8c3424f7ce96a78ccf3a316b29ffd9ec) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121763 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-09-06tdf#144289 invert / disable default OpenGL supportJan-Marek Glogowski
... and as a result drop setting a default in SalSvpInstance. This is also more consistent: now you must explicitly implement CreateOpenGLContext() and set "m_bSupportsOpenGL = true". Change-Id: I591580bf134907213b8308e0843c278d2f470ed3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121632 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 50238bddf0e95169007cb90479cca86849a19007) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121635 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-09-02tdf#138519 use gtk_adjustment_set_value instead of gtk_spin_button_set_valueCaolán McNamara
for FormattedSpinButton because the latter doesn't change the value if the new value is less than an EPSILON diff of 1e-10 from the old value Change-Id: I410ceec28e1855e53de8c2982e540c612578bf54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121419 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-08-30ofz: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
Change-Id: Id3acc87a697a61bcf3794745846071bc99fc8d8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121157 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-08-27tdf#144008 Qt5/Kf5 create frames in the GUI threadJan-Marek Glogowski
There was a 50% chance my pick would have been correct... ok, just half-true, as in hindsight, I should have preferred the secure variant using RunInMain to start with. I thought I could use some templated class functions to get rid of all the copy and paste, but that looked even more ugly. P.S. if you wonder - like myself - about the code formatting in Qt5Instance::CreateFrame: that if from clang-format. Change-Id: I3a6b0c12c9d71ad8e777ed82526d1515a249832c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121091 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 923b30aa27ceb377d6a540c012000e89ce5db31e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121063 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-08-27tdf#144037 Qt5 just close popup with mouse outsideJan-Marek Glogowski
How hard could it be to close a popup window when losing focus or clicking outside of it (AKA tdf#143114 problem 3)? At least with Qt it feels like solving an NP problem... So don't always force-close the popup window if clicked anywhere on it. Seems to be consistent with gen and gtk3. Change-Id: Ia1c231c0b51a55bec2c587feffcf14bb4b4cee55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121093 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit a1a83b6b3b4459de353e0cdc8cdf402370c0a5c4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121064 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-08-26Resolves: tdf#144084 if not initialized default to FILEOPEN_SIMPLECaolán McNamara
which is a problem since... commit 43335776cfc18cdc7addf33250cffc886d384186 Author: Caolán McNamara <caolanm@redhat.com> Date: Tue May 11 17:21:47 2021 +0100 gtk[3|4] don't create File Dialog with buttons that need to be removed just create it without the offending buttons in the first place where we create without buttons because its hard, especially since gtk4, to remove unwanted buttons. Change-Id: Ib0337c412fa7e8210d3b1bf3261174c4ffac0a0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121081 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2021-08-26tdf#142394 return to using CAIRO_OPERATOR_SOURCE in drawBitmapCaolán McNamara
since commit cd09fc9451897e6efedbf9f5e1d5b9bd96e65cb5 Date: Mon Mar 22 19:06:15 2021 +0100 do not enable mbSupportsBitmap32 for headless (tdf#141171) turned back off the mbSupportsBitmap32 support experiemented with in commit 86ea64f216819696cd86d1926aff0a138ace2baf Date: Fri Feb 15 13:14:32 2019 +0100 Support for native 32bit Bitmap in VCL and SVP (cairo) backend Change-Id: I818c3f11d0334278a65a0e45b61141327669121d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120727 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2021-08-25ofz: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
Change-Id: Icc09937594ddc97706a63bd11afe062a854ae8ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120921 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 6097ea726dcc087694a600cf823761097e3ba13e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120978 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-08-25ofz: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
Change-Id: I364368cf4f5cb68c03bbff81f42002f56e3e44af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120923 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 4556dd0f9d154c9b71b009f6dcf9f3e54d9a4d85) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120976 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-08-25ofz: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
Change-Id: Iaecbdaa7a7ad61f8c657b0aa04fd30ee27699b72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120924 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 8351081be79d0b9d61aae2a6eb328a11e2393c92) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120975 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>