diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-03-25 04:37:41 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-03-25 04:42:28 +0200 |
commit | d1fcea677a0d814ca92a00717a4ff7090291f6cd (patch) | |
tree | b4d0af9d5af7ac94df78d35b8dbc06d4c82b3b4b | |
parent | 300365c29b1fb3ff47d9b24cacd990f9df1c9555 (diff) |
Revert "if/else branches contain same code"
This reverts commit 13bf19769e6e0522d920594225b9baa2c1b7dd63.
-rw-r--r-- | sc/source/ui/unoobj/chart2uno.cxx | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 1a04ce472a15..e2f7059ac566 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -749,12 +749,25 @@ void Chart2Positioner::createPositionMap() for (SCCOL nCol = nCol1; nCol <= nCol2; ++nCol, ++nInsCol) { - pCol = static_cast<Table*>(pCols->Get(nInsCol)); - if (!pCol) + if (bNoGlue || meGlue == GLUETYPE_ROWS) { - pCol = pNewRowTable.get(); - pCols->Insert(nInsCol, pNewRowTable.release()); - pNewRowTable.reset(new Table); + pCol = static_cast<Table*>(pCols->Get(nInsCol)); + if (!pCol) + { + pCol = pNewRowTable.get(); + pCols->Insert(nInsCol, pNewRowTable.release()); + pNewRowTable.reset(new Table); + } + } + else + { + pCol = static_cast<Table*>(pCols->Get(nInsCol)); + if (!pCol) + { + pCol = pNewRowTable.get(); + pCols->Insert(nInsCol, pNewRowTable.release()); + pNewRowTable.reset(new Table); + } } sal_uInt32 nInsRow = static_cast<sal_uInt32>(bNoGlue ? nNoGlueRow : nRow1); |