diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-04-02 12:35:41 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-04-02 16:31:48 +0000 |
commit | 2f33a8cd231d3842a1e5521e3a61d8e73517137b (patch) | |
tree | 184c69d8545ce64cfc1c9e25fe4df9319eb252f4 /editeng | |
parent | fb41ebff32371ee7a7e07f671f7c769a8bb18718 (diff) |
coverity#1403662 Mixing enum types
Change-Id: Ic5e797c65dfc736a9ef0ab14f3ae563216143947
Reviewed-on: https://gerrit.libreoffice.org/36020
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/items/textitem.cxx | 10 | ||||
-rw-r--r-- | editeng/source/uno/unofdesc.cxx | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index 597086e3a4d7..72fc2c210f66 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -22,11 +22,11 @@ #include <com/sun/star/frame/status/FontHeight.hpp> #include <vcl/bitmapex.hxx> #include <tools/stream.hxx> -#include <toolkit/helper/vclunohelper.hxx> #include <math.h> #include <rtl/math.hxx> #include <unotools/fontdefs.hxx> #include <vcl/outdev.hxx> +#include <vcl/unohelp.hxx> #include <editeng/eeitem.hxx> #include <svtools/unitconv.hxx> @@ -512,7 +512,7 @@ bool SvxPostureItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const rVal <<= (bool)GetBoolValue(); break; case MID_POSTURE: - rVal <<= VCLUnoHelper::ConvertFontSlant(GetValue()); + rVal <<= vcl::unohelper::ConvertFontSlant(GetValue()); break; } return true; @@ -537,7 +537,7 @@ bool SvxPostureItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) eSlant = (awt::FontSlant)nValue; } - SetValue(VCLUnoHelper::ConvertFontSlant(eSlant)); + SetValue(vcl::unohelper::ConvertFontSlant(eSlant)); } } return true; @@ -649,7 +649,7 @@ bool SvxWeightItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const break; case MID_WEIGHT: { - rVal <<= (float)( VCLUnoHelper::ConvertFontWeight( GetValue() ) ); + rVal <<= (float)( vcl::unohelper::ConvertFontWeight( GetValue() ) ); } break; } @@ -674,7 +674,7 @@ bool SvxWeightItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) return false; fValue = (float)nValue; } - SetValue( VCLUnoHelper::ConvertFontWeight((float)fValue) ); + SetValue( vcl::unohelper::ConvertFontWeight((float)fValue) ); } break; } diff --git a/editeng/source/uno/unofdesc.cxx b/editeng/source/uno/unofdesc.cxx index 48dbeb4ddcc9..3d0b90ed3d02 100644 --- a/editeng/source/uno/unofdesc.cxx +++ b/editeng/source/uno/unofdesc.cxx @@ -21,7 +21,6 @@ #include <editeng/eeitem.hxx> #include <com/sun/star/uno/Any.hxx> -#include <toolkit/helper/vclunohelper.hxx> #include <editeng/fontitem.hxx> #include <editeng/fhgtitem.hxx> #include <editeng/postitem.hxx> @@ -31,6 +30,7 @@ #include <editeng/wrlmitem.hxx> #include <editeng/memberids.hrc> #include <svl/itempool.hxx> +#include <vcl/unohelp.hxx> #include <editeng/unofdesc.hxx> #include <editeng/svxfont.hxx> @@ -48,7 +48,7 @@ void SvxUnoFontDescriptor::ConvertToFont( const awt::FontDescriptor& rDesc, vcl: rFont.SetPitch( (FontPitch)rDesc.Pitch ); rFont.SetOrientation( (short)(rDesc.Orientation*10) ); rFont.SetKerning( rDesc.Kerning ? FontKerning::FontSpecific : FontKerning::NONE ); - rFont.SetWeight( VCLUnoHelper::ConvertFontWeight(rDesc.Weight) ); + rFont.SetWeight( vcl::unohelper::ConvertFontWeight(rDesc.Weight) ); rFont.SetItalic( (FontItalic)rDesc.Slant ); rFont.SetUnderline( (FontLineStyle)rDesc.Underline ); rFont.SetStrikeout( (FontStrikeout)rDesc.Strikeout ); @@ -66,8 +66,8 @@ void SvxUnoFontDescriptor::ConvertFromFont( const vcl::Font& rFont, awt::FontDes rDesc.Pitch = sal::static_int_cast< sal_Int16 >(rFont.GetPitch()); rDesc.Orientation = static_cast< float >(rFont.GetOrientation() / 10); rDesc.Kerning = rFont.IsKerning(); - rDesc.Weight = VCLUnoHelper::ConvertFontWeight( rFont.GetWeight() ); - rDesc.Slant = VCLUnoHelper::ConvertFontSlant( rFont.GetItalic() ); + rDesc.Weight = vcl::unohelper::ConvertFontWeight( rFont.GetWeight() ); + rDesc.Slant = vcl::unohelper::ConvertFontSlant( rFont.GetItalic() ); rDesc.Underline = sal::static_int_cast< sal_Int16 >(rFont.GetUnderline()); rDesc.Strikeout = sal::static_int_cast< sal_Int16 >(rFont.GetStrikeout()); rDesc.WordLineMode = rFont.IsWordLineMode(); |