summaryrefslogtreecommitdiff
path: root/editeng/inc
AgeCommit message (Collapse)Author
2024-08-01CairoSDPR: Simplify EditEngine text decompositionArmin Le Grand (Collabora)
The EditEngine decomposes it's content mainly to Prmitives (there is still a direct paint mode used in rare remaining cases which we not yet got rid of). For TABs the special case for 'extended' TABs (see format/paragraph/Tabs, FillCharacter) was handed through all layers using method DrawingTab, put into a DrawPortionInfo and held at the text primitive (TextSimplePortionPrimitive2D). While for direct paint the expansion was already done in ImpEditEngine::Paint anyways (and always painted, independent from bStripOnly what was unneccessary and I corrected that, too) it had to be done for text paint in VclProcessor2D for each repaint. This is not needed, so now the extended text created in EditEngine decompose gets used. This makes a lot of stuff simpler, including EditEngine/Outliner and some involved classes. If it somehow should show that it might be necessary to do that for each paint it should be done in the obvious way then - using an own primitive that creates the expansin in the decomposition (and buffers it). Change-Id: Ieb02219142af8f6bee01dcd658e08b185a4212cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171380 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-07-30tdf#161846 avoid allocation in ContentNode::InsertNoel Grandin
which is fairly common Change-Id: I3b1ec65d880cb71b8894f292061e23376af177bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171224 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-07-18make EditSelection single-arg constructor explicitNoel Grandin
Change-Id: Id7a81db385dd3ca30daa37ba74a82d06c417a51c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170678 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-04editeng: prefix EditLine members, clean-upTomaž Vajngerl
Change-Id: Ie8c8ee86f139854137ba95875f51ddaf64cc5848 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165336 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-02-17editeng: remove getHeight as a similar GetHeight already exitsTomaž Vajngerl
Change-Id: I947b736b2c1eb8a6f0155460b4dc61d504623ca2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163510 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-02-16tdf#154248 sd: change multiline field wrappingAttila Szűcs
Modified ImpEditEngine::CreateLines and ImpEditEngine::Paint to wrap multiline fields (hyperlinks) to wrap better: Multiline hyperlinks can start/end in the middle of a line. like this: text hyperlink-start hyperlink-line2..... hyperlink-end text Start of the lines of the multiline hyperlinks now follow the line start (for example if the 1. line has a bullet/indent, and the 2. line does not then the multiline hyperlink 2. line will start where normal 2. line would start) Changed the way how fields wrapped while editing.. (we didn't split fields into lines, when its textbox is edited, but now we do) This way it is more a WYSIWYG editor. (when we edit, we see what we will get) Changed the constant reference rLine to non-constant pointer pLine, because this hack change the actual line to the next line at the end of a muliline hyperlink, so the algotithm will continue calculating with the next line, as if it would be still the previous line. Change-Id: I2c67f4ae1b86ee9c73f01ae0c045f02e56a09c1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162503 Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-12ITEM: ItemPool Rework (I)Armin Le Grand (allotropia)
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-12editeng: make TextPortionList iterable with ranged forTomaž Vajngerl
Change-Id: Ifbddd99b5877c71ebbec064672b75877fe06ccd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163226 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-02-12editeng: move isEmpty impl. from ParaPortion to TextPortionListTomaž Vajngerl
Change-Id: Ib305963b1f5ffcef9122dd4353826cc9033810f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163225 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-02-12editeng: prefix members of ParaPortion & add some access methodsTomaž Vajngerl
Change-Id: I6be67530690d1d5ee1236d654dd65cc8545e95d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163224 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-01-16tdf#154248 Impress: fix color of hyperlinkAttila Szűcs
Added a new FindAttrib method that searches in the attribs a bit different. The original FindAttrib searches in attribs as if their position intervals are closed from both side [Start,End]. However, the actual attribs array was created using PaMs as positions, and these are right-opened intervals [Start,End) Change-Id: I9a46b6b27ce447366fc20af1b46fd60b5c745359 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161836 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162158 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-15editeng: return ParaPortion from the list as a ref.Tomaž Vajngerl
Change operator[] for getRef(..) method, so instead of returning a pointer, return a reference to ParaPortion instead. This also needs changes to the code, because we now need to make sure before hand that the ParaPortion is really available in the list and when this is not possible or convenient, the change the call to use existing "SafeGetObject" instead. Add "exists" to check if the object is available in the ParaPortionList. In addition add "lastIndex" method to return the index of the last ParaPortion in the list (shortcut for Count() - 1). Change-Id: Id52c38f996468af51c75d50185110ec8502169e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162071 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-01-14editeng: use unique_ptr for Append and Insert into a EditLineListTomaž Vajngerl
We can better handle the lifecycle of the EditLine this way. Change-Id: I6fa3834bfdc19576158370a2c82da0771529a7f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162010 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-01-02editeng: add begin, end, MarkAllSelectionsInvalid to ParaPortionListTomaž Vajngerl
begin, end to make iteration work with range for Change-Id: Ia64d4f8102485b257e190fc702e4aa734a81d866 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161530 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-01-02editeng: remove operator[] for EditDoc (use GetObject instead)Tomaž Vajngerl
Change-Id: Ie41d2baf84d230b9ee280859d390e24b9da70be7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161482 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-01-02editeng: better lifecycle control for ContentNode in EditDocTomaž Vajngerl
Don't use raw pointers, when it is possible to move the unique_ptr around into another object that is responsible for the object's ownership. The ContentNode is either in a vector in the EditDoc class or it is moved to the EditUndoDelContent class for the undo/redo action. Those 2 classes are responsible for freeing the ContentNode. Change-Id: I977d8e418947bb48781f23575d62420260025e57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161480 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-01-01editeng: make it clear EditDoc is responsible for ContentNodesTomaž Vajngerl
Change-Id: I38b9b1a5ba48d73438865f5a040f2483f6814c40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161479 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-01-01editeng: prefix members of EditDocTomaž Vajngerl
Change-Id: I403db061b6e3e184e97c5ec3ce5746d2fdff0749 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161478 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-01-01editeng: simplify constr. and destr. of ParaPortion{List}Tomaž Vajngerl
Change-Id: I8f7e242b66463baa9adcc0dee8eb8f4206630c7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161477 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-01-01editeng: move ParaPortionList into its own header fileTomaž Vajngerl
Change-Id: Ibb1c9feb989a7dc3127e21c5a4dcda41b64fc84b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161476 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-01-01editeng: move ParaPortion into its own header fileTomaž Vajngerl
Change-Id: I3fefe4a9fc5d391b1c3af335893a084eaeddba4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161475 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-01-01editeng: move impl. of TextPortionList methods to own cxx fileTomaž Vajngerl
Also move some simple methods to header file and clean-up the constructors and destructors. Change-Id: I5113d785ecc71d36b4c6a480b15427ca68eb2e0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161474 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-01-01editeng: move TextPortionList into its own header fileTomaž Vajngerl
Change-Id: I366706138f88c7865a7f1315af64bb4ab5b07ce3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161473 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-31editeng: cleanup operators and constructors for EditSelection + testTomaž Vajngerl
Move the constructors into class body, cleanup operators so they use more standard class based operators and use default for != as it will just be a neagtion of ==. Change-Id: I1b99db6c9a82468ab76091eb93a5f3641024c65b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161365 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-31editeng: cleanup operators and constructors for EditPaM + testTomaž Vajngerl
Move the constructors into class body, cleanup operators so they use more standard class based operators and use default for != as it will just be a neagtion of ==. Change-Id: I6534db60dcb23cb3daefb91d5f27579a690a9637 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161364 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-31editeng: move EditSelection into its own header fileTomaž Vajngerl
Change-Id: Ib56a0d308de700097470d26ebed3dc90d583b616 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161363 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-31editeng: move EditPaM into its own header fileTomaž Vajngerl
Change-Id: I13c5d4f2ea0bd7ef942ac0cacb9dce4b58909b19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161362 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-30editeng: move EditLineList methods definition into headerTomaž Vajngerl
Class is simple enough and more or less just wraps the vector anyway. Change-Id: I65a2980e8dd3c70b87e617920db623782d43b1b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161361 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-30editeng: move EditLineList to its own header fileTomaž Vajngerl
Change-Id: Ic19aa0826050a768e9976d8d3db9eadb108607f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161360 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-30editeng: move impl. of EditLine methods to own cxx sourcefileTomaž Vajngerl
Change-Id: I9856302967de59368dc60b3e01f4a36fdb97e00e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161359 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-30editeng: EditLine test and refactor constructors, operatorsTomaž Vajngerl
Change-Id: Ia60ce07073725bf66bf299edaf7b3cd24cfe59c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161358 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-30editeng: move EditLine in its own header fileTomaž Vajngerl
Change-Id: I21cac4a8899f96da420428c4eb110078c740615a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161357 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-29editeng: simplify and remove unneded const. of ContentNode & coTomaž Vajngerl
ContentNode, CharAttribList, ContentAttribs constructors and destructors can be simplified and in some cases removed (if they are empty). Change-Id: Id5b1d4c1934a9b0b6e0ed8a7fe2af0d41ce4b4fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161356 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-29editeng: prefix members of ContentNode, CharAttribList, ContentAttribsTomaž Vajngerl
Change-Id: I2af96b6525ee0d4410200775ce4daf71bcc80db4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161354 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-29editeng: move ContentNode & dependents in its own header fileTomaž Vajngerl
Change-Id: Ia492dacafb88d42ab3dcdae8af9843d3586dffbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161353 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-29editeng: ItemList - prefix members, move methods in classTomaž Vajngerl
- Move methods into class def. as the class is simple enough. - Prefix member variables. - Remove unneeded includes. Change-Id: Ide567c64dad3606f1a9faf837571ae2a5c3d69ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161352 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-29editeng: move ItemList in its own header fileTomaž Vajngerl
Change-Id: I52f3f2a557db7058aa584ca7c1cee08eae58d726 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161351 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-29editeng: move TextPortion to own header fileTomaž Vajngerl
Change-Id: I54d0bbad4ef142705191672319774f26abf3e735 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161348 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-28editeng: unneeded forward declarationTomaž Vajngerl
Change-Id: Icd97c2d382fd9495c67071e08362de0bd4985bbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161350 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-28editeng: move EPaM in its own header fileTomaž Vajngerl
Change-Id: Ib3682dd5df09162748aad4402108b2b3cec3a853 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161341 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-08tdf#129357 editeng: show soft hyphen in text boxes and shapesLászló Németh
Shapes and text boxes didn't show the optional hyphen at line break. Change-Id: I5cc842964fc91571e5c55995981de697da966b14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160453 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2023-12-07simplify and modernise ScopedBitmapAccessNoel Grandin
(*) Make all of it use a "Scoped" paradigm (*) pass by value, no need to allocate on heap (*) make all of the construction go via the *Access constructors, instead of it being some via the constructors and some via the Acquire*Access methods. (*) take the Bitmap& by const& in the constructor, so we can avoid doing const_cast in random places. Change-Id: Ie03a9145c0965980ee8df9a89b8714a425e18f74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160293 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-25tdf#158317 fix cleanup of SfxPoolItems in editengArmin Le Grand (allotropia)
It is not possible to use implCreateItemEntry/implCleanupItemEntry, that is tooling limited *by purpose* to svl/Item/ItemSet stuff. But what I can do is to do that SfxPoolItemHolder I already talked/thought about. It is a helper that can safely hold a SfxPoolItem in cases where an SfxItemSet is too expensive. Think about it as a SfxItemSet for a single item. That solves the problem why DirectPutItemInPool/DirectRemoveItemFromPool is used in general (each usage is a 'compromize'). Did that now, works well. Editengine is now free of DirectPutItemInPool/DirectRemoveItemFromPool. Replaced ::CursorMoved with checkAndDeleteEmptyAttribs since all these got static with no longer need to DirectRemoveItemFromPool. Corrected create/delete counters. Change-Id: Ia6e53f48ac2e479b461546515e68697039b5b628 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159931 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-10-12Make NC_ constexpr-friendlyStephan Bergmann
...by moving the char8_t -> char reinterpret_cast out of any potential constexpr paths into a new TranslateId::getId. And demonstrate constexpr'ability by making the aCategories var in OApplicationIconControl::Fill (dbaccess/source/ui/app/AppIconControl.cxx) constexpr. (And there might be more such cases that could now be made constexpr.) Change-Id: I0b4e3292faf8f6b901f9b9e934e1aa6bf0f583ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157862 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-11Drop o3tl::span, can use C++20 std::span directly nowStephan Bergmann
Change-Id: Ic21ff7bf48f07f7277979d52e99d2c5c268de83f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157825 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-09-11SvxSimpleUnoModel does not need to implement XAggreggationNoel Grandin
Checked on jenkins using 'make check' and +void SAL_CALL setDelegator(css::uno::Reference<css::uno::XInterface> const &) final { assert(false); } Change-Id: I54b6d8224bd9d996781cfac6cf9846721a8c5d3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156818 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-04tdf#153880 sc: Make Calc text hyperlinks stand out moreBalazs Varga
Add underlining for links in Calc. TODO: unit test Change-Id: Idd5a7de7464d8ce443cdec756ac803491e73b0ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149913 Tested-by: Jenkins Tested-by: Gabor Kelemen <kelemeng@ubuntu.com> Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-02-28tdf#148966: pptx: workaround for multiline fields followed by linebreaksSarper Akdemir
In Impress after fields that span multiple lines, a linebreak is already forced. (PowerPoint doesn't have such behaviour) Therefore if the imported pptx file has a line break after the multiline field - Impress ends up displaying an extra line break. This patch implements ignoring of a linebreak that follows after a multiline field during paint (when not in EditMode), using a compatibility flag. (IgnoreBreakAfterMultilineField) Change-Id: I1e6772424cc0eead06b53d104b06820038a81ea1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147408 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-12introduce docmodel comp., model::ThemeColor, use it in SvxColorItemTomaž Vajngerl
Added a new component docmodel, that has the document model types, which only depend on other basic components. This is needed so the types can be used in every relevant component - xmloff, oox, svx, editeng,... Introduces model::ThemeColor, which is a class used to store the theme color data, including transformations (svx::Transformation). For UNO use XThemeColor is added, and the implementation UnoThemeColor which wraps svx::ThemeColor, so it can be tranported around. Reactor all the code and tests to accomodate for this change. Change-Id: I7ce6752cdfaf5e4d3b8e4d90314afa469dd65cfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144847 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-10-31editeng: don't use GetSize to set the sizeTomaž Vajngerl
Change-Id: I80a2701d7c125dbe6c80f8c32b125c7b176a8bb4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142062 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>