diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-09-15 14:21:37 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-09-16 22:27:54 +0200 |
commit | d9ee08d6fdc23cafa606bbbebd0b64a559fcf24c (patch) | |
tree | d1f4e3038f5f6fcf2bf69452e426f97c4706d84f /sc/source/core/data/documen2.cxx | |
parent | c3634ad65b459036f47ab2ba37c377e5a5e99d52 (diff) |
ScFormulaCell ctor variant never called with null ScDocument*
can be shown by readjusting ScXMLChangeTrackingImportHelper
members to explicitly pass the target ScDocument around and
identify there is no null case path possible
Change-Id: I15a4eadfe4bfadf97365f9a15c6ec5572d77d578
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102869
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/core/data/documen2.cxx')
-rw-r--r-- | sc/source/core/data/documen2.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 6015aa596b55..18c55028f082 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -261,7 +261,7 @@ sal_uInt32 ScDocument::GetDocumentID() const void ScDocument::StartChangeTracking() { if (!pChangeTrack) - pChangeTrack.reset( new ScChangeTrack( this ) ); + pChangeTrack.reset( new ScChangeTrack( *this ) ); } void ScDocument::EndChangeTracking() @@ -271,8 +271,8 @@ void ScDocument::EndChangeTracking() void ScDocument::SetChangeTrack( std::unique_ptr<ScChangeTrack> pTrack ) { - OSL_ENSURE( pTrack->GetDocument() == this, "SetChangeTrack: different documents" ); - if ( !pTrack || pTrack == pChangeTrack || pTrack->GetDocument() != this ) + OSL_ENSURE( &pTrack->GetDocument() == this, "SetChangeTrack: different documents" ); + if ( !pTrack || pTrack == pChangeTrack || &pTrack->GetDocument() != this ) return ; EndChangeTracking(); pChangeTrack = std::move(pTrack); |