summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2021-10-29use virtual function call for dynamic dispatchBjoern Michaelsen
... as it is around since the dawn of C++ and should be stable -- certainly more stable and less errorprone that manual typetagging. Change-Id: I5dfe2ce40c2334dc8fe60705d358779fa4bf1586 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124131 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2021-10-29consolidate DDE updates in FieldTypeBjoern Michaelsen
Change-Id: I70243dad4cd62ab1f601d010e0bcf441831ec556 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124130 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2021-10-27tdf#131755 SwNavigator: Fix drag mode configuration restoreJim Raykowski
Seems extraction from the Any here needs to be to a long even though an unsigned short is inserted. Change-Id: I3439d4282c99d2b83d4e9e146e241db0dd41a452 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124258 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-10-27SwNavigator: Use stored outline levels shown value for both flavorsJim Raykowski
Currently only the floating Navigator uses the outline levels value stored in the Navigator configuration. This patch makes the sidebar version also use the stored outline levels value. Change-Id: I6f54f92b7375e0688b29aa128008a3bd758a785a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124251 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-10-27sw: run uiwriter tests on macOS tooXisco Fauli
meanwhile, fix the following warning: - sw/qa/extras/uiwriter/uiwriter2.cxx:3744:22: error: unused variable 'pTextDoc' [-Werror,-Wunused-variable] Change-Id: I81befe70f48b49f92ea787ab59098525b4cc4471 Change-Id: Ic6ac9b6eaa0ae7a351320540522093ad1dfcba94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124279 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-10-27tdf#131771: sw: Move UItest to CppUnittestXisco Fauli
Change-Id: Ic24218bee76ed9b8df3169bd8e2ede6a91689770 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124252 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-10-27tdf#143244: sw: move UItest to CppUnittestXisco Fauli
Change-Id: If1a897270f2fc43cdd5b2a4560bc5d1ce4fdba35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124247 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-10-27tdf#136715: move UItest to CppUnittestXisco Fauli
Change-Id: I322b2cc0bae0889e5f3aaaf0542320c9dda82079 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124243 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-10-26uitest: when possible, close the document before opening a new oneXisco Fauli
Change-Id: Ice8ec4868baab5182957ce335e2bc2cb93822af7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124228 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-10-26tdf#131025 swtable: don't apply number format to non-number textJustin Luth
Applying a numbering style to text causes export to save that out as a number (valued as zero). That is not good because the ODF spec says that a number overrides a string. So don't accept a numbering format on non-number text. Why is this change good? -the cell previously had no direct formatting (by definition). -the cell's previous old format was text (tested). -any numbering format applied obviously isn't correct (by definition). -any previous formatting has already been overwritten with numformat. -the default numbering is appropriate for text. -empty cells still get the numbering format (tested). -odd human-designed formats are accepted as intentional (tested). What are the concerns? -the scope of this change is HUGE, way beyond this bug. -on both my dev box and patch box I saw occassional crashes. -the bug was "fixed" by a different import commit that ensured different languages were treated consistently. So this patch is no longer critical, just nice to have to avoid exporting out-of-spec content. Change-Id: Id3dc5f803c3cf4875bc0cab52d1019a18679da77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123904 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2021-10-26tdf#145225 sw track changes: fix bad insert at movingLászló Németh
Moving up a list item over a tracked paragraph insertion changed non-tracked text to tracked insertion. Manual test: - Create a 3-element list; - switch on Record Changes and Show Changes; - at the end of the list item 2, press Enter to insert a new list item, and type some text: Item 1 Item 2[ New item] Item 3 where parenthesis shows the boundaries of the tracked insertion; - move up the last list item over list item 2 (the unmodified paragraph text with a tracked paragraph insertion at the end). Paragraph text before the tracked paragraph insertion changed to tracked insertion joining its tracked insertion with the moved list item, resulting only 2 tracked changes: Item 1 [Item 3 Item 2 New item] [Item 3] instead of the requested 3 changes: Item 1 [Item 3] Item 2[ New item] [Item 3] Change-Id: I4716b2d244b57cf86d7d14d972452191549f5fea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124144 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2021-10-26uitest: rearrange tests to avoid "close_doc: no active frame"Xisco Fauli
Change-Id: I92bf81801797821c9ec4aa73c005f1d6c6f6da62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124182 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-10-26-Wunused-but-set-variableNoel Grandin
sw/source/uibase/uiview/viewsrch.cxx:97:13: error: variable 'textSelection' set but not used Change-Id: I67a37e9440343a34147dd5be82cfc3dfb1282419 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124184 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-26tdf#136715 sw: fix table Undo to update table styleBalazs Santha
Applying table styles works by applying direct formatting on the table. Some of the built-in table styles, like "Box List Red" specifies boldness for the last row of the table. After selecting and deleting the last n rows of a table, which has a table style which specifies formatting for the last row, the new last row gets these formatting as expected. However before the fix, after undoing the deletion of the rows, this formatting were still applied on that row which previously became the last row. Change-Id: I3ad086dd9b5e4111b3f019ca3d23f1db8b348637 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123730 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-10-26tdf#144374 DOCX: export the password for editingTünde Tóth
The password for editing wasn't exported in DOCX, resulting unprotected documents in Writer and in MSO 2019 or newer. Change-Id: Ieb8a339795635bc1c4223ccbe2a40ea85222cc2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123543 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-10-25tdf#138531: sw: Add UItestXisco Fauli
Change-Id: I953948a5d10e8fbb6610ea0bf49ae7e8308e83eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124157 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-10-25use pull model also for LOK text selectionLuboš Luňák
Make LOK_CALLBACK_TEXT_SELECTION, LOK_CALLBACK_TEXT_SELECTION_START, LOK_CALLBACK_TEXT_SELECTION_END and LOK_CALLBACK_TEXT_VIEW_SELECTION also use pull model, i.e. LO core will only set a flag and when CallbackFlushHandler needs the actual data it'll use getLOKPayload(). This again avoids a large number of messages passed to CallbackFlushHandler only for them to be sooner or later discarded. Change-Id: Ia7528039be996a6e9e8491b4eba3f4133582fa56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124146 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-25uitest: fix indentXisco Fauli
Change-Id: I7034ab2b7933f248a0d6929bd11497ff3098dd3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124138 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-10-25tdf#138531: Also update DDE tables, not only fieldsBjoern Michaelsen
Change-Id: I0cbf8ce355b460b2f7ea73c8fae653641c980979 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124129 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-10-25tdf#145132 SwNavigator: Add tracking option for all categoriesJim Raykowski
and make the setting for each category persist Change-Id: I3ca41cb860734d31fd93d0d30b37c0301bc2f7dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123960 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-10-24cid#1493243 silence Copy-paste errorCaolán McNamara
Change-Id: I6eeb4e2213aa5dcbae94ec7c3a14a18a986f9975 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124121 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-24cid#1460971 Unchecked return valueCaolán McNamara
Change-Id: Ic60242072a0ba7037cd8094ae98633b038c6f1eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124120 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-24cid#1493242 silence Copy-paste errorCaolán McNamara
Change-Id: Id95cab7b70a9f97dadadb8d0cff64674ec3711b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124119 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-24cid#1493239 silence bogus Use after freeCaolán McNamara
code was perturbed by commit 5f9ffc31cd1b5433c354c7d39ce1d80fa0e57fc8 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Tue Oct 19 09:08:35 2021 +0200 introduce SwNodeOffset strong typedef so coverity has seen in afresh Change-Id: I200f8f40e193f8725ccc1fa5fbb06e3d182bec67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124118 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-24change some LOK internal updates to be pull model instead of pushLuboš Luňák
Some LOK messages may get called very often, such as updates about cursor position. And since only the last one matters, they get generated every time, which costs some time, and then later except for one they get all discard again from CallbackFlushHandler queue, which again costs time. Change the model to instead only set an 'updated' flag, and CallbackFlushHandler will request the actual message payload only before flushing. This commit changes LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR and LOK_CALLBACK_INVALIDATE_VIEW_CURSOR to work this way. Change-Id: I376be63176c0b4b5cb492fbf529c21ed01b35481 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124083 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-23tdf#145215: docx: do not initialize prefix/suffix and include levelsVasily Melenchuk
On DOCX import we do not need to provide prefix, suffix and included levels: these values are calculated in SvxNumberFormat out from list format. Moreover these values are incorrect and do not correspond not to DOCX data nor to internal writer representation of list level. Change-Id: I91ec9de679e67056ba3746f2e1a0bd923532d76c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124090 Tested-by: Jenkins Reviewed-by: Vasily Melenchuk <vasily.melenchuk@cib.de>
2021-10-23tdf#131025 ODF import: recognize SV_COUNTRY_LANGUAGE_OFFSETJustin Luth
File import was making an exception for "float value 0" if the accompanying text had no resemblance to the value 0, but that only applied to GENERAL number format. It should apply to any language's default number format. REGRESSION warning: as we can see, this has been handled inconsistently in the past. But from the coding exception to overcome losing text to a zero (and the huge number of duplicate bugs) the best choice seems to be ignore the spec that says that a number value overrides the text value - at least in the case where the number value is zero. Change-Id: I701e72c6a5dad42c7799ab501255a4859adf61d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124080 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2021-10-23SwNavigator: Make tracked drawing object scroll into content tree viewJim Raykowski
Change-Id: I948c8b38f0df86f30f9c5af56aea5103c82c661c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123966 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-10-22tdf#64991 speed up loading large RTL documentsNoel Grandin
only insert the bounds we are interested in takes load time from 1m51 to 1min39 for me Change-Id: I5a267ae3cf3fe7691481f83b591b02d939931c07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124074 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-22tdf#64991 speed up loading large RTL documentsNoel Grandin
takes load time from 2min49 to 2min5 for me Use a vector for the PortionMap since that has better cache density, and we always add to the end of it, and always in the correct order, so no sorting is necessary Change-Id: Id28e86144a86f0f1361ef4e828f925694eb3bb11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-22sw: fix crash in SwXTextDocument::postMouseEvent()Miklos Vajna
From crashreport: SIG Fatal signal received: SIGSEGV SwXTextDocument::postMouseEvent(int, int, int, int, int, int) sw/source/uibase/uno/unotxdoc.cxx:3559 doc_postMouseEvent desktop/source/lib/init.cxx:4245 Make sure we don't crash when a mouse event is posted on a disposed document. Change-Id: I3fb123460b21bf8fe21406d1745f43270102af33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124060 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-10-22properly flush LOK invalidations in testsLuboš Luňák
This should be done always before doing something with a flag related to the invalidations. Use an idle timer for simplicity, tests already usually process to idle. Change-Id: I979900da28061cc690ecbcce023dbb769239f205 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124003 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-22ignore invalidations in Writer when doing tiled paintingLuboš Luňák
That's done by ignoreLibreOfficeKitViewCallback() called from SfxViewShell::libreOfficeKitViewInvalidateTilesCallback(), but in case Writer delays invalidations to compress them, the tiled painting flag may be already reset by the time flushPendingLOKInvalidateTiles() gets called, so handle that explicitly. SwTiledRenderingTest::testTablePaintInvalidate() would otherwise fail with my follow-up commit that makes TestLokCallbackWrapper flush the invalidations. Change-Id: I915ae4e40bc7a82b3e48498f7e5513420dd64522 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124002 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-22revert unittests to use plain text-based LibreOfficeKitCallbackLuboš Luňák
At least for now it seems that the more complex SfxLokCallbackInterface is just an unnecessary complication for unit tests. The performance doesn't matter, and handling all the specialized callbacks makes things more complicated. In the future it'd be also useful to make the tests (optionally?) use also CallbackFlushHandler as the provider of the messages, in order to test CallbackFlushHandler more thoroughly, so perhaps in the end it makes more sense to keep unit tests using the plain text interface. This reverts unittest-related parts of 3b729db05553c1a6d461fb41c89 and adds a smaller wrapper callback class that converts messages from SfxLokCallbackInterface to LibreOfficeKitCallback format. Change-Id: I6c14f0be4ed7b777444b131140be54188d309cca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124000 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-22tdf#145274 FILEOPEN: Text properties are lostNoel Grandin
Revert "tdf#135683 speedup SwAttrHandler" This reverts commit b62153753a9f21afb2a49110ef0459e427b0b01a SwAttrHandler::RemoveFromStack breaks the assumption I made in creating the above commit Change-Id: I20ab532e1eae98c94f7c579755285262d46f2f91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124012 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-22return weld::Builder by unique_ptrNoel Grandin
Change-Id: Ifa4f5951d200eaad6c8aebd3f29eed053c927ff0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124051 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-22sw: remove useless debug code in SwTextShellMiklos Vajna
A debugger can be used to examine that temporary instead. Change-Id: I8c04144f5174564e232c5d5effe466ccf5e52468 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124037 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-10-22Optimize assignment from OUStringLiteral to OUStringStephan Bergmann
...by making the OUString's pData point to the OUStringLiteral, instead of copying the contained characters. This is one of the improvements that had not been done as part of e6dfaf9f44f9939abc338c83b3024108431d0f69 "Turn OUStringLiteral into a consteval'ed, static-refcound rtl_uString": "To keep individual commits reasonably manageable, some consumers of OUStringLiteral in rtl/ustrbuf.hxx and rtl/ustring.hxx are left in a somewhat odd state for now, where they don't take advantage of OUStringLiteral's equivalence to rtl_uString, but just keep extracting its contents and copy it elsewhere. In follow-up commits, those consumers should be changed appropriately, making them treat OUStringLiteral like an rtl_uString or dropping the OUStringLiteral overload in favor of an existing (and cheap to use now) OUString overload, etc." (Simply dropping the OUStringLiteral overload was not possible in this case, though, as that would have lead to ambiguities among the various OUString and std::u16string_view overloads.) The now-deleted OUStringLiteral rvalue reference overload means that some existing assignments from ternary-operator OUStringLiteral<N> to OUString no longer compile and had to be replaced with uses of std::u16string_view. Those had not already been replaced in e6dfaf9f44f9939abc338c83b3024108431d0f69 because they happened to use OUStringLiteral instances of identical length N in both arms of the ternary operator, so did not already start to fail to compile back then. Change-Id: I328e25b8324d045774e811d20a639f40d6a9a960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124040 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-22re-arrange BlockInfo a littleNoel Grandin
so that it is more likely that the interesting data is next to each other and thus in CPU cache (i.e. the control fields and the first few elements of the array) Change-Id: I50e46df3f639899e39f1b7733cf8e754d2435b4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124038 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-22tdf#144999 SwNavigator: Add way to collapse all categoriesJim Raykowski
This patch adds a context menu item that can be used to collapse the content tree to the root categories all at once. Change-Id: I15274e6db838e9e8503a79384bed4ffcf983041c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123811 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-10-21tdf#141634 Special end of para split for folded outline nodeJim Raykowski
After split place the cursor on a new blank line after the folded content and at the same level as the split outline node. Change-Id: I4073a1c0047ab8479993d8e605cc038896cd4630 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123747 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-10-21use sal_Int32 in BigPtrArrayNoel Grandin
now that it's only use-case is also using sal_Int32 Change-Id: I9c51bb8fd6b8f5713b84b1a1f0a216e676a73299 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123995 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-21Typo: pragraph->paragraphJulien Nabet
Change-Id: I8363b3f9f4f11e3f7447e8bc0853fa4928f8550c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124030 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-21introduce SwNodeOffset strong typedefNoel Grandin
for indexing into node children. Replaces various usage of sal_uLong, tools::Long, sal_uInt32 with an underlying type of sal_Int32. Also add a NODE_OFFSET_MAX constant to replace usage of ULONG_MAX Change-Id: I2f466922e1ebc19029bb2883d2b29aa4c0614170 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123892 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-21loplugin:flattenNoel Grandin
Change-Id: I3b4226a9d089ec9aedab95d96e50a068f57a76c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123991 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-21sw: avoid 'else' after 'break' in textboxhelperMiklos Vajna
Avoids a not necessary indentation. Change-Id: Idc8fb511b835f93532ae732254ee7815d38c48eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123907 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-10-20make more use of SwPaM::End()Noel Grandin
instead of open-coding the same thing Change-Id: I45ddc87317569c9ad6378eab1067ebea79c583f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123894 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-20svx: Don't end text edit mode for all viewsTomaž Vajngerl
This allows multiple views to not disturb each other editing inside a impress document. With the ending of text edit for all views still enabled, one view can cancel other views text editing just by moving or resizing a unrelated shape in the document. To make this possible we also need a view-local undo manager for the text edit mode, which is independent of the document undo manager. When the text edit mode ends, all the changes will be added as one change to the document undo stack. This prevents any conflicts in the undo stack that could be made when 2 views are editing the same document at the same time. This also adds the test for the new use case and changes the existing tests to reflect the change. Change-Id: I04edb4f91d7e111a490c946f7121cbca75f818d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123220 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-10-20loplugin:indentation check for indent inside blockNoel Grandin
look for places where the statements inside a block are not indented Change-Id: I0cbfa7e0b6fb194b2aff6fa7e070fb907d70ca2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123885 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-20tdf#145233 sw track changes: show moved text in green colorLászló Németh
and with double strikethrough or underlines during change tracking to speed up reviewing, e.g. re-ordered list elements or changed paragraph or sentence order is more visible this way. Note: skip terminating white spaces of the changes during recognition of the text movement, as a workaround for a typical difference resulted by e.g. Writer UX: selecting a sentence or a word, and moving it with the mouse, Writer removes a space at the deletion to avoid double spaces, also inserts a space at the insertion point automatically. Because the result can be different (space before and space after the moved text), compare the changes without terminating spaces. See also commit bcdebc832b272662d28035007a4796e42d1305ae "tdf#104797 DOCX change tracking: handle moveFrom and moveTo". Change-Id: If2a16f1f43315ecab659b24425692ac14bcda619 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123814 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>