Version: 1.6.1 (using KDE 3.5.5, Kubuntu (edgy) 4:3.5.5-0ubuntu3) Compiler: Target: x86_64-linux-gnu OS: Linux (x86_64) release 2.6.15-26-amd64-generic Loading a doc from the testsuite gives me a crash.
Created an attachment (id=18914) [details] the doc The mml version has the same problem.
SVN commit 619051 by abeaumont: Fix parsing of mlabeledtr elements. BUG: 138760 M +10 -2 matrixelement.cc --- branches/koffice/1.6/koffice/lib/kformula/matrixelement.cc #619050:619051 @@ -1130,7 +1130,7 @@ while ( !n.isNull() ) { if ( n.isElement() ) { QDomElement e = n.toElement(); - if ( e.tagName().lower() == "mtr") + if ( e.tagName().lower() == "mtr" || e.tagName().lower() == "mlabeledtr" ) { rows++; @@ -1143,6 +1143,8 @@ cc++; cellnode = cellnode.nextSibling(); } + if ( cc > 0 && e.tagName().lower() == "mlabeledtr" ) + cc--; if ( cc > cols ) cols = cc; } @@ -1168,8 +1170,14 @@ while ( !node.isNull() ) { if ( node.isElement() ) { QDomElement e = node.toElement(); - if ( e.tagName().lower() == "mtr" ) { + if ( e.tagName().lower() == "mtr" || e.tagName().lower() == "mlabeledtr" ) { QDomNode cellnode = e.firstChild(); + if ( e.tagName().lower() == "mlabeledtr" ) { + while ( ! cellnode.isNull() && ! cellnode.isElement() ) + cellnode = cellnode.nextSibling(); + if ( ! cellnode.isNull() ) + cellnode = cellnode.nextSibling(); + } while ( !cellnode.isNull() ) { if ( cellnode.isElement() ) { QDomElement cellelement = cellnode.toElement();
You need to log in before you can comment on or make changes to this bug.