diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-26 13:12:52 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-09-26 13:13:42 +0200 |
commit | ed085a6d2043e1da6b50a9d00742b812c9ff0247 (patch) | |
tree | 2301c4fd94cecc102111b2ad80b253b9883e0552 /oox/source/ole/olehelper.cxx | |
parent | DOCX drawingML import: fix handling of rotation in case of horizontal flip (diff) | |
download | core-ed085a6d2043e1da6b50a9d00742b812c9ff0247.tar.gz core-ed085a6d2043e1da6b50a9d00742b812c9ff0247.zip |
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/ole/olehelper.cxx')
-rw-r--r-- | oox/source/ole/olehelper.cxx | 18 |
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; |