diff options
-rw-r--r-- | include/xmloff/xmlement.hxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/xmloff/xmlement.hxx b/include/xmloff/xmlement.hxx index 5a149f6335ad..066a99c4edbc 100644 --- a/include/xmloff/xmlement.hxx +++ b/include/xmloff/xmlement.hxx @@ -39,8 +39,10 @@ public: SvXMLEnumMapEntry(::xmloff::token::XMLTokenEnum eToken_, EnumT nValue_) : eToken(eToken_), nValue(static_cast<sal_uInt16>(nValue_)) {} ::xmloff::token::XMLTokenEnum GetToken() const { return eToken; } + sal_uInt16 GetValue() const { return nValue; } }; +#if defined(_MSC_VER) // specialisation to avoid lots of "C2398: conversion from 'const sal_Int16' to 'sal_uInt16' requires a narrowing conversion" // errors when compiling on MSVC template<> @@ -55,6 +57,7 @@ public: ::xmloff::token::XMLTokenEnum GetToken() const { return eToken; } sal_uInt16 GetValue() const { return nValue; } }; +#endif #define ENUM_STRING_MAP_ENTRY(name,tok) { name, sizeof(name)-1, tok } |