sc/source/core/data/dpoutput.cxx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
New commits: commit be8e049d01f05773ac595b5ee32b262540381a44 Author: Kohei Yoshida <kohei.yosh...@suse.com> Date: Tue Jan 24 16:32:10 2012 -0500 fdo#45067: Differentiate numeric and non-numeric field member values. Signed-off-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index 990e212..32179e3 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -795,10 +795,18 @@ void ScDPOutput::HeaderCell( SCCOL nCol, SCROW nRow, SCTAB nTab, if ( nFlags & sheet::MemberResultFlags::HASMEMBER ) { - // Avoid unwanted automatic format detection. + bool bNumeric = (nFlags & sheet::MemberResultFlags::NUMERIC) != 0; ScSetStringParam aParam; - aParam.mbDetectNumberFormat = false; - aParam.mbSetTextCellFormat = true; + if (bNumeric) + { + aParam.mbDetectNumberFormat = true; + aParam.mbSetTextCellFormat = false; + } + else + { + aParam.mbDetectNumberFormat = false; + aParam.mbSetTextCellFormat = true; + } pDoc->SetString(nCol, nRow, nTab, rData.Caption, &aParam); } _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits