From de9c126b0b22c9ad3b1fede5b96438dcdce769cc Mon Sep 17 00:00:00 2001
From: Noel Grandin <noel@peralex.com>
Date: Fri, 16 Mar 2012 09:44:48 +0200
Subject: [PATCH 3/4] if/else branches contain same code

---
 sc/source/ui/unoobj/chart2uno.cxx |   23 +++++------------------
 1 files changed, 5 insertions(+), 18 deletions(-)

diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index e2f7059..1a04ce4 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);
-- 
1.7.5.4

