[Libreoffice-commits] .: sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Tue Jan 24 14:17:29 PST 2012
sc/source/core/data/dpoutput.cxx | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
New commits:
commit c4431fda193d1aa28aafbdd440a77aebb9b78014
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date: Tue Jan 24 17:17:05 2012 -0500
fdo#45067: Differentiate numeric and non-numeric field member values.
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index c5bb124..32179e3 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);
}
More information about the Libreoffice-commits
mailing list