home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
wordmstrco.tcl
< prev
next >
Wrap
Text File
|
1996-10-28
|
4KB
|
152 lines
#---------------------------------------------------------------------------
#
# (c) Westmount Technology 1994
#
# File: @(#)wordmstrco.tcl /main/hindenburg/4
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)wordmstrco.tcl /main/hindenburg/4 28 Oct 1996 Copyright 1994 Westmount Technology
# Start user added include file section
# End user added include file section
Class WordMstrConGen : {Object} {
constructor
method destructor
method generate
method section
attribute _section
}
constructor WordMstrConGen {class this name section} {
set this [Object::constructor $class $this $name]
$this _section $section
$section _contentsGenerator $this
# Start constructor user section
# End constructor user section
return $this
}
method WordMstrConGen::destructor {this} {
set ref [$this _section]
if {$ref != ""} {
$ref _contentsGenerator ""
}
# Start destructor user section
# End destructor user section
}
method WordMstrConGen::generate {this} {
set sect [$this _section]
set name [$sect uiName]
set docu [$sect document]
set word [[[docTool document] editor] wordObj]
if [catch {
set dest [[$this section] docLocation]
$word FileOpen $dest
if {[$word ViewMasterDocument] == 0} {
error "document not in 'Master Document View'"
}
$word EditSelectAll
$word EditClear
$word FormatStyle "Title Cover"
set title [$docu title]
$word SetDocumentProperty Title 0 "$title" 0
$word chkInsert $title
$word EndOfDocument
$word InsertPara
$word FormatStyle "Subtitle Cover"
$word TableInsertTable 0 2 2 = = = 167
$word chkInsert "Project:"
$word NextCell
$word chkInsert [[$docu project] name]
$word NextCell
$word chkInsert "Documented System:"
$word NextCell
$word chkInsert [[[$docu documentedSystem] system] name]
$word EndOfDocument
$word FormatStyle "Title Attributes"
$word TableInsertTable 0 2 8 1 = = 167
$word chkInsert "Title:"
$word NextCell
$word chkInsert [$docu title]
$word NextCell
$word chkInsert "Subject:"
$word NextCell
$word chkInsert [$docu subject]
$word NextCell
$word chkInsert "Reference:"
$word NextCell
$word chkInsert [$docu reference]
$word NextCell
$word chkInsert "Keywords:"
$word NextCell
$word chkInsert [$docu keywords]
$word NextCell
$word chkInsert "Authors:"
$word NextCell
$word chkInsert [$docu authors]
$word NextCell
$word chkInsert "Status:"
$word NextCell
$word chkInsert [$docu docStatus]
$word NextCell
$word chkInsert "Date:"
$word NextCell
$word chkInsert [$docu date]
$word EndOfDocument
$word FormatStyle "OT Normal"
$word InsertPageBreak
$word FormatHeadingNumbering = 3
$word FormatStyle "OT Hdg 1"
$word chkInsert "Table of Contents"
$word InsertPara
$word EditBookmark tblcnts 1 1 0 0
# insert sub documents here
$word ViewMasterDocument
foreach sect [[$this section] getTree] {
if {[$sect indentation] > 1} {
continue
}
$word InsertSubdocument [$sect docLocation]
$word EndOfDocument
}
$word EndOfDocument
$word FormatStyle "OT Body Text"
$word EditBookmark tblcnts 0 0 0 1
$word InsertTableOfContents
$word FileSaveAs
} msg] {
wmtkerror "Word Automation Error: $msg"
}
}
# Do not delete this line -- regeneration end marker
method WordMstrConGen::section {this args} {
if {$args == ""} {
return [$this _section]
}
set ref [$this _section]
if {$ref != ""} {
$ref _contentsGenerator ""
}
set obj [lindex $args 0]
if {$obj != ""} {
$obj _contentsGenerator $this
}
$this _section $obj
}