summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2022-03-25ofz#45963 Integer-overflowCaolán McNamara
Change-Id: I4e402a4803013fe2aee0737e1e021e657554403a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132110 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-24loplugin:constantparamNoel Grandin
Change-Id: I6bfbd0cb5c2eac60bdac69fd862154fb2f537a89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132030 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-24ofz#45991 Timeout, reduce allowed scalingCaolán McNamara
Change-Id: I559df8ecc2778f6de9406da871941555a81d21eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132074 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-24fix gtk3 combobox up arrow and page up does not select first entryJim Raykowski
when popup is not active Change-Id: I0c4c0841bf0b24cc528d428829ec628e47032fb4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131882 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-03-24gtk3 VCL : remove useless checkArnaud Versini
Change-Id: I45869f2160435da27f1b30acf41dbee76ce524e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132076 Tested-by: Jenkins Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
2022-03-24loplugin:externalStephan Bergmann
Change-Id: I6b18a514358488ed8a03b42313c3986c2b3fc9df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132021 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-24ofz: Integer-overflowCaolán McNamara
Change-Id: Id75b0aab50ffda1771560213f1389cd9255a461a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132070 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-24loplugin:constantparamNoel Grandin
Change-Id: I86592be0717c062a918108bf4437074b0f70b372 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132029 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-24forcepoint#85 Conditional jump or move depends on uninitialised valueCaolán McNamara
==398461== by 0xCDC7960: (anonymous namespace)::CopyUntil(char16_t*&, char16_t const*&, char16_t, bool) (strhelper.cxx:88) ==398461== by 0xCDC839F: psp::WhitespaceToSpace(rtl::OUString const&, bool) (strhelper.cxx:294) ==398461== by 0xCB54980: vcl::PDFWriterImpl::setOutlineItemText(int, rtl::OUString const&) (pdfwriter_impl.cxx:9875) ==398461== by 0xCB547FF: vcl::PDFWriterImpl::createOutlineItem(int, rtl::OUString const&, int) (pdfwriter_impl.cxx:9851) ==398461== by 0xCAF39B0: vcl::PDFWriter::CreateOutlineItem(int, rtl::OUString const&, int) (pdfwriter.cxx:383) ==398461== by 0xCABD7C8: vcl::GlobalSyncData::PlayGlobalActions(vcl::PDFWriter&) (pdfextoutdevdata.cxx:250) ==398461== by 0xCAC0628: vcl::PDFExtOutDevData::PlayGlobalActions(vcl::PDFWriter&) (pdfextoutdevdata.cxx:616) ==398461== by 0x3D06EA0F: PDFExport::Export(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (pdfexport.cxx:1004) Change-Id: I6bc086997851ee06531a4a9ae263e2b26edfba84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132056 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-24loplugin:externalStephan Bergmann
> vcl/win/gdi/salnativewidgets-luna.cxx(399,6): error: externally available entity 'UseDarkMode' is not previously declared in an included file (if it is only used in this translation unit, make it static; otherwise, provide a declaration of it in an included file) [loplugin:external] > bool UseDarkMode() > ~~~~~^~~~~~~~~~~~~ Change-Id: Idca63c3b9f25629db31cde48bc3c975f943a25f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132022 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-23ofz#45583 Integer-overflowCaolán McNamara
don't allow massive doubles to be loaded Change-Id: Ib7fddd40728a05358adddddf6b1ddc417b36872a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131968 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-23ofz: Divide-by-zeroCaolán McNamara
Change-Id: I792f80ef1a8b88f6f3c3da18bd656a4714f5a160 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131966 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-22ofz#45583 Integer-overflow on drawEPSCaolán McNamara
Change-Id: I6a8add3e2ba695d2012916280a7f976b7b11934d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131908 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-22use dashing info from struct LineInfo in EPS writer (tdf#146804)Luboš Luňák
It had a random(?) hardcoded '2' as the dashing info. While at it, I've also made few other places use the common implementation of creating the dotdash array instead of doing it manually. Change-Id: Id349ca138c98d08eef47dc0bfe6d162e03fc4a9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131932 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-22loplugin:loopvartoosmallStephan Bergmann
...with --enable-qt6, where QList::size() return type has changed from int to qsizetype (aka ptrdiff_t); but just replacing the use of int with a use of qsizetype would fail with --enable-qt5 in some build environments where the Qt5 qglobal.h doesn't happen to already be included, so simply replace this with a range-based for loop and be done with it Change-Id: I5a6c7b0468ed7cef6de7fb647fdb2631a8cb5b35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131916 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-22Win/X11OpenGLDeviceInfo don't need a common base classStephan Bergmann
Change-Id: I9fc7e763b8cf055c3aabaaa97fe8c85ebc5e71b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131926 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-22gtk3_kde5: Don't call deprecated QFileDialog::setConfirmOverwriteMichael Weghorn
QFileDialog documentation says [1]: > This property is obsolete. It is provided to keep old source code > working. We strongly advise against using it in new code. > > This property holds whether the filedialog should ask before accepting a > selected file, when the accept mode is AcceptSave > > Use setOption(DontConfirmOverwrite, !enabled) or > !testOption(DontConfirmOverwrite) instead. Documentation on `QFileDialog::DontConfirmOverwrite` [2] says: > QFileDialog::DontConfirmOverwrite 0x00000004 Don't ask for > confirmation if an existing file is selected. By default confirmation is > requested. It already said that 10 years ago. Given that's the default, there's no need to set it explicitly at all. [1] https://doc.qt.io/qt-5/qfiledialog-obsolete.html#confirmOverwrite-prop [2] https://doc.qt.io/qt-5/qfiledialog.html#Option-enum Change-Id: I77a0022dc4128d157ba49c9aa8de447bb2c08379 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131923 Tested-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-03-22OpenGLHelper::GetDigest is only used on WindowsStephan Bergmann
This is in preparation of getting rid of X11OpenGLDeviceInfo for non-Windows platforms. Change-Id: I9c08292716244d046bf223eb760880db43b6824b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131921 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-22Simplify CoCreateInstance / CoGetClassObject with COMReferenceMike Kaganski
Change-Id: Ieb1035410c3c6c4b40ea779e829a940460d19b5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131922 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-21ofz#45878 add a way to set some limit on hugely complex clipsCaolán McNamara
Change-Id: I6bbf7c6068560e3bb656560fb5c6cc2ed72cecd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131907 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-21Related: tdf#118320 tabpane is too white in darkmodeCaolán McNamara
the only reliable darkmode hammers are a button or drawing with some solid color derived from a theme element, try a button here Change-Id: I842a415020abd26dc60e51438f9fd3c961ecd830 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131902 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-21Related: tdf#118320 swap TILES_SELECTED and TILES_FOCUSEDCaolán McNamara
so the selected tab gets the same bg as the tab page Change-Id: I26222cf755c4c30f8712fb7a4690c84784d9b508 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131898 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-20add system-libfixmathRene Engelhard
Change-Id: Ia0bd884d6fefde77c75889bf2ea831ebf1b401cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131876 Tested-by: Jenkins Tested-by: René Engelhard <rene@debian.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: René Engelhard <rene@debian.org>
2022-03-19reduce down to the part and config we are using and move to toolsCaolán McNamara
Change-Id: Ifaddc59c3c7834808d368c138a5ec7c0b80db14c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131850 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-19Related: tdf#118320 let windows icon theme know when a dark theme is preferredCaolán McNamara
Change-Id: I7569814a575e3d7c216e790eb162397d312fa0e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131843 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-19Related: tdf#118320 tabitems appear as light in darkmodeCaolán McNamara
so use a Button theme and matching button properties for drawing those instead as a workaround Change-Id: I5ba0e360adc109e80ab7ecb1ff2fd5bc84028b61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131852 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-19ofz#45583 detect some invalid scale cases at import timeCaolán McNamara
Change-Id: Iad881f09bef707897e19d402a9931a6dea88f52d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131839 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-19Related: tdf#118320 darkmode DrawThemeBackground doesn't work for tab bodiesCaolán McNamara
so just draw it as solid window color Change-Id: I4e452a7d6a21be91da8e23901746064fd33ee386 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131842 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-18Fix typosAndrea Gelmini
Change-Id: If006b66919dcc7f409e9f9a30e1fe09fa592e698 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131838 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2022-03-18ofz#45583 Integer-overflowCaolán McNamara
we assert on use of a negative xscale too, so don't allow that either Change-Id: I3420fc3f4568eed187fcccf26067006e064d417e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131835 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-18ofz: Timeout in clipPolyPolygonOnPolyPolygonCaolán McNamara
Change-Id: I4257cd7133b29a2f5ae3407a5284965eb0814462 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131737 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-18gtk3 a11y: Rename drawing_area_get_accessib{ity -> le}Michael Weghorn
"...get_accessibity" looks like a typo, but "...get_accessible" fits the naming scheme better anyway. Change-Id: Ie71ade5bb2ef58ac23ecff0efa5adaae792a9620 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131738 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-03-18a11y: Drop vcl::unohelper::NotifyAccessibleStateEventGloballyMichael Weghorn
As mentioned in Change-Id I4681c28c9d18cf1953be5127765f4aa94563662d ("chart a11y: Drop bSendGlobally param from AccessibleBase::BroadcastAccEvent"), calling it has no effect, the `fireFocusGained` and `fireFocusLost` methods of the `XExtendedToolkit` interface in its only implementation in `VCLXToolkit` do nothing, so just drop it. Change-Id: Ie9352a4e4021d7bf0b35de71f55afc660795b906 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131736 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-03-18ofz#45675 TimeoutCaolán McNamara
Change-Id: Icd893d6e0361f9ffe2c88b20b08eaef32919d01a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131718 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-17crashtesting: clip fallback glyph range to layout rangeCaolán McNamara
as seen in tdf124116-1.odt Change-Id: If81192d326e298794051a87632e63798402ff60b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131712 Tested-by: Jenkins Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-17tdf#148033: Loss of precision in /MediaBox (PDFWriterImpl::emitCatalog())Lemures Lemniscati
License statement provided here: https://bugs.documentfoundation.org/show_bug.cgi?id=148033#c4 Change-Id: I93333a17d4a6a266fc25a92abf50c22cb01a2b1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131716 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Jenkins
2022-03-17jsdialog: enable dialog on demand by env varSzymon Kłos
It will be possible to enable some dialogs by environment variable: SAL_JSDIALOG_ENABLE=modules/scalc/ui/validationdialog.ui:modules/scalc/ui/validationcriteriapage.ui (you can specify multiple items with ':' separator) Change-Id: Iba1e6b7ac77716f40c9073a8064206c420f2d081 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131597 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-03-17ofz: Use-of-uninitialized-valueCaolán McNamara
Change-Id: I7d9bb71cc3448e5552005ecac580e50073260e8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131706 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-17avoid warning about invalid cached glyphsLuboš Luňák
Empty string has no glyphs, so SalLayoutGlyphs::IsValid() will be false and would trigger the warning at the beginning of OutputDevice::ImplLayout(). Change-Id: I1be55679f27ba663570659f72c57e57e60f49a6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131700 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-16Related: tdf#118320 enable some windows dark theme supportCaolán McNamara
If experimental mode is enabled and only for windows >= 10.0.18362 Toggling from dark to light mode is detected, and getting some suitable colors for dark mode works. The titlebar will toggle into dark/light mode successfully. DrawThemeBackground does something sensible for buttons and scrollbar at least, comboboxes can be forced to work. SpinButtons are less successful. Menubar and toolbar just bodged to draw a solid backcolor. Notebooks/TabControls don't respect the theme. Its possible it makes more sense to not try and use the windows control drawings apis and just set some dark colors and draw with the old built-in vcl widget rendering or alternative. Change-Id: Ic7927fb9af7ec94444d9de6e0204560e2789be46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131453 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-16ofz#45612 TimeoutCaolán McNamara
Change-Id: I9c6f955b243f9f5027c4b702853e6dce546054a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131667 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-16-Werror=unused-but-set-variableStephan Bergmann
(with --disable-assert-always-abort --enable-dbgutil, <https://ci.libreoffice.org//job/lo_tb_random_config_linux/3741/>) Change-Id: I46c4ed35e1882a98bde4022681624ae6c94031b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131664 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-16ofz#45583 Integer-overflowCaolán McNamara
if we currently ignore 0 width/height here presumably we could also safely ignore negative width/height cases Change-Id: I3c061cdeebb1a6c684920977ee67e3ce156fda95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131668 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-16throw away skia control cache on theme changeCaolán McNamara
Change-Id: Idd21e966cf2c9b246c7484ba6c118c872a3dbac3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131568 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-15use SalLayoutGlyphsCache in EditEngine/SvxFont (tdf#94677)Luboš Luňák
Change-Id: I4c7c94c10b9184ad1d3348e7b364748b4e7c34de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131611 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-15faster comparison of very long strings (tdf#147284)Luboš Luňák
Comparing long string backwards is inefficient because forward compare has better memory prefetch. For the PDF export of the document this drops the comparison cost to 1% from 6%. Change-Id: Ide29608bf56915cc528e6ec8b98ccf8ebf4693a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131579 Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-15use CreateTextLayoutCache() in PDF export (tdf#116400)Luboš Luňák
This seems to have a pretty good hit rate, avoiding most of the cost. Change-Id: Iccaf310acb796d4bc2056fabc24fa27a3631ab18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131557 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-15make CreateTextLayoutCache() cached (tdf#116400)Luboš Luňák
The result depends only on the string, so it's possible to cache it easily, and caching this for text drawing calls can have a good hit rate. Change-Id: I56c6e254cc176ab07afe0df24ed37b19579fe64d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131556 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-15Avoid segv when co-editing around SvxColorTabPage.Michael Meeks
vcl::Window::ImplCallDeactivateListeners(vcl::Window*) vcl/source/window/window.cxx:3403 (discriminator 2) vcl::Window::ImplCallDeactivateListeners(vcl::Window*) vcl/source/window/window.cxx:3404 ... vcl::Window::ImplCallDeactivateListeners(vcl::Window*) vcl/source/window/window.cxx:3404 vcl::Window::ImplAsyncFocusHdl(void*) include/rtl/ref.hxx:112 ... Dialog::Execute() vcl/source/window/dialog.cxx:1056 virtual thunk to SalInstanceDialog::run() vcl/source/app/salvtables.cxx:4924 AbstractSvxNameDialog_Impl::Execute() cui/source/factory/dlgfact.cxx:222 SvxColorTabPage::ClickAddHdl_Impl(weld::Button&) include/rtl/ref.hxx:192 Change-Id: I12a78d65a8e7b8b728dde84f7c51cc19005c9aa6 Signed-off-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131353 Tested-by: Jenkins
2022-03-15drop some redundant semicolonsCaolán McNamara
Change-Id: Ib09ac9cfec70f803b23b28b0c0a8031620436e9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131563 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>