Kaydet (Commit) e94d1bb9 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

coverity: no need to use a pointer here

Change-Id: I83b986c6f2f8670c2c0f6caa754fd3567c7488a8
üst ae313885
...@@ -1603,24 +1603,24 @@ XFColumns* LwpLayout::GetXFColumns() ...@@ -1603,24 +1603,24 @@ XFColumns* LwpLayout::GetXFColumns()
//set xfcolumn //set xfcolumn
for(sal_uInt16 nIndex = 0; nIndex<nCols; nIndex++) for(sal_uInt16 nIndex = 0; nIndex<nCols; nIndex++)
{ {
XFColumn* pColumn = new XFColumn(); XFColumn aColumn;
sal_Int32 nWidth = static_cast<sal_Int32>(GetColWidth(nIndex)); sal_Int32 nWidth = static_cast<sal_Int32>(GetColWidth(nIndex));
nWidth=8305/nCols; //relative width nWidth=8305/nCols; //relative width
pColumn->SetRelWidth(nWidth); aColumn.SetRelWidth(nWidth);
//the left and right margins is 0; //the left and right margins is 0;
double nGap = GetColGap(nIndex)/2; double nGap = GetColGap(nIndex)/2;
//nGap=0; //nGap=0;
pColumn->SetMargins(nGap,nGap); aColumn.SetMargins(nGap,nGap);
if(nIndex==0) if(nIndex==0)
{ {
pColumn->SetMargins(0,nGap); aColumn.SetMargins(0,nGap);
} }
if(nIndex==(nCols-1)) if(nIndex==(nCols-1))
{ {
pColumn->SetMargins(nGap,0); aColumn.SetMargins(nGap,0);
} }
pColumns->AddColumn(*pColumn); pColumns->AddColumn(aColumn);
} }
return pColumns; return pColumns;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment