diff options
author | Tor Lillqvist <tml@collabora.com> | 2017-03-07 20:38:34 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2017-03-08 00:44:01 +0200 |
commit | 20a7d4b16d600101f4073ad4ce669a7566bf14c1 (patch) | |
tree | 6f23e3e21475bf20d56ef73eeb81336e4c759f48 | |
parent | 93a53e0ebba62873c768d887c6aa1125967aa9e4 (diff) |
Write the 'FtNts' subrecord of 'Obj' when necessary
See https://msdn.microsoft.com/en-us/library/dd952807 :
nts (26 bytes): An optional FtNts structure that specifies the
properties of this comment object. This field MUST exist if and only
if cmo.ot is equal to 0x19.
Change-Id: Ib4a007940c29a4f8eac1087601cfc7d242cfebd3
-rw-r--r-- | sc/source/filter/xcl97/xcl97rec.cxx | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index 1a7f1f97c17e..0af246550f11 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -33,6 +33,7 @@ #include <tools/urlobj.hxx> #include <rtl/math.hxx> +#include <rtl/uuid.h> #include <svl/zformat.hxx> #include "formulacell.hxx" #include "drwlayer.hxx" @@ -458,8 +459,26 @@ void XclObj::Save( XclExpStream& rStrm ) SaveTextRecs( rStrm ); } -void XclObj::WriteSubRecs( XclExpStream& /*rStrm*/ ) +void XclObj::WriteSubRecs( XclExpStream& rStrm ) { + if( mnObjType == EXC_OBJTYPE_NOTE ) + { + // FtNts subrecord + AddRecSize( 26 ); + // ft, cb + rStrm << EXC_ID_OBJNTS << sal_uInt16(0x0016); + sal_uInt8 aGUID[16]; + rtl_createUuid( aGUID, nullptr, false ); + // guid + rStrm.SetSliceSize( 16 ); + for( int i = 0; i < 16; i++ ) + rStrm << aGUID[i]; + rStrm.SetSliceSize( 0 ); + // fSharedNote + rStrm << sal_uInt16(0); + // unused + rStrm.WriteZeroBytes( 4 ); + } } void XclObj::SaveTextRecs( XclExpStream& rStrm ) |