https://bugs.freedesktop.org/show_bug.cgi?id=65825
Julien Nabet <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |[email protected], | |[email protected] Ever confirmed|0 |1 --- Comment #2 from Julien Nabet <[email protected]> --- Fridrich: here's a naive patch: diff --git a/svgio/source/svgreader/svgnode.cxx b/svgio/source/svgreader/svgnode.cxx index bbd21d2..cf66846 100644 --- a/svgio/source/svgreader/svgnode.cxx +++ b/svgio/source/svgreader/svgnode.cxx @@ -120,9 +120,14 @@ namespace svgio SvgStyleAttributes* pCurrent = const_cast< SvgStyleAttributes* >(&rOriginal); pCurrent->setCssStyleParent(0); - for(sal_uInt32 a(0); a < maCssStyleVector.size(); a++) + SvgStyleAttributeVector::const_reverse_iterator aIter = maCssStyleVector.rbegin(); + // advance once since the last one musn't be used + if (++aIter == maCssStyleVector.rend()) + return pCurrent; + + for( ; aIter != maCssStyleVector.rend(); ++aIter) { - SvgStyleAttributes* pCandidate = const_cast< SvgStyleAttributes* >(maCssStyleVector[maCssStyleVector.size() - a - 1]); + SvgStyleAttributes* pCandidate = const_cast< SvgStyleAttributes* >(*aIter); pCandidate->setCssStyleParent(pCurrent); pCurrent = pCandidate; There's no crash anymore but the image is completely black and I can see this on console: warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:documentProperties> (!) warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:pageProperties> (!) warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:layer> (!) warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:userDefs> (!) warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:ud> (!) warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:userDefs> (!) warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:ud> (!) warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:textBlock> (!) warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:textRect> (!) warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:paragraph> (!) warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:tabList> (!) warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:custProps> (!) warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:cp> (!) ... warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:newlineChar> (!) Would you have some time to take a look? -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ Libreoffice-bugs mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
