summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-03-16 09:44:48 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2012-03-22 06:55:58 +0100
commit13bf19769e6e0522d920594225b9baa2c1b7dd63 (patch)
treef49095604fa4ca6a358fb94b3a3a7514f94bd4f8 /sc
parent4aa72e0dee42c80667083c0b86a3d0ec5381c1ae (diff)
if/else branches contain same code
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx23
1 files changed, 5 insertions, 18 deletions
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index e2f7059ac566..1a04ce472a15 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -749,25 +749,12 @@ void Chart2Positioner::createPositionMap()
for (SCCOL nCol = nCol1; nCol <= nCol2; ++nCol, ++nInsCol)
{
- if (bNoGlue || meGlue == GLUETYPE_ROWS)
+ pCol = static_cast<Table*>(pCols->Get(nInsCol));
+ if (!pCol)
{
- 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);
- }
+ pCol = pNewRowTable.get();
+ pCols->Insert(nInsCol, pNewRowTable.release());
+ pNewRowTable.reset(new Table);
}
sal_uInt32 nInsRow = static_cast<sal_uInt32>(bNoGlue ? nNoGlueRow : nRow1);