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

List:       koffice-devel
Subject:    Re: KSpread: Style Storage
From:       "Ariya Hidayat" <ariya () kde ! org>
Date:       2006-06-22 11:38:52
Message-ID: ba035dd10606220438m5d798e41kd85652697d0c41bb () mail ! gmail ! com
[Download RAW message or body]

> Consider the following scenario: You assign a named style to a region. It's
> splitted and its attributes get inserted into the tree, each with a 'time id'
> attached. Followed by some direct cell style changes. If you now alter the
> named style, e.g. define an additional attribute, you have to know to which
> region the named style is applied and you have to insert the new attribute
> with the correct 'time id'.
> So, keeping track of the substyles with the regions, they are applied to, and
> with the 'time id' will be necessary.

Easier if you consider that "named style" is a formatting piece, i.e.
do not break it into separate independent pieces.

Example:

(1) empty blank sheet
-> no piece at all

(2) apply style "Foo" which has attribute "yellow background" to range A1:B10
-> we have one format piece
  range A1:B100 : style Foo

(3) change column B to bold
-> we have two format pieces
  column B: bold on
  range A1:B100 : style Foo
the painting routine would see that e.g. cell B1 is "bold, with yellow
background"

(4) change style Foo to contain also attribute "font is Arial"
now we just need to clear our merged formats (if such cache is
implemented), and repaint everything again. here the painting routine
would see that e.g. cell B1 is "bold, with yellow background, with
font Arial" because it should look-up again the actual format
correspond to style Foo.

Or am I missing something?

Regards,

Ariya
_______________________________________________
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