[Libreoffice-commits] core.git: Branch 'private/Rosemary/change-tracking' - include/xmloff sw/source sw/util
Rosemary Sebastian
rosemaryseb8 at gmail.com
Mon Jun 6 09:04:58 UTC 2016
include/xmloff/xmlimp.hxx | 1 +
sw/source/filter/xml/swxml.cxx | 7 +++++++
sw/source/filter/xml/xmlimp.cxx | 11 +++++++++++
sw/util/sw.component | 10 +++++++---
4 files changed, 26 insertions(+), 3 deletions(-)
New commits:
commit ae525ba046e444a32fc01cbefe4e7ca110521bc7
Author: Rosemary Sebastian <rosemaryseb8 at gmail.com>
Date: Mon Jun 6 12:06:24 2016 +0530
Import tracked changes from undo.xml - Part 1
Change-Id: If1003968accbc31acdb4b503940c53c01264e60c
Reviewed-on: https://gerrit.libreoffice.org/25950
Reviewed-by: Rosemary Sebastian <rosemaryseb8 at gmail.com>
Tested-by: Rosemary Sebastian <rosemaryseb8 at gmail.com>
diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx
index 2261e47..c2c2474 100644
--- a/include/xmloff/xmlimp.hxx
+++ b/include/xmloff/xmlimp.hxx
@@ -96,6 +96,7 @@ enum class SvXMLImportFlags {
SETTINGS = 0x0040,
FONTDECLS = 0x0080,
EMBEDDED = 0x0100,
+ UNDO = 0x0200,
ALL = 0xffff
};
namespace o3tl
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index 33c976f..95708ad 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -875,6 +875,13 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c
: "com.sun.star.comp.Writer.XMLContentImporter"),
aFilterArgs, rName, true );
+ if( !nRet && !(IsOrganizerMode() || aOpt.IsFormatsOnly()) )
+ nRet = ReadThroughComponent(
+ xStorage, xModelComp, "undo.xml", nullptr, xContext,
+ (bOASIS ? "com.sun.star.comp.Writer.XMLOasisUndoImporter"
+ : "com.sun.star.comp.Writer.XMLUndoImporter"),
+ aEmptyArgs, rName, true );
+
if( !(IsOrganizerMode() || IsBlockMode() || bInsertMode ||
aOpt.IsFormatsOnly() ) )
{
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index e749b3a..f583259 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -95,6 +95,7 @@ enum SwXMLDocTokens
XML_TOK_DOC_MASTERSTYLES,
XML_TOK_DOC_META,
XML_TOK_DOC_BODY,
+ XML_TOK_DOC_UNDO,
XML_TOK_DOC_SCRIPT,
XML_TOK_DOC_SETTINGS,
XML_TOK_DOC_XFORMS,
@@ -109,6 +110,7 @@ static SvXMLTokenMapEntry aDocTokenMap[] =
{ XML_NAMESPACE_OFFICE, XML_MASTER_STYLES, XML_TOK_DOC_MASTERSTYLES },
{ XML_NAMESPACE_OFFICE, XML_META, XML_TOK_DOC_META },
{ XML_NAMESPACE_OFFICE, XML_BODY, XML_TOK_DOC_BODY },
+ { XML_NAMESPACE_OFFICE, XML_UNDO, XML_TOK_DOC_UNDO },
{ XML_NAMESPACE_OFFICE, XML_SCRIPTS, XML_TOK_DOC_SCRIPT },
{ XML_NAMESPACE_OFFICE, XML_SETTINGS, XML_TOK_DOC_SETTINGS },
{ XML_NAMESPACE_XFORMS, XML_MODEL, XML_TOK_DOC_XFORMS },
@@ -1596,4 +1598,13 @@ com_sun_star_comp_Writer_XMLOasisSettingsImporter_get_implementation(css::uno::X
return cppu::acquire(new SwXMLImport(context, OUString("com.sun.star.comp.Writer.XMLOasisSettingsImporter"),
SvXMLImportFlags::SETTINGS));
}
+
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL
+com_sun_star_comp_Writer_XMLOasisUndoImporter_get_implementation(css::uno::XComponentContext* context,
+ css::uno::Sequence<css::uno::Any> const &)
+{
+ return cppu::acquire(new SwXMLImport(context, OUString("com.sun.star.comp.Writer.XMLOasisUndoImporter"),
+ SvXMLImportFlags::UNDO | SvXMLImportFlags::AUTOSTYLES));
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/util/sw.component b/sw/util/sw.component
index a76d30a..478e4a2 100644
--- a/sw/util/sw.component
+++ b/sw/util/sw.component
@@ -76,13 +76,17 @@
constructor="com_sun_star_comp_Writer_XMLOasisContentExporter_get_implementation">
<service name="com.sun.star.comp.Writer.XMLOasisContentExporter"/>
</implementation>
+ <implementation name="com.sun.star.comp.Writer.XMLOasisContentImporter"
+ constructor="com_sun_star_comp_Writer_XMLOasisContentImporter_get_implementation">
+ <service name="com.sun.star.comp.Writer.XMLOasisContentImporter"/>
+ </implementation>
<implementation name="com.sun.star.comp.Writer.XMLOasisUndoExporter"
constructor="com_sun_star_comp_Writer_XMLOasisUndoExporter_get_implementation">
<service name="com.sun.star.comp.Writer.XMLOasisUndoExporter"/>
</implementation>
- <implementation name="com.sun.star.comp.Writer.XMLOasisContentImporter"
- constructor="com_sun_star_comp_Writer_XMLOasisContentImporter_get_implementation">
- <service name="com.sun.star.comp.Writer.XMLOasisContentImporter"/>
+ <implementation name="com.sun.star.comp.Writer.XMLOasisUndoImporter"
+ constructor="com_sun_star_comp_Writer_XMLOasisUndoImporter_get_implementation">
+ <service name="com.sun.star.comp.Writer.XMLOasisUndoImporter"/>
</implementation>
<implementation name="com.sun.star.comp.Writer.XMLOasisExporter"
constructor="com_sun_star_comp_Writer_XMLOasisExporter_get_implementation">
More information about the Libreoffice-commits
mailing list