diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-10-22 17:09:03 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-10-23 09:30:09 +0200 |
commit | 19d2f4211928de8cae2d46a8161f2d9081371785 (patch) | |
tree | 3e2313b9c5b84ddd52609b61467f1a4200c7d891 /sc/qa | |
parent | Turn virtual ScToken::Dump into a single free function DumpToken (diff) | |
download | core-19d2f4211928de8cae2d46a8161f2d9081371785.tar.gz core-19d2f4211928de8cae2d46a8161f2d9081371785.zip |
Make ScToken::GetSingleRef etc. return * instead of &
...so that default implementations can return nullptr without further ado
Change-Id: Idc8778fe868efa00b1de597a54aa07a2e6fa3bc0
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 8 | ||||
-rw-r--r-- | sc/qa/unit/ucalc_sharedformula.cxx | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index d321617ea5ba..7258326a7375 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -1274,7 +1274,7 @@ bool checkRelativeRefToken(ScDocument& rDoc, const ScAddress& rPos, SCsCOL nRelC if (!pToken) return false; - ScSingleRefData& rRef = pToken->GetSingleRef(); + ScSingleRefData& rRef = *pToken->GetSingleRef(); if (!rRef.IsColRel() || rRef.Col() != nRelCol) { cerr << "Unexpected relative column address." << endl; @@ -1296,7 +1296,7 @@ bool checkDeletedRefToken(ScDocument& rDoc, const ScAddress& rPos) if (!pToken) return false; - ScSingleRefData& rRef = pToken->GetSingleRef(); + ScSingleRefData& rRef = *pToken->GetSingleRef(); if (!rRef.IsDeleted()) { cerr << "Deleted reference is expected, but it's still a valid reference." << endl; @@ -4189,7 +4189,7 @@ bool hasRange(const std::vector<ScTokenRef>& rRefTokens, const ScRange& rRange, { case formula::svSingleRef: { - ScSingleRefData aData = p->GetSingleRef(); + ScSingleRefData aData = *p->GetSingleRef(); if (rRange.aStart != rRange.aEnd) break; @@ -4200,7 +4200,7 @@ bool hasRange(const std::vector<ScTokenRef>& rRefTokens, const ScRange& rRange, break; case formula::svDoubleRef: { - ScComplexRefData aData = p->GetDoubleRef(); + ScComplexRefData aData = *p->GetDoubleRef(); ScRange aThis = aData.toAbs(rPos); if (aThis == rRange) return true; diff --git a/sc/qa/unit/ucalc_sharedformula.cxx b/sc/qa/unit/ucalc_sharedformula.cxx index d6ccdc53b4b2..e4e1a12d9b69 100644 --- a/sc/qa/unit/ucalc_sharedformula.cxx +++ b/sc/qa/unit/ucalc_sharedformula.cxx @@ -874,7 +874,7 @@ void Test::testSharedFormulasDeleteColumns() CPPUNIT_ASSERT(pCode && pCode->GetLen() == 1); const FormulaToken* pToken = pCode->GetArray()[0]; CPPUNIT_ASSERT(pToken->GetType() == svSingleRef); - const ScSingleRefData* pSRef = &static_cast<const ScToken*>(pToken)->GetSingleRef(); + const ScSingleRefData* pSRef = static_cast<const ScToken*>(pToken)->GetSingleRef(); CPPUNIT_ASSERT(pSRef->IsColDeleted()); CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(0), pSRef->toAbs(ScAddress(1,0,0)).Row()); |