summaryrefslogtreecommitdiffstats
path: root/hwpfilter/source/hwpfile.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-02-24 20:43:12 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-02-25 01:00:13 +0100
commit05bd9ed45d7a985ba7a53d0c122d6dbcd6cb2652 (patch)
tree1e65368cb3e0f7c922a77860924273c1e9cc3f07 /hwpfilter/source/hwpfile.cxx
parentforcepoint #7 check ksc5601_2uni_page21 bounds (diff)
downloadcore-05bd9ed45d7a985ba7a53d0c122d6dbcd6cb2652.tar.gz
core-05bd9ed45d7a985ba7a53d0c122d6dbcd6cb2652.zip
forcepoint #8 ensure ColumnDef lifetime
Change-Id: Idb0c7b1530dc57f4d7c14751f1b76caecc3b03a6 Reviewed-on: https://gerrit.libreoffice.org/50288 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'hwpfilter/source/hwpfile.cxx')
-rw-r--r--hwpfilter/source/hwpfile.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx
index f7b78fdf704c..552233dd853d 100644
--- a/hwpfilter/source/hwpfile.cxx
+++ b/hwpfilter/source/hwpfile.cxx
@@ -412,7 +412,7 @@ void HWPFile::TagsRead()
ColumnDef *HWPFile::GetColumnDef(int num)
{
if (static_cast<size_t>(num) < columnlist.size())
- return columnlist[num]->coldef;
+ return columnlist[num]->xColdef.get();
else
return nullptr;
}
@@ -569,12 +569,12 @@ void HWPFile::AddColumnInfo()
setMaxSettedPage();
}
-void HWPFile::SetColumnDef(ColumnDef *coldef)
+void HWPFile::SetColumnDef(const std::shared_ptr<ColumnDef>& rColdef)
{
ColumnInfo *cinfo = columnlist.back().get();
if( cinfo->bIsSet )
return;
- cinfo->coldef = coldef;
+ cinfo->xColdef = rColdef;
cinfo->bIsSet = true;
}