From c6cd931d67cf491ea442f615d2e0796cb45c8449 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 5 Aug 2020 20:35:16 +0200 Subject: loplugin:flatten in xml/transform Change-Id: Ib428dca2e0afffd53f2f3a2c66682b60e8be43b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100190 Tested-by: Jenkins Reviewed-by: Noel Grandin --- xmloff/source/transform/StyleOOoTContext.cxx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'xmloff/source/transform/StyleOOoTContext.cxx') diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx index 656d9050d156..ccf445adbe9a 100644 --- a/xmloff/source/transform/StyleOOoTContext.cxx +++ b/xmloff/source/transform/StyleOOoTContext.cxx @@ -978,19 +978,19 @@ void XMLPropertiesOOoTContext_Impl::StartElement( pProtectContext->AddAttribute( GetTransformer().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_STYLE, GetXMLToken( XML_PROTECT ) ), aProtectAttrValue ); } - if( pIntervalMinorDivisorContext ) + if( !pIntervalMinorDivisorContext ) + return; + + if( fIntervalMinor != 0.0 ) { - if( fIntervalMinor != 0.0 ) - { - sal_Int32 nIntervalMinorDivisor = static_cast< sal_Int32 >( - ::rtl::math::round( fIntervalMajor / fIntervalMinor )); - - pIntervalMinorDivisorContext->AddAttribute( - GetTransformer().GetNamespaceMap().GetQNameByKey( - XML_NAMESPACE_CHART, - GetXMLToken( XML_INTERVAL_MINOR_DIVISOR )), - OUString::number( nIntervalMinorDivisor )); - } + sal_Int32 nIntervalMinorDivisor = static_cast< sal_Int32 >( + ::rtl::math::round( fIntervalMajor / fIntervalMinor )); + + pIntervalMinorDivisorContext->AddAttribute( + GetTransformer().GetNamespaceMap().GetQNameByKey( + XML_NAMESPACE_CHART, + GetXMLToken( XML_INTERVAL_MINOR_DIVISOR )), + OUString::number( nIntervalMinorDivisor )); } } -- cgit