Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Conversion of text to italic or bold and back
Topic Summary:
Created On: 29-Jan-2007 18:33
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by Reik Schroeder, on Friday, February 2, 2007 3:43 PM

Answer:
Hi Krishna,

what do you think about a layout DXL column?
It should be a one liner

for italic:
displayRich("{\\i "(obj."Object Text""")"}");

for bold:
displayRich("{\\i "(obj."Object Text""")"}");

Greetings
Reik
 29-Jan-2007 18:33
User is offline View Users Profile Print this message


Krishna Kandala

Posts: 170
Joined: 8-Jul-2006

I am working on a module where the values of an attribute are to be converted to bold or italic, export the module to Word  where the text of the attribute values retains the same bold or italic format.  Once the export is done, I want to revert to the normal text for the attribute values in the DOORS module.
Will someone please help me which is the best way I can do?

Report this to a Moderator Report this to a Moderator
 31-Jan-2007 17:09
User is offline View Users Profile Print this message


Dan Hopping

Posts: 75
Joined: 21-Nov-2002

Are you sure you want to convert to non-bold in doors then change it back after export? Why not do it in Word?
Or just strip the bold indicator - export it and never change the actual object.
Also, you will have to view the actual RTF to be sure of your RTF string contents but the attached code will change an ENTIRE object text that is bold to unbold then change it back to bold again.
If you want to change multiple instances of bold \ unbold in a given object you'd have to modify this a bit.
I'm a little confused why you might want to do it, but hope this helps...
Dan
Report this to a Moderator Report this to a Moderator
 1-Feb-2007 16:52
User is offline View Users Profile Print this message


Krishna Kandala

Posts: 170
Joined: 8-Jul-2006

Thanks for the response , Dan. I'm sorry that I did not explain in detail what I wanted to do with the module. The module view has the Object text and another column for the attribute "Comments". I have to generate a Word document from this view with the comments in italic (or bold). I am able to generate a report with the attribute name "Comments" already in italics ( I believe this is built-in in the Export -  MS Office - Word operation), but the comments text is the same format as that in the module. I want to change the Comments text (which is an attribute value) in the module to italics by a DXL program, and after export to Word, change the text in the module back to normal format. I can do the same job manually going through the Word document, or think of a VBA script. However it is more convenient if I can do it in the module. 
I hope I made my requirement clear. I'll work on the code you suggested and give a feedback.
- Krishna

Report this to a Moderator Report this to a Moderator
 2-Feb-2007 07:39
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Answer Answer
Hi Krishna,

what do you think about a layout DXL column?
It should be a one liner

for italic:
displayRich("{\\i "(obj."Object Text""")"}");

for bold:
displayRich("{\\i "(obj."Object Text""")"}");

Greetings
Reik

-------------------------
Evosoft GmbH
for Siemens Industry Sector


Berlin, Germany
Report this to a Moderator Report this to a Moderator
 2-Feb-2007 15:42
User is offline View Users Profile Print this message


Krishna Kandala

Posts: 170
Joined: 8-Jul-2006

Hi Reik,  I am overwhelmed by the elaborate syntax required to be used for Rich Text and usually avoid using them. But this really is a simple solution.
Thank you

- Krishna
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 2 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.