From owner-freebsd-openoffice@FreeBSD.ORG Thu May 1 01:50:05 2008 Return-Path: Delivered-To: openoffice@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11EFE1065670 for ; Thu, 1 May 2008 01:50:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EBF8A8FC19 for ; Thu, 1 May 2008 01:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m411o3ei007766 for ; Thu, 1 May 2008 01:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m411o3Lf007765; Thu, 1 May 2008 01:50:03 GMT (envelope-from gnats) Date: Thu, 1 May 2008 01:50:03 GMT Message-Id: <200805010150.m411o3Lf007765@freefall.freebsd.org> To: openoffice@FreeBSD.org From: Marcin Cieslak Cc: Subject: Re: [icu-support] [Fwd: Re: ports/121787: when devel/icu is installed, openoffice fails to build] X-BeenThere: freebsd-openoffice@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Marcin Cieslak List-Id: Porting OpenOffice to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 May 2008 01:50:05 -0000 The following reply was made to PR ports/121787; it has been noted by GNATS. From: Marcin Cieslak To: "Steven R. Loomis" Cc: ICU support mailing list , cokane@freebsd.org, bug-followup@freebsd.org, George Rhoten Subject: Re: [icu-support] [Fwd: Re: ports/121787: when devel/icu is installed, openoffice fails to build] Date: Thu, 01 May 2008 03:45:56 +0200 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig48EE52BC953722DF5355A8A3 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Steven R. Loomis wrote: > There is a temporary patch at >=20 > http://bugs.icu-project.org/trac/ticket/5498 >=20 > , but longer term, setBreakType() should not be called from a parent=20 > class or a subclass. >=20 > Instead, use >=20 > BreakIterator::create*Instance(=E2=80=A6)=20 > http://www.icu-project.org/apiref/icu4c/classBreakIterator.html >=20 > You could call it from within a switch statement. >=20 > or the parameterized (in C) >=20 > ubrk_open( UBreakIteratorType =E2=80=A6 )=20 > http://www.icu-project.org/apiref/icu4c/ubrk_8h.html >=20 > ICU does not need to be modified for this case. In some cases, OpenOffice.org loads pre-compiled rules (for example,=20 there are three different word iteration modes, with exceptions for some = languages). Source for those custom rules is here: http://l10n.openoffice.org/source/browse/l10n/i18npool/source/breakiterat= or/data/ (dict_word_xxx, edit_word_xxx, count_word_xxx indicate different word=20 iteration modes). OOo function loads binary images on demand in a similar way as this is=20 done in BreakIterator::buildInstance: UDataMemory* file =3D udata_open(U_ICUDATA_BRKITR, ext, fnbuff, &sta= tus); if (U_FAILURE(status)) { ures_close(b); return NULL; } // Create a RuleBasedBreakIterator result =3D new RuleBasedBreakIterator(file, status); // If there is a result, set the valid locale and actual locale,=20 and the kind if (U_SUCCESS(status) && result !=3D NULL) { U_LOCALE_BASED(locBased, *(BreakIterator*)result); locBased.setLocaleIDs(ures_getLocaleByType(b,=20 ULOC_VALID_LOCALE, &status), actualLocale); result->setBreakType(kind); } OOO.org bundles a version of ICU 3.6. I think that similar problem was already discussed there: http://www.nabble.com/Minor-changes-needed-to-ICULanguageBreakFactory-(IC= U4C)-td10069414.html Can we achieve loading custom rules and have them still bound with=20 locale and break type information in some elegant way? Is there any way we can use "ICULanguageBreakFactory" for this? Or maybe = the above-quoted interface from BreakIterator::buildInstance() could be=20 somehow exposed (we supply complete UDataMemory* structure)? The code doing this is here: http://l10n.openoffice.org/source/browse/l10n/i18npool/source/breakiterat= or/breakiterator_unicode.cxx?rev=3D1.34&view=3Dmarkup I have started scribbling some notes on this: http://wiki.services.openoffice.org/wiki/LoadICUBreakIterator I might have missed something obvious, though. --Marcin --=20 << Marcin Cieslak // saper@system.pl >> --------------enig48EE52BC953722DF5355A8A3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQCVAwUBSBkg1z2W2v2wY27ZAQOMpgP/bxG+wJB97tugoLiWnDju4vYIbTAYUkvn PzN0Vz6Iu/KkdMlyLMCIqQYiqsS1IxGmsT6sgX4jgHYRyiCstSThExF0Y2rCPomA b9OdYRomS8cy/RpRQi5HEXg+8kbFQY6iZVNzQpHjRbATDBQxBfKFmRBnJ8Yi0Tpj 6wrlF7L+Sco= =9kuP -----END PGP SIGNATURE----- --------------enig48EE52BC953722DF5355A8A3--