summaryrefslogtreecommitdiff
path: root/sw/inc/redline.hxx
AgeCommit message (Collapse)Author
2024-09-03SwRedlineHint is deadNoel Grandin
ever since commit 43a36b36986dd2112fc90340e7a8a11ea5369def Author: Robert Roth <robert.roth.off@gmail.com> Date: Mon Nov 1 02:50:47 2010 +0200 Commented out code, bogus comments removed, some german comments translated. Change-Id: I9a6424080728ee42e1705e144cd53aa6069f2abe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172826 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-08-12SwContentIndex owner pointersNoel Grandin
we already have two things that "own" a SwContentIndex, for which we store a pointer in the SwContentIndex. I want to add more things, so rather than add more fields to a very heavily used structure, generalise the mechanism so we can store a single field (since only thing at a time will ever own a SwContentIndex). Also add an enum and a GetOwnerType() method so I can avoid dynamic_cast, this is a pretty performance-sensitive area. Change-Id: Ifb03a06b0bb69a325f41a8041e9d23cfc82c3268 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171606 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-11tdf#157664 Drop operator != where respective operator == is definedTuukka Orava
Change-Id: Id0313cbaf399af94df7ced18a8ad55deec53be33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164638 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-03-05make more symbols private in writerNoel Grandin
Change-Id: I2c4745910fc3654f2021e77f9fa590d3da3464ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163749 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-30Fix typoAndrea Gelmini
Change-Id: I0ea74d87f66554cedf1b1bff86e58bb3e78a3010 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158634 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-10-29tdf#157663 SW: Tracked change improve moveAttila Szűcs
Made accept/reject handle move redlines other pair, (moveto-movefrom) and handle the whole move redline, even if it is split into small pieces that separated from each other. Added unique ID to every move redline to help find their other parts. This move ID is generated in case of: move recognition moveing a paragraph. (directly create move redline with unique id without calling the recognition it is faster and more stable) (there are other cases that could be improved to not use recognition, but generate ID directly, like moveing selected partial text with mouse) Implemented the odt export/import of this move ID. it is a tag like this: "<loext:move-id>4</loext:move-id>" next to creator/date Improved the docx import to generate this move ID, so move redlines can find their other parts (Not changed Docx export... it works a bit, but far from perfect) Improved move reckognition: It can find them even if they are split into multiple parts differently. (like "ab"+"cd" == "a"+"bcd") Disabled this because of probably performance issue. made a complex unit test for it. Note: Left the move recognition on every place, to avoid as much regressions as possible.. but in the future, we may can disable it in some cases. Note2: We will have to keep move recognitnion, because there are documents from past, saved without any move informations in the file, and users expect to see move redlines there. (generated by the recognition.) Change-Id: If968d4235b676c5e538cfaf4187a4482a86eae9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157740 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158611 Tested-by: Jenkins
2023-10-14tdf#157662 SW: redline: accept/reject done for all partsAttila Szűcs
Tracked changes divided into smaller parts when they are overlapping. But if the Author, and Change time, and some more is equal, then they can be combined into 1 change later.. Modified AcceptRedline / RejectRedline, to seek for all these parts that are neightbour to each other, and can be combined, and reject/accept them all at once. Even those that are deepen in the tree. i.e.: insert that have a delete redline too. when rejecting an insert redline, that have a delete redline too, the delete redline is accepted instead. (have the same result.) when accepting an insert redline, that have a delete redline too, The delete redline remains, while the insert is deleted. (=accepted) made some limitations to lessen the probability of regression: No anonym, No table, No seqNo, and dont use it in RejectAll/AcceptAll Added unittest to check that accept/reject handle more redlines at once, but not too many.. Change-Id: Ibd0a39f7847b22b279a797babb30ba162e70a513 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157950 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-09-08sw doc model xml dump: show all redline data of a range redlineMiklos Vajna
E.g. Alice does an insert, then Bob does a delete in the middle, then the deletion redline will have 2 redline data, the first will be the delete, the second will be the original insert, show this in the xml dump. Change-Id: Ide9777cdbc8a5460fe28c646104901c968a33382 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156680 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-08tdf#136904 tdf#116084 tdf#121176 sw: fix Undo & anonymized w:del in w:insLászló Németh
Undo/Redo crash resulted by the workaround for anonymized w:del in w:ins. Anonymized (no time stamp) redlines are loaded with Epoch time (1970-01-01) since commit 2c51746997478ad5d0e7cc64aa6489769c473d43 "tdf#146171 DOCX: fix loss of change tracking, if no date", so it's possible to fix the original DOCX import problem using this value: don't combine anonymized deletion inside/over anonymized insertion, and remove all the workaround, keeping only their adjusted unit tests, and add new tests for the export fixed finally, which keeps anonymized w:del in anonymized w:ins. Revert commit 2de1fd7d8b8bd42c66190140cc4506df0c3367f1 "tdf#125187 DOCX track changes: fix w:del within w:ins", commit df4f405a153603551f67e289bbaccf9ac39b923c "tdf#121176 DOCX track changes: same size w:del in w:ins" and commit 7a810d6a9fb79a24d00e5dbd8e1223e6f8b09677 "tdf#116084 DOCX track changes: fix w:del within w:ins". Regression from commit 2de1fd7d8b8bd42c66190140cc4506df0c3367f1 "tdf#125187 DOCX track changes: fix w:del within w:ins". See also commit 64dcedcf7c073d1819794d68a33651b14877e1b5 "tdf#147760 tdf#142902 DOCX export: anonymize date and moveFromRangeStart". Change-Id: Id6e41187e7f94154389f24dd525067ac47ec7e58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148479 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2022-10-07use more unique_ptr in GetAllValidRangesNoel Grandin
Change-Id: I59f6afb5b39779a58d2b0ea47b524df299e1c0d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141050 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-08unique_ptr->optional in SwRangeRedlineNoel Grandin
Change-Id: I4d4c55eef6e6b56634766bc57f11539ece9dc20d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137940 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-04clang-tidy modernize-pass-by-value in swNoel Grandin
Change-Id: Ie5c250c64f95e649d33d3f3da7b54e81a4b81d0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137781 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-02introduce SwPosition::SetRedlineNoel Grandin
as part of the process of hiding the internals of SwPosition largely done by doing: git grep -lF 'nContent.SetRedline' | xargs perl -pi -e 's/\bnContent\.SetRedline/SetRedline/g' Change-Id: If4d774959b0cc0fb87040f8f91c094dcd830dcd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137698 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-27tdf#119840 Store pointer to redlineNoel Grandin
in SwContentIndex, so we can walk the sw::Ring of SwContentIndex attached to a SwContentNode, which is considerably faster than scanning the redline array. Shaves 10% off load time Change-Id: I98c9815d98846862280f5a2b0a656667cf63f05d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137438 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-21shrink size of SwRangeRedlineNoel Grandin
by re-arranging members, remove holes in the structure Change-Id: I934d4867f29bdd1bfd4e6afb8d8ed0ccc88ca219 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137282 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-16tdf#148032 sw: add redline comment for tracked commentsLászló Németh
Tracked insertion/deletion of comments were shown as plain text insertion/deletion in that case, too, when there is no other text change in the redline (only the invisible placeholder character CH_TXTATR_INWORD of the comment). This was fixed by the new action icons of the Manage Changes dialog window before, but for better accessibility, now redline of a newly inserted/deleted comment gets also a redline comment "Comment added"/"Comment deleted", shown in Manage Changes dialog window with the Comment added/Comment deleted action icons, as suggested by Heiko Tietze. Note: because the redline comment (at least the tracked insertions) are stored in the document, this is a back-compatible solution. Follow-up to commit 128d3b454467e34538903b2eab45e866f976b314 "tdf#73125 sw: add Insert/Delete Comment Manage Changes action icons". Change-Id: I7a9e82ae1b9519e4883956f69de0aafc289f7f99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131659 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2021-11-23tdf#145719 sw: track moved text in import and ChangesInMarginLászló Németh
Recognize moved text by accessing to the hidden redline content pContentSect during ODT import (in the case of Delete redlines) and ChangesInMargin mode (Delete or Insert redlines depending on Deletion in Margin or Insertion in Margin modes). Fix Undo and redline stack handling by moving IsMoved bit to SwRedlineData from SwRangeRedline. Note: .fodt format is applicable for the unit test document, because it's not affected by the problem. Change-Id: Ifd4f993520bec4b845d978a844c465509ea87b50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125552 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-11-17tdf#145718 sw, DOCX import: complete tracked text movingLászló Németh
Add IsMoved bit to SwRangeRedline, and keep it in both parts of a split Delete/Insert redline. Set this bit during DOCX import, fixing incomplete import of moveFrom/moveTo elements. Details: - Search text moving only at redline Insert() and AppendRedline() instead in the layout code (which was much slower, because triggered by also mouse hovering): - detect text moving in Hide Changes mode, too; - Insertion inside or directly after tracked text moving keeps "moved text" layout of the original moved text parts (before and after the insertion). - at detection of text moving, invalidate (update) layout of the redline pair, too. - fix DOCX import: extend makeRedline() with property RedlineMoved to keep all moveFrom/moveTo stored in DOCX instead of losing them (joining them with normal redlines) in the case of missing Delete/Insert pair (see unit test document); Follow-up to commit ec577f566fa3e6d2666069180f8ec8474054aea9 "tdf#145233 sw track changes: show moved text in green color", commit bcdebc832b272662d28035007a4796e42d1305ae "tdf#104797 DOCX change tracking: handle moveFrom and moveTo" and commit d32d9a2b3c5e3963f4a18f6c7bbf50fab2e9b2be "tdf#123460 DOCX track changes: moveFrom completely". Change-Id: Iaca80e5e326a172bc7ba5fec64b63668b9378e2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125317 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
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-06-18loplugin:finalclasses in swNoel Grandin
Change-Id: I5f228e839e0d5a51ece868b55715b04f0affc28d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117397 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-24tdf#42949 Fix new IWYU warnings in directory swGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I4bb84c3f401aba8a3dede9cec3a7f2187a2ba02a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106473 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-10-28convert some more long -> tools::LongNoel
grepping for stuff in template params this time Change-Id: Ia37bfd85480b3a72c3c465489581d56ad8dde851 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104855 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-20use tools::Long in swNoel
Change-Id: I44be72b3a9b14823ec37a3c799cffb4fb4d6e1de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104527 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-15tdf#34355 sw,offapi,officecfg: show track changes in marginLászló Németh
In ShowTrackedChanges mode, hide tracked deletions in text optionally and show their shortened text in margin next to the vertical "Changed line" mark (showing only the first deletion of the line). Add "Tracked deletions in margin" checkbox to Writer->View page. Add "Display tracked changes" and "Outline View" sections to View, too. Add property ShowChangesInMargin to com::sun::star::text::ViewSettings. Add config setting: org/openoffice/Office/Writer/Content/Display/ShowChangesInMargin Show more information in Manage Changes dialog window about the tracked deletions with restricted visibility in ShowChangesInMargin mode: show shortened text content of a deletion in its (otherwise empty) Comment field. Change-Id: I1d19a4bf8225f536a635c6dd5062344c51e03b79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104350 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-09-30SwPaM::GetDoc can return a reference insteadCaolán McNamara
and remove discovered redundant null checks Change-Id: Iac8ad7821d9acfcc9550a96402c02ac248f16f2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103672 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-29sw: prefix members of CompareNodeContent, SwDDEFieldType, ...Miklos Vajna
... SwDropDownField and SwRangeRedline See tdf#94879 for motivation. Change-Id: Ic38825413d5725a143a2a7f81f0d464984e231e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97360 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-05-29pack a few more classesNoel Grandin
Change-Id: Ia7870d1d0d91de213727116ccda5b41913223866 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95097 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-13Revert "loplugin:constfields in sw"Noel Grandin
This reverts commit 4969f4c0d3e2581aaa8a5b5a5769840fa6b6f8ea. Change-Id: I527e9366b05e8a20633720e334395b285991c524 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90473 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-21Drop o3tl::optional wrapperStephan Bergmann
...now that macOS builds are guaranteed to have std::optional since 358146bbbd1b9775c12770fb5e497b6ec5adfc51 "Bump macOS build baseline to Xcode 11.3 and macOS 10.14.4". The change is done mostly mechanically with > for i in $(git grep -Fl optional); do > sed -i -e 's:<o3tl/optional\.hxx>\|\"o3tl/optional\.hxx\":<optional>:' \ > -e 's/\<o3tl::optional\>/std::optional/g' \ > -e 's/\<o3tl::make_optional\>/std::make_optional/g' "$i" > done > for i in $(git grep -Flw o3tl::nullopt); do > sed -i -e 's/\<o3tl::nullopt\>/std::nullopt/g' "$i" > done (though that causes some of the resulting #include <optional> to appear at different places relative to other includes than if they had been added manually), plus a few manual modifications: * adapt bin/find-unneeded-includes * adapt desktop/IwyuFilter_desktop.yaml * remove include/o3tl/optional.hxx * quote resulting "<"/">" as "&lt;"/"&gt;" in officecfg/registry/cppheader.xsl * and then solenv/clang-format/reformat-formatted-files Change-Id: I68833d9f7945e57aa2bc703349cbc5a56b342273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89165 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-01Introduce o3tl::optional as an alias for std::optionalStephan Bergmann
...with a boost::optional fallback for Xcode < 10 (as std::optional is only available starting with Xcode 10 according to <https://en.cppreference.com/w/cpp/compiler_support>, and our baseline for iOS and macOS is still Xcode 9.3 according to README.md). And mechanically rewrite all code to use o3tl::optional instead of boost::optional. One immediate benefit is that disabling -Wmaybe-uninitialized for GCC as per fed7c3deb3f4ec81f78967c2d7f3c4554398cb9d "Slience bogus -Werror=maybe-uninitialized" should no longer be necessary (and whose check happened to no longer trigger for GCC 10 trunk, even though that compiler would still emit bogus -Wmaybe-uninitialized for uses of boost::optional under --enable-optimized, which made me ponder whether this switch from boost::optional to std::optional would be a useful thing to do; I keep that configure.ac check for now, though, and will only remove it in a follow up commit). Another longer-term benefit is that the code is now already in good shape for an eventual switch to std::optional (a switch we would have done anyway once we no longer need to support Xcode < 10). Only desktop/qa/desktop_lib/test_desktop_lib.cxx heavily uses boost::property_tree::ptree::get_child_optional returning boost::optional, so let it keep using boost::optional for now. After a number of preceding commits have paved the way for this change, this commit is completely mechanical, done with > git ls-files -z | grep -vz -e '^bin/find-unneeded-includes$' -e '^configure.ac$' -e '^desktop/qa/desktop_lib/test_desktop_lib.cxx$' -e '^dictionaries$' -e '^external/' -e '^helpcontent2$' -e '^include/IwyuFilter_include.yaml$' -e '^sc/IwyuFilter_sc.yaml$' -e '^solenv/gdb/boost/optional.py$' -e '^solenv/vs/LibreOffice.natvis$' -e '^translations$' -e '\.svg$' | xargs -0 sed -i -E -e 's|\<boost(/optional)?/optional\.hpp\>|o3tl/optional.hxx|g' -e 's/\<boost(\s*)::(\s*)(make_)?optional\>/o3tl\1::\2\3optional/g' -e 's/\<boost(\s*)::(\s*)none\>/o3tl\1::\2nullopt/g' (before committing include/o3tl/optional.hxx, and relying on some GNU features). It excludes some files where mention of boost::optional et al should apparently not be changed (and the sub-repo directory stubs). It turned out that all uses of boost::none across the code base were in combination with boost::optional, so had all to be rewritten as o3tl::nullopt. Change-Id: Ibfd9f4b3d5a8aee6e6eed310b988c4e5ffd8b11b Reviewed-on: https://gerrit.libreoffice.org/84128 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-04loplugin:finalclasses in sw/incNoel Grandin
Change-Id: I084502d8c5607f103ef987b54252ef95341f0bef Reviewed-on: https://gerrit.libreoffice.org/81981 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-03find symbols that can be privateNoel Grandin
update the script and make private standalone functions Change-Id: Icb26ce258107700c90f89ad4e0d3329d075a2eb1 Reviewed-on: https://gerrit.libreoffice.org/81879 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-23tdf#127101 Change tracking: fix format reject at paragraph joinLászló Németh
Now "Reject tracked change" can restore the original format of multiple paragraphs of a tracked deletion during editing. Change-Id: I83a307b4206ab610af3458f8cb6e9de905b88776 Reviewed-on: https://gerrit.libreoffice.org/77101 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-07-17loplugin:unusedmethodsNoel Grandin
Change-Id: Ie2285f64919d1c83b0a8df4ceb827f731e5cd609 Reviewed-on: https://gerrit.libreoffice.org/75739 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-09tdf#126243 DOCX: export/reject tracked paragraph style changeLászló Németh
Fix loss of rejection data (w:pStyle in w:pPrChange) during DOCX export, also fix missing rejection of tracked paragraph style changes during editing. Change-Id: I8e6dc4e6d14e3237ff82d370f55031dcc12418c0 Reviewed-on: https://gerrit.libreoffice.org/75303 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-05-23convert nsRedlineType_t to scoped enumNoel Grandin
and move the auto-format embedded flag to a separate field Change-Id: I02155702389178fbfdf874f592d47a29f8759974 Reviewed-on: https://gerrit.libreoffice.org/72771 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-28use the xmlTextWriterPtr typedef consistentlyNoel Grandin
this is the single biggest chunk of stuff my upcoming paramtypedef loplugin will warn about, so do it separately Change-Id: I412e69e76406d6d947101885d4cd92c65e021508 Reviewed-on: https://gerrit.libreoffice.org/68486 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-03loplugin:constfields in swNoel Grandin
Change-Id: I1eb6583bb9ec815bc0564b0d7c676f5b1fb9045f Reviewed-on: https://gerrit.libreoffice.org/61177 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-24sw: prefix members of SwRedlineExtraData_Format, ...Miklos Vajna
... SwRedlineExtraData_FormatColl and SwRedlineExtraData_FormattingChanges. Change-Id: I7dedf293ba06879985d4652e073642d5a15d97ca Reviewed-on: https://gerrit.libreoffice.org/60922 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-09-19sw_redlinehide_2: fix frame updates for SwUndoRedlineDeleteMichael Stahl
There is a special case where the redline that is inserted doesn't have a valid range and then it's split up inside AppendRedline(), in SwRedlineTable::InsertWithValidRanges(). This happens for example with a selection that includes a section start node but not its end node (or vice versa). This breaks the UpdateFramesForRemoveDeleteRedline() / UpdateFramesForAddDeleteRedline() because they assume that the given range is one SwRangeRedline; the result is duplicate text frames. This could be worked around by iterating the SwRangeRedline in the given PaM, but for the Remove case there is the additional complication that the redlines are actually removed by the time the function is called. So rework the implementation of DeleteAndJoinWithRedlineImpl() to call the part of InsertWithValidRanges() that does the splitting into multiple redlines (extracted into new sw::GetAllValidRanges()) and create multiple SwUndoRedlineDelete actions, each of which now updates the frames properly. Also clean up the horrible group-undo code to group before inserting, instead of after-the-fact cleanup. Change-Id: Ia279910e0c74edabe56b0c4cf87dbbad688179da
2018-09-19sw_redlinehide_2: invalidate when delete redline goes awayMichael Stahl
Add another new hint sw::RedlineUnDelText; the main use case is to send it from DocumentRedlineManager::DeleteRedline() so the view is updated accordingly. Change-Id: Ia490116588dc8d3c695ec83c0c2ce8497736f76e
2018-09-10sw: prefix members of SwRedlineDataMiklos Vajna
Change-Id: Idf21b7f3330fdc4ecca6245494a788a33efee2a7 Reviewed-on: https://gerrit.libreoffice.org/60236 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-04-25sw: fix remaining IWYU warnings in inc/*.hxxMiklos Vajna
Also check for not needed forward declarations. Change-Id: I92759f3f40d9458fd192665b39b87a78d8b97e5a Reviewed-on: https://gerrit.libreoffice.org/53418 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-03-09sw: fix some IWYU warningsMiklos Vajna
Change-Id: Idb8ad6cda75b7112280ae71b4340d0187a602794 Reviewed-on: https://gerrit.libreoffice.org/50974 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-03-05sw: prefix members of SwFontAccess, SwFontObj and SwRangeRedlineMiklos Vajna
Change-Id: I6440ea8d4fab730f3335d69c7f434684f7d6874b Reviewed-on: https://gerrit.libreoffice.org/50763 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-03-05bccu#3100: Writer: Change tracking boxes aren't repositioned with editingTamás Zolnai
Emit a notification related to the node position change, so the track changes comment box is repositioned when the text node changes it's position. Change-Id: I34b5ec453b3dc43895865f15d71aaead46ae6f24 Reviewed-on: https://gerrit.libreoffice.org/50640 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-01-12More loplugin:cstylecast: swStephan Bergmann
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I0f49d21dfdf82742f11b27709f74294feb1e419e
2018-01-03loplugin:passstuffbyref more return improvementsNoel Grandin
slightly less restrictive check when calling functions Change-Id: I35e268ac611797b1daa83777cda02288a635aa32 Reviewed-on: https://gerrit.libreoffice.org/47259 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-21Fix typosAndrea Gelmini
Change-Id: I40b3a46d46f0586d086bdbe41876c088f8c1cb58 Reviewed-on: https://gerrit.libreoffice.org/45007 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2017-11-07ofz#4066 Bad-castCaolán McNamara
and a cluster of others around here. This pRedl has been deleted at this point. This doesn't matter for most users, seeing as !LibreOfficeKit::isActive() is the usual case so the deleted pRedl isn't fully accesssed. Because the deleted pRedl won't be found in GetRedlineTable when deleted, rework this a little to avoid the problem. Change-Id: I5c2f405cdae0b0c804ee7452629a14206516962d Reviewed-on: https://gerrit.libreoffice.org/44390 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>