<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/100918/">http://git.reviewboard.kde.org/r/100918/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On April 7th, 2011, 1:12 p.m., <b>Matus Uzak</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/100918/diff/2/?file=12807#file12807line649" style="color: black; font-weight: bold; text-decoration: underline;">libs/kotext/styles/KoListLevelProperties.cpp</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; ">void KoListLevelProperties::loadOdf(KoShapeLoadingContext& scontext, const KoXmlElement& style)</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">649</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="n">relativeBulletSize</span><span class="p">()</span><span class="o">==</span><span class="mi">0</span> <span class="o">||</span> <span class="n">relativeBulletSize</span><span class="p">()</span> <span class="o">==</span><span class="mi">100</span><span class="p">)</span> <span class="c1">//if not set in bullet-relative-size or any where before then set it now</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;">Sorry my fault. :)
For 100 percent it's correct, but why do you ignore the relativeBulletSize = 0? Do we handle negative values?
According to the spec:
18.3.23 percent
(Positive or negative) percentage values in conformance with ยง5.9.11 of [XSL].
</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;">It was for uninitialized relativeBulletSize. Since now we are initializing in the constructor we can remove relativeBulletSize = 0 check.</pre>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On April 7th, 2011, 1:12 p.m., <b>Matus Uzak</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/100918/diff/2/?file=12811#file12811line179" style="color: black; font-weight: bold; text-decoration: underline;">libs/odf/KoStyleStack.cpp</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="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">qreal KoStyleStack::fontSize(const qreal defaultFontPointSize) const</pre></td>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">QPair<qreal,qreal> KoStyleStack::fontSize(const qreal defaultFontPointSize) const</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">179</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">return</span> <span class="n">percent</span> <span class="o">*</span> <span class="n">KoUnit</span><span class="o">::</span><span class="n">parseValue</span><span class="p">(</span><span class="n">value</span><span class="p">);</span> <span class="c1">// e.g. 12pt</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">179</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">return</span> <span class="n"><span class="hl">QPair</span></span><span class="o"><span class="hl"><</span></span><span class="n"><span class="hl">qreal</span></span><span class="p"><span class="hl">,</span></span><span class="n"><span class="hl">qreal</span></span><span class="o"><span class="hl">></span></span><span class="hl"> </span><span class="p"><span class="hl">(</span></span><span class="n">percent</span> <span class="o">*</span> <span class="n">KoUnit</span><span class="o">::</span><span class="n">parseValue</span><span class="p">(</span><span class="n">value</span><span class="p">)<span class="hl">,</span></span><span class="hl"> </span><span class="n"><span class="hl">percent</span></span><span class="o"><span class="hl">*</span></span><span class="mi"><span class="hl">100</span></span><span class="p"><span class="hl">)</span>;</span> <span class="c1">// e.g. 12pt</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;">Let's make it more readable: when working with a percentage value, then do not divide and multiply it by 100.
Bad example:
qreal base = BASE;
qreal percent = value.left(value.length() - 1).toDouble();
percent = percent / 100;
return base * percent; //to get the value
return percent * 100; //to get the percentage again
Good example:
qreal percent = value.left(value.length() - 1).toDouble();
return base * percent / 100;
return percent;
</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;">Yes, you are right. I will correct this.</pre>
<br />
<p>- Gopalakrishna</p>
<br />
<p>On March 24th, 2011, 4:20 p.m., Gopalakrishna Bhat 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 Gopalakrishna Bhat.</div>
<p style="color: grey;"><i>Updated March 24, 2011, 4:20 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;">Fixes the following problems in list rendering
1)The type of list item was not shown in the paragraph docker(SimpleParagraphWidget).
2)Takes into account the font-size percent while loading and saving lists.
3) Prefixes and suffixes are now displayed for bulleted lists.</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=264143">264143</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>filters/words/oowriter/oowriterimport.cc <span style="color: grey">(2bd55ee)</span></li>
<li>libs/kotext/styles/KoCharacterStyle.h <span style="color: grey">(3cec793)</span></li>
<li>libs/kotext/styles/KoCharacterStyle.cpp <span style="color: grey">(6eaab0f)</span></li>
<li>libs/kotext/styles/KoListLevelProperties.h <span style="color: grey">(14814fe)</span></li>
<li>libs/kotext/styles/KoListLevelProperties.cpp <span style="color: grey">(62a5175)</span></li>
<li>libs/kotext/styles/KoListStyle.h <span style="color: grey">(bee4eaf)</span></li>
<li>libs/kotext/styles/KoListStyle.cpp <span style="color: grey">(52d7c2f)</span></li>
<li>libs/odf/KoStyleStack.h <span style="color: grey">(2f4d2cf)</span></li>
<li>libs/odf/KoStyleStack.cpp <span style="color: grey">(491f14e)</span></li>
<li>plugins/textshape/ListItemsHelper.cpp <span style="color: grey">(aa61481)</span></li>
<li>plugins/textshape/TextShapeLayout.cpp <span style="color: grey">(ea49dc4)</span></li>
<li>plugins/textshape/commands/ChangeListCommand.cpp <span style="color: grey">(23eeee0)</span></li>
<li>plugins/textshape/dialogs/ParagraphBulletsNumbers.cpp <span style="color: grey">(14c5fd7)</span></li>
<li>plugins/textshape/tests/TestChangeListCommand.cpp <span style="color: grey">(4da46d1)</span></li>
<li>plugins/textshape/tests/TestLists.cpp <span style="color: grey">(316f5f6)</span></li>
<li>tools/mobile/ApplicationController.cpp <span style="color: grey">(83ebe6e)</span></li>
<li>words/part/KWDLoader.cpp <span style="color: grey">(e99435a)</span></li>
<li>words/part/KWDocument.cpp <span style="color: grey">(8408c42)</span></li>
<li>words/plugins/scripting/Style.h <span style="color: grey">(a72c0d2)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/100918/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>