aboutsummaryrefslogtreecommitdiff
path: root/editors/libreoffice
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2018-04-04 11:50:00 +0000
committerJan Beich <jbeich@FreeBSD.org>2018-04-04 11:50:00 +0000
commit2e84111857d889b88fb527614209e70ce202a1ea (patch)
treeacadfdc5231a673bbc0adb6ed7a47977ae6c4db8 /editors/libreoffice
parent0b0a6931096474dc7587d1abac2ee9751eaa43f9 (diff)
downloadports-2e84111857d889b88fb527614209e70ce202a1ea.tar.gz
ports-2e84111857d889b88fb527614209e70ce202a1ea.zip
editors/libreoffice: unbreak with ICU 61
i18nutil/source/utility/unicode.cxx:753:21: error: unknown type name 'NumberFormat'; did you mean 'UNumberFormat'? std::unique_ptr<NumberFormat> xF( ^~~~~~~~~~~~ UNumberFormat /usr/local/include/unicode/unum.h:140:15: note: 'UNumberFormat' declared here typedef void* UNumberFormat; ^ i18nutil/source/utility/unicode.cxx:754:9: error: use of undeclared identifier 'NumberFormat'; did you mean 'icu::NumberFormat'? NumberFormat::createPercentInstance(aLocale, errorCode)); ^~~~~~~~~~~~ icu::NumberFormat /usr/local/include/unicode/numfmt.h:174:18: note: 'icu::NumberFormat' declared here class U_I18N_API NumberFormat : public Format { ^ i18nutil/source/utility/unicode.cxx:753:35: error: no matching constructor for initialization of 'std::unique_ptr<UNumberFormat>' (aka 'unique_ptr<void *>') std::unique_ptr<NumberFormat> xF( ^ /usr/include/c++/v1/memory:2425:28: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'icu::NumberFormat *' to 'const std::__1::unique_ptr<void *, std::__1::default_delete<void *> >' for 1st argument class _LIBCPP_TEMPLATE_VIS unique_ptr ^ /usr/include/c++/v1/memory:2454:49: note: candidate constructor not viable: no known conversion from 'icu::NumberFormat *' to 'nullptr_t' for 1st argument _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT ^ /usr/include/c++/v1/memory:2460:40: note: candidate constructor not viable: no known conversion from 'icu::NumberFormat *' to 'pointer' (aka 'void **') for 1st argument _LIBCPP_INLINE_VISIBILITY explicit unique_ptr(pointer __p) _NOEXCEPT ^ /usr/include/c++/v1/memory:2481:31: note: candidate constructor not viable: no known conversion from 'icu::NumberFormat *' to 'std::__1::unique_ptr<void *, std::__1::default_delete<void *> >' for 1st argument _LIBCPP_INLINE_VISIBILITY unique_ptr(unique_ptr&& __u) _NOEXCEPT ^ /usr/include/c++/v1/memory:2485:9: note: candidate template ignored: could not match 'unique_ptr<type-parameter-0-0, type-parameter-0-1>' against 'icu::NumberFormat *' unique_ptr(unique_ptr<_Up, _Ep>&& __u, ^ /usr/include/c++/v1/memory:2500:35: note: candidate template ignored: could not match 'auto_ptr<type-parameter-0-0>' against 'icu::NumberFormat *' _LIBCPP_INLINE_VISIBILITY unique_ptr(auto_ptr<_Up>&& __p, ^ /usr/include/c++/v1/memory:2448:49: note: candidate constructor not viable: requires 0 arguments, but 1 was provided _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR unique_ptr() _NOEXCEPT ^ /usr/include/c++/v1/memory:2468:31: note: candidate constructor not viable: requires 2 arguments, but 1 was provided _LIBCPP_INLINE_VISIBILITY unique_ptr(pointer __p, typename conditional< ^ /usr/include/c++/v1/memory:2475:31: note: candidate constructor not viable: requires 2 arguments, but 1 was provided _LIBCPP_INLINE_VISIBILITY unique_ptr(pointer __p, typename remove_reference<deleter_type>::type&& __d) ^ i18nutil/source/utility/unicode.cxx:761:5: error: unknown type name 'UnicodeString'; did you mean 'icu::UnicodeString'? UnicodeString output; ^~~~~~~~~~~~~ icu::UnicodeString /usr/local/include/unicode/unistr.h:286:20: note: 'icu::UnicodeString' declared here class U_COMMON_API UnicodeString : public Replaceable ^ https://ssl.icu-project.org/trac/changeset/40705 PR: 227042 Reported by: antoine (via exp-run) Obtained from: upstream
Notes
Notes: svn path=/head/; revision=466431
Diffstat (limited to 'editors/libreoffice')
-rw-r--r--editors/libreoffice/files/patch-icu61283
1 files changed, 283 insertions, 0 deletions
diff --git a/editors/libreoffice/files/patch-icu61 b/editors/libreoffice/files/patch-icu61
new file mode 100644
index 000000000000..628afda4e06b
--- /dev/null
+++ b/editors/libreoffice/files/patch-icu61
@@ -0,0 +1,283 @@
+https://cgit.freedesktop.org/libreoffice/core/commit/?id=f7961456d81c3ee6ee4c13eac9ef7add6c7ea6b5
+https://cgit.freedesktop.org/libreoffice/core/commit/?id=7c46e0086802c22f5a5040d9161d4d2b3b2a3aff
+https://cgit.freedesktop.org/libreoffice/core/commit/?id=8960ecc689ce41cfaa40b65d75830d7491b06463
+https://cgit.freedesktop.org/libreoffice/core/commit/?id=f240332f8e965ea17b70b0ccaa9990ce0a53cfc6
+https://cgit.freedesktop.org/libreoffice/core/commit/?id=ad3b7c27cdc957a8a38876c040e86a81c3cf7003
+
+--- i18npool/inc/collator_unicode.hxx.orig 2018-02-22 17:45:41 UTC
++++ i18npool/inc/collator_unicode.hxx
+@@ -63,7 +63,7 @@ class Collator_Unicode final : public cppu::WeakImplHe
+
+ private:
+ const sal_Char *implementationName;
+- RuleBasedCollator *uca_base, *collator;
++ icu::RuleBasedCollator *uca_base, *collator;
+ #ifndef DISABLE_DYNLOADING
+ oslModule hModule;
+ #endif
+--- i18npool/source/breakiterator/breakiterator_unicode.cxx.orig 2018-02-22 17:45:41 UTC
++++ i18npool/source/breakiterator/breakiterator_unicode.cxx
+@@ -56,14 +56,14 @@ BreakIterator_Unicode::~BreakIterator_Unicode()
+ }
+
+ /*
+- Wrapper class to provide public access to the RuleBasedBreakIterator's
++ Wrapper class to provide public access to the icu::RuleBasedBreakIterator's
+ setbreakType method.
+ */
+-class OOoRuleBasedBreakIterator : public RuleBasedBreakIterator
++class OOoRuleBasedBreakIterator : public icu::RuleBasedBreakIterator
+ {
+ public:
+ #if (U_ICU_VERSION_MAJOR_NUM < 58)
+- // RuleBasedBreakIterator::setBreakType() is private as of ICU 58.
++ // icu::RuleBasedBreakIterator::setBreakType() is private as of ICU 58.
+ void publicSetBreakType(int32_t type)
+ {
+ setBreakType(type);
+@@ -71,7 +71,7 @@ class OOoRuleBasedBreakIterator : public RuleBasedBrea
+ #endif
+ OOoRuleBasedBreakIterator(UDataMemory* image,
+ UErrorCode &status)
+- : RuleBasedBreakIterator(image, status)
++ : icu::RuleBasedBreakIterator(image, status)
+ { };
+
+ };
+@@ -334,7 +334,7 @@ sal_Int32 SAL_CALL BreakIterator_Unicode::nextCharacte
+ icu::BreakIterator* pBI = character.mpValue->mpBreakIterator.get();
+ for (nDone = 0; nDone < nCount; nDone++) {
+ nStartPos = pBI->following(nStartPos);
+- if (nStartPos == BreakIterator::DONE)
++ if (nStartPos == icu::BreakIterator::DONE)
+ return Text.getLength();
+ }
+ } else { // for CHARACTER mode
+@@ -353,7 +353,7 @@ sal_Int32 SAL_CALL BreakIterator_Unicode::previousChar
+ icu::BreakIterator* pBI = character.mpValue->mpBreakIterator.get();
+ for (nDone = 0; nDone < nCount; nDone++) {
+ nStartPos = pBI->preceding(nStartPos);
+- if (nStartPos == BreakIterator::DONE)
++ if (nStartPos == icu::BreakIterator::DONE)
+ return 0;
+ }
+ } else { // for BS to delete one char and CHARACTER mode.
+@@ -371,7 +371,7 @@ Boundary SAL_CALL BreakIterator_Unicode::nextWord( con
+
+ Boundary rv;
+ rv.startPos = icuBI->mpValue->mpBreakIterator->following(nStartPos);
+- if( rv.startPos >= Text.getLength() || rv.startPos == BreakIterator::DONE )
++ if( rv.startPos >= Text.getLength() || rv.startPos == icu::BreakIterator::DONE )
+ rv.endPos = result.startPos;
+ else {
+ if ( (rWordType == WordType::ANYWORD_IGNOREWHITESPACES ||
+@@ -380,7 +380,7 @@ Boundary SAL_CALL BreakIterator_Unicode::nextWord( con
+ rv.startPos = icuBI->mpValue->mpBreakIterator->following(rv.startPos);
+
+ rv.endPos = icuBI->mpValue->mpBreakIterator->following(rv.startPos);
+- if(rv.endPos == BreakIterator::DONE)
++ if(rv.endPos == icu::BreakIterator::DONE)
+ rv.endPos = rv.startPos;
+ }
+ return rv;
+@@ -394,7 +394,7 @@ Boundary SAL_CALL BreakIterator_Unicode::previousWord(
+
+ Boundary rv;
+ rv.startPos = icuBI->mpValue->mpBreakIterator->preceding(nStartPos);
+- if( rv.startPos < 0 || rv.startPos == BreakIterator::DONE)
++ if( rv.startPos < 0 || rv.startPos == icu::BreakIterator::DONE)
+ rv.endPos = rv.startPos;
+ else {
+ if ( (rWordType == WordType::ANYWORD_IGNOREWHITESPACES ||
+@@ -403,7 +403,7 @@ Boundary SAL_CALL BreakIterator_Unicode::previousWord(
+ rv.startPos = icuBI->mpValue->mpBreakIterator->preceding(rv.startPos);
+
+ rv.endPos = icuBI->mpValue->mpBreakIterator->following(rv.startPos);
+- if(rv.endPos == BreakIterator::DONE)
++ if(rv.endPos == icu::BreakIterator::DONE)
+ rv.endPos = rv.startPos;
+ }
+ return rv;
+@@ -435,9 +435,9 @@ Boundary SAL_CALL BreakIterator_Unicode::getWordBounda
+ rv.endPos = icuBI->mpValue->mpBreakIterator->following(nPos);
+ }
+ }
+- if (rv.startPos == BreakIterator::DONE)
++ if (rv.startPos == icu::BreakIterator::DONE)
+ rv.startPos = rv.endPos;
+- else if (rv.endPos == BreakIterator::DONE)
++ else if (rv.endPos == icu::BreakIterator::DONE)
+ rv.endPos = rv.startPos;
+
+ return rv;
+@@ -502,7 +502,7 @@ LineBreakResults SAL_CALL BreakIterator_Unicode::getLi
+ lbr.breakIndex = nStartPos;
+ lbr.breakType = BreakType::WORDBOUNDARY;
+ } else if (hOptions.rHyphenator.is()) { //Hyphenation break
+- sal_Int32 boundary_with_punctuation = (pLineBI->next() != BreakIterator::DONE) ? pLineBI->current() : 0;
++ sal_Int32 boundary_with_punctuation = (pLineBI->next() != icu::BreakIterator::DONE) ? pLineBI->current() : 0;
+ pLineBI->preceding(nStartPos + 1); // reset to check correct hyphenation of "word-word"
+
+ sal_Int32 nStartPosWordEnd = nStartPos;
+--- i18npool/source/collator/collator_unicode.cxx.orig 2018-02-22 17:45:41 UTC
++++ i18npool/source/collator/collator_unicode.cxx
+@@ -138,7 +138,7 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString
+ UErrorCode status = U_ZERO_ERROR;
+ OUString rule = LocaleDataImpl::get()->getCollatorRuleByAlgorithm(rLocale, rAlgorithm);
+ if (!rule.isEmpty()) {
+- collator = new RuleBasedCollator(reinterpret_cast<const UChar *>(rule.getStr()), status);
++ collator = new icu::RuleBasedCollator(reinterpret_cast<const UChar *>(rule.getStr()), status);
+ if (! U_SUCCESS(status)) throw RuntimeException();
+ }
+ if (!collator && OUString(LOCAL_RULE_LANGS).indexOf(rLocale.Language) >= 0) {
+@@ -343,7 +343,7 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString
+ size_t ruleImageSize = funclen();
+
+ #if (U_ICU_VERSION_MAJOR_NUM == 4) && (U_ICU_VERSION_MINOR_NUM <= 2)
+- uca_base = new RuleBasedCollator(static_cast<UChar*>(NULL), status);
++ uca_base = new icu::RuleBasedCollator(static_cast<UChar*>(NULL), status);
+ #else
+ // Not only changed ICU 53.1 the API behavior that a negative
+ // length (ruleImageSize) now leads to failure, but also that
+@@ -354,11 +354,11 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString
+ // The default collator of the en-US locale would also fulfill
+ // the requirement. The collator of the actual locale or the
+ // NULL (default) locale does not.
+- uca_base = static_cast<RuleBasedCollator*>(icu::Collator::createInstance(
++ uca_base = static_cast<icu::RuleBasedCollator*>(icu::Collator::createInstance(
+ icu::Locale::getRoot(), status));
+ #endif
+ if (! U_SUCCESS(status)) throw RuntimeException();
+- collator = new RuleBasedCollator(
++ collator = new icu::RuleBasedCollator(
+ reinterpret_cast<const uint8_t*>(ruleImage), ruleImageSize, uca_base, status);
+ if (! U_SUCCESS(status)) throw RuntimeException();
+ }
+@@ -372,17 +372,17 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString
+ */
+ icu::Locale icuLocale( LanguageTagIcu::getIcuLocale( LanguageTag( rLocale), rAlgorithm));
+ // load ICU collator
+- collator = static_cast<RuleBasedCollator*>( icu::Collator::createInstance(icuLocale, status) );
++ collator = static_cast<icu::RuleBasedCollator*>( icu::Collator::createInstance(icuLocale, status) );
+ if (! U_SUCCESS(status)) throw RuntimeException();
+ }
+ }
+
+ if (options & CollatorOptions::CollatorOptions_IGNORE_CASE_ACCENT)
+- collator->setStrength(Collator::PRIMARY);
++ collator->setStrength(icu::Collator::PRIMARY);
+ else if (options & CollatorOptions::CollatorOptions_IGNORE_CASE)
+- collator->setStrength(Collator::SECONDARY);
++ collator->setStrength(icu::Collator::SECONDARY);
+ else
+- collator->setStrength(Collator::TERTIARY);
++ collator->setStrength(icu::Collator::TERTIARY);
+
+ return 0;
+ }
+--- i18npool/source/collator/gencoll_rule.cxx.orig 2018-02-22 17:45:41 UTC
++++ i18npool/source/collator/gencoll_rule.cxx
+@@ -113,7 +113,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
+ //UCollator *coll = ucol_openRules(Obuf.getStr(), Obuf.getLength(), UCOL_OFF,
+ // UCOL_DEFAULT_STRENGTH, &parseError, &status);
+
+- auto coll = o3tl::make_unique<RuleBasedCollator>(reinterpret_cast<const UChar *>(Obuf.getStr()), status);
++ auto coll = o3tl::make_unique<icu::RuleBasedCollator>(reinterpret_cast<const UChar *>(Obuf.getStr()), status);
+
+ if (U_SUCCESS(status)) {
+ std::vector<uint8_t> data;
+--- i18npool/source/ordinalsuffix/ordinalsuffix.cxx.orig 2018-02-22 17:45:41 UTC
++++ i18npool/source/ordinalsuffix/ordinalsuffix.cxx
+@@ -79,7 +79,7 @@ uno::Sequence< OUString > SAL_CALL OrdinalSuffixServic
+ if (!U_SUCCESS(nCode))
+ return retValue;
+
+- std::unique_ptr<NumberFormat> xNumberFormat(icu::NumberFormat::createInstance(aIcuLocale, nCode));
++ std::unique_ptr<icu::NumberFormat> xNumberFormat(icu::NumberFormat::createInstance(aIcuLocale, nCode));
+ if (!U_SUCCESS(nCode))
+ return retValue;
+
+--- i18npool/source/transliteration/ignoreDiacritics_CTL.cxx.orig 2018-02-22 17:45:41 UTC
++++ i18npool/source/transliteration/ignoreDiacritics_CTL.cxx
+@@ -35,7 +35,7 @@ ignoreDiacritics_CTL::transliterateChar2Char(sal_Unico
+ if (!m_transliterator)
+ throw css::uno::RuntimeException();
+
+- UnicodeString aChar(nInChar);
++ icu::UnicodeString aChar(nInChar);
+ m_transliterator->transliterate(aChar);
+
+ if (aChar.isEmpty())
+@@ -68,7 +68,7 @@ ignoreDiacritics_CTL::folding(const OUString& rInStr,
+ {
+ sal_Int32 nIndex = nPosition;
+ UChar32 nChar = rInStr.iterateCodePoints(&nIndex);
+- UnicodeString aUStr(nChar);
++ icu::UnicodeString aUStr(nChar);
+ m_transliterator->transliterate(aUStr);
+
+ if (nOffset + aUStr.length() > rOffset.getLength())
+@@ -87,7 +87,7 @@ ignoreDiacritics_CTL::folding(const OUString& rInStr,
+ }
+ else
+ {
+- UnicodeString aUStr(reinterpret_cast<const UChar*>(rInStr.getStr()) + nStartPos, nCount);
++ icu::UnicodeString aUStr(reinterpret_cast<const UChar*>(rInStr.getStr()) + nStartPos, nCount);
+ m_transliterator->transliterate(aUStr);
+ return OUString(reinterpret_cast<const sal_Unicode*>(aUStr.getBuffer()), aUStr.length());
+ }
+--- i18nutil/source/utility/unicode.cxx.orig 2018-02-22 17:45:41 UTC
++++ i18nutil/source/utility/unicode.cxx
+@@ -750,15 +750,15 @@ OUString SAL_CALL unicode::formatPercent(double dNumbe
+
+ icu::Locale aLocale = LanguageTagIcu::getIcuLocale(aLangTag);
+
+- std::unique_ptr<NumberFormat> xF(
+- NumberFormat::createPercentInstance(aLocale, errorCode));
++ std::unique_ptr<icu::NumberFormat> xF(
++ icu::NumberFormat::createPercentInstance(aLocale, errorCode));
+ if(U_FAILURE(errorCode))
+ {
+- SAL_WARN("i18n", "NumberFormat::createPercentInstance failed");
++ SAL_WARN("i18n", "icu::NumberFormat::createPercentInstance failed");
+ return OUString::number(dNumber) + "%";
+ }
+
+- UnicodeString output;
++ icu::UnicodeString output;
+ xF->format(dNumber/100, output);
+ OUString aRet(reinterpret_cast<const sal_Unicode *>(output.getBuffer()),
+ output.length());
+--- lotuswordpro/source/filter/localtime.cxx.orig 2018-02-22 17:45:41 UTC
++++ lotuswordpro/source/filter/localtime.cxx
+@@ -174,7 +174,7 @@ bool LtgLocalTime(long rtime,LtTm& rtm)
+
+ if ((rtime > 3 * DAY_SEC)&&(rtime < LONG_MAX - 3 * DAY_SEC))
+ {
+- TimeZone* pLocalZone = TimeZone::createDefault();
++ icu::TimeZone* pLocalZone = icu::TimeZone::createDefault();
+ long offset = (pLocalZone->getRawOffset())/1000;
+ delete pLocalZone;
+ long ltime = rtime + offset;
+--- opencl/source/openclconfig.cxx.orig 2018-02-22 17:45:41 UTC
++++ opencl/source/openclconfig.cxx
+@@ -119,7 +119,7 @@ bool match(const OUString& rPattern, const OUString& r
+ UErrorCode nIcuError(U_ZERO_ERROR);
+ icu::UnicodeString sIcuPattern(reinterpret_cast<const UChar*>(rPattern.getStr()), rPattern.getLength());
+ icu::UnicodeString sIcuInput(reinterpret_cast<const UChar*>(rInput.getStr()), rInput.getLength());
+- RegexMatcher aMatcher(sIcuPattern, sIcuInput, 0, nIcuError);
++ icu::RegexMatcher aMatcher(sIcuPattern, sIcuInput, 0, nIcuError);
+
+ return U_SUCCESS(nIcuError) && aMatcher.matches(nIcuError) && U_SUCCESS(nIcuError);
+ }
+--- vcl/inc/scrptrun.h.orig 2018-02-22 17:45:41 UTC
++++ vcl/inc/scrptrun.h
+@@ -58,7 +58,7 @@ struct ParenStackEntry
+ }
+ };
+
+-class ScriptRun : public UObject {
++class ScriptRun : public icu::UObject {
+ public:
+
+ ScriptRun(const UChar chars[], int32_t length);