summaryrefslogtreecommitdiffstats
path: root/vcl/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-08-07 09:13:47 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-08-07 16:14:45 +0100
commitaac04652fda01b0299e17087b151f07d6115e894 (patch)
tree26a71ba651eb138d81f538b0d43b66f8da8e305d /vcl/source
parentmove UniString::GetQuotedToken to sc, you can keep it (diff)
downloadcore-aac04652fda01b0299e17087b151f07d6115e894.tar.gz
core-aac04652fda01b0299e17087b151f07d6115e894.zip
String::AllocBuffer replacements
Change-Id: I278cd66fb4819721bb473796c28598aaf04eb123
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/gdi/cvtsvm.cxx14
1 files changed, 3 insertions, 11 deletions
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index f4a0152b4b88..feaeaddbd293 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -302,18 +302,14 @@ void ImplWriteRasterOpAction( SvStream& rOStm, sal_Int16 nRasterOp )
sal_Bool ImplWriteUnicodeComment( SvStream& rOStm, const String& rString )
{
- xub_StrLen i, nStringLen = rString.Len();
+ xub_StrLen nStringLen = rString.Len();
if ( nStringLen )
{
sal_uInt32 nSize = ( nStringLen << 1 ) + 4;
sal_uInt16 nType = GDI_UNICODE_COMMENT;
rOStm << nType << nSize;
- for ( i = 0; i < nStringLen; i++ )
- {
- sal_Unicode nUni = rString.GetChar( i );
- rOStm << nUni;
- }
+ write_uInt16s_FromOUString(rOStm, rString);
}
return nStringLen != 0;
}
@@ -336,11 +332,7 @@ void ImplReadUnicodeComment( sal_uInt32 nStrmPos, SvStream& rIStm, String& rStri
nStringLen = sal::static_int_cast<xub_StrLen>(( nActionSize - 4 ) >> 1);
if ( nStringLen && ( nType == GDI_UNICODE_COMMENT ) )
- {
- sal_Unicode* pBuffer = rString.AllocBuffer( nStringLen );
- while ( nStringLen-- )
- rIStm >> *pBuffer++;
- }
+ rString = read_uInt16s_ToOUString(rIStm, nStringLen);
}
rIStm.Seek( nOld );
}