Commit 9be9d042 authored by Claes Sjofors's avatar Claes Sjofors

Doc ORM, tag @Creator added

parent aefbeaf0
...@@ -1016,6 +1016,7 @@ void CnvReadWbl::doc_init() ...@@ -1016,6 +1016,7 @@ void CnvReadWbl::doc_init()
{ {
doc_cnt = 0; doc_cnt = 0;
strcpy( doc_author, ""); strcpy( doc_author, "");
strcpy( doc_creator, "");
strcpy( doc_version, ""); strcpy( doc_version, "");
strcpy( doc_code, ""); strcpy( doc_code, "");
strcpy( doc_summary, ""); strcpy( doc_summary, "");
...@@ -1038,7 +1039,7 @@ void CnvReadWbl::doc_init_keep() ...@@ -1038,7 +1039,7 @@ void CnvReadWbl::doc_init_keep()
int CnvReadWbl::doc_add( char *line) int CnvReadWbl::doc_add( char *line)
{ {
char line_part[4][80]; char line_part[10][80];
int nr; int nr;
int i; int i;
...@@ -1053,6 +1054,13 @@ int CnvReadWbl::doc_add( char *line) ...@@ -1053,6 +1054,13 @@ int CnvReadWbl::doc_add( char *line)
strcat( doc_author, line_part[i]); strcat( doc_author, line_part[i]);
} }
} }
else if ( strcmp( low(line_part[1]), "@creator") == 0) {
for ( i = 2; i < nr; i++) {
if ( i != 2)
strcat( doc_creator, " ");
strcat( doc_creator, line_part[i]);
}
}
else if ( strcmp( low(line_part[1]), "@version") == 0) { else if ( strcmp( low(line_part[1]), "@version") == 0) {
for ( i = 2; i < nr; i++) { for ( i = 2; i < nr; i++) {
if ( i != 2) if ( i != 2)
......
...@@ -176,6 +176,7 @@ class CnvReadWbl { ...@@ -176,6 +176,7 @@ class CnvReadWbl {
char bit_text[80]; char bit_text[80];
char bit_pgmname[80]; char bit_pgmname[80];
char doc_author[200]; char doc_author[200];
char doc_creator[200];
char doc_version[80]; char doc_version[80];
char doc_groups[10][40]; char doc_groups[10][40];
int doc_group_cnt; int doc_group_cnt;
......
...@@ -592,6 +592,11 @@ endl << ...@@ -592,6 +592,11 @@ endl <<
html_clf->f << html_clf->f <<
"<DT><B>" << Lng::translate("Author") << "</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" << ctx->rw->doc_author << "<DT>" << endl; "<DT><B>" << Lng::translate("Author") << "</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" << ctx->rw->doc_author << "<DT>" << endl;
} }
if ( ctx->rw->doc_fresh && strcmp( ctx->rw->doc_creator, "") != 0)
{
html_clf->f <<
"<DT><B>" << Lng::translate("Creator") << "</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" << ctx->rw->doc_creator << "<DT>" << endl;
}
if ( ctx->rw->doc_fresh && (strcmp( ctx->rw->doc_version, "") != 0 || if ( ctx->rw->doc_fresh && (strcmp( ctx->rw->doc_version, "") != 0 ||
strcmp( ctx->rw->class_version, "") != 0)) strcmp( ctx->rw->class_version, "") != 0))
......
...@@ -138,6 +138,11 @@ int CnvWblToPs::class_exec() ...@@ -138,6 +138,11 @@ int CnvWblToPs::class_exec()
tops.print_text( txt, tops.style[tops.ci].text); tops.print_text( txt, tops.style[tops.ci].text);
} }
if ( ctx->rw->doc_fresh && strcmp( ctx->rw->doc_creator, "") != 0) {
sprintf( txt, "%s %s", Lng::translate("Creator"), ctx->rw->doc_creator);
tops.print_text( txt, tops.style[tops.ci].text);
}
if ( ctx->rw->doc_fresh && strcmp( ctx->rw->doc_version, "") != 0) { if ( ctx->rw->doc_fresh && strcmp( ctx->rw->doc_version, "") != 0) {
sprintf( txt, "%s %s", Lng::translate("Version"), ctx->rw->doc_version); sprintf( txt, "%s %s", Lng::translate("Version"), ctx->rw->doc_version);
tops.print_text( txt, tops.style[tops.ci].text); tops.print_text( txt, tops.style[tops.ci].text);
......
...@@ -129,6 +129,12 @@ Lng::translate("Class") << " " << full_class_name << endl << ...@@ -129,6 +129,12 @@ Lng::translate("Class") << " " << full_class_name << endl <<
"<B>" << Lng::translate("Author") << "<T>" << ctx->rw->doc_author << endl; "<B>" << Lng::translate("Author") << "<T>" << ctx->rw->doc_author << endl;
} }
if ( ctx->rw->doc_fresh && strcmp( ctx->rw->doc_creator, "") != 0)
{
fp_tmp <<
"<B>" << Lng::translate("Creator") << "<T>" << ctx->rw->doc_creator << endl;
}
if ( ctx->rw->doc_fresh && strcmp( ctx->rw->doc_version, "") != 0) if ( ctx->rw->doc_fresh && strcmp( ctx->rw->doc_version, "") != 0)
{ {
fp_tmp << fp_tmp <<
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment