From e5c05fab9e453f32a94aad4487764bf58b70573c Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Thu, 15 Oct 2009 15:49:10 -0400 Subject: #i105933# Re-enable encryption at the end of INTERFACEEND record & properly encrypt zero bytes in the CF records. --- sc/source/filter/xcl97/xcl97rec.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sc/source/filter/xcl97') diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index ac71dbb01fbb..0380acc5005b 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -1496,8 +1496,10 @@ XclExpInterfaceEnd::~XclExpInterfaceEnd() { } -void XclExpInterfaceEnd::WriteBody( XclExpStream& /*rStrm*/ ) +void XclExpInterfaceEnd::WriteBody( XclExpStream& rStrm ) { + // Don't forget to re-enable encryption. + rStrm.EnableEncryption(); } // ============================================================================ -- cgit From e696628056a332a7be091289d1feb8dcd242b1b6 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Thu, 15 Oct 2009 18:46:52 -0400 Subject: #i105933# Replaced other WriteZeroBytes() with WriteZeroBytesToRecord() in other places except for the hyperlink record. --- sc/source/filter/xcl97/XclExpChangeTrack.cxx | 10 +++++----- sc/source/filter/xcl97/xcl97rec.cxx | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'sc/source/filter/xcl97') diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx index a38b023d4f55..59c05a1435aa 100644 --- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx +++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx @@ -64,7 +64,7 @@ void lcl_WriteFixedString( XclExpStream& rStrm, const XclExpString& rString, sal if( rString.Len() > 0 ) rStrm << rString; if( nLength > nStrBytes ) - rStrm.WriteZeroBytes( nLength - nStrBytes ); + rStrm.WriteZeroBytesToRecord( nLength - nStrBytes ); } inline void lcl_GenerateGUID( sal_uInt8* pGUID, sal_Bool& rValidGUID ) @@ -94,7 +94,7 @@ void XclExpUserBView::SaveCont( XclExpStream& rStrm ) rStrm << (sal_uInt32) 0xFF078014 << (sal_uInt32) 0x00000001; lcl_WriteGUID( rStrm, aGUID ); - rStrm.WriteZeroBytes( 8 ); + rStrm.WriteZeroBytesToRecord( 8 ); rStrm << (sal_uInt32) 1200 << (sal_uInt32) 1000 << (sal_uInt16) 1000 @@ -237,7 +237,7 @@ sal_Size XclExpChTr0x0198::GetLen() const void XclExpChTr0x0192::SaveCont( XclExpStream& rStrm ) { rStrm << sal_uInt16( 0x0022 ); - rStrm.WriteZeroBytes( 510 ); + rStrm.WriteZeroBytesToRecord( 510 ); } UINT16 XclExpChTr0x0192::GetNum() const @@ -291,7 +291,7 @@ XclExpChTr0x0195::~XclExpChTr0x0195() void XclExpChTr0x0195::SaveCont( XclExpStream& rStrm ) { - rStrm.WriteZeroBytes( 162 ); + rStrm.WriteZeroBytesToRecord( 162 ); } UINT16 XclExpChTr0x0195::GetNum() const @@ -928,7 +928,7 @@ void XclExpChTrInsertTab::SaveActionData( XclExpStream& rStrm ) const rStrm << sal_uInt32( 0 ); lcl_WriteFixedString( rStrm, XclExpString( GetTabInfo().GetScTabName( nTab ) ), 127 ); lcl_WriteDateTime( rStrm, GetDateTime() ); - rStrm.WriteZeroBytes( 133 ); + rStrm.WriteZeroBytesToRecord( 133 ); } UINT16 XclExpChTrInsertTab::GetNum() const diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index 0380acc5005b..fcdee35f5144 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -380,7 +380,7 @@ void XclObj::WriteBody( XclExpStream& rStrm ) // write the ftCmo subrecord pXclStrm->StartRecord( EXC_ID_OBJCMO, 18 ); *pXclStrm << mnObjType << nObjId << nGrbit; - pXclStrm->WriteZeroBytes( 12 ); + pXclStrm->WriteZeroBytesToRecord( 12 ); pXclStrm->EndRecord(); // write other subrecords @@ -559,7 +559,7 @@ void XclObjDropDown::WriteSubRecs( XclExpStream& rStrm ) { // ftSbs subrecord - Scroll bars (dummy) rStrm.StartRecord( EXC_ID_OBJSBS, 20 ); - rStrm.WriteZeroBytes( 20 ); + rStrm.WriteZeroBytesToRecord( 20 ); rStrm.EndRecord(); // ftLbsData subrecord - Listbox data @@ -692,7 +692,7 @@ void XclTxo::SaveCont( XclExpStream& rStrm ) ::insert_value( nFlags, mnVerAlign, 4, 3 ); rStrm << nFlags << mnRotation; - rStrm.WriteZeroBytes( 6 ); + rStrm.WriteZeroBytesToRecord( 6 ); rStrm << mpString->Len() << nRunLen << sal_uInt32( 0 ); } @@ -1133,7 +1133,7 @@ void ExcEScenario::SaveCont( XclExpStream& rStrm ) for( pCell = _First(); pCell; pCell = _Next() ) pCell->WriteText( rStrm ); // string content rStrm.SetSliceSize( 2 ); - rStrm.WriteZeroBytes( 2 * List::Count() ); // date format + rStrm.WriteZeroBytesToRecord( 2 * List::Count() ); // date format } UINT16 ExcEScenario::GetNum() const -- cgit From b3bb51c9d6d408599ec8f548ce1b1aff6999f92c Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Fri, 16 Oct 2009 17:18:53 -0400 Subject: reverted commits 263183 and 263184 to fix broken export of CF records. --- sc/source/filter/xcl97/XclExpChangeTrack.cxx | 10 +++++----- sc/source/filter/xcl97/xcl97rec.cxx | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'sc/source/filter/xcl97') diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx index 59c05a1435aa..a38b023d4f55 100644 --- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx +++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx @@ -64,7 +64,7 @@ void lcl_WriteFixedString( XclExpStream& rStrm, const XclExpString& rString, sal if( rString.Len() > 0 ) rStrm << rString; if( nLength > nStrBytes ) - rStrm.WriteZeroBytesToRecord( nLength - nStrBytes ); + rStrm.WriteZeroBytes( nLength - nStrBytes ); } inline void lcl_GenerateGUID( sal_uInt8* pGUID, sal_Bool& rValidGUID ) @@ -94,7 +94,7 @@ void XclExpUserBView::SaveCont( XclExpStream& rStrm ) rStrm << (sal_uInt32) 0xFF078014 << (sal_uInt32) 0x00000001; lcl_WriteGUID( rStrm, aGUID ); - rStrm.WriteZeroBytesToRecord( 8 ); + rStrm.WriteZeroBytes( 8 ); rStrm << (sal_uInt32) 1200 << (sal_uInt32) 1000 << (sal_uInt16) 1000 @@ -237,7 +237,7 @@ sal_Size XclExpChTr0x0198::GetLen() const void XclExpChTr0x0192::SaveCont( XclExpStream& rStrm ) { rStrm << sal_uInt16( 0x0022 ); - rStrm.WriteZeroBytesToRecord( 510 ); + rStrm.WriteZeroBytes( 510 ); } UINT16 XclExpChTr0x0192::GetNum() const @@ -291,7 +291,7 @@ XclExpChTr0x0195::~XclExpChTr0x0195() void XclExpChTr0x0195::SaveCont( XclExpStream& rStrm ) { - rStrm.WriteZeroBytesToRecord( 162 ); + rStrm.WriteZeroBytes( 162 ); } UINT16 XclExpChTr0x0195::GetNum() const @@ -928,7 +928,7 @@ void XclExpChTrInsertTab::SaveActionData( XclExpStream& rStrm ) const rStrm << sal_uInt32( 0 ); lcl_WriteFixedString( rStrm, XclExpString( GetTabInfo().GetScTabName( nTab ) ), 127 ); lcl_WriteDateTime( rStrm, GetDateTime() ); - rStrm.WriteZeroBytesToRecord( 133 ); + rStrm.WriteZeroBytes( 133 ); } UINT16 XclExpChTrInsertTab::GetNum() const diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index fcdee35f5144..0380acc5005b 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -380,7 +380,7 @@ void XclObj::WriteBody( XclExpStream& rStrm ) // write the ftCmo subrecord pXclStrm->StartRecord( EXC_ID_OBJCMO, 18 ); *pXclStrm << mnObjType << nObjId << nGrbit; - pXclStrm->WriteZeroBytesToRecord( 12 ); + pXclStrm->WriteZeroBytes( 12 ); pXclStrm->EndRecord(); // write other subrecords @@ -559,7 +559,7 @@ void XclObjDropDown::WriteSubRecs( XclExpStream& rStrm ) { // ftSbs subrecord - Scroll bars (dummy) rStrm.StartRecord( EXC_ID_OBJSBS, 20 ); - rStrm.WriteZeroBytesToRecord( 20 ); + rStrm.WriteZeroBytes( 20 ); rStrm.EndRecord(); // ftLbsData subrecord - Listbox data @@ -692,7 +692,7 @@ void XclTxo::SaveCont( XclExpStream& rStrm ) ::insert_value( nFlags, mnVerAlign, 4, 3 ); rStrm << nFlags << mnRotation; - rStrm.WriteZeroBytesToRecord( 6 ); + rStrm.WriteZeroBytes( 6 ); rStrm << mpString->Len() << nRunLen << sal_uInt32( 0 ); } @@ -1133,7 +1133,7 @@ void ExcEScenario::SaveCont( XclExpStream& rStrm ) for( pCell = _First(); pCell; pCell = _Next() ) pCell->WriteText( rStrm ); // string content rStrm.SetSliceSize( 2 ); - rStrm.WriteZeroBytesToRecord( 2 * List::Count() ); // date format + rStrm.WriteZeroBytes( 2 * List::Count() ); // date format } UINT16 ExcEScenario::GetNum() const -- cgit