//////QTextDocument *w3 = fop.GetDoc() [ return QTextDocument->clone() ] XSL-FO format ;
/////QTextFrame *Tframe = w3->rootFrame();
int speed = 0;
qDebug() << "### iterator frame start ############################" << speed;
/* QTextFrameFormat QTextFrame::frameFormat() const */
for (it = Tframe->begin(); !(it.atEnd()); ++it) {
speed++; /* to find tree structure */
if (childFrame) {
qDebug() << "### frame " << speed;
} else if (para.isValid()) {
/* PARAGRAPH TAG ..............TAGNR. ENUM 406 */
/* ##### textblock iterator start QTextBlock ###########################*/
for (de = para.begin(); !(de.atEnd()); ++de) {
if (fr.isValid()) {
/* QTextCharFormat */
if (Pics.isValid() && !Pics.name().isEmpty()) {
/* IMAGE TAG internal external............TAGNR. ENUM 417/418 */
/* SVG convert to png transparent ! / original svg base64 encoded data! xml */
QDomElement inlineimage
= bdoc.
createElement("fo:internal-graphic");
inlineimage.setAttribute ("src",Pics.name());
if (Pics.height() >0) {
inlineimage.setAttribute ("height",Pics.height());
}
if (Pics.width() > 0) {
inlineimage.setAttribute ("width",Pics.width());
}
param.appendChild(inlineimage);
////////qDebug() << "### image ";
} else if (Tabl.isValid() && Tabl.columns() > 0) {
/* TABLE TAG ............TAGNR. ENUM 407,408,409,410,411,412,413 */
/*fo:table/table-footer/table-header/fo:table-body/
fo:table-column/fo:table-row/fo:table-cell*/
qDebug() << "### table ";
} else if (TXTCh.isAnchor()) {
param.appendChild(bdoc.createTextNode("\n"));
/* LINK TAG internal-local / external............TAGNR. ENUM 416 */
QDomElement linkers
= bdoc.
createElement("fo:basic-link");
if ( TXTCh.anchorHref().startsWith("#") ) {
linkers.setAttribute ("external-destination",TXTCh.anchorHref());
} else {
linkers.setAttribute ("internal-destination",TXTCh.anchorHref());
}
param.appendChild(linkers);
QDomText linktext
= bdoc.
createTextNode(" \n"+fr.
text().
trimmed()+" \n");
linkers.appendChild(linktext);
param.appendChild(bdoc.createTextNode("\n"));
/////////qDebug() << "### link " << hrefs;
} else if (Uls.isValid()) {
qDebug() << "### ul list ";
} else {
QDomText Fragitext
= bdoc.
createTextNode(fr.
text());
param.appendChild(Fragitext);
}
////////qDebug() << "### fragment " << speed << " FRAG->" << fr.text();
}
}
/* ##### textblock iterator end QTextBlock ###########################*/
flow.appendChild( param );
}
}
qDebug() << "### iterator frame end ############################" << speed;
Bookmarks