summaryrefslogtreecommitdiff
path: root/toolkit
AgeCommit message (Collapse)Author
2023-09-23Use less epoxy external headers dependencyGabor Kelemen
Change-Id: If5d4e5a65a0fcea6bd67cdba48742f6aaec0811d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156556 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
2023-09-10MutableTreeDataModel 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: I81b0c46be19bfafb220f0ae908eedfd9c5b20b71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156726 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-07no need to take a lock and do nothingNoel Grandin
It has been this way since initial commit in commit 5eb0040d0199f8c80d47ed912e055f27a193b81d Author: Mihaela Kedikova <misheto@openoffice.org> Date: Thu Aug 12 17:44:19 2010 +0200 tabcontrol: new source code for tabcontrol added Change-Id: I0e9730525249a3da8857e5c19070a6aad05ad768 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156652 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-02no need to use UNO_QUERY_THROW hereNoel Grandin
Change-Id: I01b4e401fec1792829fc2efaad5a74a035a418f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156476 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-01tdf#104833 a11y: Use VCLXAccessibleEdit for VCLXMultiLineEditMichael Weghorn
Instead of the generic `VCLXAccessibleComponent`, use `VCLXAccessibleEdit` as a11y class for `VCLXMultiLineEdit` (the component interface class for MultiLineEdit) as well, not just for `VCLXEdit`. With the preparatory changes from Change-Id I8218db61feb07605f6ea5309f26eebd38312458a tdf#104833 a11y: Don't use VCLXEdit in VCLXAccessibleEdit in place, it behaves as expected when interacting with the multi line edit from the sample dialog in attachment 189287 in tdf#104833 using Accerciser and the qt6 or gtk3 VCL plugin (and the text can also be edited when removing the readonly flag from the control) or the update dialog (which uses UNO controls, `UnoControlEditModel` for the panes that were not announced, s. extensions/source/update/check/updatehdl.cxx ). In particular, the a11y text interface is supported by the multi line edit on the a11y layer, which makes Orca with the gtk3 VCL plugin announce the text content when the control gets focused. NVDA on Windows still announces "Checking..." instead of using the actual text that would be retrievable via the IAccessibleText interface now. This is probably because "Checking..." is the (outdated) accessible name, as can be seen by interacting with the object in NVDA's Python console: >>> focus.name 'Checking...' >>> txt = focus.IAccessibleTextObject >>> txt.text(0, txt.nCharacters) 'LibreOfficeDev 24.2 is up to date.' For both, gtk3 and qt6, the a11y object does have the new text as a11y name as well, as can be verified in Accerciser: In [10]: acc.name Out[10]: 'LibreOfficeDev 24.2 is up to date.' In [11]: txt = acc.queryText() In [12]: txt.getTextAtOffset(0,3) Out[12]: ('LibreOfficeDev 24.2 is up to date.', 0, 34) Change-Id: Id80e191cdd5342b3215fdb9d2ad3847470366337 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156402 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-09-01tdf#104833 Move VCLXMultiLineEdit to public toolkit headerMichael Weghorn
This is in preparation of having the a11y factory create a proper accessible context for it. Change-Id: If60efa84263c2d68eb57daa3aae4834a060529c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156401 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-08-30make IAccessibleTableControl extend cppu::WeakImplHelperNoel Grandin
i.e. push this up from the implementation class AccessibleGridControlAccess to the interface class. Which means we don't need the getMyself helper method, and make the memory management simpler. Change-Id: Iced5f259638531a74ce86876d1a295e105530474 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156284 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-25Revert "use more Reference::query instead of UNO_QUERY_THROW"Noel Grandin
This reverts commit 7fc6063914432d58d86cfcbd728d967e7c86ebfd. sberg noticed that there is a difference now: there's a subtle difference now, in that if y was null originally, it would have thrown a (caught) exception, whereas now it will crash in the y.query<X>() call. Change-Id: Idbb5a08d635d15b5ca63f4822eddf05fb0a5afa0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156002 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-22tdf#156473 a11y: Keep a reference to table's a11y objectMichael Weghorn
Keep a Reference to the a11y object in `TableControl_Impl`, to prevent the object from getting deleted while it's still needed. Fixes a crash with this backtrace on Windows when closing the macro dialog from tdf#156473 with the NVDA screen reader active: 1 cppu::WeakComponentImplHelperBase::release implbase.cxx 70 0x7ff97c1f0f72 2 cppu::PartialWeakComponentImplHelper<com::sun::star::accessibility::XAccessibleContext,com::sun::star::accessibility::XAccessibleComponent,com::sun::star::accessibility::XAccessibleEventBroadcaster,com::sun::star::lang::XServiceInfo>::release compbase.hxx 86 0x7ff9200cc5a4 3 rtl::Reference<accessibility::AccessibleGridControl>::clear ref.hxx 198 0x7ff9200cc25b 4 accessibility::AccessibleGridControlAccess::DisposeAccessImpl AccessibleGridControl.cxx 335 0x7ff9200cc17a 5 svt::table::TableControl_Impl::disposeAccessible tablecontrol_impl.cxx 2397 0x7ff955829173 6 svt::table::TableControl::dispose tablecontrol.cxx 74 0x7ff9558190e4 7 VclReferenceBase::disposeOnce vclreferencebase.cxx 39 0x7ff9494f4fda 8 VclPtr<vcl::Window>::disposeAndClear vclptr.hxx 207 0x7ff9556b0fbe 9 VCLXWindow::dispose vclxwindow.cxx 927 0x7ff9556b0c9c 10 SVTXGridControl::dispose svtxgridcontrol.cxx 766 0x7ff9557e2577 11 UnoControl::dispose unocontrol.cxx 362 0x7ff95585bc3c 12 toolkit::UnoGridControl::dispose gridcontrol.cxx 292 0x7ff9557c9667 13 UnoControlContainer::dispose unocontrolcontainer.cxx 413 0x7ff955874606 14 ControlContainerBase::dispose controlmodelcontainerbase.cxx 1387 0x7ff95573f480 15 UnoDialogControl::dispose dialogcontrol.cxx 336 0x7ff95576aca1 16 UnoControl::disposing unocontrol.cxx 670 0x7ff95585ee37 17 UnoControlContainer::disposing unocontrolcontainer.cxx 432 0x7ff95587487c 18 ControlContainerBase::disposing controlmodelcontainerbase.cxx 1394 0x7ff95573f555 19 UnoDialogControl::disposing dialogcontrol.cxx 343 0x7ff95576ad45 20 comphelper::OInterfaceContainerHelper4<com::sun::star::container::XContainerListener>::disposeAndClear interfacecontainer4.hxx 397 0x7ff955748752 21 ListenerMultiplexerBase<com::sun::star::container::XContainerListener>::disposeAndClear listenermultiplexer.hxx 106 0x7ff95572da7b 22 ControlModelContainerBase::dispose controlmodelcontainerbase.cxx 223 0x7ff95572d855 23 OGeometryControlModel_Base::disposing geometrycontrolmodel.cxx 429 0x7ff9557930f9 24 cppu::WeakAggComponentImplHelperBase::dispose implbase.cxx 230 0x7ff97c1f1dca 25 SbiInstance::~SbiInstance runtime.cxx 360 0x7ff975dfdd1b 26 SbModule::Run sbxmod.cxx 1189 0x7ff975d532e7 27 SbModule::Notify sbxmod.cxx 776 0x7ff975d525d3 28 SfxBroadcaster::Broadcast SfxBroadcaster.cxx 41 0x7ff96c5366ab 29 SbMethod::Broadcast sbxmod.cxx 2121 0x7ff975d59c07 30 SbxValue::Get sbxvalue.cxx 290 0x7ff975e7a6be 31 SbMethod::Call sbxmod.cxx 2077 0x7ff975d5988d 32 basprov::BasicScriptImpl::invoke basscript.cxx 255 0x7ff8bb962d8f 33 SfxObjectShell::CallXScript objmisc.cxx 1439 0x7ff96dfe53a0 34 SfxObjectShell::CallXScript objmisc.cxx 1468 0x7ff96dfe60c2 35 SwDoc::ExecMacro docbasic.cxx 122 0x7ff8c8b30c33 36 SwWrtShell::ExecMacro wrtsh3.cxx 326 0x7ff8c9ee2a45 37 SwWrtShell::ClickToField wrtsh2.cxx 396 0x7ff8c9ede8ce 38 SwEditWin::MouseButtonUp edtwin.cxx 4969 0x7ff8c9abbeae 39 ImplHandleMouseEvent winproc.cxx 720 0x7ff949306165 40 ImplHandleSalMouseButtonUp winproc.cxx 2353 0x7ff94930b0e7 41 ImplWindowFrameProc winproc.cxx 2702 0x7ff949309b92 42 SalFrame::CallCallback salframe.hxx 310 0x7ff9240b2c89 43 ImplHandleMouseMsg salframe.cxx 3292 0x7ff9240d48c1 44 SalFrameWndProc salframe.cxx 5688 0x7ff9240bbf9c 45 SalFrameWndProcW salframe.cxx 6043 0x7ff9240bb6f4 46 CallWindowProcW USER32 0x7ff9c395e858 47 DispatchMessageW USER32 0x7ff9c395e299 48 ImplSalDispatchMessage salinst.cxx 474 0x7ff924008e03 49 ImplSalYield salinst.cxx 546 0x7ff924008cad 50 WinSalInstance::DoYield salinst.cxx 580 0x7ff9240090f5 51 ImplYield svapp.cxx 352 0x7ff9499a3f3b 52 Application::Yield svapp.cxx 437 0x7ff9499a3923 53 Application::Execute svapp.cxx 329 0x7ff9499a372b 54 desktop::Desktop::Main app.cxx 1601 0x7ff97ef6caf3 55 ImplSVMain svmain.cxx 204 0x7ff9499be0a0 56 SVMain svmain.cxx 236 0x7ff9499bfce9 57 soffice_main sofficemain.cxx 94 0x7ff97efdb1d8 58 sal_main main.c 51 0x7ff7e580104a 59 main main.c 49 0x7ff7e5801029 60 invoke_main exe_common.inl 79 0x7ff7e5801269 61 __scrt_common_main_seh exe_common.inl 288 0x7ff7e580139e 62 __scrt_common_main exe_common.inl 331 0x7ff7e580141e 63 mainCRTStartup exe_main.cpp 17 0x7ff7e580143e 64 BaseThreadInitThunk KERNEL32 0x7ff9c2eb7614 65 RtlUserThreadStart ntdll 0x7ff9c4bc26b1 Change-Id: I10e44024f88465950953229e695e0cfe4c4a69c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155953 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-08-18use more Reference::query instead of UNO_QUERY_THROWNoel Grandin
since querying with exceptions is consideably more expensive Change-Id: I968a9a40766b2abb0d3058549b0ed44011fd5716 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155791 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-18tdf#156561 a11y: Create VCLXTopWindow peer for border win frameMichael Weghorn
If a border window is a "native frame", i.e. a top level window, then also create a `VCLXTopWindow` for it instead of just a simple `VCLXWindow`. This also addresses another cause why the Calc autofilter popup would not be announced by the NVDA screen reader before commit dc0706cabfe39ddb6ea23d60ccfb756f2b9e6efb Author: Michael Weghorn <m.weghorn@posteo.de> Date: Wed Mar 15 17:00:27 2023 +0100 tdf#140762 tdf#152671 Make dock win visible before showing popup For winaccessibility, an accessible event listener is registered for an object when either `AccTopWindowListener::windowOpened` gets an event with the top level window set or the parent of the window sends an `AccessibleEventId::CHILD` event for the child object. In case of the autofilter popup in Calc, the top-level border window of the work window (created and set in `WorkWindow::ImplInit` and retrieved via `Window::GetFrameWeld` in `ScGridWindow::LaunchAutoFilterMenu`) is set as the parent window of the popup, but since it is a top-level window and was so far not considered as such due to its peer/component interface not implementing `XTopWindow` (s. `Window::IsTopWindow` and the corresponding check in `VCLXToolkit::callTopWindowListeners`), it would not have any accessible listener set, and thus no child event for its new popup child would be sent to the winaccessibility layer. Therefore, no accessible events would be sent for the popup and it's children either, resulting in NVDA not announcing any focus changes, etc. With this change in place, NVDA announces focused items in the auto filter popup even with a revert of the above-mentioned commit (and follow-up commits), except for submenu entries (which still suffer from another problem that will be addressed separately). Change-Id: I69c6066127c8b853a27cc1f692f139572541f8eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155800 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-08-18tdf#141101 tdf#156561 a11y: Handle a11y child events in win parentMichael Weghorn
`VCLXAccessibleComponent::ProcessWindowChildEvent` was only processing `WindowShow` and `WindowHide` events when the `vcl::Window::GetAccessibleParent()` for the window sent in the event would return the window that the `VCLXAccessibleComponent` refers to. This generally seems reasonable, but when the child events are sent for the corresponding window, the window's hierarchy is iterated over using `vcl::Window::GetParent()`, so if the accessible window is not in that hierarchy, no window would take care of the child events. (Note e.g. how `Window::GetParent` uses `mpWindowImpl->mpRealParent` while `Window::getAccessibleParentWindow` uses `mpWindowImpl->mpParent` and has some special handling.) Due to the way that `ImplDockingWindowWrapper::ImplPreparePopupMode` reparents the windows, this is at least the case for the auto filter popup in Calc and the font color popup in Writer's "Character" dialog, so the `VclEventId::WindowShow` event would not be forwarded to the a11y layer as an `AccessibleEventId::CHILD` event, and thus no listener would be registered for the children. As a result, the NVDA screen reader would not announce these objects when they receive focus. Make sure that the child event gets handled by making `VCLXAccessibleComponent::GetChildAccessible` also take into account the `vcl::Window::GetParent()`. This addresses one of the underlying issues why the Calc autofilter was not announced by NVDA before commit dc0706cabfe39ddb6ea23d60ccfb756f2b9e6efb Author: Michael Weghorn Date: Wed Mar 15 17:00:27 2023 +0100 tdf#140762 tdf#152671 Make dock win visible before showing popup It might make sense to reconsider the way of reparenting in `ImplDockingWindowWrapper` and general a11y parent handling at some point, but that will need further analysis and would presumably require more fundamental changes elsewhere, too. Change-Id: I83cf5732bfc9d4886e4f7fa75d4ff462e4d4af6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155799 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-08-03toolkit: Use range-based for, drop invalidTableControlActionMichael Weghorn
The `invalidTableControlAction` enum value was apparently only used to detect when to stop the iteration and is no longer, so drop it. Change-Id: Idec6572a9f328b246445191f0a3e6a131bb0f688 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155229 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-08-02split Point/Size/Rectangle into AbsoluteScreenPixel* typesNoel Grandin
to attempt to make it obvious in code what kind of coordinate system we are dealing with. The idea is that by doing this, the compile-time type checking will flush out inconsistencies between different code. I started with vcl::Window::OutputToAbsoluteScreenPixel and worked outwards from there. Change-Id: Ia967d7a0bb38886695f3a761b85c8b9340ddb1c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154676 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-02a11y: Don't always append window type to a11y name in debug buildsMichael Weghorn
Appending " (Type = <number>)" to the accessible name is probably meant for debugging purposes to see what type of window is involved, but doing that by default in debug builds has disadvantages, e.g.: 1) It affects how assistive tooling, like screen readers, handles the accessible objects, therefore the behaviour with a debug build (what a developer working on something experiences) does not necessarily match what happens in non-debug builds (what end users will experience). For instance, when Orca announces the "Update styles" push button in Writer's formatting toolbar, it not only announces the extra type information for the objects in the hierarchy it announces anyway, but announces the panel in addition, since it has a non-empty name due to the appended type information. Announcement without this change in place (from Orca log): INFO:speech:SPEECH OUTPUT: ' (Type = 371) panel.' INFO:speech:SPEECH OUTPUT: 'Formatting (Type = 356) tool bar' INFO:speech:SPEECH OUTPUT: 'Update push button.' Announcement with this change in place: INFO:speech:SPEECH OUTPUT: 'Formatting tool bar' INFO:speech:SPEECH OUTPUT: 'Update push button.' 2) It breaks selecting the object under the mouse cursor in Accerciser at least with the qt6 VCL plugin when the object is in a dialog, because the window name retrieved via the accessibility APIs (with the appended type information) does not match the one retrieved via Wnck [1]. Therefore, don't append the type information by default, but only if environment variable `LIBO_APPEND_WINDOW_TYPE_TO_ACCESSIBLE_NAME` ist set (typically `LIBO_APPEND_WINDOW_TYPE_TO_ACCESSIBLE_NAME=1`, but any value other than "0" will do), so that can still be used for cases where having the type as part of the accessible name is useful. [1] https://gitlab.gnome.org/GNOME/accerciser/-/blob/5af3fdbfb8a7832e434ad6fc7d2ecaad18f2e32e/plugins/quick_select.py#L109 Change-Id: Ie33b14fbdf9731b02c8c620d7a5ac718ef99367d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155094 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-08-02a11y: Convert AccessibleTableControlObjType to enum classMichael Weghorn
Change-Id: I227ca242ae8fa22940b1bf302541f8d9b7b40eb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155199 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-07-27tdf#155625 a11y: Notify about menu item role changeMichael Weghorn
Send a `AccessibleEventId::ROLE_CHANGED` event when the accessible role of a menu item changes (s. how `VCLXAccessibleMenuItem::getAccessibleRole` takes into account `MenuItemBits::RADIOCHECK` and `MenuItemBits::CHECKABLE` to determine the accessible role for the underlying menu entry). This fixes the issue of obsolete values for roles being used, which was uncovered by the upcoming Change-Id I1a047864ce8dc1f1bc3056ad00159f7fd5e5b7d3 ("vcl gtk3: Introduce AT-SPI2 tests for the GTK3 accessibility layer"). With this in place, the workaround for tdf#155625 in the upcoming gtk3/AT-SPI tests is no longer necessary and `make CppunitTest_vcl_gtk3_a11y` with https://gerrit.libreoffice.org/c/core/+/153069 patch set 11 still passes after dropping the workaround: diff --git a/vcl/qa/cppunit/a11y/atspi2/atspi2.cxx b/vcl/qa/cppunit/a11y/atspi2/atspi2.cxx index bbcd263fee0c..762401181bf4 100644 --- a/vcl/qa/cppunit/a11y/atspi2/atspi2.cxx +++ b/vcl/qa/cppunit/a11y/atspi2/atspi2.cxx @@ -264,9 +264,6 @@ void Atspi2TestTree::compareObjects(uno::Reference<accessibility::XAccessible> x * be represented with a round trip. */ const auto nLORole = mapToAtspiRole(xLOContext->getAccessibleRole()); auto nAtspiRole = pAtspiAccessible.getRole(); - // FIXME: workaround for https://bugs.documentfoundation.org/show_bug.cgi?id=155625 - if (nLORole == ATSPI_ROLE_CHECK_MENU_ITEM && nAtspiRole == ATSPI_ROLE_MENU_ITEM) - nAtspiRole = nLORole; CPPUNIT_ASSERT_EQUAL(nLORole, nAtspiRole); /* name (no need to worry about debugging suffixes as AccessibilityTools::nameEquals does, as * that will also be part of the name sent to ATSPI) */ Change-Id: I0d88a7eda592f5ee9abf368ce1d5feb6611b9971 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154947 Reviewed-by: Colomban Wendling <cwendling@hypra.fr> Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-07-25Convert internal vcl bitmap formats transparency->alpha (II)Noel Grandin
(Second attempt at landing this) Image formats and graphics APIs use alpha, not transparency, so change our internal formats and data structures to work directly with alpha, so we don't need to modify data before we push it to graphics APIs. Add a couple of new Color constants to make the intention of the vcl code clearer. Notes (*) On macOS, tweaking the logic in CreateWithSalBitmapAndMask to more accurately reflect the requirements of the CGImageCreateWithMask function seems to fix some tests. (*) The vcl code does not properly support gradients with transparency. So the previous code was wrong, and this change is going to result in slightly different wrongness. Change-Id: I9e21c2e98d88ecfdc5f75db13bd1ffff7c38db98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114168 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-21loplugin:redundantcast small improvementNoel Grandin
Change-Id: I2c96b367138b94d6178a3c4a0f83049f13a04f82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154679 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-20split GetWindowExtentsRelative asunderNoel Grandin
sometimes it returns a relative position, sometimes an absolute position. Rather have two different methods with names that match what they return. Change-Id: Ie1e73c6be1c797fd59934c96866d1fef1f972b35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154653 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-12simplifyNoel Grandin
Change-Id: I276ba7809b08a359b377ea56259140675c5e00a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154354 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-31do not throw DisposedException when inside a dispose() methodNoel Grandin
There is no need to do this, as the documentation of css.lang.XComponent::dispose at udkapi/com/sun/star/lang/XComponent.idl states: After this method has been called, the object should behave as passive as possible, thus it should ignore all calls Otherwise, the effect of throwing here is mostly to disturb the flow of logic in caller code, preventing other parts of teardown from proceeding smoothly. Change-Id: I30e6d1b35f85b727debf4405a995fdc0a4fccde6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152450 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-09move a toolkit header inside the moduleNoel Grandin
It is only used inside the module, no need to be public Change-Id: Ibd8445ecbb67624569ee7225f0bdf6d9c041dab4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151569 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-07improve some usage of OInterfaceIteratorHelper4Noel Grandin
we can drop the lock immediately after construction (since the iterator holds a thread-safe COW link to the underlying listener container) Change-Id: I08f8fa9ed7393747938572097f3c25f5f3f847fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151440 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-04Resolves: tdf#155029 set StandardStyles before updateFromModelCaolán McNamara
otherwise it overrides custom settings set by the model properties Change-Id: If5898aba3f2701b6d6bdaed99f9cb01174e53613 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151356 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-23use more TOOLS_WARN_EXCEPTIONNoel Grandin
so we get more complete information when something goes wrong Change-Id: Ia73623f748b0779cf80b0086bd8258791590e9ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150754 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-23Run clang-tidy with misc-unused-using-decls on modules [s-t]*Gabor Kelemen
To remove unneeded using declarations. Via the simple script: for i in $(find $dirname -name "*cxx" -o -name "*hxx" ); do clang-tidy-12 --checks="-*,misc-unused-using-decls" "$i"; done Change-Id: I596299084471b2904548d23875866f1583b00b2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150610 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
2023-04-21MCGR: Reduce diverse GradientStyle enums to single UNO API oneArmin Le Grand (allotropia)
Change-Id: Ie0cd26a308a75ddead9451c53e874a39cc6eeb63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150705 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-04-12Revert "remove unnecessary UnoControlModel::setPropertyValues"Noel Grandin
This reverts commit 19c18c94085f7a70e536a914ed978fc54b5625b9. Because it breaks the MRI extension, I was wrong, it does not do quite the same thing as its superclass method. Change-Id: I65bfb4264615dea5f6d0f2fb7b989352e7e83ee1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150274 Tested-by: Justin Luth <jluth@mail.com> Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-10pack the ImplPropertyInfo structNoel Grandin
Change-Id: I08d163824ca0ed4fdba91d1e0d4d7f076c64a4dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150190 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-10use std::unordered_map for static properties in toolkitNoel Grandin
which is faster than binary lookup Change-Id: Ia810313af36c75fd9b5b241704f0cbd66afcb6b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150189 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-02Avoid conversions between OUString and OString in VCLMike Kaganski
Standardize on OUString, which is the main internal string class. Convert from/to OUString only when communicating with respective external APIs. Removes about 200 conversions from the code. Change-Id: I96ecee7c6fd271bb76639220e96d69d2964bed26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149930 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-01use more XVclWindowPeerNoel Grandin
Rather than using it's superclass XWindowPeer and implicitly relying on it being XVclWindowPeer and casting it everywhere. Change-Id: Icfb46f3b920d00f4a167a31803a71bbb0368d05c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149894 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-31simplify subclasses of comphelper::OPropertySetHelperNoel Grandin
they should deal in terms of the fast property IDS, they should not need to override setPropertyValueImpl, so just remove this, and standardise on the subclasses overriding setFastPropertyValueImpl Change-Id: I190955ccc4ae3e07dd481a1044f3c074dd1a40aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149836 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-31remove unnecessary UnoControlModel::setPropertyValuesNoel Grandin
which does exactly the same thing as the method it overrides Change-Id: Ib227011795f0cf6336fb1e01c14636a9996bb164 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149835 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-13convert UnoControlModel and friends to use std::mutexNoel Grandin
Which means creating a variant of the cppuhelper::OPropertySetHelper helper class which uses a std::mutex. Since we can do virtual base classes now (which the original could not), use that and a new helper class comphelper::UnoImplBase to share std::mutex m_aMutex; bool m_bDisposing; fields that the OPropertySetHelper wants to share with the parent class. Change-Id: I05ad465a3d3653ed4e109137e3e1c58190da8d97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148474 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-10improve loplugin:unnecessarylockingNoel Grandin
to find more locking we can remove Change-Id: Ief7bc5ec2a1ff31f22a0ad366910b7fcc4725818 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148599 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-08BaseMutex->std::mutex in MutableTreeDataModelNoel Grandin
Change-Id: I9028c0ac35b2f375ef0d72201ca4b9f8eb99c7b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148477 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-08deduplicate MutexAndBroadcastHelperNoel Grandin
there are two very similar classes, standardise on the one in include/comphelper Change-Id: If85729dcea01e65a2d095bb211fe643c783ebf1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148442 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-22toolkit: Port AccessibleStatusBarTest to test::AccessibleTestBaseColomban Wendling
Now we have test::AccessibleTestBase we can use it instead of performing some setup operations manually. The only actual change is that we don't pass OpenFlags=S when creating an Impress document, but it never seemed useful (it was only ported from Java out of zeal), and I can't even find what the S option is for. In all cases, this doesn't affect the tests themselves. Change-Id: Ic8d56dd9bc3ec957891868b23bb241ba3bf33049 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147003 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-02-22BaseMutex->std::mutex in ListenerMultiplexerBaseNoel Grandin
Change-Id: Icd565c83ca3b4afb1a846a637b7943b0498487e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147457 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-19osl::Mutex->std::mutex in DefaultGridDataModelNoel Grandin
Change-Id: Ib62f9e7040c8d7171a50ccfe937e35f060f94f95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147265 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-18osl::Mutex->std::mutex in DefaultGridColumnModelNoel Grandin
Change-Id: Ie3df092b013f10b36c85028fe3b9966d58b22005 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147264 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-07improve readability of VirtualDevice constructorNoel Grandin
(a) It is not obvious what DeviceFormat::DEFAULT means (b) There are two parameters (each with two states), but only really 2 possible overall states So (1) use more useful names (2) combine the two parameters into one enum Change-Id: Ic0595b39e032cc9e019b88326389d055b977da00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146589 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-25Use ImplInheritanceHelper in OAccessibleControlContextStephan Bergmann
Change-Id: I11d8f487df0c9e707be6a2aa98a32135643552f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146110 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-25Use ImplInheritanceHelper in VCLXAccessibleComponentStephan Bergmann
Change-Id: I300f033054bddc2c0ee1973dbafc108c477bf09a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146103 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-24Use ImplInheritanceHelper in OAccessibleExtendedComponentHelperStephan Bergmann
(Explicitly deleting the special member functions is needed to avoid MSVC > include\cppuhelper/implbase.hxx(152): error C2280: 'comphelper::OCommonAccessibleComponent::OCommonAccessibleComponent(const comphelper::OCommonAccessibleComponent &)': attempting to reference a deleted function > include\comphelper/accessiblecomponenthelper.hxx(176): note: compiler has generated 'comphelper::OCommonAccessibleComponent::OCommonAccessibleComponent' here > include\comphelper/accessiblecomponenthelper.hxx(176): note: 'comphelper::OCommonAccessibleComponent::OCommonAccessibleComponent(const comphelper::OCommonAccessibleComponent &)': function was implicitly deleted because a base class invokes a deleted or inaccessible function 'cppu::BaseMutex::BaseMutex(const cppu::BaseMutex &)' > include\cppuhelper/basemutex.hxx(43): note: 'cppu::BaseMutex::BaseMutex(const cppu::BaseMutex &)': function was implicitly deleted because a data member invokes a deleted or inaccessible function 'osl::Mutex::Mutex(const osl::Mutex &)' > include\osl/mutex.hxx(107): note: 'osl::Mutex::Mutex(const osl::Mutex &)': function was explicitly deleted > include\comphelper/accessiblecomponenthelper.hxx(228): note: see reference to function template instantiation 'cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleExtendedComponent>::ImplInheritanceHelper<cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleExtendedComponent>>(cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleExtendedComponent> &&)' being compiled > include\comphelper/accessiblecomponenthelper.hxx(228): note: see reference to function template instantiation 'cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleExtendedComponent>::ImplInheritanceHelper<cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleExtendedComponent>>(cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleExtendedComponent> &&)' being compiled ) Change-Id: Ia5a7b244dd018c1a63cc2940dba197c43827d563 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146062 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-19Fix some toolkit UnoControlBase derivates' queryAggregationStephan Bergmann
The base UnoControl uses WeakAggImplHelper9, so (for better or worse) derives from XAggregation, but UnoGridControl, UnoRoadmapControl, and UnoTreeControl all failed to properly implement the XAggregation protocol. Change-Id: Ia1676782e616216f645dc86ba978c2f5887dc508 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145767 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-16XUnoTunnel->dynamic_cast in VCLXGraphicsNoel Grandin
Change-Id: Ia401542ec8249809ad16dadd79c51aa025044b42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145534 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-16XUnoTunnel->dynamic_cast in VCLXBitmapNoel Grandin
Change-Id: I2cf42ac720184bc2b8b89ced5564dbb95e7dc1ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145535 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>