summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-03-16 09:41:43 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2012-03-22 06:55:57 +0100
commit4aa72e0dee42c80667083c0b86a3d0ec5381c1ae (patch)
tree79e38c9bc1072ecdd953b99e712b548a092fc733 /sc
parent3ffdb45ae047f12480e73fdd4b28fe35f1e8d48c (diff)
restructure insert code as a precursor to further simplification
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 1c637fb48472..e2f7059ac566 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -761,13 +761,13 @@ void Chart2Positioner::createPositionMap()
}
else
{
- if (pCols->Insert(nInsCol, pNewRowTable.get()))
+ pCol = static_cast<Table*>(pCols->Get(nInsCol));
+ if (!pCol)
{
- pCol = pNewRowTable.release();
+ pCol = pNewRowTable.get();
+ pCols->Insert(nInsCol, pNewRowTable.release());
pNewRowTable.reset(new Table);
}
- else
- pCol = static_cast<Table*>(pCols->Get(nInsCol));
}
sal_uInt32 nInsRow = static_cast<sal_uInt32>(bNoGlue ? nNoGlueRow : nRow1);
@@ -786,7 +786,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));
}