diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-01-24 17:17:05 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-01-24 17:17:40 -0500 |
commit | c4431fda193d1aa28aafbdd440a77aebb9b78014 (patch) | |
tree | ab09d84b32302708be76d1de23bf344aec29ab0e /sc/source/core/data/dpoutput.cxx | |
parent | d947fb8a6c69a9144ed2d00de4521e86925b0d48 (diff) |
fdo#45067: Differentiate numeric and non-numeric field member values.
Diffstat (limited to 'sc/source/core/data/dpoutput.cxx')
-rw-r--r-- | sc/source/core/data/dpoutput.cxx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index c5bb1248d07a..32179e3807aa 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -795,11 +795,18 @@ void ScDPOutput::HeaderCell( SCCOL nCol, SCROW nRow, SCTAB nTab, if ( nFlags & sheet::MemberResultFlags::HASMEMBER ) { - // We need automatic number format detection here. Date and number - // grouping functionality depend on it. + bool bNumeric = (nFlags & sheet::MemberResultFlags::NUMERIC) != 0; ScSetStringParam aParam; - aParam.mbDetectNumberFormat = true; - aParam.mbSetTextCellFormat = false; + if (bNumeric) + { + aParam.mbDetectNumberFormat = true; + aParam.mbSetTextCellFormat = false; + } + else + { + aParam.mbDetectNumberFormat = false; + aParam.mbSetTextCellFormat = true; + } pDoc->SetString(nCol, nRow, nTab, rData.Caption, &aParam); } |