summaryrefslogtreecommitdiff
path: root/toolkit
AgeCommit message (Collapse)Author
2023-12-12cid#1546444 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1546389 COPY_INSTEAD_OF_MOVE cid#1546388 COPY_INSTEAD_OF_MOVE cid#1546360 COPY_INSTEAD_OF_MOVE cid#1546158 COPY_INSTEAD_OF_MOVE Change-Id: I3707d55b88674dfb5ae786fc2cc45000862340de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160611 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-11cid#1545577 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1545679 COPY_INSTEAD_OF_MOVE cid#1545691 COPY_INSTEAD_OF_MOVE cid#1545697 COPY_INSTEAD_OF_MOVE cid#1545711 COPY_INSTEAD_OF_MOVE cid#1545730 COPY_INSTEAD_OF_MOVE Change-Id: Ic0777a8ba532b00b021ffed81243505fbb7250f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160568 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-12-10cid#1545987 std::swap COPY_INSTEAD_OF_MOVECaolán McNamara
Change-Id: I34413f941aa5eded457ad5a3a5ffb4c9e1104590 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160521 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-09cid#1556778 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1546474 COPY_INSTEAD_OF_MOVE cid#1546473 COPY_INSTEAD_OF_MOVE cid#1546469 COPY_INSTEAD_OF_MOVE cid#1546467 COPY_INSTEAD_OF_MOVE cid#1546458 COPY_INSTEAD_OF_MOVE cid#1546448 COPY_INSTEAD_OF_MOVE cid#1546446 COPY_INSTEAD_OF_MOVE cid#1546441 COPY_INSTEAD_OF_MOVE cid#1546424 COPY_INSTEAD_OF_MOVE cid#1546377 COPY_INSTEAD_OF_MOVE cid#1546374 COPY_INSTEAD_OF_MOVE cid#1546352 COPY_INSTEAD_OF_MOVE cid#1546334 COPY_INSTEAD_OF_MOVE cid#1546328 COPY_INSTEAD_OF_MOVE cid#1546310 COPY_INSTEAD_OF_MOVE cid#1546303 COPY_INSTEAD_OF_MOVE Change-Id: I8a43fdd574857ba1d3ec416f23c8269a9a08e12f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160515 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-04cid#1545597 Using invalid iteratorJulien Nabet
and : cid#1545537 Using invalid iterator cid#1545508 Using invalid iterator cid#1545494 Using invalid iterator cid#1545478 Using invalid iterator cid#1545427 Using invalid iterator cid#1545420 Using invalid iterator cid#1545400 Using invalid iterator cid#1545300 Using invalid iterator cid#1545258 Using invalid iterator cid#1545257 Using invalid iterator cid#1545200 Using invalid iterator cid#1545183 Using invalid iterator Change-Id: Ibf3a41902f34286967195c5c3b22e337a4b06809 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160322 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-11-20c++20: use std::erase(_if) instead of std::remove(_if)+erase (toolkit)Julien Nabet
Change-Id: Ied5fc25f959e938fdd80532375486c167c370e35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159705 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-11-15avoid double map lookupNoel Grandin
Change-Id: I02018eaaf220c7835756eba6215425bac9cbc6f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159432 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-08loplugin:fieldcast in VCLXWindowImplNoel Grandin
Change-Id: I9a0181e87653e1bf62245e8ddf381518a59f841b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159116 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-08loplugin:fieldcast in MutableTreeDataModelNoel Grandin
Change-Id: I713db74dac43a61fe98ab18834e0dd6e24117caa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159097 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-02'new Double' is deprecated in JavaNoel Grandin
replace with Double.valueOf Change-Id: If5be8e500e31ebf9d5fb20ea7dd474677d7c74ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158785 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-30tdf#157518: vcl: Introduce vcl control LevelBarSarper Akdemir
Introduces LevelBar that shares implementation with Progress(Bar). LevelBar is to be as a level indicator, e.g. password strength level. Currently with native backends for gtk and Windows. Currently, except on gtk - the colors of the bar at different levels are hardcoded and not dependent on any kind of themeing. On Windows it follows the styling of progress bar of type "Meter" according to the uxguide: https://learn.microsoft.com/en-us/windows/win32/uxguide/progress-bars#meters Change-Id: Id772cda23615e9582463bf589e4674fd4588c864 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157826 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-10-26tdf#153519 use new IdleTask::waitUntilIdleDispatchedNoel Grandin
to wait until the Idle inside sw/ has done populating the navigator tree. Which required (*) moving the code down from test/ to vcl/ to avoid circular dependency issues. (*) adding a call SolarMutexGuard before Application::Yield inside IdleTask::waitUntilIdleDispatched (*) exposing the function to python by adding a method to the XToolkitExperimental UNO API Change-Id: Iee418f7a0beb1f5b53addb7fe25823d61720eb3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158495 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-20Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: toolkitStephan Bergmann
Change-Id: I67ba7b0f4d99f080b343a9b26a242cf4008b820c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158244 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-20Use getXWeak in toolkitMike Kaganski
Change-Id: I44a0ddd386ea6d262d6102b40f3e9837655068ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150877 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-10-15Repurpose loplugin:stringstatic for O[U]String vars that can be constexprStephan Bergmann
...now that warning about O[U]String vars that could be O[U]StringLiteral is no longer useful Change-Id: I389e72038171f28482049b41f6224257dd11f452 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157992 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-14Use exception ctors, instead of setting members laterMike Kaganski
Avoids overwriting source location in message Change-Id: Ia0290c7dd1ab3ea1357712a27ecab75c7b583dd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157893 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-10-05Replace getTabIndexPropertyName and getStepPropertyName (toolkit)Julien Nabet
by constrexp or by using the string directly since used once. Change-Id: I0d232d5856551bd5dde22ed5075807d20f6f6624 Change-Id: I07d50845ec21998813f3fecb7fb183eaf234f7ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157591 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-05Replace 2 other lcl_throw* by throwing the right exception directly (toolkit)Julien Nabet
Change-Id: Ib0347db6ad5690e0cba9326d7ec3fd85c2f93984 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157588 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2023-10-05Replace 3 lcl_throw* by throwing the right exception directly (toolkit)Julien Nabet
Change-Id: Ia351741e46faa6463fac2124262da0153ebe19dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157585 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
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>