diff --git a/0001-Related-rhbz-968892-discard-impossible-languages-for.patch b/0001-Related-rhbz-968892-discard-impossible-languages-for.patch index 809a65c..8bfe9a0 100644 --- a/0001-Related-rhbz-968892-discard-impossible-languages-for.patch +++ b/0001-Related-rhbz-968892-discard-impossible-languages-for.patch @@ -13,7 +13,7 @@ diff --git a/vcl/generic/fontmanager/fontconfig.cxx b/vcl/generic/fontmanager/fo index 1b36980..ff471fa 100644 --- a/vcl/generic/fontmanager/fontconfig.cxx +++ b/vcl/generic/fontmanager/fontconfig.cxx -@@ -847,6 +847,41 @@ namespace +@@ -847,6 +847,41 @@ #endif } @@ -55,7 +55,7 @@ index 1b36980..ff471fa 100644 LanguageTag getExemplerLangTagForCodePoint(sal_uInt32 currentChar) { int32_t script = u_getIntPropertyValue(currentChar, UCHAR_SCRIPT); -@@ -954,6 +989,10 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissi +@@ -954,6 +989,10 @@ // also handle unicode surrogates const sal_uInt32 nCode = rMissingCodes.iterateCodePoints( &nStrIndex ); FcCharSetAddChar( unicodes, nCode ); @@ -63,9 +63,6 @@ index 1b36980..ff471fa 100644 + //and autodetect something useful + if (!aLangAttrib.isEmpty() && isImpossibleCodePointForLang(aLangTag, nCode)) + aLangAttrib = OString(); - if (!pLangAttribUtf8) - pLangAttribUtf8 = (const FcChar8*)pick_sample_language(nCode); //#i105784#/rhbz#527719 improve selection of fallback font --- -1.8.1.4 - + if (aLangAttrib.isEmpty()) + { diff --git a/libreoffice.spec b/libreoffice.spec index cad6c3d..dd34929 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -238,24 +238,23 @@ Patch2: openoffice.org-2.4.0.ooo86080.unopkg.bodge.patch Patch3: openoffice.org-3.0.0.ooo88341.sc.verticalboxes.patch Patch4: openoffice.org-3.1.0.oooXXXXX.solenv.allowmissing.patch Patch5: openoffice.org-3.1.0.ooo101274.opening-a-directory.patch -Patch6: openoffice.org-3.1.1.ooo105784.vcl.sniffscriptforsubs.patch -Patch7: libreoffice-installfix.patch +Patch6: libreoffice-installfix.patch %if 0%{?rhel} && 0%{?rhel} < 7 -Patch9: libreoffice-rhel6gcj.patch -Patch10: libreoffice-rhel6poppler.patch -Patch11: libreoffice-rhel6langs.patch -Patch12: 0001-Require-icu-4.6-or-later-with-system-icu.patch -Patch13: libreoffice-rhel6limits.patch -Patch14: libreoffice-rhel6glib.patch -%endif -Patch15: 0001-temporarily-disable-failing-test.patch -Patch16: 0001-do-not-build-LibreOffice_Test.patch -Patch17: 0001-Resolves-rhbz-968892-force-render-full-grapheme-with.patch -Patch18: 0001-Related-rhbz-968892-discard-impossible-languages-for.patch -Patch19: 0002-Related-rhbz-968892-discard-impossible-languages-for.patch -Patch20: 0001-rhbz-980387-fix-filter-selection-from-file-ext.patch -Patch21: 0001-WaE-assuming-signed-overflow-does-not-occur-when-ass.patch -Patch22: 0001-Resolves-fdo-66924-switching-to-master-view-is-broke.patch +Patch7: libreoffice-rhel6gcj.patch +Patch8: libreoffice-rhel6poppler.patch +Patch9: libreoffice-rhel6langs.patch +Patch10: 0001-Require-icu-4.6-or-later-with-system-icu.patch +Patch11: libreoffice-rhel6limits.patch +Patch12: libreoffice-rhel6glib.patch +%endif +Patch13: 0001-temporarily-disable-failing-test.patch +Patch14: 0001-do-not-build-LibreOffice_Test.patch +Patch15: 0001-Resolves-rhbz-968892-force-render-full-grapheme-with.patch +Patch16: 0001-Related-rhbz-968892-discard-impossible-languages-for.patch +Patch17: 0002-Related-rhbz-968892-discard-impossible-languages-for.patch +Patch18: 0001-rhbz-980387-fix-filter-selection-from-file-ext.patch +Patch19: 0001-WaE-assuming-signed-overflow-does-not-occur-when-ass.patch +Patch20: 0001-Resolves-fdo-66924-switching-to-master-view-is-broke.patch %define instdir %{_libdir} %define baseinstdir %{instdir}/libreoffice @@ -991,24 +990,23 @@ mv -f redhat.soc extras/source/palettes/standard.soc %patch3 -p1 -b .ooo88341.sc.verticalboxes.patch %patch4 -p1 -b .oooXXXXX.solenv.allowmissing.patch %patch5 -p1 -b .ooo101274.opening-a-directory.patch -%patch6 -p1 -b .ooo105784.vcl.sniffscriptforsubs.patch -%patch7 -p1 -b .libreoffice-installfix.patch +%patch6 -p1 -b .libreoffice-installfix.patch %if 0%{?rhel} && 0%{?rhel} < 7 -%patch9 -p1 -b .rhel6gcj.patch -%patch10 -p1 -b .rhel6poppler.patch -%patch11 -p1 -b .rhel6langs.patch -%patch12 -p1 -R -b .Require-icu-4.6-or-later-with-system-icu.patch -%patch13 -p1 -b .rhel6limits.patch -%patch14 -p1 -b .rhel6glib.patch -%endif -%patch15 -p1 -b .temporarily-disable-failing-test.patch -%patch16 -p1 -b .do-not-build-LibreOffice_Test.patch -%patch17 -p1 -b .rhbz-968892-force-render-full-grapheme-with.patch -%patch18 -p1 -b .rhbz-968892-discard-impossible-languages-for.patch -%patch19 -p1 -b .rhbz-968892-discard-impossible-languages-for.patch -%patch20 -p1 -b .rhbz-980387-fix-filter-selection-from-file-ext.patch -%patch21 -p1 -b .WaE-assuming-signed-overflow-does-not-occur-when-ass.patch -%patch22 -p1 -b .fdo-66924-switching-to-master-view-is-broke.patch +%patch7 -p1 -b .rhel6gcj.patch +%patch8 -p1 -b .rhel6poppler.patch +%patch9 -p1 -b .rhel6langs.patch +%patch10 -p1 -R -b .Require-icu-4.6-or-later-with-system-icu.patch +%patch11 -p1 -b .rhel6limits.patch +%patch12 -p1 -b .rhel6glib.patch +%endif +%patch13 -p1 -b .temporarily-disable-failing-test.patch +%patch14 -p1 -b .do-not-build-LibreOffice_Test.patch +%patch15 -p1 -b .rhbz-968892-force-render-full-grapheme-with.patch +%patch16 -p1 -b .rhbz-968892-discard-impossible-languages-for.patch +%patch17 -p1 -b .rhbz-968892-discard-impossible-languages-for.patch +%patch18 -p1 -b .rhbz-980387-fix-filter-selection-from-file-ext.patch +%patch19 -p1 -b .WaE-assuming-signed-overflow-does-not-occur-when-ass.patch +%patch20 -p1 -b .fdo-66924-switching-to-master-view-is-broke.patch # TODO: check this # these are horribly incomplete--empty translations and copied english diff --git a/openoffice.org-3.1.1.ooo105784.vcl.sniffscriptforsubs.patch b/openoffice.org-3.1.1.ooo105784.vcl.sniffscriptforsubs.patch deleted file mode 100644 index 5fd93e3..0000000 --- a/openoffice.org-3.1.1.ooo105784.vcl.sniffscriptforsubs.patch +++ /dev/null @@ -1,201 +0,0 @@ -From 387b9d3293ef8582c400c670574a80ebb3aec4fd Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Thu, 1 Dec 2011 14:18:09 +0100 -Subject: [PATCH] #i105784# vcl: improve selection of fallback font by - supplying language hint when none exists - ---- - vcl/generic/fontmanager/fontconfig.cxx | 143 ++++++++++++++++++++++++++++++++- - 1 file changed, 141 insertions(+), 2 deletions(-) - -diff --git a/vcl/generic/fontmanager/fontconfig.cxx b/vcl/generic/fontmanager/fontconfig.cxx -index a305095..028b269 100644 ---- a/vcl/generic/fontmanager/fontconfig.cxx -+++ b/vcl/generic/fontmanager/fontconfig.cxx -@@ -90,6 +90,9 @@ using namespace psp; - - #include "sal/alloca.h" - -+#include //unicode::getUnicodeScriptType -+#include //ScriptType -+ - #include - #include - -@@ -969,6 +972,138 @@ IMPL_LINK_NOARG(PrintFontManager, autoInstallFontLangSupport) - return 0; - } - -+static const char* pick_sample_language(const sal_uInt32 cCode) -+{ -+ using namespace ::com::sun::star::i18n; -+ -+ static ScriptTypeList aScripts[] = -+ { -+ { UnicodeScript_kBasicLatin, UnicodeScript_kBasicLatin, UnicodeScript_kBasicLatin }, -+ { UnicodeScript_kLatin1Supplement, UnicodeScript_kLatin1Supplement, UnicodeScript_kLatin1Supplement }, -+ { UnicodeScript_kLatinExtendedA, UnicodeScript_kLatinExtendedA, UnicodeScript_kLatinExtendedA }, -+ { UnicodeScript_kLatinExtendedB, UnicodeScript_kLatinExtendedB, UnicodeScript_kLatinExtendedB }, -+ { UnicodeScript_kGreek, UnicodeScript_kGreek, UnicodeScript_kGreek }, -+ { UnicodeScript_kCyrillic, UnicodeScript_kCyrillic, UnicodeScript_kCyrillic }, -+ { UnicodeScript_kArmenian, UnicodeScript_kArmenian, UnicodeScript_kArmenian }, -+ { UnicodeScript_kHebrew, UnicodeScript_kHebrew, UnicodeScript_kHebrew }, -+ { UnicodeScript_kArabic, UnicodeScript_kArabic, UnicodeScript_kArabic }, -+ { UnicodeScript_kSyriac, UnicodeScript_kSyriac, UnicodeScript_kSyriac }, -+ { UnicodeScript_kThaana, UnicodeScript_kThaana, UnicodeScript_kThaana }, -+ { UnicodeScript_kDevanagari, UnicodeScript_kDevanagari, UnicodeScript_kDevanagari }, -+ { UnicodeScript_kBengali, UnicodeScript_kBengali, UnicodeScript_kBengali }, -+ { UnicodeScript_kGurmukhi, UnicodeScript_kGurmukhi, UnicodeScript_kGurmukhi }, -+ { UnicodeScript_kGujarati, UnicodeScript_kGujarati, UnicodeScript_kGujarati }, -+ { UnicodeScript_kOriya, UnicodeScript_kOriya, UnicodeScript_kOriya }, -+ { UnicodeScript_kTamil, UnicodeScript_kTamil, UnicodeScript_kTamil }, -+ { UnicodeScript_kTelugu, UnicodeScript_kTelugu, UnicodeScript_kTelugu }, -+ { UnicodeScript_kKannada, UnicodeScript_kKannada, UnicodeScript_kKannada }, -+ { UnicodeScript_kMalayalam, UnicodeScript_kMalayalam, UnicodeScript_kMalayalam }, -+ { UnicodeScript_kSinhala, UnicodeScript_kSinhala, UnicodeScript_kSinhala }, -+ { UnicodeScript_kThai, UnicodeScript_kThai, UnicodeScript_kThai }, -+ { UnicodeScript_kLao, UnicodeScript_kLao, UnicodeScript_kLao }, -+ { UnicodeScript_kTibetan, UnicodeScript_kTibetan, UnicodeScript_kTibetan }, -+ { UnicodeScript_kMyanmar, UnicodeScript_kMyanmar, UnicodeScript_kMyanmar }, -+ { UnicodeScript_kGeorgian, UnicodeScript_kGeorgian, UnicodeScript_kGeorgian }, -+ { UnicodeScript_kHangulJamo, UnicodeScript_kHangulJamo, UnicodeScript_kHangulJamo }, -+ { UnicodeScript_kEthiopic, UnicodeScript_kEthiopic, UnicodeScript_kEthiopic }, -+ { UnicodeScript_kCherokee, UnicodeScript_kCherokee, UnicodeScript_kCherokee }, -+ { UnicodeScript_kUnifiedCanadianAboriginalSyllabics, -+ UnicodeScript_kUnifiedCanadianAboriginalSyllabics, -+ UnicodeScript_kUnifiedCanadianAboriginalSyllabics }, -+ { UnicodeScript_kKhmer, UnicodeScript_kKhmer, UnicodeScript_kKhmer }, -+ { UnicodeScript_kMongolian, UnicodeScript_kMongolian, UnicodeScript_kMongolian }, -+ { UnicodeScript_kLatinExtendedAdditional, UnicodeScript_kLatinExtendedAdditional, -+ UnicodeScript_kLatinExtendedAdditional }, -+ { UnicodeScript_kGreekExtended, UnicodeScript_kGreekExtended, UnicodeScript_kGreekExtended }, -+ { UnicodeScript_kHiragana, UnicodeScript_kHiragana, UnicodeScript_kHiragana }, -+ { UnicodeScript_kKatakana, UnicodeScript_kKatakana, UnicodeScript_kKatakana }, -+ { UnicodeScript_kHangulCompatibilityJamo, UnicodeScript_kHangulCompatibilityJamo, -+ UnicodeScript_kHangulCompatibilityJamo }, -+ { UnicodeScript_kHangulSyllable, UnicodeScript_kHangulSyllable, -+ UnicodeScript_kHangulSyllable }, -+ { UnicodeScript_kArabicPresentationB, UnicodeScript_kArabicPresentationB, -+ UnicodeScript_kArabicPresentationB }, -+ { UnicodeScript_kScriptCount, UnicodeScript_kScriptCount, UnicodeScript_kScriptCount } -+ }; -+ -+ switch (unicode::getUnicodeScriptType(cCode, aScripts, UnicodeScript_kScriptCount)) -+ { -+ case UnicodeScript_kBasicLatin: -+ case UnicodeScript_kLatin1Supplement: -+ case UnicodeScript_kLatinExtendedA: -+ case UnicodeScript_kLatinExtendedB: -+ case UnicodeScript_kLatinExtendedAdditional: -+ return "en"; -+ case UnicodeScript_kGreek: -+ case UnicodeScript_kGreekExtended: -+ return "el"; -+ case UnicodeScript_kCyrillic: -+ return "ru"; -+ case UnicodeScript_kArmenian: -+ return "hy"; -+ case UnicodeScript_kHebrew: -+ return "he"; -+ case UnicodeScript_kArabic: -+ case UnicodeScript_kArabicPresentationB: -+ return "ar"; -+ case UnicodeScript_kSyriac: -+ return "syr"; -+ case UnicodeScript_kThaana: -+ return "dv"; -+ case UnicodeScript_kDevanagari: -+ return "hi"; -+ case UnicodeScript_kBengali: -+ return "bn"; -+ case UnicodeScript_kGurmukhi: -+ return "pa"; -+ case UnicodeScript_kGujarati: -+ return "gu"; -+ case UnicodeScript_kOriya: -+ return "or"; -+ case UnicodeScript_kTamil: -+ return "ta"; -+ case UnicodeScript_kTelugu: -+ return "te"; -+ case UnicodeScript_kKannada: -+ return "ka"; -+ case UnicodeScript_kMalayalam: -+ return "ml"; -+ case UnicodeScript_kSinhala: -+ return "si"; -+ case UnicodeScript_kThai: -+ return "th"; -+ case UnicodeScript_kLao: -+ return "lo"; -+ case UnicodeScript_kTibetan: -+ return "bo"; -+ case UnicodeScript_kMyanmar: -+ return "my"; -+ case UnicodeScript_kGeorgian: -+ return "ka"; -+ case UnicodeScript_kHangulJamo: -+ case UnicodeScript_kHangulCompatibilityJamo: -+ case UnicodeScript_kHangulSyllable: -+ return "ko"; -+ case UnicodeScript_kEthiopic: -+ return "am"; -+ case UnicodeScript_kCherokee: -+ return "chr"; -+ case UnicodeScript_kUnifiedCanadianAboriginalSyllabics: -+ return "ui"; -+ case UnicodeScript_kKhmer: -+ return "km"; -+ case UnicodeScript_kMongolian: -+ return "mn"; -+ case UnicodeScript_kHiragana: -+ case UnicodeScript_kKatakana: -+ return "ja"; -+ default: -+ break; -+ } -+ -+ return NULL; -+} -+ - bool PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissingCodes ) - { - bool bRet = false; -@@ -987,6 +1122,7 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissi - - LanguageTag aLangTag(rPattern.meLanguage); - OString aLangAttrib = mapToFontConfigLangTag(aLangTag); -+ const FcChar8* pLangAttribUtf8 = (const FcChar8*)aLangAttrib.getStr(); - - // Add required Unicode characters, if any - if ( !rMissingCodes.isEmpty() ) -@@ -997,6 +1133,8 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissi - // also handle unicode surrogates - const sal_uInt32 nCode = rMissingCodes.iterateCodePoints( &nStrIndex ); - FcCharSetAddChar( unicodes, nCode ); -+ if (!pLangAttribUtf8) -+ pLangAttribUtf8 = (const FcChar8*)pick_sample_language(nCode); - //#i105784#/rhbz#527719 improve selection of fallback font - if (aLangAttrib.isEmpty()) - { -@@ -1006,14 +1144,15 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissi - { - aLangTag = getExemplerLangTagForCodePoint(nCode); - aLangAttrib = mapToFontConfigLangTag(aLangTag); -+ pLangAttribUtf8 = (const FcChar8*)aLangAttrib.getStr(); - } - } - FcPatternAddCharSet(pPattern, FC_CHARSET, unicodes); - FcCharSetDestroy(unicodes); - } - -- if (!aLangAttrib.isEmpty()) -- FcPatternAddString(pPattern, FC_LANG, (FcChar8*)aLangAttrib.getStr()); -+ if( pLangAttribUtf8 ) -+ FcPatternAddString( pPattern, FC_LANG, pLangAttribUtf8 ); - - addtopattern(pPattern, rPattern.GetSlant(), rPattern.GetWeight(), - rPattern.GetWidthType(), rPattern.GetPitch()); --- -1.8.3.1 -