patrik08
9th September 2008, 11:15
The writer already exist on qt version 4.5 having small bug..
1- writing draw:frame tag (image tag) inside text:span and not on text:p (block tag)
2- it not write pagezise info on style head or page margin default
I start to write a reader today code on:
Only QT4.5
http://ppk.ciz.ch/MiniScribus/TextOdfDebug.1.zip
Only table is not ready why?
i suppose a bug on QT4.5
qtable->mergeCells(gorow,gocool,qAbs(cr - 1),qAbs(cs - 1));
mergeCell can not merge all column from one line if i leave -1
qtable->mergeCells(gorow,gocool,cr,cs);
it not merge cell can anybody try it to find bug on qt 4.5
or can any body confirm a bug on mergeCells?
QTextTable *qtable = cur.insertTable(rowCounter,constraints.size(),tf);
int gorow = -1;
int gocool = -1;
while ( !line.isNull() ) {
if (line.isElement() ) {
const QDomElement oorow = line.toElement();
if (oorow.tagName() == "table:table-row") {
gorow++;
gocool = -1;
QDomElement oocell = oorow.firstChildElement("table:table-cell");
while (!oocell.isNull()) {
gocool++;
const QTextTableCell ctd = qtable->cellAt(gorow,gocool);
const int cr = qMax(oocell.attribute("table:number-rows-spanned").toInt(),0);
const int cs = qMax(oocell.attribute("table:number-columns-spanned").toInt(),0);
qWarning() << "----- spanning /" << cr << "/" << cs << " gocool->" << gocool << " gorow->" << gorow;
if (qMax(cs,cr) !=0) {
/* can not spanning all column */
qtable->mergeCells(gorow,gocool,qAbs(cr - 1),qAbs(cs - 1));
}
cell = qtable->cellAt(gorow,gocool);
//////void QTextTable::mergeCells ( int row, int column, int numRows, int numCols )
/////////////////qWarning() << " cursor on cella /" << gorow << "/" << gocool;
if (!convertCellTable(oocell,cell,cur,tname,processin g)) {
qWarning() << "Error on parse table cell row:" << gorow << " column:" << gocool;
}
oocell = oocell.nextSiblingElement("table:table-cell");
}
}
}
line = line.nextSibling();
}
http://ppk.ciz.ch/MiniScribus/mergecell.png
1- writing draw:frame tag (image tag) inside text:span and not on text:p (block tag)
2- it not write pagezise info on style head or page margin default
I start to write a reader today code on:
Only QT4.5
http://ppk.ciz.ch/MiniScribus/TextOdfDebug.1.zip
Only table is not ready why?
i suppose a bug on QT4.5
qtable->mergeCells(gorow,gocool,qAbs(cr - 1),qAbs(cs - 1));
mergeCell can not merge all column from one line if i leave -1
qtable->mergeCells(gorow,gocool,cr,cs);
it not merge cell can anybody try it to find bug on qt 4.5
or can any body confirm a bug on mergeCells?
QTextTable *qtable = cur.insertTable(rowCounter,constraints.size(),tf);
int gorow = -1;
int gocool = -1;
while ( !line.isNull() ) {
if (line.isElement() ) {
const QDomElement oorow = line.toElement();
if (oorow.tagName() == "table:table-row") {
gorow++;
gocool = -1;
QDomElement oocell = oorow.firstChildElement("table:table-cell");
while (!oocell.isNull()) {
gocool++;
const QTextTableCell ctd = qtable->cellAt(gorow,gocool);
const int cr = qMax(oocell.attribute("table:number-rows-spanned").toInt(),0);
const int cs = qMax(oocell.attribute("table:number-columns-spanned").toInt(),0);
qWarning() << "----- spanning /" << cr << "/" << cs << " gocool->" << gocool << " gorow->" << gorow;
if (qMax(cs,cr) !=0) {
/* can not spanning all column */
qtable->mergeCells(gorow,gocool,qAbs(cr - 1),qAbs(cs - 1));
}
cell = qtable->cellAt(gorow,gocool);
//////void QTextTable::mergeCells ( int row, int column, int numRows, int numCols )
/////////////////qWarning() << " cursor on cella /" << gorow << "/" << gocool;
if (!convertCellTable(oocell,cell,cur,tname,processin g)) {
qWarning() << "Error on parse table cell row:" << gorow << " column:" << gocool;
}
oocell = oocell.nextSiblingElement("table:table-cell");
}
}
}
line = line.nextSibling();
}
http://ppk.ciz.ch/MiniScribus/mergecell.png