diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-10-18 14:53:19 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-10-18 16:20:57 +0200 |
commit | 70b9a979dda072ddfe2d458d62396d853cd1f9cc (patch) | |
tree | ba3a9391b5f2cad655cdbac0512652768749d175 /oox | |
parent | 7f4a7af94cb747dd112d766f2d7f95a33b840b51 (diff) |
tdf#163486: PVS: check can be simplified
V728 An excessive check can be simplified. The '||' operator is surrounded by opposite expressions '!p3DProperties' and 'p3DProperties'.
Change-Id: Iab3da21332f50a7414edff7283659106aa8d22e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175134
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/scene3dhelper.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/oox/source/drawingml/scene3dhelper.cxx b/oox/source/drawingml/scene3dhelper.cxx index ce8296050db6..7ad926b4bbf2 100644 --- a/oox/source/drawingml/scene3dhelper.cxx +++ b/oox/source/drawingml/scene3dhelper.cxx @@ -388,7 +388,7 @@ bool Scene3DHelper::setExtrusionProperties(const oox::drawingml::Shape3DProperti // all cases. rRotZ = basegfx::deg2rad<60000>(-rnMSOShapeRotation); - if (!p3DProperties || (p3DProperties && !(*p3DProperties).mnPreset.has_value())) + if (!p3DProperties || !(*p3DProperties).mnPreset.has_value()) return false; const sal_Int32 nCameraPrstID((*p3DProperties).mnPreset.value()); @@ -878,7 +878,7 @@ void lcl_tweakLightRig(std::vector<basegfx::B3DVector>& rLightDirVec, PrstLightR void Scene3DHelper::setLightingProperties(const oox::drawingml::Shape3DPropertiesPtr p3DProperties, const double& rfRotZ, oox::PropertyMap& rPropertyMap) { - if (!p3DProperties || (p3DProperties && !(*p3DProperties).mnLightRigType.has_value())) + if (!p3DProperties || !(*p3DProperties).mnLightRigType.has_value()) return; // get index of light rig in aPrstLightRigValuesArray |