summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-01-25 16:43:24 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-01-25 16:59:57 -0500
commitd0b94f5cfefe89cacc4fd4230396c1d34e4d2cfe (patch)
treee8ab44850adae518ddb226a52a72cbe71a6b02e2 /chart2
parentebed43f4d2bc42784c7acc6014aedb397b2356fd (diff)
String cleanup.
Change-Id: Ib796e2a101f08f01eb438e8d48c7bffbbd3b19b0
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/main/VDataSeries.cxx59
1 files changed, 30 insertions, 29 deletions
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index 3c987d60aa72..60efc95a6079 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -215,26 +215,26 @@ VDataSeries::VDataSeries( const uno::Reference< XDataSeries >& xDataSeries )
{
try
{
- uno::Any aARole = xProp->getPropertyValue( C2U( "Role" ) );
+ uno::Any aARole = xProp->getPropertyValue("Role");
rtl::OUString aRole;
aARole >>= aRole;
- if( aRole.equals(C2U("values-x")) )
+ if (aRole == "values-x")
{
m_aValues_X.init( xDataSequence );
lcl_clearIfNoValuesButTextIsContained( m_aValues_X, xDataSequence );
}
- else if( aRole.equals(C2U("values-y")) )
+ else if (aRole =="values-y")
m_aValues_Y.init( xDataSequence );
- else if( aRole.equals(C2U("values-min")) )
+ else if (aRole == "values-min")
m_aValues_Y_Min.init( xDataSequence );
- else if( aRole.equals(C2U("values-max")) )
+ else if (aRole == "values-max")
m_aValues_Y_Max.init( xDataSequence );
- else if( aRole.equals(C2U("values-first")) )
+ else if (aRole == "values-first")
m_aValues_Y_First.init( xDataSequence );
- else if( aRole.equals(C2U("values-last")) )
+ else if (aRole == "values-last")
m_aValues_Y_Last.init( xDataSequence );
- else if( aRole.equals(C2U("values-size")) )
+ else if (aRole == "values-size")
m_aValues_Bubble_Size.init( xDataSequence );
}
catch( const uno::Exception& e )
@@ -265,11 +265,11 @@ VDataSeries::VDataSeries( const uno::Reference< XDataSeries >& xDataSeries )
try
{
//get AttributedDataPoints
- xProp->getPropertyValue( C2U( "AttributedDataPoints" ) ) >>= m_aAttributedDataPointIndexList;
+ xProp->getPropertyValue("AttributedDataPoints") >>= m_aAttributedDataPointIndexList;
- xProp->getPropertyValue( C2U( "StackingDirection" ) ) >>= m_eStackingDirection;
+ xProp->getPropertyValue("StackingDirection") >>= m_eStackingDirection;
- xProp->getPropertyValue( C2U( "AttachedAxisIndex" ) ) >>= m_nAxisIndex;
+ xProp->getPropertyValue("AttachedAxisIndex") >>= m_nAxisIndex;
if(m_nAxisIndex<0)
m_nAxisIndex=0;
}
@@ -390,7 +390,7 @@ rtl::OUString VDataSeries::getErrorBarsCID(bool bYError) const
{
rtl::OUString aChildParticle( ObjectIdentifier::getStringForType(
bYError ? OBJECTTYPE_DATA_ERRORS_Y : OBJECTTYPE_DATA_ERRORS_X ) );
- aChildParticle+=(C2U("="));
+ aChildParticle += "=";
return ObjectIdentifier::createClassifiedIdentifierForParticles(
m_aSeriesParticle, aChildParticle );
@@ -398,7 +398,7 @@ rtl::OUString VDataSeries::getErrorBarsCID(bool bYError) const
rtl::OUString VDataSeries::getLabelsCID() const
{
rtl::OUString aChildParticle( ObjectIdentifier::getStringForType( OBJECTTYPE_DATA_LABELS ) );
- aChildParticle+=(C2U("="));
+ aChildParticle += "=";
return ObjectIdentifier::createClassifiedIdentifierForParticles(
m_aSeriesParticle, aChildParticle );
@@ -538,7 +538,7 @@ double VDataSeries::getBubble_Size( sal_Int32 index ) const
bool VDataSeries::hasExplicitNumberFormat( sal_Int32 nPointIndex, bool bForPercentage ) const
{
- rtl::OUString aPropName( bForPercentage ? C2U( "PercentageNumberFormat" ) : C2U( "NumberFormat" ) );
+ OUString aPropName = bForPercentage ? OUString("PercentageNumberFormat") : OUString("NumberFormat");
bool bHasNumberFormat = false;
uno::Reference< beans::XPropertySet > xPointProp( this->getPropertiesOfPoint( nPointIndex ));
sal_Int32 nNumberFormat = -1;
@@ -548,7 +548,7 @@ bool VDataSeries::hasExplicitNumberFormat( sal_Int32 nPointIndex, bool bForPerce
}
sal_Int32 VDataSeries::getExplicitNumberFormat( sal_Int32 nPointIndex, bool bForPercentage ) const
{
- rtl::OUString aPropName( bForPercentage ? C2U( "PercentageNumberFormat" ) : C2U( "NumberFormat" ) );
+ OUString aPropName = bForPercentage ? OUString("PercentageNumberFormat") : OUString("NumberFormat");
sal_Int32 nNumberFormat = -1;
uno::Reference< beans::XPropertySet > xPointProp( this->getPropertiesOfPoint( nPointIndex ));
if( xPointProp.is() )
@@ -557,19 +557,19 @@ sal_Int32 VDataSeries::getExplicitNumberFormat( sal_Int32 nPointIndex, bool bFor
}
void VDataSeries::setRoleOfSequenceForDataLabelNumberFormatDetection( const rtl::OUString& rRole )
{
- if( rRole.equals(C2U("values-y")) )
+ if (rRole == "values-y")
m_pValueSequenceForDataLabelNumberFormatDetection = &m_aValues_Y;
- else if( rRole.equals(C2U("values-size")) )
+ else if (rRole == "values-size")
m_pValueSequenceForDataLabelNumberFormatDetection = &m_aValues_Bubble_Size;
- else if( rRole.equals(C2U("values-min")) )
+ else if (rRole == "values-min")
m_pValueSequenceForDataLabelNumberFormatDetection = &m_aValues_Y_Min;
- else if( rRole.equals(C2U("values-max")) )
+ else if (rRole == "values-max")
m_pValueSequenceForDataLabelNumberFormatDetection = &m_aValues_Y_Max;
- else if( rRole.equals(C2U("values-first")) )
+ else if (rRole == "values-first")
m_pValueSequenceForDataLabelNumberFormatDetection = &m_aValues_Y_First;
- else if( rRole.equals(C2U("values-last")) )
+ else if (rRole == "values-last")
m_pValueSequenceForDataLabelNumberFormatDetection = &m_aValues_Y_Last;
- else if( rRole.equals(C2U("values-x")) )
+ else if (rRole == "values-x")
m_pValueSequenceForDataLabelNumberFormatDetection = &m_aValues_X;
}
bool VDataSeries::shouldLabelNumberFormatKeyBeDetectedFromYAxis() const
@@ -595,7 +595,7 @@ sal_Int32 VDataSeries::getLabelPlacement( sal_Int32 nPointIndex, const uno::Refe
{
uno::Reference< beans::XPropertySet > xPointProps( this->getPropertiesOfPoint( nPointIndex ) );
if( xPointProps.is() )
- xPointProps->getPropertyValue( C2U( "LabelPlacement" ) ) >>= nLabelPlacement;
+ xPointProps->getPropertyValue("LabelPlacement") >>= nLabelPlacement;
//ensure that the set label placement is supported by this charttype
@@ -737,7 +737,8 @@ double VDataSeries::getYMeanValue() const
{
if( ::rtl::math::isNan( m_fYMeanValue ) )
{
- uno::Reference< XRegressionCurveCalculator > xCalculator( RegressionCurveHelper::createRegressionCurveCalculatorByServiceName( C2U("com.sun.star.chart2.MeanValueRegressionCurve") ) );
+ uno::Reference< XRegressionCurveCalculator > xCalculator(
+ RegressionCurveHelper::createRegressionCurveCalculatorByServiceName("com.sun.star.chart2.MeanValueRegressionCurve"));
uno::Sequence< double > aXValuesDummy;
xCalculator->recalculateRegression( aXValuesDummy, getAllY() );
double fXDummy = 1.0;
@@ -829,7 +830,7 @@ uno::Reference< beans::XPropertySet > VDataSeries::getXErrorBarProperties( sal_I
uno::Reference< beans::XPropertySet > xPointProp( this->getPropertiesOfPoint( index ));
if( xPointProp.is() )
- xPointProp->getPropertyValue( C2U( "ErrorBarX" )) >>= xErrorBarProp;
+ xPointProp->getPropertyValue("ErrorBarX") >>= xErrorBarProp;
return xErrorBarProp;
}
@@ -839,7 +840,7 @@ uno::Reference< beans::XPropertySet > VDataSeries::getYErrorBarProperties( sal_I
uno::Reference< beans::XPropertySet > xPointProp( this->getPropertiesOfPoint( index ));
if( xPointProp.is() )
- xPointProp->getPropertyValue( C2U( "ErrorBarY" )) >>= xErrorBarProp;
+ xPointProp->getPropertyValue("ErrorBarY") >>= xErrorBarProp;
return xErrorBarProp;
}
@@ -851,7 +852,7 @@ bool VDataSeries::hasPointOwnColor( sal_Int32 index ) const
try
{
uno::Reference< beans::XPropertyState > xPointState( this->getPropertiesOfPoint(index), uno::UNO_QUERY_THROW );
- return (xPointState->getPropertyState( C2U("Color")) != beans::PropertyState_DEFAULT_VALUE );
+ return (xPointState->getPropertyState("Color") != beans::PropertyState_DEFAULT_VALUE );
}
catch(const uno::Exception& e)
{
@@ -878,7 +879,7 @@ bool VDataSeries::isVaryColorsByPoint() const
bool bVaryColorsByPoint = false;
Reference< beans::XPropertySet > xSeriesProp( this->getPropertiesOfSeries() );
if( xSeriesProp.is() )
- xSeriesProp->getPropertyValue( C2U("VaryColorsByPoint") ) >>= bVaryColorsByPoint;
+ xSeriesProp->getPropertyValue("VaryColorsByPoint") >>= bVaryColorsByPoint;
return bVaryColorsByPoint;
}
@@ -901,7 +902,7 @@ DataPointLabel* getDataPointLabelFromPropertySet( const uno::Reference< beans::X
SAL_WNODEPRECATED_DECLARATIONS_POP
try
{
- if( !(xProp->getPropertyValue( C2U( "Label" ) ) >>= *apLabel) )
+ if( !(xProp->getPropertyValue("Label") >>= *apLabel) )
apLabel.reset();
}
catch(const uno::Exception &e)