summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-07-22 14:52:58 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-07-22 14:53:25 +0100
commita64c48f523d148cd4750bc9bd26d2349fc8a3c7c (patch)
tree07dbaafdc5800aa3afbc6c1306a55bb69df0d3ed /sw
parentcbea6a709f33babfb490ab1bd07cde8cc08114ac (diff)
read block in one swoop, rather than char by char
Change-Id: Ic879c096c6b3167a123cee352361da6c39e57de2
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx18
1 files changed, 4 insertions, 14 deletions
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 1dc880658785..0c2ad80c87eb 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -3889,13 +3889,8 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen
{
if (pExtraArray)
{
- ww::bytes extraData;
- for (sal_uInt16 j = 0; j < nExtraLen; ++j)
- {
- sal_uInt8 iTmp(0);
- rStrm.ReadUChar( iTmp );
- extraData.push_back(iTmp);
- }
+ ww::bytes extraData(nExtraLen);
+ rStrm.Read(extraData.data(), nExtraLen);
pExtraArray->push_back(extraData);
}
else
@@ -3950,13 +3945,8 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen
{
if (pExtraArray)
{
- ww::bytes extraData;
- for (sal_uInt16 i=0;i < nExtraLen;++i)
- {
- sal_uInt8 iTmp(0);
- rStrm.ReadUChar( iTmp );
- extraData.push_back(iTmp);
- }
+ ww::bytes extraData(nExtraLen);
+ rStrm.Read(extraData.data(), nExtraLen);
pExtraArray->push_back(extraData);
}
else