summaryrefslogtreecommitdiff
path: root/chart2/source/view/main/VDataSeries.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/view/main/VDataSeries.cxx')
-rw-r--r--chart2/source/view/main/VDataSeries.cxx16
1 files changed, 6 insertions, 10 deletions
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index b9ea9266abd0..003bc9cf9fe5 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -552,10 +552,14 @@ bool VDataSeries::hasExplicitNumberFormat( sal_Int32 nPointIndex, bool bForPerce
{
OUString aPropName = bForPercentage ? OUString("PercentageNumberFormat") : OUString(CHART_UNONAME_NUMFMT);
bool bHasNumberFormat = false;
+ bool bLinkToSource = true;
uno::Reference< beans::XPropertySet > xPointProp( getPropertiesOfPoint( nPointIndex ));
sal_Int32 nNumberFormat = -1;
- if( xPointProp.is() && (xPointProp->getPropertyValue(aPropName) >>= nNumberFormat) )
- bHasNumberFormat = true;
+ if( xPointProp.is() && (xPointProp->getPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT) >>= bLinkToSource))
+ {
+ if( !bLinkToSource && (xPointProp->getPropertyValue(aPropName) >>= nNumberFormat))
+ bHasNumberFormat = true;
+ }
return bHasNumberFormat;
}
sal_Int32 VDataSeries::getExplicitNumberFormat( sal_Int32 nPointIndex, bool bForPercentage ) const
@@ -584,14 +588,6 @@ void VDataSeries::setRoleOfSequenceForDataLabelNumberFormatDetection( const OUSt
else if (rRole == "values-x")
m_pValueSequenceForDataLabelNumberFormatDetection = &m_aValues_X;
}
-bool VDataSeries::shouldLabelNumberFormatKeyBeDetectedFromYAxis() const
-{
- if( m_pValueSequenceForDataLabelNumberFormatDetection == &m_aValues_Bubble_Size )
- return false;
- else if( m_pValueSequenceForDataLabelNumberFormatDetection == &m_aValues_X )
- return false;
- return true;
-}
sal_Int32 VDataSeries::detectNumberFormatKey( sal_Int32 index ) const
{
sal_Int32 nRet = 0;