Review Request: Style inheritance

Sebastian Sauer mail at dipe.org
Tue Nov 1 20:00:56 GMT 2011


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



libs/kotext/KoTextEditor.cpp
<http://git.reviewboard.kde.org/r/103017/#comment6771>

    KoParagraphStyle inherits from KoCharacterStyle so c-style cast not needed or?
    



libs/kotext/opendocument/KoTextWriter_p.cpp
<http://git.reviewboard.kde.org/r/103017/#comment6772>

    hmmm... this means that if styleManager->characterStyle(charFormat.intProperty(KoCharacterStyle::StyleId)) returns NULL we are crashing now.



libs/kotext/styles/KoCharacterStyle.cpp
<http://git.reviewboard.kde.org/r/103017/#comment6773>

    hmmm... does this mean we are applying the format way more often now?
    
    Consider;
    <p format=1>Some<p format=2>Thing</p></p>
    then we are apply at "Thing" do we unnecessary set format=1 twice now on the QTextCharFormat. First when apply the QTextCharFormat to the first paragraph and then again when applying the QTextCharFormat at the second (sub-/child-)paragraph?
    
    Can this have a performance impact? Should be easy to check with valgrind/vtunes.
    



libs/kotext/styles/KoParagraphStyle.cpp
<http://git.reviewboard.kde.org/r/103017/#comment6775>

    KoCharacterStyle::loadOdf(context);
    ?
    



libs/kotext/styles/KoParagraphStyle.cpp
<http://git.reviewboard.kde.org/r/103017/#comment6776>

    Wasn't that method just removed 10 lines above? I don't see that it was added to the KoCharacterStyle or anywhere else... hmmm?



libs/kotext/styles/KoStyleManager.cpp
<http://git.reviewboard.kde.org/r/103017/#comment6778>

    so, something like
    Q_ASSERT(!dynamic_cast<KoParagraphStyle*>(characterStyle) || dynamic_cast<KoParagraphStyle*>(characterStyle) != d->defaultParagraphStyle);
    would not assert here?
    Means it cannot happen that the default KoParagraphStyle is in the d->charStyles list?



plugins/textshape/dialogs/StylesModel.cpp
<http://git.reviewboard.kde.org/r/103017/#comment6779>

    same question as above


- Sebastian Sauer


On Nov. 1, 2011, 5:41 p.m., C. Boemann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103017/
> -----------------------------------------------------------
> 
> (Updated Nov. 1, 2011, 5:41 p.m.)
> 
> 
> Review request for Calligra.
> 
> 
> Description
> -------
> 
> Fix inheritance in paragraph styles
> introduce inheritance in character styles
> 
> 
> Diffs
> -----
> 
>   libs/kotext/KoTextEditor.cpp 91dc334 
>   libs/kotext/opendocument/KoTextSharedLoadingData.cpp c1991bc 
>   libs/kotext/opendocument/KoTextWriter_p.cpp 7b92403 
>   libs/kotext/styles/KoCharacterStyle.h 53e98a1 
>   libs/kotext/styles/KoCharacterStyle.cpp 665e066 
>   libs/kotext/styles/KoParagraphStyle.h 3f9f40c 
>   libs/kotext/styles/KoParagraphStyle.cpp cdf16a4 
>   libs/kotext/styles/KoStyleManager.cpp fbbc4ee 
>   libs/kotext/styles/tests/TestStyles.cpp ea7a434 
>   libs/textlayout/KoTextLayoutArea.cpp 28e4141 
>   plugins/textshape/TextTool.cpp e699319 
>   plugins/textshape/dialogs/StyleManager.cpp 6110044 
>   plugins/textshape/dialogs/StylesModel.cpp 168ef715 
>   tables/Cell.cpp 0a74d9f 
>   tables/Map.cpp 956b3e1 
>   words/part/KWDocument.cpp 1941d7a 
> 
> Diff: http://git.reviewboard.kde.org/r/103017/diff/diff
> 
> 
> Testing
> -------
> 
> cstester, show some improvements and some regressions
> 
> 
> Thanks,
> 
> C. Boemann
> 
>

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


More information about the calligra-devel mailing list