summaryrefslogtreecommitdiff
path: root/oox/source
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 /oox/source
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 'oox/source')
-rw-r--r--oox/source/ole/olehelper.cxx18
1 files changed, 5 insertions, 13 deletions
diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx
index 1be5d6f24116..409eb4a8ebcc 100644
--- a/oox/source/ole/olehelper.cxx
+++ b/oox/source/ole/olehelper.cxx
@@ -259,20 +259,12 @@ sal_uInt32 OleHelper::encodeOleColor( sal_Int32 nRgbColor )
void OleHelper::exportGuid( BinaryOutputStream& rOStr, const SvGlobalName& rId )
{
- const sal_uInt8* pBytes = rId.GetBytes();
- sal_uInt32 a;
- memcpy(&a, pBytes, sizeof(sal_uInt32));
- rOStr<< a;
-
- sal_uInt16 b;
- memcpy(&b, pBytes+4, sizeof(sal_uInt16));
- rOStr << b;
-
- memcpy(&b, pBytes+6, sizeof(sal_uInt16));
- rOStr << b;
-
- rOStr.writeArray( (sal_uInt8 *)&pBytes[ 8 ], 8 );
+ rOStr << rId.GetCLSID().Data1;
+ rOStr << rId.GetCLSID().Data2;
+ rOStr << rId.GetCLSID().Data3;
+ rOStr.writeArray( &rId.GetCLSID().Data4, 8 );
}
+
OUString OleHelper::importGuid( BinaryInputStream& rInStrm )
{
OUStringBuffer aBuffer;