XMLCrossedOutTypePropHdl::~XMLCrossedOutTypePropHdl()
{ // nothing to do
}
bool XMLCrossedOutTypePropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& ) const
{
sal_uInt16 eNewStrikeout = 0; bool bRet = SvXMLUnitConverter::convertEnum(
eNewStrikeout, rStrImpValue, pXML_CrossedoutType_Enum ); if( bRet )
{ // multi property: style and width might be set already. // If the old value is NONE, the new is used unchanged.
sal_Int16 eStrikeout = sal_Int16(); if( (rValue >>= eStrikeout) && awt::FontStrikeout::NONE!=eStrikeout )
{ switch( eNewStrikeout )
{ case awt::FontStrikeout::NONE: case awt::FontStrikeout::SINGLE: // keep existing line style
eNewStrikeout = eStrikeout; break; case awt::FontStrikeout::DOUBLE: // A double line style has priority over a solid or a bold // line style, // but not about any other line style switch( eStrikeout )
{ case awt::FontStrikeout::SINGLE: case awt::FontStrikeout::BOLD: break; default: // If a double line style is not supported for the existing // value, keep the new one
eNewStrikeout = eStrikeout; break;
} break; default:
OSL_ENSURE( bRet, "unexpected line type value" ); break;
} if( eNewStrikeout != eStrikeout )
rValue <<= static_cast<sal_Int16>(eNewStrikeout);
} else
{
rValue <<= static_cast<sal_Int16>(eNewStrikeout);
}
}
XMLCrossedOutStylePropHdl::~XMLCrossedOutStylePropHdl()
{ // nothing to do
}
bool XMLCrossedOutStylePropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& ) const
{
sal_uInt16 eNewStrikeout(0); bool bRet = SvXMLUnitConverter::convertEnum(
eNewStrikeout, rStrImpValue, pXML_CrossedoutStyle_Enum ); if( bRet )
{ // multi property: style and width might be set already. // If the old value is NONE, the new is used unchanged.
sal_Int16 eStrikeout = sal_Int16(); if( (rValue >>= eStrikeout) && awt::FontStrikeout::NONE!=eStrikeout )
{ // one NONE a SINGLE are possible new values. For both, the // existing value is kept.
} else
{
rValue <<= static_cast<sal_Int16>(eNewStrikeout);
}
}
XMLCrossedOutWidthPropHdl::~XMLCrossedOutWidthPropHdl()
{ // nothing to do
}
bool XMLCrossedOutWidthPropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& ) const
{
sal_uInt16 eNewStrikeout = 0; bool bRet = SvXMLUnitConverter::convertEnum(
eNewStrikeout, rStrImpValue, pXML_CrossedoutWidth_Enum ); if( bRet )
{ // multi property: style and width might be set already. // If the old value is NONE, the new is used unchanged.
sal_Int16 eStrikeout = sal_Int16(); if( (rValue >>= eStrikeout) && awt::FontStrikeout::NONE!=eStrikeout )
{ switch( eNewStrikeout )
{ case awt::FontStrikeout::NONE: // keep existing line style
eNewStrikeout = eStrikeout; break; case awt::FontStrikeout::BOLD: switch( eStrikeout )
{ case awt::FontStrikeout::SINGLE: break; default: // If a double line style is not supported for the existing // value, keep the new one
eNewStrikeout = eStrikeout; break;
} break; default:
OSL_ENSURE( bRet, "unexpected line type value" ); break;
} if( eNewStrikeout != eStrikeout )
rValue <<= static_cast<sal_Int16>(eNewStrikeout);
} else
{
rValue <<= static_cast<sal_Int16>(eNewStrikeout);
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.