[Libreoffice-commits] core.git: Branch 'private/Rosemary/change-tracking' - include/xmloff sw/source xmloff/source

Rosemary Sebastian rosemaryseb8 at gmail.com
Tue Jun 14 16:31:13 UTC 2016


 include/xmloff/xmlnmspe.hxx             |   15 +++---
 include/xmloff/xmltoken.hxx             |    2 
 sw/source/filter/xml/xmlexp.cxx         |    4 -
 xmloff/source/core/xmlexp.cxx           |    3 -
 xmloff/source/core/xmltoken.cxx         |    2 
 xmloff/source/text/XMLRedlineExport.cxx |   74 --------------------------------
 6 files changed, 18 insertions(+), 82 deletions(-)

New commits:
commit baf57f89f63d24aa4592ed52c6cc9236fcde6635
Author: Rosemary Sebastian <rosemaryseb8 at gmail.com>
Date:   Tue Jun 14 21:59:32 2016 +0530

    Rework the placeholder XML
    
    Change-Id: I54d813588910bc2ea324873c8b41977e7ad6340c

diff --git a/include/xmloff/xmlnmspe.hxx b/include/xmloff/xmlnmspe.hxx
index ae588d2..e0cf19d 100644
--- a/include/xmloff/xmlnmspe.hxx
+++ b/include/xmloff/xmlnmspe.hxx
@@ -70,6 +70,7 @@ XML_NAMESPACE( REPORT,          33U )
 XML_NAMESPACE( OF,              34U )       // OpenFormula aka ODFF
 XML_NAMESPACE( XHTML,           35U )
 XML_NAMESPACE( GRDDL,           36U )
+XML_NAMESPACE( C,               37U )
 
 // namespaces for odf extended formats
 
@@ -77,14 +78,14 @@ XML_NAMESPACE( GRDDL,           36U )
 const sal_uInt16 XML_NAMESPACE_##prefix##_EXT       = key; \
 const sal_uInt16 XML_NAMESPACE_##prefix##_EXT_IDX   = key;
 
-XML_NAMESPACE_EXT( OFFICE,      37U )
-XML_NAMESPACE_EXT( TABLE,       38U )
-XML_NAMESPACE_EXT( CHART,       39U )
-XML_NAMESPACE_EXT( DRAW,        40U )
-XML_NAMESPACE_EXT( CALC,        41U )
-XML_NAMESPACE_EXT( LO,          42U )
+XML_NAMESPACE_EXT( OFFICE,      38U )
+XML_NAMESPACE_EXT( TABLE,       39U )
+XML_NAMESPACE_EXT( CHART,       40U )
+XML_NAMESPACE_EXT( DRAW,        41U )
+XML_NAMESPACE_EXT( CALC,        42U )
+XML_NAMESPACE_EXT( LO,          43U )
 
-#define XML_OLD_NAMESPACE_BASE 43U
+#define XML_OLD_NAMESPACE_BASE 44U
 
 // namespaces used in the technical preview (SO 5.2)
 XML_OLD_NAMESPACE( FO,      0U )
diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index 4ddc061..425580d 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -99,6 +99,8 @@ namespace xmloff { namespace token {
         XML_N_XLINK_OLD,
         XML_NP_DC,
         XML_N_DC,
+        XML_NP_C,
+        XML_N_C,
         XML_NP_SVG,
         XML_N_SVG,
         XML_NP_FORM,
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index 4213eb5..75e2cd0 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -572,7 +572,7 @@ com_sun_star_comp_Writer_XMLUndoExporter_get_implementation(css::uno::XComponent
         css::uno::Sequence<css::uno::Any> const &)
 {
     return cppu::acquire(new SwXMLExport(context, OUString("com.sun.star.comp.Writer.XMLUndoExporter"),
-                SvXMLExportFlags::UNDO | SvXMLExportFlags::AUTOSTYLES));
+                SvXMLExportFlags::UNDO));
 }
 
 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL
@@ -622,7 +622,7 @@ com_sun_star_comp_Writer_XMLOasisUndoExporter_get_implementation(css::uno::XComp
         css::uno::Sequence<css::uno::Any> const &)
 {
     return cppu::acquire(new SwXMLExport(context, OUString("com.sun.star.comp.Writer.XMLOasisUndoExporter"),
-                SvXMLExportFlags::UNDO | SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::OASIS));
+                SvXMLExportFlags::UNDO | SvXMLExportFlags::OASIS));
 }
 
 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 059bbd0..f2b20df 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -333,7 +333,7 @@ void SvXMLExport::InitCtor_()
     }
 
     // namespaces for documents
-    if( getExportFlags() & (SvXMLExportFlags::STYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT) )
+    if( getExportFlags() & (SvXMLExportFlags::STYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT| SvXMLExportFlags::UNDO) )
     {
         mpNamespaceMap->Add( GetXMLToken(XML_NP_DC),    GetXMLToken(XML_N_DC),      XML_NAMESPACE_DC );
         mpNamespaceMap->Add( GetXMLToken(XML_NP_TEXT),  GetXMLToken(XML_N_TEXT),    XML_NAMESPACE_TEXT );
@@ -347,6 +347,7 @@ void SvXMLExport::InitCtor_()
         mpNamespaceMap->Add( GetXMLToken(XML_NP_OOOW),  GetXMLToken(XML_N_OOOW),    XML_NAMESPACE_OOOW );
         mpNamespaceMap->Add( GetXMLToken(XML_NP_OOOC),  GetXMLToken(XML_N_OOOC),    XML_NAMESPACE_OOOC );
         mpNamespaceMap->Add( GetXMLToken(XML_NP_OF),    GetXMLToken(XML_N_OF),      XML_NAMESPACE_OF );
+        mpNamespaceMap->Add( GetXMLToken(XML_NP_C),     GetXMLToken(XML_N_C),       XML_NAMESPACE_C );
 
         if (getDefaultVersion() > SvtSaveOptions::ODFVER_012)
         {
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index 50920fd..1d30c0f 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -104,6 +104,8 @@ namespace xmloff { namespace token {
         TOKEN( "http://www.w3.org/1999/xlink/namespace",      XML_N_XLINK_OLD ),
         TOKEN( "dc",                        XML_NP_DC ),
         TOKEN( "http://purl.org/dc/elements/1.1/",      XML_N_DC ),
+        TOKEN( "c",                        XML_NP_C ),
+        TOKEN( "https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office-collab",      XML_N_C ),
         TOKEN( "svg",                       XML_NP_SVG ),
         TOKEN( "http://www.w3.org/2000/svg",      XML_N_SVG ),
         TOKEN( "form",                      XML_NP_FORM ),
diff --git a/xmloff/source/text/XMLRedlineExport.cxx b/xmloff/source/text/XMLRedlineExport.cxx
index abb3467..70883ec 100644
--- a/xmloff/source/text/XMLRedlineExport.cxx
+++ b/xmloff/source/text/XMLRedlineExport.cxx
@@ -39,7 +39,6 @@
 #include <xmloff/xmlexp.hxx>
 #include <xmloff/xmluconv.hxx>
 
-
 using namespace ::com::sun::star;
 using namespace ::xmloff::token;
 
@@ -359,22 +358,16 @@ void XMLRedlineExport::ExportChangeInline(
 void XMLRedlineExport::ExportChangedRegion(
     const Reference<XPropertySet> & rPropSet)
 {
-    // Redline-ID
-    rExport.AddAttributeIdLegacy(XML_NAMESPACE_TEXT, GetRedlineID(rPropSet));
-
     // merge-last-paragraph
     Any aAny = rPropSet->getPropertyValue(sMergeLastPara);
     if( ! *static_cast<sal_Bool const *>(aAny.getValue()) )
         rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_MERGE_LAST_PARAGRAPH,
                              XML_FALSE);
 
-    // export change region element
-    SvXMLElementExport aChangedRegion(rExport, XML_NAMESPACE_TEXT,
-                                      XML_CHANGED_REGION, true, true);
-
-
     // scope for (first) change element
     {
+        rExport.AddAttribute(XML_NAMESPACE_C, XML_START, "2");
+        rExport.AddAttribute(XML_NAMESPACE_DC, XML_TYPE, XML_PARAGRAPH);
         aAny = rPropSet->getPropertyValue(sRedlineType);
         OUString sType;
         aAny >>= sType;
@@ -487,69 +480,6 @@ void XMLRedlineExport::ExportChangeInfo(
         rExport.Characters(sBuf.makeStringAndClear());
     }
 
-    aAny = rPropSet->getPropertyValue(sRedlineType);
-    OUString sType;
-    aAny >>= sType;
-    if(sType == sFormat)
-    {
-        {
-            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");
-        }
-        {
-            SvXMLElementExport aStartElem( rExport, XML_NAMESPACE_DC,
-                                            XML_START, true, false );
-            rExport.Characters("/");
-        }
-        {
-            SvXMLElementExport aEndElem( rExport, XML_NAMESPACE_DC,
-                                            XML_END, true, false );
-            rExport.Characters("/");
-        }
-    }
-    else if(sType == sInsert)
-    {
-        {
-            SvXMLElementExport aTypeElem( rExport, XML_NAMESPACE_DC,
-                                            XML_TYPE, true, false );
-            rExport.Characters("text");
-        }
-        {
-            SvXMLElementExport aStartElem( rExport, XML_NAMESPACE_DC,
-                                            XML_START, true, false );
-            rExport.Characters("/");
-        }
-        {
-            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("paragraph");
-        }
-        {
-            SvXMLElementExport aStartElem( rExport, XML_NAMESPACE_DC,
-                                            XML_START, true, false );
-            OUString paraPos = "2";
-            rExport.Characters("/" + paraPos);
-        }
-        {
-            SvXMLElementExport aEndElem( rExport, XML_NAMESPACE_DC,
-                                            XML_END, true, false );
-            rExport.Characters("/");
-        }
-    }
-
     // comment as <text:p> sequence
     aAny = rPropSet->getPropertyValue(sRedlineComment);
     aAny >>= sTmp;


More information about the Libreoffice-commits mailing list