diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-07-29 16:12:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-07-30 09:59:39 +0200 |
commit | 75f398b22ae14dcf442abf6b1c92a50509565ae5 (patch) | |
tree | 3532d576d4cea3cdf420c8dfa662c876b57e1428 /sc/source/core/data/patattr.cxx | |
parent | 0c311bfbf67441823f8b3916db963e2680e9eb43 (diff) |
loplugin:flatten in sc/core/data
Change-Id: I9ffe58d68172c6fe9c76000c01c0c67a03967146
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99699
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/core/data/patattr.cxx')
-rw-r--r-- | sc/source/core/data/patattr.cxx | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx index 005cfe23fc3e..eba3bcddd464 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -855,37 +855,37 @@ void ScPatternAttr::GetFromEditItemSet( SfxItemSet& rDestSet, const SfxItemSet& if (rEditSet.GetItemState(EE_CHAR_LANGUAGE_CTL,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxLanguageItem(static_cast<const SvxLanguageItem*>(pItem)->GetValue(), ATTR_CTL_FONT_LANGUAGE) ); - if (rEditSet.GetItemState(EE_PARA_JUST,true,&pItem) == SfxItemState::SET) + if (rEditSet.GetItemState(EE_PARA_JUST,true,&pItem) != SfxItemState::SET) + return; + + SvxCellHorJustify eVal; + switch ( static_cast<const SvxAdjustItem*>(pItem)->GetAdjust() ) { - SvxCellHorJustify eVal; - switch ( static_cast<const SvxAdjustItem*>(pItem)->GetAdjust() ) - { - case SvxAdjust::Left: - // EditEngine Default is always set in the GetAttribs() ItemSet ! - // whether left or right, is decided in text / number - eVal = SvxCellHorJustify::Standard; - break; - case SvxAdjust::Right: - eVal = SvxCellHorJustify::Right; - break; - case SvxAdjust::Block: - eVal = SvxCellHorJustify::Block; - break; - case SvxAdjust::Center: - eVal = SvxCellHorJustify::Center; - break; - case SvxAdjust::BlockLine: - eVal = SvxCellHorJustify::Block; - break; - case SvxAdjust::End: - eVal = SvxCellHorJustify::Right; - break; - default: - eVal = SvxCellHorJustify::Standard; - } - if ( eVal != SvxCellHorJustify::Standard ) - rDestSet.Put( SvxHorJustifyItem( eVal, ATTR_HOR_JUSTIFY) ); + case SvxAdjust::Left: + // EditEngine Default is always set in the GetAttribs() ItemSet ! + // whether left or right, is decided in text / number + eVal = SvxCellHorJustify::Standard; + break; + case SvxAdjust::Right: + eVal = SvxCellHorJustify::Right; + break; + case SvxAdjust::Block: + eVal = SvxCellHorJustify::Block; + break; + case SvxAdjust::Center: + eVal = SvxCellHorJustify::Center; + break; + case SvxAdjust::BlockLine: + eVal = SvxCellHorJustify::Block; + break; + case SvxAdjust::End: + eVal = SvxCellHorJustify::Right; + break; + default: + eVal = SvxCellHorJustify::Standard; } + if ( eVal != SvxCellHorJustify::Standard ) + rDestSet.Put( SvxHorJustifyItem( eVal, ATTR_HOR_JUSTIFY) ); } void ScPatternAttr::GetFromEditItemSet( const SfxItemSet* pEditSet ) |