I’m running into issues identifying when tabs occur. How does DOORS treat tabs in rich text paragraphs? My ultimate goal is to replace all tabs with a space. |
Re: Trouble sniffing out tabs in RTF
Why would you think that DOORS does not print tabs? When I execute the following code: (current Object)."Object Text" = richText "Line 1\\par\\tab Line 2\\par\\tab\\tab Line 3\\par"
Then I get the following result:
Line 1 Line 2 Line 3
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: Trouble sniffing out tabs in RTF Mathias Mamsch - Mon Nov 26 17:47:09 EST 2012
Why would you think that DOORS does not print tabs? When I execute the following code: (current Object)."Object Text" = richText "Line 1\\par\\tab Line 2\\par\\tab\\tab Line 3\\par"
Then I get the following result:
Line 1 Line 2 Line 3
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
I think the character AFTER the "\tab" must be a space, a slash \, or a bracket {}. I wonder if there are others. If it is a space you'd replace "\tab " with a space; otherwise replace "\tab" with a space. -Louie You can also replace the raw-text tabs '\t' in the rich text. There is some thread on that using replaceRichText(). |
Re: Trouble sniffing out tabs in RTF llandale - Tue Nov 27 13:00:15 EST 2012
Louie you are only partially correct! One space can be a terminator for multiple RTF control words, e.g. Test\line\tab test. If you replaced the space too then you would get Test\line test which will just remove the tab, not replace it by a space. So in this case you must not replace the space, even though a space is used as a terminator. The "delimiter" marks the end of an RTF control word or symbol. A delimiter can be one of the following: - A space. If a space delimits a control word, the space does not appear in the document. Any characters following the delimiter, including spaces, do appear in the document. For this reason, you should use spaces only where necessary; do not use spaces merely to break up RTF code. - A backslash (\), opening brace ({), or closing brace (}). These characters are used to mark the beginning of a new control word or symbol, the beginning of a group, and end of a group, respectively. More information about control symbols and groups is provided later in this document. - Any character other than a letter or a digit. In this case, the character terminates the control word but is not actually part of the control word. The character is considered part of the document text.
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|