rpms/openoffice.org/devel openoffice.org-2.1.0.ooo78148.lingucomponent.systemhunspell.patch, NONE, 1.1 openoffice.org.spec, 1.1198, 1.1199 openoffice.org-2.1.0.oooXXXXX.lingucomponent.systemhunspell.patch, 1.4, NONE

Caolan McNamara (caolanm) fedora-extras-commits at redhat.com
Wed Jun 6 15:25:51 UTC 2007


Author: caolanm

Update of /cvs/pkgs/rpms/openoffice.org/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28828

Modified Files:
	openoffice.org.spec 
Added Files:
	openoffice.org-2.1.0.ooo78148.lingucomponent.systemhunspell.patch 
Removed Files:
	openoffice.org-2.1.0.oooXXXXX.lingucomponent.systemhunspell.patch 
Log Message:
extend lingucomponent patch

openoffice.org-2.1.0.ooo78148.lingucomponent.systemhunspell.patch:

--- NEW FILE openoffice.org-2.1.0.ooo78148.lingucomponent.systemhunspell.patch ---
Index: source/editeng/unolingu.cxx
===================================================================
RCS file: /cvs/graphics/svx/source/editeng/unolingu.cxx,v
retrieving revision 1.31.22.1
diff -u -r1.31.22.1 unolingu.cxx
--- openoffice.org.orig/svx/source/editeng/unolingu.cxx	22 Nov 2006 11:39:00 -0000	1.31.22.1
+++ openoffice.org/svx/source/editeng/unolingu.cxx	29 Nov 2006 19:11:38 -0000
@@ -526,12 +526,13 @@
     // 1: regular OOo dictionary path
 	// 2: user-dictionary path (where OOo linguistic by bad choice places downloaded dictionaries
 	//	  when the permissions for the share tree are missing. E.g. in user installations.)
-	const USHORT nDirectories = 3;
-    String aDirectories[ 3 /*nDirectories*/ ];
+	const USHORT nDirectories = 4;
+    String aDirectories[ 4 /*nDirectories*/ ];
     aDirectories[0] = linguistic::GetFileURL( SvtPathOptions::PATH_LINGUISTIC, String::CreateFromAscii( "x" ) );
     aDirectories[1] = linguistic::GetFileURL( SvtPathOptions::PATH_LINGUISTIC, String::CreateFromAscii( "ooo" ) );
     //!! warning: see bUseFile below when changing this index !!
 	aDirectories[2] = linguistic::GetFileURL( SvtPathOptions::PATH_USERDICTIONARY, String::CreateFromAscii( "x" ) );
+    aDirectories[3] = String::CreateFromAscii( "file:///usr/share/myspell" );
 	//
     aDirectories[0].Erase( aDirectories[0].Len() - 2, 2 );	// erase /x from URL
     aDirectories[2].Erase( aDirectories[2].Len() - 2, 2 );	// erase /x from URL
Index: source/spellcheck/spell/sspellimp.cxx
===================================================================
RCS file: /cvs/whiteboard/lingucomponent/source/spellcheck/spell/sspellimp.cxx,v
retrieving revision 1.18
diff -u -r1.18 sspellimp.cxx
--- openoffice.org.orig/lingucomponent/source/spellcheck/spell/sspellimp.cxx	16 Sep 2006 16:12:16 -0000	1.18
+++ openoffice.org/lingucomponent/source/spellcheck/spell/sspellimp.cxx	29 Nov 2006 19:42:18 -0000
@@ -160,14 +160,15 @@
 
         int numusr;          // number of user dictionary entries
         int numshr;          // number of shared dictionary entries
+        int numsys;          // number of system dictionary entries
         dictentry * spdict;  // shared dict entry pointer
         dictentry * updict;  // user dict entry pointer
         SvtPathOptions aPathOpt;
 
+	std::vector<dictentry *> postsyspdict;
 	std::vector<dictentry *> postspdict;
 	std::vector<dictentry *> postupdict;
 
-
 	if (!numdict) {
 
             // invoke a dictionary manager to get the user dictionary list
@@ -214,14 +215,42 @@
 		postspdict.push_back(&spdict[i]);
             }
 
+            numsys = 0;
+            const OUString sSystemDictPath(A2OU("file:///usr/share/myspell"));
+            osl::Directory aSystemDicts(sSystemDictPath);
+            if (aSystemDicts.open() == osl::FileBase::E_None)
+            {
+                DirectoryItem aItem;
+                FileStatus aFileStatus(FileStatusMask_FileURL);
+                while (aSystemDicts.getNextItem(aItem) == osl::FileBase::E_None)
+                {
+                    aItem.getFileStatus(aFileStatus);
+                    rtl::OUString sPath = aFileStatus.getFileURL();
+                    if (sPath.lastIndexOf(A2OU(".dic")) == sPath.getLength()-4)
+                    {
+                        sal_Int32 nStartIndex = sPath.lastIndexOf(sal_Unicode('/')) + 1;
+                        sal_Int32 nIndex = nStartIndex;
+                        OUString sLang = sPath.getToken( 0, '_', nIndex );
+                        OUString sRegion = sPath.getToken( 0, '.', nIndex );
+			sPath = sPath.copy(nStartIndex, nIndex - nStartIndex - 1);
+			dictentry *entry = new dictentry;
+			entry->filename = strdup(OUStringToOString(sPath, RTL_TEXTENCODING_UTF8).getStr());
+			entry->lang = strdup(OUStringToOString(sLang, RTL_TEXTENCODING_UTF8).getStr());
+			entry->region = strdup(OUStringToOString(sRegion, RTL_TEXTENCODING_UTF8).getStr());
+			postsyspdict.push_back(entry);
+                    }
+                }
+            }
+
 	    numusr = postupdict.size();
             numshr = postspdict.size();
+            numsys = postsyspdict.size();
 
             // we really should merge these and remove duplicates but since 
             // users can name their dictionaries anything they want it would
             // be impossible to know if a real duplication exists unless we
             // add some unique key to each myspell dictionary
-            numdict = numshr + numusr;
+            numdict = numsys + numshr + numusr;
 
             if (numdict) {
 	        aDicts = new Hunspell* [numdict];
@@ -270,6 +299,31 @@
                     aDNames[k] = aPathOpt.GetLinguisticPath() + A2OU("/ooo/") + A2OU(postspdict[i]->filename);
                     k++;
                 }
+
+                // now add the system dictionaries
+                for (i = 0; i < numsys; i++) {
+	            Locale nLoc( A2OU(postsyspdict[i]->lang), A2OU(postsyspdict[i]->region), OUString() );
+                    newloc = 1;
+	            for (j = 0; j < numlocs; j++) {
+                        if (nLoc == pLocale[j]) newloc = 0;
+                    }
+                    if (newloc) {
+                        pLocale[numlocs] = nLoc;
+                        numlocs++;
+                    }
+                    aDLocs[k] = nLoc;
+                    aDicts[k] = NULL;
+                    aDEncs[k] = 0;
+                    aDNames[k] = sSystemDictPath + A2OU("/") + A2OU(postsyspdict[i]->filename);
+
+		    free(postsyspdict[i]->filename);
+		    free(postsyspdict[i]->lang);
+		    free(postsyspdict[i]->region);
+		    delete postsyspdict[i];
+
+                    k++;
+                }
+
 
                 aSuppLocales.realloc(numlocs);
 
Index: configure.in
===================================================================
RCS file: /cvs/tools/config_office/configure.in,v
retrieving revision 1.192.2.3
diff -u -r1.192.2.3 configure.in
--- openoffice.org.orig/config_office/configure.in	19 Jan 2007 12:55:19 -0000	1.192.2.3
+++ openoffice.org/config_office/configure.in	6 Jun 2007 14:11:02 -0000
@@ -3985,14 +3985,16 @@
     AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ],
         [AC_MSG_ERROR(hunspell headers not found.)], [])
        ], [])
-    AC_CHECK_LIB(hunspell, main, [],
+    AC_CHECK_LIB(hunspell-1.1, main, [],
            [ AC_MSG_ERROR(hunspell library not found.) ], [])
+    HUNSPELL_LIBS="-lhunspell-1.1"
 else
     AC_MSG_RESULT([internal])
     SYSTEM_HUNSPELL=NO
 fi
 AC_SUBST(SYSTEM_HUNSPELL)
 AC_SUBST(HUNSPELL_CFLAGS)
+AC_SUBST(HUNSPELL_LIBS)
 
 dnl ===================================================================
 dnl Checking for altlinuxhyph
Index: set_soenv.in
===================================================================
RCS file: /cvs/tools/config_office/set_soenv.in,v
retrieving revision 1.130.2.3
diff -u -r1.130.2.3 set_soenv.in
--- openoffice.org.orig/config_office/set_soenv.in	19 Jan 2007 12:55:33 -0000	1.130.2.3
+++ openoffice.org/config_office/set_soenv.in	6 Jun 2007 14:11:03 -0000
@@ -1852,6 +1852,7 @@
 ToFile( "XINERAMA_LINK",     "@XINERAMA_LINK@",    "e" );
 ToFile( "SYSTEM_HUNSPELL",   "@SYSTEM_HUNSPELL@",  "e" );
 ToFile( "HUNSPELL_CFLAGS",   "@HUNSPELL_CFLAGS@",  "e" );
+ToFile( "HUNSPELL_LIBS",     "@HUNSPELL_LIBS@",    "e" );
 ToFile( "SYSTEM_HYPH",       "@SYSTEM_HYPH@",      "e" );
 ToFile( "SYSTEM_MYTHES",     "@SYSTEM_MYTHES@",    "e" );
 ToFile( "PAM",               "@PAM@",              "e" );
Index: source/hyphenator/altlinuxhyph/hyphen/makefile.mk
===================================================================
RCS file: /cvs/whiteboard/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk,v
retrieving revision 1.11.34.1
diff -u -r1.11.34.1 makefile.mk
--- openoffice.org.orig/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk	1 Feb 2007 19:08:18 -0000	1.11.34.1
+++ openoffice.org/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk	6 Jun 2007 14:12:05 -0000
@@ -97,10 +97,10 @@
 		$(LNGLIB) \
 		$(HNJLIB)
 
-.IF "$(SYSTEM_MYSPELL)" != "YES"
+.IF "$(SYSTEM_HUNSPELL)" != "YES"
 SHL1STDLIBS+=   $(ULINGULIB)
 .ELSE
-SHL1STDLIBS+=   $(MYSPELL_LIBS)
+SHL1STDLIBS+=   $(HUNSPELL_LIBS)
 .ENDIF
 
 
Index: source/lingutil/makefile.mk
===================================================================
RCS file: /cvs/whiteboard/lingucomponent/source/lingutil/makefile.mk,v
retrieving revision 1.6
diff -u -r1.6 makefile.mk
--- openoffice.org.orig/lingucomponent/source/lingutil/makefile.mk	7 Sep 2005 19:40:54 -0000	1.6
+++ openoffice.org/lingucomponent/source/lingutil/makefile.mk	6 Jun 2007 14:12:05 -0000
@@ -43,9 +43,9 @@
 
 .INCLUDE : settings.mk
 
-.IF "$(SYSTEM_MYSPELL)" == "YES"
+.IF "$(SYSTEM_HUNSPELL)" == "YES"
 @all:
-	@echo "Nothing to do here; using system myspell..."
+	@echo "Nothing to do here; using system hunspell..."
 .ENDIF
 
 SLOFILES=	\
Index: source/spellcheck/spell/makefile.mk
===================================================================
RCS file: /cvs/whiteboard/lingucomponent/source/spellcheck/spell/makefile.mk,v
retrieving revision 1.13.34.1
diff -u -r1.13.34.1 makefile.mk
--- openoffice.org.orig/lingucomponent/source/spellcheck/spell/makefile.mk	1 Feb 2007 19:08:29 -0000	1.13.34.1
+++ openoffice.org/lingucomponent/source/spellcheck/spell/makefile.mk	6 Jun 2007 14:12:06 -0000
@@ -40,11 +40,6 @@
 ENABLE_EXCEPTIONS=TRUE
 USE_DEFFILE=TRUE
 
-.IF "$(MYSPELLLIB)"==""
-.ELSE
- at echo "Build Hunspell instead of system Myspell."
-.ENDIF
-
 .IF "$(HUNSPELLLIB)"==""
 .IF "$(GUI)"=="UNX"
 HUNSPELLLIB=-lhunspell
@@ -108,11 +103,12 @@
 		$(SALLIB)		\
 		$(UCBHELPERLIB)	\
 		$(UNOTOOLSLIB)	\
-		$(LNGLIB) \
-                $(HUNSPELLLIB)
+		$(LNGLIB)
 
 .IF "$(SYSTEM_HUNSPELL)" != "YES"
-SHL1STDLIBS+=   $(ULINGULIB)
+SHL1STDLIBS+=   $(ULINGULIB) $(HUNSPELLLIB)
+.ELSE
+SHL1STDLIBS+=   $(HUNSPELL_LIBS)
 .ENDIF
 
 # build DLL
Index: source/thesaurus/libnth/makefile.mk
===================================================================
RCS file: /cvs/whiteboard/lingucomponent/source/thesaurus/libnth/makefile.mk,v
retrieving revision 1.7.34.1
diff -u -r1.7.34.1 makefile.mk
--- openoffice.org.orig/lingucomponent/source/thesaurus/libnth/makefile.mk	1 Feb 2007 19:08:41 -0000	1.7.34.1
+++ openoffice.org/lingucomponent/source/thesaurus/libnth/makefile.mk	6 Jun 2007 14:12:06 -0000
@@ -66,22 +66,22 @@
 
 # --- Files --------------------------------------------------------
 
-.IF "$(SYSTEM_MYSPELL)" == "YES" && "$(SYSTEM_MYTHES)" == "YES"
-CXXFLAGS += $(MYSPELL_CFLAGS)
-CFLAGSCXX += $(MYSPELL_CFLAGS)
-CFLAGSCC += $(MYSPELL_CFLAGS)
-.ENDIF
-.IF "$(SYSTEM_MYSPELL)" == "YES" && "$(SYSTEM_MYTHES)" != "YES"
-CXXFLAGS += -I..$/mythes $(MYSPELL_CFLAGS)
-CFLAGSCXX += -I..$/mythes $(MYSPELL_CFLAGS)
-CFLAGSCC += -I..$/mythes $(MYSPELL_CFLAGS)
+.IF "$(SYSTEM_HUNSPELL)" == "YES" && "$(SYSTEM_MYTHES)" == "YES"
+CXXFLAGS += $(HUNSPELL_CFLAGS)
+CFLAGSCXX += $(HUNSPELL_CFLAGS)
+CFLAGSCC += $(HUNSPELL_CFLAGS)
+.ENDIF
+.IF "$(SYSTEM_HUNSPELL)" == "YES" && "$(SYSTEM_MYTHES)" != "YES"
+CXXFLAGS += -I..$/mythes $(HUNSPELL_CFLAGS)
+CFLAGSCXX += -I..$/mythes $(HUNSPELL_CFLAGS)
+CFLAGSCC += -I..$/mythes $(HUNSPELL_CFLAGS)
 .ENDIF
 .IF "$(SYSTEM_MYPSPELL)" != "YES" && "$(SYSTEM_MYTHES)" == "YES"
 CXXFLAGS += -I..$/..$/lingutil
 CFLAGSCXX += -I..$/..$/lingutil
 CFLAGSCC += -I..$/..$/lingutil
 .ENDIF
-.IF "$(SYSTEM_MYSPELL)" != "YES" && "$(SYSTEM_MYTHES)" != "YES"
+.IF "$(SYSTEM_HUNSPELL)" != "YES" && "$(SYSTEM_MYTHES)" != "YES"
 CXXFLAGS += -I..$/mythes -I..$/..$/lingutil
 CFLAGSCXX += -I..$/mythes -I..$/..$/lingutil
 CFLAGSCC += -I..$/mythes -I..$/..$/lingutil
@@ -117,10 +117,10 @@
 		$(LNGLIB) \
                 $(MYTHESLIB)
 
-.IF "$(SYSTEM_MYSPELL)" != "YES"
+.IF "$(SYSTEM_HUNSPELL)" != "YES"
 SHL1STDLIBS+=   $(ULINGULIB)
 .ELSE
-SHL1STDLIBS+=   $(MYSPELL_LIBS)
+SHL1STDLIBS+=   $(HUNSPELL_LIBS)
 .ENDIF
 # build DLL
 SHL1LIBS=		$(SLB)$/$(TARGET).lib


Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.1198
retrieving revision 1.1199
diff -u -r1.1198 -r1.1199
--- openoffice.org.spec	6 Jun 2007 13:05:11 -0000	1.1198
+++ openoffice.org.spec	6 Jun 2007 15:25:17 -0000	1.1199
@@ -109,7 +109,7 @@
 Patch43: openoffice.org-2.1.0.ooo61812.svx.a11ycrash.patch
 Patch44: openoffice.org-2.0.3.rh127576.gtkunixprintdialog.localize
 Patch45: openoffice.org-2.1.0.ooo72014.officecfg.malayammenu.patch
-Patch46: openoffice.org-2.1.0.oooXXXXX.lingucomponent.systemhunspell.patch
+Patch46: openoffice.org-2.1.0.ooo78148.lingucomponent.systemhunspell.patch
 Patch47: openoffice.org-2.1.0.rh217269.officecfg.nosequencecheck.patch
 Patch48: openoffice.org-2.1.0.ooo72129.vcl.fontglyphindex.patch
 Patch49: openoffice.org-2.1.0.gccXXXXX.basegfx.crash.patch
@@ -1042,7 +1042,7 @@
 %patch43 -p1 -b .ooo61812.svx.a11ycrash.patch
 cat %{PATCH44} >> svtools/source/dialogs/localize.sdf
 %patch45 -p1 -b .ooo72014.officecfg.malayammenu.patch
-%patch46 -p1 -b .oooXXXXX.lingucomponent.systemhunspell.patch
+%patch46 -p1 -b .ooo78148.lingucomponent.systemhunspell.patch
 %patch47 -p1 -b .rh217269.officecfg.nosequencecheck.patch
 %patch48 -p1 -b .ooo72129.vcl.fontglyphindex.patch
 %patch49 -p1 -b .gccXXXXX.basegfx.crash.patch


--- openoffice.org-2.1.0.oooXXXXX.lingucomponent.systemhunspell.patch DELETED ---




More information about the fedora-extras-commits mailing list