From f88f6bcfce233c336c9025d466c5c2fb0b671de3 Mon Sep 17 00:00:00 2001
From: Eike Rathke <erack@redhat.com>
Date: Mon, 6 Jun 2016 19:29:18 +0200
Subject: Resolves: tdf#35247 introduce a locale independent numeric field
 filter

... that tries to match a locale independent query string.

Going via string queries is likely only necessary for the ugly
alternative "fieldname[member]" syntax, if it is actually unnecessary
for the field1,item1,... syntax needs to be evaluated and if so a
distinct GetPivotData() function evaluating numeric contraints as well
could be introduced.

Change-Id: I2c1fc81c1022b0bba5eef8d86c0c815bb6e31f2d
Reviewed-on: https://gerrit.libreoffice.org/25975
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
---
 sc/inc/dpcache.hxx | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

(limited to 'sc/inc/dpcache.hxx')

diff --git a/sc/inc/dpcache.hxx b/sc/inc/dpcache.hxx
index 28442ef89552..304f1b59007f 100644
--- a/sc/inc/dpcache.hxx
+++ b/sc/inc/dpcache.hxx
@@ -80,7 +80,7 @@ public:
          */
         IndexArrayType maData;
 
-        sal_uLong mnNumFormat;
+        sal_uInt32 mnNumFormat;
 
         Field();
         Field(const Field&) = delete;
@@ -133,7 +133,13 @@ public:
     const ScDPObjectSet& GetAllReferences() const;
 
     SCROW GetIdByItemData(long nDim, const ScDPItemData& rItem) const;
-    OUString GetFormattedString(long nDim, const ScDPItemData& rItem) const;
+
+    static sal_uInt32 GetLocaleIndependentFormat( SvNumberFormatter& rFormatter, sal_uInt32 nNumFormat );
+    static OUString GetLocaleIndependentFormattedNumberString( double fValue );
+    static OUString GetLocaleIndependentFormattedString( double fValue, SvNumberFormatter& rFormatter, sal_uInt32 nNumFormat );
+    OUString GetFormattedString(long nDim, const ScDPItemData& rItem, bool bLocaleIndependent) const;
+    SvNumberFormatter* GetNumberFormatter() const;
+
     long AppendGroupField();
     void ResetGroupItems(long nDim, const ScDPNumGroupInfo& rNumInfo, sal_Int32 nGroupType);
     SCROW SetGroupItem(long nDim, const ScDPItemData& rData);
@@ -152,7 +158,7 @@ public:
     sal_Int32 GetGroupType(long nDim) const;
 
     SCCOL GetDimensionIndex(const OUString& sName) const;
-    sal_uLong GetNumberFormat( long nDim ) const;
+    sal_uInt32 GetNumberFormat( long nDim ) const;
     bool  IsDateDimension( long nDim ) const ;
     long GetDimMemberCount(long nDim) const;
     static SCROW GetOrder( long nDim, SCROW nIndex );
-- 
cgit