summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2021-10-08add 'destructive-action' to the yes of delete header/footer messageboxesCaolán McNamara
Change-Id: If4d22caac6d1c6ce12b22e0f3d4395f349539e36 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123254 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-08sort buttons using id instead of HelpIdCaolán McNamara
when created from the builder a widget's HelpId is the patch to the widget and always ends in the widget id so this is no change for that case, but when created directly by vcl for e.g. a MessageDialog while the id is set the helpid is empty, so this means that Yes/No MessageDialogs have their buttons sorted the same as if the Yes/No buttons were explicitly spelled out in a builder .ui Change-Id: Iee1a7146d2b6da76804856b1c4df8849ddd91a0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123253 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-08tdf#144984 default edit width got widerCaolán McNamara
at... commit f72013ca65c7a33991d5fb124b919fe7cde269e2 Author: Caolán McNamara <caolanm@redhat.com> Date: Thu Aug 26 15:24:25 2021 +0100 use max of avg digit or 'average char' width to measure Edit space where this default was forgotten Change-Id: I50933ff5c1b8735624609a884fb9fc7701df7f97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123232 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-08loplugin:moveparam in vclNoel Grandin
Change-Id: Ic43e02576454e3ee174304db350659dd113a1d5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123186 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-07vcl: test OutputDevice::Erase()Chris Sherlock
Change-Id: Id15ad1419a5f9d0e628c746770f05b2983c1f65b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122893 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-10-07fix "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/+/123210 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-07vcl: remove unnecessary using com::sun::star::\* and std namespacesChris Sherlock
Change-Id: Ia6e9987262e10a107a14c9fd1b9c274c34cc7d27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122815 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-07tdf#144952 VCL fix the Printer graphics releaseJan-Marek Glogowski
Regression from commit 1b7c53db87bb67eeb2591fbb186f7ac20eb00c68 ("WIN lazy init WinSalInfoPrinter graphics"), which removed the // HACK to fix an urgent P1 printing issue fast SalPrinter::StartPage returns a SalGraphics to the VCL Printer object. On Windows SalPrinter::EndPage deletes the SalPrinter's SalGraphics. MacOS keeps a single SalGraphics for the whole SalPrinter lifetime. PspSalPrinter stores it in a unique_ptr and always resets it in StartPage. But in any case the VCL Printer's SalGraphics reference must be freed before calling a function, which might delete it. Change-Id: Ice528b2bbc89eaadff576420bf210ea4ec1e58d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123199 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-10-07Delete copy ctors/assignments for DLLEXPORT classMike Kaganski
Same as ee405fb2ef36337851801f1bd34411c606d55988 for GraphicHelper, but this time for PhysicalFontFamily. Change-Id: I7a9d6f0cdee29b754244ab6260f78bb7d8deb488 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123195 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-06drop 'using namespace std' in vcl (MacOs/ios), blindlyJulien Nabet
but hopefully there's a Jenkins machine on MacOs Change-Id: If5e87d16e64f010494ca1e5751ea6873f3a21a57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123190 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-06Related: 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/+/123142 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-06tdf#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>
2021-10-06Related: 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>
2021-10-06jsdialog: sidebar: fix master page layout value setsSzymon Kłos
fixes: https://github.com/CollaboraOnline/online/issues/3322 Change-Id: Iaed50c19d4a0f45b00ada305fadcb1372aa6ba63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123037 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123133 Tested-by: Jenkins
2021-10-06vcl: test OutputDevice::DrawArc(), DrawChord(), DrawPie() and DrawEllipse()Chris Sherlock
Change-Id: Ie1513d75262b4664a3b2620fca27d805d4e780bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122821 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-10-06vcl: test OutputDevice::DrawRect()Chris Sherlock
Change-Id: Ic9ed566d171b3059fbe6de9fcc32ca0af6db7a2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122820 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-10-06vcl: test OutputDevice::DrawLine()Chris Sherlock
Change-Id: I17691623e28a75080a1a46099796ec24bab3b91d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122819 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-10-06vcl: test OutputDevice::DrawPixel()Chris Sherlock
Change-Id: I82651c6f41f46bb1097a69f3bcddcac2486a5baa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122794 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-10-06jsdialog: send full update for autofilterSzymon Kłos
Change-Id: I64baa5fea03f96350fe4db86ea0e42e02d41e8be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122531 Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123105 Tested-by: Jenkins
2021-10-06jsdialog: avoid compiler warning for plain vcl windowSzymon Kłos
Change-Id: Icfe5a07e74801d59d6bb0988948bdf20f22bc3e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123110 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-10-06jsdialog: weld plain widgetSzymon Kłos
Change-Id: I85a23a7ea14ab580d4dc222d80edfaa8423cf952 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122562 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123106 Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2021-10-06vcl: remove unused class ImplDeviceFontSizeListChris Sherlock
mpDeviceFontSizeList is no longer used in OutputDevice, so remove this member variable, and then remove ImplDeviceFontSizeList. Change-Id: I93353909485a9243ae02d44c2adc1c9c4a769cef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123125 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-05do not block out PaintImmediately() in LOK modeLuboš Luňák
I'm not sure why I did this when disabling LOK idle painting, even if a window is not to be painted to, it still needs at least invalidating. Change-Id: Iaed6b1071d05d05d6bf5195f3803afb1fc018508 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123097 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-05drop 'using namespace std' in vcl (Windows part)Julien Nabet
Change-Id: I8516e48f5e4a7266aef35ba2e31ebd107bf8169b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123112 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-05tdf#143148 - Use pragma once instead of include guardsChris Sherlock
Done in preparation for movement of PhysicalFontCollection to vcl::font namespace. Change-Id: I17f27afd3ff0763866f3b2c169f7ee100d7f26d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122406 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-05vcl: refactor PhysicalFontFace::IsBetterMatch()Chris Sherlock
Refactored PhysicalFontFace::IsBetterMatch(), which works on a match weighting system to figure out if the font face is, as the functions implies, a better "match" than the one already in the collection. To refactor this I created a number of static functions that return a match value for specific attributes to be matched upon Change-Id: If95b4ad7c5dcfabf34469cbce1260886e4674415 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122812 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-05tdf#124176 vcl: Use pragma once instead of include guardsChris Sherlock
Change-Id: I0bd1384df1f022bcd03e586bd9e380e432a46313 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122909 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-05vcl: test PhysicalFontFace and move to vcl::font namespaceChris Sherlock
- moved PhysicalFontFace.hxx to vcl/inc/font - added PhysicalFontFace to vcl::font namespace - had to regenerate precompiled_vcl.hxx - tested PhysicalFontFace, with some extensive tests for IsBetterMatch() Change-Id: I860022ac244f8a827f6f9cb7ed9018c5d9c328cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121970 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-05Check mpWindowImpl before use in Window::EndTrackingSzymon Kłos
Change-Id: I0a4ddd1b61f5919f346bb2f3a1e2ca9fbad958bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120860 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122108 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123098 Tested-by: Jenkins
2021-10-05remove useless '&& true'Luboš Luňák
Change-Id: I7ba14695171a832bf7e858cb17160861487fb3a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123096 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-04Related: tdf#143391 avoid creatinging a negative height for the scroll areaCaolán McNamara
this is similar to the case of IconViewImpl::CursorUp so presumably needs the same safety check Change-Id: Id1a79c27daabbf4e2077d46c3d14324695922ca1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123066 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-04Resolves: 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/+/123065 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-04Fix typosAndrea Gelmini
Change-Id: Id88532da843e659d337f3529333a17a0c00c8328 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123050 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-04Add sal/config.h in preparation for patchChris Sherlock
The convention is that we need to add sal/config.h to the start of files. Made in preparation of movement of PhysicalFontCollection to vcl::font namespace and test class. Change-Id: I7768d9b4c7335f0d9feeba96f0dc67aaaaf8441e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122259 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-04Related: 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>
2021-10-04drop 'using namespace std' in sd + ucbJulien Nabet
Change-Id: I7d15e9a8c37c29cd6d51c2000f72d1961cd6ff62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123029 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-03cid#1492171 annotate Data race conditionCaolán McNamara
and cid#1492172 Data race condition Change-Id: I2ab0d3af626b8d8007082a3dd944149973f8b63e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123026 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-03A more lightweight O[U]StringConcatenationStephan Bergmann
...compared to a full-blown O[U]String, for temporary objects holding an O[U]StringConcat result that can then be used as a std::[u16]string_view. It's instructive to see how some invocations of operator ==, operator !=, and O[U]StringBuffer::insert with an O[U]StringConcat argument required implicit materialization of an O[U]String temporary, and how that expensive operation has now been made explicit with the explicit O[U]StringConcatenation ctor. (The additional operator == and operator != overloads are necessary because the overloads taking two std::[u16]string_view parameters wouldn't even be found here with ADL. And the OUString-related ones would cause ambiguities in at least sal/qa/rtl/strings/test_oustring_stringliterals.cxx built with RTL_STRING_UNITTEST, so have simply been disabled for that special test-code case.) Change-Id: Id29799fa8da21a09ff9794cbc7cc9b366e6803b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122890 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-01tdf#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/+/122926 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-01bundle key forward calls together as a functionCaolán McNamara
Change-Id: I9f3fe4ea0ac3bd0313d76a04eb3c44ce2192aede Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122925 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-01loplugin:constmethodNoel Grandin
Change-Id: I3ed657c5c5e6840e38e3c8505505b4b372125df0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122910 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-01loplugin:constparamsNoel Grandin
Change-Id: I0d1ad95a9944c9077a1b9db11f2ae05f993c2b36 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122900 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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/+/122899 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-30no need to allocate ImplVectMap on the heapNoel Grandin
Change-Id: If4175ee8f0853b9ef1bb0657338116e2ee57064a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122897 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-30loplugin:constmethod handle more casesNoel Grandin
remove some of the naming limitations, and handle pointer parameters better. I only let the plugin run up till vcl/ Change-Id: Ice916e0157031ab531c47f10778f406b07966251 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122892 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-30Related: 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/+/122895 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-30tdf#141633 multiple line entry font size/zoom not taking effectCaolán McNamara
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>
2021-09-30vcl: initialize variables in ImplMapRes declarationChris Sherlock
Change-Id: I379a555c8e148ba0294198fb5e12582f73a51554 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122771 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-30loplugin:unusedcapturedefault (clang-cl)Stephan Bergmann
Change-Id: Ib7b3bfb7a3162e032cf6c9bf7f19576434592a00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122849 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-30loplugin:constparams improve handling of pointer paramsNoel Grandin
Change-Id: I4c0002e72703eded435bfe4985f5b0121bf8524b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122843 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>