From c25660c44e54de2929ef508992ca39e25aba7b8b Mon Sep 17 00:00:00 2001 From: Alan Garny Date: Thu, 3 Jan 2019 10:42:53 +1300 Subject: [PATCH] Fixed a `git merge master` issue. --- textengines/mathml/qwt_mml_document.cpp | 73 ------------------------- 1 file changed, 73 deletions(-) diff --git a/textengines/mathml/qwt_mml_document.cpp b/textengines/mathml/qwt_mml_document.cpp index a6009731..09369d67 100644 --- a/textengines/mathml/qwt_mml_document.cpp +++ b/textengines/mathml/qwt_mml_document.cpp @@ -3855,79 +3855,6 @@ static int attributeIndex( const QString &name ) return -1; } -static QString decodeEntityValue( QString literal ) -{ - QString result; - - while ( !literal.isEmpty() ) - { - - if ( !literal.startsWith( "&#" ) ) - { - qWarning() << "decodeEntityValue(): bad entity literal: \"" + literal + "\""; - return QString(); - } - - literal = literal.right( literal.length() - 2 ); - - int i = literal.indexOf( ';' ); - if ( i == -1 ) - { - qWarning() << "decodeEntityValue(): bad entity literal: \"" + literal + "\""; - return QString(); - } - - QString char_code = literal.left( i ); - literal = literal.right( literal.length() - i - 1 ); - - if ( char_code.isEmpty() ) - { - qWarning() << "decodeEntityValue(): bad entity literal: \"" + literal + "\""; - return QString(); - } - - if ( char_code.at( 0 ) == 'x' ) - { - char_code = char_code.right( char_code.length() - 1 ); - bool ok; - unsigned c = char_code.toUInt( &ok, 16 ); - if ( !ok ) - { - qWarning() << "decodeEntityValue(): bad entity literal: \"" + literal + "\""; - return QString(); - } - result += QChar( c ); - } - else - { - bool ok; - unsigned c = char_code.toUInt( &ok, 10 ); - if ( !ok ) - { - qWarning() << "decodeEntityValue(): bad entity literal: \"" + literal + "\""; - return QString(); - } - result += QChar( c ); - } - } - - return result; -} - -static const QwtMmlEntitySpec *searchEntitySpecData( const QString &value, const QwtMmlEntitySpec *from = 0 ) -{ - const QwtMmlEntitySpec *ent = from; - if ( ent == 0 ) - ent = g_xml_entity_data; - for ( ; ent->name != 0; ++ent ) - { - QString ent_value = decodeEntityValue( ent->value ); - if ( value == ent_value ) - return ent; - } - return 0; -} - struct OperSpecSearchResult { OperSpecSearchResult() { prefix_form = infix_form = postfix_form = 0; }