[Libreoffice-commits] .: chart2/source
Julien Nabet
serval2412 at kemper.freedesktop.org
Sat Feb 5 04:38:45 PST 2011
chart2/source/tools/TitleHelper.cxx | 4 +++-
chart2/source/view/axes/VPolarAngleAxis.cxx | 2 +-
chart2/source/view/charttypes/PieChart.cxx | 3 +--
chart2/source/view/main/LabelPositionHelper.cxx | 4 ++--
4 files changed, 7 insertions(+), 6 deletions(-)
New commits:
commit edb738c85d3cea1121473b9826c138fd6794691b
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Feb 5 13:36:51 2011 +0100
Some cppcheck cleaning
diff --git a/chart2/source/tools/TitleHelper.cxx b/chart2/source/tools/TitleHelper.cxx
index f843cf9..966bde0 100644
--- a/chart2/source/tools/TitleHelper.cxx
+++ b/chart2/source/tools/TitleHelper.cxx
@@ -229,12 +229,14 @@ uno::Reference< XTitle > TitleHelper::createTitle(
Reference< beans::XPropertySet > xTitleProps( xTitle, uno::UNO_QUERY );
if( xTitleProps.is() )
{
- double fNewAngleDegree = 90.0;
if( (!bIsVertical && eTitleType == TitleHelper::Y_AXIS_TITLE)
|| (bIsVertical && eTitleType == TitleHelper::X_AXIS_TITLE)
|| (!bIsVertical && eTitleType == TitleHelper::SECONDARY_Y_AXIS_TITLE)
|| (bIsVertical && eTitleType == TitleHelper::SECONDARY_X_AXIS_TITLE) )
+ {
+ double fNewAngleDegree = 90.0;
xTitleProps->setPropertyValue( C2U( "TextRotation" ), uno::makeAny( fNewAngleDegree ));
+ }
}
}
catch( uno::Exception & ex )
diff --git a/chart2/source/view/axes/VPolarAngleAxis.cxx b/chart2/source/view/axes/VPolarAngleAxis.cxx
index a412065..97c91ed 100644
--- a/chart2/source/view/axes/VPolarAngleAxis.cxx
+++ b/chart2/source/view/axes/VPolarAngleAxis.cxx
@@ -179,7 +179,6 @@ void SAL_CALL VPolarAngleAxis::createLabels()
return;
double fLogicRadius = m_pPosHelper->getOuterLogicRadius();
- double fLogicZ = -0.5;//as defined
if( m_aAxisProperties.m_bDisplayLabels )
{
@@ -197,6 +196,7 @@ void SAL_CALL VPolarAngleAxis::createLabels()
AxisLabelProperties aAxisLabelProperties( m_aAxisLabelProperties );
aAxisLabelProperties.bOverlapAllowed = true;
+ double fLogicZ = -0.5;//as defined
while( !createTextShapes_ForAngleAxis( m_xTextTarget, aTickIter
, aAxisLabelProperties
, fLogicRadius, fLogicZ
diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx
index 52757cc..4ab5cf6 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -395,9 +395,7 @@ void PieChart::createShapes()
if( !bIsVisible )
continue;
- double fLogicZ = -0.5;//as defined
double fDepth = this->getTransformedDepth();
-//=============================================================================
uno::Reference< drawing::XShapes > xSeriesGroupShape_Shapes = getSeriesGroupShape(pSeries, xSeriesTarget);
//collect data point information (logic coordinates, style ):
@@ -448,6 +446,7 @@ void PieChart::createShapes()
}
//create data point
+ double fLogicZ = -0.5;//as defined
uno::Reference<drawing::XShape> xPointShape(
createDataPoint( xSeriesGroupShape_Shapes, xPointProperties
, fUnitCircleStartAngleDegree, fUnitCircleWidthAngleDegree
diff --git a/chart2/source/view/main/LabelPositionHelper.cxx b/chart2/source/view/main/LabelPositionHelper.cxx
index 18b2f4f..3053262 100644
--- a/chart2/source/view/main/LabelPositionHelper.cxx
+++ b/chart2/source/view/main/LabelPositionHelper.cxx
@@ -99,10 +99,10 @@ void lcl_doDynamicFontResize( uno::Any* pAOldAndNewFontHeightAny
, const awt::Size& rOldReferenceSize
, const awt::Size& rNewReferenceSize )
{
- double fOldFontHeight = 0, fNewFontHeight;
+ double fOldFontHeight = 0;
if( pAOldAndNewFontHeightAny && ( *pAOldAndNewFontHeightAny >>= fOldFontHeight ) )
{
- fNewFontHeight = RelativeSizeHelper::calculate( fOldFontHeight, rOldReferenceSize, rNewReferenceSize );
+ double fNewFontHeight = RelativeSizeHelper::calculate( fOldFontHeight, rOldReferenceSize, rNewReferenceSize );
*pAOldAndNewFontHeightAny = uno::makeAny(fNewFontHeight);
}
}
More information about the Libreoffice-commits
mailing list