diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-03-10 16:55:21 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-03-10 20:21:13 -0500 |
commit | 12343c15568dcc2c9209d8ca41fda2263122448f (patch) | |
tree | 3212a89c6cd8ea2e0aee7103aa9669bbb8a6f307 /sc/source/filter/xcl97 | |
parent | 99745dbcbb25b61437914c9782475d0b67a4b0bd (diff) | |
parent | ce6308e4fad2281241bf4ca78280eba29f744d43 (diff) |
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101
Diffstat (limited to 'sc/source/filter/xcl97')
-rw-r--r-- | sc/source/filter/xcl97/XclExpChangeTrack.cxx | 50 | ||||
-rw-r--r-- | sc/source/filter/xcl97/XclImpChangeTrack.cxx | 24 | ||||
-rw-r--r-- | sc/source/filter/xcl97/xcl97dum.cxx | 20 | ||||
-rw-r--r-- | sc/source/filter/xcl97/xcl97esc.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/xcl97/xcl97rec.cxx | 117 |
5 files changed, 107 insertions, 112 deletions
diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx index 24997279b088..7168e46dd995 100644 --- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx +++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx @@ -96,7 +96,7 @@ void lcl_WriteFixedString( XclExpStream& rStrm, const XclExpString& rString, sal inline void lcl_GenerateGUID( sal_uInt8* pGUID, sal_Bool& rValidGUID ) { - rtl_createUuid( pGUID, rValidGUID ? pGUID : NULL, sal_False ); + rtl_createUuid( pGUID, rValidGUID ? pGUID : NULL, false ); rValidGUID = sal_True; } @@ -133,7 +133,7 @@ void XclExpUserBView::SaveCont( XclExpStream& rStrm ) rStrm << sUsername; } -UINT16 XclExpUserBView::GetNum() const +sal_uInt16 XclExpUserBView::GetNum() const { return 0x01A9; } @@ -148,9 +148,9 @@ sal_Size XclExpUserBView::GetLen() const XclExpUserBViewList::XclExpUserBViewList( const ScChangeTrack& rChangeTrack ) { sal_uInt8 aGUID[ 16 ]; - sal_Bool bValidGUID = sal_False; + sal_Bool bValidGUID = false; const ScStrCollection& rStrColl = rChangeTrack.GetUserCollection(); - for( USHORT nIndex = 0; nIndex < rStrColl.GetCount(); nIndex++ ) + for( sal_uInt16 nIndex = 0; nIndex < rStrColl.GetCount(); nIndex++ ) { const StrData* pStrData = (const StrData*) rStrColl.At( nIndex ); lcl_GenerateGUID( aGUID, bValidGUID ); @@ -197,7 +197,7 @@ void XclExpUsersViewBegin::SaveCont( XclExpStream& rStrm ) << (sal_Int16) -1; } -UINT16 XclExpUsersViewBegin::GetNum() const +sal_uInt16 XclExpUsersViewBegin::GetNum() const { return 0x01AA; } @@ -214,7 +214,7 @@ void XclExpUsersViewEnd::SaveCont( XclExpStream& rStrm ) rStrm << (sal_uInt16) 0x0001; } -UINT16 XclExpUsersViewEnd::GetNum() const +sal_uInt16 XclExpUsersViewEnd::GetNum() const { return 0x01AB; } @@ -231,7 +231,7 @@ void XclExpChTr0x0191::SaveCont( XclExpStream& rStrm ) rStrm << (sal_uInt16) 0x0000; } -UINT16 XclExpChTr0x0191::GetNum() const +sal_uInt16 XclExpChTr0x0191::GetNum() const { return 0x0191; } @@ -249,7 +249,7 @@ void XclExpChTr0x0198::SaveCont( XclExpStream& rStrm ) << (sal_uInt16) 0x0000; } -UINT16 XclExpChTr0x0198::GetNum() const +sal_uInt16 XclExpChTr0x0198::GetNum() const { return 0x0198; } @@ -267,7 +267,7 @@ void XclExpChTr0x0192::SaveCont( XclExpStream& rStrm ) rStrm.WriteZeroBytes( 510 ); } -UINT16 XclExpChTr0x0192::GetNum() const +sal_uInt16 XclExpChTr0x0192::GetNum() const { return 0x0192; } @@ -284,7 +284,7 @@ void XclExpChTr0x0197::SaveCont( XclExpStream& rStrm ) rStrm << (sal_uInt16) 0x0000; } -UINT16 XclExpChTr0x0197::GetNum() const +sal_uInt16 XclExpChTr0x0197::GetNum() const { return 0x0197; } @@ -300,7 +300,7 @@ XclExpChTrEmpty::~XclExpChTrEmpty() { } -UINT16 XclExpChTrEmpty::GetNum() const +sal_uInt16 XclExpChTrEmpty::GetNum() const { return nRecNum; } @@ -321,7 +321,7 @@ void XclExpChTr0x0195::SaveCont( XclExpStream& rStrm ) rStrm.WriteZeroBytes( 162 ); } -UINT16 XclExpChTr0x0195::GetNum() const +sal_uInt16 XclExpChTr0x0195::GetNum() const { return 0x0195; } @@ -345,7 +345,7 @@ void XclExpChTr0x0194::SaveCont( XclExpStream& rStrm ) lcl_WriteFixedString( rStrm, sUsername, 147 ); } -UINT16 XclExpChTr0x0194::GetNum() const +sal_uInt16 XclExpChTr0x0194::GetNum() const { return 0x0194; } @@ -374,7 +374,7 @@ void XclExpChTrHeader::SaveCont( XclExpStream& rStrm ) << (sal_uInt16) 0x001E; } -UINT16 XclExpChTrHeader::GetNum() const +sal_uInt16 XclExpChTrHeader::GetNum() const { return 0x0196; } @@ -424,7 +424,7 @@ void XclExpChTrInfo::SaveCont( XclExpStream& rStrm ) << (sal_uInt16) 0x0002; } -UINT16 XclExpChTrInfo::GetNum() const +sal_uInt16 XclExpChTrInfo::GetNum() const { return 0x0138; } @@ -575,7 +575,7 @@ void XclExpChTrTabId::SaveCont( XclExpStream& rStrm ) rStrm << nIndex; } -UINT16 XclExpChTrTabId::GetNum() const +sal_uInt16 XclExpChTrTabId::GetNum() const { return 0x013D; } @@ -640,7 +640,7 @@ XclExpChTrAction::XclExpChTrAction( rIdBuffer( rTabIdBuffer ), nLength( 0 ), nOpCode( nNewOpCode ), - bForceInfo( sal_False ) + bForceInfo( false ) { aDateTime.SetSec( 0 ); aDateTime.Set100Sec( 0 ); @@ -930,7 +930,7 @@ void XclExpChTrCellContent::SaveActionData( XclExpStream& rStrm ) const pNewData->Write( rStrm, rIdBuffer ); } -UINT16 XclExpChTrCellContent::GetNum() const +sal_uInt16 XclExpChTrCellContent::GetNum() const { return 0x013B; } @@ -1109,7 +1109,7 @@ void XclExpChTrInsert::CompleteSaveAction( XclExpStream& rStrm ) const XclExpChTrEmpty( 0x0151 ).Save( rStrm ); } -UINT16 XclExpChTrInsert::GetNum() const +sal_uInt16 XclExpChTrInsert::GetNum() const { return 0x0137; } @@ -1181,7 +1181,7 @@ void XclExpChTrInsertTab::SaveActionData( XclExpStream& rStrm ) const rStrm.WriteZeroBytes( 133 ); } -UINT16 XclExpChTrInsertTab::GetNum() const +sal_uInt16 XclExpChTrInsertTab::GetNum() const { return 0x014D; } @@ -1250,7 +1250,7 @@ void XclExpChTrMoveRange::CompleteSaveAction( XclExpStream& rStrm ) const XclExpChTrEmpty( 0x014F ).Save( rStrm ); } -UINT16 XclExpChTrMoveRange::GetNum() const +sal_uInt16 XclExpChTrMoveRange::GetNum() const { return 0x0140; } @@ -1304,7 +1304,7 @@ void XclExpChTr0x014A::SaveActionData( XclExpStream& rStrm ) const Write2DRange( rStrm, aRange ); } -UINT16 XclExpChTr0x014A::GetNum() const +sal_uInt16 XclExpChTr0x014A::GetNum() const { return 0x014A; } @@ -1469,7 +1469,7 @@ XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) : pTempDoc( NULL ), nNewAction( 1 ), pHeader( NULL ), - bValidGUID( sal_False ) + bValidGUID( false ) { DBG_ASSERT( GetOldRoot().pTabId, "XclExpChangeTrack::XclExpChangeTrack - root data incomplete" ); if( !GetOldRoot().pTabId ) @@ -1584,7 +1584,7 @@ ScChangeTrack* XclExpChangeTrack::CreateTempChangeTrack() DBG_ASSERT( nOrigCount == pTempDoc->GetTableCount(), "XclExpChangeTrack::CreateTempChangeTrack - table count mismatch" ); if( nOrigCount != pTempDoc->GetTableCount() ) - return sal_False; + return false; return pOrigChangeTrack->Clone(pTempDoc); } @@ -1626,7 +1626,7 @@ void XclExpChangeTrack::PushActionRecord( const ScChangeAction& rAction ) sal_Bool XclExpChangeTrack::WriteUserNamesStream() { - sal_Bool bRet = sal_False; + sal_Bool bRet = false; SotStorageStreamRef xSvStrm = OpenStream( EXC_STREAM_USERNAMES ); DBG_ASSERT( xSvStrm.Is(), "XclExpChangeTrack::WriteUserNamesStream - no stream" ); if( xSvStrm.Is() ) diff --git a/sc/source/filter/xcl97/XclImpChangeTrack.cxx b/sc/source/filter/xcl97/XclImpChangeTrack.cxx index cbadfd62b6f8..7cf584f317b0 100644 --- a/sc/source/filter/xcl97/XclImpChangeTrack.cxx +++ b/sc/source/filter/xcl97/XclImpChangeTrack.cxx @@ -50,7 +50,7 @@ XclImpChangeTrack::XclImpChangeTrack( const XclImpRoot& rRoot, const XclImpStrea pChangeTrack( NULL ), pStrm( NULL ), nTabIdCount( 0 ), - bGlobExit( sal_False ), + bGlobExit( false ), eNestedMode( nmBase ) { // Verify that the User Names stream exists before going any further. Excel adds both @@ -64,7 +64,7 @@ XclImpChangeTrack::XclImpChangeTrack( const XclImpRoot& rRoot, const XclImpStrea if( xInStrm.Is() ) { xInStrm->Seek( STREAM_SEEK_TO_END ); - ULONG nStreamLen = xInStrm->Tell(); + sal_uLong nStreamLen = xInStrm->Tell(); if( (xInStrm->GetErrorCode() == ERRCODE_NONE) && (nStreamLen != STREAM_SEEK_TO_END) ) { xInStrm->Seek( STREAM_SEEK_TO_BEGIN ); @@ -73,7 +73,7 @@ XclImpChangeTrack::XclImpChangeTrack( const XclImpRoot& rRoot, const XclImpStrea pChangeTrack = new ScChangeTrack( GetDocPtr() ); sOldUsername = pChangeTrack->GetUser(); - pChangeTrack->SetUseFixDateTime( TRUE ); + pChangeTrack->SetUseFixDateTime( sal_True ); ReadRecords(); } @@ -115,7 +115,7 @@ void XclImpChangeTrack::DoInsertRange( const ScRange& rRange ) void XclImpChangeTrack::DoDeleteRange( const ScRange& rRange ) { - ULONG nFirst, nLast; + sal_uLong nFirst, nLast; pChangeTrack->AppendDeleteRange( rRange, NULL, nFirst, nLast ); DoAcceptRejectAction( nFirst, nLast ); } @@ -147,7 +147,7 @@ sal_Bool XclImpChangeTrack::CheckRecord( sal_uInt16 nOpCode ) if( (nOpCode != EXC_CHTR_OP_UNKNOWN) && (aRecHeader.nOpCode != nOpCode) ) { OSL_FAIL( "XclImpChangeTrack::CheckRecord - unknown action" ); - return sal_False; + return false; } return aRecHeader.nIndex != 0; } @@ -208,7 +208,7 @@ void XclImpChangeTrack::ReadFormula( ScTokenArray*& rpTokenArray, const ScAddres // read the formula, 3D tab refs from extended data const ScTokenArray* pArray = NULL; aFmlConv.Reset( rPosition ); - BOOL bOK = (aFmlConv.Convert( pArray, aFmlaStrm, nFmlSize, false, FT_CellFormula) == ConvOK); // JEG : Check This + sal_Bool bOK = (aFmlConv.Convert( pArray, aFmlaStrm, nFmlSize, false, FT_CellFormula) == ConvOK); // JEG : Check This rpTokenArray = (bOK && pArray) ? new ScTokenArray( *pArray ) : NULL; pStrm->Ignore( 1 ); } @@ -295,7 +295,7 @@ void XclImpChangeTrack::ReadChTrInsert() else aRange.aEnd.SetCol( MAXCOL ); - BOOL bValid = pStrm->IsValid(); + sal_Bool bValid = pStrm->IsValid(); if( FoundNestedMode() ) ReadNestedRecords(); @@ -397,7 +397,7 @@ void XclImpChangeTrack::ReadChTrMoveRange() aSourceRange.aStart.SetTab( ReadTabNum() ); aSourceRange.aEnd.SetTab( aSourceRange.aStart.Tab() ); - BOOL bValid = pStrm->IsValid(); + sal_Bool bValid = pStrm->IsValid(); if( FoundNestedMode() ) ReadNestedRecords(); @@ -450,7 +450,7 @@ sal_Bool XclImpChangeTrack::EndNestedMode() void XclImpChangeTrack::ReadRecords() { - sal_Bool bExitLoop = sal_False; + sal_Bool bExitLoop = false; while( !bExitLoop && !bGlobExit && pStrm->StartNextRecord() ) { @@ -476,13 +476,13 @@ void XclImpChangeTrack::Apply() if( pChangeTrack ) { pChangeTrack->SetUser( sOldUsername ); - pChangeTrack->SetUseFixDateTime( FALSE ); + pChangeTrack->SetUseFixDateTime( false ); GetDoc().SetChangeTrack( pChangeTrack ); pChangeTrack = NULL; ScChangeViewSettings aSettings; - aSettings.SetShowChanges( TRUE ); + aSettings.SetShowChanges( sal_True ); GetDoc().SetChangeViewSettings( aSettings ); } } @@ -495,7 +495,7 @@ XclImpChTrFmlConverter::~XclImpChTrFmlConverter() } // virtual, called from ExcToSc8::Convert() -bool XclImpChTrFmlConverter::Read3DTabReference( UINT16 /*nIxti*/, SCTAB& rFirstTab, SCTAB& rLastTab, +bool XclImpChTrFmlConverter::Read3DTabReference( sal_uInt16 /*nIxti*/, SCTAB& rFirstTab, SCTAB& rLastTab, ExternalTabInfo& rExtInfo ) { return rChangeTrack.Read3DTabRefInfo( rFirstTab, rLastTab, rExtInfo ); diff --git a/sc/source/filter/xcl97/xcl97dum.cxx b/sc/source/filter/xcl97/xcl97dum.cxx index 8340ce397ffa..1eafabf2fb73 100644 --- a/sc/source/filter/xcl97/xcl97dum.cxx +++ b/sc/source/filter/xcl97/xcl97dum.cxx @@ -39,7 +39,7 @@ // ... (8+) := neu in Biff8, ... (8*) := anders in Biff8 -const BYTE ExcDummy8_00a::pMyData[] = { +const sal_uInt8 ExcDummy8_00a::pMyData[] = { 0xe1, 0x00, 0x02, 0x00, 0xb0, 0x04, // INTERFACEHDR 0xc1, 0x00, 0x02, 0x00, 0x00, 0x00, // MMS 0xe2, 0x00, 0x00, 0x00, // INTERFACEEND @@ -65,13 +65,13 @@ const sal_Size ExcDummy8_00a::nMyLen = sizeof(ExcDummy8_00a::pMyData); // TABID (8+): ExcTabid -const BYTE ExcDummy8_00b::pMyData[] = { +const sal_uInt8 ExcDummy8_00b::pMyData[] = { 0x9c, 0x00, 0x02, 0x00, 0x0e, 0x00 // FNGROUPCOUNT }; const sal_Size ExcDummy8_00b::nMyLen = sizeof(ExcDummy8_00b::pMyData); -const BYTE ExcDummy8_040::pMyData[] = { +const sal_uInt8 ExcDummy8_040::pMyData[] = { 0xaf, 0x01, 0x02, 0x00, 0x00, 0x00, // PROT4REV (8+) 0xbc, 0x01, 0x02, 0x00, 0x00, 0x00, // PROT4REVPASS (8+) // 0x3d, 0x00, 0x12, 0x00, 0xe0, 0x01, 0x5a, 0x00, 0xcf, // WINDOW1 @@ -83,7 +83,7 @@ const BYTE ExcDummy8_040::pMyData[] = { const sal_Size ExcDummy8_040::nMyLen = sizeof(ExcDummy8_040::pMyData); -const BYTE ExcDummy8_041::pMyData[] = { +const sal_uInt8 ExcDummy8_041::pMyData[] = { 0xb7, 0x01, 0x02, 0x00, 0x00, 0x00, // REFRESHALL (8+) 0xda, 0x00, 0x02, 0x00, 0x00, 0x00 // BOOKBOOL }; @@ -91,7 +91,7 @@ const sal_Size ExcDummy8_041::nMyLen = sizeof(ExcDummy8_041::pMyData); -const BYTE ExcDummy8_02::pMyData[] = { +const sal_uInt8 ExcDummy8_02::pMyData[] = { 0x5f, 0x00, 0x02, 0x00, 0x01, 0x00 // SAVERECALC }; const sal_Size ExcDummy8_02::nMyLen = sizeof(ExcDummy8_02::pMyData); @@ -105,7 +105,7 @@ sal_Size ExcDummy8_00a::GetLen() const } -const BYTE* ExcDummy8_00a::GetData() const +const sal_uInt8* ExcDummy8_00a::GetData() const { return pMyData; } @@ -118,7 +118,7 @@ sal_Size ExcDummy8_00b::GetLen() const } -const BYTE* ExcDummy8_00b::GetData() const +const sal_uInt8* ExcDummy8_00b::GetData() const { return pMyData; } @@ -131,7 +131,7 @@ sal_Size ExcDummy8_040::GetLen() const } -const BYTE* ExcDummy8_040::GetData() const +const sal_uInt8* ExcDummy8_040::GetData() const { return pMyData; } @@ -144,7 +144,7 @@ sal_Size ExcDummy8_041::GetLen() const } -const BYTE* ExcDummy8_041::GetData() const +const sal_uInt8* ExcDummy8_041::GetData() const { return pMyData; } @@ -157,7 +157,7 @@ sal_Size ExcDummy8_02::GetLen() const } -const BYTE* ExcDummy8_02::GetData() const +const sal_uInt8* ExcDummy8_02::GetData() const { return pMyData; } diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx index cfd84edeec86..75bb0335f9d6 100644 --- a/sc/source/filter/xcl97/xcl97esc.cxx +++ b/sc/source/filter/xcl97/xcl97esc.cxx @@ -200,12 +200,12 @@ EscherExHostAppData* XclEscherEx::StartShape( const Reference< XShape >& rxShape { if ( nAdditionalText ) nAdditionalText++; - BOOL bInGroup = ( pCurrXclObj != NULL ); + sal_Bool bInGroup = ( pCurrXclObj != NULL ); if ( bInGroup ) { // stacked recursive group object if ( !pCurrAppData->IsStackedGroup() ) { //! UpdateDffFragmentEnd only once - pCurrAppData->SetStackedGroup( TRUE ); + pCurrAppData->SetStackedGroup( sal_True ); UpdateDffFragmentEnd(); } } @@ -312,12 +312,12 @@ EscherExHostAppData* XclEscherEx::StartShape( const Reference< XShape >& rxShape } } if ( !pCurrXclObj ) - pCurrAppData->SetDontWriteShape( TRUE ); + pCurrAppData->SetDontWriteShape( sal_True ); return pCurrAppData; } -void XclEscherEx::EndShape( UINT16 nShapeType, UINT32 nShapeID ) +void XclEscherEx::EndShape( sal_uInt16 nShapeType, sal_uInt32 nShapeID ) { // own escher data created? -> never delete such objects bool bOwnEscher = pCurrXclObj && pCurrXclObj->IsOwnEscher(); diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index a94e0e1fb91a..69ae4eadbaa9 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -123,13 +123,13 @@ XclExpObjList::~XclExpObjList() delete pSolverContainer; } -UINT16 XclExpObjList::Add( XclObj* pObj ) +sal_uInt16 XclExpObjList::Add( XclObj* pObj ) { DBG_ASSERT( Count() < 0xFFFF, "XclExpObjList::Add: too much for Xcl" ); if ( Count() < 0xFFFF ) { Insert( pObj, LIST_APPEND ); - UINT16 nCnt = (UINT16) Count(); + sal_uInt16 nCnt = (sal_uInt16) Count(); pObj->SetId( nCnt ); pObj->SetTab( mnScTab ); return nCnt; @@ -326,7 +326,7 @@ void XclObj::ImplWriteAnchor( const XclExpRoot& /*rRoot*/, const SdrObject* pSdr } } -void XclObj::SetEscherShapeType( UINT16 nType ) +void XclObj::SetEscherShapeType( sal_uInt16 nType ) { //2do: what about the other defined ot... types? switch ( nType ) @@ -459,7 +459,7 @@ static void lcl_FillProps( EscherPropertyContainer& rPropOpt, SdrObject* pCaptio // If the Colour is the same as the 'ToolTip' System colour then // use the default rather than the explicit colour value. This will // be incorrect where user has chosen to use this colour explicity. - Color aColor = Color( (BYTE)nValue, (BYTE)( nValue >> 8 ), (BYTE)( nValue >> 16 ) ); + Color aColor = Color( (sal_uInt8)nValue, (sal_uInt8)( nValue >> 8 ), (sal_uInt8)( nValue >> 16 ) ); const StyleSettings& rSett = Application::GetSettings().GetStyleSettings(); if( aColor == rSett.GetHelpColor().GetColor() ) { @@ -599,14 +599,14 @@ void XclObjComment::SaveXml( XclExpXmlStream& rStrm ) // --- class XclObjDropDown ------------------------------------------ -XclObjDropDown::XclObjDropDown( XclExpObjectManager& rObjMgr, const ScAddress& rPos, BOOL bFilt ) : +XclObjDropDown::XclObjDropDown( XclExpObjectManager& rObjMgr, const ScAddress& rPos, sal_Bool bFilt ) : XclObj( rObjMgr, EXC_OBJTYPE_DROPDOWN, true ), bIsFiltered( bFilt ) { - SetLocked( TRUE ); - SetPrintable( FALSE ); - SetAutoFill( TRUE ); - SetAutoLine( FALSE ); + SetLocked( sal_True ); + SetPrintable( false ); + SetAutoFill( sal_True ); + SetAutoLine( false ); nGrbit |= 0x0100; // undocumented mrEscherEx.OpenContainer( ESCHER_SpContainer ); mrEscherEx.AddShape( ESCHER_ShpInst_HostControl, SHAPEFLAG_HAVEANCHOR | SHAPEFLAG_HAVESPT ); @@ -644,7 +644,7 @@ void XclObjDropDown::WriteSubRecs( XclExpStream& rStrm ) ::insert_value( nDropDownFlags, EXC_OBJ_DROPDOWN_SIMPLE, 0, 2 ); ::set_flag( nDropDownFlags, EXC_OBJ_DROPDOWN_FILTERED, bIsFiltered ); rStrm.StartRecord( EXC_ID_OBJLBSDATA, 16 ); - rStrm << (UINT32)0 << (UINT16)0 << (UINT16)0x0301 << (UINT16)0 + rStrm << (sal_uInt32)0 << (sal_uInt16)0 << (sal_uInt16)0x0301 << (sal_uInt16)0 << nDropDownFlags << sal_uInt16( 20 ) << sal_uInt16( 130 ); rStrm.EndRecord(); } @@ -735,7 +735,7 @@ XclTxo::XclTxo( const XclExpRoot& rRoot, const EditTextObject& rEditObj, SdrObje { SfxItemSet aSet( rEditObj.GetParaAttribs( 0)); const SfxPoolItem* pItem = NULL; - if( aSet.GetItemState( EE_PARA_JUST, TRUE, &pItem ) == SFX_ITEM_SET ) + if( aSet.GetItemState( EE_PARA_JUST, sal_True, &pItem ) == SFX_ITEM_SET ) { SvxAdjust eEEAlign = static_cast< const SvxAdjustItem& >( *pItem ).GetAdjust(); pCaption->SetMergedItem( SvxAdjustItem( eEEAlign, EE_PARA_JUST ) ); @@ -795,7 +795,7 @@ void XclTxo::Save( XclExpStream& rStrm ) } } -UINT16 XclTxo::GetNum() const +sal_uInt16 XclTxo::GetNum() const { return EXC_ID_TXO; } @@ -822,9 +822,9 @@ void XclObjOle::WriteSubRecs( XclExpStream& rStrm ) { // write only as embedded, not linked String aStorageName( RTL_CONSTASCII_USTRINGPARAM( "MBD" ) ); - sal_Char aBuf[ sizeof(UINT32) * 2 + 1 ]; + sal_Char aBuf[ sizeof(sal_uInt32) * 2 + 1 ]; // FIXME Eeek! Is this just a way to get a unique id? - UINT32 nPictureId = UINT32(sal_uIntPtr(this) >> 2); + sal_uInt32 nPictureId = sal_uInt32(sal_uIntPtr(this) >> 2); sprintf( aBuf, "%08X", static_cast< unsigned int >( nPictureId ) ); aStorageName.AppendAscii( aBuf ); SotStorageRef xOleStg = pRootStorage->OpenSotStorage( aStorageName, @@ -836,7 +836,7 @@ void XclObjOle::WriteSubRecs( XclExpStream& rStrm ) { // set version to "old" version, because it must be // saved in MS notation. - UINT32 nFl = 0; + sal_uInt32 nFl = 0; SvtFilterOptions* pFltOpts = SvtFilterOptions::Get(); if( pFltOpts ) { @@ -858,7 +858,7 @@ void XclObjOle::WriteSubRecs( XclExpStream& rStrm ) // OBJCF subrecord, undocumented as usual rStrm.StartRecord( EXC_ID_OBJCF, 2 ); - rStrm << UINT16(0x0002); + rStrm << sal_uInt16(0x0002); rStrm.EndRecord(); // OBJFLAGS subrecord, undocumented as usual @@ -870,9 +870,9 @@ void XclObjOle::WriteSubRecs( XclExpStream& rStrm ) // OBJPICTFMLA subrecord, undocumented as usual XclExpString aName( xOleStg->GetUserName() ); - UINT16 nPadLen = (UINT16)(aName.GetSize() & 0x01); - UINT16 nFmlaLen = static_cast< sal_uInt16 >( 12 + aName.GetSize() + nPadLen ); - UINT16 nSubRecLen = nFmlaLen + 6; + sal_uInt16 nPadLen = (sal_uInt16)(aName.GetSize() & 0x01); + sal_uInt16 nFmlaLen = static_cast< sal_uInt16 >( 12 + aName.GetSize() + nPadLen ); + sal_uInt16 nSubRecLen = nFmlaLen + 6; rStrm.StartRecord( EXC_ID_OBJPICTFMLA, nSubRecLen ); rStrm << nFmlaLen @@ -909,7 +909,7 @@ void XclObjAny::WriteSubRecs( XclExpStream& rStrm ) { if( mnObjType == EXC_OBJTYPE_GROUP ) // ftGmo subrecord - rStrm << EXC_ID_OBJGMO << UINT16(2) << UINT16(0); + rStrm << EXC_ID_OBJGMO << sal_uInt16(2) << sal_uInt16(0); } void XclObjAny::Save( XclExpStream& rStrm ) @@ -1024,7 +1024,7 @@ void ExcBof8_Base::SaveCont( XclExpStream& rStrm ) } -UINT16 ExcBof8_Base::GetNum() const +sal_uInt16 ExcBof8_Base::GetNum() const { return 0x0809; } @@ -1114,7 +1114,7 @@ void ExcBundlesheet8::SaveXml( XclExpXmlStream& rStrm ) // --- class XclObproj ----------------------------------------------- -UINT16 XclObproj::GetNum() const +sal_uInt16 XclObproj::GetNum() const { return 0x00D3; } @@ -1139,7 +1139,7 @@ void XclCodename::SaveCont( XclExpStream& rStrm ) } -UINT16 XclCodename::GetNum() const +sal_uInt16 XclCodename::GetNum() const { return 0x01BA; } @@ -1154,7 +1154,7 @@ sal_Size XclCodename::GetLen() const // ---- Scenarios ---------------------------------------------------- -ExcEScenarioCell::ExcEScenarioCell( UINT16 nC, UINT16 nR, const String& rTxt ) : +ExcEScenarioCell::ExcEScenarioCell( sal_uInt16 nC, sal_uInt16 nR, const String& rTxt ) : nCol( nC ), nRow( nR ), sText( rTxt, EXC_STR_DEFAULT, 255 ) @@ -1190,7 +1190,7 @@ ExcEScenario::ExcEScenario( const XclExpRoot& rRoot, SCTAB nTab ) String sTmpName; String sTmpComm; Color aDummyCol; - USHORT nFlags; + sal_uInt16 nFlags; ScDocument& rDoc = rRoot.GetDoc(); rDoc.GetName( nTab, sTmpName ); @@ -1210,7 +1210,7 @@ ExcEScenario::ExcEScenario( const XclExpRoot& rRoot, SCTAB nTab ) if( !pRList ) return; - BOOL bContLoop = TRUE; + sal_Bool bContLoop = sal_True; SCROW nRow; SCCOL nCol; String sText; @@ -1229,7 +1229,7 @@ ExcEScenario::ExcEScenario( const XclExpRoot& rRoot, SCTAB nTab ) rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max, ScGlobal::pLocaleData->getNumDecimalSep().GetChar(0), - TRUE ); + sal_True ); } else rDoc.GetString( nCol, nRow, nTab, sText ); @@ -1245,25 +1245,25 @@ ExcEScenario::~ExcEScenario() delete pCell; } -BOOL ExcEScenario::Append( UINT16 nCol, UINT16 nRow, const String& rTxt ) +sal_Bool ExcEScenario::Append( sal_uInt16 nCol, sal_uInt16 nRow, const String& rTxt ) { if( List::Count() == EXC_SCEN_MAXCELL ) - return FALSE; + return false; ExcEScenarioCell* pCell = new ExcEScenarioCell( nCol, nRow, rTxt ); List::Insert( pCell, LIST_APPEND ); nRecLen += 6 + pCell->GetStringBytes(); // 4 bytes address, 2 bytes ifmt - return TRUE; + return sal_True; } void ExcEScenario::SaveCont( XclExpStream& rStrm ) { - rStrm << (UINT16) List::Count() // number of cells + rStrm << (sal_uInt16) List::Count() // number of cells << nProtected // fProtection - << (UINT8) 0 // fHidden - << (UINT8) sName.Len() // length of scen name - << (UINT8) sComment.Len() // length of comment - << (UINT8) sUserName.Len(); // length of user name + << (sal_uInt8) 0 // fHidden + << (sal_uInt8) sName.Len() // length of scen name + << (sal_uInt8) sComment.Len() // length of comment + << (sal_uInt8) sUserName.Len(); // length of user name sName.WriteFlagField( rStrm ); sName.WriteBuffer( rStrm ); @@ -1281,7 +1281,7 @@ void ExcEScenario::SaveCont( XclExpStream& rStrm ) rStrm.WriteZeroBytes( 2 * List::Count() ); // date format } -UINT16 ExcEScenario::GetNum() const +sal_uInt16 ExcEScenario::GetNum() const { return 0x00AF; } @@ -1340,10 +1340,10 @@ ExcEScenarioManager::~ExcEScenarioManager() void ExcEScenarioManager::SaveCont( XclExpStream& rStrm ) { - rStrm << (UINT16) List::Count() // number of scenarios + rStrm << (sal_uInt16) List::Count() // number of scenarios << nActive // active scen << nActive // last displayed - << (UINT16) 0; // reference areas + << (sal_uInt16) 0; // reference areas } void ExcEScenarioManager::Save( XclExpStream& rStrm ) @@ -1373,7 +1373,7 @@ void ExcEScenarioManager::SaveXml( XclExpXmlStream& rStrm ) rWorkbook->endElement( XML_scenarios ); } -UINT16 ExcEScenarioManager::GetNum() const +sal_uInt16 ExcEScenarioManager::GetNum() const { return 0x00AE; } @@ -1466,7 +1466,7 @@ XclCalccount::XclCalccount( const ScDocument& rDoc ) } -UINT16 XclCalccount::GetNum() const +sal_uInt16 XclCalccount::GetNum() const { return 0x000C; } @@ -1500,7 +1500,7 @@ XclIteration::XclIteration( const ScDocument& rDoc ) } -UINT16 XclIteration::GetNum() const +sal_uInt16 XclIteration::GetNum() const { return 0x0011; } @@ -1535,7 +1535,7 @@ XclDelta::XclDelta( const ScDocument& rDoc ) } -UINT16 XclDelta::GetNum() const +sal_uInt16 XclDelta::GetNum() const { return 0x0010; } @@ -1556,27 +1556,18 @@ void XclDelta::SaveXml( XclExpXmlStream& rStrm ) // ============================================================================ -XclExpFilePass::XclExpFilePass( const XclExpRoot& rRoot ) : +XclExpFileEncryption::XclExpFileEncryption( const XclExpRoot& rRoot ) : XclExpRecord(0x002F, 54), mrRoot(rRoot) { } -XclExpFilePass::~XclExpFilePass() +XclExpFileEncryption::~XclExpFileEncryption() { } -void XclExpFilePass::WriteBody( XclExpStream& rStrm ) +void XclExpFileEncryption::WriteBody( XclExpStream& rStrm ) { - static const sal_uInt8 nDocId[] = { - 0x17, 0xf7, 0x01, 0x08, 0xea, 0xad, 0x30, 0x5c, - 0x1a, 0x95, 0xa5, 0x75, 0xd6, 0x79, 0xcd, 0x8d }; - - - static const sal_uInt8 nSalt[] = { - 0xa4, 0x5b, 0xf7, 0xe9, 0x9f, 0x55, 0x21, 0xc5, - 0xc5, 0x56, 0xa8, 0x0d, 0x39, 0x05, 0x3a, 0xb4 }; - // 0x0000 - neither standard nor strong encryption // 0x0001 - standard or strong encryption rStrm << static_cast<sal_uInt16>(0x0001); @@ -1586,13 +1577,17 @@ void XclExpFilePass::WriteBody( XclExpStream& rStrm ) sal_uInt16 nStdEnc = 0x0001; rStrm << nStdEnc << nStdEnc; - sal_uInt8 nSaltHash[16]; - XclExpEncrypterRef xEnc( new XclExpBiff8Encrypter(mrRoot, nDocId, nSalt) ); - xEnc->GetSaltDigest(nSaltHash); - - rStrm.Write(nDocId, 16); - rStrm.Write(nSalt, 16); - rStrm.Write(nSaltHash, 16); + sal_uInt8 pnDocId[16]; + sal_uInt8 pnSalt[16]; + sal_uInt8 pnSaltHash[16]; + XclExpEncrypterRef xEnc( new XclExpBiff8Encrypter(mrRoot) ); + xEnc->GetDocId(pnDocId); + xEnc->GetSalt(pnSalt); + xEnc->GetSaltDigest(pnSaltHash); + + rStrm.Write(pnDocId, 16); + rStrm.Write(pnSalt, 16); + rStrm.Write(pnSaltHash, 16); rStrm.SetEncrypter(xEnc); } |