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

List:       koffice-devel
Subject:    Re: [patch] KoOdfExporter and MSWordOdfImport port & fixes
From:       cricketc () gmail ! com
Date:       2009-05-31 20:02:19
Message-ID: 200905311602.20401.cricketc () gmail ! com
[Download RAW message or body]

On Sunday 31 May 2009 15:27:29 you wrote:
> > +    //now create real content/body writers & dump the information there
> > +    KoXmlWriter* realContentWriter = oasisStore.contentWriter();
> > +    realContentWriter->addCompleteElement(&contentBuf);
> > +    KoXmlWriter* realBodyWriter = oasisStore.bodyWriter();
> > +    realBodyWriter->addCompleteElement(&bodyBuf);
> >
> > Why is this copy needed? Can't you use the correct writers from the
> > beginning?
>
> The code for KoOdfExporter mostly copied from based on
> MSWordOdfImport::convert() and just abstracted.
>
> Perhaps the buffered writers for body and content are no longer needed
> once we do not use QDom? Here are the comments that may say something,
> from KoOdfExporter::save() (previously
> fromMSWordOdfImport::createDocument()):
>
> //open contentWriter & bodyWriter *temp* writers
> //so we can write picture files while we parse
>
> Or Benjamin, could you please give a hint on the purpose of using QBuffer
> here?

I was trying to remember why I did that. I think it was a problem I was having 
where I was trying to write the picture data file to the KoStore, and I kept 
getting errors doing it if the content writer was already open. Seems like 
KoStore didn't let me write any new files if the content/body writers were open 
at the same time.

Hope that helps.

-Benjamin
_______________________________________________
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