From 8f8fa5674d3853ed8ca6762b512e6b63c53f1039 Mon Sep 17 00:00:00 2001 From: Laurent Balland-Poirier Date: Wed, 4 May 2016 23:47:09 +0200 Subject: tdf#88657 calculate denominator length Get length of denominator which could be different from numerator length Change-Id: I9f5c10917185eb029d52efbc0f20be5f81c74d10 Reviewed-on: https://gerrit.libreoffice.org/24712 Tested-by: Jenkins Reviewed-by: Eike Rathke Tested-by: Eike Rathke --- xmloff/source/style/xmlnumfe.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'xmloff') diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 9494439bd69b..218321e91f58 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -1470,8 +1470,10 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt // min-integer-digits attribute must be written. nInteger = -1; } - sal_Int32 nDenominator = rFormat.GetForcedDenominatorForType( nPart ); - WriteFractionElement_Impl( nInteger, bThousand, nPrecision, nPrecision, nDenominator ); + OUString aDenominatorString = rFormat.GetDenominatorString( nPart ); + sal_Int32 nDenominator = aDenominatorString.toInt32(); + sal_Int32 nDenominatorLength = aDenominatorString.getLength(); + WriteFractionElement_Impl( nInteger, bThousand, nPrecision, nDenominatorLength, nDenominator ); bAnyContent = true; } break; -- cgit