Hi Eike, Your idea, a factory pattern and Run-Time Type Information (RTTI), will certainly work well.
Another idea, a phonetic guide text included in OUString, may be one of the possible ideas. Kohei gave us a practical, experimental way of implementation at http://sc.openoffice.org/servlets/ReadMsg?list=dev&msgNo=2525 Copying a text with phonetic guide text from Word to Excel, vice versa, works well. Word and Excel always memorize what a user typed - phonetic guide text - for getting a Japanese text - base text - thorough the Input Method. Excel Japanese seems to always save the memorized phonetic guide text as well as base text into a file regardless of user interaction. It would be better to handle a text with a phonetic guide text at more fundamental layer like OUString instead of handling them at each application in individual ways. Tora Eike Rathke wrote: > No, it results in complex code analysis. You will have to find the > places anyway where you want to add ruby to string cells. Once changed > to a factory pattern the resulting code will be not more complex than > changing calls of > > ScStringCell* pCell = new ScStringCell(someText); > > to calls of > > ScStringCell* pCell = ScStringCell::createInstance(someText,maybeRuby); > > that returns a new'd ScRubyStringCell if maybeRuby is not empty, and > ScStringCell otherwise. A ScRubyStringCell should still have the > eCellType member variable set to CELLTYPE_STRING so you wouldn't need to > adapt the zillion places where that is used, but should be > distinguishable by means of RTTI where needed. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
