summaryrefslogtreecommitdiffstats
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-02-27 22:32:52 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-02-28 10:56:58 +0000
commita18457b29aafc130148dce3fb586c59d6e1f798d (patch)
treea048e0594535341b1d7828b7f46fb0671d403c5d /svtools
parentreplace AllocBuffer in ww8 filter (diff)
downloadcore-a18457b29aafc130148dce3fb586c59d6e1f798d.tar.gz
core-a18457b29aafc130148dce3fb586c59d6e1f798d.zip
use read_uInt16s_ToOUString instead of hand-crafted loop
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/filter/wmf/winwmf.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/svtools/source/filter/wmf/winwmf.cxx b/svtools/source/filter/wmf/winwmf.cxx
index 214dd574bde2..43cf34bd10f9 100644
--- a/svtools/source/filter/wmf/winwmf.cxx
+++ b/svtools/source/filter/wmf/winwmf.cxx
@@ -918,9 +918,8 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
if ( ( static_cast< sal_uInt64 >( nStringLen ) * sizeof( sal_Unicode ) ) < ( nEscLen - aMemoryStream.Tell() ) )
{
- sal_Unicode* pBuf = aString.AllocBuffer( (xub_StrLen)nStringLen );
- for (sal_uInt32 i = 0; i < nStringLen; i++ )
- aMemoryStream >> pBuf[ i ];
+
+ aString = read_uInt16s_ToOUString(aMemoryStream, nStringLen);
aMemoryStream >> nDXCount;
if ( ( static_cast< sal_uInt64 >( nDXCount ) * sizeof( sal_Int32 ) ) >= ( nEscLen - aMemoryStream.Tell() ) )
nDXCount = 0;