Review Request 117626: Implement the first version of a DOCX export filter

Inge Wallin inge at lysator.liu.se
Tue Apr 22 06:43:17 BST 2014



> On April 21, 2014, 8:24 p.m., Jarosław Staniek wrote:
> > filters/words/docx/export/DocxStyleHelper.cpp, line 64
> > <https://git.reviewboard.kde.org/r/117626/diff/1-2/?file=266867#file266867line64>
> >
> >     to reduce # of nested better use 
> >     
> >     if (!properties) {
> >       return;
> >     }
> >     
> >     and Q_ASSERT() before it would be nice too

Agreed.  This is one of my pet peeves.


> On April 21, 2014, 8:24 p.m., Jarosław Staniek wrote:
> > filters/words/docx/export/DocxStyleHelper.cpp, line 67
> > <https://git.reviewboard.kde.org/r/117626/diff/1-2/?file=266867#file266867line67>
> >
> >     check success?
> >     This is pedantic but we're doing this using apprach such as STRING_TO_INT at filters/libmsooxml/MsooXmlReader_p.h

No, I added a default instead


> On April 21, 2014, 8:24 p.m., Jarosław Staniek wrote:
> > filters/words/docx/export/FileCollector.cpp, line 171
> > <https://git.reviewboard.kde.org/r/117626/diff/1-2/?file=266871#file266871line171>
> >
> >     Nice note but I recommend using //! @todo - I learned to do that everywhere

This is one thing that I don't agree with. I don't think doxygen documentation is the place to have TODO's and FIXME's. At least we should have a common discussion in Calligra before I start in this direction.


> On April 21, 2014, 8:24 p.m., Jarosław Staniek wrote:
> > filters/words/docx/export/OdfReaderDocxContext.h, line 56
> > <https://git.reviewboard.kde.org/r/117626/diff/1-2/?file=266872#file266872line56>
> >
> >     Add //! here and everywhere

Done.  But remind me again why we should document internal variables that are not visible outside the class in the API docs that are used by users of this class.


> On April 21, 2014, 8:24 p.m., Jarosław Staniek wrote:
> > filters/words/docx/export/OdfReaderDocxContext.h, line 61
> > <https://git.reviewboard.kde.org/r/117626/diff/1-2/?file=266872#file266872line61>
> >
> >     Add Add //!< here and everywhere

Oops, the comment above should be for this issue. But I didn't see any way to remove it.


> On April 21, 2014, 8:24 p.m., Jarosław Staniek wrote:
> > filters/words/docx/export/OpcRelSetManager.cpp, line 80
> > <https://git.reviewboard.kde.org/r/117626/diff/1-2/?file=266883#file266883line80>
> >
> >     ok but a note for future, much nicer place for it is ~Private()

Not ok.  :)  They should definitely be in ~Private().


> On April 21, 2014, 8:24 p.m., Jarosław Staniek wrote:
> > filters/words/docx/export/words_docx_export.desktop, line 1
> > <https://git.reviewboard.kde.org/r/117626/diff/1/?file=266887#file266887line1>
> >
> >     words_docx_export.desktop not needed since there is calligra_filter_odt2docx.desktop?

You have misread the patch.  words_docx_export.desktop is gone in revision 2.


> On April 21, 2014, 8:24 p.m., Jarosław Staniek wrote:
> > libs/odf/KoEncryptedStore.cpp, line 152
> > <https://git.reviewboard.kde.org/r/117626/diff/1-2/?file=266891#file266891line152>
> >
> >     BTW, return false on failure as we do everywhere

Agree but out of scope for this patch.  That should be done in master and separately.


- Inge


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/117626/#review56137
-----------------------------------------------------------


On April 20, 2014, 8:11 a.m., Inge Wallin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/117626/
> -----------------------------------------------------------
> 
> (Updated April 20, 2014, 8:11 a.m.)
> 
> 
> Review request for Calligra.
> 
> 
> Repository: calligra
> 
> 
> Description
> -------
> 
> This patch implements the first simple version of a docx export filter. It has support for simple character formatting and paragraph formatting, including named styles. It can also distinguish between headings and normal paragraphs. Other than that it's an unwritten page.  A special thanks to Lassi Nieminen who helped me with converting the styles.
> 
> The patch itself is very straightforward and mostly self contained in the filters/words/docx subdirectory. It builds on my previous work with libodfreader and libodf2, which are both in filters/. The only problem was that the KoZipStore and KoEncryptedStore backends create a file called "mimetype" automatically when a KoStore is created in write mode. I tried to work around this with as little impact as possible to the code in libs/odf and with full source compatibility with the previous API. If you think there is a better way to solve this problem than the one I implemented, then please tell me.
> 
> 
> Diffs
> -----
> 
>   CMakeLists.txt 9eedc3d 
>   filters/libodf2/KoOdfStyle.h 558ade9 
>   filters/libodf2/KoOdfStyle.cpp 2b4eb95 
>   filters/libodf2/KoOdfStyleManager.h 3761d38 
>   filters/libodf2/KoOdfStyleManager.cpp 6e8f5b55 
>   filters/libodf2/KoOdfStyleProperties.h 1bfbb5c 
>   filters/libodf2/KoOdfStyleProperties.cpp 186e971 
>   filters/libodfreader/OdtReader.h 64e0584 
>   filters/libodfreader/OdtReader.cpp 6fa8ce6 
>   filters/words/docx/CMakeLists.txt f38a2bb 
>   filters/words/docx/export/CMakeLists.txt PRE-CREATION 
>   filters/words/docx/export/DocxExport.h PRE-CREATION 
>   filters/words/docx/export/DocxExport.cpp PRE-CREATION 
>   filters/words/docx/export/DocxFile.h PRE-CREATION 
>   filters/words/docx/export/DocxFile.cpp PRE-CREATION 
>   filters/words/docx/export/DocxStyleHelper.h PRE-CREATION 
>   filters/words/docx/export/DocxStyleHelper.cpp PRE-CREATION 
>   filters/words/docx/export/DocxStyleWriter.h PRE-CREATION 
>   filters/words/docx/export/DocxStyleWriter.cpp PRE-CREATION 
>   filters/words/docx/export/FileCollector.h PRE-CREATION 
>   filters/words/docx/export/FileCollector.cpp PRE-CREATION 
>   filters/words/docx/export/OdfReaderDocxContext.h PRE-CREATION 
>   filters/words/docx/export/OdfReaderDocxContext.cpp PRE-CREATION 
>   filters/words/docx/export/OdfTextReaderDocxBackend.h PRE-CREATION 
>   filters/words/docx/export/OdfTextReaderDocxBackend.cpp PRE-CREATION 
>   filters/words/docx/export/OdtReaderDocxBackend.h PRE-CREATION 
>   filters/words/docx/export/OdtReaderDocxBackend.cpp PRE-CREATION 
>   filters/words/docx/export/OpcContentTypes.h PRE-CREATION 
>   filters/words/docx/export/OpcContentTypes.cpp PRE-CREATION 
>   filters/words/docx/export/OpcRelSet.h PRE-CREATION 
>   filters/words/docx/export/OpcRelSet.cpp PRE-CREATION 
>   filters/words/docx/export/OpcRelSetManager.h PRE-CREATION 
>   filters/words/docx/export/OpcRelSetManager.cpp PRE-CREATION 
>   filters/words/docx/export/README PRE-CREATION 
>   filters/words/docx/export/UnitConversions.h PRE-CREATION 
>   filters/words/docx/export/UnitConversions.cpp PRE-CREATION 
>   filters/words/docx/export/calligra_filter_odt2docx.desktop PRE-CREATION 
>   libs/odf/KoDirectoryStore.h 19c059d 
>   libs/odf/KoDirectoryStore.cpp c893d47 
>   libs/odf/KoEncryptedStore.h 0edd892 
>   libs/odf/KoEncryptedStore.cpp 315df1a 
>   libs/odf/KoStore.h dadecd1 
>   libs/odf/KoStore.cpp fd42378 
>   libs/odf/KoStore_p.h 2e518c1 
>   libs/odf/KoTarStore.h d99f09b 
>   libs/odf/KoTarStore.cpp 6829f34 
>   libs/odf/KoZipStore.h 90ffcb0 
>   libs/odf/KoZipStore.cpp 4235134 
> 
> Diff: https://git.reviewboard.kde.org/r/117626/diff/
> 
> 
> Testing
> -------
> 
> Testing with a number of odt files. Lassi did all the testing involving MS Office since I don't have that.
> 
> 
> Thanks,
> 
> Inge Wallin
> 
>

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


More information about the calligra-devel mailing list