[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - lotuswordpro/source

Caolán McNamara caolanm at redhat.com
Sat Dec 12 13:14:14 PST 2015


 lotuswordpro/source/filter/lwptoc.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4d4c1089b1032b4256048aaf90f922223b9a9c72
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Dec 12 21:13:19 2015 +0000

    this cast needs to be dynamic
    
    Change-Id: I6d02cc8dc894ef7e2903874b0ab973f7f1b3225d
    (cherry picked from commit 25632b8ffe53dd18faaab2f5c019f7a401ebf579)

diff --git a/lotuswordpro/source/filter/lwptoc.cxx b/lotuswordpro/source/filter/lwptoc.cxx
index 3f31da2..4857e94 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?????


More information about the Libreoffice-commits mailing list