summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx8
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx3
-rw-r--r--chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx4
-rw-r--r--chart2/source/tools/AxisHelper.cxx2
-rw-r--r--chart2/source/tools/ThreeDHelper.cxx2
-rw-r--r--chart2/source/view/axes/Tickmarks_Equidistant.cxx3
-rw-r--r--chart2/source/view/charttypes/Splines.cxx3
-rwxr-xr-xchart2/source/view/main/GL3DRenderer.cxx8
-rw-r--r--chart2/source/view/main/VDataSeries.cxx4
9 files changed, 15 insertions, 22 deletions
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index a2c544f065fe..38ff60a1f9ed 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -1539,11 +1539,11 @@ void WrappedVerticalProperty::setPropertyValue( const Any& rOuterValue, const Re
Any WrappedVerticalProperty::getPropertyValue( const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const
throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
- bool bFound = false;
- bool bAmbiguous = false;
Reference< chart2::XDiagram > xDiagram( m_spChart2ModelContact->getChart2Diagram() );
if( xDiagram.is() )
{
+ bool bFound = false;
+ bool bAmbiguous = false;
bool bVertical = DiagramHelper::getVertical( xDiagram, bFound, bAmbiguous );
if( bFound )
m_aOuterValue <<= bVertical;
@@ -1883,11 +1883,11 @@ void WrappedSolidTypeProperty::setPropertyValue( const Any& rOuterValue, const R
Any WrappedSolidTypeProperty::getPropertyValue( const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const
throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
- bool bFound = false;
- bool bAmbiguous = false;
Reference< chart2::XDiagram > xDiagram( m_spChart2ModelContact->getChart2Diagram() );
if( xDiagram.is() )
{
+ bool bFound = false;
+ bool bAmbiguous = false;
sal_Int32 nGeometry = DiagramHelper::getGeometry3D( xDiagram, bFound, bAmbiguous );
if( bFound )
m_aOuterValue <<= nGeometry;
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
index a4930b38f0f4..d9f3ccac74e8 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
@@ -130,12 +130,11 @@ ThreeD_SceneGeometry_TabPage::ThreeD_SceneGeometry_TabPage( vcl::Window* pWindow
m_pMFPerspective->Enable( m_pCbxPerspective->IsChecked() );
//RightAngledAxes
- bool bRightAngledAxes = false;
-
uno::Reference< chart2::XDiagram > xDiagram( m_xSceneProperties, uno::UNO_QUERY );
if( ChartTypeHelper::isSupportingRightAngledAxes(
DiagramHelper::getChartTypeByIndex( xDiagram, 0 ) ) )
{
+ bool bRightAngledAxes = false;
m_xSceneProperties->getPropertyValue( "RightAngledAxes" ) >>= bRightAngledAxes;
m_pCbxRightAngledAxes->SetToggleHdl( LINK( this, ThreeD_SceneGeometry_TabPage, RightAngledAxesToggled ));
m_pCbxRightAngledAxes->Check( bRightAngledAxes );
diff --git a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
index 362f3d9685f3..52451c938d2b 100644
--- a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
@@ -246,11 +246,11 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const Sf
case SCHATTR_BAR_CONNECT:
{
- bool bOldConnectBars = false;
m_bConnectBars = static_cast< const SfxBoolItem & >(
rItemSet.Get( nWhichId )).GetValue();
if( m_bSupportingBarConnectors )
{
+ bool bOldConnectBars = false;
uno::Reference< beans::XPropertySet > xDiagramProperties( ChartModelHelper::findDiagram(m_xChartModel), uno::UNO_QUERY );
if( xDiagramProperties.is() &&
(xDiagramProperties->getPropertyValue( "ConnectBars" ) >>= bOldConnectBars) &&
@@ -265,11 +265,11 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const Sf
case SCHATTR_GROUP_BARS_PER_AXIS:
{
- bool bOldGroupBarsPerAxis = true;
m_bGroupBarsPerAxis = static_cast< const SfxBoolItem & >(
rItemSet.Get( nWhichId )).GetValue();
if( m_bSupportingAxisSideBySide )
{
+ bool bOldGroupBarsPerAxis = true;
uno::Reference< beans::XPropertySet > xDiagramProperties( ChartModelHelper::findDiagram(m_xChartModel), uno::UNO_QUERY );
if( xDiagramProperties.is() &&
(xDiagramProperties->getPropertyValue( "GroupBarsPerAxis" ) >>= bOldGroupBarsPerAxis) &&
diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx
index d60b0311c07c..5da75f39f45a 100644
--- a/chart2/source/tools/AxisHelper.cxx
+++ b/chart2/source/tools/AxisHelper.cxx
@@ -823,9 +823,9 @@ std::vector< Reference< XAxis > > AxisHelper::getAllAxesOfCoordinateSystem(
try
{
Reference< XAxis > xAxis( xCooSys->getAxisByDimension( nDimensionIndex, nAxisIndex ) );
- bool bAddAxis = true;
if( xAxis.is() )
{
+ bool bAddAxis = true;
if( bOnlyVisible )
{
Reference< beans::XPropertySet > xAxisProp( xAxis, uno::UNO_QUERY );
diff --git a/chart2/source/tools/ThreeDHelper.cxx b/chart2/source/tools/ThreeDHelper.cxx
index 068d3bedd004..1ae926115f24 100644
--- a/chart2/source/tools/ThreeDHelper.cxx
+++ b/chart2/source/tools/ThreeDHelper.cxx
@@ -46,9 +46,9 @@ namespace
bool lcl_isRightAngledAxesSetAndSupported( const Reference< beans::XPropertySet >& xSceneProperties )
{
- bool bRightAngledAxes = false;
if( xSceneProperties.is() )
{
+ bool bRightAngledAxes = false;
xSceneProperties->getPropertyValue( "RightAngledAxes") >>= bRightAngledAxes;
if(bRightAngledAxes)
{
diff --git a/chart2/source/view/axes/Tickmarks_Equidistant.cxx b/chart2/source/view/axes/Tickmarks_Equidistant.cxx
index de3c7cf0d87f..a83a73fdbfa5 100644
--- a/chart2/source/view/axes/Tickmarks_Equidistant.cxx
+++ b/chart2/source/view/axes/Tickmarks_Equidistant.cxx
@@ -325,10 +325,9 @@ void EquidistantTickFactory::getAllTicks( TickInfoArraysType& rAllTickInfos ) co
aAllTicks[0].realloc(nMaxMajorTickCount);
sal_Int32 nRealMajorTickCount = 0;
- double* pValue = NULL;
for( sal_Int32 nMajorTick=0; nMajorTick<nMaxMajorTickCount; nMajorTick++ )
{
- pValue = this->getMajorTick( nMajorTick );
+ double* pValue = this->getMajorTick( nMajorTick );
if(!pValue)
continue;
aAllTicks[0][nRealMajorTickCount] = *pValue;
diff --git a/chart2/source/view/charttypes/Splines.cxx b/chart2/source/view/charttypes/Splines.cxx
index ee814eb6a356..aaf8454ea443 100644
--- a/chart2/source/view/charttypes/Splines.cxx
+++ b/chart2/source/view/charttypes/Splines.cxx
@@ -481,10 +481,9 @@ void createKnotVector(const lcl_tSizeType n, const sal_uInt32 p, double* t, doub
{
u[j] = 0.0;
}
- double fSum = 0.0;
for (lcl_tSizeType j = 1; j <= n-p; ++j )
{
- fSum = 0.0;
+ double fSum = 0.0;
for (lcl_tSizeType i = j; i <= j+p-1; ++i)
{
fSum += t[i];
diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx
index 7fe634b116a0..7d06d0d0f5e7 100755
--- a/chart2/source/view/main/GL3DRenderer.cxx
+++ b/chart2/source/view/main/GL3DRenderer.cxx
@@ -1938,17 +1938,15 @@ void OpenGL3DRenderer::RenderScreenTextShape()
for (size_t i = 0; i < m_ScreenTextInfoList.size(); i++)
{
TextInfo textInfo = m_ScreenTextInfoList[i];
- //calc the postition and check whether it can be displayed
- float xTrans = 0.0f;
- float yTrans = 0.0f;
+ //calc the position and check whether it can be displayed
if (textInfo.uniqueId)
{
glm::vec3 worldPos = glm::vec3(m_ScrollMoveMatrix * m_GlobalScaleMatrix * glm::vec4(textInfo.pos, 1));
if ((worldPos.x < m_fMinCoordX) || (worldPos.x > m_fMaxCoordX))
continue;
glm::vec4 pos = m_3DProjection * m_3DView * glm::vec4(worldPos, 1);
- xTrans = pos.x / pos.w;
- yTrans = pos.y / pos.w;
+ const float xTrans = pos.x / pos.w;
+ const float yTrans = pos.y / pos.w;
for (int j = 0; j < 12; j++)
{
if (j % 3 == 0)
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index db15072d2414..043cbaae673c 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -520,13 +520,11 @@ void VDataSeries::getMinMaxXValue(double& fMin, double& fMax) const
if(aValuesX.getLength() > 0)
{
- double aValue;
-
fMax = fMin = aValuesX[0];
for (sal_Int32 i = 1; i < aValuesX.getLength(); i++)
{
- aValue = aValuesX[i];
+ const double aValue = aValuesX[i];
if ( aValue > fMax)
{
fMax = aValue;