summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2023-03-13tdf#150281: Fix CentimetersToPoints in CalcBaole Fang
Originally, CentimetersToPoints was implemented as a base method for Writer and Calc. They are both using the same implementation, which is correct for Writer, but wrong for Calc. Since their behavior should be different, I remove the base method and implement a correct one for Calc. Change-Id: If957accdd9be86a96ca6fb711502e49a79bf3223 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148745 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-13Introduce OUStringBuffer::insert taking OUStringConcatMike Kaganski
Avoids some (re)allocations, and aligns with already existing append Change-Id: I536ba50f56fc560c0f6e8c0a8b65bd4248896a8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148777 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-13lok: introduce resetCompatFlagXisco Fauli
and reset logic of setCompatFlag/isCompatFlagSet changed in afb7b373c34bd6a1608a30eb8267fa6f8231e853 "CppunitTest_sc_tiledrendering: reset CompatFlag in tearDown Otherwise, there are some tests setting it to scPrintTwipsMsgs, so depending on the order of execution, it might affect other tests" Change-Id: I306ac0b77b65f99879f4018cfbc57354a158f38a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148783 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-03-13Improve documentation of lok::Document::getPartPageRectangles()Tor Lillqvist
Change-Id: Ic507749064ff27b36cac8e01a54fb58dd10cdda5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148779 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
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-11lok: add trimMemory capability, and expand dumpState to caches.Michael Meeks
Being able to trigger some more aggressive memory saving is useful in for both online and mobile. Change-Id: I9b91c9fe9eecec06c75112595deac0bfeb94c144 Signed-off-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148624 Tested-by: Jenkins
2023-03-11tdf#114441 Convert sal_uLong to sal_uInt32Abdallah Elhdad
Change-Id: Iab17a199d15204a6944b415b170e813d4f9d7bfe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148137 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-03-11osl::Mutex->std::mutex in OSQLParserNoel Grandin
Change-Id: Ibc56fee796914a6dd39970f7a7879d5b5b2c219f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148660 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-10Resolves: tdf#154087 update scrollbar range when search criteria changeCaolán McNamara
Change-Id: Iaf5f20c8952b15f3dcccb65277dadb171a705605 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148606 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-10tdf#153657 a11y: Set tooltip/a11y desc for fontwork stylesMichael Weghorn
Add a map between ID and title and use that in a newly introduced tooltip query handler to return the item's title so it is shown as a tooltip. This also implies that the title is used as the accessible description for the items for the non-gtk case, see `SalInstanceIconView::EntryAccessibleDescriptionHdl`, introduced in commit 2a28ebeef5ea3e2b01d836a7233d2316b765bf38 Date: Wed Jun 1 11:18:26 2022 +0300 Accessibility for IconView Therefore, the NVDA screen reader on Windows now announces the items using their title when they receive focus. Change-Id: Ic77cf485ed4b2b413d3d3368c15b788d693111cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148523 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-03-10sw lok: notify clients about view option changesParis Oplopoios
Send a string of the view options to the kit when the view changes Change-Id: I89f65ff1d22a83a54dde35e39eb487edda0b58e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148078 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-10simplify initialisation of some pool defaultsNoel Grandin
Change-Id: I794e528a08a5a76cef1955f5c4f3e594f1e90f4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148537 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-09Use officecfg instead of SvxLanguageToolOptionsMike Kaganski
Change-Id: Ia9add4ff3ebe20ba491e33de1e9a2644a48ef7a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148548 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-08tdf#82984 tdf#94915 zip64 support (import + export)Attila Szűcs
Implemented import + export for "Zip64 Extended Information Extra Field", (in "Local file header" and "Central directory file header") and for Data descriptor. Focused only to be able to handle files with over 4GB uncompressed size, in the zip archive. The 64k filecount, and the 4GB compressed size limit is probably still present Tried to follow pkware .ZIP File Format Specification, Some cases were not clear to me and/or some zip compressing tool may not perfectly follow the standard, like 'extra field' should be 28 bytes long, but its reader now can read shorter (or longer) 'extra field'. Replaced some 32bit codes with 64bit codes, in stream handling, in deflater. Tested with an ods file that contained a content.xml that bigger then 4BG+ (import + export + reimport) on windows. I think 4GB+ files import/export would be too slow fot unittest. So, for unit test, used the small but zip64 format files, that was attached to the bugzilla tickets Note: It helps with Bug 128244 too (1 of the unittest tests it), but that ods file missing manifest.xml, so LO won't be able to import it. Change-Id: Idfeb90594388fd34ae719677f5d268ca9a484fb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147306 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
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-03-08vcl: PDF export: remove versions PDF_1_2, PDF_1_3Michael Stahl
These cannot be selected by any means, so this is all dead code. Change-Id: Ia24dddb4c36d0a3fef60a1dbf02562a8e6dbfce7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148389 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-03-08vcl: PDF export: default to PDF 1.7Michael Stahl
Released by Adobe in 2006, and standardized as ISO 32000-1:2008. Change-Id: I22c89019905c90e10fefb752c210ec7ea81b725b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148388 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-03-08vcl,sw: PDF/UA export: tag headers and footers as requiredMichael Stahl
ISO 14289-1:2014 has one requirement for specific tagging of artifacts: 7.8 Page headers and footers Running headers and footers shall be identified as Pagination artifacts and shall be classified as either Header or Footer subtypes as per ISO 32000-1:2008, 14.8.2.2.2, Table 330. It was not immediately obvious how to implement this but the functions used for tunnelling structure element attributes through MetaFile can be used for this purpose as well with a few tweaks. Change-Id: I19a3192b1b56b82ed11972c4bbe8d20ab13567be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148387 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-03-08vcl,filter,officecfg: PDF export: add PDFVersion::PDF_1_7Michael Stahl
Also, PDF_A_2 and PDF_A_3 are based on PDF 1.7, claims Wikipedia. Change-Id: Ia0afd9a38859953db945a5d1568f171f3d500b09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148386 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-03-08sc: fix ever-increasing chart IDs when exporting to XLSXMiklos Vajna
Similar to what PPTX already did. Change-Id: I17d8ccf3fb7111e1cbf9dc019d1032ed7ed530fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148460 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-08oox, sd: fix ever-increasing chart IDs when exporting to PPTXMiklos Vajna
Bring the static counter under the control of DrawingML::ResetMlCounters(), so the first chart is always chart1.xml, even if the same process already exported a chart previously. XLSX is a separate codepath, this fix doesn't help with that yet. Change-Id: Idf6e576ba94e254ae9782ef86e85542efd80127f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148457 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-08osl::Mutex->std::mutex in ParameterWrapperContainerNoel Grandin
Change-Id: I5beb5981d40e970e8bdc68d7bd61f1adb502246d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148440 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-08svx: Stop manually counting map entriesMichael Weghorn
The `nCount` member counts the number of elements in `m_aItemList`, but `std::unordered_map::size()` also returns that, so just use that instead. Use `SvxSearchCharSet::getMaxCharCount` in most places and simplify to use `std::min` in `SvxSearchCharSet::LastInView`. Change-Id: I8b66b1d83c0327026b13147f201995c7d1df1238 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148422 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-03-08Simplify usage of BinaryDataContainerMike Kaganski
It is always used to store data read from streams Change-Id: I613bc446eaadf98d2b1c012002d38f23d79a40ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148450 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-07lok: form controls: rendering and mouse event forwardingMarco Cecchetti
What we got - Most controls rendered on Writer and Impress (on Calc already implemented by Tomaž Vajngerl) - Text labels rendered correctly - Mouse events forwarded to controls - Control state changed on click for Writer and Calc - Control invalidation for all apps - Fixed broken LOK_CALLBACK_MOUSE_POINTER msg - Correct pointer style when mouse is hovering over a control Need to be improved - in impress click method for a control is not executed even if the mouse event is forwarded correctly - avoid not needed control invalidations (as the one occurring on document autosaving) Change-Id: I4d5012af7f90a2c726b6b6b5b068e2be1ed5568a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146569 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147320 Tested-by: Jenkins Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com>
2023-03-07Drop the LibreOfficeKit paintThumbnail() APITor Lillqvist
It turns out that Mert's original idea is actually the simplest and it is known to work. And in that, the separate paintThumbnail() is rather pointless, as all paintThumbnail() did was to call paintTile(). The caller (in Collabora Online) knows when a file is opened specifically for thumbnailing, and can call paintTile() itself with the appropriate parameters. My misguided idea would have had paintThumbnail() somehow figure out the physical Twip coordinates of the current location (for text documents, the insertion caret location) in the document. (Or, as LibreOfficeKit for some reason calls them, "logical" coordinates, even if a Twip is a very physical length unit.) Then it would have called paintTile() with those coordinates. But it turned out to be rather hard to figure out the Twip coordinates of the current location in the document. Mert's idea was that when a document is opened for thumbnailing, only Online actually needs to know that. From LibreOfficeKit's and core's point of view it is a normal document load operation. Then Online performs the .uno:OpenHyperlink magic, which makes core move the current position to the requested "target" or "mark" (the terminology varies) location. And then a "cursor" callback is used by Online to get the Twip coordinates of the target. It is a bit unclear to me whether .uno:HyperLink causes the document to be opened an extra time, but whatever, this way is said to work. So let's do it like that. This reverts the paintThumbnail part of 1aa37ca99112c0760552600d7774ba7224581c5b. Change-Id: I8f3d9917ee362c1518834fc10a57c57ebc4a6edb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148390 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2023-03-07no need to allocate these separatelyNoel Grandin
they are all one or two words in size Change-Id: I44d60e9fca03ce6709551a660661dd2a6778fd7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148377 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-07Fix Doxygen comment thinko: dumpState() is in lok::Office, not in lok::DocumentTor Lillqvist
Change-Id: I87626370fdd8cbe906ed31d1b8c92234696e9708 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148414 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2023-03-07Drop VectorGraphicDataArrayMike Kaganski
Change-Id: If444317edf35d0627c6bc3a8c36ba973a8a0af8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148371 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2023-03-07tdf#153396 - Bibliography marks improvementsVojtěch Doležal
Adds option to separate function of "URL" into (listed) "URL" and "Target URL" to allow for more flexibility (in that case if target URL is empty, bibliography mark hyperlink leads to bibliography table row if possible) When writing tests also found and fixed bug where exporting new file with anchor link bibliography mark crashes LO. Change-Id: Ic1b5c8c9590c0338dcfc4fa3a981142bddae0113 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147868 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-07eFormat modified inside GetDateArea, but change not propogated to the callerCaolán McNamara
regression from: commit 6e7e19d9c300dbdd279789b09f94781e946fad52 Date: Wed Jul 15 12:10:32 2020 +0100 weld DateControl Change-Id: I74bc01383f04fd4e54a45058fbbc3bc082eef0e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148359 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-06tdf#148776 for scrolling set step size as height of a rowCaolán McNamara
similar to FontFeaturesDialog. FWIW gtk's viewport implementation automatically overwrites the step size to be 10% of the visible height (and page size of 90% of the visible height) Change-Id: If356724a47b0a10069f129bed4a40cfdee57bfa8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148138 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-06oox: import font scheme structure directly into model::FontSchemeTomaž Vajngerl
Change-Id: Ic9084cbbf451ca406133f07476b8b4e7c234a650 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147572 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-03-05Fix typoAndrea Gelmini
Change-Id: I1392e8e20e42b13a28b13bd611eedccf7b9c088f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148262 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-03-05make NbcRotate abstract as it's implementation is noopTomaž Vajngerl
During testing the NbcRotate function on SdrObject it turned out the the function is essentially a noop, because it uses normal equality to test the values of a double, which are a product of sin and cos functions (to determine the 90 degree angles). So because of this the input rectangle was never modified - noop. Because of this we can just remove the impl. of the function and declare it abstract, so that the actual implementations define a valid function to rotate. There were some subclasses that didn't override the NbcRotate so they used the one implementation in SdrObject. These subclasses now override the function and in the implementation we call assert(false), which is never called during a test run. It seems we never rotate those objects. Change-Id: I1b1a45a8e96ed2d061f9b9f80c5fdaa5a84d4c05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148266 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-03-05svx: make SdrObject abstract by making CloneSdrObject pure virtualTomaž Vajngerl
This change makes SdrObject an abstract class that can't be as we don't want it to be instantiated. With this the ClonseSdrObject became a pure virtual function. With this change also the SwFlyDrawObj needs a implementation of the CloneSdrFunction, which was previously provided by SdrObject. Change-Id: I2efb8c1e6fac12b17ce497285067029d7da1c1fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148239 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-03-04JSDialog: implemented jsdialog support for the toggle buttonsPranam Lashkari
Change-Id: I21408f7344f7e100373c368036f81503302b93ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148240 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2023-03-04MCGR: ColorSteps handling moved to toolingArmin Le Grand (allotropia)
Due to the fact that handling of a vector GradientSteps will get used more often with ongoing changes I moved some handling to tooling, see sortAndCorrectColorSteps. That method sorts and corrects a vector of ColorSteps so that only valid entreis remain in a sorted order, for details please refer to the docu at function definition. I took the occasion to rearrange that to work on the single provided vector which is better for speed & ressources. Also changed the ColorStep constructor to not automatically correct constructed entries: While that is formally correct, it moves an invalid entry to 0.0 or 1.0, thus creating additional wrong Start/EndColor entries. Those may then 'overlay' the correct entry when corrections are applied to the vector of entries which leads to getting the wanted Start/EndColor to be factically deleted, what is an error. Also rearranged FillGradientAttribute to now work initially with ColorSteps, no longer requires the Start/EndColor, also adapted all usages. This securely allows start/end and in-between single-color sections in gradients. Also needed to re-formulate GradientRect & GradientElliptical ::appendTransformationsAndColors method for correct 2D mapping(s) - always incrementing from the start to end conflicts with the adaption of the start value for the inner loop mainly because increment is at start of inner loop (pre-increment). Corrected errors from clang plugin, but also some wrong initialiations for basegfx::ColorSteps. Change-Id: I292592ed9abcfa591f68a680479f4fcdda46cbeb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148196 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-03-04svx: change Poly2Rect to return a rectangle, also clean-up the codeTomaž Vajngerl
There is no need to pass the rectangle by reference and to change it inside the function, better to return a new instance. Also clean-up the code of Poly2Rect and rename the function to svx::polygonToRectangle. Change-Id: I25e77c8abd12e2075939f55e06f40343ac23ca97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148211 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-03-04svx: SdrTextObj maRect - use getter and add funcs. for manipulationTomaž Vajngerl
Change-Id: I0a416fa2ac470650c2ef430dbb91bf8d5a8013cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148210 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-03-04jsdialog: correct structure for RoadmapWizardSzymon Kłos
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com> Change-Id: Id9837c208653311608bf39d6066cbf1345efc565 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148214 Tested-by: Jenkins
2023-03-03lok: macro: VBA message dialogs was causing assertion failureMarco Cecchetti
Get VBA MsgBox and VBA Runtime Script Error dialogs to be displayed correctly without causing an assertion failure. Provided a solution that allows VBA MsgBox to be executed in a not-async way so that the VBA script is paused until the message box is closed. Change-Id: Ica7d0d343a0ea4b6a163c1c43572f18a5779a0ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147243 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147321 Tested-by: Jenkins
2023-03-03flatten OGenericUnoControllerNoel Grandin
rather than having a confusing mix of pimpl pattern and inline fields Change-Id: I2953df1893f49efb43f387d0d6348c6b17de83f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148175 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-03flatten DocumentUndoGuardNoel Grandin
which is a small object, and doesn't need a pimpl pattern Change-Id: Ib76f6e5ad0347be61fe29b22f57e1211ce3337cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148172 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-03Disable test::AccessibleTestBase::awaitDialog() on macos altogetherColomban Wendling
The API doesn't actually work there yet because we don't get any event, so there's no point in exposing it there, and it makes it clear it isn't available there, avoiding future user to wonder why their tests do not behave there. Change-Id: I38dcc98ad3bc3b669df64bc1c53c91ef48a0d717 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147574 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-03-03test: Use css::awt::XExtentdedToolkit::addTopWindowListener()Colomban Wendling
Use awt::XExtentdedToolkit::addTopWindowListener() instead of Application::AddEventListener() for lower dependency on vcl::Window. We however still require some vcl::Window for EventPosterHelper to work without which we cannot post events to the dialog. It however doesn't really have to be the top-level window itself, any vcl::Window high enough the event tree would probably work. Change-Id: I40b56a6c9e45f4e2ef2cab27a735856baef7e3c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146634 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-03-03test: Run user dialog callback in idle timeColomban Wendling
On e.g. Windows we need to let the dialogs fully finish starting up before we can properly interact with them, and especially close them again. We notice new dialogs with the WindowActivate event, but this will happen before the dialog is fully set up internally, leading to failures on Windows. In practice, the WindowActivate event might be dispatched before the dialog setup function finishes, leading to an intermediate state at WindowActivate time. Work around this by running the user code in an idle timer in response to the WindowActivate event, so that the setup code can return before the callback is dispatched. Based on findings by Michael Weghorn, thanks! Change-Id: Ieecee09d84144570fe1943ca12dc1db6d9f64524 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146378 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-03-03test: Add debug print support for XAccessibleActionColomban Wendling
Change-Id: Ic511f2abc62703ead40a585989c54345cf3c17ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142261 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-03-03test: Add helpers to get a specific object and tab to itColomban Wendling
Add a tabTo() variant that accepts a target object that should gain focus. This is useful to work around focus issues in the implementation (although they should be reported and fixed), and it's a simpler and more efficient API if the caller happens to already have a reference to the target object. This also adds AccessibilityTools::getAccessibleObjectForName() as a usually more useful alternative to AccessibilityTools::getAccessibleObjectForRole() as it allows to easily match both role and name. There is also a template version accepting multiple role and name pairs to further refine the selected object. Together, it makes it easy to obtain the target object and tab to it, in situations where the other tabTo() variant either doesn't work for some reason (as mentioned above), or is not the slickest solution. Change-Id: I6a41b147331132711ac84776bb43ad24a091ba24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142260 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-03-03test: Add a few basic dialog tests and helpersColomban Wendling
This adds basic tests for a few dialogues, showcasing and exercising the dialog handling code. Those tests are extremely basic but show that it is trivial enough to interact with a dialog. This adds a few helpers to navigate the UI using keyboard events as well, because it's one of the best methods to verify the actual interaction works for a user of assistive technologies. Change-Id: Idc1f279f35ff01769138c3addb10ef851ca0dbb8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142259 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>