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

Markus Mohrhard markus.mohrhard at googlemail.com
Sat Mar 23 22:32:33 PDT 2013


 sc/qa/unit/helper/qahelper.hxx        |    1 +
 sc/qa/unit/subsequent_export-test.cxx |   14 ++++++++++++++
 sc/source/core/data/cell2.cxx         |    8 ++------
 3 files changed, 17 insertions(+), 6 deletions(-)

New commits:
commit 894b5423a8f22ac78a47eb3274969fe5f609fad1
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Mar 24 05:27:31 2013 +0100

    close documents at the end of the test
    
    Change-Id: Ic0b60a2420c82f431c5790483e922ed2164f09fb

diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx
index 58f6f4b..b610f58 100644
--- a/sc/qa/unit/helper/qahelper.hxx
+++ b/sc/qa/unit/helper/qahelper.hxx
@@ -281,6 +281,7 @@ public:
                     CPPUNIT_ASSERT_EQUAL(nExpectedHeight, nHeight);
                 }
             }
+            xShell->DoClose();
         }
     }
 };
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index db0879d..5dbadba 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -150,6 +150,8 @@ void ScExportTest::testPasswordExport()
     ScDocument* pLoadedDoc = xDocSh->GetDocument();
     double aVal = pLoadedDoc->GetValue(0,0,0);
     ASSERT_DOUBLES_EQUAL(aVal, 1.0);
+
+    xDocSh->DoClose();
 }
 
 void ScExportTest::testConditionalFormatExportODS()
@@ -164,6 +166,8 @@ void ScExportTest::testConditionalFormatExportODS()
     OUString aCSVPath;
     createCSVPath( aCSVFile, aCSVPath );
     testCondFile(aCSVPath, pDoc, 0);
+
+    xDocSh->DoClose();
 }
 
 void ScExportTest::testConditionalFormatExportXLSX()
@@ -178,6 +182,8 @@ void ScExportTest::testConditionalFormatExportXLSX()
     OUString aCSVPath;
     createCSVPath( aCSVFile, aCSVPath );
     testCondFile(aCSVPath, pDoc, 0);
+
+    xDocSh->DoClose();
 }
 
 void ScExportTest::testColorScaleExportODS()
@@ -193,6 +199,8 @@ void ScExportTest::testColorScaleExportODS()
 
     testColorScale2Entry_Impl(pDoc);
     testColorScale3Entry_Impl(pDoc);
+
+    xDocSh->DoClose();
 }
 
 void ScExportTest::testColorScaleExportXLSX()
@@ -208,6 +216,8 @@ void ScExportTest::testColorScaleExportXLSX()
 
     testColorScale2Entry_Impl(pDoc);
     testColorScale3Entry_Impl(pDoc);
+
+    xDocSh->DoClose();
 }
 
 void ScExportTest::testDataBarExportODS()
@@ -222,6 +232,8 @@ void ScExportTest::testDataBarExportODS()
     CPPUNIT_ASSERT(pDoc);
 
     testDataBar_Impl(pDoc);
+
+    xDocSh->DoClose();
 }
 
 void ScExportTest::testDataBarExportXLSX()
@@ -236,6 +248,8 @@ void ScExportTest::testDataBarExportXLSX()
     CPPUNIT_ASSERT(pDoc);
 
     testDataBar_Impl(pDoc);
+
+    xDocSh->DoClose();
 }
 
 void ScExportTest::testMiscRowHeightExport()
commit 6c2acf78ad988c100d4163f369411482e5fd0f44
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Mar 24 05:27:03 2013 +0100

    remove unused variables
    
    Change-Id: I602169d65c77ae71e0d5dd4b3b95837db91fa7da

diff --git a/sc/source/core/data/cell2.cxx b/sc/source/core/data/cell2.cxx
index 9232772..cacd5e1 100644
--- a/sc/source/core/data/cell2.cxx
+++ b/sc/source/core/data/cell2.cxx
@@ -848,10 +848,6 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
 
     SCCOL nCol1 = r.aStart.Col();
     SCROW nRow1 = r.aStart.Row();
-    SCTAB nTab1 = r.aStart.Tab();
-    SCCOL nCol2 = r.aEnd.Col();
-    SCROW nRow2 = r.aEnd.Row();
-    SCTAB nTab2 = r.aEnd.Tab();
     SCCOL nCol = aPos.Col();
     SCROW nRow = aPos.Row();
     SCTAB nTab = aPos.Tab();
commit 70478b0ae41aee6113c4e1e930912a804bd8489c
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Mar 24 05:19:09 2013 +0100

    let us move this out of the condition
    
    restores the old behavior
    
    Change-Id: I096934b87ddf646587ccb230986e61f5da22de68

diff --git a/sc/source/core/data/cell2.cxx b/sc/source/core/data/cell2.cxx
index b4a78de..9232772 100644
--- a/sc/source/core/data/cell2.cxx
+++ b/sc/source/core/data/cell2.cxx
@@ -860,10 +860,10 @@ bool ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
         aUndoPos = *pUndoCellPos;
     ScAddress aOldPos( aPos );
 //  bool bPosChanged = false;           // if this cell was moved
-    bool bIsInsert = false;
+    bool bIsInsert = (eUpdateRefMode == URM_INSDEL &&
+                nDx >= 0 && nDy >= 0 && nDz >= 0);
     if (eUpdateRefMode == URM_INSDEL && r.In( aPos ))
     {
-        bIsInsert = (nDx >= 0 && nDy >= 0 && nDz >= 0);
         aPos.Move(nDx, nDy, nDz);
         bCellStateChanged = aPos != aOldPos;
     }


More information about the Libreoffice-commits mailing list