hwpfilter/source/hpara.cxx |   18 +++++++++---------
 hwpfilter/source/hpara.h   |   13 -------------
 2 files changed, 9 insertions(+), 22 deletions(-)

New commits:
commit 9a9d955f7bbcedb7921345a107f4aec5128c1c43
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sat Jul 23 20:40:33 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Sun Jul 24 20:37:40 2022 +0200

    ofz#49217 height_sp member, etc unused
    
    massif peak from 37.10MB to 28.16MB
    
    Change-Id: I3d773637cee4243f235a4784e29a066d2c8b747a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137384
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/hwpfilter/source/hpara.cxx b/hwpfilter/source/hpara.cxx
index 52e13b829744..4cddf7d76ad7 100644
--- a/hwpfilter/source/hpara.cxx
+++ b/hwpfilter/source/hpara.cxx
@@ -31,30 +31,30 @@
 
 void LineInfo::Read(HWPFile & hwpf, HWPPara const *pPara)
 {
-    if (!hwpf.Read2b(pos))
-        return;
     unsigned short tmp16;
     if (!hwpf.Read2b(tmp16))
         return;
-    space_width = tmp16;
+    // unused field is "pos" "Starting character position"
+    if (!hwpf.Read2b(tmp16))
+        return;
+    // unused field is "space_width"
     if (!hwpf.Read2b(tmp16))
         return;
-    height = tmp16;
-// internal information
+    // unused field is "height"
+    // internal information
     if (!hwpf.Read2b(tmp16))
         return;
     pgy = tmp16;
     if (!hwpf.Read2b(tmp16))
         return;
-    sx = tmp16;
+    // unused field is "sx"
     if (!hwpf.Read2b(tmp16))
         return;
-    psx = tmp16;
+    // unused field is "psx"
     if (!hwpf.Read2b(tmp16))
         return;
-    pex = tmp16;
-    height_sp = 0;
 
+    hunit pex = tmp16;
     if( pex >> 15 & 0x01 )
     {
         if (pex & 0x01)
diff --git a/hwpfilter/source/hpara.h b/hwpfilter/source/hpara.h
index fcf1681715b7..53c35a2ccb7f 100644
--- a/hwpfilter/source/hpara.h
+++ b/hwpfilter/source/hpara.h
@@ -57,20 +57,7 @@ class HWPPara;
 
 struct LineInfo
 {
-/* the position of the starting character: the control has a different length 
*/
-/**
- * Starting character position
- */
-    unsigned short    pos;
-    hunit         space_width;
-    hunit         height;
     hunit         pgy;                            /* internal */
-    hunit         sx;                             /* internal */
-    hunit         psx;                            /* internal */
-    hunit         pex;                            /* internal */
-// for formatting
-    hunit         height_sp;
-    unsigned short    softbreak;                  // column, page, section
 
     void  Read(HWPFile &hwpf, HWPPara const *para);
 };

Reply via email to