summaryrefslogtreecommitdiff
path: root/svtools
AgeCommit message (Collapse)Author
2022-09-21use more string_view in svtoolsNoel Grandin
Change-Id: Id0317c400d7bc868916b97cd1c7abae04c4a9e30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140335 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-19Rename MouseNotifyEvent to NotifyEventTypeSamuel Mehrbrodt
Also contains keyboard and focus events, not only mouse events Change-Id: Iec1d6c341b01a489ba80fe9634ea3579afb02ea9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139970 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-09-16vcl: AnimationBitmap -> AnimationFrameChris Sherlock
The emphasis is not quite right. An animation is made up a sequence of *frames*, not bitmaps. A frame includes such things as position, size, timeout till the next frame *as well as* a bitmap. Note: had to regenerate a bunch of precompiled headers Change-Id: Ib1959452653857555f41e01ac0151d08c41a3b1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/76460 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-09-14move ErrCode to comphelper and improve debug output stringNoel Grandin
need to move it, because modules "below" vcl want to use the debug output method Change-Id: Ibcaf4089a1e0b3fcc0b5189c7ebf1aae90f50b48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139791 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-10unique_ptr->optional for GraphicNoel Grandin
Graphic is just a wrapper around shared_ptr, so no need to allocate this separately Change-Id: I30de73ac8a7e29adbc5ffe681f3ce88cd700b68c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139738 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-03Simplify by using replaceAll instead of replaceAt in a loopJulien Nabet
Change-Id: I019d93a0937be6402c9749b72595354cf4b09b7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139281 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-02[API CHANGE] tdf#150683 a11y: Switch a11y child index to 64 bitMichael Weghorn
With 16k column support in Calc enabled by default in commit 4c5f8ccf0a2320432b8fe91add1dcadf54d9fd58 Date: Tue Mar 8 12:44:49 2022 +0100 change default Calc number of columns to 16384 (tdf#50916) , the number of Calc cells in a spreadsheet is larger than SAL_MAX_INT32, meaning that a 32-bit a11y child index is no more enough and using it resulted in integer overflows in methods handling corresponding Calc cells in the a11y layer. This e.g. had the effect of the Orca and NVDA screen readers not announcing focused or selected cells properly when their a11y child index was out of the 32-bit integer range. Switch the internal a11y child indices to 64 bit to be able to handle this properly internally. Since the platform APIs (at least AT-SPI on Linux and IAccessible2 on Windows; from what I can see LO's macOS a11y bridge doesn't directly expose the child index) are still restricted to 32 bit, larger child indices still cannot be exposed via the platform APIs. As a consequence, use of the the IAccessible2 and AT-SPI methods that use the child index remains problematic in those cases where the child index is larger. However, as an alternative to using the AT-SPI Table interface and the IAccessibleTable/ IAccessibleTable2 interfaces with the child index to retrieve information about a specific cell, both AT-SPI and IAccessible2 also provide interfaces to retrieve that information directly from the cell object (TableCell interface for AT-SPI, IAccessibleTableCell for IAccessible2). Those interfaces are already implemented/exposed for winaccessibility (s. `CAccTable`) and the qt5/qt6/kf5 VCL plugins (s. the `QAccessibleTableCellInterface` methods implemented in `QtAccessibleInterface`). With the switch to 64-bit internal a11y child indices, these now behave correctly for cells with a child index that doesn't fit into 32 bit as well. NVDA on Windows already uses the IAccessibleTableCell interface and thus announcing focused cells works fine with this change in place. Orca on Linux currently doesn't make use of the AT-SPI TableCell interface yet, but with a suggested change to do so [1], announcement of selected cells works with the qt6 VCL plugin with a current qtbase dev branch as well - when combined with the suggested changes to implement support for the AT-SPI TableCell interface in Qt [2] [3] and the LO change based on that [4] and a fix for a nullptr dereference [5]. The gtk3 VCL plugin doesn't expose the AT-SPI TableCell interface yet, but once it does so (via `AtkTableCell`), it also works with the suggested Orca change [1] in place. (Adding that is planned for an upcoming change, works with a local WIP patch.) For handling return values that are larger than what platform APIs support, the following approach has been chosen for now: 1) When the return value is for the count of (selected) children, the maximum value N supported by the platform API is returned. (This is what `ScAccessibleTableBase::getAccessibleChildCount` did previously.) The first N elements can be accessed by their actual (selection) indices. 2) When the return value is the child/cell index, -2 is returned for objects whose index is greater than the maximum value supported by the platform API. Using a non-negative value would mean that the index would refer to *another* actually existing child. A child index of -1 on the other hand tends to be interpreted as "child is invalid" or "object isn't actually a child of its (previous) parent any more)". For the Orca case, this would result in objects with a child index of -1 not being announced, as they are considered "zombies" [6]. What's still somewhat problematic is the case where more than 2^31 children are *selected*, since access to those children still happens by the index into the selection in the platform APIs, and not all selected items are accessible this way. (Screen readers usually just retrieve the first and last element from the selection and announce those.) Orca already seems to apply different handling for the case for fully selected rows and columns, so "All cells selected" or "Columns ... to ... selected" is announced just fine even if more than 2^31 cells are selected. (Side note: While Microsoft User Interface Automation - UIA - also uses 32-bit indices, it also has specific methods in the ISelectionProvider2 interface that allow to explicitly retrieve the first and last selected item, `ISelectionProvider2::get_FirstSelectedItem` and `ISelectionProvider2::get_LastSelectedItem`, but we currently don't support UIA on Windows.) Bound checks at the beginning of the methods from the `XAccessibleContext`, `XAccessibleSelection` and `XAccessibleTable` interfaces that take a child index (or in helper methods called by those) should generally already prevent too large indices from being passed to the methods in the lower layer code that take smaller integer types. Such bound checking has been been added in various places where it wasn't present yet. If there any remaining issues of this kind that show after this commit, they can probably be solved in a similar way (s.e.g. the change to `AccessibleBrowseBox::getAccessibleChild` in this commit). A few asserts were also added at places where my understanding is that values shouldn't be larger than what is supported by a called method anyway. A test case will be added in a following change. [1] https://gitlab.gnome.org/GNOME/orca/-/merge_requests/131 [2] https://codereview.qt-project.org/c/qt/qtbase/+/428566 [3] https://codereview.qt-project.org/c/qt/qtbase/+/428567 [4] https://gerrit.libreoffice.org/c/core/+/138750 [5] https://codereview.qt-project.org/c/qt/qtbase/+/430157 [6] https://gitlab.gnome.org/GNOME/orca/-/blob/82c8542002e36e0d3d918088d583162d25136143/src/orca/script_utilities.py#L5155 Change-Id: I3af590c988b0e6754fc72545918412f39e8fea07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139258 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-08-24tools: rename Rectangle::Justify() to Rectangle::Normalize()Chris Sherlock
Jusify() normalizes the rectangle so both the Width and Height are positive, without changing the location of the rectangle. It ensures that the x and y coordinates will be moved to the top left of the rectangle. The name is strange, so renaming Justify() to Normalize(). Change-Id: Idbf163e65e52a798e38f785b8961b8042cf0cf2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137379 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann
...so that its TOOLS_WARN_EXCEPTION can be used in comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it, rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The comphelper module is sufficiently low-level for this immediate use case, so use that at least for now; o3tl might be even more suitable but doesn't have a Library until now. Also, for the immediate use case it would have sufficed to only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION, TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of include/tools/diagnose_ex.h into an additional new include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move the complete include file as is.) Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-14tdf#104921: Cleanup Kashida insertion logicKhaled Hosny
Communicate Kashida insertion positions in an explicit way. Rest of LibreOffice communicate adjustments to character widths (e.g. for justification or spacing) using so-called DX array. DX array is an array of absolute character positions (e.g. DX[n] is the position after character n from the start of the lines, and its widths is DX[n] - DX[n-1]). This DX array is modified also when Kashidas are inserted after a given character for Arabic justification, by expanding its width. VCL would use this to know where to insert the Kashidas and how many ones. But because DX array is used for both widths adjustments and kashida insertion, this turns out to be a source of bugs since VCL has tosecond guess the DX array to find which is pure width adjustment and which also involves Kashida insertion, and the heuristics it uses are fragile. This change adds a second array of booleans that records where Kashida is inserted and communicates it all the way from where Kashida insertion is decoded in Writer and down to VCL layout. This change passes the Kashida array only when it seems necessary (e.g. during drawing but not when measuring text since the DX array is enough in this case). Hopefully no places where Kashida insertion needs to be passed down were missed. A couple of glyph and layout flags that were used for old heuristics and no longer needed and are removed. This also fixes: tdf#87731 tdf#106309 tdf#108604 tdf#112849 tdf#114257 tdf#127176 tdf#145647 tdf#146199 Change-Id: I4ed0850ef2fdc3e9143341afac649e7e7d463c39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138068 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-12revert direct append to aToken in SvRTFParser::ScanText() (tdf#150151)Luboš Luňák
This reverts most of commit 09558e2f45e27d572fd261562c884c2d2cc896a7, the problem is that GetNextToken_() resets aToken, overwriting the value created by this function. Change-Id: I1daca07a6e01cfecfeff9fbf7c311b0d392d84d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138190 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-08-08move m_bNavigationBar to BrowseBox so it knows best scroll/status bar heightCaolán McNamara
to use, so databrowser with it (view data sources) has the tall case, while bases, create table in design view has the short case Change-Id: If3269d2ab2ce62f09acac624e5ef7e91ff91eaea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137953 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-08use separate width and height for databrowser vert/horz scroll sizesCaolán McNamara
the scrollbar in the statusbar can be thicker than the vertical one which looks weird when both set to the thick size Change-Id: I76496e47203a7cde72082f8e6b83f5af3e8c3759 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137952 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-08overpaint scrollbar junction with the face colorCaolán McNamara
Change-Id: Ib2dba2d5e47a8c39f79c3ab5a8e79e8185599da6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137951 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-07add set_scroll_thickness to provide a way to "zoom" the scrollbarCaolán McNamara
Change-Id: I551112fb097a6ac2b442cd37d1a16bd2b34ecc54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137932 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-06move SVTXGridControl to toolkitCaolán McNamara
Change-Id: I513a2885027d0295f70e7c64269d1653a6c2642b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137870 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-06Revert "align horz scrollbar to top if assigned more space than it wants"Caolán McNamara
This reverts commit 106bc0fd7a94eb48e8a81be753c156496b83578a. it has an unusual effect in writer on hiding and reshowing scrollbars Change-Id: I0569bf3ddb9b04f1afc6c26add84086bdf4ff5fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137886 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-05tdf#117388 use native scrollbar under gtk in data browserCaolán McNamara
Change-Id: I22745f1c910f68fd2c0b31e8392c111fc76ef529 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137864 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-05align horz scrollbar to top if assigned more space than it wantsCaolán McNamara
as is currently the case for the databrowser scrollbar, and do the same to the vert for consistency Change-Id: Icf8694f172c3121f35f612a47faa2e2caef890c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137863 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-05start with size at optimal sizeCaolán McNamara
Change-Id: Ibd5f009c4717ce236334e5fc407512a5ef8c2a70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137844 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-05tdf#117388 use native scrollbar under gtk in calc documentCaolán McNamara
Change-Id: I436067b4f2b463fe9a5d6789cf96f906891757bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137810 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-04split SwScrollbar up for reuse of adaptorCaolán McNamara
Change-Id: Idf46b209c573316e810371597acb1567536d9529 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137806 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-03tdf#117388 use native scrollbar under gtk in writerCaolán McNamara
with the motivation that for gtk4 theming for vcl scrollbar isn't available, so it looks super yuck but this should also support the long-press scrolling thing under gtk3 as a side effect. Change-Id: Iada5a66087d5aa982f9213d7ec0a05f6177f4e66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137750 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-07-24tdf#147868 Disable add sheet when structure is protectedHossein
Using "Tools > Protect Spreadsheet Structure...", it is possible to protect the structure of a spreadsheet document. Without this patch in place, the [+] (add new sheet) button is clickable but it does not work. This is confusing for the user, so it was decided that the button should be disabled when the structure is protected. This patch disables the [+] button just after the structure is protected using the above toggle menu option. The menu option becomes checked, and the [+] button gets disabled immediately. After choosing the same toggle menu option again, the check mark goes away, and the [+] button becomes enabled immediately. In this patch, GetDocument().IsDocEditable() is used to check if the document structure is protected. The argument for this choice is that the same function is used when renaming a sheet with ScDocFunc::RenameTable(). Change-Id: If812d94841d3efd98d7ef898cc1f4b2f1387130b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137365 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-07-22elide some makeStringAndClear() callsNoel Grandin
Change-Id: Iccdb04df53bc981e2240240daddf15e9e1bb5a16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137310 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-21Removed duplicated include and typoAndrea Gelmini
Change-Id: Idd50b3533e8b32e66cb4975e1257048f9233089b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137078 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-07-18cid#1507356 Logically dead codeCaolán McNamara
Change-Id: I40af398107362615b2500dfa5262a63551489269 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137164 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-07-14clang-tidy modernize-pass-by-value in svtoolsNoel Grandin
Change-Id: I60e7373c924a479fed72eb4f0538006e3e422004 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137019 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-14loplugin:moveitNoel Grandin
Change-Id: I2702e716dc669ffbb870d36d060e110288d7a744 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137043 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-12use a read-only stream when reading graphic dataLuboš Luňák
EmbeddedObjectRef::GetGraphicStream() creates a writable SvMemoryStream, read the graphics data into it and then returns the stream, which will be afterwards used to decode the graphics. But if the data is broken, incorrect seeking may cause a seek way past the buffer, and since the stream is writable, it would be done and cause problems such as running out of memory. The VersionCompatRead class is one such place that reads size from the stream and then seeks based on the read data. Add SvMemoryStream::MakeReadOnly() that will change the stream to be read-only after the initial read of the data into it. Change-Id: I1d44aabaf73071a691adafa489e65e4f5e3f021d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137002 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-07-11tools: rename getHeight/Width() to GetOpenHeight/Width()Chris Sherlock
By default Rectangle uses closed interval, if we really want to use half open intervals then we should specifically say as such in the name. Change-Id: Id7a91120ba1a1a4bc330014216b73a692dbf03a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136575 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-08[API CHANGE] Drop css::accessibility::XAccessibleStateSetNoel Grandin
which is internal API, unused (as far as I can tell) by external users. This state is purely a bitset (as implemented by utl::AccessibleStateSetHelper) so we can just return it as a 64-bit value. This shaves significant time off the performance profiles of code that loads very complex shapes, because this state is frequently used, and we no longer need to allocate a return value on the heap for every call. Change-Id: Icf1b3bd367c256646ae9015f9127025f59459c2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136786 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-06tdf#90837 - clarify the error message re: over-writing readonly files.Michael Meeks
Change-Id: I757b29574526882da6e307cef51dfa70f6a1c4bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136833 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2022-06-27ofz#24932 Infinite loopCaolán McNamara
Change-Id: I05770f0209aaee1b9af6b88f85764ec98e7fa5a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136504 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-27sw HTML export: fix missing escaping for image linksMiklos Vajna
Hyperlink URLs on images are currently written to the HTML output as-is, without any any encoding. Image links are written using HtmlWriter from svtools, which has the advantage of not building the markup manually (similar to sax_fastparser::FastSerializerHelper for XML), but that doesn't do any escaping. Some other parts of the HTML export build the export markup manually, but use HTMLOutFuncs::Out_String() to encode problematic content. Fix the problem by using HTMLOutFuncs::Out_String() in HtmlWriter for attribute values: it seems reasonable to assume that users of HtmlWriter would pass in unencoded strings, similar to how the sax serializer works. This could lead to double-encoding in case some user of HtmlWriter::attribute() would encode its attribute value already, but inspecting existing calls, none of the clients seem to do that at the moment. Change-Id: I5439e829b1b837cb9c51292b118f0b47e84197db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136399 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-06-24svtools: avoid divide by zero in calcCustomItemSizeXisco Fauli
See https://crashreport.libreoffice.org/stats/signature/%60anonymous%20namespace'::calcCustomItemSize Change-Id: I5f1b19b7679c73cf29952629469e5151395b2b12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136254 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-06-23tdf#149401 show "Restart LibreOffice" dialog changing AutoRecoveryTünde Tóth
Changing "Save Autorecovery... information every ... minutes" option in Tools->Options...->Load/Save->General shows that dialog window to warn about its work. Change-Id: I91ae72ea1e52ec5c6d9286a43cd986386636076c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135221 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-06-21Correctly free font previews on settings changeJan-Marek Glogowski
Change-Id: I9fdce7c9fb8a18571d3d6a317b28a344f18efa82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136227 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-06-10loplugin:constantparamNoel Grandin
Change-Id: I8134744b6c1279c497d4763eddf614bb840f7f3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135602 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-10LanguageTool Grammar Checker implementationMert Tumer
Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Change-Id: I275cbea668afc5beb5147370119631df8b6a2d46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135178 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-06-05restore %PRODUCTNAME to accessible descriptions that need themCaolán McNamara
The original problem was that %PRODUCTNAME wasn't replaced for accessibility descriptions (which are reused for extended tips) under gtk. Universally querying all a11y descs on load to potentially replace %PRODUCTNAME in a11y descs at runtime led to tdf146971 which was a huge startup slowdown. The half way 7.3 fix was to leave a11y descs alone, but do the replacement when querying for the extended tip case. So the extended tooltips were ok, but screen readers would still say a raw "%PRODUCTNAME" text, hence the rewording effort to remove %PRODUCTNAME from the a11y descs entirely for 7.4. But there is now a few cases where some options paths exists in the a11y descs which is not exactly correct wrt to the text shown in the options dialog. Reworking the options dialog to not have %PRODUCTNAME there at all and updating everything to fit that sort of change would not be popular. So move the cases where a11y descs really should have %PRODUCTNAME in them out of the .ui files and into .hrc files and use specific set_accessibility_description calls for them via ResID which will do the %PRODUCTNAME replacement automatically. Hopefully the a11y runtime cost for just this handful of cases is negligible in the overall scheme of things. Change-Id: Ieb17d26fd581cd5804a52b371b3bb5ea43023aa3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135432 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-24Use o3tl::make_unsigned in some placesStephan Bergmann
...where a signed and an unsigned value are compared, and the signed value has just been proven to be non-negative here Change-Id: I20600d61a5d59d739bc1bee838c0038e4611aec2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134875 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-24modernize and improve PropertySetInfoNoel Grandin
(*) use o3tl::span for the array param, which means we don't need a null entry to terminate the array (*) use std::unordered_map to speed things up (*) mark the array as static at a few more call sites Change-Id: I05b6cae7552f44459e183ec05cb94e60edb3bfe0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134832 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-10tdf#147590 update OLE object after document refreshJuergen Funk
Regression from b099da78a6f0b3e120f706714003b05d84d11e70 we didn't update linked OLE document after document reload Change-Id: I8e52f6430f454b276cb43449c6f7a3b0e07e909f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130692 Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Tested-by: Jenkins
2022-05-05use more o3tl::getTokenNoel Grandin
found by inspecting call sites of OUString::getToken Change-Id: I4269c7476c7aa46fac39528227e350568f0eb34a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132644 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-04use more string_view in unotoolsNoel Grandin
Change-Id: Id10d68f2eb016671be6842dfaa82909207b0708d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133754 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-03Just use Any ctor instead of makeAny in svtoolsStephan Bergmann
Change-Id: Ib5a86de01abd6eab2f60d76bda50fa9407286dbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133770 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-03add o3tl::equalsAsciiNoel Grandin
Change-Id: I042b8dcadbf7581de325c161763fe35aecde5ca2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133694 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-29use more string_view in INetURLObjectNoel Grandin
Change-Id: I4462f7cf4740fa4d1b129d76a0775f4250f41bbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133555 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-25Resolves: tdf#141441 get and set selected entry when "unfrozen"Caolán McNamara
Change-Id: I4229460fb27ae3dc133c0f6a53c7792a87bf4db3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133389 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>