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

List:       koffice-devel
Subject:    Re: Review Request: Default - empty char format is used for inline
From:       "Thomas Zander" <zander () kde ! org>
Date:       2010-11-18 20:18:55
Message-ID: 20101118201855.12020.2395 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On 2010-11-18 16:49:17, Casper Boemann wrote:
> > Obviously the argument of not using bool is valid, but in this case using a \
> > charformat, would mean many pleases where calling with the charformat of the \
> > cursor would be needed. A bool that defaults to false means much fewer places \
> > that needs code update. I'm just saying that coding for the future pays an impact \
> > in the present. 

> using a charformat, would mean many pleases where calling with the charformat of \
> the cursor would be needed.

Can you explain why that is so?
Both a bool can have a default ( = false) and a QTextCharFormat can also have a \
default  (see QTextCursor API, insertBlock for instance). So there is not really any \
difference as far as I can see. Am I missing something?

Unless I'm missing the point of this patch, the default empty charFormat is what you \
want to use in most usecases. The latest revision of the patch is missing usecases \
right now that could easily be fixed but are not with the approach Pavol choose. So \
I'm wondering why that he didn't follow my advice and went another way which \
introduces more bugs. For instance if a user inserts an image in his current document \
then the exact same problem will appear and there may be underlines and all that \
stuff on his image.

I suggested a solution that solves this in a previous thread that would solve both \
issues in one go. Is there any reason to not use that approach?


- Thomas


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


On 2010-11-18 11:21:01, Pavol Korinek wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/5898/
> -----------------------------------------------------------
> 
> (Updated 2010-11-18 11:21:01)
> 
> 
> Review request for KOffice.
> 
> 
> Summary
> -------
> 
> insertInlineObject method in KoInlineTextObjectManager class has been changed. \
> Inline object can be inserted using empty - default char format or current cursor \
> char format. Empty - default char format is used for inline (as-char) shapes now. 
> 
> Diffs
> -----
> 
> /trunk/koffice/libs/kotext/KoInlineTextObjectManager.h 1198325 
> /trunk/koffice/libs/kotext/KoInlineTextObjectManager.cpp 1198325 
> /trunk/koffice/libs/kotext/opendocument/KoTextLoader.cpp 1198325 
> 
> Diff: http://svn.reviewboard.kde.org/r/5898/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Pavol
> 
> 


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





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On November 18th, 2010, 4:49 p.m., <b>Casper \
Boemann</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;">Obviously the argument of not using bool is valid, but in this case \
using a charformat, would mean many pleases where calling with the charformat of the \
cursor would be needed. A bool that defaults to false means much fewer places that \
needs code update. I&#39;m just saying that coding for the future pays an impact in \
the present. </pre>
 </blockquote>







</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">&gt;  using a \
charformat, would mean many pleases where calling with the charformat of the cursor \
would be needed.

Can you explain why that is so?
Both a bool can have a default ( = false) and a QTextCharFormat can also have a \
default  (see QTextCursor API, insertBlock for instance). So there is not really any \
difference as far as I can see. Am I missing something?

Unless I&#39;m missing the point of this patch, the default empty charFormat is what \
you want to use in most usecases. The latest revision of the patch is missing \
usecases right now that could easily be fixed but are not with the approach Pavol \
choose. So I&#39;m wondering why that he didn&#39;t follow my advice and went another \
way which introduces more bugs. For instance if a user inserts an image in his \
current document then the exact same problem will appear and there may be underlines \
and all that stuff on his image.

I suggested a solution that solves this in a previous thread that would solve both \
issues in one go. Is there any reason to not use that approach?</pre> <br />








<p>- Thomas</p>


<br />
<p>On November 18th, 2010, 11:21 a.m., Pavol Korinek wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://svn.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 Pavol Korinek.</div>


<p style="color: grey;"><i>Updated 2010-11-18 11:21:01</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;">insertInlineObject method in KoInlineTextObjectManager class has been \
changed. Inline object can be inserted using empty - default char format or current \
cursor char format. Empty - default char format is used for inline (as-char) shapes \
now.</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/libs/kotext/KoInlineTextObjectManager.h <span style="color: \
grey">(1198325)</span></li>

 <li>/trunk/koffice/libs/kotext/KoInlineTextObjectManager.cpp <span style="color: \
grey">(1198325)</span></li>

 <li>/trunk/koffice/libs/kotext/opendocument/KoTextLoader.cpp <span style="color: \
grey">(1198325)</span></li>

</ul>

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