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

List:       koffice-devel
Subject:    Re: KoXmlWriter, indentation
From:       Thomas Zander <zander () kde ! org>
Date:       2009-07-07 19:52:02
Message-ID: 200907072052.02929.zander () kde ! org
[Download RAW message or body]

On Thursday 2. July 2009 16.32.32 Jarosław Staniek wrote:
[]
> Note: Paragraph::writeToFile( KoXmlWriter* writer ) of msword-odf filter
> does this just twice.

I think that filter needs testing, for sure.

> I found usage of the class a bit error-prone in this particular case.
> I wonder if there's any way to improve usability for developers?

The API in Qts QXmlStreamWriter is pretty good.
It basically autodetects this boolean. It has a writerCharacters() and when 
the user calls that the xml writer comes to the conclusion that whitespace 
matters and it then will do what you expect.
The only trick is that if you write <text:p> you need to do a 
        writer.writeCharacters(QString()); // Trick to make sure that the 
span gets no linefeed in front of it.
before you open the 'text:span' tag.

> Summing up, I am reverting the indentation commit.

Thank you. I am very happy we came to a good solution for everyone :)
-- 
Thomas Zander

_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.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