diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-19 08:12:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-19 10:02:39 +0200 |
commit | 2c1b7e8d6a7fa22cb91919238418816671c3a497 (patch) | |
tree | 6f356017d24dffcd25261295ab25a21b738dc835 /oox/source/drawingml/textparagraph.cxx | |
parent | ad18bb24d51e4f735085d50c496d28bd637dbb0b (diff) |
clang-tidy readability-container-size-empty
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422
Reviewed-on: https://gerrit.libreoffice.org/61967
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox/source/drawingml/textparagraph.cxx')
-rw-r--r-- | oox/source/drawingml/textparagraph.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/oox/source/drawingml/textparagraph.cxx b/oox/source/drawingml/textparagraph.cxx index 5c8143dbd673..39d298612882 100644 --- a/oox/source/drawingml/textparagraph.cxx +++ b/oox/source/drawingml/textparagraph.cxx @@ -70,7 +70,7 @@ TextParagraphPropertiesPtr TextParagraph::getParagraphStyle( if (nLevel >= static_cast< sal_Int16 >(rListStyle.size())) nLevel = 0; TextParagraphPropertiesPtr pTextParagraphStyle; - if (rListStyle.size()) + if (!rListStyle.empty()) pTextParagraphStyle = rListStyle[nLevel]; return pTextParagraphStyle; @@ -134,12 +134,12 @@ void TextParagraph::insertAt( aParaProp.apply( maProperties ); // bullets have same color as following texts by default - if( !aioBulletList.hasProperty( PROP_BulletColor ) && maRuns.size() > 0 + if( !aioBulletList.hasProperty( PROP_BulletColor ) && !maRuns.empty() && (*maRuns.begin())->getTextCharacterProperties().maFillProperties.moFillType.has() ) aioBulletList.setProperty( PROP_BulletColor, (*maRuns.begin())->getTextCharacterProperties().maFillProperties.getBestSolidColor().getColor( rFilterBase.getGraphicHelper() )); if( !aioBulletList.hasProperty( PROP_BulletColor ) && aTextCharacterStyle.maFillProperties.moFillType.has() ) aioBulletList.setProperty( PROP_BulletColor, aTextCharacterStyle.maFillProperties.getBestSolidColor().getColor( rFilterBase.getGraphicHelper() )); - if( !aioBulletList.hasProperty( PROP_GraphicSize ) && maRuns.size() > 0 + if( !aioBulletList.hasProperty( PROP_GraphicSize ) && !maRuns.empty() && aParaProp.getBulletList().maGraphic.hasValue()) { long nFirstCharHeightMm = TransformMetric(nCharHeightFirst > 0 ? nCharHeightFirst : 1200, FUNIT_POINT, FUNIT_MM); |