rpms/openoffice.org/F-13 openoffice.org-3.2.0.ooo110142.svx.safercolornames.patch, NONE, 1.1 openoffice.org.spec, 1.2168, 1.2169

Caolan McNamara caolanm at fedoraproject.org
Mon Mar 15 15:24:29 UTC 2010


Author: caolanm

Update of /cvs/pkgs/rpms/openoffice.org/F-13
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv21700/F-13

Modified Files:
	openoffice.org.spec 
Added Files:
	openoffice.org-3.2.0.ooo110142.svx.safercolornames.patch 
Log Message:
Resolves: rhbz#573654 fix unwanted Red translation

openoffice.org-3.2.0.ooo110142.svx.safercolornames.patch:
 unoprov.cxx |   18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

--- NEW FILE openoffice.org-3.2.0.ooo110142.svx.safercolornames.patch ---
diff -ru svx.orig/source/unodraw/unoprov.cxx svx/source/unodraw/unoprov.cxx
--- svx.orig/source/unodraw/unoprov.cxx	2010-03-15 14:31:21.000000000 +0000
+++ svx/source/unodraw/unoprov.cxx	2010-03-15 15:17:05.000000000 +0000
@@ -1368,12 +1370,24 @@
 
 bool SvxUnoConvertResourceString( USHORT* pSourceResIds, USHORT* pDestResIds, int nCount, String& rString ) throw()
 {
-	int i = 0;
+    //We replace e.g. "Gray 10%" with the translation of Gray, but we shouldn't
+    //replace "Red Hat 1" with the translation of Red :-)
+    rtl::OUString sStr(rString);
+    const sal_Unicode *pStr = sStr.getStr();
+    sal_Int32 nLength = sStr.getLength();
+    while( nLength > 0 )
+    {
+        const sal_Unicode nChar = pStr[nLength-1];
+        if (nChar != '%' && (nChar < '0' || nChar > '9'))
+            break;
+        nLength--;
+    }
+    sStr = rtl::OUString(pStr, nLength).trim();
 
-	for( i = 0; i < nCount; i++ )
+	for(int i = 0; i < nCount; ++i )
 	{
 		String aStrDefName = SVX_RESSTR( pSourceResIds[i] );
-		if( rString.Search( aStrDefName ) == 0 )
+		if( sStr.equals( aStrDefName ) )
 		{
 			String aReplace = SVX_RESSTR( pDestResIds[i] );
 			rString.Replace( 0, aStrDefName.Len(), aReplace );


Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/F-13/openoffice.org.spec,v
retrieving revision 1.2168
retrieving revision 1.2169
diff -u -p -r1.2168 -r1.2169
--- openoffice.org.spec	15 Mar 2010 14:14:06 -0000	1.2168
+++ openoffice.org.spec	15 Mar 2010 15:24:29 -0000	1.2169
@@ -139,6 +139,7 @@ Patch68: openoffice.org-3.2.0.ooo108991.
 Patch69: workspace.vcl110.patch
 Patch70: openoffice.org-3.2.0.ooo109743.svx.safedragdrop.patch
 Patch71: openoffice.org-3.2.0.ooo109766.dbaccess.catch.patch
+Patch72: openoffice.org-3.2.0.ooo110142.svx.safercolornames.patch
 
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 %define instdir %{_libdir}
@@ -1710,6 +1711,7 @@ cp -p %{SOURCE5} external/unowinreg/unow
 %patch69 -p0 -b .workspace.vcl110.patch
 %patch70 -p0 -b .ooo109743.svx.safedragdrop.patch
 %patch71 -p0 -b .ooo109766.dbaccess.catch.patch
+%patch72 -p0 -b .ooo110142.svx.safercolornames.patch
 
 %build
 echo build start time is `date`, diskspace: `df -h . | tail -n 1`
@@ -4197,6 +4199,7 @@ fi
 %changelog
 * Mon Mar 15 2010 Caolán McNamara <caolanm at redhat.com> - 1:3.2.0-12.12
 - Resolves: rhbz#573239 fix java xslt problems
+- Resolves: rhbz#573654 fix unwanted "Red" translation
 
 * Mon Mar 08 2010 Caolán McNamara <caolanm at redhat.com> - 1:3.2.0-12.11
 - Resolves: rhbz#571100 fix .svg import crash (caolanm)



More information about the scm-commits mailing list