Review Request: Added creation and processing of a text style to format the number/bullet of a list.
Jarosław Staniek
staniek at kde.org
Wed Jan 5 18:33:48 GMT 2011
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100306/#review745
-----------------------------------------------------------
filters/words/msword-odf/texthandler.cpp
<http://git.reviewboard.kde.org/r/100306/#comment547>
it's better to make this method:
QString WordTextHandler::createBulletStyle(const QString& textStyleName) const
filters/words/msword-odf/texthandler.cpp
<http://git.reviewboard.kde.org/r/100306/#comment548>
minor coding style note: cool style could be
if (!textStyle)
return QString();
// the rest of the code here, unindented
filters/words/msword-odf/texthandler.cpp
<http://git.reviewboard.kde.org/r/100306/#comment552>
If you insert the style into m_mainStyles, you can allocate on stack - safer (no need to remember about deleting), easier code.
i.e.:
KoGenStyle style(KoGenStyle::TextStyle, "text");
filters/words/msword-odf/texthandler.cpp
<http://git.reviewboard.kde.org/r/100306/#comment553>
see the other note for isNull(), here and in all other places of this method
filters/words/msword-odf/texthandler.cpp
<http://git.reviewboard.kde.org/r/100306/#comment549>
check using isEmpty(); isNull() is dangerous, does not work when text == ""
libs/kotext/styles/KoListLevelProperties.cpp
<http://git.reviewboard.kde.org/r/100306/#comment550>
same note about isNull()
libs/kotext/styles/KoListLevelProperties.cpp
<http://git.reviewboard.kde.org/r/100306/#comment551>
NULL is C; better use 0...
- Jarosław
On 2011-01-05 16:45:26, Matus Uzak wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/100306/
> -----------------------------------------------------------
>
> (Updated 2011-01-05 16:45:26)
>
>
> Review request for Calligra.
>
>
> Summary
> -------
>
> Filter changes:
> * Let's use the style-name attribute of a list-level-style-* to point to a text style, which should be used to format the bullet/number of a list.
> * The style is stored into office:styles to be accessible via the style manager during layout.
>
> KoListLevelProperties changes:
> * Lookup the referred style using the style manager and update the CharacterStyleId of the KoListStyle.
>
> TODO:
> * If this approach is correct, also other filters should be updated.
> * Bullet sizes!
>
>
> Diffs
> -----
>
> filters/words/msword-odf/texthandler.h 1465e66
> filters/words/msword-odf/texthandler.cpp 96de97d
> libs/kotext/styles/KoListLevelProperties.cpp ec5a472
>
> Diff: http://git.reviewboard.kde.org/r/100306/diff
>
>
> Testing
> -------
>
> Using words application only, msword test documents containing numbered lists.
>
>
> Thanks,
>
> Matus
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20110105/5a60c88d/attachment.htm>
More information about the calligra-devel
mailing list