summaryrefslogtreecommitdiff
path: root/svx
AgeCommit message (Collapse)Author
2022-09-05tdf#117173 make search label read by screen readerJim Raykowski
Change-Id: I3ced9f5f3637e8489d0512b48882724a5a51b577 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-05cid#1513507 Dereference before null checkCaolán McNamara
and cid#1513511 Dereference before null check Change-Id: I58ec1fda9763c763c0e9cfbeeff4c623469c2135 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139403 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-05tdf#150756 Assertion when opening report for editingNoel Grandin
Change-Id: I59cbbc63175a95568f9a0390ab618a5f32d6488b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139331 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-03crashtesting: fix use-after-freeCaolán McNamara
seen on exporting forum-mso-de-77310.pptx to ppt presumbly since: commit 8611f6e259b807b4f19c8dc0eab86ca648891ce3 Date: Thu May 27 10:27:46 2021 +0200 ref-count SdrObject Change-Id: I883ecb8b39c95550673c51e086dcf3058588f9e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139325 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-03crashtesting: SdrMediaObj destroyed before ctor completesCaolán McNamara
fix similar to SdrOle2Obj ctor seen on loading ooo88783-2.sxi presumably since: commit 8611f6e259b807b4f19c8dc0eab86ca648891ce3 Date: Thu May 27 10:27:46 2021 +0200 ref-count SdrObject Change-Id: I06acecec81632f4e15f5e80384bb90154a54c9d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139324 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-02ofz#504464 scaling "calculation" timeoutCaolán McNamara
just skip this uninteresting branch Change-Id: Ida695cccdee8a44b7c2ec089bba8ad95e35c113e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139267 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-02Revert "ofz#48264 Timeout"Caolán McNamara
This reverts commit d4eee72ea39f02ad8a63a592feb3553771bf9bbe. and all the related timeout improvement efforts and return to its original state, more trouble than its worth Change-Id: I5c4951ae225fe5e27a1b969cdaade3dd7ba3ce2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139266 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-09-02tdf#150712 limit the dialog to only a sample of the dataNoel Grandin
instead of the entire area, which makes the dialog pretty much instantaneous Change-Id: Icb08a09733ee872b67d5be00cb083139f05fba7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139214 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-02tdf#150712: Format->Conditional->Condition 100% CPU (2nd try)Julien Nabet
Change-Id: I5f7fe01141ecd057840c01a9080ff7fd2b941049 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139226 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-01cid#1513474 Explicit null dereferencedNoel Grandin
coverity can't see that the logic is such that nullptr is impossible here, so add an assert to make it happy Change-Id: I666dde47851d468c0b9e282c389fe07e640028fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139164 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-01Revert "tdf#150712: Format->Conditional->Condition 100% CPU"Julien Nabet
This reverts commit 076be52655f2cf4e331b344e0f6497f41b37fa8c. Reason for revert: I misread and we replaced "xa" "xd" by empty but it's a space. Change-Id: I0246f6a3c667b4336f21ffd61fd86574009b7956 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139175 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-09-01tdf#150712: Format->Conditional->Condition 100% CPUJulien Nabet
Flamegraph showed this part, see: https://bugs.documentfoundation.org/attachment.cgi?id=182121 Change-Id: Id14ea4f95d8912847f77eed561b14d3edee2f67f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139152 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-09-01cid#1513474 silence Explicit null dereferencedCaolán McNamara
Change-Id: Ifd33ce24ca4cc351a0a68c87b463baf556001c20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139150 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-01Resolves: tdf#150370 Accept 'art-x-...' private-use input in language boxEike Rathke
... for artificial constructed languages. Change-Id: Ifd0f2ca63738eb9bbe78361cd3fdf507f3e397f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139135 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-08-31cid#1509246 Inefficient vector resizing with reserve.Noel Grandin
preserve the benefits of reserving with the benefits of logarithmic doubling Change-Id: I0d15c4a5b4f1890c71b27c71169d9364f6448370 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139086 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-31Related: tdf#150370 Convert isValidBcp47() bool to enum LanguageTag::PrivateUseEike Rathke
... to prepare for more finegrained private-use control. Change-Id: I118c3f5ee6e437435c07ed2cf699c4597e9cdf88 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139112 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-08-31cid#1500540 Dereference before null checkNoel Grandin
Change-Id: Id12ee298c5b3a1cafcb79afeb07d8cc679b947f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139097 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-31tdf#144092 tdf#139511: revert parts of tdf#91762 tdf#137949 tdf#139511Sarper Akdemir
Reverts parts that have wrong assumptions wrt layouting a table in svx. The problems reverted commits solved previously, were refixed by commits: - tdf#144092 pptx import: correct table height during import (a5126a21351c87138ff86a6636326eb6cd6a0f8c) - tdf#144092 pptx import: fix import of empty cell and shape text properties (57f9b4b7d1ad164c56af12009ef1dafbc1be8369) So hopefully, reverting these now won't cause many regressions. Change-Id: Ie96293810b033dc86e41c200f10cf63326511cea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138653 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-08-31fix assert in builds with assert enabled, but dbg_util disabledNoel Grandin
after commit 8611f6e259b807b4f19c8dc0eab86ca648891ce3 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Thu May 27 10:27:46 2021 +0200 ref-count SdrObject Change-Id: Ib320f42daff3b12798ee16b3739142f0e9f6d2e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139082 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-31tdf#144092 pptx import: correct table height during importSarper Akdemir
It appears PowerPoint can export rows of a table with row heights that is less than the minimum height (for that row). And also export the total table height wrong with it. If PowerPoint imports such a table, those rows are individually expanded to the minimum height. (Also increasing the table's total height) In Impress import we calculate table height by adding up individual row heights. Table layouting code depends on the table height being correct. This is why rows with less than minimum height lead to layouting problems. To compensate for this, while importing tables, layouting is skipped until the table height is updated with the corrected height. The correct height is calculated by layouting the table without fitting to an area (i.e with bFit = false). Change-Id: I79187882470a4e285b45bca1eabb469a084067f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138652 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-08-30svx a11y: Simplify AccessibleTableShapeImpl::getColumnAndRowMichael Weghorn
Just use division and modulo instead of a custom loop. Change-Id: I70a975d6c73d4c3f645d250b9c571fe6e35cd702 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139063 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-08-30svx a11y: Drop TODO that doesn't need actionMichael Weghorn
`AccessibleTextHelper_Impl::getAccessibleChild` that gets called from `AccessibleTextHelper::GetChild` throws an `IndexOutOfBoundsException` on invalid index which is the expected behavior here and what the comment for `AccessibleCell::getAccessibleChild` says, so drop the TODO that seems to have been there to check this. Change-Id: If04438cc3625ce438ada75bb6dea7e6c88c3e894 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139062 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-08-30its not ideal to wait until Paint to set the bg colorCaolán McNamara
set it at construction time Change-Id: I8923ea8f79c4bf18054fc697e2b35caad1b12486 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139024 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-29ref-count SdrObjectNoel Grandin
Which means we can get rid of the majestic hack of ScCaptionPtr Previously, SdrObject was manually managed, and the ownership passed around in very complicated fashion. Notes: (*) SvxShape has a strong reference to SdrObject, where previously it had a weak reference. It is now strong since otherwise the SdrObject will go away very eagerly. (*) SdrObject still has a weak reference to SvxShape (*) In the existing places that an SdrObject is being deleted, we now just clear the reference (*) instead of SwVirtFlyDrawObj removing itself from the page that contains inside it's destructor, make the call site do the removing from the page. (*) Needed to take the SolarMutex in UndoManagerHelper_Impl::impl_clear because this can be called from UNO (e.g. sfx2_complex JUnit test) and the SdrObjects need the SolarMutex when destructing. (*) handle a tricky situation with SwDrawVirtObj in the SwDrawModel destructor because the existing code wants mpDrawObj in SwAnchoredObject to be sometimes owning, sometimes not, which results in a cycle with the new code. Change-Id: I4d79df1660e386388e5d51030653755bca02a163 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-29avmedia: implement video crop support in the ODP filterMiklos Vajna
And also import/export the video preview as well. The naming follows the style used for table shape previews. The preview is important, since the cropping is relative to the bitmap's preferred logic size. Change-Id: I6115284c1f4cf342b3296cd0ac3beb70a809fd1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138959 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-08-28cid#1500441 silence Resource leakCaolán McNamara
and cid#1500631 Resource leak cid#1500695 Resource leak Change-Id: Idf8aa7b44c6ba3aafcde7b7d3a3522224fe3f865 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138941 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-27cid#1500455 Dereference after null checkCaolán McNamara
Change-Id: I5cbc1d182821b88514077db5ff2c436f62372bef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138923 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-26cid#1500411 silence Resource leakCaolán McNamara
Change-Id: I42272620ed046af85f91ac1f5dfe524e7832e767 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138866 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-26tdf#149971 avmedia: implement video crop support in the gsteamer backendMiklos Vajna
If a media shape had cropping defined, we already took that into account when presenting a preview for it, but not during video playback. The reason for this is that the preview may be set by a file importer (e.g. PPTX) explicitly, in which case the preview is a bitmap we get without any video processing. As a start, implement video crop for the gstreamer backend (used on Linux), and also pass in the media item (containing crop and other properties) both during the edit view (MediaWindowImpl) and presenting (ViewMediaShape). We pass in the whole media item, so in case later other filters (e.g. black-and-white) are wanted, we have all that info in the backends already. Other backends (avmediaMacAVF and avmediawin) are untouched so far. svx/qa/unit/data/video-snapshot.pptx is modified to have a yellow border when cropping is unimplemented, which is now not visible with the gtreamer backend, matching PowerPoint behavior. PPTX export was working out of the box already. Change-Id: If26b7a4391bcffe9cbddd9933e1bab69be52924e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138867 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-08-26simplify SvxShape::Notify a littleNoel Grandin
(*) the logic at the bottom was very hard to read (*) by the time we hit the bottom of the method, we know pSdrObject cannot be nullptr Change-Id: I718d655f4e477bb3edaaa3f41412fb16c7336017 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138846 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-25regression in SvxShape::NotifyNoel Grandin
from commit 526f0fce45fb014b09057403ae37c125e5a18655 Author: Noel Grandin <noelgrandin@gmail.com> Date: Fri Apr 9 12:05:16 2021 +0200 tdf#130326 speed up opening XLSX which resulted in things staying alive too long, affecting an upcoming patch of mine Change-Id: I52a0b35c9be55a554885a39d9e0710379304766b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138811 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-25Related: tdf#149971 avmedia: add doc model and render for crop of media objectsMiklos Vajna
It is possible to provide an explicit preview of media objects since commit 8fa1d453c94cdbb03dac646fb8db2ebd1a0e84bd (Related: tdf#149971 svx: support explicitly provided snapshots for media shapes, 2022-08-24), however they can't be cropped. This means that media shapes from PPTX with cropping show unexpected content and can also have a buggy aspect ratio. Extend avmedia::MediaItem to store cropping and take it into account when returning the preview bitmap in SdrMediaObj::getSnapshot(). PPTX import works out of the box, as oox/ already tried to set a cropping property on the media shape. This is just the preview, the cropping of the video itself is not yet implemented. Change-Id: I8db3e0dcf252613d56eb0e6139adf097e53b15cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138808 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-08-24tdf#150577: Revert "Micro-optim in FormController::approveRowChange"Mike Kaganski
This reverts commit e005ab5d40d358adb75a64e140d46f4bf605647d. XColumn::wasNull is documented [1] to require a previous call to a get* method. The reverted change internally queried the *previous* column's wasNull. [1] https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1sdb_1_1XColumn.html#a0d482c20564f9119052b1962f830190e Change-Id: I3e988358764fa6935e8eb3e66340a0869c157d02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138550 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-24Related: tdf#149971 svx: support explicitly provided snapshots for media shapesMiklos Vajna
Snapshots / previews for media objects are used when the shape's video is not playing. This is generated by seeking to the 3rd second in the video, probably to avoid initial black frames. The trouble is that PowerPoint takes the initial frame (at least in case of the bugdoc), so our snapshot doesn't match the reference. We already import a bitmap snapshot from PPTX files since commit e2d46da076f43a7c0d56fc486b9f15339243f7c9 (avmedia: add doc model for bitmap fill of slide narrations, 2021-01-21), fix the problem by changing the snapshot generation to prefer this bitmap over generating one from the video. The crop properties of this bitmap / the video are still not yet handled from PPTX. Change-Id: Id985eaaaad5e4222d9a98203d054e08a0f97a0f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138763 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-08-24cid#1510131 Uninitialized scalar fieldCaolán McNamara
Change-Id: Iff08a3dbbfc7ac14606061c66c81519e780d846c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138761 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
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-24NFC related tdf#85592: simplify SID_ATTR_CHAR_COLOR_BACKGROUND_EXTJustin Luth
I am tring to replace Writer-only uno:BackColor with uno:CharBackColor. The problem is this template flag which gets calls in svx and then does nothing in editeng. But I don't see any reason why this call should be transformed into a template (_ext) call. We can easily just keep the same call and do the state-checking only slightly different. All this other stuff makes _EXT seem much more complicated than it is. If I am right that this is a Non-Functional-Change, then I am well on my way to fixing this bug report. Change-Id: Idc08117217837f217ea5ca390005802c2fad392b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138101 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2022-08-23tdf#148251 Use std::swap instead of using temporary valuesLiu Hao
Change-Id: Ibbc46bfb17d4d27dc40e63c65190b3f3a5f2d9c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138256 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2022-08-22I see this empty entry for the separator in the styles dropdownCaolán McNamara
Change-Id: I0c0787f893e50ea32b3dc7bf4356b4603d8f8cdd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138689 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-22tdf#87535: Preview styles using CTL/CJK fonts in the sidebarKhaled Hosny
Code is similar to code in svx/source/dialog/fntctrl.cxx and source/ui/chrdlg/drpcps.cxx, etc. Instead of using only the “western” font, it splits the text based on script type and uses the appropriate font for each script type. Change-Id: Iacdf92829d4568f2d580b39ca14ffe1218ceaa9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138600 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-22tdf#87535: Preview styles using CTL/CJK fonts in the styles menuKhaled Hosny
Code is similar to code in svx/source/styles/CommonStylePreviewRenderer.cxx, etc. Instead of using only the “western” font, it splits the text based on script type and uses the appropriate font for each script type. Change-Id: I1db87748119beac18e5b7e61617419c149400c27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138601 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-22lok: Dont render active text edit on slide previewsSzymon Kłos
- extend ITiledRenderable interface to pass active text edit drawing state to the SdXImpressDocument - when painting tiles - allow text edit only for current part - pass new setting also to SdrPaintView where painting happens Change-Id: Ib4ff226961a76129f4f5ff11c90694cd46a83a6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137676 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mert Tumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138648 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-08-20tdf#150502: crash after clicking between the horizontal and vertical rulersJulien Nabet
0 0x00007f22e3b294f7 in o3tl::cow_wrapper<ImplB2DPolygon, o3tl::UnsafeRefCountingPolicy>::make_unique() (this=0x7ffc2dcc7640) at include/o3tl/cow_wrapper.hxx:301 1 0x00007f22e3b2a305 in o3tl::cow_wrapper<ImplB2DPolygon, o3tl::UnsafeRefCountingPolicy>::operator*() (this=0x7ffc2dcc7640) at include/o3tl/cow_wrapper.hxx:329 2 0x00007f22e3b18fe5 in basegfx::B2DPolygon::clear() (this=0x7ffc2dcc7640) at basegfx/source/polygon/b2dpolygon.cxx:1433 3 0x00007f22eb42d882 in drawinglayer::primitive2d::OverlayCrosshairPrimitive::create2DDecomposition(drawinglayer::primitive2d::Primitive2DContainer&, drawinglayer::geometry::ViewInformation2D const&) const (this=0x55a582f57d40, rContainer=...) at svx/source/sdr/overlay/overlaytools.cxx:244 4 0x00007f22edae9e41 in drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const (this=0x55a582f57d40, rVisitor=..., rViewInformation=...) at drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx:36 5 0x00007f22e2da32a7 in drawinglayer::primitive2d::ViewportDependentPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const (this=0x55a582f57d40, rVisitor=..., rViewInformation=...) at drawinglayer/source/primitive2d/primitivetools2d.cxx:70 6 0x00007f22edae80c6 in drawinglayer::primitive2d::BasePrimitive2D::getB2DRange(drawinglayer::geometry::ViewInformation2D const&) const (this=0x55a582f57d40, rViewInformation=...) at drawinglayer/source/primitive2d/baseprimitive2d.cxx:73 full bt here: https://bugs.documentfoundation.org/attachment.cgi?id=181888 Regression from a447b5b6d1114111c92e5e3e3f3ae83d4c2f3bca Change-Id: Ide5c03124d11ffe02c0510318d2198f25ea645f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138564 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2022-08-19implement line arrangement valueset a11y getLocationOnScreenCaolán McNamara
directly rather than the default which iterates through the a11y parent to calculate it, which doesn't work when hosted in a gtk widget Change-Id: I90264a99c859a8b2a50daaf3befb016569b5a3ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138557 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.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-16cid#1500455 Dereference after null checkCaolán McNamara
Change-Id: I2ef903eaf4df4fbd225d01e394ba11ffa43386e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138346 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-16tdf#94223 always visualize surrounding frame for active text objectCaolán McNamara
Change-Id: I622582c188a32a5df27f3bb5d8382acc2afb089b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128025 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-16chart2: Data table rendering of keys (legend symbols)Tomaž Vajngerl
Change-Id: Iff13b188df18fe8f9919274869774f53f2ea323b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138299 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.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>