Skip to content

Draft: MsooXmlDiagramReader_p problems

Evgeniy Harchenko requested to merge evgeniyharchenko/calligra:master into master

filters/libmsooxml/MsooXmlDiagramReader_p.cpp: removed algorithm type statement in LinearAlgorithm::virtualDoLayout()

There is a lot of problems with MsooXmlDiagramReader_p. First of all we have crash while reading some Smart Art (and maybe diagrams) objects. So I removed childs[i]->algorithm()->m_type != AlgorithmAtom::SpaceAlg statement because if this statement is false we have crash on next lines, because firstNSpaceNode and lastNSpaceNode are nullptr. AFAIK we should handle this statement later, in the second loop.

But it is only the tip of the iceberg. There is some miscalculations. As a result we have this:

image

And how it looks in MS PowerPoint:

image

We have wrong size and position calculations. I guess the problem is in heightStretchFactor and widthStretchFactor, but I have no ideas how it can be fixed.

So, maybe somebody has any suggestions.

Merge request reports