[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: Review Request: Enable the modification of KoXml DOM tree
From: "Ariya Hidayat" <ariya () kde ! org>
Date: 2010-03-06 4:52:29
Message-ID: 20100306045229.16728.42489 () localhost
[Download RAW message or body]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/3064/#review4396
-----------------------------------------------------------
Although this is not planned to be committed, I put my comment here for future \
reference.
Unless I misunderstand something, I believe this patch is dangerous. The modification \
to KoXmlNode is not persistent at all, i.e. if you call KoXmlNode::unload() then most \
of the changes will be potentially gone. This is because the real data for the node \
is stored in KoXmlPackedDocument, which is not in sync anymore with the "edited" \
document once KoXmlNode is added, removed, shuffled, etc.
In short, KoXmlNode is mutable (for the consumer/outside world) by design.
- Ariya
On 2010-02-26 18:22:38, Ganesh Paramasivam wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/3064/
> -----------------------------------------------------------
>
> (Updated 2010-02-26 18:22:38)
>
>
> Review request for KOffice and Pierre Stirnweiss.
>
>
> Summary
> -------
>
> This set of modifications enables the ability to modify the DOM tree created in \
> KoXmlReader.cpp. This has been added to have a much more cleaner approach to load \
> delete change elements in a change-tracked ODF document. I have added only those \
> API's which I believe will be needed for this specifc requirement.
> Specifically, the API's that have been added are
> - setTagName()and setAttribute() in KoXmlElement
> - appendChild(), removeChild(), insertBefore(), insertAfter() in KoXmlNode
> All the newly added API's are compatible with the respective Qt/XML API's.
>
> TestCases to test the new API's have been added in tests/TestXmlReader.cpp.
>
>
> Diffs
> -----
>
> trunk/koffice/libs/odf/KoXmlReader.h 1095930
> trunk/koffice/libs/odf/KoXmlReader.cpp 1095930
> trunk/koffice/libs/odf/tests/TestXmlReader.cpp 1095930
>
> Diff: http://reviewboard.kde.org/r/3064/diff
>
>
> Testing
> -------
>
> TestCases to test the new functionality has been added in tests/TestXmlReader.cpp \
> and all the test-cases have been run.
>
> Thanks,
>
> Ganesh
>
>
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic