Review Request: install SVM data in mimetype database; use same mimetype for SVM like LO/AOO: "image/x-svm"
Jarosław Staniek
staniek at kde.org
Sun Aug 5 22:15:42 BST 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105883/#review16919
-----------------------------------------------------------
plugins/vectorshape/CMakeLists.txt
<http://git.reviewboard.kde.org/r/105883/#comment13281>
Side note:
This package is already used in two other places:
- filters/libmsooxml/CMakeLists.txt
- krita/plugins/formats/ora/CMakeLists.txt
This leads to incomplete reasoning of displayed if SharedMimeInfo feature could not be found on cmake configuration stage. It looks on my system like:
----------------------------------------------------------------------------
-- The following REQUIRED packages could NOT be located on your system.
-- You must install these packages before continuing.
-----------------------------------------------------------------------------
* SharedMimeInfo <http://freedesktop.org/wiki/Software/shared-mime-info>
Shared Mime Info
Required to determine MSOOXML file types.
(note the last line)
Ideally it could be one combined info about all possible uses.
I recently encountered such case for all uses of MySQL in Kexi, and this is what I would do in your case: move lines 54 and 55 to global CMakeLists.txt, change the description to:
"Required to determine MSOOXML, OpenRaster and SVM file types."
Then find_package and macro_log_feature lines should be removed from both filters/libmsooxml/CMakeLists.txt and krita/plugins/formats/ora/CMakeLists.txt.
Last step could be to check if SHARED_MIME_INFO_FOUND is defined in all 3 areas where it's used. We cannot do it in the global CMakeLists.txt (I guess) since all the plugins where it's used are marked as optional, so it's possible SHARED_MIME_INFO_FOUND is not needed (even if it's rare).
Please note, this approach is tested but I do not claim it's the most clever or standard, so feel free to improve.
Consulting with our cmake magician Alexander Neundorf <neundorf at kde.org> could be good idea.
- Jarosław Staniek
On Aug. 5, 2012, 7:50 p.m., Friedrich W. H. Kossebau wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105883/
> -----------------------------------------------------------
>
> (Updated Aug. 5, 2012, 7:50 p.m.)
>
>
> Review request for Calligra, Thorsten Zachmann and Inge Wallin.
>
>
> Description
> -------
>
> Triggered by "Fix loading of VectorShape and KoUnavailShape." (https://git.reviewboard.kde.org/r/105873/) I had another look at the mimetype and detection of SVM files. And found e.g. these, among a lot of similar matches:
> * http://api.libreoffice.org/common/ref/com/sun/star/graphic/MediaProperties.html
> * https://svn.apache.org/repos/asf/incubator/ooo/trunk/main/filter/source/config/fragments/types/svm_StarView_Metafile.xcu
>
> So it seems that "image/x-svm" is the internally used mimetype string, not "application/x-svm". While that one is not used in the manifest by LO (correctly, as I understood the package spec), Calligra better still should switch to use it internally as well.
>
> And installing the magic data about SVM into the mimetype database will result both in KoOdfLoadingContext::mimeTypeForPath(const QString& path, bool guess) with guess=true delivering the proper mimetype (no longer application/octet-stream), as well as allow to use the mimetype also in the filedialogs to chose a file for the vector shape.
>
>
> Diffs
> -----
>
> plugins/vectorshape/CMakeLists.txt fe677e5
> plugins/vectorshape/VectorShape.cpp 232402a
> plugins/vectorshape/VectorShapeConfigWidget.cpp ca9f743
> plugins/vectorshape/VectorShapeFactory.cpp fd04aac
> plugins/vectorshape/VectorTool.cpp 2cbe9db
> plugins/vectorshape/calligra_svm.xml PRE-CREATION
>
> Diff: http://git.reviewboard.kde.org/r/105883/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Friedrich W. H. Kossebau
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20120805/dcebf3d5/attachment.htm>
More information about the calligra-devel
mailing list