<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/102315/">http://git.reviewboard.kde.org/r/102315/</a>
     </td>
    </tr>
   </table>
   <br />





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">1. There is a shape factory SvgShapeFactory which must be added to the shape registry to allow creating individual shapes from embedded svg content instead of using the VectorShape to display embedded svg content. The thing is, that this decision is probably application specific as e.g. karbon absolutely wants to have individual shape created from embeded svg content, whereas words might be perfectly happy to have the vector shape display svg content. If the factory is not added to the shape registry then copy pasting pure svg shapes like the artistic text shape is not possible without losing data (it would save itself to an embedded svg file but copying would produce a vector shape). So if we want the SvgShapeFactory always added to the shape registry, we probably would do that inside the shape registry itself.

 Does the VectorShape load svg content? I think it would be good to have a Shape that displays the content of an SVG. And I agree that for some applications it is better to not use that svg shape but create normal flake shapes. Just thinking it woulöd also be nice if a svg shape could be changes into flake if the user wants that. As you say we loose data now we should difinitely add the SVgShapeFactory to fix that.

2. Merging the two functions from SvgSerializable into KoShape. If we want to do that we would depend on the svg classes and separating them from flake would no longre be possible.

I'm all for it as it would make the code more simpler. Less needs for casts ....
</pre>
 <br />







<p>- Thorsten</p>


<br />
<p>On August 20th, 2011, 11:05 a.m., Jan Hambrecht 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.</div>
<div>By Jan Hambrecht.</div>


<p style="color: grey;"><i>Updated Aug. 20, 2011, 11:05 a.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;">This patch adds support for loading and saving embedded svg files within odf documents. There is an interface SvgSerializable which shapes can choose to implement to provide support for saving and loading themselves to and from svg. There are already some shapes ported to use that interface, namely ArtisticTextShape, EllipseShape, RectangleShape, PictureShape.
It also adds support for saving generic shapes to svg by utilizing the QSvgGenerator. Saving generic shapes to svg might be further improved in the future by having support to save odf to a single (flat) xml files which could be embedded into a svg document. This way we could utilize the native saving and loading support of non-svg shapes to not lose any data. Compatibility with other svg applications is ensured by using a svg:switch element which makes it possible to save different representations of a shape inside a svg document. 
I put the svg classes into the flake library for now as I created a circular dependency between flake and the svg stuff while working on the patch.
However this dependency is currently not there anymore, so we might put these svg classes back into a separate lib. There are two things which might be considered which would then not allow separating flake and the svg classes.
1. There is a shape factory SvgShapeFactory which must be added to the shape registry to allow creating individual shapes from embedded svg content instead of using the VectorShape to display embedded svg content. The thing is, that this decision is probably application specific as e.g. karbon absolutely wants to have individual shape created from embeded svg content, whereas words might be perfectly happy to have the vector shape display svg content. If the factory is not added to the shape registry then copy pasting pure svg shapes like the artistic text shape is not possible without losing data (it would save itself to an embedded svg file but copying would produce a vector shape). So if we want the SvgShapeFactory always added to the shape registry, we probably would do that inside the shape registry itself.
2. Merging the two functions from SvgSerializable into KoShape. If we want to do that we would depend on the svg classes and separating them from flake would no longre be possible.
</pre>
  </td>
 </tr>
</table>




<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=236562">236562</a>, 

 <a href="http://bugs.kde.org/show_bug.cgi?id=271360">271360</a>, 

 <a href="http://bugs.kde.org/show_bug.cgi?id=274654">274654</a>


</div>


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

 <li>CMakeLists.txt <span style="color: grey">(d6af8c4)</span></li>

 <li>braindump/plugins/stateshape/StateShapeFactory.cpp <span style="color: grey">(526c182)</span></li>

 <li>braindump/plugins/webshape/WebShapeFactory.cpp <span style="color: grey">(9c18655)</span></li>

 <li>filters/karbon/CMakeLists.txt <span style="color: grey">(a979a73)</span></li>

 <li>filters/karbon/svg/CMakeLists.txt <span style="color: grey">(14debd3)</span></li>

 <li>filters/karbon/svg/SvgClipPathHelper.h <span style="color: grey">(05c4e62)</span></li>

 <li>filters/karbon/svg/SvgClipPathHelper.cpp <span style="color: grey">(0fc6378)</span></li>

 <li>filters/karbon/svg/SvgCssHelper.h <span style="color: grey">(86238b5)</span></li>

 <li>filters/karbon/svg/SvgCssHelper.cpp <span style="color: grey">(d4a959b)</span></li>

 <li>filters/karbon/svg/SvgExport.cpp <span style="color: grey">(1c49c7c)</span></li>

 <li>filters/karbon/svg/SvgFilterHelper.h <span style="color: grey">(64d5828)</span></li>

 <li>filters/karbon/svg/SvgFilterHelper.cpp <span style="color: grey">(56a093a)</span></li>

 <li>filters/karbon/svg/SvgGradientHelper.h <span style="color: grey">(83486c2)</span></li>

 <li>filters/karbon/svg/SvgGradientHelper.cpp <span style="color: grey">(c2a6090)</span></li>

 <li>filters/karbon/svg/SvgGraphicContext.h <span style="color: grey">(0daa8cd)</span></li>

 <li>filters/karbon/svg/SvgLoadingContext.h <span style="color: grey">(770a304)</span></li>

 <li>filters/karbon/svg/SvgLoadingContext.cpp <span style="color: grey">(a7bb4a1)</span></li>

 <li>filters/karbon/svg/SvgParser.h <span style="color: grey">(bd8a9dd)</span></li>

 <li>filters/karbon/svg/SvgParser.cpp <span style="color: grey">(c539e90)</span></li>

 <li>filters/karbon/svg/SvgPatternHelper.h <span style="color: grey">(70b14ac)</span></li>

 <li>filters/karbon/svg/SvgPatternHelper.cpp <span style="color: grey">(42da550)</span></li>

 <li>filters/karbon/svg/SvgSavingContext.h <span style="color: grey">(2022b00)</span></li>

 <li>filters/karbon/svg/SvgSavingContext.cpp <span style="color: grey">(2333910)</span></li>

 <li>filters/karbon/svg/SvgTextHelper.h <span style="color: grey">(b0b3060)</span></li>

 <li>filters/karbon/svg/SvgTextHelper.cpp <span style="color: grey">(6104664)</span></li>

 <li>filters/karbon/svg/SvgUtil.h <span style="color: grey">(87a8f14)</span></li>

 <li>filters/karbon/svg/SvgUtil.cpp <span style="color: grey">(92f635c)</span></li>

 <li>filters/karbon/svg/SvgWriter.h <span style="color: grey">(2644ce1)</span></li>

 <li>filters/karbon/svg/SvgWriter.cpp <span style="color: grey">(2bcc664)</span></li>

 <li>karbon/ui/KarbonPart.cpp <span style="color: grey">(1eb5319)</span></li>

 <li>kexi/shapes/relationdesign/kexirelationdesignfactory.cpp <span style="color: grey">(2cfd5b9)</span></li>

 <li>libs/flake/CMakeLists.txt <span style="color: grey">(b9f388f)</span></li>

 <li>libs/flake/KoConnectionShapeFactory.cpp <span style="color: grey">(7e96f2b)</span></li>

 <li>libs/flake/KoPathShapeFactory.cpp <span style="color: grey">(c62658e)</span></li>

 <li>libs/flake/KoShapeFactoryBase.h <span style="color: grey">(79a893d)</span></li>

 <li>libs/flake/KoShapeFactoryBase.cpp <span style="color: grey">(fbbab41)</span></li>

 <li>libs/flake/KoShapeRegistry.h <span style="color: grey">(593e61a)</span></li>

 <li>libs/flake/KoShapeRegistry.cpp <span style="color: grey">(06e4c7c)</span></li>

 <li>libs/flake/svg/SvgClipPathHelper.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgClipPathHelper.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgCssHelper.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgCssHelper.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgFilterHelper.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgFilterHelper.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgGradientHelper.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgGradientHelper.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgGraphicContext.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgGraphicContext.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgLoadingContext.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgLoadingContext.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgParser.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgParser.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgPatternHelper.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgPatternHelper.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgSavingContext.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgSavingContext.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgSerializable.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgSerializable.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgShapeFactory.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgShapeFactory.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgStyleParser.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgStyleParser.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgStyleWriter.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgStyleWriter.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgUtil.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgUtil.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgWriter.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/flake/svg/SvgWriter.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>plugins/artistictextshape/ArtisticTextLoadingContext.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>plugins/artistictextshape/ArtisticTextLoadingContext.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>plugins/artistictextshape/ArtisticTextShape.h <span style="color: grey">(253113e)</span></li>

 <li>plugins/artistictextshape/ArtisticTextShape.cpp <span style="color: grey">(1883968)</span></li>

 <li>plugins/artistictextshape/ArtisticTextShapeFactory.cpp <span style="color: grey">(de4ad1f)</span></li>

 <li>plugins/artistictextshape/ArtisticTextTool.cpp <span style="color: grey">(2c57c07)</span></li>

 <li>plugins/artistictextshape/CMakeLists.txt <span style="color: grey">(f92533d)</span></li>

 <li>plugins/chartshape/ChartShapeFactory.cpp <span style="color: grey">(793aa46)</span></li>

 <li>plugins/commentshape/CommentShapeFactory.cpp <span style="color: grey">(869cc66)</span></li>

 <li>plugins/formulashape/KoFormulaShapeFactory.cpp <span style="color: grey">(588a9e2)</span></li>

 <li>plugins/musicshape/MusicShapeFactory.cpp <span style="color: grey">(c61e9fc)</span></li>

 <li>plugins/pathshapes/CMakeLists.txt <span style="color: grey">(e773367)</span></li>

 <li>plugins/pathshapes/ellipse/EllipseShape.h <span style="color: grey">(4bc766e)</span></li>

 <li>plugins/pathshapes/ellipse/EllipseShape.cpp <span style="color: grey">(0576f5d)</span></li>

 <li>plugins/pathshapes/ellipse/EllipseShapeFactory.cpp <span style="color: grey">(9fa50fe)</span></li>

 <li>plugins/pathshapes/enhancedpath/EnhancedPathShapeFactory.cpp <span style="color: grey">(4086698)</span></li>

 <li>plugins/pathshapes/rectangle/RectangleShape.h <span style="color: grey">(08d5423)</span></li>

 <li>plugins/pathshapes/rectangle/RectangleShape.cpp <span style="color: grey">(9caca45)</span></li>

 <li>plugins/pathshapes/rectangle/RectangleShapeFactory.cpp <span style="color: grey">(51c92fb)</span></li>

 <li>plugins/pathshapes/star/StarShapeFactory.cpp <span style="color: grey">(984b938)</span></li>

 <li>plugins/pictureshape/CMakeLists.txt <span style="color: grey">(1539312)</span></li>

 <li>plugins/pictureshape/PictureShape.h <span style="color: grey">(527d2e4)</span></li>

 <li>plugins/pictureshape/PictureShape.cpp <span style="color: grey">(5dc1c7b)</span></li>

 <li>plugins/pictureshape/PictureShapeFactory.cpp <span style="color: grey">(313e1be)</span></li>

 <li>plugins/pluginshape/PluginShapeFactory.cpp <span style="color: grey">(6aa335a)</span></li>

 <li>plugins/textshape/TextShapeFactory.cpp <span style="color: grey">(365b2e7)</span></li>

 <li>plugins/treeshape/TreeShapeFactory.cpp <span style="color: grey">(b7b36ec)</span></li>

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

 <li>plugins/videoshape/VideoShapeFactory.cpp <span style="color: grey">(7b27bd4)</span></li>

 <li>stage/part/KPrPlaceholderShapeFactory.cpp <span style="color: grey">(fdca058)</span></li>

 <li>tables/shape/TableShapeFactory.cpp <span style="color: grey">(ef9cccf)</span></li>

</ul>

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




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








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