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 /sfx2 | |
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 'sfx2')
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 4 |
2 files changed, 4 insertions, 8 deletions
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index c68ba3876925..1a503ca264f3 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -2132,7 +2132,6 @@ IMPL_LINK_NOARG(SfxCustomPropertiesPage, AddHdl, Button*, void) bool SfxCustomPropertiesPage::FillItemSet( SfxItemSet* rSet ) { - bool bModified = false; const SfxPoolItem* pItem = nullptr; SfxDocumentInfoItem* pInfo = nullptr; bool bMustDelete = false; @@ -2168,16 +2167,13 @@ bool SfxCustomPropertiesPage::FillItemSet( SfxItemSet* rSet ) } } - bModified = true; //!!! - if (pInfo) { - if ( bModified ) - rSet->Put( *pInfo ); + rSet->Put(*pInfo); if ( bMustDelete ) delete pInfo; } - return bModified; + return true; } void SfxCustomPropertiesPage::Reset( const SfxItemSet* rItemSet ) diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index ab0645207379..9e5fc078c635 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -1543,10 +1543,10 @@ uno::Reference < embed::XStorage > SfxMedium::GetStorage( bool bCreateTempIfNo ) // The versions are numbered starting with 1, versions with // negative versions numbers are counted backwards from the // current version - short nVersion = pVersion ? pVersion->GetValue() : 0; + short nVersion = pVersion->GetValue(); if ( nVersion<0 ) nVersion = static_cast<short>(pImpl->aVersions.getLength()) + nVersion; - else if ( nVersion ) + else // nVersion > 0; pVersion->GetValue() != 0 was the condition to this block nVersion--; util::RevisionTag& rTag = pImpl->aVersions[nVersion]; |