summaryrefslogtreecommitdiff
path: root/svx
AgeCommit message (Collapse)Author
2023-07-05tdf#138504 svx,etc.: decorative flag on SdrObject shapesMichael Stahl
* SdrObject new member m_IsDecorative * new Undo SdrUndoObjDecorative * surprising amount of changes in sw including additional SwUndoFlyDecorative * svx API SvxShape property "Decorative" * UI checkbox "Decorative" * ODF import/export as loext:decorative on style:graphic-properties * PDF/UA export: ViewObjectContcat tag shapes with this flag as Artifact Change-Id: I37f7a0597eab92c6c6aff94fad6c16c59b231c80 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154063 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-07-05Swap .uno:FontColor for .uno:ColorMaxim Monastirsky
Following tdf#105293, which left some UI elements unchanged. This also simplifies the sidebar, as .uno:Color is universal while .uno:FontColor works only with Writer text. It also benefits tdf#154270, as using the same command in the toolbar and the sidebar will keep their color in sync. Change-Id: Ia6e1ffef4012b6f8db4c9079d0b0c99a59887670 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154012 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2023-07-04tdf#154270 Sync toolbar button recent colorsMaxim Monastirsky
As the last used color is stored per button instance, these will go out of sync with several buttons being visible (e.g. a toolbar and a sidebar, or a toolbar overflow popup), and will reset whenever the toolbar resets (e.g. change in selection, switch from print preview, or customization). Fix that by storing the last colors per-document, and notifying other buttons on changes. Keep the last color also stored per-button for now, as a fallback for reportdesign (which isn't sfx2 based). Change-Id: I866f1de5c8ff6f56c47dc4b6b5acf52957d4e6c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153943 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2023-07-04loplugin:constantparamNoel Grandin
Change-Id: Iee554baae7239c9bf0ac35cab6ff235a88dc29a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153973 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-04tdf#153487 First color item needs mnId = 1Regina Henschel
The SvxColorValueSet for the other color palettes is build so that the first item gets value 1 in its mnId component. But for the new theme color palette it was 0. That results in the error, that the first color (top-left in the dialog) could not be selected. An Id of value 0 is handled as 'fail' in various places. Thus use starting mnId = 1 for theme color palette too. Change-Id: Ic0b63fee641d4424cabaf25a7f803acd734cbfa3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153860 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-07-04svx: PaletteManager - remove printfTomaž Vajngerl
Change-Id: I7d631352d423b6465d8bea4b09561f33d2ad98f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153936 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-07-03tdf#155630 Use common getPolygon for sdDr. David Alan Gilbert
Unfortunately the SetLineEnds in sw is different enough from sw and sc to make sharing it a pain. However we can share the GetPolygon function we already moved into svx. Expose the svx function into the header and use it in sd. Change-Id: I05b0f820286c8ce848fa0d6c69603d3625c2b4d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153828 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-07-03tdf#155630 Move sc's SetLineEnds into svxDr. David Alan Gilbert
SetLineEnds is duped in sc,sd and sw. Swing SetLineEnds into svx where we'll share it. Note: a) We also move it's helper function getPolygon b) sc, sd and sw use different values for the magic nWidth value so parameterise Change-Id: I6011b41d9db7b7fab364038227e1866fb9d64b02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153826 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-07-02pAttr is always dereferenced, use a reference instead of a pointerCaolán McNamara
Change-Id: I76ebce9085b9e47a6c571ddbcafa44d0d3a0f97f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153850 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-07-02loplugin:singlevalfieldsNoel Grandin
Change-Id: I091fac5ed41b2fb58dee5e3e1b8dd805c8dc4966 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153813 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-02Fix typoAndrea Gelmini
Change-Id: I0fd7f5aaa51e58ec88daad30f003bf5c853385b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153853 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-07-01cid#1532376 Big parameter passed by valueCaolán McNamara
Change-Id: I6e0717ce5b035c1a4f4ec3abbd23ae60c98c8181 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153851 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-06-30MCGR: tdf#155913 Non-supported attributes for TransparenceGradientArmin Le Grand (allotropia)
In ODF spec there is no - MID_GRADIENT_STARTINTENSITY - MID_GRADIENT_ENDINTENSITY - MID_GRADIENT_STEPCOUNT so these should not be used in the core data, too. The last one leads to this error. I experimentally added to hanle these 'harder' in the UNO API implementation, too, to reflect that these are not supported and produce UNO API access errors. This is not urgently necessary, but let's see if that triggers problems. That these attributes were initially supported is due to the Item hosting those values for transparency gradient is directly derived from gradient and the implementations usually use the fallback to call the parent implementation(s). Change-Id: I982c4047d82bfe306dbcef9d1b64b8d212bf8d59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153799 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-06-29Use getXWeak in svxMike Kaganski
Change-Id: I7e5c029a79b8437ae5f803df5ad20217c240d1d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150874 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-29loplugin:unusedfields make it a little smarterNoel Grandin
around dealing with operator[] on map data-types Change-Id: Idd6654948ae2d03d634fcf30a8d98530a78ab4ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153740 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-27loplugin:stringstatic look for more stringsNoel Grandin
that can be initialised at compile-time instead of runtime Change-Id: I08d516fdc13a3a79f93c079f89ac44cbc7a1ed71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153620 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-27lok: only publish MEDIA_SHAPE to selecting viewAshod Nakashian
We now publish the url for the media shape in the LOK_CALLBACK_GRAPHIC_SELECTION message. This has many advantages, most notably that it only sends the URL to the view selecting the media. Also, it is now easier to handle the message as there is no need for both a LOK_CALLBACK_GRAPHIC_SELECTION and a LOK_CALLBACK_MEDIA_SHAPE. However, the latter is still defined as we might still use it at some point. Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk> Change-Id: I8d4b8794d8e590628630f2b0bfbfb5debe02515f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146848 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153009 Reviewed-by: Pranam Lashkari <lpranam@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153369 Tested-by: Jenkins Reviewed-by: Aron Budea <aron.budea@collabora.com>
2023-06-26new loplugin:constexprliteralNoel Grandin
OUStringLiteral should be declared constexpr, to enforce that it is initialised at compile-time and not runtime. This seems to make a different at least on Visual Studio Change-Id: I1698f5fa22ddb480347c2f4d444530c2e0e88d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153499 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-26tdf#156050: Fix how misspelling line is calculated for RTL textKhaled Hosny
Partially revert: commit 74b6c5ea3c333de7c5e7ef8636732edadd9083f2 Author: Khaled Hosny <khaled@libreoffice.org> Date: Thu Jun 8 16:41:18 2023 +0300 tdf#151968: Fix vertical position of RTL spelling wavy line Instead of changing how fStart and fEnd are calculated, calculate them like before then swap them. This seems to be more reliable, and matches what we do in Writer. Change-Id: Ia15408881666a86151a12fcf016cc81c1568f7e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153572 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-06-25cid#1532451 silence Iterator container mismatchCaolán McNamara
Change-Id: I8560f3e5c7820fef8e27433321c97fc3a0b29746 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153552 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-06-24CID several. Use ctor 'from other' instead 'first..last'Regina Henschel
This covers CID#1532461, CID#1532462, CID#1532464, CID#1532467, CID#1532479. Now solutions without iterator are used. In all cases constructions like maColorStops = basegfx::BColorStops(rGradient.GetColorStops().begin(), rGradient.GetColorStops().end()); are replaced with solutions like maColorStops = rGradient.GetColorStops(); And instead of constructions like aColorStops.emplace_back(maColorStops.front().getStopOffset(), aStartBColor); aColorStops.insert(aColorStops.begin(), maColorStops.begin() + 1, maColorStops.end() - 1); aColorStops.emplace_back(maColorStops.back().getStopOffset(), aEndBColor); now it is like aColorStops = maColorStops; aColorStops.front() = basegfx::BColorStop(maColorStops.front().getStopOffset(), aStartBColor); aColorStops.back() = basegfx::BColorStop(maColorStops.back().getStopOffset(), aEndBColor); Change-Id: I66662d2286e7707b205c58977bc3f850b2a49dda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153555 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-06-23MCGR: Some exemplary multi-color gradientsHeiko Tietze
* "Rainbow, Sunrise, Sunset" added * "Preset, Spotted Grey, Teal To Blue" removed to keep items inside scrolled window Change-Id: I3be6c8596accc769df92a8610260ed38a6c29602 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153166 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-06-23tdf#155901 MCGR: preserve first and last gradient stop tooRegina Henschel
Error was, that only the in-between gradient stops were preserve. First stop was set with fixed offset 0, last stop with fixed offset 1. The offsets of first and last gradient stop of the original gradient were lost. Now in all cases (hopefully) the complete gradient stops vector is preserved and the original offset is used, if e.g. the user changes the color. For calculating transparence the indirect way over Color is removed. Instead percent is directly transformed to the 0..1 values of BColor. That avoids rounding errors. Change-Id: Icdf699a6c2e9c6289d2f77033858448e58396a60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153395 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2023-06-23fix crash in PaletteManager triggered by the color pickerTomaž Vajngerl
The code expects the SfxObjectShell::GetThemeColors() always returns a current set of theme colors, but then for some modules we return nullptr. Change-Id: I4096b75942d818965cedf43f35444faeb870cb74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153424 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-06-21Require icu-i18n >= 66Khaled Hosny
We were requiring ICU 4.6 which was released in 2011, and ifdef'ing our way through newer ICU versions. ICU is a core dependency and it makes no sense to build LibreOffice with such ancient versions of it. This change requires ICU 66 (released in 2020), and removes all the ifdefs for older versions. There are more cleanups to do, but these will be done separately. Change-Id: I2e4f7608a08f4d531b0a4c74bbfdf91a451f833f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153387 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-06-20tdf#155863 sd: fix resizing of cropped images to original sizeTibor Nagy
Resizing with the function "Original Size" (e.g. in the context menu) resulted distortion in case of cropped images, if the original image and its cropping have different aspect ratios. Now zoom the cropped image to the original resolution instead of stretching it to the same size. Change-Id: I5e59f8b48dc03844a739c3eb803e3195a12d9c6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153170 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2023-06-19tdf#150534 reduce the memory consumption of cells when calculatingNoel Grandin
borders - if there are a lot hidden columns, we end up allocating a lot of cells. Since most of the cells have the same settings, use a SfxItemPool to consolidate them. Change-Id: If2dd77b3eabc5d37eb8804953f8c89ffa04f2400 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153258 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-19svx: prefix members of EnhancedCustomShape2dMiklos Vajna
See tdf#94879 for motivation. Change-Id: I88eaa11f4eaca381a9cb95aa2f24b5a43c7ca80d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153246 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-06-16tdf#103064 sw,editeng: enable UNO API and ODF import/exportMaxim Monastirsky
Change-Id: Icf30e1f30fe6bf6a7d96d14b975954613cd68b70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153157 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2023-06-15speed up startup timeNoel Grandin
by avoid conversion of static locale data from sal_Unicode to OUString data - we can declare the data as OUStringConstExpr arrays and then no conversion is necessary. Here we trigger a problem - EditDLL has static data that tends to get torn down __after__ the i18npool shared library has been removed from memory, which means it tries to access OUStringLiteral objects that no longer exists. So use vcl::DeleteOnExit to explicitly clear that on application shutdown. Change-Id: Ie4bfcef7eb4656316ea825474ac42f85844d1dcc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153060 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-11use internal iterator for SfxBroadcasterNoel Grandin
So we can avoid exposing the internal listener vector. (which allows further optimisations) Change-Id: If288141a37314dcc01d203029dc51c71ec2b7f54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152857 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-10tdf#151968: Fix vertical position of RTL spelling wavy lineKhaled Hosny
Second try. This time making sure start > end even for RTL text. This also now works for horizontal, vertical and rotated Arabic text, in Writer and Edit Engine. Change-Id: I6fe1e9dbb9c071287054200a58d4ddddee073311 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152743 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-06-09Related: cool#6511 hold json preview cache longerCaolán McNamara
due to oddities related to tdf155720 the notebookbar the cache is hooked to can be torn down and replaced if the 1st session is interacted with while multiple other users join. So count goes to 0 just at the wrong time to trigger throwing away the cache and forcing regeneration. An Idle doesn't suffice here. https: //github.com/CollaboraOnline/online/issues/6511 Change-Id: I148c99115fc497e34bf8920b6f59adc47605b8a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152720 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-06-09fix wrong transform type, error handling when JSON parsingTomaž Vajngerl
also fix theme export - change scheme enum type name "hlink" to "hyperlink" and "folHlink" to "followedHyperlink" Change-Id: Id5435d59cd51352efc4a4a8e333ec1ff45847a6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152782 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-06-09MCGR: tdf#155479 repair gradient SVG export for MCGRArmin Le Grand (allotropia)
Unfortunately SVG export is based on metafiles and thus there is (in principle) no way to get the BGradient/ColorStop/MCGR data transfered as needed. For that, using UNO API to read the model or using B2DPrimitives would help - as is better for the export respectively. Since there is not the time to re-design SVG export I added this 'compromize' as a fix. It gets the needed data transported over the metafile (that part is the compromize). It then exports the MCGR data to SVG (at least - as was already there - if it's a linear/axial gradient). This happens now with all Gradient Stops when there is a MCGR gradient. That part is/will hopefully be re-usable if SVG export gets redesigned. I also added a handling for StepCount feature, so when used (in LO, others do not have that) 'hard' color stops get generated to make the gradient look identical for SVG export. Had to make adding of that extra-information in metafiles dependent on exporting really to SVG. There are 51 cases which use 'MetaActionType::COMMENT' which would potentially have to be adapted. Also added code to solve the problem for TransparencePrimitive2D at VclMetafileProcessor2D::processTransparencePrimitive2D. This will now - also only for SVG export - directly create the needed MetaFloatTransparentAction and add additional MCGR information. This will be used on SVG export to write a 'Mask' as was done before. This is now capable of creating fill MCGR-Masks in the sense that any number of TransparencyStops will be supported. Change-Id: Ic6d022714eae96b8fbc09e60652851ac5799b757 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152623 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-06-08lok: send theme palette after the change in ThemeDialogTomaž Vajngerl
For some reason the SdrPage is constructed in Online after every change (cursor, selection) so can't use that to send theme change callback. Instead of that send it after the theme is changed with the ThemeDialog. in addition this requires that we transport model::ColorSet in a shared_ptr more, to prevent doing constant copies. This requires that the IThemeColorChanger interface is changed and the signature of apply() method. Change-Id: Iac951fce57a8e9dff467bd27b2f9c64ec65ea30c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152635 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 6c40e4d1796bcb6418dcb5ec17f46f576c171796) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152728 Tested-by: Jenkins
2023-06-08svx: add "Color" and "ComplexColorJSON" argument for XColorItemTomaž Vajngerl
This is needed now that the color picker expects this argument to be present. Without the "ComplexColorJSON" argument, it is not possible for the color picker to set any ComplexColor attributes, which is needed for theme support. Change-Id: I0a04ea57826afb9f17a54ce24a4cbcc88dfe1481 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152727 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-06-08tdf#155505 Improve display of individual entriesSamuel Mehrbrodt
* Remove "Go to" button and link the issue text directly * Improve layout a bit Change-Id: I3b0dbe7fa5ee0f2fcaeddbf12533ba9169171a57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152621 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-06-08tdf#155404 handle ComplexColor as JSON for XLineColor and XFillColorTomaž Vajngerl
This adds support for MID_COMPLEX_COLOR_JSON attribute for XLineColorItem and XFillColorItem, which makes it possible to set a theme colors from the UI also for fills and lines. In addition this resolved the issue tdf#155404 which had the effect that unsupported "Color" attribute for the UNO call resulted that the dialog was opened. This is now not the case anymore as the "Color" argument for XLineColorItem and XFillColorItem was added in addition to "ComplexColorJSON" argument. Change-Id: I8876942b07aba453cbe1422b76a1608c78e42109 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152713 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-06-07tdf#155376 partially convert SvCTLOptions to officecfgNoel Grandin
When accessibility is enabled, Calc will add tens of thousands of listeners. We then spend a significant chunk of time creating SvCTLOptions objects (attached to ImpEditEngine) and adding and removing those objects from the related listener lists. But the required information is already globally cached by the officecfg module, so we can avoid that overhead and just fetch it directly from officecfg. Change-Id: I7ff55fd7c4926866eb7086812275ba8bd6e84c75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152645 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-06perf: we don't need to 'really' insert a preview when providing jsonCaolán McNamara
if we have intercepting 'image' when generating the json, then we don't need to really insert the image into the server side TreeView at all, we just need to provide it in the client json payload. so we generate each bitmap once, and its base64 png representation once. Change-Id: I1b6916b036a0b84ef4346ebf2141240c4ae5b706 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152675 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-06-06convert SvtAccessibilityOptions to officecfg where possibleNoel Grandin
Change-Id: Ia530086fe35e64379e55135d392020304b466325 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152649 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-06perf: cache the generated json for an iconview imageCaolán McNamara
before: |--13.95%--JSDialogNotifyIdle::Invoke | | | |--13.01%--JSDialogNotifyIdle::generateWidgetUpdate | | | | | |--11.03%--IconView::DumpAsPropertyTree | | | lcl_DumpEntryAndSiblings (inlined) | | | | | | | |--10.94%--extractPngString (inlined) after: |--4.86%--JSDialogNotifyIdle::Invoke ... | |--2.90%--JSDialogNotifyIdle::generateWidgetUpdate | | | | | |--0.76%--IconView::DumpAsPropertyTree | | | IconView::DumpEntryAndSiblings | | | Link<std::tuple<tools::JsonWriter&, rtl::OUString const&, std::basic_string_view<char, std::char_traits<char> > > const&, bool>::Call (inlined) | | | StylesPreviewWindow_Base::DoJsonProperty | | | | | | | |--0.55%--StylesPreviewWindow_Base::GetCachedPreviewJson Change-Id: Id234a84e36710794822945584be3adf028808625 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152630 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-06-06Language list: sort generic language before country variantsMike Kaganski
In Edit Modules dialog, the language list may include entries added by LanguageTool, and among them are generic language-only entries like "Spanish {es}", stanfing for simple language tags like "es". These languages should go before country variants like "Spanish (Argentina)", but since "{" is sorted after "(", the order is the opposite. This change fixes this. Since other lists do not include generic language-only languages (filtered out by lcl_isPrerequisite and its requireSublang argument), this does not apply to them, but the code will execute nevertheless; hope that this UI-only performance hit will not be noticeable. Change-Id: I97adc1ae8feb4c8a94b567b33363d63d899cabaa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152676 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-06Drop the unneeded optimization for "[All]"Mike Kaganski
It will only be used *at most* once, but often will not be used at all. Change-Id: I13b0e9ab8a4918c56a7e710c80d6d9d36019c605 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152644 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-06Sort languages in Edit Modules dialogMike Kaganski
After commit e855481ead996a3b8270fae91bd23d6c8d75ef25, these languages are already ordered according to css::lang::Locale sorting implemented there; but this ordering does not follow the UI language sorting rules. TODO: put language without country/variant before respective languages having country/variant. Change-Id: Ic98b50ef4a500c799110611f7c35c74b4a239ed4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152641 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-06SvxLanguageBox::Store id from getReplacementForObsoleteLanguageMike Kaganski
... not the original id passed to the function. Theese corrected ids are used e.g. in set_active_id. Change-Id: I9967d52ed2362ace947ea21f526c4c0694f14476 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152640 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-05Drop unneeded indirectionMike Kaganski
Change-Id: Ie837aec7e2b4b87665cc98200d38329ec2155c56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152614 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-05Drop duplicating functionMike Kaganski
Change-Id: I15f6aea604f5bc05ae8e2e13c1e79003512b707f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152613 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-05Restructure SvxLanguageBox::SetLanguageList for clarityMike Kaganski
And extract sorting and removing duplicates to a separate function. Change-Id: I57ed8d3960eefb8df8128cdb461a0621ed998bbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152612 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>