diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-09-15 15:18:02 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-09-17 09:41:23 +0200 |
commit | fd5470a12a33683a69cc580b6f6e297fbec45245 (patch) | |
tree | 8c66590c4affa221bf0b6d2f96faaa7805cc31ce /sc/source/core/tool/sharedformula.cxx | |
parent | 9d08a0cea018226ce155104d8df146dc2a412aac (diff) |
ScFormulaCell always has a ScDocument&
allowing us to drop some checks of it against null
Change-Id: I60235414e05f8d9c618ddbbf9b01501ef13303d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102879
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/core/tool/sharedformula.cxx')
-rw-r--r-- | sc/source/core/tool/sharedformula.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/core/tool/sharedformula.cxx b/sc/source/core/tool/sharedformula.cxx index 9383abb3cb94..495f0d2e75a6 100644 --- a/sc/source/core/tool/sharedformula.cxx +++ b/sc/source/core/tool/sharedformula.cxx @@ -85,7 +85,7 @@ bool SharedFormulaUtil::splitFormulaCellGroup(const CellStoreType::position_type if (pCxt) rPrevTop.EndListeningTo(*pCxt); else - rPrevTop.EndListeningTo( *rPrevTop.GetDocument(), nullptr, ScAddress( ScAddress::UNINITIALIZED)); + rPrevTop.EndListeningTo( rPrevTop.GetDocument(), nullptr, ScAddress( ScAddress::UNINITIALIZED)); rPrevTop.SetNeedsListening(true); // The new group or remaining single cell needs a new listening. @@ -155,10 +155,10 @@ bool SharedFormulaUtil::splitFormulaCellGroups(const ScDocument* pDoc, CellStore bool SharedFormulaUtil::joinFormulaCells( const CellStoreType::position_type& rPos, ScFormulaCell& rCell1, ScFormulaCell& rCell2 ) { - if( rCell1.GetDocument()->IsDelayedFormulaGrouping()) + if( rCell1.GetDocument().IsDelayedFormulaGrouping()) { - rCell1.GetDocument()->AddDelayedFormulaGroupingCell( &rCell1 ); - rCell1.GetDocument()->AddDelayedFormulaGroupingCell( &rCell2 ); + rCell1.GetDocument().AddDelayedFormulaGroupingCell( &rCell1 ); + rCell1.GetDocument().AddDelayedFormulaGroupingCell( &rCell2 ); return false; } |