summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/core/data/dpoutput.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index 990e2126d7ed..c5bb1248d07a 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -795,10 +795,11 @@ void ScDPOutput::HeaderCell( SCCOL nCol, SCROW nRow, SCTAB nTab,
if ( nFlags & sheet::MemberResultFlags::HASMEMBER )
{
- // Avoid unwanted automatic format detection.
+ // We need automatic number format detection here. Date and number
+ // grouping functionality depend on it.
ScSetStringParam aParam;
- aParam.mbDetectNumberFormat = false;
- aParam.mbSetTextCellFormat = true;
+ aParam.mbDetectNumberFormat = true;
+ aParam.mbSetTextCellFormat = false;
pDoc->SetString(nCol, nRow, nTab, rData.Caption, &aParam);
}