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 (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?


Qt Code:
  1. QTextTable *qtable = cur.insertTable(rowCounter,constraints.size(),tf);
  2. int gorow = -1;
  3. int gocool = -1;
  4.  
  5. while ( !line.isNull() ) {
  6. if (line.isElement() ) {
  7. const QDomElement oorow = line.toElement();
  8. if (oorow.tagName() == "table:table-row") {
  9. gorow++;
  10. gocool = -1;
  11. QDomElement oocell = oorow.firstChildElement("table:table-cell");
  12. while (!oocell.isNull()) {
  13. gocool++;
  14. const QTextTableCell ctd = qtable->cellAt(gorow,gocool);
  15. const int cr = qMax(oocell.attribute("table:number-rows-spanned").toInt(),0);
  16. const int cs = qMax(oocell.attribute("table:number-columns-spanned").toInt(),0);
  17. qWarning() << "----- spanning /" << cr << "/" << cs << " gocool->" << gocool << " gorow->" << gorow;
  18. if (qMax(cs,cr) !=0) {
  19. /* can not spanning all column */
  20. qtable->mergeCells(gorow,gocool,qAbs(cr - 1),qAbs(cs - 1));
  21. }
  22. cell = qtable->cellAt(gorow,gocool);
  23. //////void QTextTable::mergeCells ( int row, int column, int numRows, int numCols )
  24. /////////////////qWarning() << " cursor on cella /" << gorow << "/" << gocool;
  25. if (!convertCellTable(oocell,cell,cur,tname,processing)) {
  26. qWarning() << "Error on parse table cell row:" << gorow << " column:" << gocool;
  27. }
  28.  
  29. oocell = oocell.nextSiblingElement("table:table-cell");
  30. }
  31. }
  32. }
  33. line = line.nextSibling();
  34. }
To copy to clipboard, switch view to plain text mode