Kaydet (Commit) c4431fda authored tarafından Kohei Yoshida's avatar Kohei Yoshida

fdo#45067: Differentiate numeric and non-numeric field member values.

üst d947fb8a
...@@ -795,11 +795,18 @@ void ScDPOutput::HeaderCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ...@@ -795,11 +795,18 @@ void ScDPOutput::HeaderCell( SCCOL nCol, SCROW nRow, SCTAB nTab,
if ( nFlags & sheet::MemberResultFlags::HASMEMBER ) if ( nFlags & sheet::MemberResultFlags::HASMEMBER )
{ {
// We need automatic number format detection here. Date and number bool bNumeric = (nFlags & sheet::MemberResultFlags::NUMERIC) != 0;
// grouping functionality depend on it.
ScSetStringParam aParam; ScSetStringParam aParam;
aParam.mbDetectNumberFormat = true; if (bNumeric)
aParam.mbSetTextCellFormat = false; {
aParam.mbDetectNumberFormat = true;
aParam.mbSetTextCellFormat = false;
}
else
{
aParam.mbDetectNumberFormat = false;
aParam.mbSetTextCellFormat = true;
}
pDoc->SetString(nCol, nRow, nTab, rData.Caption, &aParam); pDoc->SetString(nCol, nRow, nTab, rData.Caption, &aParam);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment