summaryrefslogtreecommitdiff
path: root/editeng
AgeCommit message (Collapse)AuthorFilesLines
2024-01-02editeng: preserve ContentNode in a unique_ptr when moving parasTomaž Vajngerl1-16/+22
When we move the paragraphs, we can just take the unique_ptr of ContetNodes out of the EditDoc and move it to new position inside EditDoc, like it is done for ParaPortions in ParaPortionList. No need to muck with the raw pointers and releasing the ContentNode from a unique_ptr and later moving it back again. Also just use a std::vector for ParaPortions instead of a new instance of ParaPortionList. Change-Id: I8634ccc83121c1ee683be4c2cfb0cedbd469c05d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161531 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-01-02editeng: add begin, end, MarkAllSelectionsInvalid to ParaPortionListTomaž Vajngerl2-3/+14
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: prefix members of ImpEditEngineTomaž Vajngerl6-378/+374
Change-Id: I05a738be8956ebaa2912c6c8a20a05002d67b789 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161529 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-01-02editeng: remove operator[] for EditDoc (use GetObject instead)Tomaž Vajngerl5-24/+12
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: add max paper size constantTomaž Vajngerl1-3/+5
Change-Id: Ib51f5c5bbcf68fd156b02e04e8e99408aa97abf1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161481 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-01-02editeng: better lifecycle control for ContentNode in EditDocTomaž Vajngerl9-52/+143
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ž Vajngerl4-15/+18
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ž Vajngerl2-39/+59
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ž Vajngerl3-41/+16
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ž Vajngerl2-32/+61
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ž Vajngerl2-103/+134
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ž Vajngerl4-122/+119
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ž Vajngerl2-24/+49
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ž Vajngerl4-30/+162
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ž Vajngerl4-27/+86
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ž Vajngerl2-34/+57
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ž Vajngerl2-24/+51
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ž Vajngerl3-77/+41
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ž Vajngerl2-22/+46
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ž Vajngerl4-66/+95
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ž Vajngerl4-79/+154
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-30move IsFuzzing to comphelperCaolán McNamara6-12/+12
and try something a bit more generic Change-Id: I1d8256576cd02f0a589df350ba7b53059dd586a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161250 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-30editeng: move EditLine in its own header fileTomaž Vajngerl2-91/+111
Change-Id: I21cac4a8899f96da420428c4eb110078c740615a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161357 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-29ofz#65377 TimeoutCaolán McNamara1-1/+1
reduce further to 120points Change-Id: Idf9892ae01fb6ff3e6cf9b064c2999da9a3a94d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161430 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-29Resolves: tdf#158608 put calc spelling suggestions at start of context menuCaolán McNamara1-3/+4
a problem since: commit 57544b075b77331b7b1cc7cb18898a52e7bb21a6 Author: Caolán McNamara <caolanm@redhat.com> Date: Sat Dec 12 21:21:09 2020 +0000 weld editview menu Change-Id: Id2ffd7f4f3da15d5c0ebc1c7a17247e8ab1ec5bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161389 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-29editeng: simplify and remove unneded const. of ContentNode & coTomaž Vajngerl2-22/+4
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: move source of ContentNode & co. to own sourcefileTomaž Vajngerl3-984/+1016
Move ContentNode, CharAttribList, ContentAttribs methods to own source class. Change-Id: Idd1371430ecaf36431de763dc4e3e3978ba60641 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161355 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-29editeng: prefix members of ContentNode, CharAttribList, ContentAttribsTomaž Vajngerl2-105/+107
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ž Vajngerl2-151/+180
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ž Vajngerl2-52/+29
- 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ž Vajngerl2-23/+57
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: simplify FormatterFontMetricTomaž Vajngerl1-4/+6
We don't really need a custom constructor and default values can now be set directly. Change-Id: I7e8aabf2c60d3b63abf1764bbff512685803f71e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161349 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-29editeng: move TextPortion to own header fileTomaž Vajngerl4-149/+149
Change-Id: I54d0bbad4ef142705191672319774f26abf3e735 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161348 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-28Fix typoAndrea Gelmini1-2/+2
Change-Id: Ie4af9884dca493646636dc60a1605a748d50ad1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161376 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-12-28editeng: ImpEditView - clean-up UNO typesTomaž Vajngerl1-19/+17
use com::sun::star namespace as the base for UNO types Change-Id: I5ce71f21a914f4653d908162f5ec6f773023165e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161347 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-28editeng: prefix ImpEditEngine pVirtDev, pRefDevTomaž Vajngerl5-38/+38
Change-Id: I4e215b374178314a836cfddb0107b8cdbe6c1f82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161346 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-28editeng: unneeded forward declarationTomaž Vajngerl1-1/+0
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 inline methods into ImpEditEngine classTomaž Vajngerl1-138/+124
Change-Id: Id9e6e1a4308b7f7d0384a1b28c7279aaa3c716f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161345 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-28editeng: add EPaM unit testsTomaž Vajngerl2-0/+104
Change-Id: Icc15746bf2712bae446f16fd378f94f8be5ec61e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161342 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-28editeng: move EPaM in its own header fileTomaž Vajngerl1-23/+1
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-28editeng: add ESelection unit testsTomaž Vajngerl2-0/+186
Change-Id: I79cff7b08944fe81c785c224587e4e6f6c8ff9c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161339 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-24cid#1545470 COPY_INSTEAD_OF_MOVECaolán McNamara1-12/+7
and cid#1545468 COPY_INSTEAD_OF_MOVE cid#1545446 COPY_INSTEAD_OF_MOVE cid#1545435 COPY_INSTEAD_OF_MOVE cid#1545419 COPY_INSTEAD_OF_MOVE cid#1545415 COPY_INSTEAD_OF_MOVE cid#1545410 COPY_INSTEAD_OF_MOVE cid#1545390 COPY_INSTEAD_OF_MOVE cid#1545384 COPY_INSTEAD_OF_MOVE cid#1545374 COPY_INSTEAD_OF_MOVE cid#1545371 COPY_INSTEAD_OF_MOVE cid#1545368 COPY_INSTEAD_OF_MOVE cid#1545366 COPY_INSTEAD_OF_MOVE cid#1545335 COPY_INSTEAD_OF_MOVE cid#1545331 COPY_INSTEAD_OF_MOVE cid#1545327 COPY_INSTEAD_OF_MOVE cid#1545308 COPY_INSTEAD_OF_MOVE cid#1545280 COPY_INSTEAD_OF_MOVE cid#1545199 COPY_INSTEAD_OF_MOVE Change-Id: If05a13125b05ccd93d34d0eced566e7b3b58aaef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161256 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-22Lok: make Ignore All list name independent on UI languageMike Kaganski1-1/+5
Fixes not working "Ignore All" context menu entry in e.g. German UI in Online. Change-Id: I761c9f65c89fb5c7e929ea20f2db4eff20f7d53d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161170 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-12-19Keep selection as after copying the textPranam Lashkari1-0/+1
This also aligns code with 'else' branch behaviour problem: in online when coping a slide with comment, comment text was never copied in online, it required document to reload to show it correctly Change-Id: I6d444c10808ef23f282370b4b305c41eb5043b76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160812 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit db7faa06762ac902ff56ecbab3fff763951146e1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160943 Tested-by: Jenkins
2023-12-18tdf#158703: return updated position from FnAddNonBrkSpaceMike Kaganski1-9/+13
The paragraph text may become shorter after the function succeeds, because it may remove arbitrary number of preceding spaces; since the position may then be used to access data in the string in the caller, we need to update it, to avoid use of old position (which may point beyond the string, and produce a crash; or it may point to a wrong position in it). Change-Id: Ib1b4b63cbd7150e0f69c97032e3410db7dadd4dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160924 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-12-18tdf#158186 Fix saving ApplyNumberingAfterSpaceSamuel Mehrbrodt1-2/+2
Change-Id: I6880f75c140f6e800bbdb6c56dd1ff166a3191d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160916 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-12-08tdf#129357 editeng: show soft hyphen in text boxes and shapesLászló Németh2-0/+5
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-07cid#1546503 Using invalid iteratorCaolán McNamara1-4/+12
and cid#1546284 Using invalid iterator cid#1546275 Using invalid iterator cid#1546049 Using invalid iterator cid#1545929 Using invalid iterator cid#1545870 Using invalid iterator cid#1545668 Using invalid iterator cid#1545420 Using invalid iterator Change-Id: I3ad3000631b4be5917b9c5f49f21b8cc003a309c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159056 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-07simplify and modernise ScopedBitmapAccessNoel Grandin1-1/+0
(*) 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-12-05cid#1546503 Using invalid iteratorCaolán McNamara1-1/+3
and cid#1546284 Using invalid iterator Change-Id: I9ff3498b65ce392dbe859566b49e60a31e0779f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160370 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>