diff options
author | Ćukasz Hryniuk <lukasz.hryniuk@wp.pl> | 2015-01-04 22:50:05 +0100 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-01-07 06:47:04 +0000 |
commit | 9fd89a5952a48b473cee03a2681eb5d4cd6d1742 (patch) | |
tree | 1fbf98ba46e86989826adf5d559f51c82d59a5e5 /chart2 | |
parent | a527ad98e58a7fc9af482f9088687d82e5c52cca (diff) |
fdo#39440 reduce scope of local variables
Beside scope changes, it fixes lack of initialization in a few places.
Change-Id: Ia09fdb9845d8ac17256330a5ec5168401c84f0f2
Reviewed-on: https://gerrit.libreoffice.org/13755
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/main/DrawCommandDispatch.cxx | 2 | ||||
-rw-r--r-- | chart2/source/tools/AxisHelper.cxx | 2 | ||||
-rw-r--r-- | chart2/source/tools/DiagramHelper.cxx | 5 |
3 files changed, 4 insertions, 5 deletions
diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx index af43e753ef57..8804bb9fcb26 100644 --- a/chart2/source/controller/main/DrawCommandDispatch.cxx +++ b/chart2/source/controller/main/DrawCommandDispatch.cxx @@ -287,13 +287,13 @@ void DrawCommandDispatch::execute( const OUString& rCommand, const Sequence< bea ChartDrawMode eDrawMode = CHARTDRAW_SELECT; SdrObjKind eKind = OBJ_NONE; - bool bCreate = false; sal_uInt16 nFeatureId = 0; OUString aBaseCommand; OUString aCustomShapeType; if ( parseCommandURL( rCommand, &nFeatureId, &aBaseCommand, &aCustomShapeType ) ) { + bool bCreate = false; m_nFeatureId = nFeatureId; m_aCustomShapeType = aCustomShapeType; diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx index fc475d6b67a5..70b4a803c6ef 100644 --- a/chart2/source/tools/AxisHelper.cxx +++ b/chart2/source/tools/AxisHelper.cxx @@ -136,7 +136,6 @@ sal_Int32 AxisHelper::getExplicitNumberFormatKeyForAxis( , bool bSearchForParallelAxisIfNothingIsFound ) { sal_Int32 nNumberFormatKey(0); - bool bNumberFormatKeyFoundViaAttachedData = false; sal_Int32 nAxisIndex = 0; sal_Int32 nDimensionIndex = 1; AxisHelper::getIndicesForAxis( xAxis, xCorrespondingCoordinateSystem, nDimensionIndex, nAxisIndex ); @@ -235,6 +234,7 @@ sal_Int32 AxisHelper::getExplicitNumberFormatKeyForAxis( { typedef ::std::map< sal_Int32, sal_Int32 > tNumberformatFrequency; tNumberformatFrequency aKeyMap; + bool bNumberFormatKeyFoundViaAttachedData = false; try { diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx index 77058510ca34..82dca03fcd16 100644 --- a/chart2/source/tools/DiagramHelper.cxx +++ b/chart2/source/tools/DiagramHelper.cxx @@ -1297,11 +1297,10 @@ bool lcl_moveSeriesOrCheckIfMoveIsAllowed( { uno::Reference< XCoordinateSystemContainer > xCooSysContainer( xDiagram, uno::UNO_QUERY ); - //find position of series. - bool bFound = false; - if( xGivenDataSeries.is() && xCooSysContainer.is() ) { + //find position of series. + bool bFound = false; uno::Sequence< uno::Reference< XCoordinateSystem > > aCooSysList( xCooSysContainer->getCoordinateSystems() ); for( sal_Int32 nCS = 0; !bFound && nCS < aCooSysList.getLength(); ++nCS ) |