summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRosemary Sebastian <rosemaryseb8@gmail.com>2016-06-14 21:59:32 +0530
committerRosemary Sebastian <rosemaryseb8@gmail.com>2016-06-14 21:59:32 +0530
commitbaf57f89f63d24aa4592ed52c6cc9236fcde6635 (patch)
tree5d01bd3a91fb74be27e40b9da810e750169c5373
parentRemove all TODO's (diff)
downloadcore-baf57f89f63d24aa4592ed52c6cc9236fcde6635.tar.gz
core-baf57f89f63d24aa4592ed52c6cc9236fcde6635.zip
Rework the placeholder XML
Change-Id: I54d813588910bc2ea324873c8b41977e7ad6340c
-rw-r--r--include/xmloff/xmlnmspe.hxx15
-rw-r--r--include/xmloff/xmltoken.hxx2
-rw-r--r--sw/source/filter/xml/xmlexp.cxx4
-rw-r--r--xmloff/source/core/xmlexp.cxx3
-rw-r--r--xmloff/source/core/xmltoken.cxx2
-rw-r--r--xmloff/source/text/XMLRedlineExport.cxx74
6 files changed, 18 insertions, 82 deletions
diff --git a/include/xmloff/xmlnmspe.hxx b/include/xmloff/xmlnmspe.hxx
index ae588d28eeac..e0cf19d74e9c 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 4ddc061d552d..425580d47947 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 4213eb5ad551..75e2cd018988 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 059bbd02a95b..f2b20df71aee 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 50920fd4e470..1d30c0fff785 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 abb346726211..70883eca06f9 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;