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

List:       koffice-devel
Subject:    Re: otag ??
From:       Thomas <zander () xs4all ! nl>
Date:       2000-11-26 19:22:58
[Download RAW message or body]

> 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 << "<TAGNAME>" << endl;
> > out << etag << "/TAGNAME>" << endl;
> > 
> > Question I have is how do I do something like:
> > 
> > out << otag << "<TAGNAME />" << 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


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

Configure | About | News | Add a list | Sponsored by KoreLogic