Review Request: Fix loading of VectorShape and KoUnavailShape.

Thorsten Zachmann t.zachmann at zagge.de
Sun Aug 5 18:06:40 BST 2012



> On Aug. 5, 2012, 11:03 a.m., Friedrich W. H. Kossebau wrote:
> > plugins/vectorshape/VectorShapeFactory.cpp, lines 79-81
> > <http://git.reviewboard.kde.org/r/105873/diff/2/?file=76072#file76072line79>
> >
> >     From ODF 1.2 Part 3 ยง4.8.10:
> >     "A manifest:media-type attribute should be present for all files and directories where a MIME media type exists for the content of the file, or the document or sub document contained in a directory."
> >     
> >     So if there is no (registered) mimetype it seems spec-compliant to not write a mimetype. And for WMF/EMF/SVM there is no IANA-registered mimetype.
> >     So perhaps Calligra should follow MSO here (and so should LO, if they do not already).

The problem is not that the media-type attribute is missing in the given file. The problem here is that the full file is missing in the manifest and therefore no mimetype is returned.


- Thorsten


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


On Aug. 5, 2012, 10:14 a.m., Thorsten Zachmann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105873/
> -----------------------------------------------------------
> 
> (Updated Aug. 5, 2012, 10:14 a.m.)
> 
> 
> Review request for Calligra.
> 
> 
> Description
> -------
> 
> In the commit 9efb4e33f2729080b1f1f24bb18970499a21f2b9 unfortunately a regression was introduced so that loading of vector shapes generated by OO/LO/MSO and our filters no longer work. Unfortunately this commit is also in the 2.5 release. This can be seen e.g. with the following documents:
> 
> sundaram.fedorapeople.org%2Fpresentations%2Ffedora-fail-learn.odp
> jeffcoweb.jeffco.k12.co.us%2Fhigh%2Fchatfield%2Fdepartments%2Fbusiness%2Fbanking_finance%2Funit_Plan_Budget.odp
> drwho.virtadpt.net%2Ffiles%2FNOVALUG-Tor.odp
> 
> but much much more of our test documents are effected. There is also a crash in the last document due to which I noticed the problem and started investigating.
> 
> The problem is that our filters and the other apps create mimetypes that se no longer load with the above mentioned commit. 
> 
> This patch fixes the filter to use the new mimetypes when converting files and adding other mimetypes that are written be e.g. OO or guessed by the mimetype guesser of some of the files.
> 
> Additionally fixed by this patch is to not load the first child element twice as when the first loading failed it makes no sense to try it a second time. 
> It also fixes a problem that the formula shape and the chart shape tried to load every embedded document even if it had the wrong mimetype.
> 
> I think this should be backported to 2.5 and put into the release as it is quite a big regressions since the RC
> 
> 
> Diffs
> -----
> 
>   filters/libmso/pictures.cpp 26158df 
>   libs/flake/KoShapeRegistry.cpp 9a3712f 
>   libs/odf/KoOdfLoadingContext.cpp 8b0d44e 
>   plugins/chartshape/ChartShapeFactory.cpp b3a5014 
>   plugins/formulashape/KoFormulaShapeFactory.cpp 7ce11fd 
>   plugins/vectorshape/VectorShapeFactory.cpp f9ce5af 
> 
> Diff: http://git.reviewboard.kde.org/r/105873/diff/
> 
> 
> Testing
> -------
> 
> Run cstester and now the vector shapes are back and additionally some additional vector shapes are now loaded correctly.
> 
> 
> Thanks,
> 
> Thorsten Zachmann
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20120805/9b7708e8/attachment.htm>


More information about the calligra-devel mailing list