summaryrefslogtreecommitdiff
path: root/sw/source/filter/html/htmlcss1.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-11 09:53:50 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-12 07:12:44 +0000
commitb415494bf0468b74318b61f114e2ff4ae68c00ee (patch)
tree432f9397ecf4c410e4e9767f433c60e4dc0b0087 /sw/source/filter/html/htmlcss1.cxx
parent875984617cfd6c773eb93f339929eb3fabd3e97b (diff)
clang-tidy modernize-loop-convert in sw
Change-Id: I1f4a0ad6658bd3154c48940296aa8edc1ea1612c Reviewed-on: https://gerrit.libreoffice.org/24876 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw/source/filter/html/htmlcss1.cxx')
-rw-r--r--sw/source/filter/html/htmlcss1.cxx28
1 files changed, 14 insertions, 14 deletions
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index 392845f4f57d..f78711bea863 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -188,14 +188,14 @@ static void SetCharFormatAttrs( SwCharFormat *pCharFormat, SfxItemSet& rItemSet
const SfxPoolItem *pItem;
static const sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONTSIZE,RES_CHRATR_CJK_FONTSIZE,
RES_CHRATR_CTL_FONTSIZE };
- for( size_t i=0; i<SAL_N_ELEMENTS(aWhichIds); ++i )
+ for(sal_uInt16 i : aWhichIds)
{
- if( SfxItemState::SET == rItemSet.GetItemState( aWhichIds[i], false,
+ if( SfxItemState::SET == rItemSet.GetItemState( i, false,
&pItem ) &&
static_cast<const SvxFontHeightItem *>(pItem)->GetProp() != 100)
{
// %-Angaben beim FontHeight-Item werden nicht unterstuetzt
- rItemSet.ClearItem( aWhichIds[i] );
+ rItemSet.ClearItem( i );
}
}
@@ -319,14 +319,14 @@ static void SetTextCollAttrs( SwTextFormatColl *pColl, SfxItemSet& rItemSet,
static const sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONTSIZE,RES_CHRATR_CJK_FONTSIZE,
RES_CHRATR_CTL_FONTSIZE };
- for( size_t i=0; i<SAL_N_ELEMENTS(aWhichIds); ++i )
+ for(sal_uInt16 i : aWhichIds)
{
- if( SfxItemState::SET == rItemSet.GetItemState( aWhichIds[i], false,
+ if( SfxItemState::SET == rItemSet.GetItemState( i, false,
&pItem ) &&
static_cast<const SvxFontHeightItem *>(pItem)->GetProp() != 100)
{
// %-Angaben beim FontHeight-Item werden nicht unterstuetzt
- rItemSet.ClearItem( aWhichIds[i] );
+ rItemSet.ClearItem( i );
}
}
@@ -423,9 +423,9 @@ void SwCSS1Parser::SetPageDescAttrs( const SvxBrushItem *pBrush,
{
static sal_uInt16 aPoolIds[] = { RES_POOLPAGE_HTML, RES_POOLPAGE_FIRST,
RES_POOLPAGE_LEFT, RES_POOLPAGE_RIGHT };
- for( size_t i=0; i<SAL_N_ELEMENTS(aPoolIds); i++ )
+ for(sal_uInt16 i : aPoolIds)
{
- const SwPageDesc *pPageDesc = GetPageDesc( aPoolIds[i], false );
+ const SwPageDesc *pPageDesc = GetPageDesc( i, false );
if( pPageDesc )
{
SwPageDesc aNewPageDesc( *pPageDesc );
@@ -2293,16 +2293,16 @@ static void lcl_swcss1_setEncoding( SwFormat& rFormat, rtl_TextEncoding eEnc )
static const sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT,
RES_CHRATR_CTL_FONT };
const SfxPoolItem *pItem;
- for( size_t i=0; i<SAL_N_ELEMENTS(aWhichIds); ++i )
+ for(sal_uInt16 i : aWhichIds)
{
- if( SfxItemState::SET == rItemSet.GetItemState( aWhichIds[i], false,&pItem ) )
+ if( SfxItemState::SET == rItemSet.GetItemState( i, false,&pItem ) )
{
const SvxFontItem& rFont = *static_cast<const SvxFontItem *>(pItem);
if( RTL_TEXTENCODING_SYMBOL != rFont.GetCharSet() )
{
SvxFontItem aFont( rFont.GetFamily(), rFont.GetFamilyName(),
rFont.GetStyleName(), rFont.GetPitch(),
- eEnc, aWhichIds[i]);
+ eEnc, i);
rFormat.SetFormatAttr( aFont );
}
}
@@ -2318,15 +2318,15 @@ void SwCSS1Parser::SetDfltEncoding( rtl_TextEncoding eEnc )
// Set new encoding as pool default
static const sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT,
RES_CHRATR_CTL_FONT };
- for( size_t i=0; i<SAL_N_ELEMENTS(aWhichIds); ++i )
+ for(sal_uInt16 i : aWhichIds)
{
const SvxFontItem& rDfltFont =
- static_cast<const SvxFontItem&>(pDoc->GetDefault( aWhichIds[i]));
+ static_cast<const SvxFontItem&>(pDoc->GetDefault( i));
SvxFontItem aFont( rDfltFont.GetFamily(),
rDfltFont.GetFamilyName(),
rDfltFont.GetStyleName(),
rDfltFont.GetPitch(),
- eEnc, aWhichIds[i] );
+ eEnc, i );
pDoc->SetDefault( aFont );
}