sw_redlinehide_4b: FindText() adapt the replace part as well
commit5e81b966778d82692b4763d892b457186a7f269d
authorMichael Stahl <Michael.Stahl@cib.de>
Mon, 10 Dec 2018 14:25:37 +0000 (10 15:25 +0100)
committerMichael Stahl <Michael.Stahl@cib.de>
Tue, 18 Dec 2018 16:55:29 +0000 (18 17:55 +0100)
tree21d412deb1ef1b51a535fedc197b01f7953a1136
parent77e67e7cd2baeca13c357fbda4c44a90db23de11
sw_redlinehide_4b: FindText() adapt the replace part as well

When redlining is enabled, the result will be a delete redline for the
existing text, and an insert redline for the new text; that much is
obious (and ReplaceRange can deal with a selection larger than one
SwTextNode easily, since it mostly adds redlines).

For the case when redlining is disabled, there are 2 options,
and i don't really know which is preferrable from UX point of view:

One approach is to reuse GetRanges() to ignore delete redlines in
the replace range; move its declaration to different header.

Another approach is to DeleteAndJoin() the existing delete redlines,
which is the same as the previous model based Hide mode,
which calls DeleteRedline() to remove the hidden redlines.

Also change ChgAutoCorrWord() to call DeleteSelImpl() directly.

Change-Id: I5974409d09eb39e04cc0b5dfc20d4db510e1cf58
sw/inc/crsrsh.hxx
sw/source/core/crsr/findattr.cxx
sw/source/core/crsr/findtxt.cxx
sw/source/core/doc/DocumentContentOperationsManager.cxx
sw/source/core/edit/acorrect.cxx
sw/source/core/edit/eddel.cxx
sw/source/core/inc/acorrect.hxx
sw/source/uibase/uiview/viewsrch.cxx