From 5b8007afdb97d416ee7c22bf9226e927d61e9bd3 Mon Sep 17 00:00:00 2001
From: Eike Rathke <erack@redhat.com>
Date: Thu, 16 Aug 2018 15:50:02 +0200
Subject: Resolves: tdf#119013 do not over-aggressively reorder date particles

In particular not when reading documents as we don't know what the
original (default/system) locale was when the date format was
created and stored and whether the format's date order actually
matched the locale's ordering.

Regression from

    commit 51478cefaa4e265b42e3f67eda0a64767ff3efba
    CommitDate: Tue Apr 18 17:01:27 2017 +0200

        Resolves: tdf#107012 follow date order of the target locale

Change-Id: I9d3bdbd512d95ed81ff6459e368a2d7497ec8a2d
Reviewed-on: https://gerrit.libreoffice.org/59182
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
---
 basic/source/sbx/sbxscan.cxx | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'basic/source/sbx/sbxscan.cxx')

diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 2b229082f665..156a398a7bcf 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -720,7 +720,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const
                 else
                 {
                     aFmtStr = OUString::createFromAscii(pInfo->mpOOoFormat);
-                    pFormatter->PutandConvertEntry( aFmtStr, nCheckPos, nType, nIndex, LANGUAGE_ENGLISH, eLangType );
+                    pFormatter->PutandConvertEntry( aFmtStr, nCheckPos, nType, nIndex, LANGUAGE_ENGLISH, eLangType, true);
                 }
                 pFormatter->GetOutputString( nNumber, nIndex, rRes, &pCol );
             }
@@ -737,7 +737,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const
                     if( floor( nNumber ) != nNumber )
                     {
                         aFmtStr = "H:MM:SS AM/PM";
-                        pFormatter->PutandConvertEntry( aFmtStr, nCheckPos, nType, nIndex, LANGUAGE_ENGLISH, eLangType );
+                        pFormatter->PutandConvertEntry( aFmtStr, nCheckPos, nType, nIndex, LANGUAGE_ENGLISH, eLangType, true);
                         OUString aTime;
                         pFormatter->GetOutputString( nNumber, nIndex, aTime, &pCol );
                         rRes += " " + aTime;
@@ -747,7 +747,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const
                 {
                     // long time only
                     aFmtStr = "H:MM:SS AM/PM";
-                    pFormatter->PutandConvertEntry( aFmtStr, nCheckPos, nType, nIndex, LANGUAGE_ENGLISH, eLangType );
+                    pFormatter->PutandConvertEntry( aFmtStr, nCheckPos, nType, nIndex, LANGUAGE_ENGLISH, eLangType, true);
                     pFormatter->GetOutputString( nNumber, nIndex, rRes, &pCol );
                 }
             }
@@ -783,7 +783,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const
             }
             else
             {
-                pFormatter->PutandConvertEntry( aFmtStr, nCheckPos, nType, nIndex, LANGUAGE_ENGLISH, eLangType );
+                pFormatter->PutandConvertEntry( aFmtStr, nCheckPos, nType, nIndex, LANGUAGE_ENGLISH, eLangType, true);
                 pFormatter->GetOutputString( nNumber, nIndex, rRes, &pCol );
             }
 
-- 
cgit