summaryrefslogtreecommitdiff
path: root/lotuswordpro/source/filter/lwptablelayout.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-11-14 09:56:50 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-11-14 12:02:45 +0000
commit0332e3a8e968f9f85b40405391120d2f5949fbd2 (patch)
tree5bb1c10ed24f64d1d3d2a183dd6903c7dafe8f62 /lotuswordpro/source/filter/lwptablelayout.cxx
parent792b127d5ceb397c5fb280cadd80972e1693e9ec (diff)
coverity#738972 Use after free
Change-Id: Iba60fc4ff3b10179ebc700467a3d73e7bc7b64c9
Diffstat (limited to 'lotuswordpro/source/filter/lwptablelayout.cxx')
-rw-r--r--lotuswordpro/source/filter/lwptablelayout.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx
index d3e037abbf21..6734edbdb4af 100644
--- a/lotuswordpro/source/filter/lwptablelayout.cxx
+++ b/lotuswordpro/source/filter/lwptablelayout.cxx
@@ -618,7 +618,7 @@ void LwpTableLayout::RegisterColumns()
pColStyle->SetWidth(static_cast<float>(dDefaultColumn));
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
- m_DefaultColumnStyleName = pXFStyleManager->AddStyle(pColStyle)->GetStyleName();
+ m_DefaultColumnStyleName = pXFStyleManager->AddStyle(pColStyle).m_pStyle->GetStyleName();
// register existed column style
sal_uInt16 i=0;
@@ -665,7 +665,7 @@ void LwpTableLayout::RegisterRows()
pRowStyle->SetRowHeight((float)pTable->GetHeight());
}
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
- m_DefaultRowStyleName = pXFStyleManager->AddStyle(pRowStyle)->GetStyleName();
+ m_DefaultRowStyleName = pXFStyleManager->AddStyle(pRowStyle).m_pStyle->GetStyleName();
// register style of rows
LwpObjectID& rRowID = GetChildHead();
@@ -736,7 +736,7 @@ void LwpTableLayout::RegisterStyle()
pTableStyle->SetWidth(pSuper->GetTableWidth());
}
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
- m_StyleName = pXFStyleManager->AddStyle(pTableStyle)->GetStyleName();
+ m_StyleName = pXFStyleManager->AddStyle(pTableStyle).m_pStyle->GetStyleName();
//convert to OO table now and register row stle
// traverse
@@ -915,7 +915,7 @@ void LwpTableLayout::SplitRowToCells(XFTable* pTmpTable,XFTable* pXFTable,
{
pRowStyle->SetRowHeight((float)fHeight);
}
- pXFRow->SetStyleName(pXFStyleManager->AddStyle(pRowStyle)->GetStyleName());
+ pXFRow->SetStyleName(pXFStyleManager->AddStyle(pRowStyle).m_pStyle->GetStyleName());
//construct headong row
XFCell* pXFCell1 = new XFCell;
@@ -1224,7 +1224,7 @@ void LwpTableLayout::PostProcessParagraph(XFCell *pCell, sal_uInt16 nRowID, sal_
}
pOverStyle->SetStyleName("");
- OUString StyleName = pXFStyleManager->AddStyle(pOverStyle)->GetStyleName();
+ OUString StyleName = pXFStyleManager->AddStyle(pOverStyle).m_pStyle->GetStyleName();
pXFPara->SetStyleName(StyleName);
}
@@ -1432,7 +1432,7 @@ void LwpColumnLayout::RegisterStyle(double dCalculatedWidth)
XFColStyle * pColStyle = new XFColStyle();
pColStyle->SetWidth(static_cast<float>(dCalculatedWidth));
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
- m_StyleName = pXFStyleManager->AddStyle(pColStyle)->GetStyleName();
+ m_StyleName = pXFStyleManager->AddStyle(pColStyle).m_pStyle->GetStyleName();
}
LwpTableHeadingLayout::LwpTableHeadingLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm)