summaryrefslogtreecommitdiff
path: root/lotuswordpro/source/filter/lwpframelayout.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'lotuswordpro/source/filter/lwpframelayout.cxx')
-rw-r--r--lotuswordpro/source/filter/lwpframelayout.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/lotuswordpro/source/filter/lwpframelayout.cxx b/lotuswordpro/source/filter/lwpframelayout.cxx
index c90663abb2dd..e1f35522cd24 100644
--- a/lotuswordpro/source/filter/lwpframelayout.cxx
+++ b/lotuswordpro/source/filter/lwpframelayout.cxx
@@ -888,11 +888,16 @@ OUString LwpFrameLayout::GetNextLinkName()
LwpObjectID* pObjectID = m_Link.GetNextLayout();
if(!pObjectID->IsNull())
{
- LwpLayout* pLayout = static_cast<LwpLayout*>(pObjectID->obj());
- aName = pLayout->GetName()->str();
- //for division name confict
- if(pLayout->GetStyleName().getLength() > 0)
- aName = pLayout->GetStyleName();
+ LwpLayout* pLayout = dynamic_cast<LwpLayout*>(pObjectID->obj());
+ if (pLayout)
+ {
+ LwpAtomHolder *pHolder = pLayout->GetName();
+ if (pHolder)
+ aName = pHolder->str();
+ //for division name confict
+ if(pLayout->GetStyleName().getLength() > 0)
+ aName = pLayout->GetStyleName();
+ }
}
return aName;
}