From 49747ff2337fd1f4a3ee8e16d6328b8dacad99ec Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sat, 3 Nov 2018 15:43:04 +0300 Subject: tdf#120703 PVS: V547 Expression is always true/false Change-Id: I75082c85862b83ed2503900186ce9c70783e54db Reviewed-on: https://gerrit.libreoffice.org/62817 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- sd/source/ui/docshell/docshel4.cxx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'sd/source/ui/docshell/docshel4.cxx') diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index fca227e683c7..672181e24fbb 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -568,17 +568,11 @@ bool DrawDocShell::Save() bool DrawDocShell::SaveAs( SfxMedium& rMedium ) { mpDoc->setDocAccTitle(OUString()); - SfxViewFrame* pFrame1 = SfxViewFrame::GetFirst( this ); - if (pFrame1) + if (SfxViewFrame* pFrame1 = SfxViewFrame::GetFirst(this)) { - vcl::Window* pWindow = &pFrame1->GetWindow(); - if ( pWindow ) + if (vcl::Window* pSysWin = pFrame1->GetWindow().GetSystemWindow()) { - vcl::Window* pSysWin = pWindow->GetSystemWindow(); - if ( pSysWin ) - { - pSysWin->SetAccessibleName(OUString()); - } + pSysWin->SetAccessibleName(OUString()); } } mpDoc->StopWorkStartupDelay(); -- cgit