diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-02 12:06:45 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-02 20:07:00 +0200 |
commit | ff7e960701ccacbd62bd2251f26561eeba8ebe8a (patch) | |
tree | 1adb4b20e453804203cb95721c7d5bc92795e1e6 /reportdesign/source/ui/inspection/DataProviderHandler.cxx | |
parent | 4acb0e7f05fa7fe05f990786e0483e20962af1d9 (diff) |
loplugin:flatten in reportdesign
Change-Id: I6d8b2730cede4453e7afd581cc24ed101ca6c81b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91557
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign/source/ui/inspection/DataProviderHandler.cxx')
-rw-r--r-- | reportdesign/source/ui/inspection/DataProviderHandler.cxx | 34 |
1 files changed, 17 insertions, 17 deletions
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<chart2::XTitled> xTitled(m_xChartModel,uno::UNO_QUERY); - if ( xTitled.is() ) + if ( !xTitled.is() ) + return; + + uno::Reference<chart2::XTitle> xTitle = xTitled->getTitleObject(); + if ( !xTitle.is() ) { - uno::Reference<chart2::XTitle> 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); } } |