diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-11-24 09:07:01 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-11-24 09:52:04 +0000 |
commit | c7f2115d774485a235b671c82302dbf38841e3c9 (patch) | |
tree | 4570d3710ffb8cc1d217a926b7e603794b42c064 /sc | |
parent | 8b8f315b51e2c405e3ea51b1c575bee49df7d0bd (diff) |
coverity#1394669 Uninitialized pointer field
and
coverity#1394670 Uninitialized pointer field
Change-Id: I5869ff5dc19a994d33d44313becec1eb590e31f8
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/range.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sc/qa/unit/range.cxx b/sc/qa/unit/range.cxx index c1e4214ff014..968434467e20 100644 --- a/sc/qa/unit/range.cxx +++ b/sc/qa/unit/range.cxx @@ -29,14 +29,14 @@ public: void testAddressParsing(); private: - ScDocument *m_pDoc; ScDocShellRef m_xDocShRef; }; void ScAddressTest::testAddressParsing() { ScAddress aAddr; - ScRefFlags nRes = aAddr.Parse("1", m_pDoc, formula::FormulaGrammar::CONV_OOO); + ScDocument& rDoc = m_xDocShRef->GetDocument(); + ScRefFlags nRes = aAddr.Parse("1", &rDoc, formula::FormulaGrammar::CONV_OOO); CPPUNIT_ASSERT_MESSAGE("Should fail to parse.", !(nRes & ScRefFlags::VALID)); } @@ -49,8 +49,6 @@ void ScAddressTest::setUp() SfxModelFlags::EMBEDDED_OBJECT | SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS | SfxModelFlags::DISABLE_DOCUMENT_RECOVERY); - - m_pDoc = &m_xDocShRef->GetDocument(); } void ScAddressTest::tearDown() @@ -72,14 +70,14 @@ public: void testRangeParsing(); private: - ScDocument *m_pDoc; ScDocShellRef m_xDocShRef; }; void ScRangeTest::testRangeParsing() { ScRange aRange; - ScRefFlags nRes = aRange.Parse(":1", m_pDoc, formula::FormulaGrammar::CONV_OOO); + ScDocument& rDoc = m_xDocShRef->GetDocument(); + ScRefFlags nRes = aRange.Parse(":1", &rDoc, formula::FormulaGrammar::CONV_OOO); CPPUNIT_ASSERT_MESSAGE("Should fail to parse.", !(nRes & ScRefFlags::VALID)); } @@ -92,8 +90,6 @@ void ScRangeTest::setUp() SfxModelFlags::EMBEDDED_OBJECT | SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS | SfxModelFlags::DISABLE_DOCUMENT_RECOVERY); - - m_pDoc = &m_xDocShRef->GetDocument(); } void ScRangeTest::tearDown() |