Improvement of the styles handling in Calligra
C. Boemann
cbo at boemann.dk
Tue Apr 17 06:09:51 BST 2012
On Tuesday 17 April 2012 03:27:39 Inge Wallin wrote:
> > If a inherited style overwrites one property of a style e.g. the color a
> > new KoShapeBackground would be set in the inherited style.
>
> That could work, yes. It will be somewhat complex to create the style again
> on saving. Here is a problem:
>
> Say that we have two styles, A and B. B inherits A. We have two attributes
> x and y which could be set in A, B or Both. x and y together create the
> complex value Z. Now suppose both x and y are set in A, creating a Z
> value for style A. And x is changed in style B meaning that in our binary
> representaiton we will have another value for Z in B. Now when we want to
> save the styles back to a file, there is no way for us to know if y was
> set in B to the same value as in A or if it was left unspecified and just
> inherited its value from A. This makes a difference if the value of y in A
> is ever changed.
But we should never touch A in calligra, which is sort of what I hear zagge
saying too. If we always modify the autostyle on top, then saving back while
retain the inheritance and the values in A (so that data is not lost for
people loading it back into LO/OO)
> > To make handling with styles easier I think each shape should have its
> > one inheritance level even if if does not overwrite any properties in
> > it. This will make modifiying the properties of the shape much easier.
>
> I don't understand this. Could you elaborate?
>
I think that is what I just said too
More information about the calligra-devel
mailing list