Blob Blame History Raw
From 1770ed56fe8fc163ae4b1d5233bf383af46a2c5d Mon Sep 17 00:00:00 2001
Message-Id: <1770ed56fe8fc163ae4b1d5233bf383af46a2c5d.1437151407.git.erack@redhat.com>
From: Eike Rathke <erack@redhat.com>
Date: Fri, 17 Jul 2015 18:14:27 +0200
Subject: [PATCH] Resolves: tdf#92767 use ISO 8601 for internal date string
 representation
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------erAck-patch-parts"

This is a multi-part message in MIME format.
--------------erAck-patch-parts
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit


Change-Id: I481bf3295feb64827de2122234a9300d0b8ced40
(cherry picked from commit 3e17ed1fc2845da5a279d21ffa3ea51d637e515e)
---
 sc/source/core/data/column3.cxx | 4 ++++
 1 file changed, 4 insertions(+)


--------------erAck-patch-parts
Content-Type: text/x-patch; name="0001-Resolves-tdf-92767-use-ISO-8601-for-internal-date-st.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0001-Resolves-tdf-92767-use-ISO-8601-for-internal-date-st.patch"

diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 90f9b65..3f0ebd4 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -1965,6 +1965,10 @@ class FilterEntriesHandler
             fVal = rtl::math::approxFloor(fVal);
             mbHasDates = true;
             bDate = true;
+            // Convert string representation to ISO 8601 date to eliminate
+            // locale dependent behaviour later when filtering for dates.
+            sal_uInt32 nIndex = pFormatter->GetFormatIndex( NF_DATE_DIN_YYYYMMDD);
+            pFormatter->GetInputLineString( fVal, nIndex, aStr);
         }
         // maybe extend ScTypedStrData enum is also an option here
         mrStrings.push_back(ScTypedStrData(aStr, fVal, ScTypedStrData::Value,bDate));

--------------erAck-patch-parts--