summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-08-10 20:47:32 +0200
committerMiklos Vajna <vmiklos@collabora.com>2021-01-20 14:57:07 +0100
commit6845a140ad6fb6640f9209e34cf7aa0865b8aea6 (patch)
tree3d2d4cdeaa0db20a0c66b547e0bb6acdf89548cf /oox
parent26fc0fb9b2c66c94078c27ac07ded465cdc50325 (diff)
loplugin:flatten
(cherry picked from commit 2d582244680e7f6dec6e4a466e276f93ccb01dc9) Change-Id: I6560756eb63856a22b43e3e65a7b7843cd2d5376 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109702 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/diagram/diagramlayoutatoms.cxx36
1 files changed, 18 insertions, 18 deletions
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index 58f6da680f97..6e9626c2f9fe 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -836,26 +836,26 @@ void ApplyConstraintToLayout(const Constraint& rConstraint, LayoutPropertyMap& r
}
const LayoutPropertyMap::const_iterator aRef = rProperties.find(rConstraint.msRefForName);
- if (aRef != rProperties.end())
+ if (aRef == rProperties.end())
+ return;
+
+ const LayoutProperty::const_iterator aRefType = aRef->second.find(rConstraint.mnRefType);
+ if (aRefType != aRef->second.end())
+ rProperties[rConstraint.msForName][rConstraint.mnType]
+ = aRefType->second * rConstraint.mfFactor;
+ else
{
- const LayoutProperty::const_iterator aRefType = aRef->second.find(rConstraint.mnRefType);
- if (aRefType != aRef->second.end())
- rProperties[rConstraint.msForName][rConstraint.mnType]
- = aRefType->second * rConstraint.mfFactor;
+ // Values are never in EMU, while oox::drawingml::Shape position and size are always in
+ // EMU.
+ double fUnitFactor = 0;
+ if (isFontUnit(rConstraint.mnRefType))
+ // Points -> EMU.
+ fUnitFactor = EMU_PER_PT;
else
- {
- // Values are never in EMU, while oox::drawingml::Shape position and size are always in
- // EMU.
- double fUnitFactor = 0;
- if (isFontUnit(rConstraint.mnRefType))
- // Points -> EMU.
- fUnitFactor = EMU_PER_PT;
- else
- // Millimeters -> EMU.
- fUnitFactor = EMU_PER_HMM * 100;
- rProperties[rConstraint.msForName][rConstraint.mnType]
- = rConstraint.mfValue * fUnitFactor;
- }
+ // Millimeters -> EMU.
+ fUnitFactor = EMU_PER_HMM * 100;
+ rProperties[rConstraint.msForName][rConstraint.mnType]
+ = rConstraint.mfValue * fUnitFactor;
}
}