Review Request: Fix exporting to non-native formats on Windows, e.g. HTML

Friedrich W. H. Kossebau kossebau at kde.org
Tue Nov 20 09:23:35 GMT 2012



> On Nov. 19, 2012, 9:59 p.m., Inge Wallin wrote:
> > libs/main/KoFilterChain.cpp, lines 366-369
> > <http://git.reviewboard.kde.org/r/107388/diff/1/?file=95410#file95410line366>
> >
> >     These things are so totally unobvious that I would expect an extensive comment on why things are done the way they are and what the problem it solves is.

Added an extensive comment now. Is it understandable, or does it need improvements?


- Friedrich W. H.


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107388/#review22224
-----------------------------------------------------------


On Nov. 20, 2012, 9:22 a.m., Friedrich W. H. Kossebau wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107388/
> -----------------------------------------------------------
> 
> (Updated Nov. 20, 2012, 9:22 a.m.)
> 
> 
> Review request for Calligra, Boudewijn Rempt and C. Boemann.
> 
> 
> Description
> -------
> 
> Currently exporting to non-native formats (File/Export...) fails on Windows, because the temporary files are empty on disk.
> 
>     The fix follows approach of bf47fed5ead06f2128abf042897f86bab39cf333 ,
>     by destructing the KTemporaryFile object used to get a unique temporary
>     file name right after its creation again, to avoid having two file handlers
>     on the same file, which seems somehow to prevent synching the bytes written
>     by the filter, which ATM opens its own new file handler, by the name of
>     the temporary file (as KoFilterChain can be only queried for filenames,
>     KoDocuments or KoStores).
>     
>     Real fix might be to use the KTemporaryFile objects also by the filters,
>     instead of having them open the same file on their own again.
>     Another fix might be to find out which flags have to be used in Windows on
>     opening the files, to prevent this behaviour (unless these details are hidden
>     away by the Qt abstraction).
>     
>     Also fixes a possible crash on Windows in KoFilterChain::outputFileHelper(...):
>     m_outputTempFile was accessed even when it might be set to 0 a few lines before
> 
> 
> Diffs
> -----
> 
>   libs/main/KoFilterChain.cpp b952588 
> 
> Diff: http://git.reviewboard.kde.org/r/107388/diff/
> 
> 
> Testing
> -------
> 
> Run a build with this patch and exported a few files from Calligra Words to HTML, no longer empty output.
> 
> 
> Thanks,
> 
> Friedrich W. H. Kossebau
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20121120/b3511cd5/attachment.htm>


More information about the calligra-devel mailing list