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

List:       koffice-devel
Subject:    Re: Patch for Inline Objects Deletion - Updated Patch
From:       Thomas Zander <zander () kde ! org>
Date:       2010-02-19 8:07:19
Message-ID: 201002190907.19895.zander () kde ! org
[Download RAW message or body]

Without looking at the patch I can at least answer some points.

On Friday 19. February 2010 06.03.36 you wrote:
> - Instead of trying to remove a KoShape from the document I have
> instead used the setVisible() of KoShape to make it invisible/visible
> during a deletetion/undo-deletion. The shape would eventually get
> deleted in the destructor of the command. This seems to work fine (
> i.e the user would see what he expects see when a inline object is
> deleted ).

I think the correct approach is to call KoShapeController::removeShape() with 
your current command as the 'parent'.
This avoids the user going through the list of shapes (the karbon layer docker 
probably shows it) and finding it ;)

> - The code to paste a text containing inline objects is not yet there.
> I still need to figure out how to clone a KoShape. We can already copy
> a non-inline shape. Need to figure out how and where this is done and
> follow the same approach in TextPasteCommand.cpp

Cloning is done by saving to ODF and creating a new shape and loading that 
from ODF.
Using KoOdfPaste and also KoShapeRegistry::instance()->createShapeFromOdf to 
give you some hints how to do that.

-- 
Thomas Zander
_______________________________________________
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