summaryrefslogtreecommitdiff
path: root/sw/source/uibase/app/docsh.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-10-28 00:13:29 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-10-28 07:55:59 +0100
commit5f0ddb2d2068a4388a7df12cd0e11f628b91e4c0 (patch)
tree2007c4a1f6c21a9f0d5a11aab60a10cd178d1d8b /sw/source/uibase/app/docsh.cxx
parent8522572cdd27f62a031bb07c9cf7f6f85e8453ad (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 'sw/source/uibase/app/docsh.cxx')
-rw-r--r--sw/source/uibase/app/docsh.cxx15
1 files changed, 4 insertions, 11 deletions
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index 6976d844b2ea..3559a500fba6 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -222,8 +222,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReaderPtr& rpRdr,
pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) )
aOpt.ReadUserData( static_cast<const SfxStringItem*>(pItem)->GetValue() );
- if( pRead )
- pRead->GetReaderOpt().SetASCIIOpts( aOpt );
+ pRead->GetReaderOpt().SetASCIIOpts( aOpt );
}
return pRead;
@@ -239,17 +238,11 @@ bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
tools::SvRef<SotStorage> pStg=pRead->getSotStorageRef(); // #i45333# save sot storage ref in case of recursive calls
m_xDoc->setDocAccTitle(OUString());
- 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());
}
}
SwWait aWait( *this, true );