version 1.49, 2007/08/20 14:56:34
|
version 1.50, 2007/08/28 14:29:00
|
Line 497 Element InsertWithNotify (Element el, El
|
Line 497 Element InsertWithNotify (Element el, El
|
NotifyElement event; |
NotifyElement event; |
char *name; |
char *name; |
ThotBool isRow = FALSE, isCell = FALSE; |
ThotBool isRow = FALSE, isCell = FALSE; |
|
ThotBool isImage = FALSE; |
|
ThotBool oldStructureChecking; |
|
|
|
// avoid to check attributes now |
|
oldStructureChecking = TtaGetStructureChecking (doc); |
|
TtaSetStructureChecking (FALSE, doc); |
|
|
elType = TtaGetElementType (el); |
elType = TtaGetElementType (el); |
name = TtaGetSSchemaName (elType.ElSSchema); |
name = TtaGetSSchemaName (elType.ElSSchema); |
Line 508 Element InsertWithNotify (Element el, El
|
Line 514 Element InsertWithNotify (Element el, El
|
(!strcmp (name,"MathML") && |
(!strcmp (name,"MathML") && |
(elType.ElTypeNum == MathML_EL_MTR || |
(elType.ElTypeNum == MathML_EL_MTR || |
elType.ElTypeNum == MathML_EL_MLABELEDTR))); |
elType.ElTypeNum == MathML_EL_MLABELEDTR))); |
|
isImage = (!strcmp (name,"HTML") && |
|
(elType.ElTypeNum == HTML_EL_IMG || elType.ElTypeNum == HTML_EL_Object)); |
if (child) |
if (child) |
TtaInsertSibling (el, child, FALSE, doc); |
TtaInsertSibling (el, child, FALSE, doc); |
else |
else |
TtaInsertFirstChild (&el, parent, doc); |
TtaInsertFirstChild (&el, parent, doc); |
|
TtaSetStructureChecking (oldStructureChecking, doc); |
|
|
if (isCell) |
if (isImage) |
|
InsertImageOrObject (el, doc); |
|
else if (isCell) |
{ |
{ |
// a cell is created |
// a cell is created |
NewCell (el, doc, TRUE, TRUE, TRUE); |
NewCell (el, doc, TRUE, TRUE, TRUE); |
Line 525 Element InsertWithNotify (Element el, El
|
Line 536 Element InsertWithNotify (Element el, El
|
event.document = doc; |
event.document = doc; |
RowPasted (&event); |
RowPasted (&event); |
} |
} |
//else |
|
// TtaNotifySubTree (TteElemNew, doc, el, FALSE); |
if (!strcmp (name,"HTML")) |
|
{ |
|
elType.ElTypeNum = HTML_EL_IMG; |
|
child = TtaSearchTypedElement (elType, SearchInTree, el); |
|
while (child) |
|
{ |
|
InsertImageOrObject (child, doc); |
|
child = TtaSearchTypedElementInTree (elType, SearchForward, el, child); |
|
} |
|
elType.ElTypeNum = HTML_EL_Object; |
|
child = TtaSearchTypedElement (elType, SearchInTree, el); |
|
while (child) |
|
{ |
|
InsertImageOrObject (child, doc); |
|
child = TtaSearchTypedElementInTree (elType, SearchForward, el, child); |
|
} |
|
} |
return el; |
return el; |
} |
} |
|
|