diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-11-03 21:15:48 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-11-03 21:28:24 +0100 |
commit | d85108355c1802c7aed1ef1d9a19f6c633c4a0f8 (patch) | |
tree | bf5547132a44ceea5623a2943fe090a8c6ec3388 /svx | |
parent | 1459ffdffee61f3c4a552a28c5aa43facb3f4fcf (diff) |
tdf#120703 PVS: V547 Expression is always true/false
Change-Id: I27bf92770431f6a1f35e1c8224c0847555a8d43f
Reviewed-on: https://gerrit.libreoffice.org/62819
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/form/fmobj.cxx | 5 | ||||
-rw-r--r-- | svx/source/form/fmshimp.cxx | 32 |
2 files changed, 17 insertions, 20 deletions
diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx index 4b335e8b0e96..4ee984b79b9c 100644 --- a/svx/source/form/fmobj.cxx +++ b/svx/source/form/fmobj.cxx @@ -109,7 +109,7 @@ void FmFormObj::impl_checkRefDevice_nothrow( bool _force ) if ( !pFormModel || !pFormModel->ControlsUseRefDevice() ) return; - OutputDevice* pCurrentRefDevice = pFormModel ? pFormModel->GetRefDevice() : nullptr; + OutputDevice* pCurrentRefDevice = pFormModel->GetRefDevice(); if ( ( m_pLastKnownRefDevice.get() == pCurrentRefDevice ) && !_force ) return; @@ -313,8 +313,7 @@ void FmFormObj::handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage) m_xEnvironmentHistory = nullptr; m_aEventsHistory.realloc(0); - if ( pNewFormPage ) - pNewFormPage->GetImpl().formObjectInserted( *this ); + pNewFormPage->GetImpl().formObjectInserted( *this ); } diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index c3a202a06be7..edb44f22db40 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -3043,24 +3043,22 @@ void FmXFormShell::stopFiltering_Lock(bool bSave) for (::std::vector< Reference< runtime::XFormController > > ::const_iterator j = rControllerList.begin(); j != rControllerList.end(); ++j) { - if (bSave) - { // remember the current filter settings in case we're going to reload the forms below (which may fail) - try - { - Reference< XPropertySet > xFormAsSet((*j)->getModel(), UNO_QUERY); - aOriginalFilters.push_back(::comphelper::getString(xFormAsSet->getPropertyValue(FM_PROP_FILTER))); - aOriginalApplyFlags.push_back(::comphelper::getBOOL(xFormAsSet->getPropertyValue(FM_PROP_APPLYFILTER))); - } - catch(Exception&) - { - OSL_FAIL("FmXFormShell::stopFiltering : could not get the original filter !"); - // put dummies into the arrays so the they have the right size + // remember the current filter settings in case we're going to reload the forms below (which may fail) + try + { + Reference< XPropertySet > xFormAsSet((*j)->getModel(), UNO_QUERY); + aOriginalFilters.push_back(::comphelper::getString(xFormAsSet->getPropertyValue(FM_PROP_FILTER))); + aOriginalApplyFlags.push_back(::comphelper::getBOOL(xFormAsSet->getPropertyValue(FM_PROP_APPLYFILTER))); + } + catch(Exception&) + { + OSL_FAIL("FmXFormShell::stopFiltering : could not get the original filter !"); + // put dummies into the arrays so the they have the right size - if (aOriginalFilters.size() == aOriginalApplyFlags.size()) - // the first getPropertyValue failed -> use two dummies - aOriginalFilters.emplace_back( ); - aOriginalApplyFlags.push_back( false ); - } + if (aOriginalFilters.size() == aOriginalApplyFlags.size()) + // the first getPropertyValue failed -> use two dummies + aOriginalFilters.emplace_back( ); + aOriginalApplyFlags.push_back( false ); } saveFilter(*j); } |