diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-09-30 14:50:08 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-10-04 15:16:44 +0200 |
commit | 8c899be671e55709588df7634607c045a607ebd1 (patch) | |
tree | 55b99673d36b7996d78646481a14c9d78187e16c | |
parent | Resolves: tdf#140992 Paste/Cut should mark Edit as modified (diff) | |
download | core-8c899be671e55709588df7634607c045a607ebd1.tar.gz core-8c899be671e55709588df7634607c045a607ebd1.zip |
WaE: 'else' branch doesn't make sense, dereferences null
if xModel.is() is false then xModel->getCurrentController() is just going to
crash.
like this since it was introduced in
commit eafba820349005ea5426cab58911f9ff99969966
Date: Tue Jan 5 22:32:38 2010 +0100
autorecovery: define a new css.document.XDocumentRecovery interface, implement it in both SFX and DBACCESS, and use it in the autorecovery
Change-Id: I8ea43a0679d43cb9b865ecae5260129d17b6a386
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122927
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit d800bc83539430815d4f6da103cb345614e532b7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122940
-rw-r--r-- | framework/source/services/autorecovery.cxx | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index c7cdabb4e365..9762f93a286b 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -1967,17 +1967,6 @@ void AutoRecovery::implts_collectActiveViewNames( AutoRecovery::TDocumentInfo& i aViewNames.push_back( sViewName ); } } - else - { - const Reference< XController2 > xController( xModel->getCurrentController(), UNO_QUERY ); - OUString sViewName; - if ( xController.is() ) - sViewName = xController->getViewControllerName(); - OSL_ENSURE( !sViewName.isEmpty(), "AutoRecovery::implts_collectActiveViewNames: (no XController2 ->) no view name -> no recovery of this view!" ); - - if ( !sViewName.isEmpty() ) - aViewNames.push_back( sViewName ); - } i_rInfo.ViewNames.realloc( aViewNames.size() ); ::std::copy( aViewNames.begin(), aViewNames.end(), i_rInfo.ViewNames.getArray() ); |