diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-09-18 13:38:02 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-09-19 09:59:21 +0100 |
commit | 24b1a63c613bd364bc1732d8a80635b8ee9acf13 (patch) | |
tree | c30855e3cc98f85bc4adcd1a9630e8fc6b59bad0 /svtools | |
parent | rework this in terms of read_uInt8s_AsOString (diff) | |
download | core-24b1a63c613bd364bc1732d8a80635b8ee9acf13.tar.gz core-24b1a63c613bd364bc1732d8a80635b8ee9acf13.zip |
ditch ByteString::*Buffer*
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/graphic/grfcache.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx index 66bb2f74b044..573866020b42 100644 --- a/svtools/source/graphic/grfcache.cxx +++ b/svtools/source/graphic/grfcache.cxx @@ -33,6 +33,7 @@ #include <tools/debug.hxx> #include <vcl/outdev.hxx> #include <tools/poly.hxx> +#include <rtl/strbuf.hxx> #include "grfcache.hxx" #include <memory> @@ -135,23 +136,23 @@ GraphicID::GraphicID( const GraphicObject& rObj ) ByteString GraphicID::GetIDString() const { - ByteString aHexStr; - sal_Char* pStr = aHexStr.AllocBuffer( 32 ); - sal_Int32 nShift; + rtl::OStringBuffer aHexStr; + sal_Int32 nShift, nIndex = 0; + aHexStr.setLength(32); for( nShift = 28; nShift >= 0; nShift -= 4 ) - *pStr++ = aHexData[ ( mnID1 >> (sal_uInt32) nShift ) & 0xf ]; + aHexStr.setCharAt(nIndex++, aHexData[ ( mnID1 >> (sal_uInt32) nShift ) & 0xf ]); for( nShift = 28; nShift >= 0; nShift -= 4 ) - *pStr++ = aHexData[ ( mnID2 >> (sal_uInt32) nShift ) & 0xf ]; + aHexStr.setCharAt(nIndex++, aHexData[ ( mnID2 >> (sal_uInt32) nShift ) & 0xf ]); for( nShift = 28; nShift >= 0; nShift -= 4 ) - *pStr++ = aHexData[ ( mnID3 >> (sal_uInt32) nShift ) & 0xf ]; + aHexStr.setCharAt(nIndex++, aHexData[ ( mnID3 >> (sal_uInt32) nShift ) & 0xf ]); for( nShift = 28; nShift >= 0; nShift -= 4 ) - *pStr++ = aHexData[ ( mnID4 >> (sal_uInt32) nShift ) & 0xf ]; + aHexStr.setCharAt(nIndex++, aHexData[ ( mnID4 >> (sal_uInt32) nShift ) & 0xf ]); - return aHexStr; + return aHexStr.makeStringAndClear(); } // --------------------- |