--EVF5PPMfhYS0aIcm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 10, 2001 at 11:02:45PM +0200, Nicolas Goutte wrote: > On Monday, 10. September 2001 21:08, Thomas Zander wrote: > > On Mon, Sep 10, 2001 at 02:16:12PM +0200, Eva Brucherseifer wrote: > > > Hi, > > > > Hi Eva! > > > > > At work I had a similar problem and finally found a wonderful solution > > > from the design patterns, that might suit here too. It is the builder > > > patterns, which consists of 2 parts: the director and the builder. > > > > > > director: > > > The director parses the input and extracts the tasks to do in order to > > > build a document in another format. It doesn't have any knowledge abo= ut > > > how to perform the tasks. > > > > This fits perfectly for the HTML export of kspread and kword, yes. One > > director per application (maybe inhariting a basic implementation) looks > > very good to me! > > > > > builder: > > > The builder puts the output format together. It has an interface that > > > provides methods for sub-tasks. These are called by the director. It > > > doesn't have any knowledge about the input format. > > > > > > So how does this look like for the html export filter? You have the > > > builder that can set together a html page. Here is a rough sketch of a > > > html builder class: > > > > > > class KHTMLBuilder : public KOfficeBuilder > > > { > > > public: > > > virtual void buildDocument(...); // initialization > > > virtual void buildHeader(...); > > > > virtual void addHeader(QString name, QString value); // sets author stu= ff, > > known meta tags are converted. > > > > > virtual buildFooter(...); > > > virtual buildParagraph(...); > > > virtual buildTable(...); > > > > don't forget that this method needs a created paragraph as an argum= ent. > > (actually an ID, see below) >=20 > You cannot have this!