carriage returns and diff() function

Hello,

Is there a way to force the diff function to show color for a modified object; the only that has change is the addition of a carriage return?

Thank you,
Jim
SystemAdmin - Wed Oct 12 15:42:48 EDT 2011

Re: carriage returns and diff() function
llandale - Wed Oct 12 18:26:27 EDT 2011

A CR (EOL) is not displayed and therefore cannot be a certain "color". You cannot change the color of the MS-Word displayed Paragraph marks.

But I wonder what would happen if you replaced all the existing EOLs in the two texts with <EOL> followed by an EOL; you could then I suppose see which ones have been inserted, although you have the problem of seeing unmodified "<EOL>" in places that have not changed.

  • Louie

Re: carriage returns and diff() function
SystemAdmin - Thu Oct 13 02:04:48 EDT 2011

llandale - Wed Oct 12 18:26:27 EDT 2011
A CR (EOL) is not displayed and therefore cannot be a certain "color". You cannot change the color of the MS-Word displayed Paragraph marks.

But I wonder what would happen if you replaced all the existing EOLs in the two texts with <EOL> followed by an EOL; you could then I suppose see which ones have been inserted, although you have the problem of seeing unmodified "<EOL>" in places that have not changed.

  • Louie

Hello,

Is there no built-in find and replace function within DXL? Also when searching for '\r' I can't find any '\r' does DOORS only use '\n' for carriage returns (Enter Key)?
Thank you,
Jim

Re: carriage returns and diff() function
OurGuest - Thu Oct 13 06:21:55 EDT 2011

SystemAdmin - Thu Oct 13 02:04:48 EDT 2011
Hello,

Is there no built-in find and replace function within DXL? Also when searching for '\r' I can't find any '\r' does DOORS only use '\n' for carriage returns (Enter Key)?
Thank you,
Jim

DOORS Object Text doesn't use \r or \n.

The text is stored as RTF and thus the \r and \n are converted to RTF formatting.

Re: carriage returns and diff() function
Mathias Mamsch - Thu Oct 13 09:12:57 EDT 2011

OurGuest - Thu Oct 13 06:21:55 EDT 2011
DOORS Object Text doesn't use \r or \n.

The text is stored as RTF and thus the \r and \n are converted to RTF formatting.

More explicitly: In RTF \n is expressed as \\par and \r is expressed as \\line as far as I know. Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: carriage returns and diff() function
SystemAdmin - Thu Oct 13 09:37:57 EDT 2011

Mathias Mamsch - Thu Oct 13 09:12:57 EDT 2011
More explicitly: In RTF \n is expressed as \\par and \r is expressed as \\line as far as I know. Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Hint: to see of what RTF codes there are in the main column (Object Heading / Object Text) insert a new column (Insert / Column), select Layout DXL, select Browse and then from the Layout DXL Library browse "Display rich text codes".

Re: carriage returns and diff() function
llandale - Thu Oct 13 16:11:29 EDT 2011

SystemAdmin - Thu Oct 13 02:04:48 EDT 2011
Hello,

Is there no built-in find and replace function within DXL? Also when searching for '\r' I can't find any '\r' does DOORS only use '\n' for carriage returns (Enter Key)?
Thank you,
Jim

No there is no such built in function.

It does not make sense to me to do a "diff" on rich text; I wonder how you should show the difference between "shall" and "shall" with underscores and strikeouts; or worse yet shall with shall. No, "diff" is best done on raw text. Perhaps someone can show an example of a useful "diff"erence in rich text; interpreting instead of displaying all the RT-tags; I would find that rather interesting.

End of lines in the raw text are equal to '\n'; as are I believe line-feed. I don't think I've ever retrieved raw text from an object and seen an '\r' character; but maybe someone will prove me wrong.

Paragraph characters in word are the object boundaries when imported into DOORS. LF characters are preserved in the same object, but become '\n' characters once in DOORS.

  • Louie

When I first started with DOORS I was tasked with changing all reference of "ITT" to "ITTL" in all the requirements. Well, if you do that twice you end up with "ITTLL", so I had to enhance my 'replace' function to handle when the search string is a sub-set of the replace-string, and not do the replace when its already in the code. Sometime later I ran into the problem of looking for rich text tags e.g. "\\par ", when I realized that its not a paragraph definition when it looks like "\\\par ", but again it is when its "\\\\par ". Yuuuck. I saw the quagmire and confinced the powers to do something else.