[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Review Request: KSpread - added support for extra-short month
From:       "Marijn Kruisselbrink" <m.kruisselbrink () student ! tue ! nl>
Date:       2010-06-30 9:05:04
Message-ID: 20100630090504.11380.38869 () localhost
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/4499/#review6325
-----------------------------------------------------------



/trunk/koffice/libs/odf/KoOdfNumberStyles.cpp
<http://reviewboard.kde.org/r/4499/#comment6051>

    This doesn't seem to match the loading code? When loading you store the=
 extra-short month name as X in the format string, but for saving you save =
something as the extra-short month name when you find MMMMM?


- Marijn


On 2010-06-30 08:08:58, Miroslav Nohaj wrote:
> =

> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/4499/
> -----------------------------------------------------------
> =

> (Updated 2010-06-30 08:08:58)
> =

> =

> Review request for KOffice.
> =

> =

> Summary
> -------
> =

> This simple patch adds support for importing (from .xlsx), loading, savin=
g and displaying of extra-short month format in KSpread. The extra-short mo=
nth format is used in MS Excel and it displays only the first letter of the=
 month name (like S for September). =

> Special character 'X' is used to mark the usage of extra-short month form=
at because the QDateTime::toString doesn't support 'MMMMM' and the 'M' has =
other meaning. Also special (non-standard) tag in the .ods was used to mark=
 this extra-short month format because the .ods currently doesn't support t=
he extra-short month format directly (suggested by Mek).
> =

> The patch affects /libs/odf/ so it might need some improvements to not af=
fect the other KOffice applications.
> =

> =

> Diffs
> -----
> =

>   /trunk/koffice/filters/kspread/xlsx/NumberFormatParser.cpp 1144208 =

>   /trunk/koffice/kspread/Style.cpp 1144208 =

>   /trunk/koffice/kspread/ValueFormatter.cpp 1144208 =

>   /trunk/koffice/libs/odf/KoOdfNumberStyles.cpp 1144208 =

> =

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









<div>



<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="/r/4499/diff/1/?file=29955#file29955line598" style="color: black; font-weight: \
bold; text-decoration: underline;">/trunk/koffice/libs/odf/KoOdfNumberStyles.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; \
white-space: pre-wrap; word-wrap: break-word;">QString saveOdfDateStyle(KoGenStyles \
&amp;mainStyles, const QString &amp;_format, bool klocaleFormat,</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">589</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; white-space: pre-wrap; \
word-wrap: break-word;">            <span class="k">else</span> <span \
class="k">if</span> <span class="p">(</span><span class="n">format</span><span \
class="p">.</span><span class="n">startsWith</span><span class="p">(</span><span \
class="s">&quot;MMMMM&quot;</span><span class="p">))</span> <span \
class="p">{</span></pre></td>  <th bgcolor="#e9eaa8" style="border-left: 1px solid \
#C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font \
size="2">598</font></th>  <td bgcolor="#fdfebc" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; white-space: pre-wrap; word-wrap: break-word;">    \
<span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span \
class="n">format</span><span class="p">.</span><span class="n">startsWith</span><span \
class="p">(</span><span class="s">&quot;MMMMM&quot;</span><span class="p">))</span> \
<span class="p">{</span><span class="hl">        </span><span class="c1"><span \
class="hl">// MMMMM is extra-short month name (only 1st \
character)</span></span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em">This doesn&#39;t seem to match the loading code? When \
loading you store the extra-short month name as X in the format string, but for \
saving you save something as the extra-short month name when you find MMMMM?</pre> \
</div> <br />



<p>- Marijn</p>


<br />
<p>On June 30th, 2010, 8:08 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-06-30 08:08:58</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;">This simple patch adds support for importing \
(from .xlsx), loading, saving and displaying of extra-short month format in KSpread. \
The extra-short month format is used in MS Excel and it displays only the first \
letter of the month name (like S for September).  Special character &#39;X&#39; is \
used to mark the usage of extra-short month format because the QDateTime::toString \
doesn&#39;t support &#39;MMMMM&#39; and the &#39;M&#39; has other meaning. Also \
special (non-standard) tag in the .ods was used to mark this extra-short month format \
because the .ods currently doesn&#39;t support the extra-short month format directly \
(suggested by Mek).

The patch affects /libs/odf/ so it might need some improvements to not affect the \
other KOffice applications.</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/filters/kspread/xlsx/NumberFormatParser.cpp <span style="color: \
grey">(1144208)</span></li>

 <li>/trunk/koffice/kspread/Style.cpp <span style="color: grey">(1144208)</span></li>

 <li>/trunk/koffice/kspread/ValueFormatter.cpp <span style="color: \
grey">(1144208)</span></li>

 <li>/trunk/koffice/libs/odf/KoOdfNumberStyles.cpp <span style="color: \
grey">(1144208)</span></li>

</ul>

<p><a href="http://reviewboard.kde.org/r/4499/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