diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-07-03 21:19:24 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-07-04 16:52:14 +0200 |
commit | f244961d1ff2df1e50980e116f95c312089bc8ce (patch) | |
tree | ee5526818d8301220c4d08d2c98df0168470b5f3 /sw/source/filter/html/htmlcss1.cxx | |
parent | 3ebee45e504abac356d68a4a79ee7a644e6c106d (diff) |
tidy lcl_swcss1_setEncoding a little
no logic change intended
Change-Id: Id82fb83d0947a838f2c2970a073712d221e5ed92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118364
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/filter/html/htmlcss1.cxx')
-rw-r--r-- | sw/source/filter/html/htmlcss1.cxx | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index b33ee8bdd3e0..f241b396dfce 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -2277,21 +2277,19 @@ static void lcl_swcss1_setEncoding( SwFormat& rFormat, rtl_TextEncoding eEnc ) const SfxItemSet& rItemSet = rFormat.GetAttrSet(); static const sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, - RES_CHRATR_CTL_FONT }; + RES_CHRATR_CTL_FONT }; const SfxPoolItem *pItem; - for(sal_uInt16 i : aWhichIds) - { - 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, i); - rFormat.SetFormatAttr( aFont ); - } - } + for (sal_uInt16 i : aWhichIds) + { + if (SfxItemState::SET != rItemSet.GetItemState(i, false, &pItem)) + continue; + const SvxFontItem& rFont = *static_cast<const SvxFontItem*>(pItem); + if (RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet()) + continue; + SvxFontItem aFont(rFont.GetFamily(), rFont.GetFamilyName(), + rFont.GetStyleName(), rFont.GetPitch(), + eEnc, i); + rFormat.SetFormatAttr(aFont); } } |