<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/100679/">http://git.reviewboard.kde.org/r/100679/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On February 21st, 2011, 1:09 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/100679/diff/1/?file=9483#file9483line1984" style="color: black; font-weight: bold; text-decoration: underline;">plugins/textshape/Layout.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; ">void Layout::drawListItem(QPainter *painter, const QTextBlock &block, KoImageCollection *imageCollection)</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">1984</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">chFormatMaxFontSize</span><span class="p">.</span><span class="n">fontPointSize</span><span class="p">()</span><span class="o"><</span><span class="n">currentFragment</span><span class="p">.</span><span class="n">charFormat</span><span class="p">().</span><span class="n">fontPointSize</span><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;">Both MS Office and TeX use minimum here.</pre>
</blockquote>
<p>On February 22nd, 2011, 1:09 p.m., <b>Gopalakrishna Bhat</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;">A single list item might have different styles with different font sizes, so this is necessary. I just checked in MS Office and OO both position the bullets at the center of the list item and they use the max font size to calculate the position.</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;">My fault, we can't generalize here. Each application from MS Office does it differently. PowerPoint: font-size of the first run of text, MSWord: some combination of the max font-size of all text runs and font-size of the paragraph mark (The "Symbol" font-family is used for the bullet, for numbered lists font-family depends on font-family and font-size of text runs). My current plan is to save this info directly to list-level-style-* in the filters (It's provided in lists related properties). Feel free to use whatever looks fine for the defaults. :)</pre>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On February 21st, 2011, 1:09 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/100679/diff/1/?file=9483#file9483line2055" style="color: black; font-weight: bold; text-decoration: underline;">plugins/textshape/Layout.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; ">void Layout::drawListItem(QPainter *painter, const QTextBlock &block, KoImageCollection *imageCollection)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">2040</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">qreal</span> <span class="n">y</span> <span class="o">=</span> <span class="n">data</span><span class="o">-></span><span class="n">counterPosition</span><span class="p">().</span><span class="n">y</span><span class="p">()</span> <span class="o">+</span> <span class="n">fm</span><span class="p"><span class="hl">.</span></span><span class="n"><span class="hl">ascent</span></span><span class="p"><span class="hl">()</span></span><span class="hl"> </span><span class="o"><span class="hl">-</span></span><span class="hl"> </span><span class="n"><span class="hl">fm</span></span><span class="p"><span class="hl">.</span></span><span class="n"><span class="hl">xH</span>eight</span><span class="p">();</span> <span class="c1">// at <span class="hl">top</span> of text.</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">2055</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">qreal</span> <span class="n">y</span> <span class="o">=</span> <span class="n">data</span><span class="o">-></span><span class="n">counterPosition</span><span class="p">().</span><span class="n">y</span><span class="p">()</span> <span class="o">+</span> <span class="n">fm<span class="hl">Max</span></span><span class="p"><span class="hl">.</span></span><span class="n"><span class="hl">h</span>eight</span><span class="p">()</span><span class="o"><span class="hl">/</span></span><span class="mi"><span class="hl">2</span></span><span class="p">;</span> <span class="c1">// at <span class="hl">mid</span> of text.</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;">This one is tricky. You will never find the correct constants to make it look nice because it's font specific. We should definitely use the corresponding character of the font. Its designer already did the job. Lukas Tvrdy is already working on it.
As soon we will use the character, only the following has to be reused from the KoCharacterStyle inherited from the block: font-family, font-size, color. It makes no sense to apply font-weight, text-underline-type, etc.</pre>
</blockquote>
<p>On February 22nd, 2011, 1:15 p.m., <b>Gopalakrishna Bhat</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;">The original calculation placed the painter y-position at the baseline of the font text and then moved it using y-=width/10 which made the bullet off center at larger font sizes. The new approach is for that purpose. If Lukas is also working on it we can merge our efforts.</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;">Check this url, there are some test data, which might help you:
http://neuron.tuke.sk/~uzak/calligra/lists_support/</pre>
<br />
<p>- Matus</p>
<br />
<p>On February 20th, 2011, 4:59 p.m., Gopalakrishna Bhat wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.orgrb/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 Feb. 20, 2011, 4:59 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 bug 264143 and does a better handling of bullet sizes for list item having different styles.</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>libs/kotext/styles/KoParagraphStyle.h <span style="color: grey">(d531b96)</span></li>
<li>libs/kotext/styles/KoParagraphStyle.cpp <span style="color: grey">(4ca34b0)</span></li>
<li>plugins/textshape/Layout.cpp <span style="color: grey">(674cb23)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/100679/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>