[Libreoffice-commits] core.git: hwpfilter/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu Jul 1 07:47:42 UTC 2021


 hwpfilter/source/hwpfile.cxx |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 123a3ccacdb30dce0733212f35dea738bcafb747
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jun 30 21:08:46 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Jul 1 09:47:09 2021 +0200

    getParaShape() adds bounds checking we don't need in this case
    
    Change-Id: I02f917169fcae0dc5bdfc55653cd21fe67eac9c1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118200
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx
index 4c79a6c1211f..6e04d8f67429 100644
--- a/hwpfilter/source/hwpfile.cxx
+++ b/hwpfilter/source/hwpfile.cxx
@@ -624,7 +624,6 @@ int HWPFile::compareCharShape(CharShape const *shape)
     return 0;
 }
 
-
 int HWPFile::compareParaShape(ParaShape const *shape)
 {
     int count = pslist.size();
@@ -632,7 +631,7 @@ int HWPFile::compareParaShape(ParaShape const *shape)
     {
         for(int i = 0; i< count; i++)
         {
-            ParaShape *pshape = getParaShape(i);
+            ParaShape *pshape = pslist[i].get();
             if( shape->left_margin == pshape->left_margin &&
                 shape->right_margin == pshape->right_margin &&
                 shape->pspacing_prev == pshape->pspacing_prev &&
@@ -661,7 +660,6 @@ int HWPFile::compareParaShape(ParaShape const *shape)
     return 0;
 }
 
-
 HWPFile *GetCurrentDoc()
 {
     return HWPFile::cur_doc;


More information about the Libreoffice-commits mailing list