<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/105030/">http://git.reviewboard.kde.org/r/105030/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On May 26th, 2012, 5:44 a.m., <b>Thorsten Zachmann</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<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/105030/diff/1/?file=65363#file65363line80" style="color: black; font-weight: bold; text-decoration: underline;">stage/part/animations/strategy/KPrSmilValues.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</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">79</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">formula</span><span class="p">.</span><span class="n">isEmpty</span><span class="p">())</span> <span class="p">{</span></pre></td>
</tr>
<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">80</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">KPrFormulaParser</span> <span class="n">formulaParser</span> <span class="p">(</span><span class="n">formula</span><span class="p">,</span> <span class="n">m_shape</span><span class="p">,</span> <span class="n">m_textBlockData</span><span class="p">);</span></pre></td>
</tr>
<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">81</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">formulaParser</span><span class="p">.</span><span class="n">valid</span><span class="p">())</span> <span class="p">{</span></pre></td>
</tr>
<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">82</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">return</span> <span class="kc">false</span><span class="p">;</span></pre></td>
</tr>
<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">83</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="p">}</span></pre></td>
</tr>
<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">84</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">m_formulaParser</span><span class="p">.</span><span class="n">append</span><span class="p">(</span><span class="n">formulaParser</span><span class="p">);</span></pre></td>
</tr>
<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">85</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="p">}</span></pre></td>
</tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">When loading a formula the smil:values is not used so I guess it should not be loaded here.</pre>
</blockquote>
<p>On May 26th, 2012, 7:03 p.m., <b>Paul Mendez</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">smil:values defines where formula starts and ends like in:
<anim:animate smil:begin="0s" smil:dur="664ms" smil:targetElement="shape-11" smil:attributeName="y" smil:values="0.5;1" anim:formula="y-sin(pi*$)/3" smil:keyTimes="0;1"/>
or I'am missing something?</pre>
</blockquote>
<p>On May 27th, 2012, 4:26 a.m., <b>Thorsten Zachmann</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">According to the ODF spec 19.6
...
? "$" (U+0024, DOLLAR SIGN): The identifier ”$” is replaced by a value between 0 and 1
(inclusive) that represents a proportional offset into an animation element's duration.
...
If an anim:formula attribute is given, it overrides the smil:values, smil:to, smil:from
and smil:by attributes as specified in 15.3.2.
Also in the above formula there is no change and the 0.5 which is there is also not used in your code.
Can you see if these values are used in OO/LO? Does the animation change inf the smil:values is removed from the xml and you test again?
</pre>
</blockquote>
<p>On May 27th, 2012, 3:11 p.m., <b>Paul Mendez</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">In the current code smil:values are used to set startValue and endValue that are used when init cache is called, so they define when the animation starts and ends. I tried with a file without that values and neither Stage nor LO can play the animation.</pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The time pased from KPrAnimate to KPrSmilValues::value is in the range defined for KPrSmilValues::startValue() - KPrSmilValues::endValue(). This range is set when initializing the cache in KPrAnimate::init method. I think LO use something similar, because it can play anim:formula animations if there isn't the smil:values tags. Nevertheless, I'm not sure if that is the correct interpretation of the standard. If time must go between 0 and 1 for every anim:formula animation, I just need to set a new start and end values when parsing the formula. However, I think that the code that saves smil:value tag when saving anim:formula must remain for compatibility with LO.</pre>
<br />
<p>- Paul</p>
<br />
<p>On May 27th, 2012, 3:04 p.m., Paul Mendez 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 Paul Mendez.</div>
<p style="color: grey;"><i>Updated May 27, 2012, 3:04 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;">Add support for Anim:Formula tag in Stage. (That key is part of ODF animations specification).
Note: animations tested don't run as smooth as in LibreOffice because KeySplines tag is not implemented.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </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;">Test some animations of documents created in Libre Office (One test document is also uploaded)</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>stage/part/CMakeLists.txt <span style="color: grey">(3c7916ef7496af21e65d9a5441d5cb924829c347)</span></li>
<li>stage/part/animations/KPrAnimate.cpp <span style="color: grey">(dddd1fa401d596e7e23688f950428cd0ea76b639)</span></li>
<li>stage/part/animations/strategy/KPrFormulaParser.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>stage/part/animations/strategy/KPrFormulaParser.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>stage/part/animations/strategy/KPrSmilValues.h <span style="color: grey">(163d78b830a151ce150192000890a395f9e273dd)</span></li>
<li>stage/part/animations/strategy/KPrSmilValues.cpp <span style="color: grey">(3faafc4eb1c8783224f9f32c38106407cc219096)</span></li>
<li>stage/part/animations/strategy/KPrValueParser.h <span style="color: grey">(8f3c6ebcdf7ae9f5d938d97d518f21977b572940)</span></li>
<li>stage/part/animations/strategy/KPrValueParser.cpp <span style="color: grey">(ca7fac767142e64b9711ccf835efcb9a4c242e36)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/105030/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>