summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-10-28 09:51:13 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2022-10-28 10:28:08 +0200
commitfb53e83372f139bceb5ebfaaae633875efeec240 (patch)
treeb999e505ca5976db05f8cd7fa125b1a2b9fb5a63 /sfx2
parenta19177768ce4b57d8b11f50785cf4ba6faf093a5 (diff)
Small simplification
Change-Id: I9aed483fd21b040c486526488917398aaafbe3a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141953 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/viewsh.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index fe7991553afc..1363d07c1eb5 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -845,8 +845,8 @@ void SfxViewShell::Activate( bool bMDI )
if ( bMDI )
{
SfxObjectShell *pSh = GetViewFrame()->GetObjectShell();
- if ( pSh->GetModel().is() )
- pSh->GetModel()->setCurrentController( GetViewFrame()->GetFrame().GetController() );
+ if (const auto xModel = pSh->GetModel())
+ xModel->setCurrentController(GetController());
SetCurrentDocument();
}