summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2022-04-28Fix typoAndrea Gelmini
Change-Id: I600199f87df8a211b2a27913bc1fe2340d315766 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133552 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-04-28add a hack to SalLayoutGlyphsImpl::cloneCharRange() for a strange glyphLuboš Luňák
Change-Id: Id4859982079f5f156b5e2d85598940ec8c936475 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133547 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-28use the same TextLayoutCache for the verifying callLuboš Luňák
Apparently not using it makes the ImplLayout() call treat everything as one run, which changes whether a glyph may get ALLOW_KASHIDA. Change-Id: I1a951dbc4242d1fe8e4ee5074d9f9ad1d80480be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133546 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-28don't cut a glyph subset inside a composed glyph #2Luboš Luňák
This is basically the same like 7b7d2f4a3e96e771e125c95a7d262b20f6dc9ecc, triggered by CppunitTest_sw_uiwriter3's testTdf104649 on Mac. Change-Id: Ibb3c33dd6924e8f0c8856185fc7fb7aeaaf72177 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133545 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-28tdf#74331: 16bit "min-is-black" tiff not loaded correctlyJulien Nabet
Since 16 bits part is well taken into account for photometric interpretation "RGB", just consider greyscale as subcase of rgb since greys are just "RGB" colors with same value for red, green and blue Finally, in ConvertScanline, nPhotometricInterpretation <= 1 (so "min is white" and "min is black") with nSamplesPerPixel = 1 corresponds to nDstBitsPerPixel = 8 here, so consider this specific case in the same block. The last piece to adjust is when calling SetPixel: nPhotometricInterpretation = 1 corresponds to the same case as nPhotometricInterpretation = 2 since RGB black is 0, nPhotometricInterpretation = 1 is minisblack so here too black is 0 Change-Id: I5c8e420f851ed6e31998c0698d86300aaa7c4b19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133251 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-04-28include LogicalFontInstance font scale in SalLayoutGlyphsCache keyLuboš Luňák
For some reason it may differ even if vcl::Font is the same. Without this ScExportTest2::testTdf66668 fails. Change-Id: I728a0848ac0420ce0d746134c7072f6ab59f2761 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133537 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-28make some LogicalFontInstance functions constLuboš Luňák
They call non-const GetHbFont() internally, but conceptually they are const. Change-Id: Idec7f06425383c5e78030c76da2c50f560bf64fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133536 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-28make SalLayoutGlyphsImpl::cloneCharRange() work for RTL runs tooLuboš Luňák
Glyphs are in the reverse order in this case, so the character positions for the wanted range must be treated that way. This improves e.g. the second attachment from tdf#112989. Unfortunately it's not that significant, as arabic glyphs are often unsafe to break at. Change-Id: I836ebff6282c420462c5cd5906d30d2e9431f218 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133494 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-28check kashida only if the flag is setLuboš Luňák
Change-Id: Ie508863c670e4b691bd30ac4d20ce479a569f793 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133531 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-28don't cut a glyph subset inside a composed glyphLuboš Luňák
A glyph may may composed from several characters, when asked to make a glyph subset for a character range, make sure the end of the range is not inside this character group. Change-Id: I41d82b432858a87e103dcb0d2fac6a11f25a32dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133530 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-28better debug font compare in SalLayoutGlyphsImplLuboš Luňák
The pointer comparison can be false even though the contents match. Change-Id: I584d30fdc7f311fd1a6058ae3cef98ce8b243f86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133529 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-27todo note about SalLayoutGlyphsCache possibly reusing different mapmodeLuboš Luňák
Change-Id: I68f23addb834b5c59564dda66f5bce1bb9a541bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133506 Tested-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-27make SalLayoutFlags match after makeGlyphsSubset()Luboš Luňák
SalLayoutFlags::BiDiStrong would be set by ImplLayout() if the entire subset had no RTL, but the entire string may not be that, so when creating a subset make sure to also set this flag. Similarly SalLayoutFlags::KashidaJustification should be set only if any glyph in the range has GlyphItemFlags::ALLOW_KASHIDA. Change-Id: I0aa2526f2fdd0c6a6b905ad0cb4040ee556529a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133502 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-27provide explicit function for hashing vcl::FontLuboš Luňák
It's cleaner than streaming the font and then hashing the result, and it's also faster. Change-Id: I6262e45362d386c21482f1e71be51912f123ee45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133500 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-27tdf#85610 sw: show tracked footnote insertion/deletionLászló Németh
also in the footnote area by formatting the footnote number there as the footnote index number in the main text (i.e. as anchor of the footnote). Previously deleted footnotes were shown as not deleted footnotes in Show Changes mode, also inserted footnotes lost their footnote number formatting (i.e. author color of the tracked change, and e.g. the default underline) after file saving. Note: for a working test, fix also MetafileXmlDump by removing the bad 0x01 from the XML dump, which resulted by the not expanded footnote index placeholder character. Change-Id: Ie003f4e19d2e2cee6f09d3b195db69fe5c10e405 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133503 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2022-04-27add string_view wrappers for rtl::math::stringToDoubleNoel Grandin
Change-Id: I114bec72cb933238675e539a8388a607226827cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133455 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-27ofz#47051 Out-of-memoryCaolán McNamara
Change-Id: Ie5276cfda3abe2f4787d2fa85d916449390ddda2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133497 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-26add o3tl::toUInt32Noel Grandin
Change-Id: I07f11bf12fbe1d1c2d812fa0965d6e632e1e1aba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133437 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-26tdf#140272 gtk3: fix crash with dnd using touchCaolán McNamara
gdk_wayland_drag_context_manage_dnd needs gdk_device_window_at_position(device, ...) to succeed similar to the problem of https://gitlab.gnome.org/GNOME/gtk/-/issues/1080 Change-Id: I2e1956b40a622b1d74d3aef3b5fac654fc1256eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133444 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-26Use o3tl::make_unsigned in some placesStephan Bergmann
...where a signed and an unsigned value are compared, and the signed value has just been proven to be non-negative here Change-Id: I9665e6c2c4c5557f2d4cf1bb646f9fffc7bd7d30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133442 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-26tdf#125931: Enable sidebar in MathMike Kaganski
No panels yet, only one default deck (PropertyDeck). It is needed to have the uniform default deck like in all other modules (see commit c09f59eb6173a4a53a2d40ed80aebed18e3882ac); the panels for formula properties might appear later. Change-Id: If1785dc780111fe496638418f43e7b90a250ffce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133334 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-04-26ofz#47029 TimeoutCaolán McNamara
Change-Id: I0fe3a01b237eb142b9e156fc886144f48f8ede18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133436 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-26use a std::vector hereCaolán McNamara
Change-Id: Ic5ad467bc6f1f8537d17be4bec3a92be947239a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133433 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-26unnecessary dtorCaolán McNamara
Change-Id: Ia2a5cf38930e394c4aecdd83fb18fc2a212df067 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133432 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-26ofz#46906 Integer-overflowCaolán McNamara
Change-Id: Ic4c6b34b8fb2ddfbb606871f48e2b504fd24336d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133421 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-26Related: tdf#148433 test if CAIRO_OPERATOR_DIFFERENCE is the problemCaolán McNamara
export SAL_DISABLE_CAIRO_DIFFERENCE=1 to experiment with this Change-Id: I61ec30c818727cb6ab382b4cf9fe9bd29d8d179d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133419 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-26CAIRO_OPERATOR_DIFFERENCE define should have followed its usageCaolán McNamara
when that was moved to here Change-Id: I34565d3568c7e75a9f0abac94360e3ff769afbd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133418 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-25loplugin:stringviewStephan Bergmann
Change-Id: I60b37ab39662c485855894642484b6d093070519 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133391 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-25ofz#46905 Null-dereferenceCaolán McNamara
Change-Id: I26427ee1e010ce79e40c550459d9f53598570a7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133360 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-22use more string_view in unotoolsNoel Grandin
Change-Id: If32767647d3fba22a8e4a2b10fc57f47efca01d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133270 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-21tdf#141000 replacing underscores with spaces of multi words icon pack nameZain Iftikhar
patch will replace underscores with spaces of multi words icon pack name. Change-Id: If37f6617b7c90eb912ab2f58fff0f1df225efa66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133094 Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-04-21tdf#148699 Qt track the active / shown popupJan-Marek Glogowski
I have no idea, if there can be multiple active popups in LO in some way. There can be multiple FloatingWindow and gtk does count them in m_nFloats... There is a whole lot going on in gtk3 related to isFloatGrabWindow(), with "funny" comments like: // FIXME: find out who the hell steals the focus from our frame So this goes with some "optimistic" approach: there is just one active popup, so we can track it in QtInstance. It WFM... Change-Id: I9778587696e1ad9e641dba4f102e2e921266eee6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133249 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-04-21qt6: Fix build (QtWidget::enterEvent)Michael Weghorn
In Qt 6, `QWidget::enterEvent` takes a `QEnterEvent*` param. An override for `QtWidget` was added in commit dc886bc6de2c0061a840bea2426663c3be2ecd26 Date: Tue Apr 19 16:03:56 2022 +0200 tdf#140463 Qt handle mouse enter+leave events Change-Id: I47579ce6686da321533afcef2e4436e315901059 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133235 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-04-20tdf#140463 Qt handle mouse enter+leave eventsJan-Marek Glogowski
Currently just implemented for the QtWidget, but still as a static function, so it may be used for QtObject at some point too. But there is no (mouse) enter or leave event function in QWindow, so no way to handle these there. And since we can't modify the returned QWidget from QWidget::createWindowContainer, the only way would be to expand the static QtWidget::handleEvent used by QtObjectWindow::event ... if it's actually needed at some point. Change-Id: If9009e5dfca508acd1e702df1a17eb8ad7c29690 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133190 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-04-20loplugin:passstuffbyrefNoel Grandin
Change-Id: I336fd329b577b6fa141265d8bc7ce67784bd7306 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133210 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-20tdf#97228 Move ToolbarValue class to separate include fileVaibhavMalik4187
The ToolbarValue class defined in include/vcl/salnativewidgets.hxx was used only by vcl. Therefore, it is now moved to a seperate include file named toolbarvalue.hxx which is inside vcl/inc folder. This header file only contains the definition of the the ToolbarValue class. All the files that references the ToolbarValue class now include toolbarvalue.hxx. Change-Id: I78fe3ceb09892c5d3f720ee3d66111bdcdf48db2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131321 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-04-19new loplugin:stringviewvar looks for OUString vars that can beNoel Grandin
... that can be string_view Change-Id: I0ddf66725e08b58e866a764f57200dd188b9f639 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133066 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-19dont keep writing to config when persona is set to 'no'Noel Grandin
Change-Id: I87233fc2a8b1099a7468b28add1b87e864908f4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133169 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-19Following tdf#142151: Red cast rendered in 16 bit TIFF imageJulien Nabet
Just simplify by merging both almost identical parts. Change-Id: I1658621609e10312feed530090adfa873602d2f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133115 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-04-18tdf#142151: vcl_filters: Add unittestXisco Fauli
While at it, use the files Julien attached to the bug report to test 8 bits and 16 bits Change-Id: Ibed7409483e33200f6183db3df2bd5a0ad6f6a52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133116 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-04-18tdf#142151: Red cast rendered in 16 bit TIFF imageJulien Nabet
I found this fix by testing "pure" red/green/blue files (see attachments in the bugtracker) where red 16 bits file was ok but not green and blue 16 bits ones. Change-Id: Ic700a0fa17c3056d1d4f1d1a7f16a799ff4c7378 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133108 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-04-17Revert "ofz#46632 Direct-leak"Caolán McNamara
This reverts commit 4659fc2f0a7223a89446edff0b77e58758b5edf5. Change-Id: Id8d654ff4c36185b08012ab5a69f7cf75fc43249 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133106 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-17Related: tdf#148349 gtk[3|4] use a css effect to draw attention to the widgetCaolán McNamara
Change-Id: I96af6c87d5aeab6513ff782a0bf25554602b4953 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133105 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-16-Werror,-Wunused-const-variableStephan Bergmann
...since a8383345174d91f6e722128e1d53c9a4ebc18195 "No Win16-style WIN.INI since Windows Vista" Change-Id: I36fa3f6516a6bd9ac6593e01163c1f3427933e42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133090 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-16ofz#46632 Direct-leakCaolán McNamara
there is no DeinitVCL for fuzzing, so fill the fontoptions,etc cache before starting Change-Id: I14a30c3d38490d03c31b4c349674ba48dd32de15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133088 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-15tdf#148349 add a way to call the user's attention to a widgetCaolán McNamara
Change-Id: I2846155a44f3e51ddd8cc1acd81e84a38b4d3934 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133030 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-15gtk[3|4] add the css "warning" "error" to GtkEntry when those states fitCaolán McNamara
Change-Id: I4063155d25b80f6b5912f0b63dc3c8fa21c7263b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133079 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-15gtk4: warning and error are explicitly mentioned in the documentationCaolán McNamara
Change-Id: If61b40e6d104ba54e71c4473bf1214a6df999089 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133078 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-15Related: tdf#147237 change the SalObject background when the settings changeCaolán McNamara
which solves the problem of parts of the gtk ui remaining in the old theme when switching dark<->light Change-Id: I59060dfdf3937ca13cd706eefc9e67c133478992 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133076 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-15use the same colors for warning/error for gen ComboBox as Entry doesCaolán McNamara
Change-Id: I0fb24c0d60c66348052334c9a86e6a5425dccb46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133070 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>