From 0f440cc06f4f624783f8251878c6f1d9c892673a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D0=B8=D1=80=D0=B5=D1=86=D0=BA=D0=B8=D0=B9=20=D0=9C?= =?UTF-8?q?=D0=B8=D1=85=D0=B0=D0=B8=D0=BB?= Date: Thu, 14 Dec 2017 15:17:20 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=BF=D0=B0=D1=82=D1=87=20=D0=B4=D0=BB=D1=8F=20libreo?= =?UTF-8?q?ffice=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D1=8F=D1=8E?= =?UTF-8?q?=D1=89=D0=B8=D0=B9=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D1=83=20?= =?UTF-8?q?=D1=8D=D0=BA=D1=81=D0=BF=D0=BE=D1=80=D1=82=D0=B0=20=D0=B4=D0=B0?= =?UTF-8?q?=D1=82=D1=8B=20=D0=B2=20xlsx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fix_date_xlsx_export-5.4.2.patch | 122 ++++++++++++++++++ ...breoffice => 20171215-rebuild_libreoffice} | 0 2 files changed, 122 insertions(+) create mode 100644 profiles/templates/3.5/6_ac_install_patch/app-office/libreoffice/fix_date_xlsx_export-5.4.2.patch rename profiles/templates/3.5/6_ac_update_sync/revision/2017/{20171124-rebuild_libreoffice => 20171215-rebuild_libreoffice} (100%) diff --git a/profiles/templates/3.5/6_ac_install_patch/app-office/libreoffice/fix_date_xlsx_export-5.4.2.patch b/profiles/templates/3.5/6_ac_install_patch/app-office/libreoffice/fix_date_xlsx_export-5.4.2.patch new file mode 100644 index 000000000..5c833e066 --- /dev/null +++ b/profiles/templates/3.5/6_ac_install_patch/app-office/libreoffice/fix_date_xlsx_export-5.4.2.patch @@ -0,0 +1,122 @@ +# Calculate format=diff merge(app-office/libreoffice)=>5.4.2.2,5.4.4 +From 985523eee724f41eefb3aa84edcfcd1a4a3cf3db Mon Sep 17 00:00:00 2001 +From: Eike Rathke +Date: Fri, 17 Nov 2017 00:16:17 +0100 +Subject: Resolves: tdf#113889 no date particle reordering when exporting to + Excel +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Change-Id: I45667a67c6c69106d86755ed41438f23e019dfea +(cherry picked from commit eb8bd7f21103ed2349b44c954db977709de2e4ec) +Reviewed-on: https://gerrit.libreoffice.org/44841 +Tested-by: Jenkins +Reviewed-by: Caolán McNamara +Tested-by: Caolán McNamara +--- + include/svl/zforlist.hxx | 3 ++- + svl/source/numbers/zforlist.cxx | 7 ++++--- + svl/source/numbers/zforscan.cxx | 6 +++++- + svl/source/numbers/zforscan.hxx | 4 +++- + 4 files changed, 14 insertions(+), 6 deletions(-) + +diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx +index f6f3389..82e30ce 100644 +--- a/include/svl/zforlist.hxx ++++ b/include/svl/zforlist.hxx +@@ -390,7 +390,8 @@ public: + language/country eNewLnge */ + bool PutandConvertEntry( OUString& rString, sal_Int32& nCheckPos, + short& nType, sal_uInt32& nKey, +- LanguageType eLnge, LanguageType eNewLnge ); ++ LanguageType eLnge, LanguageType eNewLnge, ++ bool bForExcelExport = false ); + + /** Same as PutandConvertEntry but the format code string + is considered to be of the System language/country eLnge and is +diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx +index 7db6810..9a2e443 100644 +--- a/svl/source/numbers/zforlist.cxx ++++ b/svl/source/numbers/zforlist.cxx +@@ -636,14 +636,15 @@ bool SvNumberFormatter::PutandConvertEntry(OUString& rString, + short& nType, + sal_uInt32& nKey, + LanguageType eLnge, +- LanguageType eNewLnge) ++ LanguageType eNewLnge, ++ bool bForExcelExport ) + { + bool bRes; + if (eNewLnge == LANGUAGE_DONTKNOW) + { + eNewLnge = IniLnge; + } +- pFormatScanner->SetConvertMode(eLnge, eNewLnge); ++ pFormatScanner->SetConvertMode(eLnge, eNewLnge, false, bForExcelExport); + bRes = PutEntry(rString, nCheckPos, nType, nKey, eLnge); + pFormatScanner->SetConvertMode(false); + return bRes; +@@ -821,7 +822,7 @@ OUString SvNumberFormatter::GetFormatStringForExcel( sal_uInt32 nKey, const NfKe + short nType = css::util::NumberFormat::DEFINED; + sal_uInt32 nTempKey; + OUString aTemp( pEntry->GetFormatstring()); +- rTempFormatter.PutandConvertEntry( aTemp, nCheckPos, nType, nTempKey, nLang, LANGUAGE_ENGLISH_US); ++ rTempFormatter.PutandConvertEntry( aTemp, nCheckPos, nType, nTempKey, nLang, LANGUAGE_ENGLISH_US, true); + SAL_WARN_IF( nCheckPos != 0, "svl.numbers", + "SvNumberFormatter::GetFormatStringForExcel - format code not convertible"); + if (nTempKey != NUMBERFORMAT_ENTRY_NOT_FOUND) +diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx +index b3fae53..cd09a44 100644 +--- a/svl/source/numbers/zforscan.cxx ++++ b/svl/source/numbers/zforscan.cxx +@@ -47,6 +47,7 @@ ImpSvNumberformatScan::ImpSvNumberformatScan( SvNumberFormatter* pFormatterP ) + pFormatter = pFormatterP; + xNFC = css::i18n::NumberFormatMapper::create( pFormatter->GetComponentContext() ); + bConvertMode = false; ++ mbConvertForExcelExport = false; + bConvertSystemToSystem = false; + //! All keywords MUST be UPPERCASE! + sKeyword[NF_KEY_E] = "E"; // Exponent +@@ -1580,7 +1581,10 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString ) + pLoc = pFormatter->GetLocaleData(); + //! init new keywords + InitKeywords(); +- bNewDateOrder = (eOldDateOrder != pLoc->getDateOrder()); ++ // Adapt date order to target locale, but Excel does not handle date ++ // particle re-ordering for the target locale when loading documents, ++ // though it does exchange separators, tdf#113889 ++ bNewDateOrder = (!mbConvertForExcelExport && eOldDateOrder != pLoc->getDateOrder()); + } + const CharClass* pChrCls = pFormatter->GetCharClass(); + +diff --git a/svl/source/numbers/zforscan.hxx b/svl/source/numbers/zforscan.hxx +index 13d5b1a..5e5d981 100644 +--- a/svl/source/numbers/zforscan.hxx ++++ b/svl/source/numbers/zforscan.hxx +@@ -124,12 +124,13 @@ public: + } + + void SetConvertMode(LanguageType eTmpLge, LanguageType eNewLge, +- bool bSystemToSystem = false ) ++ bool bSystemToSystem = false, bool bForExcelExport = false) + { + bConvertMode = true; + eNewLnge = eNewLge; + eTmpLnge = eTmpLge; + bConvertSystemToSystem = bSystemToSystem; ++ mbConvertForExcelExport = bForExcelExport; + } + // Only changes the bool variable, in order to temporarily pause the convert mode + void SetConvertMode(bool bMode) { bConvertMode = bMode; } +@@ -183,6 +184,7 @@ private: // Private section + OUString sErrStr; // String for error output + + bool bConvertMode; // Set in the convert mode ++ bool mbConvertForExcelExport; // Set in the convert mode whether to convert for Excel export + + LanguageType eNewLnge; // Language/country which the scanned string is converted to (for Excel filter) + LanguageType eTmpLnge; // Language/country which the scanned string is converted from (for Excel filter) +-- +cgit v1.1 + diff --git a/profiles/templates/3.5/6_ac_update_sync/revision/2017/20171124-rebuild_libreoffice b/profiles/templates/3.5/6_ac_update_sync/revision/2017/20171215-rebuild_libreoffice similarity index 100% rename from profiles/templates/3.5/6_ac_update_sync/revision/2017/20171124-rebuild_libreoffice rename to profiles/templates/3.5/6_ac_update_sync/revision/2017/20171215-rebuild_libreoffice