Remove text background color

When I copy the requirements from another editor (e.g. MS Visual Express) I get a white background color, which is only visible, if the module is write protected:

 

How can I remove this background color in DOORS?

 

 


GrB - Tue Nov 24 06:51:54 EST 2015

Re: Remove text background color
DOORSHAM - Wed Feb 17 12:49:00 EST 2016

The brute force way is cut the Object Text to notepad then copy from notepad back to Object Text -- you can have lots of fun doing this to pass the time of day.

Or

As long as you do not want to preserve any richtext in Object Text you can use the following script:

 

Object o=current

o."Object Text" = o."Object Text"  ""

Re: Remove text background color
ChrisHardy68 - Mon Feb 22 17:37:17 EST 2016

Hi,

The above script is totally correct and will achieve the desired result.

However there is an built in way to correct the issue  if you don't feel comfortable with DXL.

You can use the built in "Swap Object Heading and Text"

Steps:

Select the objects and then select Edit -> Object -> "Swap Object Heading and Text" (There is also a button on the tool bar for this)

          This will swap the text to the Object Heading attribute.

With the object still selected  again select Edit -> Object -> "Swap Object Heading and Text"

          This will swap the heading back to the Object text attribute but the "hidden" formatting will have been removed.

I found this useful as sometime text imported from Word contains embedded tabs that can't be removed using Increase\decrease indent formatting options.

Hope that helps

Re: Remove text background color
PekkaMakinen - Tue Feb 23 05:36:02 EST 2016

ChrisHardy68 - Mon Feb 22 17:37:17 EST 2016

Hi,

The above script is totally correct and will achieve the desired result.

However there is an built in way to correct the issue  if you don't feel comfortable with DXL.

You can use the built in "Swap Object Heading and Text"

Steps:

Select the objects and then select Edit -> Object -> "Swap Object Heading and Text" (There is also a button on the tool bar for this)

          This will swap the text to the Object Heading attribute.

With the object still selected  again select Edit -> Object -> "Swap Object Heading and Text"

          This will swap the heading back to the Object text attribute but the "hidden" formatting will have been removed.

I found this useful as sometime text imported from Word contains embedded tabs that can't be removed using Increase\decrease indent formatting options.

Hope that helps

Using the Object Text / Object Heading swap does not work if you have long requirements. The Object Heading is of type String and thus has a length limit of about 1000 characters. DOORS will display a warning dialog on truncation if you try to swap attributes with Object Text so long that it won't fit into Object Heading. You can do the swap after the warning, but as said, the requirement text will be truncated.

Re: Remove text background color
tinker_n_time - Wed Feb 24 08:53:02 EST 2016

Would it not seem like the best approach would be to rub the offender noise into the screen while beating him with a rolled up newspaper.  You should treat him like a dog for not cleaning up his document before importing into DOORS.

 

Does this seem reasonable to you?

Re: Remove text background color
DOORSHAM - Fri Mar 04 09:40:37 EST 2016

Perhaps you will find that DOORS 9.6 will resolve the problem for you.

Re: Remove text background color
ChrisHardy68 - Tue Mar 08 17:09:57 EST 2016

PekkaMakinen - Tue Feb 23 05:36:02 EST 2016

Using the Object Text / Object Heading swap does not work if you have long requirements. The Object Heading is of type String and thus has a length limit of about 1000 characters. DOORS will display a warning dialog on truncation if you try to swap attributes with Object Text so long that it won't fit into Object Heading. You can do the swap after the warning, but as said, the requirement text will be truncated.

Hi @PekkaMakinen 2c62fe98-76da-481f-be77-55155704a095,

Yes, you are right, I forgot about the truncation and size limitation in Object Heading.

Re: 1000 char limit.  I also believed this until i was working on another issue and found that the upper limit of displayed characters is approx 813  and can be far less.

The issue is to do with embedded rich text.

Normally when you insert Object Heading info there is always some embedded rich text.

However when you swap Object Text to Object Heading the swap procedure just does a straight text copy and strips out all the rich test, and hence provides a greater max char count.

This can lead to the following scenario

         Create a new object

         Insert 813 chars in the Object text (don't use new lines)

        Swap the Object Text to Object Heading and save - no truncation message is received.

       Edit the Object Heading by adding one extra char and save - a truncation message is received, click OK and the Object Heading is truncated down to 785 displayed characters. This is because at the point of editing the embedded rich text is added back in.

 

Note: there were new lines in the original object text, the final number of characters decreases as for each new line the rich text markup "/par" is inserted as well as a new line so effectively decreasing the max number of displayed character by 5 for each new line.

This is also a functional glitch as if you manually insert Object Heady text you physically can not insert a new line, but if one is contain in Object Text that is swapped the new line is still swapped to the Object Heading

It not a major issue but one worth being aware of.

 

(FYI I am using DOORS 9.6.1.3)