Re: tanya - r31502 - abiword/branches/gsoc2012ODF_improvements/plugins/opendocument/imp/xp
Jean Brefort <[email protected]>
| Newsgroups | gmane.editors.abiword.devel |
|---|---|
| Message-ID | <[email protected]> |
Don't care about math, that's Prashant's project (and already works in his branch). Cheers, Jean Le jeudi 12 juillet 2012 à 10:15 +0200, [email protected] a écrit : > Author: tanya > Date: 2012-07-12 10:15:26 +0200 (Thu, 12 Jul 2012) > New Revision: 31502 > > Modified: > abiword/branches/gsoc2012ODF_improvements/plugins/opendocument/imp/xp/ODi_Abi_Data.cpp > Log: > Fixed issue with invisible formulas after importing ODT(Bug 13327) > > Modified: abiword/branches/gsoc2012ODF_improvements/plugins/opendocument/imp/xp/ODi_Abi_Data.cpp > =================================================================== > @@ -210,11 +207,13 @@ > } > > // check to ensure that we're seeing math. this can probably be made smarter. > - static const char math_header[] = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE math:math"; > + static const char math_header[] = "<!DOCTYPE math:math"; > + static const char math_tag[] = "<math xmlns=\"http://www.w3.org/1998/Math/MathML\">"; > > - if ((object_buf->getLength () > strlen (math_header)) && > - (strncmp ((const char*)object_buf->getPointer (0), math_header, strlen (math_header)) != 0)) { > - delete object_buf; > + if ((strstr((const char*)object_buf->getPointer (0), math_header) == NULL) && > + (strstr((const char*)object_buf->getPointer (0), math_tag) == NULL)) > + { > + delete object_buf; > return false; > } > > > ----------------------------------------------- > To unsubscribe from this list, send a message to > [email protected] with the word > unsubscribe in the message body.