diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2015-01-17 02:00:35 +0100 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-01-19 08:39:32 +0000 |
commit | bfe79b50bce44707cb2416e6ff6b7441491967bb (patch) | |
tree | bc439d804193c01baa2f78bdf794169e912bf749 /xmloff/source/chart | |
parent | 08f9bd504de9bcb267a0e71b07759080592bd0d8 (diff) |
fdo#39440 reduce scope of local variables
This addresses some cppcheck warnings.
Change-Id: If7ad3584b3124ed0b337836071af1a5bd0451d85
Reviewed-on: https://gerrit.libreoffice.org/13972
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'xmloff/source/chart')
-rw-r--r-- | xmloff/source/chart/SchXMLExport.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLImport.cxx | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index ca25f2b98ab0..f854708f3566 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -1898,10 +1898,11 @@ void SchXMLExportHelper_Impl::exportPlotArea( if( xDocProp.is()) { Any aAny; - bool bFirstCol = false, bFirstRow = false; try { + bool bFirstCol = false, bFirstRow = false; + aAny = xDocProp->getPropertyValue( OUString( "DataSourceLabelsInFirstColumn" )); aAny >>= bFirstCol; diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx index ce11bea12497..ca1f63c02353 100644 --- a/xmloff/source/chart/SchXMLImport.cxx +++ b/xmloff/source/chart/SchXMLImport.cxx @@ -620,9 +620,10 @@ void SAL_CALL SchXMLImport::setTargetDocument( const uno::Reference< lang::XComp uno::Reference< container::XChild > xChild( xChartDoc, uno::UNO_QUERY ); uno::Reference< chart2::data::XDataReceiver > xDataReceiver( xChartDoc, uno::UNO_QUERY ); - bool bHasOwnData = true; if( xChild.is() && xDataReceiver.is()) { + bool bHasOwnData = true; + Reference< lang::XMultiServiceFactory > xFact( xChild->getParent(), uno::UNO_QUERY ); if( xFact.is() ) { |