diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-03-07 09:34:58 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-03-07 10:01:14 +0000 |
commit | f736175749bd030e1f8473e84ee070b9cc4eef3b (patch) | |
tree | 4ded00cac3c5eba23a7ac3b5fc4a4a57608bb239 /editeng | |
parent | a32e5162bc5719fc37ba4a9831bc063a097c4d02 (diff) |
Resolves: coverity#1402073 Mixing enum types
Change-Id: Ifb8ca51cd8937b740c810083b45d5e7fbb06d91f
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/items/textitem.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index 2b62129853d8..2a21c0c194f0 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -513,7 +513,7 @@ bool SvxPostureItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const rVal <<= (bool)GetBoolValue(); break; case MID_POSTURE: - rVal <<= (awt::FontSlant)GetValue(); // values from awt::FontSlant and FontItalic are equal + rVal <<= VCLUnoHelper::ConvertFontSlant(GetValue()); break; } return true; @@ -538,25 +538,22 @@ bool SvxPostureItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) eSlant = (awt::FontSlant)nValue; } - SetValue((FontItalic)eSlant); + SetValue(VCLUnoHelper::ConvertFontSlant(eSlant)); } } return true; } - bool SvxPostureItem::HasBoolValue() const { return true; } - bool SvxPostureItem::GetBoolValue() const { return ( GetValue() >= ITALIC_OBLIQUE ); } - void SvxPostureItem::SetBoolValue( bool bVal ) { SetValue( bVal ? ITALIC_NORMAL : ITALIC_NONE ); |