[Libreoffice-commits] core.git: sw/source

Miklos Vajna vmiklos at collabora.co.uk
Thu Dec 10 23:50:01 PST 2015


 sw/source/filter/ww8/ww8scan.cxx |   18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

New commits:
commit 44ad6aca0dee29841ec7cd15c6d0ad9b3dcaedbe
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Dec 11 08:25:33 2015 +0100

    DOC export: register the smart tag offsets/locations in the FIB
    
    With this, a reader can actually find them in the table stream. Mark as
    experimental till all the related structures are written, so Word
    doesn't consider the file corrupted.
    
    Change-Id: I3f997dcdb14557b1f8eed78bd873b121068d9712

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index da39504..144013d 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -44,6 +44,7 @@
 
 #include <vcl/settings.hxx>
 #include <vcl/svapp.hxx>
+#include <svtools/miscopt.hxx>
 
 #ifdef DEBUGSPRMREADER
 #include <stdio.h>
@@ -6240,7 +6241,22 @@ bool WW8Fib::Write(SvStream& rStrm)
         Set_UInt32( pData, fcAtrdExtra );
         Set_UInt32( pData, lcbAtrdExtra );
 
-        pData += 0x4DA - 0x422;
+        SvtMiscOptions aMiscOptions;
+        if (aMiscOptions.IsExperimentalMode())
+        {
+            pData += 0x432 - 0x422;
+            Set_UInt32(pData, fcPlcfBkfFactoid);
+            Set_UInt32(pData, lcbPlcfBkfFactoid);
+
+            pData += 0x442 - 0x43A;
+            Set_UInt32(pData, fcPlcfBklFactoid);
+            Set_UInt32(pData, lcbPlcfBklFactoid);
+
+            pData += 0x4DA - 0x44A;
+        }
+        else
+            pData += 0x4DA - 0x422;
+
         Set_UInt32( pData, fcHplxsdr );
         Set_UInt32( pData, 0);
     }


More information about the Libreoffice-commits mailing list