diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-10-28 00:13:29 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-10-28 07:55:59 +0100 |
commit | 5f0ddb2d2068a4388a7df12cd0e11f628b91e4c0 (patch) | |
tree | 2007c4a1f6c21a9f0d5a11aab60a10cd178d1d8b /sc/source/ui/docshell/docsh.cxx | |
parent | 8522572cdd27f62a031bb07c9cf7f6f85e8453ad (diff) |
tdf#120703 PVS: V547 Expression is always true/false
Change-Id: Ic92cc594979cac2edac04a085957398672a5dfcc
Reviewed-on: https://gerrit.libreoffice.org/62450
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sc/source/ui/docshell/docsh.cxx')
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 2968ea7f53c0..0a2a3525e11e 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -779,7 +779,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) bool bChecked = aWarningBox.get_active(); if (bChecked) { - aAppOptions.SetShowSharedDocumentWarning( !bChecked ); + aAppOptions.SetShowSharedDocumentWarning(false); SC_MOD()->SetAppOptions( aAppOptions ); } } @@ -1772,17 +1772,11 @@ bool ScDocShell::Save() PrepareSaveGuard aPrepareGuard( *this); - SfxViewFrame* pFrame1 = SfxViewFrame::GetFirst( this ); - if (pFrame1) + if (const auto pFrame1 = SfxViewFrame::GetFirst(this)) { - vcl::Window* pWindow = &pFrame1->GetWindow(); - if ( pWindow ) + if (auto pSysWin = pFrame1->GetWindow().GetSystemWindow()) { - vcl::Window* pSysWin = pWindow->GetSystemWindow(); - if ( pSysWin ) - { - pSysWin->SetAccessibleName(OUString()); - } + pSysWin->SetAccessibleName(OUString()); } } // wait cursor is handled with progress bar |