Review Request: Fix loading of embedded svg graphics.

Jan Hambrecht jaham at gmx.net
Tue Jul 17 22:22:03 BST 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105589/#review16039
-----------------------------------------------------------


Wouldn't it be even better to place the code to determine the mimetype by content into the KoOdfLoadingContext::mimeTypeForPath method? Then all code using that function can benefit from a more robust mimetype handling. Otherwise it looks ok to me too.

- Jan Hambrecht


On July 16, 2012, 10:19 a.m., Thorsten Zachmann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105589/
> -----------------------------------------------------------
> 
> (Updated July 16, 2012, 10:19 a.m.)
> 
> 
> Review request for Calligra and Jan Hambrecht.
> 
> 
> Description
> -------
> 
> This fixes loading of draw:image of the type svg in case the mimetype is not provided as in the document attached to the bug report.
> 
> When the mime type is not found we try to guess it by the content of the file. To do that we read the first 16K data and pass it to KMimeType.
> 
> After we found out the mime type we also set it so it is there for later usage.
> 
> Ok to backport to 2.5
> 
> 
> This addresses bug 303587.
>     http://bugs.kde.org/show_bug.cgi?id=303587
> 
> 
> Diffs
> -----
> 
>   libs/flake/svg/SvgShapeFactory.cpp 95602c0 
>   libs/odf/KoOdfLoadingContext.h c8481ec 
>   libs/odf/KoOdfLoadingContext.cpp 569cfd0 
> 
> Diff: http://git.reviewboard.kde.org/r/105589/diff/
> 
> 
> Testing
> -------
> 
> Tested with the above file and it is working nicely.
> 
> Please note that the svg is parsted into odf data structures and therefore we don't save the svg when we save the document.
> 
> 
> Thanks,
> 
> Thorsten Zachmann
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20120717/2bb50a37/attachment.htm>


More information about the calligra-devel mailing list