[Libreoffice-commits] core.git: Branch 'private/Rosemary/change-tracking' - sw/source
Rosemary Sebastian
rosemaryseb8 at gmail.com
Sun Jun 5 17:07:22 UTC 2016
sw/source/filter/xml/xmlexp.cxx | 10 +++++-----
sw/source/filter/xml/xmlfmte.cxx | 4 +++-
2 files changed, 8 insertions(+), 6 deletions(-)
New commits:
commit cc6b4c67f69e8b0398f74360c89e359d1892d964
Author: Rosemary Sebastian <rosemaryseb8 at gmail.com>
Date: Fri Jun 3 20:45:24 2016 +0530
Save tracked changes in undo.xml
Change-Id: I41326b89788ad85646b777d2a8df81f03619ae9f
Reviewed-on: https://gerrit.libreoffice.org/25874
Reviewed-by: Rosemary Sebastian <rosemaryseb8 at gmail.com>
Tested-by: Rosemary Sebastian <rosemaryseb8 at gmail.com>
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index 87993a2..4213eb5 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -132,7 +132,7 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
SwDoc *pDoc = getDoc();
if( getExportFlags() & (SvXMLExportFlags::FONTDECLS|SvXMLExportFlags::STYLES|
- SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT))
+ SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT|SvXMLExportFlags::UNDO))
{
if( getDefaultVersion() > SvtSaveOptions::ODFVER_012 )
{
@@ -268,7 +268,7 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
// set redline mode if we export STYLES or CONTENT, unless redline
// mode is taken care of outside (through info XPropertySet)
bool bSaveRedline =
- bool( getExportFlags() & (SvXMLExportFlags::CONTENT|SvXMLExportFlags::STYLES) );
+ bool( getExportFlags() & (SvXMLExportFlags::UNDO|SvXMLExportFlags::STYLES) );
if( bSaveRedline )
{
// if the info property set has a ShowChanges property,
@@ -483,7 +483,6 @@ void SwXMLExport::ExportContent_()
}
}
- GetTextParagraphExport()->exportTrackedChanges( false );
GetTextParagraphExport()->exportTextDeclarations();
Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY );
Reference < XText > xText = xTextDoc->getText();
@@ -496,6 +495,7 @@ void SwXMLExport::ExportUndo_()
{
SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, XML_UNDO,
true, true );
+ GetTextParagraphExport()->exportTrackedChanges( false );
}
namespace
@@ -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::UNDO | SvXMLExportFlags::AUTOSTYLES));
}
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::OASIS));
+ SvXMLExportFlags::UNDO | SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::OASIS));
}
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL
diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx
index f50e8e2..312b8b2 100644
--- a/sw/source/filter/xml/xmlfmte.cxx
+++ b/sw/source/filter/xml/xmlfmte.cxx
@@ -201,10 +201,12 @@ void SwXMLExport::ExportAutoStyles_()
if( !(getExportFlags() & SvXMLExportFlags::STYLES) )
GetTextParagraphExport()->exportUsedDeclarations();
+ if( getExportFlags() & SvXMLExportFlags::UNDO )
+ GetTextParagraphExport()->exportTrackedChanges( true );
+
// exported in ExportContent_
if( getExportFlags() & SvXMLExportFlags::CONTENT )
{
- GetTextParagraphExport()->exportTrackedChanges( true );
Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY );
Reference < XText > xText = xTextDoc->getText();
More information about the Libreoffice-commits
mailing list