[prev in list] [next in list] [prev in thread] [next in thread] 

List:       calligra-devel
Subject:    Re: Review Request: install SVM data in mimetype database; use same mimetype for SVM like LO/AOO: "i
From:       Jarosław_Staniek <staniek () kde ! org>
Date:       2012-08-05 21:15:42
Message-ID: 20120805211542.26500.73747 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


-----------------------------------------------------------
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@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
> 
> 


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/105883/">http://git.reviewboard.kde.org/r/105883/</a>
  </td>
    </tr>
   </table>
   <br />









<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="http://git.reviewboard.kde.org/r/105883/diff/2/?file=76203#file76203line54" \
style="color: black; font-weight: bold; text-decoration: \
underline;">plugins/vectorshape/CMakeLists.txt</a>  <span style="font-weight: \
normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
"></pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">54</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
">find_package(SharedMimeInfo)</pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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  &lt;http://freedesktop.org/wiki/Software/shared-mime-info&gt;
     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:  &quot;Required to determine MSOOXML, OpenRaster and SVM file \
types.&quot;

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&#39;s used. We cannot do it in the global CMakeLists.txt (I guess) since all the \
plugins where it&#39;s used are marked as optional, so it&#39;s possible  \
SHARED_MIME_INFO_FOUND is not needed (even if it&#39;s rare).

Please note, this approach is tested but I do not claim it&#39;s the most clever or \
standard, so feel free to improve. Consulting with our cmake magician Alexander \
Neundorf &lt;neundorf@kde.org&gt; could be good idea. </pre>
</div>
<br />



<p>- Jarosław</p>


<br />
<p>On August 5th, 2012, 7:50 p.m., Friedrich W. H. Kossebau wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for Calligra, Thorsten Zachmann and Inge Wallin.</div>
<div>By Friedrich W. H. Kossebau.</div>


<p style="color: grey;"><i>Updated Aug. 5, 2012, 7:50 p.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Triggered by &quot;Fix loading of VectorShape and KoUnavailShape.&quot; \
(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 &quot;image/x-svm&quot; is the internally used mimetype string, not \
&quot;application/x-svm&quot;. 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&amp; 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.</pre>  </td>
 </tr>
</table>





<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>plugins/vectorshape/CMakeLists.txt <span style="color: \
grey">(fe677e5)</span></li>

 <li>plugins/vectorshape/VectorShape.cpp <span style="color: \
grey">(232402a)</span></li>

 <li>plugins/vectorshape/VectorShapeConfigWidget.cpp <span style="color: \
grey">(ca9f743)</span></li>

 <li>plugins/vectorshape/VectorShapeFactory.cpp <span style="color: \
grey">(fd04aac)</span></li>

 <li>plugins/vectorshape/VectorTool.cpp <span style="color: \
grey">(2cbe9db)</span></li>

 <li>plugins/vectorshape/calligra_svm.xml <span style="color: \
grey">(PRE-CREATION)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/105883/diff/" style="margin-left: \
3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>



_______________________________________________
calligra-devel mailing list
calligra-devel@kde.org
https://mail.kde.org/mailman/listinfo/calligra-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic