summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-04-14 15:54:14 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-04-14 15:47:48 +0200
commit6154489314d2f2bf9cb99b72f15c79dd48a1da14 (patch)
treed9bbbc2e0233d417555109206bdb2d298ce838ac /svx
parenteb772683513f4f2b6c8e6404c29b8e477ffc7fad (diff)
tdf#120703 PVS: V581 ifs with identical conditions
V581 The conditional expressions of the 'if' statements situated alongside each other are identical. Change-Id: I18562d60e33c7ecff14807976dde4cbcae3f665b Reviewed-on: https://gerrit.libreoffice.org/70731 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/form/fmshimp.cxx8
-rw-r--r--svx/source/svdraw/charthelper.cxx16
2 files changed, 9 insertions, 15 deletions
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 162a5eb1ec96..9398f1dca662 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -3562,8 +3562,7 @@ void FmXFormShell::viewDeactivated_Lock(FmFormView& _rCurrentView, bool _bDeacti
// if we have an async load operation pending for the 0-th page for this view,
// we need to cancel this
- FmFormPage* pPage = _rCurrentView.GetCurPage();
- if ( pPage )
+ if (FmFormPage* pPage = _rCurrentView.GetCurPage())
{
// move all events from our queue to a new one, omit the events for the deactivated
// page
@@ -3582,11 +3581,8 @@ void FmXFormShell::viewDeactivated_Lock(FmFormView& _rCurrentView, bool _bDeacti
}
}
m_aLoadingPages = aNewEvents;
- }
- // remove callbacks at the page
- if ( pPage )
- {
+ // remove callbacks at the page
pPage->GetImpl().SetFormsCreationHdl( Link<FmFormPageImpl&,void>() );
}
UpdateForms_Lock(true);
diff --git a/svx/source/svdraw/charthelper.cxx b/svx/source/svdraw/charthelper.cxx
index 617351817f1b..f75ac0e40a97 100644
--- a/svx/source/svdraw/charthelper.cxx
+++ b/svx/source/svdraw/charthelper.cxx
@@ -124,15 +124,13 @@ void ChartHelper::AdaptDefaultsForChart(
try
{
- // set background to transparent (none)
- uno::Reference< beans::XPropertySet > xPageProp( xChartDoc->getPageBackground());
- if( xPageProp.is())
- xPageProp->setPropertyValue( "FillStyle",
- uno::makeAny( drawing::FillStyle_NONE ));
- // set no border
- if( xPageProp.is())
- xPageProp->setPropertyValue( "LineStyle",
- uno::makeAny( drawing::LineStyle_NONE ));
+ if (uno::Reference< beans::XPropertySet > xPageProp = xChartDoc->getPageBackground())
+ {
+ // set background to transparent (none)
+ xPageProp->setPropertyValue("FillStyle", uno::makeAny(drawing::FillStyle_NONE));
+ // set no border
+ xPageProp->setPropertyValue("LineStyle", uno::makeAny(drawing::LineStyle_NONE));
+ }
}
catch( const uno::Exception & )
{