summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-12-14 10:25:38 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-07-07 11:29:34 +0200
commit7246b7a86f611716ff48ad488120b8b5d4dbb689 (patch)
tree20483cc3123235ce21b4797c06d8838b6ee319d5 /sw/source/filter/ww8
parentcc3a9628851f7110332bb0d6756843d6e4283231 (diff)
DOC export: write SttbfBkmkFactoid structure
This contains the name of the bookmarks, except that factoid bookmarks don't really have names... Change-Id: I0fe3b983edf206d51e4d1cf4a66919fce0167738 (cherry picked from commit f1f92d92ed7467d71db7d94d6e4aa40f65e8ddfc)
Diffstat (limited to 'sw/source/filter/ww8')
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx17
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx4
-rw-r--r--sw/source/filter/ww8/ww8scan.hxx6
3 files changed, 25 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index d9e722760efa..7c93b00abf4b 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -350,6 +350,23 @@ void WW8_WrtFactoids::Write(WW8Export& rExport)
SvStream& rStream = *rExport.pTableStrm;
+ rExport.pFib->fcSttbfBkmkFactoid = rStream.Tell();
+ // Write SttbfBkmkFactoid.
+ rStream.WriteUInt16(0xffff); // fExtend
+ rStream.WriteUInt16(m_aStartCPs.size()); // cData
+ rStream.WriteUInt16(0); // cbExtra
+ rStream.WriteUInt16(6); // cchData
+
+ // Write FACTOIDINFO.
+ for (size_t i = 0; i < m_aStartCPs.size(); ++i)
+ {
+ rStream.WriteUInt32(i); // dwId
+ rStream.WriteUInt16(0); // fSubEntry
+ rStream.WriteUInt16(0); // fto
+ rStream.WriteUInt32(0); // pfpb
+ }
+ rExport.pFib->lcbSttbfBkmkFactoid = rStream.Tell() - rExport.pFib->fcSttbfBkmkFactoid;
+
rExport.pFib->fcPlcfBkfFactoid = rStream.Tell();
for (const WW8_CP& rCP : m_aStartCPs)
rStream.WriteInt32(rCP);
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 2bf5710750d3..d88b58827aed 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -6243,7 +6243,9 @@ bool WW8Fib::Write(SvStream& rStrm)
SvtMiscOptions aMiscOptions;
if (aMiscOptions.IsExperimentalMode())
{
- pData += 0x432 - 0x422;
+ pData += 0x42a - 0x422;
+ Set_UInt32(pData, fcSttbfBkmkFactoid);
+ Set_UInt32(pData, lcbSttbfBkmkFactoid);
Set_UInt32(pData, fcPlcfBkfFactoid);
Set_UInt32(pData, lcbPlcfBkfFactoid);
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index 7a599be2c48a..eedfb06467e6 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -1452,8 +1452,12 @@ public:
WW8_FC fcAtrdExtra;
sal_uInt32 lcbAtrdExtra;
- // 0x422 - 0x431 == ignore
+ // 0x422 - 0x429 == ignore
+ /// 0x42a smart-tag bookmark string table offset.
+ WW8_FC fcSttbfBkmkFactoid;
+ /// 0x42e smart-tag bookmark string table length.
+ sal_uInt32 lcbSttbfBkmkFactoid;
/// 0x432 smart-tag bookmark starts offset.
WW8_FC fcPlcfBkfFactoid;
/// 0x436 smart-tag bookmark ends length.