[Libreoffice-commits] .: Branch 'libreoffice-3-5-0' - sc/source
Markus Mohrhard
mmohrhard at kemper.freedesktop.org
Wed Jan 25 13:15:48 PST 2012
sc/source/core/data/dpoutput.cxx | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
New commits:
commit be8e049d01f05773ac595b5ee32b262540381a44
Author: Kohei Yoshida <kohei.yoshida at 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.mohrhard at 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);
}
More information about the Libreoffice-commits
mailing list