[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - sc/qa

Stephan Bergmann sbergman at redhat.com
Tue Apr 26 19:48:41 UTC 2016


 sc/qa/unit/filters-test.cxx |   11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

New commits:
commit 987772831a6e9dc4571b4f01a32aa9966c451bf0
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 19 10:49:57 2016 +0100

    -Werror=address (GCC 6)
    
    "the compiler can assume that the address of ‘rDoc’ will always evaluate to
    ‘true’"
    
    Change-Id: Ic5dc481b84efad679150d13002a360478474cb90
    (cherry picked from commit 9e74ff76cdd92849def033f2f65dd5d771bb0267)
    Signed-off-by: David Tardon <dtardon at redhat.com>
    Reviewed-on: https://gerrit.libreoffice.org/24414
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index fac6c08..8cdce23 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -289,7 +289,6 @@ void ScFiltersTest::testContentLotus123()
     xDocSh->DoHardRecalc(true);
 
     ScDocument& rDoc = xDocSh->GetDocument();
-    CPPUNIT_ASSERT(&rDoc);
     testContentImpl(rDoc, FORMAT_LOTUS123);
     xDocSh->DoClose();
 }
@@ -298,8 +297,7 @@ void ScFiltersTest::testContentDIF()
 {
     ScDocShellRef xDocSh = loadDoc("universal-content.", FORMAT_DIF);
 
-    ScDocument& rDoc = xDocSh->GetDocument();
-    CPPUNIT_ASSERT(&rDoc);
+    xDocSh->GetDocument();
     xDocSh->DoClose();
 }
 
@@ -319,7 +317,6 @@ void ScFiltersTest::testContentXLSB()
 //     CPPUNIT_ASSERT(xDocSh);
 //
 //     ScDocument& rDoc = xDocSh->GetDocument();
-//     CPPUNIT_ASSERT(&rDoc);
 //     testContentImpl(pDoc, FORMAT_XLS_XML);
 //     xDocSh->DoClose();
 // }
@@ -397,7 +394,6 @@ void ScFiltersTest::testSharedFormulaXLSX()
 {
     ScDocShellRef xDocSh = loadDoc("shared-formula/basic.", FORMAT_XLSX);
     ScDocument& rDoc = xDocSh->GetDocument();
-    CPPUNIT_ASSERT(&rDoc);
     xDocSh->DoHardRecalc(true);
     // Check the results of formula cells in the shared formula range.
     for (SCROW i = 1; i <= 18; ++i)
@@ -472,7 +468,6 @@ void ScFiltersTest::testLegacyCellAnchoredRotatedShape()
         ScDocShellRef xDocSh = loadDoc("legacycellanchoredrotatedclippedshape.", FORMAT_ODS);
 
         ScDocument& rDoc = xDocSh->GetDocument();
-        CPPUNIT_ASSERT(&rDoc);
         // ensure the imported legacy rotated shape is in the expected position
         Rectangle aRect( 6000, -2000, 8000, 4000 );
         // ensure the imported ( and converted ) anchor ( note we internally now store the anchor in
@@ -488,7 +483,6 @@ void ScFiltersTest::testLegacyCellAnchoredRotatedShape()
         // a core dump in editeng ( so moved to here )
         xDocSh = saveAndReload( &(*xDocSh), FORMAT_ODS);
         ScDocument& rDoc2 = xDocSh->GetDocument();
-        CPPUNIT_ASSERT(&rDoc2);
         impl_testLegacyCellAnchoredRotatedShape( rDoc2, aRect, aAnchor );
 
         xDocSh->DoClose();
@@ -500,7 +494,6 @@ void ScFiltersTest::testLegacyCellAnchoredRotatedShape()
         // are hidden
         ScDocShellRef xDocSh = loadDoc("legacycellanchoredrotatedhiddenshape.", FORMAT_ODS, true);
         ScDocument& rDoc = xDocSh->GetDocument();
-        CPPUNIT_ASSERT(&rDoc);
         // ensure the imported legacy rotated shape is in the expected position
         // when a shape is fully hidden reloading seems to result is in some errors, usually
         // ( same but different error happens pre-patch ) - we should do better here, I regard it
@@ -528,7 +521,6 @@ void ScFiltersTest::testLegacyCellAnchoredRotatedShape()
         ScDocShellRef xDocSh = loadDoc("legacycellanchoredrotatedshape.", FORMAT_ODS);
 
         ScDocument& rDoc = xDocSh->GetDocument();
-        CPPUNIT_ASSERT(&rDoc);
         // ensure the imported legacy rotated shape is in the expected position
         Rectangle aRect( 6000, 3000, 8000, 9000 );
         // ensure the imported (and converted) anchor (note we internally now store the anchor in
@@ -544,7 +536,6 @@ void ScFiltersTest::testLegacyCellAnchoredRotatedShape()
         // test save and reload
         xDocSh = saveAndReload( &(*xDocSh), FORMAT_ODS);
         ScDocument& rDoc2 = xDocSh->GetDocument();
-        CPPUNIT_ASSERT(&rDoc2);
         impl_testLegacyCellAnchoredRotatedShape( rDoc2, aRect, aAnchor );
 
         xDocSh->DoClose();


More information about the Libreoffice-commits mailing list