Hi there,
I've found a better way to fix it. Attached is tailored specifically
for the 3-5 branch.
I'll port this fix to master separately since master has my earlier
commit that would make this patch not apply without adjusting.
Again, this fixes
https://bugs.freedesktop.org/show_bug.cgi?id=45067
Since we've already branched for 3.5.0, I'll need three sign-off's to
get this piece into 3.5.0 final. Reviews and sign-off will be
appreciated.
Kohei
P.S. This NUMERIC flag was used exactly for this purpose prior to the
rework of the data pilot data cache code done by IBM/Sun back in the old
days (around the OOo 3.3 release period). During the rework this check
was unfortunately removed, which probably introduced the original issue
I "fixed" for fdo#42169 (though apparently my fix was not entirely
correct).
--
Kohei Yoshida, LibreOffice hacker, Calc
From 6bdd9f6d5c4bfd9066384539454fad87eeebafc8 Mon Sep 17 00:00:00 2001
From: Kohei Yoshida <kohei.yoshida@suse.com>
Date: Tue, 24 Jan 2012 16:32:10 -0500
Subject: [PATCH] fdo#45067: Differentiate numeric and non-numeric field member values.
---
sc/source/core/data/dpoutput.cxx | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
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);
}
--
1.7.3.4
Context
- [Libreoffice] [REVIEW][3-5] Fix pivot table's date and number grouping, take 2 · Kohei Yoshida
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.