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

Revert "remove unnecessary use of local variable and auto_ptr"

This reverts commit 6af00cf9.
üst 473a1828
......@@ -717,6 +717,7 @@ void Chart2Positioner::createPositionMap()
bool bNoGlue = (meGlue == GLUETYPE_NONE);
SAL_WNODEPRECATED_DECLARATIONS_PUSH
auto_ptr<Table> pCols(new Table);
auto_ptr<Table> pNewRowTable(new Table);
SAL_WNODEPRECATED_DECLARATIONS_POP
Table* pCol = NULL;
SCROW nNoGlueRow = 0;
......@@ -751,8 +752,9 @@ void Chart2Positioner::createPositionMap()
pCol = static_cast<Table*>(pCols->Get(nInsCol));
if (!pCol)
{
pCol = new Table;
pCols->Insert(nInsCol, pCol);
pCol = pNewRowTable.get();
pCols->Insert(nInsCol, pNewRowTable.release());
pNewRowTable.reset(new Table);
}
sal_uInt32 nInsRow = static_cast<sal_uInt32>(bNoGlue ? nNoGlueRow : nRow1);
......@@ -771,7 +773,7 @@ void Chart2Positioner::createPositionMap()
if (pCol->Get(nInsRow) == NULL)
{
if (bExternal)
pCol->Insert(nInsRow, new ScExternalSingleRefToken(nFileId, aTabName, aCellData));
pCol->Insert(nInsRow, new ScExternalSingleRefToken(nFileId, aTabName, aCellData))
else
pCol->Insert(nInsRow, new ScSingleRefToken(aCellData));
}
......@@ -780,6 +782,7 @@ void Chart2Positioner::createPositionMap()
}
nNoGlueRow += nRow2 - nRow1 + 1;
}
pNewRowTable.reset(NULL);
bool bFillRowHeader = mbRowHeaders;
bool bFillColumnHeader = mbColHeaders;
......
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