0006069: GEDCOM import does not generally support MULTIMEDIA_LINKs in the embedded form
svn: r20450
This commit is contained in:
parent
534785ebb9
commit
269f6e60ae
@ -2361,6 +2361,7 @@ class GedcomParser(UpdateCallback):
|
||||
TOKEN_NOTE : self.__event_place_note,
|
||||
TOKEN_RNOTE : self.__event_place_note,
|
||||
TOKEN_FORM : self.__event_place_form,
|
||||
# Not legal.
|
||||
TOKEN_OBJE : self.__event_place_object,
|
||||
TOKEN_SOUR : self.__event_place_sour,
|
||||
TOKEN__LOC : self.__ignore,
|
||||
@ -4764,7 +4765,13 @@ class GedcomParser(UpdateCallback):
|
||||
@type state: CurrentState
|
||||
"""
|
||||
if line.data and line.data[0] == '@':
|
||||
self.__not_recognized(line, state.level, state)
|
||||
# Reference to a named multimedia object defined elsewhere
|
||||
gramps_id = self.oid_map[line.data]
|
||||
|
||||
handle = self.__find_object_handle(gramps_id)
|
||||
ref = gen.lib.MediaRef()
|
||||
ref.set_reference_handle(handle)
|
||||
state.family.add_media_reference(ref)
|
||||
else:
|
||||
(form, filename, title, note) = self.__obje(state.level + 1, state)
|
||||
if filename == "":
|
||||
@ -4967,7 +4974,13 @@ class GedcomParser(UpdateCallback):
|
||||
@type state: CurrentState
|
||||
"""
|
||||
if line.data and line.data[0] == '@':
|
||||
self.__not_recognized(line, state.level, state)
|
||||
# Reference to a named multimedia object defined elsewhere
|
||||
gramps_id = self.oid_map[line.data]
|
||||
|
||||
handle = self.__find_object_handle(gramps_id)
|
||||
ref = gen.lib.MediaRef()
|
||||
ref.set_reference_handle(handle)
|
||||
state.event.add_media_reference(ref)
|
||||
else:
|
||||
(form, filename, title, note) = self.__obje(state.level + 1, state)
|
||||
if filename == "":
|
||||
@ -5097,7 +5110,13 @@ class GedcomParser(UpdateCallback):
|
||||
@type state: CurrentState
|
||||
"""
|
||||
if line.data and line.data[0] == '@':
|
||||
self.__not_recognized(line, state.level, state)
|
||||
# Reference to a named multimedia object defined elsewhere
|
||||
gramps_id = self.oid_map[line.data]
|
||||
|
||||
handle = self.__find_object_handle(gramps_id)
|
||||
ref = gen.lib.MediaRef()
|
||||
ref.set_reference_handle(handle)
|
||||
state.place.add_media_reference(ref)
|
||||
else:
|
||||
# FIXME this should probably be level+1
|
||||
(form, filename, title, note) = self.__obje(state.level, state)
|
||||
@ -5723,7 +5742,13 @@ class GedcomParser(UpdateCallback):
|
||||
@type state: CurrentState
|
||||
"""
|
||||
if line.data and line.data[0] == '@':
|
||||
self.__not_recognized(line, state.level, state)
|
||||
# Reference to a named multimedia object defined elsewhere
|
||||
gramps_id = self.oid_map[line.data]
|
||||
|
||||
handle = self.__find_object_handle(gramps_id)
|
||||
ref = gen.lib.MediaRef()
|
||||
ref.set_reference_handle(handle)
|
||||
state.citation.add_media_reference(ref)
|
||||
else:
|
||||
(form, filename, title, note) = self.__obje(state.level+1, state)
|
||||
if filename == "":
|
||||
@ -5860,7 +5885,13 @@ class GedcomParser(UpdateCallback):
|
||||
@type state: CurrentState
|
||||
"""
|
||||
if line.data and line.data[0] == '@':
|
||||
self.__not_recognized(line, state.level, state)
|
||||
# Reference to a named multimedia object defined elsewhere
|
||||
gramps_id = self.oid_map[line.data]
|
||||
|
||||
handle = self.__find_object_handle(gramps_id)
|
||||
ref = gen.lib.MediaRef()
|
||||
ref.set_reference_handle(handle)
|
||||
state.source.add_media_reference(ref)
|
||||
else:
|
||||
(form, filename, title, note) = self.__obje(state.level+1, state)
|
||||
if filename == "":
|
||||
|
Loading…
Reference in New Issue
Block a user