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: Change Text Type to Default Style
Topic Summary:
Created On: 19-Sep-2002 13:49
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 Louie Landale, on Monday, September 23, 2002 9:14 PM

Answer:
I don't understand "Rich Text" so now I'm guessing:

It appears when you import from MS-Word and the paragraphs have non-default font settings, that these settings are imported into DOORS thus producing non-default fonts in the objects. Your user >>Tools >>Options >>Display >>Fonts seem to be how you view default fonts.

Anyway, to set the object text of a single object to "default font", the following simple code looks like it works:

// StripFormatting.dxl
/*
Strip the current object text of all formatting.
*/
Object oCurr = current
String Text = oCurr."Object Text"
oCurr."Object Text" = Text
// end file StripFormatting.dxl

This will also rid the text of all other formating, such as BOLD and UNDERLINING. Put those 8 DXL lines of code in a text file "StripFormatting.dxl", and put the file in the folder:
c:\Program Files\Telelogic\Doors 6\lib\dxl\addins\user\
Now when you open the module your >>user menu (next to the >>Tools menu) should have the script. Select the current object and run the script >>User>>StripFormatting.

- Louie
 19-Sep-2002 13:49
User is offline View Users Profile Print this message


Marc Battistello

Posts: 13
Joined: 19-Sep-2002

How do I change imported text back to the "default" text style. I have imported some documents into DOORS from Word and some of the text is Times New Roman and some is Arial. I would like to make all the text the same style but I dont know how to change the text style in DOORS?

Thanks
Report this to a Moderator Report this to a Moderator
 20-Sep-2002 15:20
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Very curious. I was under the impression that font information was NOT a feature of the text, but was rather a view option of the current user: I can view font one way and you another via our respective "options".

Any chance you can make a copy of this module, delete all but a couple of the objects that display the different fonts, archive it and send it to me? Also, if you could take a screen shot of the module showing the differences and send that as well: alt+PrintScreen; paste special in MS-Word, send the MS-Word file?

- Louie
Report this to a Moderator Report this to a Moderator
 20-Sep-2002 22:17
User is offline View Users Profile Print this message


Marc Battistello

Posts: 13
Joined: 19-Sep-2002

Attached is a word file with a screen shot and also a archive file with the two objects with different font styles.

Thanks

Edited: 20-Sep-2002 at 22:21 by Marc Battistello
Report this to a Moderator Report this to a Moderator
 23-Sep-2002 16:10
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Answer Answer
I don't understand "Rich Text" so now I'm guessing:

It appears when you import from MS-Word and the paragraphs have non-default font settings, that these settings are imported into DOORS thus producing non-default fonts in the objects. Your user >>Tools >>Options >>Display >>Fonts seem to be how you view default fonts.

Anyway, to set the object text of a single object to "default font", the following simple code looks like it works:

// StripFormatting.dxl
/*
Strip the current object text of all formatting.
*/
Object oCurr = current
String Text = oCurr."Object Text"
oCurr."Object Text" = Text
// end file StripFormatting.dxl

This will also rid the text of all other formating, such as BOLD and UNDERLINING. Put those 8 DXL lines of code in a text file "StripFormatting.dxl", and put the file in the folder:
c:\Program Files\Telelogic\Doors 6\lib\dxl\addins\user\
Now when you open the module your >>user menu (next to the >>Tools menu) should have the script. Select the current object and run the script >>User>>StripFormatting.

- Louie
Report this to a Moderator Report this to a Moderator
 24-Sep-2002 00:42
User is offline View Users Profile Print this message


Michael Sutherland

Posts: 248
Joined: 13-Sep-2002

I have seen a similar problem in some of my DOORS 5.2 Modules.

There is a Module level Attribute called "Font Table" that may appear in a Module. Entries accumulate from text which is imported or pasted in from word processors. In the Modules where I was experiencing the problem, the "Font Table" Attribute contained a rather long list of entries such as:

{\f11\fswiss\fcharset0 Arial;}

I used the following DXL command:

deleteFontTable( current Module )

which cleaned up the "Font Table" and solved the problem for my Modules.

All Rich Text is preserved.


-------------------------
Michael Sutherland
michael@galactic-solutions.com
http://galactic-solutions.com
Report this to a Moderator Report this to a Moderator
 10-Oct-2002 00:22
User is offline View Users Profile Print this message


Michael Sutherland

Posts: 248
Joined: 13-Sep-2002

Marc,

Is this still a problem for you? If so, what version of DOORS are you seeing it on?

I just upgraded to DOORS 6.1 SR1 and am seeing problems with Rich Text markup, including Fonts. For the record, Rich Text does allow for embedded Font tags, which controls the Font (but not the SIZE) of the Text in a DOORS Object. For example, when you Insert->Symbol, this is another Font, and is tagged as such in the hidden Rich Text Markup of the Object.

I have written a script to clean up Rich Text Markup, similar to the DOORS 5 function <lib/dxl/standard/doctools/symbconv.dxl>, which helps eliminate non-default Fonts in Rich Text. Mine differs a bit because it preserves Symbol Font characters.

If you or anyone else is still having the problem, please let me know.

-------------------------
Michael Sutherland
michael@galactic-solutions.com
http://galactic-solutions.com
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 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 1 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.