* src/GrampsParser.py: use findFamilyNoConflicts

* src/RelLib.py: remove findFamilyNoConflict
* src/docgen/LaTeXDoc.py: Fixed typo in latex generated comment


svn: r1909
This commit is contained in:
Don Allingham 2003-07-21 02:49:25 +00:00
parent bd2a26d708
commit 29110734d6
3 changed files with 3 additions and 24 deletions

View File

@ -880,7 +880,7 @@ class GrampsImportParser(GrampsParser):
self.func_map["parentin"] = (self.start_parentin,None)
def start_childof(self,attrs):
family = self.db.findFamilyNoConflict(attrs["ref"],self.fmap)
family = self.db.findFamilyNoConflicts(attrs["ref"],self.fmap)
if attrs.has_key("mrel"):
mrel = attrs["mrel"]
else:
@ -892,7 +892,7 @@ class GrampsImportParser(GrampsParser):
self.person.AltFamilyList.append((family,mrel,frel))
def start_parentin(self,attrs):
self.person.FamilyList.append(self.db.findFamilyNoConflict(attrs["ref"],self.fmap))
self.person.FamilyList.append(self.db.findFamilyNoConflicts(attrs["ref"],self.fmap))
def start_bmark(self,attrs):
person = self.db.findPersonNoConflicts(attrs["ref"],self.pmap)

View File

@ -2654,27 +2654,6 @@ class GrampsDB(Persistent):
map[idVal] = family.getId()
return family
def findFamilyNoConflict(self,idVal,map):
"""finds a Family in the database using the idVal and map
variables to translate between the external ID and gramps'
internal ID. If no such Family exists, a new Family instance
is created.
idVal - external ID number
map - map build by findFamily of external to gramp's IDs"""
if map.has_key(idVal):
family = self.familyMap[map[idVal]]
else:
family = self.familyMap.get(idVal)
if not family:
family = Family()
family.id = idVal
self.familyMap[idVal] = family
self.fmapIndex = self.fmapIndex + 1
map[idVal] = family.getId()
return family
def findFamilyNoMap(self,val):
"""finds a Family in the database from the passed gramps' ID.
If no such Family exists, a new Family is added to the database."""

View File

@ -111,7 +111,7 @@ class LaTeXDoc(TextDoc.TextDoc):
# that we should use Latin1 and unicode character encodings.
self.f.write('\\documentclass[%s]{article}\n' % options)
self.f.write('\\usepackage[T1]{fontenc}\n')
self.f.write('%\n% We use latin1 encoding at a minimum by default\n.')
self.f.write('%\n% We use latin1 encoding at a minimum by default.\n')
self.f.write('% GRAMPS uses unicode UTF-8 encoding for its\n')
self.f.write('% international support. LaTeX can deal gracefully\n')
self.f.write('% with unicode encoding by using the ucs style invoked\n')