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

List:       koffice-devel
Subject:    Re: questions regarding QTextDocument behaviour
From:       Pierre Stirnweiss <pierre.stirnweiss () t-online ! de>
Date:       2008-12-01 20:40:38
Message-ID: 200812012140.39199.pierre.stirnweiss () t-online ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Monday 01 December 2008 21:07:16 Thomas Zander wrote:
> On Sunday 30. November 2008 20:32:05 Pierre Stirnweiss wrote:
> > I have committed a working version of the above.
>
> Hi again,
>
> I just now realize the size of your change; its quite some new code and new
> files and also introducing new concept.

Actually, it is sort of a copy paste job. The commands actions themselves are 
copied from the TextTool and the TextSelectionHandler, but yes, I have shuffled 
things around quite a bit.

As for the concept, I have tried to change as little as possible, (it actually 
keeps all the UndoTextCommand mechanism), in order to keep all existing code 
as functional as it already were.

>
> In general the rule for KDE is that if you are new to project, especially
> if you are a first time committer, its appreciated if a patch is sent for
> review and feedback instead of committed in svn.
> You can send such a patch to the list or to me personally so we can make
> sure it works well for all.

this is actually why I didn't commit the other 12 or so commands :)
But I will send patches to the list first in the future.

As for what Florian was asking (with regards to making undo/redo more 
accessible to other tools), I was wondering if the undoTextCommand (listening 
to QTextDocument::undoCommandAdded signal,...) mechanism couldn't be moved 
from the TextTool to the KoTextDocument, that way all this could be abstracted 
away and the interface could actually be quite simple for tools interfacing 
with the document. I will have a look later on this.

>
> I'll do a post-commit review on these patches as soon as I can (i'm pretty
> busy after coming back from holidays, so please bear with me). So no
> worries about these patches.  Just for future reference :)

Thanks, I am looking into the functioning of the addShapes, new frames,... so 
I can understand where the undo between shapes actually falls down. I have a 
gut feeling, there might be just a repaint problem (I wonder if the undo are 
done but the document is not repainted,...

I am currently trying to crawl my way into how KWord is started and how text 
shapes are created.

Pierre


[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" \
content="1" /><style type="text/css"> p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; \
font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">On Monday 01 December 2008 21:07:16 Thomas Zander wrote:</p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; On Sunday 30. November \
2008 20:32:05 Pierre Stirnweiss wrote:</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">&gt; &gt; I have committed a working version of \
the above.</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt;</p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; Hi again,</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt;</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; I just now realize the \
size of your change; its quite some new code and new</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">&gt; files and also introducing new concept.</p> \
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"></p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">Actually, it is sort of a copy paste job. The commands actions \
themselves are copied from the TextTool and the TextSelectionHandler, but yes, I have \
shuffled things around quite a bit.</p> <p style="-qt-paragraph-type:empty; \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;"></p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">As for the concept, I have \
tried to change as little as possible, (it actually keeps all the UndoTextCommand \
mechanism), in order to keep all existing code as functional as it already were.</p> \
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"></p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">&gt;</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">&gt; In general the rule for KDE is that if you are new to \
project, especially</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">&gt; if you are a first time committer, its appreciated if a patch \
is sent for</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; review \
and feedback instead of committed in svn.</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">&gt; You can send such a patch to the list or to \
me personally so we can make</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">&gt; sure it works well for all.</p> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"></p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">this is actually why I didn't \
commit the other 12 or so commands :)</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">But I will send patches to the list first in the \
future.</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"></p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">As for what Florian was asking (with regards to making undo/redo \
more accessible to other tools), I was wondering if the undoTextCommand (listening to \
QTextDocument::undoCommandAdded signal,...) mechanism couldn't be moved from the \
TextTool to the KoTextDocument, that way all this could be abstracted away and the \
interface could actually be quite simple for tools interfacing with the document. I \
will have a look later on this.</p> <p style="-qt-paragraph-type:empty; \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;"></p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt;</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; I'll do a post-commit \
review on these patches as soon as I can (i'm pretty</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">&gt; busy after coming back from holidays, so \
please bear with me). So no</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">&gt; worries about these patches.  Just for future reference \
:)</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"></p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">Thanks, I am looking into the functioning of the addShapes, new \
frames,... so I can understand where the undo between shapes actually falls down. I \
have a gut feeling, there might be just a repaint problem (I wonder if the undo are \
done but the document is not repainted,...</p> <p style="-qt-paragraph-type:empty; \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;"></p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">I am currently trying to \
crawl my way into how KWord is started and how text shapes are created.</p> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"></p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Pierre</p> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"></p></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