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

List:       koffice-devel
Subject:    Re: New shape is comming: CommentShape
From:       Carlos Licea <carlos_licea () hotmail ! com>
Date:       2010-07-30 19:37:36
Message-ID: 201007301337.37292.carlos_licea () hotmail ! com
[Download RAW message or body]

Hello,

> sorry for not answering earlier but I was ill last week. I have put the two
> mail from Carlos into one to answer them.
It's ok, I was busy and couldn't address it as fast as I had liked. 

> > ->Right now it lives in plugins/ but I wonder if, given that is
> > KPresenter specific, we should rename it to KPrCommentShape and move it
> > inside KPresenter.
> 
> I don't think this shape should be KPresenter specific. The same handling
> for comments as used in KPresenter should also be present for kivio,
> kspread and kword.
Looking it from that perspective I completely agree that the shape shouldn't 
be KPresenter specific.

> > ->Is just not using background() and border() the proper way to ignore
> > those  settings?
> 
> Are you talking about the small rects or about the notes when opened. I
> think the notes themselfs support a style.
You're correct the office:annotation supports a draw:style-name attribute. 
This will remain a TODO unless I can implement it easy enough.

> > ->How can I make the shape not re-sizable but fully movable? right now
> > there's  geometryProtected but it packages both properties, which is not
> > desirable for my use case. (This point is important.)
> > What I did, for now, is just ignore setSize();
> 
> maybe we should split geometryProtected into two bools one for portecting
> position and one for size.
I would agree, I'll split the property in two, but I would keep the old setter 
just that it will set both properties to true, and the getter that will return 
positionProtected && sizeProtected.

> > I've just committed the second batch for the CommentShape. Overall it
> > works and fills most of my needs of displaying the comments. If you can,
> > take a look and give feedback.
> > 
> > Still TODO (in no particular order):
> > * Make it possible to edit the notes (shouldn't be that hard.)
> > * Hide while on presentation mode. What's the proper way to proceed to do
> > this? (i still would've liked to hide them while not on "comment mode"
> > but I found it to be quite difficult as I only get the selected shapes
> > even when I call shapeManager->shapes() instead of
> > shapeManager->selection(), oh well I don't hate the result.) My guess is
> > that I should just call setVisible(false) on all the shapes that are of
> > the type CommentTool when entering to the "presentation mode."
> 
> In the standard there is already support for it in text applications. The
> question is how and where is the officeooo:annotaion or later the
> office:annotation will be able to be saved. Form looking at what OO does
> they save it after the <presentation:notes> which basically means the
> annotations should be saved separate to the other shapes. However they
> also load them when saved with other shapes. Lets see if I can get this
> info from the OO guys.
The order in which a shape is saved is not relevant. As it should not be 
relevant in which order an XML document is structured but the relationships it 
represents. Therefore the fact that they are saved after the 
presentation:notes should just be considered as an implementation detail, not 
worth repeating.

> Also when used in kword it should use the standard tag office:annotation.
This shouldn't be hard to implement.

Now we're getting into important matters.
> So the question is if we want to show the comments
> o always (not while printing and in presentation mode)
> o only when is a specific mode
> 
> I don't think using setVisible(false) is a good idea as this would mean to
> iterate over the whole document.
> 
> always:
> 
> In kpresenter the KoShapeManagerPaintingStrategy subclass is used to check
> if a shape should be painted or not. Something similar could be done in
> the default in the base class to decide to not draw a shape of a specific
> type.
> 
> only in a specific mode:
> 
> Only add comment shapes to the list of shapes when in the special mode.
> That might be very hard to do when the annotation is part of a text shape.
> 
> I think the method would be best to use.
Which method? and which interaction would be better (specific mode or always 
on unless on specific modes)?

> > * Make it look better, I spent all of 15 minutes making it look as it is.
> > Any help from more skilled artists is more than welcome.
> > * Insert the author name when we're creating the shape. I found no way to
> > get a hold of the KoDocumentProperties from the ShapeFactory nor from the
> > Shape constructor, how could I get the document author's name?
> 
> I think we also need to have this values available in the
> KoInlineTextObjectManager via the resource manager of the document. The
Keep in mind that I'm not making a office:annotation that is inline with any 
text. I think that in that regard there should be 2 classes of annotations:
1) The annotation as we have it, which can be freely moved.
2) The inline annotation meant for text objects. This annotation can't be 
positioned.
I split them because they have to be two very different objects, 1 is a 
KoShape directly, while 1 is a KoInlineTextObject.

> same is used for the PageCount and we need this infos also for variables
> like <text:author-name> so this can be reused there. Have a look at
> KoPADocument::updatePageCount()
I'll have a look. 
-- 
Carlos Licea
_______________________________________________
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