rpms/openoffice.org/devel workspace.cmcfixes50.patch,1.4,1.5

Caolan McNamara caolanm at fedoraproject.org
Wed Nov 5 09:07:38 UTC 2008


Author: caolanm

Update of /cvs/pkgs/rpms/openoffice.org/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv32605

Modified Files:
	workspace.cmcfixes50.patch 
Log Message:
allow lingu components for languages that have no territories

workspace.cmcfixes50.patch:

Index: workspace.cmcfixes50.patch
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/workspace.cmcfixes50.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- workspace.cmcfixes50.patch	16 Sep 2008 10:44:59 -0000	1.4
+++ workspace.cmcfixes50.patch	5 Nov 2008 09:07:08 -0000	1.5
@@ -605,3 +605,94 @@
  	@@-$(MKDIRHIER) $(@:d)
      $(COPY) $< $@
  .ELSE
+Index: lingutil.cxx
+===================================================================
+--- openoffice.org.orig/lingucomponent/source/lingutil/lingutil.cxx	(.../cws/cmcfixes50/lingucomponent/source/lingutil/lingutil.cxx)	(revision 263330)
++++ openoffice.org/lingucomponent/source/lingutil/lingutil.cxx	(.../tags/DEV300_m35/lingucomponent/source/lingutil/lingutil.cxx)	(revision 263330)
+@@ -254,39 +254,36 @@
+            if (sPath.lastIndexOf(aSystemSuffix) == sPath.getLength()-aSystemSuffix.getLength())
+            {
+                sal_Int32 nStartIndex = sPath.lastIndexOf(sal_Unicode('/')) + 1;
+-               if (!sPath.match(aSystemPrefix, nStartIndex))
+-                   continue;
+-               rtl::OUString sChunk = sPath.copy(0, sPath.getLength() - aSystemSuffix.getLength());
++                              if (!sPath.match(aSystemPrefix, nStartIndex))
++                                      continue;
+                sal_Int32 nIndex = nStartIndex + aSystemPrefix.getLength();
+-               rtl::OUString sLang = sChunk.getToken( 0, '_', nIndex );
+-               if (!sLang.getLength())
+-                   continue;
+-               rtl::OUString sRegion;
+-               if (nIndex != -1);
+-                   sRegion = sChunk.copy( nIndex, sChunk.getLength() - nIndex );
++               rtl::OUString sLang = sPath.getToken( 0, '_', nIndex );
++               rtl::OUString sRegion = sPath.copy( nIndex, sPath.getLength() - nIndex - aSystemSuffix.getLength());
++                              if (!sLang.getLength() || !sRegion.getLength())
++                                      continue;
+ 
+-               // Thus we first get the language of the dictionary
+-               LanguageType nLang = MsLangId::convertIsoNamesToLanguage(
++                              // Thus we first get the language of the dictionary
++                              LanguageType nLang = MsLangId::convertIsoNamesToLanguage(
+                   sLang, sRegion );
+               
+-               if (aDicLangInUse.count( nLang ) == 0)
+-               {
+-                   // remember the new language in use
+-                   aDicLangInUse.insert( nLang );
++                              if (aDicLangInUse.count( nLang ) == 0)
++                              {
++                                      // remember the new language in use
++                                      aDicLangInUse.insert( nLang );
+ 
+-                   // add the dictionary to the resulting vector
+-                   SvtLinguConfigDictionaryEntry aDicEntry;
+-                   aDicEntry.aLocations.realloc(1);
+-                   aDicEntry.aLocaleNames.realloc(1);
+-                   rtl::OUString aLocaleName( MsLangId::convertLanguageToIsoString( nLang ) );
+-                   aDicEntry.aLocations[0] = sPath;
+-                   aDicEntry.aFormatName = aFormatName;
+-                   aDicEntry.aLocaleNames[0] = aLocaleName;
+-                   aRes.push_back( aDicEntry );
+-               }
++                                      // add the dictionary to the resulting vector
++                                      SvtLinguConfigDictionaryEntry aDicEntry;
++                                      aDicEntry.aLocations.realloc(1);
++                                      aDicEntry.aLocaleNames.realloc(1);
++                                      rtl::OUString aLocaleName( MsLangId::convertLanguageToIsoString( nLang ) );
++                      aDicEntry.aLocations[0]   = sPath;
++                                      aDicEntry.aFormatName     = aFormatName;
++                                      aDicEntry.aLocaleNames[0] = aLocaleName;
++                                      aRes.push_back( aDicEntry );
++                              }
+            }
+        }
+-    }
++      }
+ 
+ #endif
+ 
+@@ -320,20 +317,16 @@
+ 		sal_Int32 nOldStyleDics = aIt2->aLocaleNames.getLength();
+ 		
+ 		// old style dics should only have one language listed...
+-		DBG_ASSERT( nOldStyleDics, "old style dictionary with more then one language found!");
++		DBG_ASSERT( nOldStyleDics, "old style dictionary with more then one language found!")
+ 		if (nOldStyleDics > 0)
+ 		{
+ 			LanguageType nLang = MsLangId::convertIsoStringToLanguage( aIt2->aLocaleNames[0] );
+ 
+-            if (nLang == LANGUAGE_DONTKNOW || nLang == LANGUAGE_NONE)
+-            {
+-                DBG_ERROR( "old style dictionary with invalid language found!" );
+-                continue;
+-            }
+-
+ 			// language not yet added?
+ 			if (aNewStyleLanguages.count( nLang ) == 0)
++			{
+ 				rNewStyleDics.push_back( *aIt2 );
++			}
+ 		}
+ 		else
+ 		{




More information about the scm-commits mailing list