24#include <rtl/ustrbuf.hxx>
25#include <osl/diagnose.h>
27#include <com/sun/star/awt/FontStrikeout.hpp>
28#include <com/sun/star/uno/Any.hxx>
36 {
XML_NONE, awt::FontStrikeout::NONE },
47 {
XML_NONE, awt::FontStrikeout::NONE },
48 {
XML_SOLID, awt::FontStrikeout::SINGLE },
49 {
XML_SOLID, awt::FontStrikeout::DOUBLE },
54 {
XML_DASH, awt::FontStrikeout::SINGLE },
58 {
XML_WAVE, awt::FontStrikeout::SINGLE },
64 {
XML_AUTO, awt::FontStrikeout::NONE },
65 {
XML_AUTO, awt::FontStrikeout::SINGLE },
66 {
XML_AUTO, awt::FontStrikeout::DOUBLE },
67 {
XML_BOLD, awt::FontStrikeout::BOLD },
68 {
XML_AUTO, awt::FontStrikeout::SLASH },
70 {
XML_THIN, awt::FontStrikeout::NONE },
84 sal_uInt16 eNewStrikeout = 0;
91 sal_Int16 eStrikeout = sal_Int16();
92 if( (rValue >>= eStrikeout) && awt::FontStrikeout::NONE!=eStrikeout )
94 switch( eNewStrikeout )
96 case awt::FontStrikeout::NONE:
97 case awt::FontStrikeout::SINGLE:
99 eNewStrikeout = eStrikeout;
101 case awt::FontStrikeout::DOUBLE:
107 case awt::FontStrikeout::SINGLE:
108 case awt::FontStrikeout::BOLD:
113 eNewStrikeout = eStrikeout;
118 OSL_ENSURE( bRet,
"unexpected line type value" );
121 if( eNewStrikeout != eStrikeout )
122 rValue <<= static_cast<sal_Int16>(eNewStrikeout);
126 rValue <<= static_cast<sal_Int16>(eNewStrikeout);
136 sal_uInt16
nValue = sal_uInt16();
144 rStrExpValue = aOut.makeStringAndClear();
158 sal_uInt16 eNewStrikeout(0);
165 sal_Int16 eStrikeout = sal_Int16();
166 if( (rValue >>= eStrikeout) && awt::FontStrikeout::NONE!=eStrikeout )
173 rValue <<= static_cast<sal_Int16>(eNewStrikeout);
183 sal_uInt16
nValue = sal_uInt16();
191 rStrExpValue = aOut.makeStringAndClear();
205 sal_uInt16 eNewStrikeout = 0;
212 sal_Int16 eStrikeout = sal_Int16();
213 if( (rValue >>= eStrikeout) && awt::FontStrikeout::NONE!=eStrikeout )
215 switch( eNewStrikeout )
217 case awt::FontStrikeout::NONE:
219 eNewStrikeout = eStrikeout;
221 case awt::FontStrikeout::BOLD:
224 case awt::FontStrikeout::SINGLE:
229 eNewStrikeout = eStrikeout;
234 OSL_ENSURE( bRet,
"unexpected line type value" );
237 if( eNewStrikeout != eStrikeout )
238 rValue <<= static_cast<sal_Int16>(eNewStrikeout);
242 rValue <<= static_cast<sal_Int16>(eNewStrikeout);
252 sal_uInt16
nValue = sal_uInt16();
254 if( (rValue >>=
nValue) && (awt::FontStrikeout::BOLD ==
nValue) )
260 rStrExpValue = aOut.makeStringAndClear();
276 if( !rStrImpValue.isEmpty() )
278 sal_Int16 eStrikeout = (
'/' == rStrImpValue[0]
279 ? awt::FontStrikeout::SLASH
280 : awt::FontStrikeout::X);
281 rValue <<= eStrikeout;
291 sal_Int16
nValue = sal_Int16();
293 if( (rValue >>=
nValue) &&
294 (awt::FontStrikeout::SLASH ==
nValue || awt::FontStrikeout::X ==
nValue) )
296 rStrExpValue = OUString(
SvXMLEnumMapEntry< sal_uInt16 > const pXML_CrossedoutStyle_Enum[]
SvXMLEnumMapEntry< sal_uInt16 > const pXML_CrossedoutType_Enum[]
SvXMLEnumMapEntry< sal_uInt16 > const pXML_CrossedoutWidth_Enum[]
the SvXMLTypeConverter converts values of various types from their internal representation to the tex...
static bool convertEnum(EnumT &rEnum, std::u16string_view rValue, const SvXMLEnumMapEntry< EnumT > *pMap)
convert string to enum using given enum map, if the enum is not found in the map, this method will re...
virtual ~XMLCrossedOutStylePropHdl() override
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Imports the given value according to the XML-data-type corresponding to the derived class.
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Exports the given value according to the XML-data-type corresponding to the derived class.
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Exports the given value according to the XML-data-type corresponding to the derived class.
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Imports the given value according to the XML-data-type corresponding to the derived class.
virtual ~XMLCrossedOutTextPropHdl() override
virtual ~XMLCrossedOutTypePropHdl() override
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Exports the given value according to the XML-data-type corresponding to the derived class.
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Imports the given value according to the XML-data-type corresponding to the derived class.
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Exports the given value according to the XML-data-type corresponding to the derived class.
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Imports the given value according to the XML-data-type corresponding to the derived class.
virtual ~XMLCrossedOutWidthPropHdl() override
Handling of tokens in XML: