From ff7e960701ccacbd62bd2251f26561eeba8ebe8a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 2 Apr 2020 12:06:45 +0200 Subject: loplugin:flatten in reportdesign Change-Id: I6d8b2730cede4453e7afd581cc24ed101ca6c81b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91557 Tested-by: Noel Grandin Reviewed-by: Noel Grandin --- .../source/ui/inspection/DataProviderHandler.cxx | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'reportdesign/source/ui/inspection/DataProviderHandler.cxx') diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx b/reportdesign/source/ui/inspection/DataProviderHandler.cxx index c6ed5b1836d9..52677c9a79f7 100644 --- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx +++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx @@ -230,24 +230,24 @@ void SAL_CALL DataProviderHandler::setPropertyValue(const OUString & PropertyNam void DataProviderHandler::impl_updateChartTitle_throw(const uno::Any& _aValue) { uno::Reference xTitled(m_xChartModel,uno::UNO_QUERY); - if ( xTitled.is() ) + if ( !xTitled.is() ) + return; + + uno::Reference xTitle = xTitled->getTitleObject(); + if ( !xTitle.is() ) { - uno::Reference xTitle = xTitled->getTitleObject(); - if ( !xTitle.is() ) - { - xTitle.set(m_xContext->getServiceManager()->createInstanceWithContext("com.sun.star.chart2.Title",m_xContext),uno::UNO_QUERY); - xTitled->setTitleObject(xTitle); - } - if ( xTitle.is() ) - { - uno::Reference< chart2::XFormattedString2> xFormatted = chart2::FormattedString::create(m_xContext); - OUString sStr; - _aValue >>= sStr; - xFormatted->setString(sStr); - uno::Sequence< uno::Reference< chart2::XFormattedString> > aArgs(1); - aArgs[0] = xFormatted; - xTitle->setText(aArgs); - } + xTitle.set(m_xContext->getServiceManager()->createInstanceWithContext("com.sun.star.chart2.Title",m_xContext),uno::UNO_QUERY); + xTitled->setTitleObject(xTitle); + } + if ( xTitle.is() ) + { + uno::Reference< chart2::XFormattedString2> xFormatted = chart2::FormattedString::create(m_xContext); + OUString sStr; + _aValue >>= sStr; + xFormatted->setString(sStr); + uno::Sequence< uno::Reference< chart2::XFormattedString> > aArgs(1); + aArgs[0] = xFormatted; + xTitle->setText(aArgs); } } -- cgit