summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-09-26 13:12:52 +0200
committerNoel Grandin <noel@peralex.com>2014-09-26 13:13:42 +0200
commited085a6d2043e1da6b50a9d00742b812c9ff0247 (patch)
tree2301c4fd94cecc102111b2ad80b253b9883e0552 /sot
parentdd2b8472a97d1ab01111f9969b046a1c2ec5586a (diff)
cleanup GUID/ClsId/CLSID types
- rename GUID to SvGUID so we don't need an #ifdef WIN32 - drop ClsId struct, since it is used interchangeably with GUID and has the same structure Change-Id: Idf5c14c82a6861ef585fb57896a9b12cfe40374c
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/stg.cxx6
-rw-r--r--sot/source/sdstor/stgelem.cxx44
-rw-r--r--sot/source/sdstor/ucbstorage.cxx2
3 files changed, 26 insertions, 26 deletions
diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx
index d6ae01ea7cea..84219df91e69 100644
--- a/sot/source/sdstor/stg.cxx
+++ b/sot/source/sdstor/stg.cxx
@@ -977,11 +977,11 @@ SvGlobalName Storage::GetClassName()
{
StgCompObjStream aCompObj( *this, false );
if( aCompObj.Load() )
- return SvGlobalName( (const CLSID&) aCompObj.GetClsId() );
+ return SvGlobalName( aCompObj.GetClsId() );
pIo->ResetError();
if ( pEntry )
- return SvGlobalName( (const CLSID&) pEntry->aEntry.GetClassId() );
+ return SvGlobalName( pEntry->aEntry.GetClassId() );
return SvGlobalName();
}
@@ -1041,7 +1041,7 @@ const ClsId& Storage::GetClassId() const
if ( pEntry )
return pEntry->aEntry.GetClassId();
- static ClsId aDummyId = {0,0,0,0,0,0,0,0,0,0,0};
+ static ClsId aDummyId = {0,0,0,{0,0,0,0,0,0,0,0}};
return aDummyId;
}
diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx
index 1a50c1e20de8..8cf9239f5f97 100644
--- a/sot/source/sdstor/stgelem.cxx
+++ b/sot/source/sdstor/stgelem.cxx
@@ -37,34 +37,34 @@ static const sal_uInt8 cStgSignature[ 8 ] = { 0xD0,0xCF,0x11,0xE0,0xA1,0xB1,0x1A
SvStream& ReadClsId( SvStream& r, ClsId& rId )
{
- r.ReadInt32( rId.n1 )
- .ReadInt16( rId.n2 )
- .ReadInt16( rId.n3 )
- .ReadUChar( rId.n4 )
- .ReadUChar( rId.n5 )
- .ReadUChar( rId.n6 )
- .ReadUChar( rId.n7 )
- .ReadUChar( rId.n8 )
- .ReadUChar( rId.n9 )
- .ReadUChar( rId.n10 )
- .ReadUChar( rId.n11 );
+ r.ReadUInt32( rId.Data1 )
+ .ReadUInt16( rId.Data2 )
+ .ReadUInt16( rId.Data3 )
+ .ReadUChar( rId.Data4[0] )
+ .ReadUChar( rId.Data4[1] )
+ .ReadUChar( rId.Data4[2] )
+ .ReadUChar( rId.Data4[3] )
+ .ReadUChar( rId.Data4[4] )
+ .ReadUChar( rId.Data4[5] )
+ .ReadUChar( rId.Data4[6] )
+ .ReadUChar( rId.Data4[7] );
return r;
}
SvStream& WriteClsId( SvStream& r, const ClsId& rId )
{
return
- r .WriteInt32( (sal_Int32) rId.n1 )
- .WriteInt16( (sal_Int16) rId.n2 )
- .WriteInt16( (sal_Int16) rId.n3 )
- .WriteUChar( (sal_uInt8) rId.n4 )
- .WriteUChar( (sal_uInt8) rId.n5 )
- .WriteUChar( (sal_uInt8) rId.n6 )
- .WriteUChar( (sal_uInt8) rId.n7 )
- .WriteUChar( (sal_uInt8) rId.n8 )
- .WriteUChar( (sal_uInt8) rId.n9 )
- .WriteUChar( (sal_uInt8) rId.n10 )
- .WriteUChar( (sal_uInt8) rId.n11 );
+ r .WriteUInt32( rId.Data1 )
+ .WriteUInt16( rId.Data2 )
+ .WriteUInt16( rId.Data3 )
+ .WriteUChar( rId.Data4[0] )
+ .WriteUChar( rId.Data4[1] )
+ .WriteUChar( rId.Data4[2] )
+ .WriteUChar( rId.Data4[3] )
+ .WriteUChar( rId.Data4[4] )
+ .WriteUChar( rId.Data4[5] )
+ .WriteUChar( rId.Data4[6] )
+ .WriteUChar( rId.Data4[7] );
}
///////////////////////////// class StgHeader
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index e95a9b4fe007..c6a5e8b2c318 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -2454,7 +2454,7 @@ void UCBStorage::SetClass( const SvGlobalName & rClass, sal_uLong nOriginalClipF
void UCBStorage::SetClassId( const ClsId& rClsId )
{
- pImp->m_aClassId = SvGlobalName( (const CLSID&) rClsId );
+ pImp->m_aClassId = SvGlobalName( rClsId );
if ( pImp->m_aClassId == SvGlobalName() )
return;