From koffice-devel Sun Nov 26 19:22:58 2000 From: Thomas Date: Sun, 26 Nov 2000 19:22:58 +0000 To: koffice-devel Subject: Re: otag ?? X-MARC-Message: https://marc.info/?l=koffice-devel&m=97526650529613 > On Sunday 26 November 2000 13:23, Thomas Zander wrote: > > All over kword the term otag is used (open tag) while saving something to XML files. > > > > This is very common: > > out << otag << "" << endl; > > out << etag << "/TAGNAME>" << endl; > > > > Question I have is how do I do something like: > > > > out << otag << "" << etag << endl; > > > > The way is should be done ;) (I.e. without the last etag) > > > > I figured something like the following would work, but I can't get it > > to compile: > > > > QString indent = otag; > > > > kword_frame.cc:1153: conversion from `QTextStream & ()(QTextStream &)' to non-scalar type `QString' requested > > > > Could someone explain in english what the h*ll the first type is ?? > > (The QTextStream & ()(QTextStream &)) > > otag is a function, not a string. It generates correct indentation. > Look in koffice/lib/koml/komlWriter.* for what otag really is/does. > > Note that if you are working on KWord's loading/saving code, it would > be a really good idea to move away from koml and use QDom directly. > Besides being more efficient, cleaner, and more standard, you would > also avoid having to care about identation :-) I know, I was wondering if I could get this done correctly. And as I am always eager to learn I was wondering the things I asked above. But I will just forget about indentation for now. The loading saving stuff I will leave for when the branch is merged again. -- Thomas Zander zander@earthling.net The only thing worse than failure is the fear of trying something new _______________________________________________ Koffice-devel mailing list Koffice-devel@master.kde.org http://master.kde.org/mailman/listinfo/koffice-devel