Hi Eike,

> > > 3) Store that as a cell attribute.  If I understand correctly, Writer
> > > uses this approach.
> > 
> > Related to this idea, I think storing phonetic text as one attribute
> > of EditTextObject in ScEditCell is also a good idea. ScEditCell seems to
> > be used to store decorated text in a cell. So we can deal with
> > phonetix text as one attribute of a decoration attributes. It doesn't
> > have any bad effect on ScStringCell. EditTextObject seems to be a
> > common class, so we ought to craete newEditRubyTextObject class if
> > this idea is accepted.
> > 
> > However, through this change, most cells that just hold Japanese text
> > would be instances of ScEditCell. This is a waste of memory.
> 
> Additionally, there's much overhead involved with an ScEditCell and its
> EditEngine. Calculating with strings obtained from ScEditCell is
> definitely slower than ScStringCell.

All right.
Thank you for your information.

> > > 4) Or maybe subclass ScStringCell to create ScRubyStringCell, and use an
> > > instance of that class to store the ruby text information when needed ?
> > > Just a wild idea, but could this work (maybe) ?
> > 
> > I think this is not a good idea. It would make String type cell have
> > 4 different classes, ScStringCell, ScRubyStringCell, ScEditCell,
> > ScRubyEditCell.
> 
> If ruby was implemented at EditEngine we would end up with just 3:
> ScStringCell, ScRubyStringCell, ScEditCell.

Exactly.

> > Switching routine that choose one class from the four
> > classes for creating an instance of a cell would be complex.
> 
> I don't think so. You need to distinguish anyway, and subclassing may
> actually ease things because switching can be done internally using
> factory patterns and RTTI.

Well, as you and Kohei say, creating subclass ScRubyStringCell from
ScStringCell is the best way and I will try. Thank you for your
suggestion!

--
 Japanese Native-Language project
 Good-Day Inc.
 Takashi Nakamoto

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to