diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-07-01 09:52:06 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-07-01 12:27:44 +0200 |
commit | 57ad52ce8037ce24b4d0a0019e5089c03b90f3c8 (patch) | |
tree | 5c1a0d173bacd3616e60a9794b26c589a004d0bd /hwpfilter | |
parent | 567922d076cfaf90c11c32c34e8a4955c9248b9b (diff) |
can flatten this a level
Change-Id: I71742038c2a2ac8e335a404e99f5412430c0ff8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118212
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'hwpfilter')
-rw-r--r-- | hwpfilter/source/hwpfile.cxx | 45 |
1 files changed, 21 insertions, 24 deletions
diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx index 3a2d2c282e9b..29f25cb39e08 100644 --- a/hwpfilter/source/hwpfile.cxx +++ b/hwpfilter/source/hwpfile.cxx @@ -630,33 +630,30 @@ int HWPFile::compareParaShape(const ParaShape* shape) return 0; int count = pslist.size(); - if (count > 0) + for (int i = 0; i < count; ++i) { - for (int i = 0; i < count; ++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 && + shape->pspacing_next == pshape->pspacing_next && + shape->indent == pshape->indent && + shape->lspacing == pshape->lspacing && + shape->arrange_type == pshape->arrange_type && + shape->outline == pshape->outline && + shape->pagebreak == pshape->pagebreak) { - ParaShape *pshape = pslist[i].get(); - if (shape->left_margin == pshape->left_margin && - shape->right_margin == pshape->right_margin && - shape->pspacing_prev == pshape->pspacing_prev && - shape->pspacing_next == pshape->pspacing_next && - shape->indent == pshape->indent && - shape->lspacing == pshape->lspacing && - shape->arrange_type == pshape->arrange_type && - shape->outline == pshape->outline && - shape->pagebreak == pshape->pagebreak) + if (pshape->cshape && + shape->cshape->size == pshape->cshape->size && + shape->cshape->font[0] == pshape->cshape->font[0] && + shape->cshape->ratio[0] == pshape->cshape->ratio[0] && + shape->cshape->space[0] == pshape->cshape->space[0] && + shape->cshape->color[1] == pshape->cshape->color[1] && + shape->cshape->color[0] == pshape->cshape->color[0] && + shape->cshape->shade == pshape->cshape->shade && + shape->cshape->attr == pshape->cshape->attr) { - if (pshape->cshape && - shape->cshape->size == pshape->cshape->size && - shape->cshape->font[0] == pshape->cshape->font[0] && - shape->cshape->ratio[0] == pshape->cshape->ratio[0] && - shape->cshape->space[0] == pshape->cshape->space[0] && - shape->cshape->color[1] == pshape->cshape->color[1] && - shape->cshape->color[0] == pshape->cshape->color[0] && - shape->cshape->shade == pshape->cshape->shade && - shape->cshape->attr == pshape->cshape->attr) - { - return pshape->index; - } + return pshape->index; } } } |