On 09/03/2010 08:27, fan Zheng wrote:
> Hi, All:
> 
> I have a question about the Change Recording (Redline), would you pls give
> me some tips on it?
> 
> As all we know, under the redline mode "Show", the content of all changes
> with type "Delete" recorded in the redline table of current document will
> still be visible in the context.
> 
> And if we change the redline mode from "Show" to "Hide", said "Delete" typed
> changes related content will be invisible by moving said content from main
> body of document into the segment of hided changes (SHC).
> 
> Said operation Hide for "Delete" changes was designed in 2 ways (Implemented
> in SwRedline::Hide()):
> A. Move delete changes related content from main body into SHC;
> B. Make a copy of delete changes related content in SHC, and remove the
> original content from main body;
> 
> Said design B is for almost all invoking of SwRedline::Delete(). And design
> A is only invoked in the SwDoc::CompressRedlines(), which is a method for
> combining the existed change records.
> 
> My question is, what do we concerned about to make the design of Hide in 2
> different ways?

this is a very interesting question.
in fact i have probably asked it myself :)
the problem is that nobody knows the answer... the original authors of the
sw redline code have left many years ago.

i can only speculate that in some cases there can be a difference whether
some range is moved or copied and then deleted.
for example, if the range contains frames, or footnotes, which have a
special section at the beginning at the nodes array for their content.
or maybe the reason has something to do with undo.

maybe there was a reason many years ago, but today that reason no longer
exists?

i guess the only way to find out would be to change the implementation to
do it only one way, and then test a lot to see what breaks.

actually, imho, the redline design in writer is fundamentally broken,
because the redlines are really part of the document model.
the option to change the redline mode from "Show" to "Hide" is purely a
view option, and should not change the document model in any way.

regards,
michael

-- 
"I conclude that there are two ways of constructing a software design:
 One way is to make it so simple that there are obviously no deficiencies
 and the other way is to make it so complicated that there are no obvious
 deficiencies." -- C. A. R. Hoare (in "The Emperor's Old Clothes")


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to