Fixed unnecessary strikethrough in hwp conversion

This commit is contained in:
Green
2025-07-03 17:58:31 +03:00
parent a6efd8a374
commit 3d39d5837f
2 changed files with 3 additions and 3 deletions

View File

@ -243,7 +243,7 @@ CRunnerStyle CStyleConverter::GenerateRunnerStyle(const CHWPRecordCharShape& oCh
if (oCharShape.Italic()) if (oCharShape.Italic())
oRunnerStyle.SetItalic(true); oRunnerStyle.SetItalic(true);
if (oCharShape.StrikeOut()) if (oCharShape.StrikeOut() && ELineStyle2::NONE != oCharShape.GetStrikeOutType())
oRunnerStyle.SetStrike(EStrikeType::Single); oRunnerStyle.SetStrike(EStrikeType::Single);
if (oCharShape.SuperScript()) if (oCharShape.SuperScript())
@ -284,7 +284,7 @@ CRunnerStyle CStyleConverter::GenerateRunnerStyle(const CHWPRecordCharShape& oCh
case ELineStyle1::SOLID_3D_REVERS_LI: oRunnerStyle.SetU({EUType::Thick, oCharShape.GetUnderlineColor()}); break; case ELineStyle1::SOLID_3D_REVERS_LI: oRunnerStyle.SetU({EUType::Thick, oCharShape.GetUnderlineColor()}); break;
} }
} }
else if (EUnderline::CENTER == eUnderlineType) else if (EUnderline::CENTER == eUnderlineType && !oCharShape.StrikeOut())
{ {
if (eUnderlineStyle == ELineStyle1::DOUBLE_SLIM || if (eUnderlineStyle == ELineStyle1::DOUBLE_SLIM ||
eUnderlineStyle == ELineStyle1::DOUBLE_WAVE) eUnderlineStyle == ELineStyle1::DOUBLE_WAVE)

View File

@ -310,7 +310,7 @@ bool CHWPRecordCharShape::Underline() const
bool CHWPRecordCharShape::StrikeOut() const bool CHWPRecordCharShape::StrikeOut() const
{ {
return ELineStyle2::NONE != m_eStrikeOutShape; return 0x01 == m_chStrikeOut;
} }
bool CHWPRecordCharShape::SuperScript() const bool CHWPRecordCharShape::SuperScript() const