Re: abhshkrv - r33292 - abiword/branches/gsoc2013lasem/plugins/mathview/xp
Jean Brefort <[email protected]> Tue, 23 Jul 2013 12:48:13 +0200
| Newsgroups | gmane.editors.abiword.devel |
|---|---|
| Message-ID | <[email protected]> |
On line 849, style_element should always be NULL. You must not use a preexisting mstyle node, so the lopp just above must be removed as well as the test. Jean Le mardi 23 juillet 2013 à 12:02 +0200, [email protected] a écrit : > Author: abhshkrv > Date: 2013-07-23 12:02:07 +0200 (Tue, 23 Jul 2013) > New Revision: 33292 > > Modified: > abiword/branches/gsoc2013lasem/plugins/mathview/xp/AbiLasemMathView.cpp > Log: > re-parenting of child nodes moved to loadbuffer > > Modified: abiword/branches/gsoc2013lasem/plugins/mathview/xp/AbiLasemMathView.cpp > =================================================================== > --- abiword/branches/gsoc2013lasem/plugins/mathview/xp/AbiLasemMathView.cpp 2013-07-23 08:50:19 UTC (rev 33291) > +++ abiword/branches/gsoc2013lasem/plugins/mathview/xp/AbiLasemMathView.cpp 2013-07-23 10:02:07 UTC (rev 33292) > @@ -846,7 +846,21 @@ > if (!strcmp (lsm_dom_node_get_node_name (node), "mstyle")) > style_element = node; > } > - > + if (style_element == NULL) > + { > + if(mathml== NULL) > + mathml = lsm_dom_implementation_create_document(NULL, "math"); > + style_element = LSM_DOM_NODE (lsm_dom_document_create_element (mathml, "mstyle")); > + //lsm_dom_node_append_child (math_element, style_element); > + LsmDomNode *child; > + while(child = lsm_dom_node_get_first_child(math_element)) > + { > + lsm_dom_node_remove_child(math_element, child); > + lsm_dom_node_append_child(style_element, child); > + } > + lsm_dom_node_append_child(math_element, style_element); > + /* FIXME: put all document children into the mstyle element */ > + } > view = lsm_dom_document_create_view (mathml); > lsm_dom_view_get_size (view, &_width, &_height, &_baseline); > this->width = (UT_sint32) rint (_width / 72. * UT_LAYOUT_RESOLUTION); > @@ -936,20 +950,7 @@ > > g_free (font); > font = pango_font_description_to_string (pPF->getPangoDescription()); > - if (style_element == NULL) { > - if(mathml== NULL) > - mathml = lsm_dom_implementation_create_document(NULL, "math"); > - style_element = LSM_DOM_NODE (lsm_dom_document_create_element (mathml, "mstyle")); > - //lsm_dom_node_append_child (math_element, style_element); > - /* FIXME: put all document children into the mstyle element */ > - } > - LsmDomNode *child; > - while(child = lsm_dom_node_get_first_child(math_element)) > - { > - lsm_dom_node_remove_child(math_element, child); > - lsm_dom_node_append_child(style_element, child); > - } > - lsm_dom_node_append_child(math_element, style_element); > + > _style_element = LSM_DOM_ELEMENT (style_element); > if (pango_font_description_get_weight (pPF->getPangoDescription()) >= PANGO_WEIGHT_BOLD) { > if (pango_font_description_get_style (pPF->getPangoDescription()) == PANGO_STYLE_NORMAL) > > ----------------------------------------------- > To unsubscribe from this list, send a message to > [email protected] with the word > unsubscribe in the message body.