Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3991

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/91/3991/1

fdo#64826: fix for exporting to DOCX that didnt save track 'changes state'

Change-Id: If5b3198769a08cc751d542f8305fd7f41c73ec26
---
M sw/source/filter/ww8/docxexport.cxx
M sw/source/filter/ww8/docxexport.hxx
2 files changed, 23 insertions(+), 0 deletions(-)



diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index e04f12d..18d0583 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -686,18 +686,33 @@
     // Zoom
     OString aZoom(OString::valueOf(sal_Int32(pViewShell->GetViewOptions()->GetZoom())));
     pFS->singleElementNS(XML_w, XML_zoom, FSNS(XML_w, XML_percent), aZoom.getStr(), FSEND);
+
+    // Track Changes
+    if ( settings.trackRevisions )
+        pFS->singleElementNS( XML_w, XML_trackRevisions, FSEND );
+
+    // Embed Fonts
     if( pDoc->get( IDocumentSettingAccess::EMBED_FONTS ))
         pFS->singleElementNS( XML_w, XML_embedTrueTypeFonts, FSEND );
+
+    // Embed System Fonts
     if( pDoc->get( IDocumentSettingAccess::EMBED_SYSTEM_FONTS ))
         pFS->singleElementNS( XML_w, XML_embedSystemFonts, FSEND );
+
+    // Default Tab Stop
     if( settings.defaultTabStop != 0 )
         pFS->singleElementNS( XML_w, XML_defaultTabStop, FSNS( XML_w, XML_val ),
             OString::valueOf( sal_Int32( settings.defaultTabStop )).getStr(), FSEND );
+
+    // Even and Odd Headers
     if( settings.evenAndOddHeaders )
         pFS->singleElementNS( XML_w, XML_evenAndOddHeaders, FSEND );
 
+    // Has Footnotes
     if( m_pAttrOutput->HasFootnotes())
         m_pAttrOutput->WriteFootnoteEndnotePr( pFS, XML_footnotePr, pDoc->GetFtnInfo(), 
XML_footnote );
+
+    // Has Endnotes
     if( m_pAttrOutput->HasEndnotes())
         m_pAttrOutput->WriteFootnoteEndnotePr( pFS, XML_endnotePr, pDoc->GetEndNoteInfo(), 
XML_endnote );
 
@@ -809,6 +824,9 @@
       m_nFooters( 0 ),
       m_pVMLExport( NULL )
 {
+    // Set the 'Track Revisions' flag in the settings structure
+    settings.trackRevisions = 0 != ( nsRedlineMode_t::REDLINE_ON & mnRedlineMode );
+
     // Write the document properies
     WriteProperties( );
 
@@ -840,6 +858,7 @@
 DocxSettingsData::DocxSettingsData()
 : evenAndOddHeaders( false )
 , defaultTabStop( 0 )
+, trackRevisions( false )
 {
 }
 
@@ -849,6 +868,9 @@
         return true;
     if( defaultTabStop != 0 )
         return true;
+    if ( trackRevisions )
+        return true;
+
     return false;
 }
 
diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx
index 16bf73e..2348349 100644
--- a/sw/source/filter/ww8/docxexport.hxx
+++ b/sw/source/filter/ww8/docxexport.hxx
@@ -54,6 +54,7 @@
     bool hasData() const; /// returns true if there are any non-default settings (i.e. something 
to write)
     bool evenAndOddHeaders;
     int defaultTabStop;
+    bool trackRevisions;    // Should 'Track Revisions' be set
 };
 
 /// The class that does all the actual DOCX export-related work.

-- 
To view, visit https://gerrit.libreoffice.org/3991
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If5b3198769a08cc751d542f8305fd7f41c73ec26
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Adam CloudOn <rattles2013@gmail.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.