summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
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
2020-05-13fix oss-fuzz buildCaolán McNamara
Change-Id: Ia04a3e9c72c9b32f895c5925937d322f8dd963ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94135 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-13Avoid -Werror=unused-variable with --disable-assert-always-abortStephan Bergmann
...as reported by e.g. <https://ci.libreoffice.org/job/lo_tb_random_config_linux/2228/> Change-Id: If6bc1105fd723f78dbcb36616371a823ee665611 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94132 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-13use gtk_widget_get_screen instead of cast + gtk_window_get_screenCaolán McNamara
cause the toplevel may not be a GtkWindow Change-Id: Iceb1fc9a5d0054a7a2aefa5ba2ad7a2572dbb4c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94134 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-13add access to entry cut/copy/pasteCaolán McNamara
Change-Id: I4f84ccdc4490ae6190d02aca206f87133497bff9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94122 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-13vcl: remove unnecessary ConnectedComponentList typedef (not a list anyway!)Chris Sherlock
Change-Id: If855e28ba8a6d86f069e66809f5607484e826e98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94131 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-13loplugin:unusedmethodsNoel Grandin
Change-Id: Id813d95a90fdbb360dfc8670c0b55b635f633965 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-13Move SalInstanceNotebook to header fileSzymon Kłos
Change-Id: Id14b6fca6f12f49691a621f636300f9da320834c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94097 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-13move LongCurrencyBox to be toolkit onlyCaolán McNamara
Change-Id: I70ac2d521e5a6178483e4d44f2c63f826ddea168 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94106 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-13lok: notify data change of the formatted field controlHenry Castro
Change-Id: I997ed1fb3900ab46e6182e529762bf5b04e82fcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94076 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94091 Tested-by: Jenkins
2020-05-13loplugin:unusedvariableplusNoel Grandin
Change-Id: I58a466ac18debafa3bc2ff31c648ff51e126ab8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94083 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-12lok: replace SetValue for ImplNewFieldValueHenry Castro
The ImplNewFieldValue notify changes in the spin control Change-Id: I64c0239b0a12ecdf9a3b7af4c496cee88d1b2cb3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94070 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94077 Tested-by: Jenkins
2020-05-12tdf#132435 only place menu vertically if up/down requestedCaolán McNamara
don't fallback to left/right if it doesn't fit, just scroll the menu instead Change-Id: I20b261fd7fee78555bf87b25dfeed33c23602493 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94065 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-12allow double-clicking etc to expand on-demand rows tooCaolán McNamara
Change-Id: Idb8bca730d4c8d8da0d4689961cf1468051159d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94062 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-12Move SalInstanceButton to header fileSzymon Kłos
Change-Id: I3f6aa1975ae5859e0c340c82627d95e49313a668 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94050 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-12Move SalInstanceComboBox to header fileSzymon Kłos
Change-Id: Iafa449cc1ebba93cc69da194857ea33b8f8510b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94049 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-12make VclPaned::set_position take effectCaolán McNamara
Change-Id: Id4ae096b413196cfb7118cd3a09a3f0a6c333f01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94053 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-12missing licence headerCaolán McNamara
I wrote all this so this is the appropiate boilerplate since... commit 3832609a238d47375e634cbda4d092b11108fee4 Date: Wed Feb 19 13:32:14 2020 +0100 Create header file for SalInstanceBuilder Change-Id: I7615e15b220cd2e801a33c1418cf1f7cb0d72fc4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94046 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-12add Paned accessCaolán McNamara
Change-Id: I5da0125a8f76d201e8dab2892b1f205c759599b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94045 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-11GdkDragCancelReason wasn't exposed before gtk 3.20.0Caolán McNamara
Change-Id: I63deca16ab938e340c03450e2f75054def94569f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93869 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Jenkins
2020-05-11tdf#132935 fix gtk3 submenu crashJim Raykowski
Change-Id: Icfc7d17f289bb94896e5e770c61809cb473d35a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93943 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-11Resolves: tdf#132902 restore original hierarchy in dtorCaolán McNamara
so a repeated weld will result in the same layout each time Change-Id: I9ba41e70c29046b84392280d4bd95f8141b24251 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93953 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-11split and rename to form insertAsParentCaolán McNamara
for clarity as to what each chunk does Change-Id: Ia58d19dfe162631d0ba67975eb2b9546d7afa2cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93952 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-11avoid deep copies of pixels with Skia raster surfaces (tdf#132856)Luboš Luňák
SkCanvas::draw() leads to deep copies of the source bitmap, moreover RasterWindowContext_win allocates the pixels in a way that SkSurface_Raster has to do a deep copy because of not owning the pixels. Change-Id: I22f6a2c0f96faf99f94140eff26ec0c22fae96d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93958 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-05-11tdf#38835: strip out non-trivial globals before mainIan Barkley-Yeung
Allocate the fixed texture vector on first use instead of before main. This should make startup very, very slightly faster. Tested by just starting up a writer document. Let me know if there are other tests I should be doing. Change-Id: Iaf752327b86c131a0241786485b30030a4f987c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93939 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-05-11fix some leaks in vclNoel Grandin
Change-Id: I9588841de6f751ad767f695dec51f660b2990b49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93954 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-11tdf#132832 calcAdjustedSize: Take max width into accountMichael Weghorn
Actually take into account the preferred width when calculating the size of radio button, checkbox and hyperlink controls. This e.g. makes word wrap work properly when the multiline property is set for a checkbox, radio or hyperlink control and the single line text exceeds the preferred width, rather than keeping the whole text in one line that exceeds the preferred width. Change-Id: Id04668e4e1afe7c10a28468eff05cf04c10ae3c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93947 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2020-05-11lok: fix the window type of the formatted field controlHenry Castro
Change-Id: Iab87c94ca19314eacec18e71d7d09ba42f1756e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93586 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2020-05-10use compact namespace syntaxNoel Grandin
mostly done using git grep -wl namespace | xargs -P 8 perl -i -pe 's/namespace\s*([\w:]+)\s*\{\s*namespace\s*/namespace \1::/g' Change-Id: Ic53dbaf443cf81fb8940155f2582a7128d829e6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93406 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-10lok: add FormattedFieldUIObject classHenry Castro
Required by mobile device to set "VALUE" number Change-Id: Ie18fa3c58b8ba107917a8b12a7b98c74a385975c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93585 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2020-05-10lok: override get_state of the MetricFieldObject classHenry Castro
used for unit testing Change-Id: I7d8ed976837b488bfb22d865583b8d4f1f0978ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93688 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2020-05-10lok: replace name Neutro to NeutralHenry Castro
This commit was split because it has to be in sync with cp-6.2 branch Change-Id: I849b63f34297a6876d5a3ab83bb6ce551bb156d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93687 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2020-05-10lok: add MetricFieldUIObject classHenry Castro
Add new action "VALUE" to set the value number for metric input controls Change-Id: I5058260c2e1562cfc6d10508d5981d185c5f2212 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92738 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93070 Tested-by: Jenkins
2020-05-10new loplugin:simplifypointertoboolNoel Grandin
Change-Id: Iff68e8f379614a6ab6a6e0d1bad18e70bc76d76a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-09vcl: move XmpMetadata in vcl/Library_vcl.mk to the correct placeTomaž Vajngerl
Change-Id: I17d4be68f8655f291a53ac5dc33cdd53e10f8e57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93826 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-09GDK_KEY_Return or GDK_KEY_KP_EnterCaolán McNamara
Change-Id: I9bfe6ecd3490d9c6d12c21f8c8a7074e611f0eb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93784 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-09lok: replace locale name "en_US" -> "en-US"Henry Castro
Change-Id: Ic4792e35d14e2865f8bd9998b61c9024f822d454 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93584 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2020-05-09lok: fix the window type of the metric field controlHenry Castro
Change-Id: I286be638a562e3042c1c91e40cb60a9c98938360 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92796 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93071 Tested-by: Jenkins
2020-05-09lok: fix wrong metric conversion of the metric input controlHenry Castro
The client side does not work well if the browser has different locale, and the input element conversion fails or change to a different value, so the value is converted to a neutral locale. Change-Id: I89f96844603a8552609d486590c7de752cb5a95c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92395 Reviewed-by: Henry Castro <hcastro@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93069 Tested-by: Jenkins
2020-05-09tdf#118418 implement scrollSubstringTo() for Qt & windowsSamuel Thibault
Use new accessibility scroll type compatible with IAccessible2. Change-Id: I0967d1c56425e1e860db34f4b9c17427e531fe02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93636 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-05-08true is sensitive not insensitiveCaolán McNamara
Change-Id: If009f0456a9e4d070b8a20fa1c63b1262b98d3df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93719 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-08Fix typoAndrea Gelmini
Change-Id: I8c3d4d467aebbcb1014edb78c21a0e3a58a1884c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93683 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-05-08remove TriStateBox classCaolán McNamara
Change-Id: Ia6c76a9f0fc0be7790d0c801cbca4a7b8d478976 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93680 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-08unused msgbox.cxxCaolán McNamara
Change-Id: I477a17d7a80e8116f34b723d689971341fc65991 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93679 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-08split button.hxx into toolkit-only pieceCaolán McNamara
Change-Id: I792efb417504a3b55043ff4fc3fd3597a9b953f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93678 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-08move DisclosureButton out of public headersCaolán McNamara
Change-Id: If267be2c5d02d185eddada7c4e0de0bc5af0b19c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93677 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-08Resolves: tdf#132477 use "cancel" on GdkDragContextCaolán McNamara
gtk_drag_cancel gave trouble as previously described and GDK_KEY_Escape was a placebo which didn't do anything seeing as it wasn't applied by gtk_main_do_event to the drag GDK_KEY_Escape handler Change-Id: I66f6e04ded12144a33a38504f5bfc1cad7807bb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93673 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-07tdf#101181: improve glow effectMike Kaganski
The shadow of objects must not be scaled: this displaces any internal areas that need blur, e.g. holes. Instead, it needs to dilate the shadow using kernel with radius equal to blur radius: this allows the borders of dilated objects to be in the middle of the blur area. The following blur makes those new margin points to have 50% intensity, and full glow intensity at the point of old object margins. This also removed artifacts when moving objects with glow effect caused by mismatch between scaling and D2D range calculation. The D2D range therefore is not calculated by scaling, but using grow. Blur filter's "extend bitmap by blur radius" option got obsoleted and removed. There's no need to blur the glow color (24-bit RGB). Instead, glow bitmap must be filled by glow color, and have an alpha mask that is blurred accordingly. This makes the glow properly transparent, and also reduces the blur complexity which now only needs to process 8 bits of alpha channel. The object shadow is created using basegfx::BColorModifier_replace inserted into the 2d decomposition of the effect, as before. To make sure that any non-fully-transparent pixel will become black pixel in the shadow, black color is used, and the result is further processed in VclPixelProcessor2D::processGlowPrimitive2D with monochrome filter using threshold 255. Glow transparency attribute is taken into account: the initial value at the margins of the objects. Color replacement filter is used to replace the object shadow with the attribute value before blur pass. Correct blur radius is used, calculated from glow effect radius, instead of hardcoded value of 5 pixels. This makes the glow to fade gradually along the full width of the effect, instead of only fading in narrow outer border previously. Since blur filter is only implemented for radius up to 254 pixels, and since downsampling the shadow before blur increases performance without noticeable quality loss, the image is downsampled before filtering. It should be noted that the glow effect is almost identical to soft shadow effect, likely with the only difference of using dilation in the former, but not in the latter. The code might be reused later to implement soft shadow as well. Change-Id: I728c532f9df7ccf85f353c23c6c7d8352d7b2086 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93235 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>