rpms/openoffice.org/devel openoffice.org-3.1.0.ooo100273.fix-utf8-hyphenation.patch, NONE, 1.1 openoffice.org.spec, 1.1861, 1.1862
Caolan McNamara
caolanm at fedoraproject.org
Tue Mar 17 14:27:38 UTC 2009
Author: caolanm
Update of /cvs/pkgs/rpms/openoffice.org/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6096
Modified Files:
openoffice.org.spec
Added Files:
openoffice.org-3.1.0.ooo100273.fix-utf8-hyphenation.patch
Log Message:
Resolves: ooo#100273 fix utf-8 hyphenation for potential Indic hyphenation patterns
openoffice.org-3.1.0.ooo100273.fix-utf8-hyphenation.patch:
--- NEW FILE openoffice.org-3.1.0.ooo100273.fix-utf8-hyphenation.patch ---
Index: source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
===================================================================
--- lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx (revision 269609)
+++ lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx (working copy)
@@ -652,18 +652,36 @@
OUString hyphenatedWord;
nHyphCount = 0;
+ INT16 nLastChunk=0;
+
+ //Our postions are relative to the potentially multi-byte encoded string,
+ //not the original string, so we need to work in terms of that encoded
+ //string when created the hyphenated word
+ OString origEncWord(OU2ENC(aWord,aEnc));
+
for (i = 0; i < encWord.getLength(); i++)
{
- hyphenatedWordBuffer.append(aWord[i]);
if (hyphens[i]&1)
{
- pPos[nHyphCount] = i;
+ //Take potentially multi-byte pending chunk of text and convert back to an OUString,
+ //include the current character in the chunk
+ hyphenatedWordBuffer.append(rtl::OStringToOUString(origEncWord.copy(nLastChunk,i-nLastChunk+1), aEnc));
+
+ //Position of current char at pos i of encWord in unicode equivalent, excluding
+ //hyphen characters and excluding the current char
+ pPos[nHyphCount] = hyphenatedWordBuffer.getLength() - nHyphCount - 1;
hyphenatedWordBuffer.append(sal_Unicode('='));
nHyphCount++;
+ nLastChunk = i+1;
}
}
+ //Append remaining potentially multi-byte pending text and convert back to an OUString
+ if (nLastChunk < encWord.getLength())
+ hyphenatedWordBuffer.append(rtl::OStringToOUString(origEncWord.copy(nLastChunk), aEnc));
+
hyphenatedWord = hyphenatedWordBuffer.makeStringAndClear();
+
//fprintf(stderr,"result is %s\n",OU2A(hyphenatedWord));
//fflush(stderr);
Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.1861
retrieving revision 1.1862
diff -u -r1.1861 -r1.1862
--- openoffice.org.spec 17 Mar 2009 12:24:51 -0000 1.1861
+++ openoffice.org.spec 17 Mar 2009 14:27:08 -0000 1.1862
@@ -1,6 +1,6 @@
%define oootag OOO310
%define ooomilestone 6
-%define rh_rpm_release 1
+%define rh_rpm_release 2
# rhbz#465664 jar-repacking breaks help by reordering META-INF/MANIFEST.MF
%define __jar_repack %{nil}
@@ -129,6 +129,7 @@
Patch54: openoffice.org-3.1.0.oooXXXXX.solenv.allowmissing.patch
Patch55: openoffice.org-3.1.0.gccXXXXX.sw.typeillness.patch
Patch56: workspace.rptfix06.patch
+Patch57: openoffice.org-3.1.0.ooo100273.fix-utf8-hyphenation.patch
%define python_py_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(0)")
%define instdir %{_libdir}
@@ -1616,6 +1617,7 @@
%patch54 -p1 -b .oooXXXXX.solenv.allowmissing.patch
%patch55 -p1 -b .gccXXXXX.sw.typeillness.patch
%patch56 -p0 -b .workspace.rptfix06.patch
+%patch57 -p0 -b .ooo100273.fix-utf8-hyphenation.patch
%build
echo build start time is `date`, diskspace: `df -h . | tail -n 1`
@@ -4103,6 +4105,10 @@
unopkg list --shared > /dev/null 2>&1 || :
%changelog
+* Tue Mar 17 2009 Caolán McNamara <caolanm at redhat.com> - 1:3.1.0-6.2
+- Resolves: ooo#100273 fix utf-8 hyphenation for potential Indic
+ hyphenation patterns
+
* Tue Mar 17 2009 Caolán McNamara <caolanm at redhat.com> - 1:3.1.0-6.1
- drop integrated workspace.cl12.patch
More information about the scm-commits
mailing list