[Libreoffice-commits] core.git: 3 commits - sc/source

Markus Mohrhard markus.mohrhard at googlemail.com
Fri Feb 15 12:00:41 PST 2013


 sc/source/core/data/cell.cxx     |    1 +
 sc/source/core/data/column3.cxx  |    3 ++-
 sc/source/core/data/documen4.cxx |    2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit b3356f6f772d7d265160927d45f935098784c20e
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Fri Feb 15 20:56:47 2013 +0100

    coverity: fix memory leak
    
    Change-Id: Id378d44e8d469c3606050255d9712a0aed5ede57

diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 9356e77..77ebe66 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -185,7 +185,7 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
                         // Zelle ein eigenes Array erhaelt!
                         aPos = ScAddress( j, k, *itr );
                         t->CalcRelFromAbs( aPos );
-                        pCell = new ScFormulaCell( this, aPos, aArr.Clone(), eGram, MM_REFERENCE );
+                        pCell = new ScFormulaCell( this, aPos, &aArr, eGram, MM_REFERENCE );
                         maTabs[*itr]->PutCell(j, k, (ScBaseCell*) pCell);
                     }
                 }
commit cc9cd7af3beb13eede23c6c60506c6e8c329e29d
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Fri Feb 15 20:54:29 2013 +0100

    coverity: initialize variable
    
    Change-Id: Ie52aae8e56e4b420d612772f8dab1d9e7330f79a

diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 7976996..d681388 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -1195,7 +1195,8 @@ bool ScColumn::SetString( SCROW nRow, SCTAB nTabP, const String& rString,
         if (pParam)
             aParam = *pParam;
 
-        sal_uInt32 nIndex, nOldIndex = 0;
+        sal_uInt32 nIndex = 0;
+        sal_uInt32 nOldIndex = 0;
         sal_Unicode cFirstChar;
         if (!aParam.mpNumFormatter)
             aParam.mpNumFormatter = pDocument->GetFormatTable();
commit 22763347d8d4f02729c93ed19c2040ebebabb5f1
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Fri Feb 15 20:44:17 2013 +0100

    coverity: fix memory leak
    
    Change-Id: I1c4e6cd0b60047de45a4782bfebb8520b1a17f22

diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index 75d1ced..97282b0 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -201,6 +201,7 @@ void adjustDBRange(ScToken* pToken, ScDocument& rNewDoc, const ScDocument* pOldD
     if (!pNewDBCollection)
     {
         pNewDBCollection = new ScDBCollection(&rNewDoc);
+        rNewDoc.SetDBCollection(pNewDBCollection);
     }
     ScDBCollection::NamedDBs& aNewNamedDBs = pNewDBCollection->getNamedDBs();
     ScDBData* pNewDBData = aNewNamedDBs.findByUpperName(aDBName);


More information about the Libreoffice-commits mailing list