summaryrefslogtreecommitdiff
path: root/hwpfilter/source/htags.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-01-25 14:08:19 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-01-26 09:54:30 +0100
commit90948976a557c49ec5e971b8ba6d8e62c58b6c7e (patch)
tree9f06cdeccd3c57051fec79e6171d535099440dff /hwpfilter/source/htags.cxx
parent853e3fb639a540b2a452ee7116ae61e7b581f8fd (diff)
drop the slow path
Change-Id: Ibf9721d852c1b57593e34272214d9f11c0188016 Reviewed-on: https://gerrit.libreoffice.org/48611 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'hwpfilter/source/htags.cxx')
-rw-r--r--hwpfilter/source/htags.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/hwpfilter/source/htags.cxx b/hwpfilter/source/htags.cxx
index f9952e009f8b..0c011731c1d4 100644
--- a/hwpfilter/source/htags.cxx
+++ b/hwpfilter/source/htags.cxx
@@ -27,11 +27,12 @@
bool HyperText::Read(HWPFile& hwpf)
{
- size_t nRead = hwpf.Read1b(filename, 256);
+ size_t nRead = hwpf.ReadBlock(filename, 256);
nRead += hwpf.Read2b(bookmark, 16);
- nRead += hwpf.Read1b(macro, 325);
- nRead += hwpf.Read1b(&type, 1);
- nRead += hwpf.Read1b(reserve, 3);
+ nRead += hwpf.ReadBlock(macro, 325);
+ if (hwpf.Read1b(type))
+ ++nRead;
+ nRead += hwpf.ReadBlock(reserve, 3);
if( type == 2 )
{
for( int i = 1; i < 256; i++)
@@ -61,8 +62,8 @@ bool EmPicture::Read(HWPFile & hwpf)
{
if (size == 0)
return false;
- hwpf.Read1b(name, 16);
- hwpf.Read1b(type, 16);
+ hwpf.ReadBlock(name, 16);
+ hwpf.ReadBlock(type, 16);
name[0] = 'H';
name[1] = 'W';
name[2] = 'P';