[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: Review Request: Patch for ChartShape to show the percentage
From: "Johannes Simon" <johannes.simon () gmail ! com>
Date: 2010-08-19 10:44:21
Message-ID: 20100819104421.16036.31328 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/5064/#review7135
-----------------------------------------------------------
Though I always welcome patches, there's two problems with this one:
o when you modify code in KD Chart (the charting library, not the shape), e=
verything is required to stay backwards-compatible. Your patch however chan=
ges the default look of a percentage diagram. In addition to that, KDChart:=
:DataValueAttributes::setSuffix(QString) already provides the functionatlit=
y you need.
o The chart shape already supports this. See DataSet::setValueLabelType( Va=
lueLabelType type ). Use ValueLabelType::PercentageValueLabel to add the "%=
" suffix.
One or two tweaks might be required depending on where you need this. When =
loading an existing document from ODF, this is automatically done for you (=
if the diagram's style actually specifies a "%" suffix). See DataSet::loadO=
df().
- Johannes
On 2010-08-19 08:35:35, Miroslav Nohaj wrote:
> =
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/5064/
> -----------------------------------------------------------
> =
> (Updated 2010-08-19 08:35:35)
> =
> =
> Review request for KOffice.
> =
> =
> Summary
> -------
> =
> This very short patch adds the percentage symbol to the numbers shown in =
percentage diagram (i.e. in KSpread).
> =
> =
> Diffs
> -----
> =
> /trunk/koffice/plugins/chartshape/kdchart/src/KDChartAbstractDiagram.cp=
p 1164198 =
> /trunk/koffice/plugins/chartshape/kdchart/src/KDChartBarDiagram.cpp 116=
4198 =
> =
> Diff: http://reviewboard.kde.org/r/5064/diff
> =
> =
> Testing
> -------
> =
> =
> Thanks,
> =
> Miroslav
> =
>
[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://reviewboard.kde.org/r/5064/">http://reviewboard.kde.org/r/5064/</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;">Though I always welcome \
patches, there's two problems with this one:
o when you modify code in KD Chart (the charting library, not the shape), everything \
is required to stay backwards-compatible. Your patch however changes the default look \
of a percentage diagram. In addition to that, \
KDChart::DataValueAttributes::setSuffix(QString) already provides the functionatlity \
you need. o The chart shape already supports this. See DataSet::setValueLabelType( \
ValueLabelType type ). Use ValueLabelType::PercentageValueLabel to add the \
"%" suffix.
One or two tweaks might be required depending on where you need this. When loading an \
existing document from ODF, this is automatically done for you (if the diagram's \
style actually specifies a "%" suffix). See DataSet::loadOdf().</pre> <br \
/>
<p>- Johannes</p>
<br />
<p>On August 19th, 2010, 8:35 a.m., Miroslav Nohaj wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://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 KOffice.</div>
<div>By Miroslav Nohaj.</div>
<p style="color: grey;"><i>Updated 2010-08-19 08:35:35</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 very short patch adds the percentage symbol to the numbers shown in \
percentage diagram (i.e. in KSpread).</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>/trunk/koffice/plugins/chartshape/kdchart/src/KDChartAbstractDiagram.cpp <span \
style="color: grey">(1164198)</span></li>
<li>/trunk/koffice/plugins/chartshape/kdchart/src/KDChartBarDiagram.cpp <span \
style="color: grey">(1164198)</span></li>
</ul>
<p><a href="http://reviewboard.kde.org/r/5064/diff/" style="margin-left: 3em;">View \
Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic