diff options
-rw-r--r-- | lotuswordpro/source/filter/lwptoc.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwptoc.cxx b/lotuswordpro/source/filter/lwptoc.cxx index 3f31da26e409..4857e945baee 100644 --- a/lotuswordpro/source/filter/lwptoc.cxx +++ b/lotuswordpro/source/filter/lwptoc.cxx @@ -131,7 +131,7 @@ void LwpTocSuperLayout::RegisterStyle() // Get font info of default text style and set into tab style const LwpObjectID *pDefaultTextStyle = m_pFoundry ? m_pFoundry->GetDefaultTextStyle() : nullptr; - XFParaStyle* pBaseStyle = pDefaultTextStyle ? static_cast<XFParaStyle*>(m_pFoundry->GetStyleManager()->GetStyle(*pDefaultTextStyle)) : nullptr; + XFParaStyle* pBaseStyle = pDefaultTextStyle ? dynamic_cast<XFParaStyle*>(m_pFoundry->GetStyleManager()->GetStyle(*pDefaultTextStyle)) : nullptr; XFTextStyle*pTextStyle = new XFTextStyle; if (pBaseStyle) pTextStyle->SetFont(pBaseStyle->GetFont()); // who delete this font????? |