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

List:       koffice-devel
Subject:    Re: [kspread] formatting design
From:       Philipp =?iso-8859-1?q?M=FCller?= <philipp.mueller () gmx ! de>
Date:       2002-12-14 18:49:57
[Download RAW message or body]

Am Samstag, 14. Dezember 2002 19:21 schrieb Norbert Andres:
> On Saturday 14 December 2002 18:28, John Dailey wrote:
> > ...
> > Phillip and I have been hashing out some ideas over irc and I'm going to
> > try to lay them out here.  Norbert, I think this is basically the same as
> > your StyleManager that you emailed but I wasn't completely certain on how
> > that was working.
>
> Yes, the concept is the very similar.
> I wanted to split the Style in "Sub-Styles", so one for Background
> (Pattern, Color,...), Border (Pens, Colors,...), Format (number format),
> Font, Position (vert. + horz. alignment,...)

Yes, this is what we have in mind as well.

> A MetaStyle contains one of each. Having more than one "Sub-Style" has the
> advantage that the lookup for existing SubStyles would be much faster
> (especially for large documents). In this case each cell would have 5
> pointers to Sub-Styles.
> This approach is more complicate.

In understand so far, that you still have have one pointer from cell to 
MetaStyle, which consists basically out of 5 pointers to styles.

> Another speedup could be to allow duplicates and to optimize when saving
> the document.

Don't know if this would make sense. I think we don't need to store each 
individual thing in style. Some properties can/should still resist in Cell 
(like spanning cells when too long), but allocated only on demand.

> Open problems: how do you handle fallback layouts?

Do you mean here the default layout or the hierarchy of default 
layout->sheet->rows->columns->cell?

> How can we allow
> something like a "Select All"?

Hmm, select all would always select the sheet layout. Is your problem here 
that for e.g. the "cell format" (which I want to have renamed to cell 
properties) dialog needs to know, which properties are equal or non equal (so 
they appear differently)?

> For the latter problem we would still need to create hundred of cells.

I don't understand this. Can you clear this a bit, for which case?

> What about this: do the style concept you mentioned and organize fallback
> layouts for regions (cells would have to lookup up a Fallback Style (if set
> -> marking and changing attributes of a region won't change each cell, but
> create a FallBackStyle) in a fallback style manager)

Additional regions to the default layout->sheet->rows->columns regions?

> We would have a map like this:
> Region => FallBackStyle.
> e.g.
> A1:F10 => style1	(newest on top)
> B	   => style2	(whole line)
> 10	   => style2	(cells in column 10 have the same style
> 				as cells in row B, except for the cells that are
> 				in the first region)
> "All" 	   => style3
>
> This concept would be close to the Gnumeric way of organizing styles.

The regions approach has the disadvantage of being either easily broken by 
insert/delete of a cell or by having hard to understand remerging functions 
in the region code.
I see some advantages for e.g. background, but for e.g. content format (like 
e.g. date) this won't help much IMHO.

Philipp
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://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