[Libreoffice-commits] core.git: sw/source
Caolán McNamara
caolanm at redhat.com
Wed Jul 22 06:54:52 PDT 2015
sw/source/filter/ww8/ww8scan.cxx | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
New commits:
commit a64c48f523d148cd4750bc9bd26d2349fc8a3c7c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jul 22 14:52:58 2015 +0100
read block in one swoop, rather than char by char
Change-Id: Ic879c096c6b3167a123cee352361da6c39e57de2
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 1dc8806..0c2ad80 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
More information about the Libreoffice-commits
mailing list