summaryrefslogtreecommitdiff
path: root/chart2/source/tools/DiagramHelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/tools/DiagramHelper.cxx')
-rw-r--r--chart2/source/tools/DiagramHelper.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx
index 801c40e2ce52..b9c8e58eda14 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -1186,7 +1186,7 @@ sal_Int32 DiagramHelper::getPercentNumberFormat( const Reference< util::XNumberF
SvNumberFormatter* pNumFormatter = aNumberFormatterWrapper.getSvNumberFormatter();
if( pNumFormatter )
{
- nRet = pNumFormatter->GetStandardFormat( SvNumFormatType::PERCENT, rLanguageTag.getLanguageType() );
+ nRet = pNumFormatter->GetFormatIndex( NF_PERCENT_INT, rLanguageTag.getLanguageType() );
}
else
{
@@ -1197,6 +1197,10 @@ sal_Int32 DiagramHelper::getPercentNumberFormat( const Reference< util::XNumberF
rLanguageTag.getLocale(), true/*bCreate*/ );
if( aKeySeq.getLength() )
{
+ // This *assumes* the sequence is sorted as in
+ // NfIndexTableOffset and the first format is the integer 0%
+ // format by chance.. which usually is the case, but.. anyway,
+ // we usually also have a number formatter so don't reach here.
nRet = aKeySeq[0];
}
}