summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-02 12:35:41 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-04-02 16:31:48 +0000
commit2f33a8cd231d3842a1e5521e3a61d8e73517137b (patch)
tree184c69d8545ce64cfc1c9e25fe4df9319eb252f4 /xmloff
parentfb41ebff32371ee7a7e07f671f7c769a8bb18718 (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 'xmloff')
-rw-r--r--xmloff/source/style/postuhdl.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmloff/source/style/postuhdl.cxx b/xmloff/source/style/postuhdl.cxx
index a40a9ceeb578..fd6e0f6336a7 100644
--- a/xmloff/source/style/postuhdl.cxx
+++ b/xmloff/source/style/postuhdl.cxx
@@ -24,6 +24,7 @@
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/awt/FontSlant.hpp>
#include <tools/fontenum.hxx>
+#include <vcl/unohelp.hxx>
using namespace ::com::sun::star;
using namespace ::xmloff::token;
@@ -50,7 +51,7 @@ bool XMLPosturePropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValu
FontItalic ePosture;
bool bRet = SvXMLUnitConverter::convertEnum( ePosture, rStrImpValue, aPostureGenericMapping );
if( bRet )
- rValue <<= (awt::FontSlant)ePosture;
+ rValue <<= vcl::unohelper::ConvertFontSlant(ePosture);
return bRet;
}
@@ -70,7 +71,7 @@ bool XMLPosturePropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValu
}
OUStringBuffer aOut;
- bool bRet = SvXMLUnitConverter::convertEnum( aOut, (FontItalic)eSlant, aPostureGenericMapping );
+ bool bRet = SvXMLUnitConverter::convertEnum(aOut, vcl::unohelper::ConvertFontSlant(eSlant), aPostureGenericMapping);
if( bRet )
rStrExpValue = aOut.makeStringAndClear();