Orb/Doxygen/src/xmlditadocvisitor.cpp
author Michel Szarindar <Michel.Szarindar@Nokia.com>
Thu, 18 Mar 2010 18:26:18 +0000
changeset 1 82f11024044a
parent 0 42188c7ea2d9
permissions -rw-r--r--
Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
     1
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
     2
#include "xmldita.h"
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
     3
#include "xmlditadocvisitor.h"
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
     4
#include "xmlditatrace.h"
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
     5
#include "docparser.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
     6
#include "language.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
     7
#include "doxygen.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
     8
#include "outputgen.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
     9
#include "xmlgen.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    10
#include "dot.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    11
#include "message.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    12
#include "util.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    13
#include <qfileinfo.h> 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    14
#include "parserintf.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    15
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    16
//#define DITA_DOT_HACK_REMOVE_XREFS
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    17
#undef DITA_DOT_HACK_REMOVE_XREFS
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    18
// If 0 there is no <simpletable> support
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    19
// Need to lazily evaluate this so that <simpletable> is only written if
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    20
// there is content in the table
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    21
#define DITA_SIMPLETABLE_SUPPORT 0
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    22
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    23
XmlDitaDocVisitor::XmlDitaDocVisitor(XmlStream &s,CodeOutputInterface &ci) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    24
  : DocVisitor(DocVisitor_XML), xmlStream(s), xmlElemStack(s), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE), 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    25
    m_insideParamlist(FALSE), paramMap(), paramDict(), currParam()
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    26
{
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    27
	paramDict.setAutoDelete(true);
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    28
}
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    29
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    30
 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    31
  //--------------------------------------
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    32
  // visitor functions for leaf nodes
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    33
  //--------------------------------------
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    34
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    35
void XmlDitaDocVisitor::visit(DocWord *w)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    36
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    37
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visit(DocWord*)", w)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    38
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    39
		return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    40
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    41
	// Catches normal text (text outside of a tag or command)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    42
	// and puts it in a "p"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    43
	if (xmlElemStack.isEmpty()) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    44
		visitPreDefault("p");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    45
	}	
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    46
	write(w->word());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    47
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    48
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    49
void XmlDitaDocVisitor::visit(DocLinkedWord *w)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    50
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    51
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visit(DocLinkedWord*)", w)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    52
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    53
		return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    54
	}
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    55
	//printf("XmlDitaDocVisitor calling startLink() DocLinkedWord=`%s'\n", w->word().data());
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    56
	Definition *d = w->getDefinition();
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    57
	if (0) {
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    58
		QString myName;
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    59
		myName = d->qualifiedName();
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    60
		//printf("XmlDitaDocVisitor calling startLink() DocLinkedWord [name]=`%s'\n", myName.data());
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    61
		startLink("", myName, "");
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    62
	} else {
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    63
		//printf("XmlDitaDocVisitor calling startLink() DocLinkedWord [file]=`%s'\n", w->file().data());
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    64
#if DITA_SUPRESS_NAMESPACE_LINKS
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    65
		if (w->file().find("namespace") != 0) {
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    66
			startLink(w->ref(), w->file(), w->anchor());
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    67
		}
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    68
#else
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    69
		startLink(w->ref(), w->file(), w->anchor());
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    70
#endif
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    71
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    72
	write(w->word());
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    73
#if DITA_SUPRESS_NAMESPACE_LINKS
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    74
	if (w->file().find("namespace") != 0) {
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    75
		endLink();
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    76
	}
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    77
#else
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    78
	endLink();
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    79
#endif
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    80
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    81
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    82
void XmlDitaDocVisitor::visit(DocWhiteSpace *w)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    83
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    84
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visit(DocWhiteSpace*)", w)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    85
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    86
		return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    87
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    88
	if (m_insidePre) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    89
		write(w->chars());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    90
	} else {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    91
		write(" ");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    92
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    93
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    94
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    95
void XmlDitaDocVisitor::visit(DocSymbol *s)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    96
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
    97
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visit(DocSymbol*)", s)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    98
  if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    99
	return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   100
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   101
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   102
  switch(s->symbol())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   103
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   104
    case DocSymbol::BSlash:  write("\\"); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   105
    case DocSymbol::At:      write("@"); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   106
	// NOTE: The XMl stream will translate entities i.e. "&" to "&amp;"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   107
    case DocSymbol::Less:    write("<"); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   108
    case DocSymbol::Greater: write(">"); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   109
    case DocSymbol::Amp:     write("&"); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   110
    case DocSymbol::Dollar:  write("$"); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   111
    case DocSymbol::Hash:    write("#"); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   112
    case DocSymbol::Percent: write("%"); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   113
	case DocSymbol::Apos:    write("'"); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   114
    case DocSymbol::Quot:    write("\""); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   115
	case DocSymbol::Copy:    xmlStream.writeUnicode("copy");	break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   116
    case DocSymbol::Tm:      xmlStream.writeUnicode("trade");	break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   117
    case DocSymbol::Reg:     xmlStream.writeUnicode("reg");		break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   118
    case DocSymbol::Lsquo:   xmlStream.writeUnicode("lsquo");		break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   119
    case DocSymbol::Rsquo:	 xmlStream.writeUnicode("rsquo");		break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   120
    case DocSymbol::Ldquo:	 xmlStream.writeUnicode("ldquo");		break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   121
    case DocSymbol::Rdquo:	 xmlStream.writeUnicode("rdquo");		break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   122
    case DocSymbol::Ndash:	 xmlStream.writeUnicode("ndash");		break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   123
    case DocSymbol::Mdash:	 xmlStream.writeUnicode("mdash");		break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   124
	case DocSymbol::Uml:	 xmlStream.writeUnicode((const char*)(QString(QChar(s->letter()))+"uml")); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   125
	case DocSymbol::Acute:	 xmlStream.writeUnicode((const char*)(QString(QChar(s->letter()))+"acute")); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   126
	case DocSymbol::Grave:	 xmlStream.writeUnicode((const char*)(QString(QChar(s->letter()))+"grave")); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   127
	case DocSymbol::Circ:	 xmlStream.writeUnicode((const char*)(QString(QChar(s->letter()))+"circ")); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   128
	case DocSymbol::Tilde:	 xmlStream.writeUnicode((const char*)(QString(QChar(s->letter()))+"tilde")); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   129
	case DocSymbol::Cedil:	 xmlStream.writeUnicode((const char*)(QString(QChar(s->letter()))+"cedil")); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   130
	case DocSymbol::Ring:	 xmlStream.writeUnicode((const char*)(QString(QChar(s->letter()))+"ring")); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   131
	case DocSymbol::Slash:	 xmlStream.writeUnicode((const char*)(QString(QChar(s->letter()))+"slash")); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   132
    case DocSymbol::Szlig:	 xmlStream.writeUnicode("szlig");					   break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   133
    case DocSymbol::Nbsp:    xmlStream.writeUnicode("nbsp");					   break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   134
    case DocSymbol::Aelig:	 xmlStream.writeUnicode("aelig");					   break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   135
    case DocSymbol::AElig:   xmlStream.writeUnicode("AElig");					   break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   136
    default:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   137
		err("Error: unknown symbol found\n");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   138
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   139
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   140
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   141
void XmlDitaDocVisitor::visit(DocURL *u)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   142
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   143
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visit(DocURL*)", u)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   144
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   145
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   146
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   147
	if (u->isEmail()) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   148
		startXref(QString("mailto:")+QString(u->url()), u->url());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   149
	} else {
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   150
		// Need format attribute
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   151
		AttributeMap myMap;
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   152
		myMap["href"] = u->url();
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   153
		myMap["format"] = "html";
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   154
		push("xref", myMap);
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   155
		write(u->url());	
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   156
		//startXref(u->url(), u->url());
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   157
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   158
	endXref();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   159
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   160
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   161
void XmlDitaDocVisitor::visit(DocLineBreak *lb)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   162
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   163
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visit(DocLineBreak*)", lb)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   164
	if (m_hide){
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   165
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   166
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   167
	//pushpop("linebreak");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   168
	//if (lb->parent()->kind() == lb->Kind_Verbatim) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   169
	if (m_insidePre) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   170
		write("\n");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   171
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   172
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   173
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   174
void XmlDitaDocVisitor::visit(DocHorRuler *)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   175
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   176
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPre(DocHorRuler*)")
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   177
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   178
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   179
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   180
	//pushpop("hruler");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   181
	xmlStream.comment("hruler not supported by DITA 1.1");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   182
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   183
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   184
void XmlDitaDocVisitor::visit(DocStyleChange *s)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   185
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   186
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visit(DocStyleChange*)", s)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   187
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   188
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   189
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   190
	switch (s->style())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   191
	{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   192
	case DocStyleChange::Bold:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   193
		if (s->enable()) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   194
			push("b");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   195
		} else { 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   196
			pop("b");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   197
		}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   198
		break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   199
	case DocStyleChange::Italic:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   200
		if (s->enable()) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   201
			push("i");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   202
		} else {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   203
			pop("i");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   204
		}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   205
		break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   206
	case DocStyleChange::Code:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   207
		if (s->enable()) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   208
			push("tt");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   209
		} else {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   210
			pop("tt");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   211
		}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   212
		break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   213
	case DocStyleChange::Subscript:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   214
		if (s->enable()) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   215
			push("sub");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   216
		} else {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   217
			pop("sub");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   218
		}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   219
		break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   220
	case DocStyleChange::Superscript:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   221
		if (s->enable()) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   222
			push("sup");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   223
		} else {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   224
			pop("sup");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   225
		}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   226
		break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   227
	case DocStyleChange::Center:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   228
		if (s->enable()) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   229
			xmlStream.comment("center not supported by DITA 1.1");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   230
			//push("center");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   231
		} else {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   232
			//pop("center");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   233
		}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   234
		break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   235
	case DocStyleChange::Small:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   236
		if (s->enable()) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   237
			xmlStream.comment("small not supported by DITA 1.1");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   238
			//push("small");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   239
		} else {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   240
			//pop("small");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   241
		}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   242
		break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   243
	case DocStyleChange::Preformatted:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   244
		if (s->enable()) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   245
		{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   246
			push("pre");  
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   247
			m_insidePre = TRUE;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   248
		} else {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   249
			pop("pre");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   250
			m_insidePre = FALSE;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   251
		}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   252
		break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   253
	case DocStyleChange::Div:  /* HTML only */ break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   254
	case DocStyleChange::Span: /* HTML only */ break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   255
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   256
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   257
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   258
void XmlDitaDocVisitor::visit(DocVerbatim *s)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   259
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   260
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visit(DocVerbatim*)", s)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   261
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   262
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   263
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   264
	switch(s->type())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   265
	{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   266
		case DocVerbatim::Code:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   267
			push("codeblock");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   268
			write(s->text());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   269
			pop("codeblock");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   270
			break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   271
		case DocVerbatim::Verbatim:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   272
			pushpop("pre", s->text());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   273
			break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   274
		case DocVerbatim::HtmlOnly: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   275
			//pushpop("htmlonly", s->text());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   276
			break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   277
		case DocVerbatim::ManOnly: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   278
			//pushpop("manonly", s->text());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   279
			break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   280
		case DocVerbatim::LatexOnly: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   281
			//pushpop("latexonly", s->text());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   282
			break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   283
		case DocVerbatim::XmlOnly: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   284
			write(s->text());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   285
			break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   286
		case DocVerbatim::Dot: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   287
			//pushpop("dot", s->text());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   288
			break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   289
		case DocVerbatim::Msc: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   290
			//pushpop("msc", s->text());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   291
			break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   292
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   293
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   294
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   295
void XmlDitaDocVisitor::visit(DocAnchor *anc)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   296
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   297
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visit(DocAnchor*)", anc)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   298
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   299
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   300
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   301
	xmlElemStack.addAttribute("id", anc->file()+"_1"+anc->anchor());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   302
	//push("anchor", "id", anc->file()+"_1"+anc->anchor());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   303
	//pop("anchor");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   304
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   305
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   306
void XmlDitaDocVisitor::visit(DocInclude *inc)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   307
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   308
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visit(DocInclude*)", inc)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   309
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   310
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   311
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   312
  switch(inc->type())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   313
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   314
    case DocInclude::IncWithLines:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   315
      { 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   316
         push("codeblock");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   317
         QFileInfo cfi( inc->file() );
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   318
         FileDef fd( cfi.dirPath(), cfi.fileName() );
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   319
         Doxygen::parserManager->getParser(inc->extension())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   320
                               ->parseCode(m_ci,inc->context(),
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   321
                                           inc->text().latin1(),
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   322
                                           inc->isExample(),
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   323
                                           inc->exampleFile(), &fd);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   324
         pop("codeblock"); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   325
      }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   326
      break;    
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   327
    case DocInclude::Include: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   328
      push("codeblock");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   329
      Doxygen::parserManager->getParser(inc->extension())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   330
                            ->parseCode(m_ci,inc->context(),
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   331
                                        inc->text().latin1(),
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   332
                                        inc->isExample(),
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   333
                                        inc->exampleFile());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   334
      pop("codeblock"); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   335
      break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   336
    case DocInclude::DontInclude: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   337
      break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   338
    case DocInclude::HtmlInclude: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   339
	  //pushpop("htmlonly", inc->text());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   340
      break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   341
    case DocInclude::VerbInclude: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   342
	  pushpop("pre", inc->text());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   343
      break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   344
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   345
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   346
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   347
void XmlDitaDocVisitor::visit(DocIncOperator *op)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   348
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   349
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visit(DocIncOperator*)", op)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   350
  if (op->isFirst()) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   351
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   352
    if (!m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   353
		push("codeblock");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   354
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   355
    pushEnabled();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   356
    m_hide = TRUE;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   357
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   358
  if (op->type()!=DocIncOperator::Skip) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   359
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   360
    popEnabled();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   361
    if (!m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   362
      Doxygen::parserManager->getParser(m_langExt)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   363
                            ->parseCode(m_ci,op->context(),
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   364
                                        op->text().latin1(),op->isExample(),
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   365
                                        op->exampleFile());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   366
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   367
    pushEnabled();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   368
    m_hide=TRUE;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   369
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   370
  if (op->isLast())  
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   371
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   372
    popEnabled();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   373
	if (!m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   374
		pop("codeblock"); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   375
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   376
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   377
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   378
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   379
void XmlDitaDocVisitor::visit(DocFormula *f)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   380
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   381
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visit(DocFormula*)", f)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   382
	write(f->text());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   383
#if 0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   384
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   385
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   386
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   387
  QString s;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   388
  s.setNum(f->id());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   389
  push("formula", "id", s);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   390
  write(f->text());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   391
  pop("formula");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   392
#endif
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   393
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   394
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   395
void XmlDitaDocVisitor::visit(DocIndexEntry *ie)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   396
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   397
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visit(DocIndexEntry*)", ie)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   398
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   399
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   400
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   401
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   402
	push("indexterm");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   403
	write(ie->entry());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   404
	pop("indexterm");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   405
#if 0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   406
	push("indexentry");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   407
	push("primaryie");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   408
	write(ie->entry());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   409
	pop("primaryie");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   410
	pushpop("secondaryie");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   411
	pop("indexentry");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   412
#endif
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   413
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   414
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   415
void XmlDitaDocVisitor::visit(DocSimpleSectSep *)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   416
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   417
  //pushpop("simplesectsep");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   418
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   419
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   420
//--------------------------------------
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   421
// visitor functions for compound nodes
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   422
//--------------------------------------
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   423
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   424
void XmlDitaDocVisitor::visitPre(DocAutoList *l)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   425
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   426
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visitPre(DocAutoList*)", l)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   427
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   428
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   429
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   430
	if (l->isEnumList()) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   431
		push("ol");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   432
	} else {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   433
		push("ul");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   434
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   435
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   436
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   437
void XmlDitaDocVisitor::visitPost(DocAutoList *l)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   438
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   439
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visitPost(DocAutoList*)", l)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   440
	if (l->isEnumList()) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   441
		visitPostDefault("ol");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   442
	} else {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   443
		visitPostDefault("ul");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   444
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   445
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   446
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   447
void XmlDitaDocVisitor::visitPre(DocAutoListItem *)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   448
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   449
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPre(DocAutoListItem*)")
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   450
	visitPreDefault("li");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   451
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   452
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   453
void XmlDitaDocVisitor::visitPost(DocAutoListItem *) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   454
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   455
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocAutoListItem*)")
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   456
	visitPostDefault("li");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   457
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   458
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   459
void XmlDitaDocVisitor::visitPre(DocPara *p) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   460
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   461
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visitPre(DocPara*)", p)
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   462
	if (canPushPara()) {
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   463
		visitPreDefault("p");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   464
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   465
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   466
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   467
void XmlDitaDocVisitor::visitPost(DocPara *)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   468
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   469
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocPara*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   470
	if (canPopPara()) {
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   471
		visitPostDefault("p");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   472
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   473
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   474
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   475
void XmlDitaDocVisitor::visitPre(DocRoot *)
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   476
{
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   477
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPre(DocRoot*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   478
}
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   479
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   480
void XmlDitaDocVisitor::visitPost(DocRoot *)
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   481
{
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   482
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocRoot*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   483
}
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   484
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   485
void XmlDitaDocVisitor::visitPre(DocSimpleSect *s)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   486
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   487
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visitPre(DocSimpleSect*)", s)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   488
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   489
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   490
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   491
	switch(s->type())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   492
	{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   493
		// Fall through
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   494
		case DocSimpleSect::See:		
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   495
		case DocSimpleSect::Return:		
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   496
		case DocSimpleSect::Author:		
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   497
		case DocSimpleSect::Authors:	
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   498
		case DocSimpleSect::Version:	
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   499
		case DocSimpleSect::Since:		
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   500
		case DocSimpleSect::Date:		
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   501
		case DocSimpleSect::Pre:		
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   502
		case DocSimpleSect::Post:		
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   503
		case DocSimpleSect::Invar:		
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   504
		case DocSimpleSect::User:		
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   505
		case DocSimpleSect::Rcs:		
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   506
			if (canPushPara()) {
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   507
				push("p"); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   508
			}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   509
			break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   510
		case DocSimpleSect::Note:		
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   511
			push("note", "type", "note"); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   512
			break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   513
		case DocSimpleSect::Warning:	
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   514
			push("note", "type", "caution"); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   515
			break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   516
		case DocSimpleSect::Remark:		
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   517
			push("note", "type", "other"); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   518
			break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   519
		case DocSimpleSect::Attention:	
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   520
			push("note", "type", "attention"); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   521
			break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   522
		case DocSimpleSect::Unknown:	
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   523
			break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   524
		default:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   525
			ASSERT(0);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   526
#if 0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   527
		case DocSimpleSect::See:		push("simplesect", "kind", "see"); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   528
		case DocSimpleSect::Return:		push("simplesect", "kind", "return"); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   529
		case DocSimpleSect::Author:		push("simplesect", "kind", "author"); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   530
		case DocSimpleSect::Authors:	push("simplesect", "kind", "authors"); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   531
		case DocSimpleSect::Version:	push("simplesect", "kind", "version"); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   532
		case DocSimpleSect::Since:		push("simplesect", "kind", "since"); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   533
		case DocSimpleSect::Date:		push("simplesect", "kind", "date"); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   534
		case DocSimpleSect::Note:		push("simplesect", "kind", "note"); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   535
		case DocSimpleSect::Warning:	push("simplesect", "kind", "warning"); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   536
		case DocSimpleSect::Pre:		push("simplesect", "kind", "pre"); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   537
		case DocSimpleSect::Post:		push("simplesect", "kind", "post"); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   538
		case DocSimpleSect::Invar:		push("simplesect", "kind", "invariant"); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   539
		case DocSimpleSect::Remark:		push("simplesect", "kind", "remark"); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   540
		case DocSimpleSect::Attention:	push("simplesect", "kind", "attention"); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   541
		case DocSimpleSect::User:		push("simplesect", "kind", "par"); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   542
		case DocSimpleSect::Rcs:		push("simplesect", "kind", "rcs"); break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   543
		case DocSimpleSect::Unknown:	break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   544
#endif
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   545
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   546
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   547
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   548
void XmlDitaDocVisitor::visitPost(DocSimpleSect *s)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   549
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   550
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visitPost(DocSimpleSect*)", s)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   551
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   552
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   553
	}	
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   554
	switch(s->type())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   555
	{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   556
		// Fall through
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   557
		case DocSimpleSect::Note:		
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   558
		case DocSimpleSect::Warning:	
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   559
		case DocSimpleSect::Remark:		
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   560
		case DocSimpleSect::Attention:	
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   561
			pop("note"); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   562
			break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   563
		case DocSimpleSect::Unknown:	
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   564
			break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   565
		default:
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   566
			if (canPopPara()) {
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   567
				pop("p"); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   568
			}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   569
			break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   570
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   571
  //visitPostDefault("simplesect");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   572
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   573
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   574
void XmlDitaDocVisitor::visitPre(DocTitle *)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   575
{	
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   576
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPre(DocTitle*)")
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   577
	if (!xmlElemStack.isEmpty() && xmlElemStack.peek().getElemName() == "concept") {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   578
		visitPreDefault("title");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   579
	} else {
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   580
		if (canPushPara()) {
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   581
			visitPreDefault("p");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   582
		}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   583
		visitPreDefault("b");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   584
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   585
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   586
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   587
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   588
void XmlDitaDocVisitor::visitPost(DocTitle *)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   589
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   590
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocTitle*)")
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   591
	if (xmlElemStack.peek().getElemName() == "title") {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   592
		visitPostDefault("title");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   593
	} else {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   594
		visitPostDefault("b");
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   595
		if (canPopPara()) {
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   596
			visitPostDefault("p");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   597
		}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   598
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   599
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   600
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   601
void XmlDitaDocVisitor::visitPre(DocSimpleList *)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   602
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   603
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPre(DocSimpleList*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   604
	visitPreDefault("ul");
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   605
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   606
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   607
void XmlDitaDocVisitor::visitPost(DocSimpleList *)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   608
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   609
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocSimpleList*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   610
	visitPostDefault("ul");
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   611
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   612
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   613
void XmlDitaDocVisitor::visitPre(DocSimpleListItem *)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   614
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   615
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPre(DocSimpleListItem*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   616
	visitPreDefault("li");
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   617
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   618
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   619
void XmlDitaDocVisitor::visitPost(DocSimpleListItem *) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   620
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   621
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocSimpleListItem*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   622
	visitPostDefault("li");
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   623
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   624
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   625
void XmlDitaDocVisitor::visitPre(DocSection *s)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   626
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   627
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visitPre(DocSection*)", s)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   628
	// Currently unsupported
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   629
#if 0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   630
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   631
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   632
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   633
	QString sectNum;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   634
	sectNum.setNum(s->level());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   635
	QString sectAnchor(s->file());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   636
	if (!s->anchor().isEmpty()) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   637
		sectAnchor.append("_1");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   638
		sectAnchor.append(s->anchor());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   639
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   640
	push("sect"+sectNum, "id", sectAnchor);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   641
	pushpop("title", s->title());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   642
#endif
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   643
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   644
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   645
void XmlDitaDocVisitor::visitPost(DocSection *s) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   646
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   647
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visitPost(DocSection*)", s)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   648
#if 0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   649
	// The original did not have the if(m_hide) test.
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   650
	// I assume that is an error so visitPostDefault() uses it.
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   651
	QString level;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   652
	level.setNum(s->level());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   653
	visitPostDefault("sect" + level);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   654
#endif
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   655
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   656
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   657
void XmlDitaDocVisitor::visitPre(DocHtmlList *s)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   658
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   659
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visitPre(DocHtmlList*)", s)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   660
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   661
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   662
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   663
	if (s->type()==DocHtmlList::Ordered) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   664
		push("ol"); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   665
	} else {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   666
		push("ul"); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   667
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   668
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   669
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   670
void XmlDitaDocVisitor::visitPost(DocHtmlList *s) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   671
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   672
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visitPost(DocHtmlList*)", s)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   673
	if (s->type()==DocHtmlList::Ordered) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   674
		visitPostDefault("ol"); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   675
	} else {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   676
		visitPostDefault("ul");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   677
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   678
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   679
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   680
void XmlDitaDocVisitor::visitPre(DocHtmlListItem *)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   681
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   682
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPre(DocHtmlListItem*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   683
	visitPreDefault("li");
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   684
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   685
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   686
void XmlDitaDocVisitor::visitPost(DocHtmlListItem *) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   687
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   688
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocHtmlListItem*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   689
	visitPostDefault("li");
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   690
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   691
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   692
void XmlDitaDocVisitor::visitPre(DocHtmlDescList *)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   693
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   694
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPre(DocHtmlDescList*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   695
	visitPreDefault("dl");
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   696
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   697
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   698
void XmlDitaDocVisitor::visitPost(DocHtmlDescList *) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   699
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   700
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocHtmlDescList*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   701
	visitPostDefault("dl");
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   702
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   703
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   704
void XmlDitaDocVisitor::visitPre(DocHtmlDescTitle *)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   705
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   706
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPre(DocHtmlDescTitle*)")
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   707
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   708
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   709
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   710
	push("dlentry");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   711
	push("dt");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   712
	//push("varlistentry");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   713
	//push("term");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   714
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   715
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   716
void XmlDitaDocVisitor::visitPost(DocHtmlDescTitle *) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   717
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   718
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocHtmlDescTitle*)")
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   719
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   720
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   721
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   722
	pop("dt");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   723
	//pop("dlentry");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   724
	// pop("term");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   725
	// pop("varlistentry");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   726
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   727
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   728
void XmlDitaDocVisitor::visitPre(DocHtmlDescData *)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   729
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   730
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPre(DocHtmlDescData*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   731
	push("dd");
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   732
	//visitPreDefault("li");
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   733
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   734
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   735
void XmlDitaDocVisitor::visitPost(DocHtmlDescData *) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   736
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   737
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocHtmlDescData*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   738
	pop("dd");
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   739
	pop("dlentry");
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   740
	//visitPostDefault("li");  
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   741
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   742
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   743
void XmlDitaDocVisitor::visitPre(DocHtmlTable *t)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   744
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   745
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visitPre(DocHtmlTable*)", t)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   746
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   747
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   748
	}
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   749
#if DITA_SIMPLETABLE_SUPPORT
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   750
	push("simpletable");
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   751
#endif
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   752
#if 0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   753
	AttributeMap attrs;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   754
	QString vR, vC;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   755
	vR.setNum(t->numRows());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   756
	attrs["rows"] = vR;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   757
	vC.setNum(t->numCols());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   758
	attrs["cols"] = vC;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   759
	push("table", attrs);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   760
#endif
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   761
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   762
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   763
void XmlDitaDocVisitor::visitPost(DocHtmlTable *) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   764
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   765
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocHtmlTable*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   766
#if DITA_SIMPLETABLE_SUPPORT
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   767
	visitPostDefault("simpletable");
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   768
#endif
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   769
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   770
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   771
void XmlDitaDocVisitor::visitPre(DocHtmlRow *)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   772
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   773
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPre(DocHtmlRow*)")
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   774
	// FIXME look ahead to first cell
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   775
	// if isHeading is true do
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   776
	// visitPreDefault("sthead");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   777
	// else
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   778
	visitPreDefault("strow");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   779
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   780
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   781
void XmlDitaDocVisitor::visitPost(DocHtmlRow *) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   782
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   783
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocHtmlRow*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   784
	visitPostDefault("strow");
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   785
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   786
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   787
void XmlDitaDocVisitor::visitPre(DocHtmlCell *c)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   788
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   789
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visitPre(DocHtmlCell*)", c)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   790
	visitPreDefault("stentry");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   791
#if 0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   792
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   793
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   794
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   795
	if (c->isHeading()) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   796
	  push("entry", "thead", "yes");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   797
	} else {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   798
	  push("entry", "thead", "no");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   799
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   800
#endif
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   801
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   802
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   803
void XmlDitaDocVisitor::visitPost(DocHtmlCell *c) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   804
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   805
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visitPost(DocHtmlCell*)", c)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   806
  visitPostDefault("stentry");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   807
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   808
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   809
void XmlDitaDocVisitor::visitPre(DocHtmlCaption *)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   810
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   811
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPre(DocHtmlCaption*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   812
	// Caption is unsupported
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   813
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   814
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   815
void XmlDitaDocVisitor::visitPost(DocHtmlCaption *) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   816
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   817
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocHtmlCaption*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   818
	// Caption is unsupported
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   819
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   820
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   821
void XmlDitaDocVisitor::visitPre(DocInternal *)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   822
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   823
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPre(DocInternal*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   824
	//visitPreDefault("internal");
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   825
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   826
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   827
void XmlDitaDocVisitor::visitPost(DocInternal *) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   828
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   829
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocInternal*)")
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   830
  //visitPostDefault("internal");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   831
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   832
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   833
void XmlDitaDocVisitor::visitPre(DocHRef *href)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   834
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   835
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visitPre(DocHRef*)", href)
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   836
	push("xref", "href", href->url());
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   837
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   838
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   839
void XmlDitaDocVisitor::visitPost(DocHRef *) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   840
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   841
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocHRef*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   842
	visitPostDefault("xref");
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   843
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   844
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   845
void XmlDitaDocVisitor::visitPre(DocHtmlHeader *header)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   846
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   847
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visitPre(DocHtmlHeader*)", header)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   848
	visitPreDefault("b");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   849
#if 0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   850
  QString hdgLevel;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   851
  hdgLevel.setNum(header->level());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   852
  push("heading", "level", hdgLevel);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   853
#endif
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   854
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   855
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   856
void XmlDitaDocVisitor::visitPost(DocHtmlHeader *) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   857
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   858
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocHtmlHeader*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   859
	visitPostDefault("b");
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   860
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   861
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   862
void XmlDitaDocVisitor::visitPre(DocImage *img)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   863
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   864
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visitPre(DocImage*)", img)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   865
	// Currently unsupported
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   866
#if 0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   867
  AttributeMap imgAttrs;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   868
  // First the image type
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   869
  switch(img->type())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   870
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   871
    case DocImage::Html:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   872
		imgAttrs["type"] = "html";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   873
		break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   874
    case DocImage::Latex:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   875
		imgAttrs["type"] = "latex";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   876
		break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   877
	case DocImage::Rtf:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   878
		imgAttrs["type"] = "rtf";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   879
		break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   880
	default:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   881
		ASSERT(0);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   882
		break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   883
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   884
  // Now the image name
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   885
  QString baseName=img->name();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   886
  int i;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   887
  if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   888
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   889
    baseName=baseName.right(baseName.length()-i-1);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   890
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   891
  imgAttrs["name"] = baseName;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   892
  // Image width
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   893
  if (!img->width().isEmpty())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   894
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   895
    imgAttrs["width"] = img->width();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   896
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   897
  // Image height
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   898
  // NOTE: In the original this was an else if. I assume that this is an error
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   899
  if (!img->height().isEmpty())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   900
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   901
    imgAttrs["height"] = img->height();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   902
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   903
  push("image", imgAttrs);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   904
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   905
  // copy the image to the output dir
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   906
  QFile inImage(img->name());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   907
  QFile outImage(Config_getString("XML_DITA_OUTPUT")+"/"+baseName.ascii());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   908
  if (inImage.open(IO_ReadOnly))
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   909
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   910
    if (outImage.open(IO_WriteOnly))
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   911
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   912
      char *buffer = new char[inImage.size()];
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   913
      inImage.readBlock(buffer,inImage.size());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   914
      outImage.writeBlock(buffer,inImage.size());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   915
      outImage.flush();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   916
      delete[] buffer;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   917
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   918
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   919
#endif
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   920
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   921
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   922
void XmlDitaDocVisitor::visitPost(DocImage *) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   923
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   924
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocImage*)")
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   925
  //visitPostDefault("image");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   926
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   927
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   928
void XmlDitaDocVisitor::visitPre(DocDotFile *df)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   929
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   930
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visitPre(DocDotFile*)", df)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   931
	// Currently unsupported
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   932
#if 0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   933
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   934
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   935
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   936
	push("dotfile", "name", df->file());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   937
#endif
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   938
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   939
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   940
void XmlDitaDocVisitor::visitPost(DocDotFile *) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   941
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   942
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocDotFile*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   943
	//visitPostDefault("dotfile");
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   944
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   945
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   946
void XmlDitaDocVisitor::visitPre(DocLink *lnk)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   947
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   948
	// The result of a \link...\endlink command
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   949
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visitPre(DocLink*)", lnk)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   950
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   951
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   952
	}
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   953
	if (0) {//lnk->getDefinition() != 0) {
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   954
		//printf("XmlDitaDocVisitor calling startLink() DocLink [name]=`%s'\n", lnk->getDefinition()->qualifiedName().data());
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   955
		startLink("", lnk->getDefinition()->qualifiedName(), "");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   956
	} else {
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   957
		//printf("XmlDitaDocVisitor calling startLink() DocLink [file]=`%s'\n", lnk->file().data());
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   958
		//startLink(lnk->ref(),lnk->file(),lnk->anchor());
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   959
		startLink(lnk->ref(), lnk->file(), lnk->anchor());
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   960
	}	
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   961
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   962
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   963
void XmlDitaDocVisitor::visitPost(DocLink *) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   964
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   965
	// The result of a \link...\endlink command
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   966
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocLink*)")
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   967
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   968
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   969
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   970
	endLink();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   971
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   972
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   973
void XmlDitaDocVisitor::visitPre(DocRef *ref)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   974
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   975
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visitPre(DocRef*)", ref)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   976
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   977
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   978
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   979
	if (!ref->file().isEmpty()) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   980
		if (ref->getDefinition() != 0) {
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   981
			//printf("XmlDitaDocVisitor calling startLink() DocRef [name]=`%s'\n", ref->getDefinition()->qualifiedName().data());
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   982
			startLink("", ref->getDefinition()->qualifiedName(), "");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   983
		} else {
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   984
			//printf("XmlDitaDocVisitor calling startLink() DocRef [file]=`%s'\n", ref->file().data());
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   985
			startLink(ref->ref(), ref->file(), ref->anchor());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   986
		}	
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   987
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   988
	if (!ref->hasLinkText()) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   989
	  write(ref->targetTitle());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   990
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   991
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   992
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   993
void XmlDitaDocVisitor::visitPost(DocRef *ref) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   994
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
   995
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visitPost(DocRef*)", ref)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   996
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   997
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   998
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   999
	if (!ref->file().isEmpty()) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1000
	  endLink();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1001
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1002
	write(" ");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1003
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1004
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1005
void XmlDitaDocVisitor::visitPre(DocSecRefItem *ref)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1006
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1007
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visitPre(DocSecRefItem*)", ref)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1008
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1009
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1010
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1011
	push("li", "id", ref->file()+"_1"+ref->anchor());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1012
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1013
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1014
void XmlDitaDocVisitor::visitPost(DocSecRefItem *) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1015
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1016
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocSecRefItem*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1017
	visitPostDefault("li");
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1018
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1019
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1020
void XmlDitaDocVisitor::visitPre(DocSecRefList *)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1021
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1022
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPre(DocSecRefList*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1023
	visitPreDefault("ul");
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1024
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1025
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1026
void XmlDitaDocVisitor::visitPost(DocSecRefList *) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1027
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1028
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocSecRefList*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1029
	visitPostDefault("ul");
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1030
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1031
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1032
void XmlDitaDocVisitor::visitPre(DocParamSect *s)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1033
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1034
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visitPre(DocParamSect*)", s)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1035
	m_insideParamlist = TRUE;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1036
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1037
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1038
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1039
	switch(s->type()) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1040
		case DocParamSect::Param: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1041
			push("paraml", "class", "param"); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1042
			break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1043
		case DocParamSect::RetVal: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1044
			push("paraml", "class", "retval"); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1045
			break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1046
		case DocParamSect::Exception: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1047
			push("paraml", "class", "exception"); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1048
			break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1049
		case DocParamSect::TemplateParam: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1050
			push("paraml", "class", "templateparam"); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1051
			break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1052
		default:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1053
		  ASSERT(0);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1054
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1055
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1056
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1057
void XmlDitaDocVisitor::visitPost(DocParamSect *)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1058
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1059
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocParamSect*)")
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1060
	visitPostDefault("paraml");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1061
	m_insideParamlist = FALSE;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1062
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1063
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1064
void XmlDitaDocVisitor::visitPre(DocParamList *pl)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1065
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1066
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visitPre(DocParamList*)", pl)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1067
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1068
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1069
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1070
	QListIterator<DocNode> li(pl->parameters());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1071
	DocNode *param;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1072
	for (li.toFirst();(param=li.current());++li) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1073
		if (param->kind() == DocNode::Kind_Word) {			
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1074
			currParam = ((DocWord*)param)->word();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1075
		} else if (param->kind() == DocNode::Kind_LinkedWord) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1076
			currParam = ((DocLinkedWord*)param)->word();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1077
		} else {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1078
			// FIXME, what should we use here
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1079
			currParam = "";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1080
		}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1081
		paramDict.insert(currParam, new QString(""));
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1082
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1083
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1084
#if 0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1085
	push("parameteritem");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1086
	push("parameternamelist");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1087
	QListIterator<DocNode> li(pl->parameters());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1088
	DocNode *param;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1089
	for (li.toFirst();(param=li.current());++li) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1090
		AttributeMap attrs;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1091
		if (pl->direction() != DocParamSect::Unspecified) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1092
			if (pl->direction() == DocParamSect::In) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1093
				attrs["direction"] = "in";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1094
			} else if (pl->direction() == DocParamSect::Out) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1095
				attrs["direction"] = "out";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1096
			} else if (pl->direction() == DocParamSect::InOut) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1097
				attrs["direction"] = "inout";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1098
			} else{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1099
				ASSERT(0);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1100
			}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1101
		}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1102
		push("parametername", attrs);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1103
		if (param->kind() == DocNode::Kind_Word)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1104
		{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1105
		  visit((DocWord*)param); 		
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1106
		}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1107
		else if (param->kind() == DocNode::Kind_LinkedWord)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1108
		{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1109
		  visit((DocLinkedWord*)param); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1110
		}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1111
		pop("parametername");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1112
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1113
	pop("parameternamelist");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1114
	push("parameterdescription");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1115
#endif
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1116
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1117
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1118
void XmlDitaDocVisitor::visitPost(DocParamList *)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1119
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1120
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocParamList*)")
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1121
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1122
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1123
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1124
	pop("parameterdescription");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1125
	pop("parameteritem");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1126
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1127
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1128
void XmlDitaDocVisitor::visitPre(DocXRefItem *x)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1129
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1130
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visitPre(DocXRefItem*)", x)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1131
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1132
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1133
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1134
	// \deprecated commands result in DocXRefItem
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1135
	// with "deprecated" as the filename
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1136
	if (x->file() == "deprecated"){
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1137
		// Fall through to start new paragraph for deprecated description
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1138
	} else {
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1139
		QString hrefStr = x->file();
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1140
		hrefStr.append(Config_getString("XML_DITA_EXTENSION"));
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1141
		hrefStr.append("#");
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1142
		hrefStr.append(x->file());
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1143
		hrefStr.append("_1");
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1144
		hrefStr.append(x->anchor());
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1145
		push("xref", "href", hrefStr);
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1146
		write(x->title());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1147
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1148
#if 0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1149
	push("xrefsect", "id", x->file()+"_1"+x->anchor());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1150
	pushpop("xreftitle", x->title());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1151
	push("xrefdescription");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1152
#endif
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1153
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1154
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1155
void XmlDitaDocVisitor::visitPost(DocXRefItem *)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1156
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1157
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocXRefItem*)")
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1158
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1159
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1160
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1161
	// An xref will be top of stack unless the current 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1162
	// DocXRefItem was caused by a \deprecated command
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1163
	if (!xmlElemStack.isEmpty() && xmlElemStack.peek().getElemName() == "xref") {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1164
		pop("xref");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1165
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1166
	
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1167
#if 0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1168
	pop("xrefdescription");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1169
	pop("xrefsect");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1170
#endif
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1171
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1172
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1173
void XmlDitaDocVisitor::visitPre(DocInternalRef *ref)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1174
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1175
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visitPre(DocInternalRef*)", ref)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1176
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1177
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1178
	}
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1179
	//printf("XmlDitaDocVisitor calling startLink() DocInternalRef [file]=`%s'\n", ref->file().data());
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1180
	startLink(0, ref->file(), ref->anchor());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1181
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1182
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1183
void XmlDitaDocVisitor::visitPost(DocInternalRef *) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1184
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1185
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocXRefItem*)")
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1186
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1187
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1188
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1189
	endLink();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1190
	write(" ");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1191
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1192
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1193
void XmlDitaDocVisitor::visitPre(DocCopy *c)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1194
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1195
	DITA_DOC_VISITOR_TRACE("XmlDitaDocVisitor::visitPre(DocCopy*)", c)
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1196
	// Currently unsupported
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1197
#if 0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1198
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1199
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1200
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1201
	push("copydoc", "link", c->link());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1202
#endif
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1203
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1204
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1205
void XmlDitaDocVisitor::visitPost(DocCopy *)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1206
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1207
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocCopy*)")
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1208
//	visitPostDefault("copydoc");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1209
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1210
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1211
void XmlDitaDocVisitor::visitPre(DocText *)
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1212
{
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1213
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPre(DocText*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1214
}
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1215
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1216
void XmlDitaDocVisitor::visitPost(DocText *)
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1217
{
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1218
	DITA_DOC_VISITOR_TRACE_NOARG("XmlDitaDocVisitor::visitPost(DocText*)")
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1219
}
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1220
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1221
void XmlDitaDocVisitor::startXref(const QString &href,const QString &text)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1222
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1223
#ifndef DITA_DOT_HACK_REMOVE_XREFS
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1224
	push("xref", "href", href);
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1225
#endif
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1226
	write(text);	
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1227
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1228
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1229
void XmlDitaDocVisitor::endXref()
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1230
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1231
#ifndef DITA_DOT_HACK_REMOVE_XREFS
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1232
	pop("xref");
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1233
#endif
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1234
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1235
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1236
void XmlDitaDocVisitor::startLink(const QString &ref,const QString &file,const QString &anchor)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1237
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1238
  AttributeMap refAttrs;
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1239
  /*
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1240
  printf("XmlDitaDocVisitor::startLink(): ref: \"%s\", file: \"%s\", anchor: \"%s\"\n",
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1241
	  ref.data(),
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1242
	  file.data(),
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1243
	  anchor.data());
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1244
  */
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1245
  if (!anchor.isEmpty()) {
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1246
	  refAttrs["href"] = file+".xml#"+file+"_1"+anchor;
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1247
  } else {
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1248
	  refAttrs["href"] = file+".xml#"+file;
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1249
  }
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1250
#ifndef DITA_DOT_HACK_REMOVE_XREFS
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1251
  push("xref", refAttrs);
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1252
#endif
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1253
#if 0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1254
  AttributeMap refAttrs;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1255
  if (!anchor.isEmpty()) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1256
	  refAttrs["refid"] = file+"_1"+anchor;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1257
	  refAttrs["kindref"] = "member";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1258
  } else {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1259
	  refAttrs["refid"] = file;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1260
	  refAttrs["kindref"] = "compound";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1261
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1262
  if (!ref.isEmpty()) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1263
	  refAttrs["external"] = ref;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1264
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1265
  push("ref", refAttrs);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1266
#endif
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1267
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1268
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1269
void XmlDitaDocVisitor::endLink()
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1270
{
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1271
#ifndef DITA_DOT_HACK_REMOVE_XREFS
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1272
  visitPostDefault("xref");
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1273
#endif
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1274
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1275
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1276
void XmlDitaDocVisitor::pushEnabled()
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1277
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1278
  m_enabled.push(new bool(m_hide));
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1279
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1280
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1281
void XmlDitaDocVisitor::popEnabled()
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1282
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1283
  bool *v = m_enabled.pop();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1284
  ASSERT(v!=0);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1285
  m_hide = *v;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1286
  delete v;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1287
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1288
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1289
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1290
void XmlDitaDocVisitor::write(const QString &string)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1291
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1292
	if (m_insideParamlist) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1293
		// TODO: Review the use of paramDict as I think that there is a
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1294
		// memory leak here [PaulRo 2010-01-20]
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1295
		QString *pStr = paramDict.find(currParam);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1296
		if (pStr) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1297
			paramDict.replace(currParam, new QString(*pStr + string));
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1298
		} else {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1299
			paramDict.replace(currParam, new QString(string));
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1300
		}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1301
	} else {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1302
		xmlStream << string;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1303
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1304
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1305
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1306
void XmlDitaDocVisitor::push(const QString &tagName)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1307
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1308
	if (m_insideParamlist) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1309
		// TODO
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1310
	} else {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1311
		xmlElemStack.push(tagName);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1312
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1313
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1314
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1315
void XmlDitaDocVisitor::push(const QString &tagName, const QString &key, const QString &value)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1316
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1317
	if (m_insideParamlist) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1318
		// TODO
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1319
	} else {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1320
		xmlElemStack.push(tagName, key, value);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1321
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1322
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1323
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1324
void XmlDitaDocVisitor::push(const QString &tagName, AttributeMap &map)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1325
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1326
	if (m_insideParamlist) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1327
		// TODO
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1328
	} else {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1329
		xmlElemStack.push(tagName, map);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1330
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1331
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1332
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1333
void XmlDitaDocVisitor::pop(const QString &tagName)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1334
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1335
	if (m_insideParamlist) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1336
		// TODO
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1337
	} else {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1338
		xmlElemStack.pop(tagName);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1339
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1340
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1341
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1342
void XmlDitaDocVisitor::pushpop(const QString &tagName)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1343
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1344
	if (m_insideParamlist) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1345
		// TODO
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1346
	} else {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1347
		xmlElemStack.pushpop(tagName);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1348
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1349
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1350
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1351
void XmlDitaDocVisitor::pushpop(const QString &tagName, const QString &text)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1352
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1353
	if (m_insideParamlist) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1354
		paramDict.replace(currParam, new QString(*paramDict[currParam] + text));
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1355
	} else {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1356
		xmlElemStack.pushpop(tagName, text);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1357
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1358
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1359
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1360
const QString XmlDitaDocVisitor::query(const QString &paramName) const
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1361
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1362
	if (paramDict.find(paramName)) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1363
		return *paramDict[paramName];
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1364
	} else {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1365
		// TODO positional option
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1366
		return "";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1367
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1368
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1369
1
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1370
/// Returns true if it is OK to write a para element
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1371
bool XmlDitaDocVisitor::canPushPara() const
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1372
{
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1373
	if (!xmlElemStack.isEmpty()) {
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1374
		QString e = xmlElemStack.peek().getElemName();
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1375
		if (e == "xref" || e == "p") {
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1376
			return false;
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1377
		}
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1378
	}
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1379
	return true;
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1380
}
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1381
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1382
bool XmlDitaDocVisitor::canPopPara() const
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1383
{
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1384
	if (!xmlElemStack.isEmpty() && xmlElemStack.peek().getElemName() == "p") {
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1385
			return true;
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1386
	}
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1387
	return false;
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1388
}
82f11024044a Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents: 0
diff changeset
  1389
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1390
/** Default treatment of a post traversal visit, this just
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1391
pushes a single element with no attributes. */
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1392
void XmlDitaDocVisitor::visitPreDefault(const QString& elem)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1393
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1394
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1395
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1396
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1397
	push(elem);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1398
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1399
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1400
/** Default treatment of a post traversal visit, this just
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1401
pops a single element. */
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1402
void XmlDitaDocVisitor::visitPostDefault(const QString& elem)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1403
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1404
	if (m_hide) {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1405
	  return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1406
	}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1407
	pop(elem);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1408
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1409