diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-21 15:26:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-22 07:44:07 +0100 |
commit | a3bc9dc51104d01ec203b8e2d5767dd055a42b58 (patch) | |
tree | c91162db37e16ab64ede3686ecc4a3fa473d28ea /hwpfilter | |
parent | 494b3e69fd4bef0af19627cf31da98da376019d0 (diff) |
loplugin:flatten in filter..include
Change-Id: I74c1ea8b9b490eaa9508a885758224063e39051b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127235
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'hwpfilter')
-rw-r--r-- | hwpfilter/source/hwpfile.cxx | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx index 171b7e1a9e8d..5f32a38c0633 100644 --- a/hwpfilter/source/hwpfile.cxx +++ b/hwpfilter/source/hwpfile.cxx @@ -596,23 +596,20 @@ void HWPFile::AddFBoxStyle(FBoxStyle * fbstyle) int HWPFile::compareCharShape(CharShape const *shape) { int count = cslist.size(); - if( count > 0 ) + for(int i = 0; i< count; i++) { - for(int i = 0; i< count; i++) + CharShape *cshape = getCharShape(i); + + if( shape->size == cshape->size && + shape->font[0] == cshape->font[0] && + shape->ratio[0] == cshape->ratio[0] && + shape->space[0] == cshape->space[0] && + shape->color[1] == cshape->color[1] && + shape->color[0] == cshape->color[0] && + shape->shade == cshape->shade && + shape->attr == cshape->attr ) { - CharShape *cshape = getCharShape(i); - - if( shape->size == cshape->size && - shape->font[0] == cshape->font[0] && - shape->ratio[0] == cshape->ratio[0] && - shape->space[0] == cshape->space[0] && - shape->color[1] == cshape->color[1] && - shape->color[0] == cshape->color[0] && - shape->shade == cshape->shade && - shape->attr == cshape->attr ) - { - return cshape->index; - } + return cshape->index; } } return 0; |