[Libreoffice-commits] core.git: Branch 'private/Rosemary/change-tracking' - xmloff/source
Rosemary Sebastian
rosemaryseb8 at gmail.com
Sun Jun 12 02:58:39 UTC 2016
xmloff/source/text/XMLRedlineExport.cxx | 81 ++++++++++++++++++++------------
1 file changed, 51 insertions(+), 30 deletions(-)
New commits:
commit 094bbdcabc961e82de7534c5dfa7fa56df658a28
Author: Rosemary Sebastian <rosemaryseb8 at gmail.com>
Date: Sun Jun 12 08:24:17 2016 +0530
The xml should not be nested
Change-Id: I8470808c7ac12fd8d61427cd2fadaa1dd13758ca
diff --git a/xmloff/source/text/XMLRedlineExport.cxx b/xmloff/source/text/XMLRedlineExport.cxx
index ab1885f..f2dc166 100644
--- a/xmloff/source/text/XMLRedlineExport.cxx
+++ b/xmloff/source/text/XMLRedlineExport.cxx
@@ -492,42 +492,63 @@ void XMLRedlineExport::ExportChangeInfo(
aAny >>= sType;
if(sType == sFormat) // TODO: Find out if the style is inserted or deleted to give the proper namespace
{
- SvXMLElementExport aTypeElem( rExport, XML_NAMESPACE_DC,
- XML_TYPE, true, false );
- rExport.Characters("style");
- SvXMLElementExport aNameElem( rExport, XML_NAMESPACE_DC,
- XML_NAME, true, false );
- rExport.Characters("bold"); // TODO: Get the correct style name
- SvXMLElementExport aStartElem( rExport, XML_NAMESPACE_DC,
- XML_START, true, false );
- rExport.Characters("start"); // TODO: Get the correct start position
- SvXMLElementExport aEndElem( rExport, XML_NAMESPACE_DC,
- XML_END, true, false );
- rExport.Characters("end"); // TODO: Get the correct end position
+ {
+ SvXMLElementExport aTypeElem( rExport, XML_NAMESPACE_DC,
+ XML_TYPE, true, false );
+ rExport.Characters("style");
+ }
+ {
+ SvXMLElementExport aNameElem( rExport, XML_NAMESPACE_DC,
+ XML_NAME, true, false );
+ rExport.Characters("bold"); // TODO: Get the correct style name
+ }
+ {
+ SvXMLElementExport aStartElem( rExport, XML_NAMESPACE_DC,
+ XML_START, true, false );
+ rExport.Characters("/"); // TODO: Get the correct start position
+ }
+ {
+ SvXMLElementExport aEndElem( rExport, XML_NAMESPACE_DC,
+ XML_END, true, false );
+ rExport.Characters("/"); // TODO: Get the correct end position
+ }
}
else if(sType == sInsert)
{
- SvXMLElementExport aTypeElem( rExport, XML_NAMESPACE_DC,
- XML_TYPE, true, false );
- rExport.Characters("text"); // or paragraph TODO: Find a way to distinguish text and paragraph changes
- SvXMLElementExport aStartElem( rExport, XML_NAMESPACE_DC,
- XML_START, true, false );
- rExport.Characters("start"); // TODO: Get the correct start position (NumberingLevel for paragraph)
- SvXMLElementExport aEndElem( rExport, XML_NAMESPACE_DC,
- XML_END, true, false );
+ {
+ SvXMLElementExport aTypeElem( rExport, XML_NAMESPACE_DC,
+ XML_TYPE, true, false );
+ rExport.Characters("text"); // or paragraph TODO: Find a way to distinguish text and paragraph changes
+ }
+ {
+ SvXMLElementExport aStartElem( rExport, XML_NAMESPACE_DC,
+ XML_START, true, false );
+ rExport.Characters("/"); // TODO: Get the correct start position (NumberingLevel for paragraph)
+ }
+ {
+ SvXMLElementExport aEndElem( rExport, XML_NAMESPACE_DC,
+ XML_END, true, false );
+ }
}
else if(sType == sDelete)
{
- SvXMLElementExport aTypeElem( rExport, XML_NAMESPACE_DC,
- XML_TYPE, true, false );
- rExport.Characters("text"); // or paragraph TODO: Find a way to distinguish text and paragraph changes
- SvXMLElementExport aStartElem( rExport, XML_NAMESPACE_DC,
- XML_START, true, false );
- rExport.Characters("start"); // TODO: Get the correct start position
- SvXMLElementExport aEndElem( rExport, XML_NAMESPACE_DC,
- XML_END, true, false );
- // TODO: Check if type is not paragraph
- rExport.Characters("end"); // TODO: Get the correct end position
+ {
+ SvXMLElementExport aTypeElem( rExport, XML_NAMESPACE_DC,
+ XML_TYPE, true, false );
+ rExport.Characters("paragraph"); // or text TODO: Find a way to distinguish text and paragraph changes
+ }
+ {
+ SvXMLElementExport aStartElem( rExport, XML_NAMESPACE_DC,
+ XML_START, true, false );
+ OUString paraPos = "2";
+ rExport.Characters("/" + paraPos); // TODO: Get the correct start position
+ }
+ {
+ SvXMLElementExport aEndElem( rExport, XML_NAMESPACE_DC,
+ XML_END, true, false );
+ // TODO: Check if type is not paragraph
+ rExport.Characters("/"); // TODO: Get the correct end position
+ }
}
// comment as <text:p> sequence
More information about the Libreoffice-commits
mailing list