Review Request: save z-index in words by adding a new option to KoShapeSavingContext

Thorsten Zachmann t.zachmann at zagge.de
Fri Feb 3 18:50:12 UTC 2012


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



libs/flake/KoShape.cpp
<http://git.reviewboard.kde.org/r/103857/#comment8516>

    This can't be done this way.
    Not all shapes e.g. draw:g do support z-index in odf.
    But more critical is that some shapes call the setOdfAttributes twice when saving with different attributes that would result in saving the z-index twice in the document.
    To fix that you can check if OdfAdditionalAttributes is set and then check if SaveZOffset needs to be saved, and only then write it out, but that will not fix the place where the z-index should not be written out.
    A more clean solution would be to do it like with the draw:id and add a OdfAttribute::OdfZIndex and
    make it part of OdfMandatories. Then in the e.g. draw:group you need to unset the flag. Additionally you check as you do not if it needs to be set or not



words/part/frames/KWFrame.cpp
<http://git.reviewboard.kde.org/r/103857/#comment8517>

    Was this old way not working. Maybe fixing that might be even simpler then the stuff described above.


- Thorsten Zachmann


On Feb. 3, 2012, noon, C. Boemann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103857/
> -----------------------------------------------------------
> 
> (Updated Feb. 3, 2012, noon)
> 
> 
> Review request for Calligra.
> 
> 
> Description
> -------
> 
> save z-index in words by adding a new option to KoShapeSavingContext
> 
> 
> Diffs
> -----
> 
>   libs/flake/KoShape.cpp edf3a74 
>   libs/flake/KoShapeSavingContext.h c73a680 
>   words/part/KWOdfWriter.cpp b998485 
>   words/part/frames/KWFrame.cpp d8642da 
> 
> Diff: http://git.reviewboard.kde.org/r/103857/diff/diff
> 
> 
> Testing
> -------
> 
> load and save documents and see the z order is now preserved
> 
> 
> Thanks,
> 
> C. Boemann
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20120203/ce081894/attachment.html>


More information about the calligra-devel mailing list