diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-11-03 21:15:48 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-11-03 21:28:24 +0100 |
commit | d85108355c1802c7aed1ef1d9a19f6c633c4a0f8 (patch) | |
tree | bf5547132a44ceea5623a2943fe090a8c6ec3388 /sc/source | |
parent | 1459ffdffee61f3c4a552a28c5aa43facb3f4fcf (diff) |
tdf#120703 PVS: V547 Expression is always true/false
Change-Id: I27bf92770431f6a1f35e1c8224c0847555a8d43f
Reviewed-on: https://gerrit.libreoffice.org/62819
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/view/formatsh.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index d931d387af3b..0ee2c0e65925 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -2020,7 +2020,7 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet ) SvtScriptType nScript = SvtScriptType::NONE; // GetSelectionScriptType never returns 0 if ( rSet.GetItemState( ATTR_FONT ) != SfxItemState::UNKNOWN ) { - if (nScript == SvtScriptType::NONE) nScript = pTabViewShell->GetSelectionScriptType(); + nScript = pTabViewShell->GetSelectionScriptType(); ScViewUtil::PutItemScript( rSet, rAttrSet, ATTR_FONT, nScript ); } if ( rSet.GetItemState( ATTR_FONT_HEIGHT ) != SfxItemState::UNKNOWN ) @@ -2237,7 +2237,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) SvtScriptType nScript = SvtScriptType::NONE; // GetSelectionScriptType never returns 0 if ( rSet.GetItemState( ATTR_FONT_WEIGHT ) != SfxItemState::UNKNOWN ) { - if (nScript == SvtScriptType::NONE) nScript = pTabViewShell->GetSelectionScriptType(); + nScript = pTabViewShell->GetSelectionScriptType(); ScViewUtil::PutItemScript( rSet, rAttrSet, ATTR_FONT_WEIGHT, nScript ); } if ( rSet.GetItemState( ATTR_FONT_POSTURE ) != SfxItemState::UNKNOWN ) |