sw/source/filter/html/htmlcss1.cxx | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-)
New commits: commit f244961d1ff2df1e50980e116f95c312089bc8ce Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sat Jul 3 21:19:24 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sun Jul 4 16:52:14 2021 +0200 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 <caol...@redhat.com> 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); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits