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

List:       kde-commits
Subject:    Re: koffice
From:       Jan Hambrecht <jaham () gmx ! net>
Date:       2002-12-31 23:22:29
Message-ID: 3E1226B5.5030400 () gmx ! net
[Download RAW message or body]

Thorsten Zachmann wrote:
> Hello Jan and Peter,
> 
>> SVN commit 759100 by jaham:
>>
>> Added some functions to implement shape cloning.
>> The KoShape::clone() function is intended as the
>> single entry point for the cloning feature which
>> does then call the virtual cloneShape function
>> which all shapes have to implement.
>> I added the cloneShape function to almast all
>> existing shapes so that koffice still compiles.
> 
> I thought about this again in the night and here are some problem I think we 
> need to address. 
> 
> This will be used for copying shapes from one document to another document 
> (kivio stencils). This is easy to do for the most shapes but for the text 
> shape this is kind of tricky. Think about the following: We have some 
> predefind text blocks we want to add to a document. When we do that we want 
> too keep the styles that are assigned e.g. this is a headline this is a 
> standard paragraph so that after they are inserted they update when the 
> styles are updated. 
> 

Are you sure the cloning is op be used for inter-document shape copying. 
I think for that we have the copy and paste feature you implemented. I 
would expect that shape cloning does only happen within the same document.

> The problem I see is that the text shape is that on clone this data is not 
> available and so it is not possible to update the cloned text shape to have 
> this information.
> 

If a text shape stencil is loaded, it already has styles assigned and 
they have to be saved somewhere when displaying inside the stencil 
docker. So i would think that data is somewhere to be stored. Now the 
question is how/where is that data saved when loading and how can we add 
that data to the cloned shape. It should probably use the style manager 
(don't know where is is located) of the application.


> Are there any ideas on how to work around this or should we ignore this for 
> now?
> 
> One idea that comes to my mind. If it is possible to use the same underlying 
> objects (style manager that is for now) for both documents it could work and 
> the shape in the collection will automatically fit into the document. I'm not 
> sure if that is something that could be reached easily but I think that 
> should be doable.
> 
> What do you think?

I think the style copying/assigning should also be done within the 
KoShapeControllerBase inside the shapeCreated function you are currently 
introducing.

> 
> Thorsten
> 

Ciao Jan

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

Configure | About | News | Add a list | Sponsored by KoreLogic