summaryrefslogtreecommitdiff
path: root/svx
AgeCommit message (Collapse)Author
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>
2022-08-14ofz#49750 TimeoutCaolán McNamara
skip slow path on fuzzing Change-Id: Idc27574ed7607011491248e726c1ba4bce9d483b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138253 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-12loplugin:unusedfieldsNoel Grandin
Change-Id: I8d15b380cd02237f688b8946530e1f024b698e90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138195 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-12Fix typoAndrea Gelmini
Change-Id: Iac8427094a4ec64826b712e0f79e5b24a3ea696a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138177 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-08-11lok: Simplify context change notificationMike Kaganski
Change-Id: I3ead4deb5bdfe638bc49e05bfba0d8c630687958 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138141 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-11some --disable-pdfium fixesCaolán McNamara
Change-Id: I33867397cd5783adb90e9dc2c62b037ced131e26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138081 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-10loplugin:passstuffbyrefNoel Grandin
Change-Id: Ib2b2650da7abc9260897f9b5aad619a0ea6ae941 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138052 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-09tdf#124076: fix preview for horizontal alignment of object in frame borderJulien Nabet
...has left and right image exchanged Change-Id: Idea8fc05ab70133e6c0576a6def0610e94d1580e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137903 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-08gtk4: set draw-as-radio explicitly onCaolán McNamara
Change-Id: I546abe771a6c6d1029258ac702713e34353b8e00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137992 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-08resave with latest gladeCaolán McNamara
Change-Id: I0c217736e9c4a0eea5315f32a1562d76a6ce84f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137991 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.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-07tdf#150293: setPropertyValue(WID_TXTCOL_LINE_WIDTH) takes mm100Mike Kaganski
Before commit 95ebd24a629b4c8cd62cc20c0701683512cc8fa0 Author Mike Kaganski <mike.kaganski@collabora.com> Date Thu May 27 13:00:10 2021 +0300 editengine-columns: ODF support [API CHANGE] SwXTextColumns crtor took SwFormatCol, and stored line width in the same units as in SwFormatCol - in twips; conversion to mm100 only happened at export stage in SwXTextColumns::getPropertyValue. The mentioned commit changed to SvxXTextColumns::setPropertyValue, passing the line width from SwFormatCol also without any conversion; but SvxXTextColumns::setPropertyValue expects mm100, so the result was wrong. So perform the proper conversion at SwFormatCol::QueryValue and SwFormatCol::PutValue, and also store the line width in mm100 in SvxXTextColumns, to avoid useless extra conversion. Change-Id: Idfd62a7563f9d3aa5947c1149572a8b8b696b179 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137931 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-05Resolves tdf#114508: Individual selection in recovery dialogHeiko Tietze
Based on work by Danie Truter at I397119a6e50c256e87e3a484a6c17a252f191981 Change-Id: I75fd321cbfeb7a92bd14e94b0c1ae0bb25be73cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136845 Tested-by: Jenkins Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-04resave with latest gladeCaolán McNamara
Change-Id: I0e9c4955d7d0c6127448913176f9ef24269c8989 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137797 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-02tdf#150034 very slow opening pathological chartNoel Grandin
revert part of commit 10c934147d469965dba6abc78efd02759a010b8e Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Tue Apr 23 09:26:46 2019 +0200 tdf#113266 slow opening XLS with 45 MB drawing in this situation, avoiding setting all the rects dirty speeds up the load from 70s to 1s. Change-Id: Ia35119ff20ef5bded9a34f12cce453434dea4383 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137688 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-01Fix typo in codeAndrea Gelmini
It passed "make check" on my laptop Change-Id: I2d231c3a8ec40b63026a4b81256b98ee4be0ae1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137660 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-08-01tdf#150064 Keep a11y child order intactMichael Weghorn
commit 8f9fd6806ccfbf381a383efe5d143ead86ee49de Date: Wed Jun 29 19:47:20 2022 +0200 tdf#137544 reduce cost of ChildrenManagerImpl::Update had added sorting based on memory addresses of the corresponding shapes, but the order of the children in `maVisibleChildren` is expected to reflect the order of the accessible children (i.e. based on the child index of the corresponding shapes' a11y objects), since items are accessed by index (s. e.g. `ChildrenManagerImpl::GetChild`). Since the `ChildDescriptor`'s `mxAccessibleShape` reference can be empty, its child index also cannot be used for sorting instead. To prevent the a11y tree from becoming unstable/random, don't reorder/sort `maVisibleChildren`, but allocate a helper vector holding pointers to the items in the real vector, and iterate over that one instead. This also moves identification of the elements that are only in the old, but no longer the new vector to `ChildrenManagerImpl::MergeAccessibilityInformation`, where the sorted vector is availabe, and returns a vector of obsolete children that is then passed to `ChildrenManagerImpl::RemoveNonVisibleChildren`, instead of doing the comparison of the old/new vector there. Change-Id: Ie449f76f1b98ffe8e85ca28e938b11d726086721 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137622 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Colomban Wendling <cwendling@hypra.fr> Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-08-01tdf#150064 a11y: Swap old/new list before merging informationMichael Weghorn
Swap the old and new list before merging information from the old list to the new one, not afterwards. This also moves this into the block guarded by the SolarMutexGuard, which seems to be held primarily due to changes to `maVisibleChildren` going on, which may already be happening in `ChildrenManagerImpl::MergeAccessibilityInformation` since the elements in the vector can be reordered since commit 8f9fd6806ccfbf381a383efe5d143ead86ee49de Date: Wed Jun 29 19:47:20 2022 +0200 tdf#137544 reduce cost of ChildrenManagerImpl::Update This change is primarily in preparation of adapting what list(s) get sorted/reordered in `ChildrenManagerImpl::MergeAccessibilityInformation` in follow-up commit Ie449f76f1b98ffe8e85ca28e938b11d726086721, "tdf#150064 Keep a11y child order intact". Change-Id: I88bd27b6cbca1e7a03702fd7e75f4094bdb5f977 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137621 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-07-29svx: manipulate SdrObject::m_aOutRect indirectlyTomaž Vajngerl
Change-Id: I0d8a8e4df06595250c07a61181fbd76fe1da5662 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137571 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-29svx: remove using namespace and unneeded "css::" ns declarationsTomaž Vajngerl
Change-Id: If2eb5f61798e4efbcc845957fc1345b1560bcbe6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137570 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-27tdf#119840 elide some dynamic_castNoel Grandin
Change-Id: Iafaedf26231bac142759d2bf667dfba083cf0122 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137503 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-27tdf#108560 horribly slow to paste many lines into editeng with a11y activeCaolán McNamara
looks to me that once the bound rect (and visible children) are synced that they won't change again so continued recalculation of bounds doesn't achieve anything except super expensive calc for no effect. Change-Id: I1684e3724bca28d03f7c255c2d7a40eee1b70eae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137497 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-07-25loplugin:moveitNoel Grandin
make the plugin more conservative, so we see less false+ (although we also miss some possibilities in the process) Change-Id: I91b1806271e7f802d7459834ab7bcc569047da3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137342 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-25use more o3tl::spanNoel Grandin
which means we can reserve precisely the right number of entries when building maps Change-Id: I580414699289369de4730caae09829bbd8759e82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137292 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-21Remove duplicated includeAndrea Gelmini
Change-Id: I78af6fe3599bfcd7ce2c167936589e48f68608c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137297 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-07-21tdf#123983 fix loading graphic that is in root folder + testTomaž Vajngerl
We need to detect that the storage name is empty, so in that case the root storage needs to be set as the current storage. Change-Id: Ibe3287ccf1f1513a3531dcf4d540a456cca8dfb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137276 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-21clang-tidy modernize-pass-by-value in svxNoel Grandin
Change-Id: Iedd87d321f4d161574df87629fdd6c7714ff31c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137248 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-20ofz#49200 TimeoutCaolán McNamara
disable slow path for fuzzing Change-Id: Ic23d7ba56210915b53b4330edb44458a672ba4ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137255 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-07-20tdf#92610 Fix missing/conflicting accelerators on Header/Footer tab pageGabor Kelemen
Change-Id: I54099745b1246b474d2f389b7c87abb18d944cab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137241 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-07-20tdf#127236 vcl: fix missing encryption of PDF images during exportMiklos Vajna
Regression from commit 78e25558e86188314b9b72048b8ddca18697cb86 (tdf#106059 PDF export: create a reference XObject for JPG images with PDF data, 2017-02-23), once a PDF image was inserted to a document, an encrypted PDF export lost those images. The reason for this is that we started to preserve PDF images as vector data with the above commit, but this means we copied over PDF objects from PDF images to the export result as-is, so encryption was not performed for them. Fix this by separating the write of the PDF object headers, stream content and object footer and then calling checkAndEnableStreamEncryption() / disableStreamEncryption() for each object, even if it's not something our PDF export created but comes from a PDF image. Note that when existing PDF files are signed, PDF objects are also copied into a vcl::filter::PDFDocument, but such PDF images are never encrypted, so it's fine to have stub implementations in vcl::filter::PDFDocument. Change-Id: I2f74b9f51cd35b4319221532ca890e197bab9cf3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137242 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-07-20move wintypes.hxx from tools to vclChris Sherlock
Change-Id: Ief9949fd4252de9e33df172af07aa7ed097b5520 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136560 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-15tdf#119840 elide some dynamic_cast costNoel Grandin
when opening a large writer file, shaves off about 5% off load time Change-Id: I501d0ebfbaec572e7c93c1dbc3f0cfaab3938f20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137099 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-15Fix typo "vetor"->"vector"Andrea Gelmini
Change-Id: Ie706797e1bda4d1cd279fa68e93fb15beabb6a2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137077 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-07-14elide some temporary OUStringsNoel Grandin
Change-Id: I8539dd5d9490a14ebac0520486a8322ff86a6cb6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137081 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-13basegfx: zoomIn() and zoomOut() should be sal_uInt16Chris Sherlock
All zoom functions use sal_uInt16 values. For some reason, basegfx used long when zoomIn and zoomOut were created in 2012 (see commit 315d2ddc16: "optimized zoom to use more common intervals"), this then got mass converted to tools::Long in commit 387a88fa25: "use tools::Long in basegfx..chart2". So fix is to change zoomIn/Out() to use sal_uInt16. Change-Id: I2a56d6f58e14f77aeb8741d332fe9bc282eb969f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135715 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
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-05lok: fix regression "WeldEditView::DoPaint" for dialog tunnelingHenry Castro
Change-Id: I1cb345b3911d03dc90acef2a17705d654a06deb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128622 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136830 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2022-07-05tdf#137544 reduce unnecessary broadcasting when creating shapeNoel Grandin
we have just created the shape, so no need to do the expensive broadcast Change-Id: I3500f0fd007aa531a63f894aaf21372d602f8dbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136820 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-05tdf#117646: Clone Formatting not working for connector linesJulien Nabet
Change-Id: Idf62afeae3fa32708673a6b68da2d9e0ccbd5249 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136815 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-07-04tdf#137544 avoid some dynamic_cast costNoel Grandin
Change-Id: Ib60369eabb2ce5e9cde2dce80137b786130c0eec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136804 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-03tdf#149822: Clone Formatting does not apply glow effectsJulien Nabet
and since we're here, let's add too the soft edge radius. Change-Id: I84f84c0f57b0cf59f6e681ada7682b152eb209f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136787 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-07-03tdf#139469 Fontwork dialog for text to curve alignmentOlivier Hallot
Improve terms used in the dockingfontwork.ui dialog The dialog has no widget labels, only tooltips and extended tips. Help part follows. Change-Id: I010b545bccac5a14e11265c05151e7934c6089ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136519 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2022-07-03tdf#130252: Impress: Clone formatting not cloning highlight colorJulien Nabet
See https://bugs.documentfoundation.org/show_bug.cgi?id=130252#c5 for full analysis Change-Id: Ie87663c716a6ed31f753e0db5519436f6947aad4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136785 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-01tdf#137544 ReformatAllEdgeObjects use recursionNoel Grandin
rather than SdrObjListIter, which wants to build a vector of all the child objects, of which there are a great many Change-Id: If6a4213b94e2ef2133100e406fb435b82944ac18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136719 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-30tdf#137544 elide some UNO_QUERYNoel Grandin
Change-Id: I58b5a800d2f24168c9d1c109769344a00dea8e1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136658 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-30tdf#137544 reduce cost of ChildrenManagerImpl::UpdateNoel Grandin
there are 2 O(n^2) algorithms here, reduce them to O(n log n) by pre-sorting Change-Id: Ib3912155cda62cac95b5037528e23ef3c686a7e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136655 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>