summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls
AgeCommit message (Collapse)AuthorFilesLines
2024-08-14use less exception throwing for flow controlNoel Grandin2-8/+12
Change-Id: Ib376a1bcb75e72d6e5754818a353b0d9c7dbd26d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171851 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-08-14Related tdf#135561: read ase palette with Lab colormodelJulien Nabet1-7/+102
I took example on colorConversions.js from avisek, see https://gist.github.com/avisek/eadfbe7a7a169b1001a2d3affc21052e 2 steps: convert Lab to XYZ, then XYZ to RGB credit Avisek Das and István Ujj-Mészáros Change-Id: I3a80259b6de1aca7fe3c308d9024e9b9f2a5a425 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171729 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2024-07-25O[U]String overloads that return view for rest parameterNoel Grandin1-1/+1
Add new overloads to OUString methods that have a "OUString* rest" style parameter. Instead return a view, which does not require allocation. To avoid overload ambiguity, split the methods into different variants that do not use default parameters. Change-Id: I1aa366115750f1f7ea4fe665804195f59f7c4b69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167632 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-07-23tdf#162104 Make sure the standard palette gets selected in a clear profileRafael Lima1-1/+9
Commit [1] introduced localization of color palette names. However, the name defined in Common.xcs is not localized, so we need to make sure that the standard palette gets selected on a clear profile. [1] 5e45351c52584fb116d2cc54da969734e5effab9 Change-Id: I2f03b3ab4bdbb77327388a754e1fc6f9d7413ba7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170732 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2024-07-16Resolves tdf#105000 - Make shipped palette names translatableHeiko Tietze1-0/+19
Change-Id: Ifd062cf25c6e930da56571e01c21bd9d2ddf6ddd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170394 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Jenkins
2024-07-15cid#1607327 COPY_INSTEAD_OF_MOVECaolán McNamara1-9/+9
and cid#1554706 COPY_INSTEAD_OF_MOVE cid#1554733 COPY_INSTEAD_OF_MOVE cid#1554736 COPY_INSTEAD_OF_MOVE cid#1554738 COPY_INSTEAD_OF_MOVE cid#1554740 COPY_INSTEAD_OF_MOVE Change-Id: I766cff4ef8eb4256d26f51d7d9dc64442c4bc728 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170453 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-07-09Resolves tdf#161568 - Feedback for QFS in floating modeHeiko Tietze1-0/+5
As band-aid for the lack of proper toolbar resizing, feedback is given via entry message type Change-Id: Ic2b2a2aff93040f558775d63c18c21370fabcb39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170167 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2024-07-09jsdialog: support on demand rendering for icon viewSzymon Kłos1-9/+5
- rename action: rendered_combobox_entry -> rendered_entry - change generic get json property callback to more specialized image getter as it wasn't used anywhere apart of that and we need image enceded as base64 only not JSON - add to the full update of icon view "ondemand" property to the entries with images so LOK client will know it has to download the render - it will be possible to support HiDPI renders in the future: added TODO Signed-off-by: Szymon Kłos <szymon.klos@collabora.com> Change-Id: I83a6e91133f8f9cb03e0bc794b51e1947435fa90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169622 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170160 Tested-by: Jenkins
2024-07-02cid#1554879 Use of auto that causes a copyCaolán McNamara1-3/+3
Change-Id: I5989905a2efeff23cf803832a5d65857c64b036e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169854 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-06-29Simplify some uses of convertTwipToMm100Mike Kaganski1-4/+1
Change-Id: I073ac7358c1bcb82992ec7746f4b3986d6d35633 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169755 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-06-28Resolves tdf#115665 Format in the CTRL+H search affectsJim Raykowski1-1/+2
the CTRL+F search Change-Id: I51ccd2186c47a91958c262efac9a1514b9c3b138 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169606 Reviewed-by: Jim Raykowski <raykowj@gmail.com> Tested-by: Jenkins
2024-06-20tdf#146468: Match border tooltips in toolbar/sidebarKira Tubo1-4/+4
Update the border tooltips within Calc's toolbar and sidebar so that they have matching descriptions. Also update tooltips in Writer toolbar so that descriptions match across both apps. Change-Id: Ib7c682ed5035fe61d991209c4f2cf7f0a1a08a5e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169052 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Stéphane Guillou <stephane.guillou@libreoffice.org>
2024-06-18loplugin:ostr in variousNoel Grandin1-1/+1
Change-Id: I7aa8ed716998a185996482dc561219b398a1c919 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169080 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-29GetDescriptionOfMarkedObjects() -> GetMarkedObjectList().GetMarkDescription()Xisco Fauli1-1/+1
In order to reduce number of calls to GetMarkedObjectList() later on Change-Id: I2a2c87c2552cfc9002a9afc7d8eefb16a601b784 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168216 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-05-16tdf#161056 Show bullets used in document in bullets dropdownSamuel Mehrbrodt1-6/+94
Change-Id: I40cfc39501006146f7c6c04a1f3c7cf877c6f1c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167186 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2024-05-13createFromAscii -> OUString literals in StylesPreviewToolBoxControlNoel Grandin1-5/+6
Change-Id: Ica3c79facee725effcfb160738305c599c5de1ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167575 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-05-12replace createFromAscii with OUString literals in SvxStyleToolBoxControlNoel Grandin1-11/+10
Change-Id: Ibdf5f7b0100cafbecc263a038b2234012da10fff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167543 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-11loplugin:ostr in svxNoel Grandin23-329/+330
Change-Id: Ia765a03e033acb82e367873380d289587ea87d6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167449 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-05-03replace createFromAscii with OUString literals in svxNoel Grandin1-7/+7
Change-Id: I9bb7884048f3cc7ef795f7a79dc566fc8fe77e7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167063 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-05-02WaE: C6011 Dereferencing NULL pointer warningsCaolán McNamara5-13/+15
Change-Id: I8edb1fefe1b2b8a3db3ee8f3a0eed59c7f08a36e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166863 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-04-03tdf#146619 Drop unused 'using namespace' in: svx/Gabor Kelemen7-13/+0
Change-Id: Ic8b925a3ec55166a9d5da05827d2cb335943b665 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165542 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-03-21ITEM: Remove InvalidateAllItems()Armin Le Grand (allotropia)1-1/+1
I checked if this is used, but it can be replaced using Clear() -> all. This prevents that the whole array of Items in an ItemSet gets set to INVALID_POOL_ITEM. I also checked if INVALID_POOL_ITEM/IsInvalidItem is needed at all representing SfxItemState::DONTCARE but it is and still will need to be set for individual Items. At last checked if SfxItemState::UNKNOWN and ::DISABLED really need to be separate states, but indeed there are some rare cases that need that. To make things more consistent I also renamed SfxItemState::DONTCARE to SfxItemState::INVALID to better match Set/IsInvalid calls at ItemSet. The build showed a missing UT and led to a problem due to the hand-made ItemSet-like SearchAttrItemList. The state 'invalid' seems to be used as 'unused' marker. It should be changed to use SfxPoolItemHolder and not need that. For now, set by using an own loop to set to that state. Change-Id: Ifc51aad60570569a1e37d3084a5e307eed47d06c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165035 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-03-11Document Colors do not show any color in the PaletteCaolán McNamara1-2/+1
same is true for "Theme Colors", a problem since: commit 4ccc2f0e3f45c9d78f74b1848851bedf71f7382d Date: Fri Mar 1 22:11:14 2024 +0200 cool#8327 use tools::JsonWriter for theme colors Change-Id: Ibaab5df197bd8005037e066181e8a50bdda5ceda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164658 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164669 Tested-by: Jenkins
2024-03-10tdf#90242 Navigator: Improve custom shape namingJim Raykowski1-2/+22
This patch makes the Draw/Impress Navigator display the name retrieved by SdrCustomShapeGeometryItem::GetPropertyValueByName("Type") for custom shape objects when the custom shape is unnamed and the Navigator is set to show all objects. For Writer and Calc, this patch makes inserted fontwork custom shape objects be automatically named 'Fontwork N'. Change-Id: Ice34461fe7a4b26d01b2d93e871a956dc55392f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152568 Tested-by: Jenkins Reviewed-by: Stéphane Guillou <stephane.guillou@libreoffice.org> Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2024-03-07tdf#158773 reduce dynamic_cast'ing in CustomShapeProperties::NotifyNoel Grandin1-1/+2
shaves 2% off the load time Change-Id: I579825bd6101b57a44b0f3118ede17ec2393d9d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164477 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-04cool#8327 use tools::JsonWriter for theme colorsNoel Grandin1-12/+8
Change-Id: Iebca3781910f9e28100258da8266d51f673f31d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164232 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-02-29svx: fix default locale language stringHenry Castro1-4/+9
1) Open a spreadsheet 2) Format a cell with a currency. Example USD $ English (USA) 3) Open the sidebar if it's not opened already 4) Click in the currency dropdown 5) Observe: there is $ (Default) Expected result: USD $ English (USA) Default Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: Idf7f4174557e59cb6f5ffd65c25572322a5794ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164123 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-26Set button label directly in ui fileSamuel Mehrbrodt1-2/+0
Change-Id: If9e22982f4f7c276d19167ff365e1b4e290e3de7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163748 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2024-02-18ITEM: Rename for more control over SlotID usagesArmin Le Grand (allotropia)2-2/+2
Change-Id: I51585f1c15984a066262023184f668662853d20f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163556 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-02-12ITEM: ItemPool Rework (I)Armin Le Grand (allotropia)1-1/+0
Driving forward the Item reworks I now take the ItemPool in focus: It now does not hold any items anymore and should be renamed to something like ItemInfoProvider/ItemHelper, since it's main purpose is to provide the Defaults for the Item functionality. There is that SfxItemInfo, only a struct and bundling SlotID and ItemFlags. There are also the DefaultItems, just handled as ptrs in an array. It is/was always error-prone to keep these in sync. Remember that it's also necessary for the order to not only being sorted but being increments of one with no gaps allowed in the WhichIDs to which the Items are bound. I now bundled that to a new class ItemInfo that joins WhichID, SlotID, ItemFlags and the default Item. This is a pure virtual base class, it comes in three derivations: (1) ItemInfoStatic: This is supposed to be global static and hosts the Item in a std::unique_ptr to ensure cleanup. It is designed to be constructed once during runtime and being shared globally. It allows the ItemPtr to be nullptr to mark as non-static (if initial static is not possible for some reason) but still offers the needed data. Most cases (95%+) are of that case. The contained Item is owned by that instance. The flag isStaticDefault() is set at the Item. (2) ItemInfoDynamic: This is supposed to be used for cases where the Item cannot be static: Mainly for SfxSetItem (that needs a Pool itself in the contained SfxItemSet, so lifetime is bound to that Pool), but other cases showed up in the transition. These instances live while the Pool lives and get destructed when the Pool goes down. Also uses std::unique_ptr for the Item instance for as much automated cleanup as possible, the contained Item is owned by that instance, the instance by the Pool. The flag isDynamicDefault() is set at the Item. (3) ItemInfoUser: This is used for UserDefaults that can be set for every ItemInfo entry to 'overshadow' the default from the 'outside'. It uses a regular Item and the central access methods implCreateItemEntry/ implCleanupItemEntry to manage the Item instance, thus works like a SfxPoolItemHolder. The Item instance can be globally shared and re-used even when the Pool goes down. Instances belong to the Pool and are cleaned up when the Pool goes down. This Item does not need any further flag to be set. The ItemInfos are organized using a class called ItemInfoPackage: This bundles groups of ItemInfoStatic to functional instances. There are derivations/ implementations of this e.g. for Writer ItemPool bundling all the needed defaults for Writer, similar for draw/impress, Calc and other usages. These ItemInfoPackage can be 'registered' at an ItemPool using it's method registerItemInfoPackage. This does all the needed stuff to setup that group of ItemInfos at the Pool (It even sets internal vars First/LastWhich, that info can just be derived from the buildup ItemInfo Ptrs). The ItemInfoPackage has methods 'size()' and 'getItemInfo(index) to allow looping over it and deliver the infos the Pool needs. The (forced, pure virtual) overloads of getItemInfo in the specific implementations check for the ItemPtr being nullptr and create a exclusive incarnation of ItemInfoDynamic for the Pool if needed, returning that. The Pool owns the ItemInfoDynamic incarnations and uses the ItemInfoStatic directly. On shutdown it cleans up the ItemInfoDynamic as needed. The ItemInfoUser is used by the Pool when a UserDefault is set/used: for SetUserDefaultItem, GetUserDefaultItem, ResetUserDefaultItem. It is not held in a 2nd list, but directly in the list of ItemInfo'ptrs: To keep track of this an unordered_map is used that helds the original ItemInfo associated with the WhichID. That way no two lookups (as before) are needed to get the current Pool's default for any WhichID. The derivations of ItemInfoPackage are encapsulated and just allow access to an ItemInfoPackage& with a single method as return value. All use a static local instance of a std::array<ItemInfoStatic, FIXED_SIZE> which constructs all ItemInfoStatic and the static Item instances - if already possible. Sometimes it is necessary to overload the constructor to set some static instances for Items later than the lib init. These are also just marked with nullptr as Item instance. Some need to overload getItemInfo to complete instances of ItemInfoStatic, if needed, or create and deliver instances of ItemInfoDynamic. The registerItemInfoPackage also offers a optional lambda callback: there were two cases where local data from the Pool was needed to incarnate the item - just add that to the call to registerItemInfoPackage if needed, see examples in the adapted code. For the re-use of Items this means that now in SfxItemSet/SfxPoolItemHolder *true* static Items can and will be used without RefCount directly and globally. This is also the case for dynamic Items, with the exception of differing Pools for SfxSetItems which cannot be done. Future: That design is already prepared to allow solving that Pool-chaining problem: currently there are master/sub-pools and all accesses have to traverse that structure before even doing anything. For the future the idea is more to 'compose' a Pool by registering ItemInfoPackages, e.g. for Writer pool you may start with SfxItemPool, register the writer-specific ItemInfoPackage, then the one for DrawingLayer (if needed) and the one for EditEngine. It should also be possible to get to smaller granularities of that packages. Ideas for new ones will emerge. We might also think about composing Pools which can e.g. run Writer and Chart, so allowing to use Chart *without* OLE stuff in Writer - just ideas... More changes: - Adapted all stuff, cleaned up old stuff/ definitions - Removed FreezeIdRanges, that can be done once per Pool on-demand (and cannot be forgotten to be called) - Merged XOutdevItemPool with SdrItemPool and offered a ItemInfoPackage which joins both needed sets of Items - All the cleanup hassle with Pools and defaults cleaned up - Adapted all access methods of the pool to use that new stuff. Pool chaining currently stays, but I use a central method 'getTargetPool' instead of recursive calling to get the correct Pool for the action Change-Id: I2b8d3d4c3cc80b1d0d0b3c0f4bd90d7656b4bab7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163157 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-02-01tdf#131641 Enter selected text in the search bar (Basic IDE)Rafael Lima1-4/+16
This patch makes the selected text in the code editor be automatically inserted in the search bar. Change-Id: Ibbe64aa3375a5a47dedb762001ed4b99f4b22e46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162548 Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2024-02-01sc: put used currencies on top of the currency pop-up listTomaž Vajngerl1-13/+46
The list of currencies is fairly long and there is no easy way to search the list, so to make it easier to concurrently fint the desired currency, put the currencies that are used in the document on top of the list. This adds a DocumentModelAccessor class, which is used to access parts of the document model from other modules throught the SfxObjectShell. Change-Id: I81a180b674ae69b373b0422f363678e8bab37194 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162638 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 79da840fac78f11c156801c43d8b79d6d4f32869) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162755 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-01-31Revert "store last five MRU currencies in the currency drop-down"Tomaž Vajngerl1-126/+42
This reverts commit dc6b93011cc5435f367666e43e354c6ab97bbc90. Change-Id: Ia56cb2e906303d6d59061df3e21954306bee2298 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162754 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-01-26just fetch SfxViewShell::Current() once, and as constCaolán McNamara2-4/+4
Change-Id: I3c95622b6de8ff35e53d9879f3de8cf9041887c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162604 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-18tdf#158277 sw_redlinehide: fix find bar stringMichael Stahl1-5/+15
FindTextFieldControl::SetTextToSelected_Impl() uses the XModel to retrieve the currently selected text, which naturally includes deleted text. Instead, use view API XTextViewCursor to get the visible selected text. (regression from commit ae2232366f00e08c1855667cfaf068269ac9af2f) Change-Id: I302ea90a7407af6e3ae7b62a2f373dccb33b8275 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162245 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-01-12Send document colors with lok callbackSzymon Kłos1-1/+35
First step for publishing any palette for LOK. Let's start with Document colors (colors used in the document) which can be extracted similar to theme colors from SfxViewShell. Modify generateJSON function so it appends palette into existing ptree/JSON. In the next step we can make it more generic so it will be able to send any palette managed by PaletteManager. Change-Id: Ibb56690af6dfd59ee232e88b28e7a3d312d0e16c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161798 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 0460be8848b0ce02c07183e41dd7137ac3b94164) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161941 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2024-01-08tdf#72991 - Remember last used color depending in cuiAndreas Heinisch1-22/+58
Change-Id: I4c2cd970aa5b96a8037ecab5e3ae5e5e7cbe4975 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160008 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-12-31cid#1546464 COPY_INSTEAD_OF_MOVECaolán McNamara1-1/+2
and cid#1546346 COPY_INSTEAD_OF_MOVE cid#1546342 COPY_INSTEAD_OF_MOVE cid#1546320 COPY_INSTEAD_OF_MOVE cid#1546305 COPY_INSTEAD_OF_MOVE cid#1546241 COPY_INSTEAD_OF_MOVE cid#1546162 COPY_INSTEAD_OF_MOVE cid#1546118 COPY_INSTEAD_OF_MOVE cid#1546048 COPY_INSTEAD_OF_MOVE cid#1545989 COPY_INSTEAD_OF_MOVE cid#1545936 COPY_INSTEAD_OF_MOVE Change-Id: I63bc43378b36f7c49e66231152138ad7038971e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161507 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-31Replace "size() != 0 with !empty()" (svx)Julien Nabet1-1/+1
Change-Id: I42c3d2a41bebc4e403180d8b3f8eb73d0d3a2377 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161488 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-12-30tdf#146619 Recheck svx/ with IWYUGabor Kelemen6-7/+1
Change-Id: I99650b50587294c20b1e92270e541140d9ec9cae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161240 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-12-26cid#1559937 COPY_INSTEAD_OF_MOVECaolán McNamara1-1/+1
and cid#1559939 COPY_INSTEAD_OF_MOVE Change-Id: Ic5e581aff9e12c8c6277355b0a8bc99a155dc63e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161290 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-22tdf#156820 Fix crash in custom color pickerNoel Grandin1-5/+6
which requires (*) keeping ColorPicker alive during the runAsync in ColorPicker::startExecuteModal (*) keeping the PaletteManager alive during the ExecuteAsync in PaletteManager::PopupCOlorPicker Noting that MattK debugged the cause of this. Change-Id: I07efe8e6514f8882b1347c79c6150578c234bb9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161054 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-12-21Remove DeleteItemOnIdlexArmin Le Grand (allotropia)1-0/+1
There are some CrashReports in 7.6 which have DeleteItemOnIdle on the stack, but there is nothing reproducable. So I took a look... I first thought it's a MCGR regression, due to classes on the stack. But the Item involved is just random, can happen with any Item. Then I thought it may have to do with ITEM refactorings, but it happens with DeleteItemOnIdle involved, so also not the case. I already saw DeleteItemOnIdle when doing these and qualified as 'hack' in the way. already It is only on Windows and DeleteItemOnIdle is involved. This again (took a deeper look now) is an old hack to keep an SfxPoolItem 'alive' for some 'time'. For that, it triggers an async reschedule which then deletes the Item when being called. If the Item will be used after that is pure coincidence - seems to work in most cases. It seems as if for Windows the timing slightly changed for some scenarios, so a reschedule is too early. This can happen with this hack anytime. DeleteItemOnIdle is used in scenarios where SfxPoolItem* is e.g. returned, but is *not* anchored, so e.g. not member of an SfxItemSet. Or in short: Lifetime is not safe. DeleteItemOnIdle exists since 1st import, but was changed to AsyncEvent ca. 4 months ago (see 57145acf9ec47c23e307b7a5c0029d21d937cc35), so that may have caused it. It is possible that these errors happen on Windows since then. Before something more complicated was used to delete it late, but surely also not really safe. Due to ITEM refactor I have the knowledge/tooling to solve this. It will not be a 1-5 lines fix, but it is a hack and in the way for further ITEM refactor anyways. What we have nowadays is a SfxPoolItemHolder -> it's like an SfxItemSet for a single Item. It safely holds/ controls the lifetime of an SfxPoolItem. It is already used in quite some places. It helps to solve many hacks, also the ones putting Items directly to the Pool - due to there never was an alternative for that. In principle the ItemPool/ItemSet/Item paradigm was never complete without SfxPoolItemHolder. Thus I started to fix that (and remove that hack for good, sooo many changes over the years, sigh), but as said is not straightforward. Will have to change retvals of involved stuff to SfxPoolItemHolder - it's just two pointers and designed to be copied (one is a Pool, needed to cleanup when destructing). CopyConstruct/destroy just counts the RefCnt up/down, so cheap. 1st version compiling, let's check on gerrit... Corrected one error in QueryState for securitypage, also added some security features/asserts. Change-Id: Ida49fd35ca88ead84b11d93e18b978cb9e395090 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161083 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-12-12tdf#158320 restore Live Preview for font hoveringCaolán McNamara1-1/+30
a) announce Preview when a 'selected' font preview is requested b) move EndPreview to when the dropdown popups down, rather than listen to ESC Change-Id: I68916769150c23c0ec18aae084cdf3cafb7352a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160609 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-11-19Extended loplugin:ostr: svxStephan Bergmann1-1/+1
Change-Id: I290b1c60c8030b5345a1c2fa3816e83e21967cf6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159671 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-15loplugin:unusedmethodsNoel Grandin1-5/+0
Change-Id: I1e125bbd388953491b3f869641484fea737d39ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159423 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-20Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: svxStephan Bergmann6-35/+35
Change-Id: Ib5028b826a3f62303b9e0502af70ad62c578fbb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158240 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-18Clean up the remaining uses of OUStringConstExpr, and drop itStephan Bergmann2-10/+10
Change-Id: I30b2ac77b58e2ae1d1e997a0c830c513542b973d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158101 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-07jsdialog: enable font name & size comboboxSzymon Kłos1-1/+2
This enables font selector with font rendering in Online Change-Id: I2b57c0831e84a957374c2b1733f6526ca80ac7bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156242 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157503 Tested-by: Jenkins
2023-09-18jsdialog: set WindowId for font size comboboxSzymon Kłos1-1/+2
this is required to put combobox in correct map for receiveing events from user. without that font size was not possible to be changed from notebookbar in lok Change-Id: Id688b8fc1b3f565278ae651e050d18d75a048103 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156783 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157023 Tested-by: Jenkins