summaryrefslogtreecommitdiff
path: root/svtools/source/control
AgeCommit message (Collapse)Author
2024-12-16a11y: Move TabBar a11y classses to svtools, no longer use factoryMichael Weghorn
Move AccessibleTabBar and related classes to implement accessibility for the TabBar control to svtools, where the TabBar code is also located. (This matches how it's organized for the Ruler control whose a11y class AccessibleRuler is also in svtools.) This removes the last dependency of the accessibility module on svtools, so drop that from accessibility/Library_acc.mk. Instead of using the AccessibleFactory to create an instance in TabBar::CreateAccessible, just call the AccessibleTabBar ctor directly. Change-Id: Id6a8852de930ffe7fe7509f84f33861d274120dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178588 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-12-16svtools a11y: Switch OSL_ENSURE to assertMichael Weghorn
Change-Id: I5391cd0a23c28d1df30f2f4f87701156e25f34b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178586 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-16svtools a11y: Simplify Ruler::CreateAccessibleMichael Weghorn
Ruler::mxAccContext is only used in this method and nowhere else, so there's no need to have this as a class member. (The vcl::Window base class already holds a Reference to the XAccessible, s. below.) There's no need to explicitly call vcl::Window::SetAccessible, because Ruler::CreateAccessible gets called by Window::GetAccessible, and that already sets `mpWindowImpl->mxAccessible`, which is what vcl::Window::SetAccessible also does. Drop the // MT: Fixed compiler issue because the address from a temporary object was used. // BUT: Should it really be a Pointer, instead of const&??? comment for which it's unclear what it refers to now, neither is it clear to me when looking at the commit that originally introduced it, commit b755fb8c0f6b1282f62c12f378c0a5ecac64d490 Author: Steve Yin <steve_y@apache.org> Date: Mon Nov 25 16:15:58 2013 +0000 Integrate branch of IAccessible2 Change-Id: Ic423d0fcc97894303c29097023742f2dabf00b79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178585 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-09remove some range checksNoel Grandin
which are more likely to hide an underlying bug than they are to help Change-Id: I3bcac401d62f9baf27e72bacb6bb0a2315d1c081 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178000 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-12-04Move helpers for css::awt/VCL point/rect/size to vcl::unohelperMichael Weghorn
Move helpers to convert between the Rectangle, Point and Size classes in vcl and in css::awt from VCLUnoHelper (in the toolkit module) to vcl::unohelper (in the vcl module), for reuse in vcl in upcoming commits. Change-Id: I7b11c8a6b8c843a01ce25b1e4c0fb1869ad1e6ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177816 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-04vcl: fix call sites for createBlendFrame(), rename to createAlphaBlendFrame()Christopher Sherlock
The call sites are actually passing in transparency, in fact to be consistent with current conventions we are actually dealing with alpha values. So we need to take the transparent values at the call sites and convert to alpha values by just subtracting 255. Hence fixing the FIXME comment. Change-Id: Ibc55ea77f469ec8afcab0cc26d2b8cdf25ea8a72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173858 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-24Resolves: tdf#163772 move margin into ValueSet itselfCaolán McNamara
instead of using margin property in .ui where size_request doesn't take such margins into account, while pref_size does. Change-Id: I7c557fd63c438515814ad32b9627895c27c13b81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177213 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-08no need to take a copy of the getProcessComponentContext return valueNoel Grandin
we can just take a "const &". (found by running clang-tidy with the performance-unnecessary-copy-initialization warning) Change-Id: I20fd208c65303da78170b1ac06c638fdf3aa094b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176267 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-11-07loplugin:passstuffbyref in svtoolsNoel Grandin
Change-Id: I4e3d7d5fb6be857efc8327eb5113f874169bf778 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176155 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-17cid#1555697 Data race conditionCaolán McNamara
Change-Id: Ib022e1fbccf456e89f16a26efb50e6c8d98372ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175065 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-10-16loplugin:unusedmethodsNoel Grandin
Change-Id: I6ba4b4046190b701d4a15c6fa90b6009ecf4ab1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175014 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-03use more concrete UNO class in ValueSetAccNoel Grandin
Change-Id: I9d6c31ccda4ff05f33d437ab064a2a55d84627b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174411 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-01a11y: Only send active-desc-changed event when ValueSet has focusMichael Weghorn
When the selected item in a ValueSet changes, only send an AccessibleEventId::ACTIVE_DESCENDANT_CHANGED event for the newly selected item if the ValueSet itself has focus, as the active descendant is the currently active child of the current focus object. This prevents incorrect events that e.g. broke Orca's focus tracking and thus announcement of the current slide in Impress when moving between slides in the "Slides" panel: 1) start Impress 2) select the "Beehive" presentation template 3) move focus to "Slides" panel 4) use up and down key to navigate between slides Instead of saying "Slide 1" and "Slide 2" respectively, Orca sometimes announced "Layout, list with 16 items", as the 2 slides use a different layout, and thus switching between slides implicitly leads to the selection of the corresponding item in the "Layout" deck in the sidebar, which resulted in a corresponding ACTIVE_DESCENDANT_CHANGED event being sent prior to this commit, making Orca think that that item received keyboard focus. With this commit in place, Orca now announces "Slide 1" and "Slide 2" according to the newly selected slide in the "Slides" view. Change-Id: I543a4c94bae75dede7274a8b35f183ccd2ac0515 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174342 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-09Resolves: tdf#162113 prefer restoring explicit font style selectionCaolán McNamara
so when scrolling through fonts that might not have the original or explicitly picked style, then on moving to the next font that does have that style, then the original bold/italic/etc gets picked again. Change-Id: If818a116ed4ab248cb67f60845acad2cd4eeb8ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173071 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-08-29cid#1607370 Check of thread-shared field evades lock acquisitionCaolán McNamara
apparently since: commit 8228227168a7eb3ebf14629bec87f01536c23970 CommitDate: Thu Dec 8 17:27:05 2016 +0000 convert OSL_ENSURE to assert in AccessibleEventNotifier Change-Id: If4ad0459e39e44a9417dd074560538f2a87586b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172615 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-17Use IsRunningUnitTest / IsRunningUITest consistentlyMike Kaganski
The functions are moved to o3tl as inline functions. Change-Id: Ief7d7e292ef15e055ad04ab5707e5e6a2a05b916 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170636 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-07-17Simplify checking for "running under unit/ui test"Noel Grandin
In various places, the code checks if we are running as a unit test or a UI test. This code grew organically, and is most re-using environment variables that were designed for narrower purposes. Rather than being clever, just add two new explicit and simple environment variables in the natural place (the command that runs them), and check for those variables in the code. Change-Id: Icce0997914fa0be30a5ac1f29bd870bdb5893a8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170618 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-07-11Unify/Port to use VCLUnoHelper for AWT <-> VCL conversionsMichael Weghorn
Following Change-Id: Id48f81deb05aee2026509037f7d14575735e5be0 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Wed Jul 10 14:49:03 2024 +0200 VCLUnoHelper: Align AWT <-> VCL helpers with convert.hxx impl , port all uses of the helper functions defined in `include/toolkit/helper/convert.hxx` to use the `VCLUnoHelper` equivalents instead, to unify usage and avoid duplication. Drop `include/toolkit/helper/convert.hxx` now that it's unused. Change-Id: I22695a93e40e47bb2b14d191a2e0a4eb7c856895 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170317 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-06-10tdf#157833 tdf#155692 sw: fix hit area to resize row/colLászló Németh
Fix 1) missing or too narrow hit area (tdf#157833), and 2) not recognized click inside hit area (tdf#155692). It was impossible or very hard to resize text table columns and rows using the mouse: 1) Double arrow, i.e. "resize row/col" mouse pointer shows the hit area of text table row/column borders. This was missing or was very narrow with normal zoom, because of an obsolete constant for low resolution displays. Change this constant used in IsSame() with scale-dependent values to support the same hit area on different zoom levels and with different screen resolutions. 2) Especially on bigger zoom, "resize row/col" mouse pointer, i. e. the visible hit area didn't guarantee drag & drop any more because of too small hit area in pixels in the svruler code base: clicking on not exactly center of the hit area resulted selection of cells or the cell content instead of drag & drop the border, violating WYSIWYG. Enlarge the default 1 pixel to 5 pixels to cover the whole hit area. Note: only for resizing table borders inside the document, not on the horizontal and vertical rulers. Change-Id: I398a0de782040b0ad18835658ed625117a6e0e06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168605 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2024-06-06the remaining Help::GetHelpText calls don't want their parent as fallbackCaolán McNamara
so we can drop the hierarchical search these probably do nothing in the absence of the classic help. fpicker case might benefit from moving some a11y translations out of help into core. Change-Id: I01b8d0c7cc1a1b3697d3332e330c6b4654e76af1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168507 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-06-04tdf#160844 we don't want scrollbars to be a target for Ctrl+F6, etcCaolán McNamara
Change-Id: Ie24c10fa16889a70717cbee15aef38a20308934d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168390 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-05-13loplugin:ostr in svtoolsNoel Grandin
Change-Id: If00c16527fb861a86f5dde195ab612bbab3a53c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167594 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-05-06Resolves tdf#136917 - Focus rectangle barely visible on toolbar widgetsHeiko Tietze
eg. Toggle Unordered List Change-Id: I9298fcbcbf715402a59c7a8ccaa2cd341e7cda8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166916 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2024-04-04loplugin:unusedmethodsNoel Grandin
Change-Id: I19f466a272c821185bea4b45efd34392e525c0d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165785 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-03tdf#146619 Drop unused 'using namespace' in: svtools/Gabor Kelemen
Change-Id: Ia74e293ba140d7e204a2706b8e2827669bfdfb1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165541 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-04-02convert SvtRulerAccessible to comphelper::WeakComponentImplHelperNoel Grandin
Change-Id: Ibd37a38bf1fe6c2669af11b0c4eca957954f64bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165676 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-21tdf#93352 Fix horizontal swiping and scrolling when using an RTL UIPatrick Luby
Starting with commit bfa21ce5fa08f2c634ccb6162914be55aef9f3c2, horizontal swiping in Calc moved in the wrong direction scrollbars were drawn mirrored. So, revert parts of commit bfa21ce5fa08f2c634ccb6162914be55aef9f3c2 so that we are using Calc's previous "negative scrollbar range" implementation for RTL UIs, but only for horizontal scrollbars since vertical scrollbars are the same in LTR and RTL UIs. Also, always disable RTL for scrollbars. Enabling RTL causes the following bugs when clicking or dragging the mouse in scrollbars in Calc's RTL UI: - Click or drag events get mirrored so you must click or drag in unexpected locations to move the scrollbar thumb in the desired direction - Repeatedly dragging the scrollbar thumb leftward can only move no highter than the R, S, or T columns Note: even though RTL is always disabled for Calc scrollbars, the arrows must still be swapped in vcl's ScrollBar class. Change-Id: I85aac94ffaf7df2eeb251a3ff150cc0363b5d770 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164959 Reviewed-by: Stéphane Guillou <stephane.guillou@libreoffice.org> Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
2024-01-10cid#1546141 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1546004 COPY_INSTEAD_OF_MOVE cid#1545934 COPY_INSTEAD_OF_MOVE cid#1545563 COPY_INSTEAD_OF_MOVE cid#1545533 COPY_INSTEAD_OF_MOVE cid#1545529 COPY_INSTEAD_OF_MOVE cid#1545502 COPY_INSTEAD_OF_MOVE cid#1545499 COPY_INSTEAD_OF_MOVE cid#1545479 COPY_INSTEAD_OF_MOVE cid#1545344 COPY_INSTEAD_OF_MOVE cid#1545324 COPY_INSTEAD_OF_MOVE cid#1545313 COPY_INSTEAD_OF_MOVE cid#1545252 COPY_INSTEAD_OF_MOVE cid#1545186 COPY_INSTEAD_OF_MOVE Change-Id: I44a783876699f88c769f239ae84eb5cae44d5f07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161879 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-21Revert "tdf#100584 - Arrange sheets in the tab bar depending on the RTL ↵Andreas Heinisch
settings" This reverts commit be86c8f2432623fdb8ed4f22ca08c35121fd8bec. Reason for revert: To many regressions. Change-Id: Id3fb8dc5d4edb84c0008b7834a80887aaa7d9f83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161154 Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-12-21Revert "tdf#100584, tdf#157784 - Arrange sheets depending on the RTL settings"Andreas Heinisch
This reverts commit 4f1b3c16f5530a2a190cab07c07c7bf63acf42c7. Reason for revert: To many regressions. Change-Id: I7352bb3c192d5e6c72e95c387ee551764007e97b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161152 Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-12-12tdf#158320 restore Live Preview for font hoveringCaolán McNamara
a) announce Preview when a 'selected' font preview is requested b) move EndPreview to when the dropdown popups down, rather than listen to ESC Change-Id: I68916769150c23c0ec18aae084cdf3cafb7352a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160609 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-10cid#1545177 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1545179 COPY_INSTEAD_OF_MOVE cid#1545187 COPY_INSTEAD_OF_MOVE cid#1545188 COPY_INSTEAD_OF_MOVE cid#1545189 COPY_INSTEAD_OF_MOVE cid#1545196 COPY_INSTEAD_OF_MOVE cid#1545197 COPY_INSTEAD_OF_MOVE cid#1545204 COPY_INSTEAD_OF_MOVE cid#1545223 COPY_INSTEAD_OF_MOVE cid#1545236 COPY_INSTEAD_OF_MOVE cid#1545239 COPY_INSTEAD_OF_MOVE cid#1545253 COPY_INSTEAD_OF_MOVE cid#1545274 COPY_INSTEAD_OF_MOVE cid#1545286 COPY_INSTEAD_OF_MOVE cid#1545309 COPY_INSTEAD_OF_MOVE cid#1545311 COPY_INSTEAD_OF_MOVE cid#1545345 COPY_INSTEAD_OF_MOVE cid#1545358 COPY_INSTEAD_OF_MOVE cid#1545361 COPY_INSTEAD_OF_MOVE cid#1545365 COPY_INSTEAD_OF_MOVE cid#1545367 COPY_INSTEAD_OF_MOVE cid#1545372 COPY_INSTEAD_OF_MOVE cid#1545373 COPY_INSTEAD_OF_MOVE cid#1545377 COPY_INSTEAD_OF_MOVE cid#1545392 COPY_INSTEAD_OF_MOVE cid#1545399 COPY_INSTEAD_OF_MOVE cid#1545404 COPY_INSTEAD_OF_MOVE cid#1545408 COPY_INSTEAD_OF_MOVE cid#1545430 COPY_INSTEAD_OF_MOVE cid#1545439 COPY_INSTEAD_OF_MOVE cid#1545449 COPY_INSTEAD_OF_MOVE Change-Id: I3afe836a0bbc8bd70937035e60eb020435e413d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160539 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-31tdf#100584, tdf#157784 - Arrange sheets depending on the RTL settingsAndreas Heinisch
The tab bar's position should be determined globally based on the RTL settings, rather than being individually set for each sheet. Change-Id: I0690b01c842d2da6d49b57d1adad0a8e0844087f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158730 Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-10-31Revert "tdf#100584, tdff#157784 - Arrange sheets depending on the RTL settings"Andreas Heinisch
This reverts commit a90d89d5b2dae2b4c3fd6a411de2160a3bf20779. Reason for revert: Typo in the commit message Change-Id: I58f184e2733d91aa827396868fb4f7b8e9d47a48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158693 Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-10-31tdf#100584, tdff#157784 - Arrange sheets depending on the RTL settingsAndreas Heinisch
The tab bar's position should be determined globally based on the RTL settings, rather than being individually set for each sheet. Change-Id: I0906f85058a5b4250540dda07740eec61f46d299 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158675 Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-10-20tdf#114441 Convert use of sal_uLong to better integer typesAdam Seskunas
In ctrlbox.cxx, nCount and i were changed to sal_uInt32 because aFontSizeNames.Count() returns sal_uInt32. In valueset.cxx, nFirstItem and nLastItem are only used in a comparison with a value of size_t. They were both changed to size_t because nLastItem contains the product of tools::Long mnVisLines and sal_uInt16 mnCols where tools::Long can be 64 bit in some cases. Change-Id: Ib3f10cdf6ae81e96f28f13a0bb32699f26c8a0cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157109 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2023-10-07jsdialog: cache only best quality font previewsSzymon Kłos
to keep single cache for all the views, we downscale result if needed when we draw on a target Change-Id: I3b57ec08b2260029ff469a13da725feff04555d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156190 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157671 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2023-10-07jsdialog: enable font name & size comboboxSzymon Kłos
This enables font selector with font rendering in Online Change-Id: I2b57c0831e84a957374c2b1733f6526ca80ac7bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156242 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157503 Tested-by: Jenkins
2023-09-13loplugin:unusedmethodsNoel Grandin
Change-Id: I00f228451574ca9f9e352d233c7f326c88e90a95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156892 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-11SvtRulerAccessible does not need to implement XAggreggationNoel Grandin
Checked on jenkins using 'make check' and +void SAL_CALL setDelegator(css::uno::Reference<css::uno::XInterface> const &) final { assert(false); } Change-Id: I49e2c013c82687b71d0b442662ca9de229d0dddb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156795 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-11lok: don't prerender font previewsSzymon Kłos
Change-Id: Id83a6804f658d56793913b8e8e07f7ec1f2ff82a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156116 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156812 Tested-by: Jenkins
2023-09-10tdf#157160 a11y: Don't assert ValueSetAcc parent on add/removeMichael Weghorn
After commit 2f5e7a07775690e57d639eeca7a1e41733fa93a9 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Thu Sep 7 08:09:31 2023 +0200 tdf#157092 a11y Let only drawing area dispose its ValueSet acc had fixed a crash when using the search feature with the Qt-based VCL plugins, the previous `DBG_ASSERT` that got promoted to a real assert with the above commit got triggered now that a11y CHILD events for removed children are handled since commit be8b031d8b3c66b223ea2478f1129427f3a362bd Author: Michael Weghorn <m.weghorn@posteo.de> Date: Thu Sep 7 09:51:38 2023 +0200 qt a11y: Forward CHILD event for removed child , s. the backtrace in tdf#157160. Since the ValueSet isn't needed for this, and at least removing a listener after the ValueSet has been dropped even seems logical if it's a valid use case to delete the ValueSet before e.g. hiding the window (s.a. comment in above-mentioned 2f5e7a07775690e57d639eeca7a1e41733fa93a9), don't check for it, but only that the object hasn't been disposed yet (as was effectively the case before 2f5e7a07775690e57d639eeca7a1e41733fa93a9, when only a SAL_WARN would have been triggered). Change-Id: I5be0a44decbe4508f4a419ec3dca9f8aaf85e951 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156782 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-09-07tdf#157092 a11y Let only drawing area dispose its ValueSet accMichael Weghorn
Don't dispose the a11y object in the `ValueSet` dtor, because it doesn't own its a11y object, but it is owned by the `weld::DrawingArea` of the `CustomWeld` that the `ValueSet` (as a sub-class of `CustomWidgetController`) belongs to. The `CustomWeld` ctor passes the a11y ref retrieved by `CustomWidgetController::createAccessible` to `weld_drawing_area`, which takes ownership and disposes the object. (For Gtk, see `GtkInstanceDrawingArea::~GtkInstanceDrawingArea`. For non-Gtk, see how the `SalInstanceDrawingArea` ctor passes the reference to `VclInstanceDrawingArea::SetAccessible`/ `vcl::Window::SetAccessible`, so it gets disposed when that `VclInstanceDrawingArea` gets disposed, s. `vcl::Window::dispose`.) Other classes derived from `CustomWidgetController` also don't dispose the a11y object themselves. Still reset the `ValueSet` pointer in `ValueSetAcc` to nullptr when the `ValueSet` gets destroyed and turn the check for a valid pointer from just an `OSL_ASSERT` to a real assert and throwing a `RuntimeException`. But still allow getting the a11y context when only the ValueSet has been deleted but the object has not been disposed yet. Fixes a crash due to a `com::sun::star::lang::DisposedException` being thrown when using the new search feature in the "Tools" -> "Options" dialog (or when just switching to the "LibreOfficeDev Writer/Web" -> "Background" page with the qt6 VCL plugin or on Windows when the NVDA screen reader is running. This happens when the drawing area is hidden and the a11y layer is meant to be notified about this (so the a11y object can be removed). It still seems a bit odd that the `ValueSet` gets destroyed (in `SvxColorTabPage::~SvxColorTabPage`, frame 20 in below backtrace) before the corresponding `vcl::Window` gets hidden (in the base class dtor, `SfxTabPage::~SfxTabPage`, s. frame 19 in the backtrace). Backtrace for how the exception gets thrown: 1 com::sun::star::lang::DisposedException::DisposedException DisposedException.hpp 40 0x7fa385fd9ca9 2 ValueSetAcc::ThrowIfDisposed valueacc.cxx 956 0x7fa385fd9342 3 ValueSetAcc::getAccessibleContext valueacc.cxx 473 0x7fa385fd69fa 4 VCLXAccessibleComponent::ProcessWindowChildEvent vclxaccessiblecomponent.cxx 186 0x7fa3853dc905 5 VCLXAccessibleComponent::WindowChildEventListener vclxaccessiblecomponent.cxx 124 0x7fa3853dc51d 6 VCLXAccessibleComponent::LinkStubWindowChildEventListener vclxaccessiblecomponent.cxx 114 0x7fa3853dc43f 7 Link<VclWindowEvent&, void>::Call link.hxx 111 0x7fa382c56ccf 8 vcl::Window::CallEventListeners event.cxx 296 0x7fa382c53e5b 9 vcl::Window::ImplResetReallyVisible stacking.cxx 719 0x7fa382b51a49 10 vcl::Window::ImplResetReallyVisible stacking.cxx 735 0x7fa382b51b0e 11 vcl::Window::ImplResetReallyVisible stacking.cxx 735 0x7fa382b51b0e 12 vcl::Window::ImplResetReallyVisible stacking.cxx 735 0x7fa382b51b0e 13 vcl::Window::ImplResetReallyVisible stacking.cxx 735 0x7fa382b51b0e 14 vcl::Window::ImplResetReallyVisible stacking.cxx 735 0x7fa382b51b0e 15 vcl::Window::ImplResetReallyVisible stacking.cxx 735 0x7fa382b51b0e 16 vcl::Window::Show window.cxx 2234 0x7fa382d94f7c 17 vcl::Window::Hide window.hxx 880 0x7fa382b23600 18 SalInstanceContainer::move salvtables.cxx 1352 0x7fa3834789f3 19 SfxTabPage::~SfxTabPage tabdlg.cxx 157 0x7fa38928ab47 20 SvxColorTabPage::~SvxColorTabPage tpcolor.cxx 166 0x7fa350950d3e 21 SvxColorTabPage::~SvxColorTabPage tpcolor.cxx 166 0x7fa350950d5a 22 std::default_delete<SfxTabPage>::operator() unique_ptr.h 99 0x7fa350538fdc 23 std::__uniq_ptr_impl<SfxTabPage, std::default_delete<SfxTabPage>>::reset unique_ptr.h 211 0x7fa35080dcbe 24 std::unique_ptr<SfxTabPage, std::default_delete<SfxTabPage>>::reset unique_ptr.h 509 0x7fa350808555 25 SvxAreaTabPage::SetOptimalSize tparea.cxx 155 0x7fa35093db3e 26 SvxBkgTabPage::Create backgrnd.cxx 230 0x7fa350864dbc 27 SwModule::CreateTabPage appopt.cxx 509 0x7fa339e10973 28 OfaTreeOptionsDialog::SelectHdl_Impl treeopt.cxx 1335 0x7fa3507f947a 29 OfaTreeOptionsDialog::ShowPageHdl_Impl treeopt.cxx 625 0x7fa3507f4782 30 OfaTreeOptionsDialog::LinkStubShowPageHdl_Impl treeopt.cxx 623 0x7fa3507f4763 31 Link<weld::TreeView&, void>::Call link.hxx 111 0x7fa3834b18f1 32 weld::TreeView::signal_changed weld.hxx 953 0x7fa3834aa10d 33 SalInstanceTreeView::SelectHdl salvtables.cxx 5276 0x7fa38349363e 34 SalInstanceTreeView::LinkStubSelectHdl salvtables.cxx 5272 0x7fa3834935fb 35 Link<SvTreeListBox *, void>::Call link.hxx 111 0x7fa382b8a339 36 SvTreeListBox::SelectHdl treelistbox.cxx 452 0x7fa38307f5c2 37 SvTreeListBox::Select treelistbox.cxx 2111 0x7fa383085b4a 38 SvImpLBox::SetCursor svimpbox.cxx 614 0x7fa3830a66c3 39 ImpLBSelEng::SetCursorAtPoint svimpbox.cxx 2575 0x7fa3830aeaa8 40 SelectionEngine::SelMouseButtonDown seleng.cxx 172 0x7fa382d09354 41 SvImpLBox::MouseButtonDown svimpbox.cxx 2004 0x7fa3830ac9f8 42 SvTreeListBox::MouseButtonDown treelistbox.cxx 2260 0x7fa383086422 43 ImplHandleMouseEvent winproc.cxx 707 0x7fa382daed00 44 ImplHandleSalMouseButtonDown winproc.cxx 2340 0x7fa382db5c5d 45 ImplWindowFrameProc winproc.cxx 2685 0x7fa382db6f7e 46 SalFrame::CallCallback salframe.hxx 310 0x7fa378ca4edc 47 QtFrame::CallCallback QtFrame.hxx 230 0x7fa378ca6418 48 QtWidget::handleMouseButtonEvent QtWidget.cxx 181 0x7fa378cf959b 49 QtWidget::mousePressEvent QtWidget.cxx 186 0x7fa378cf95f3 50 QWidget::event qwidget.cpp 8978 0x7fa376a2f327 51 QtWidget::event QtWidget.cxx 730 0x7fa378cfb2f6 52 QApplicationPrivate::notify_helper qapplication.cpp 3287 0x7fa3769a666a 53 QApplication::notify qapplication.cpp 2774 0x7fa3769a4539 54 QCoreApplication::notifyInternal2 qcoreapplication.cpp 1125 0x7fa3783a5ed0 55 QCoreApplication::sendSpontaneousEvent qcoreapplication.cpp 1573 0x7fa3783a6a1d 56 QApplicationPrivate::sendMouseEvent qapplication.cpp 2358 0x7fa3769a31a2 57 QWidgetWindow::handleMouseEvent qwidgetwindow.cpp 627 0x7fa376a5f7cb 58 QWidgetWindow::event qwidgetwindow.cpp 241 0x7fa376a5dcfd 59 QApplicationPrivate::notify_helper qapplication.cpp 3287 0x7fa3769a666a 60 QApplication::notify qapplication.cpp 3238 0x7fa3769a647a 61 QCoreApplication::notifyInternal2 qcoreapplication.cpp 1125 0x7fa3783a5ed0 62 QCoreApplication::sendSpontaneousEvent qcoreapplication.cpp 1573 0x7fa3783a6a1d 63 QGuiApplicationPrivate::processMouseEvent qguiapplication.cpp 2315 0x7fa3775f21cd 64 QGuiApplicationPrivate::processWindowSystemEvent qguiapplication.cpp 2061 0x7fa3775f15cf 65 QWindowSystemInterface::sendWindowSystemEvents qwindowsysteminterface.cpp 1109 0x7fa37769ce23 66 xcbSourceDispatch qxcbeventdispatcher.cpp 57 0x7fa376064df7 67 ?? 0x7fa37df2b5b4 68 ?? 0x7fa37df2e607 69 g_main_context_iteration 0x7fa37df2ebfc 70 QEventDispatcherGlib::processEvents qeventdispatcher_glib.cpp 395 0x7fa3787b6b33 71 QXcbGlibEventDispatcher::processEvents qxcbeventdispatcher.cpp 96 0x7fa37606502c 72 QtInstance::ImplYield QtInstance.cxx 421 0x7fa378cc7502 73 QtInstance::DoYield QtInstance.cxx 432 0x7fa378cc762b 74 ImplYield svapp.cxx 372 0x7fa3835220ea 75 Application::Yield svapp.cxx 456 0x7fa383522e88 76 Dialog::Execute dialog.cxx 1078 0x7fa382c063e1 77 SalInstanceDialog::run salvtables.cxx 1877 0x7fa38347c313 78 weld::DialogController::run weld.hxx 2659 0x7fa3504a26e6 79 OfaTreeOptionsDialog::run treeopt.cxx 2587 0x7fa3508035fd 80 CuiAbstractController_Impl::Execute dlgfact.cxx 144 0x7fa35069d829 81 SfxApplication::OfaExec_Impl appserv.cxx 1463 0x7fa388faf85e 82 SfxStubSfxApplicationOfaExec_Impl sfxslots.hxx 1309 0x7fa388f88faf 83 SfxDispatcher::Call_Impl dispatch.cxx 254 0x7fa3890bfb4a 84 SfxDispatcher::Execute_ dispatch.cxx 753 0x7fa3890c31f4 85 SfxBindings::Execute_Impl bindings.cxx 1061 0x7fa3890aefa0 86 SfxDispatchController_Impl::dispatch unoctitm.cxx 688 0x7fa389185ba6 87 SfxOfficeDispatch::dispatch unoctitm.cxx 250 0x7fa389183867 88 framework::MenuBarManager::Select menubarmanager.cxx 827 0x7fa38a7e2dff 89 framework::MenuBarManager::LinkStubSelect menubarmanager.cxx 791 0x7fa38a7e2ab7 90 Link<Menu *, bool>::Call link.hxx 111 0x7fa382cb0337 91 Menu::Select menu.cxx 358 0x7fa382ca1c90 92 Menu::ImplCallSelect menu.cxx 2135 0x7fa382caa907 93 Menu::LinkStubImplCallSelect menu.cxx 2132 0x7fa382caa8d9 94 Link<void *, void>::Call link.hxx 111 0x7fa382db870d 95 ImplHandleUserEvent winproc.cxx 2287 0x7fa382db57ca 96 ImplWindowFrameProc winproc.cxx 2851 0x7fa382db76f7 97 SalFrame::CallCallback salframe.hxx 310 0x7fa378ca4edc 98 QtInstance::ProcessEvent QtInstance.cxx 484 0x7fa378cc799b 99 operator() salusereventlist.cxx 119 0x7fa383465b7b 100 SalUserEventList::DispatchUserEvents salusereventlist.cxx 120 0x7fa383465e4f 101 QtInstance::ImplYield QtInstance.cxx 410 0x7fa378cc7480 102 QtInstance::DoYield QtInstance.cxx 432 0x7fa378cc762b 103 ImplYield svapp.cxx 372 0x7fa3835220ea 104 Application::Yield svapp.cxx 456 0x7fa383522e88 105 Application::Execute svapp.cxx 350 0x7fa383521ddd 106 desktop::Desktop::Main app.cxx 1601 0x7fa38ca36276 107 ImplSVMain svmain.cxx 204 0x7fa383541e84 108 SVMain svmain.cxx 236 0x7fa383541fb9 109 soffice_main sofficemain.cxx 94 0x7fa38caa1b5d 110 sal_main main.c 51 0x5568fd6859d4 111 main main.c 49 0x5568fd6859ba Change-Id: I247648a7a707f02bf1fdd339d3c329694636d835 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156645 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-09-03tdf#156958: fix crash when clicking out after having selected rename layerJulien Nabet
When renaming and clicking on canvas, LO goes into GetParent()->EndEditMode first time then it calls TabBarEdit::dispose method which resets m_xEntry BUT, on the same thread, LO comes here again so return if already disposed to avoid a crash See bt here: https://bugs.documentfoundation.org/attachment.cgi?id=189316 Change-Id: Id227e8aa32ab52643ab17f714c9e3325ced94907 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156482 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2023-08-31jsdialog: render font previews with hidpiSzymon Kłos
we pass dpi scale, let's use it to determine combobox entry size Change-Id: I4088eca565b301c5693e52b1c05af1a335fc34fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156115 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156251 Tested-by: Jenkins
2023-08-30use concrete type for ValueSet::mxAccessibleNoel Grandin
avoid some unnecessary casting Change-Id: I2569aafb10431bcf1445efefd277b1aeecf7b404 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156286 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-29jsdialog: make font previews background transparentSzymon Kłos
Change-Id: I9dc75ab91f591191be7a354274a0783b0fd093b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156029 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156244 Tested-by: Jenkins
2023-08-19loplugin: new global analysis locking2Noel Grandin
look for methods where we don't need to guard access to the field, because the field is never modified Change-Id: I62c33cc3f52881557515765d3733c4afc78547aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155836 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-12jsdialog: calendar widgetSzymon Kłos
Change-Id: I5b2b8a1516ed2e851309dca6ef3200ed522d1b7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154136 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Pranam Lashkari <lpranam@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154361 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2023-07-06make tools::Poly*gon single-arg constructors explicitNoel Grandin
which will help avoid ambiguity in method calls in an upcoming patch Change-Id: Ic7607ac7d95559e0942a84fb3226cfdd6ade22bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154146 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>