@@ -3855,79 +3855,6 @@ static int attributeIndex( const QString &name )
38553855 return -1 ;
38563856}
38573857
3858- static QString decodeEntityValue ( QString literal )
3859- {
3860- QString result;
3861-
3862- while ( !literal.isEmpty () )
3863- {
3864-
3865- if ( !literal.startsWith ( " &#" ) )
3866- {
3867- qWarning () << " decodeEntityValue(): bad entity literal: \" " + literal + " \" " ;
3868- return QString ();
3869- }
3870-
3871- literal = literal.right ( literal.length () - 2 );
3872-
3873- int i = literal.indexOf ( ' ;' );
3874- if ( i == -1 )
3875- {
3876- qWarning () << " decodeEntityValue(): bad entity literal: \" " + literal + " \" " ;
3877- return QString ();
3878- }
3879-
3880- QString char_code = literal.left ( i );
3881- literal = literal.right ( literal.length () - i - 1 );
3882-
3883- if ( char_code.isEmpty () )
3884- {
3885- qWarning () << " decodeEntityValue(): bad entity literal: \" " + literal + " \" " ;
3886- return QString ();
3887- }
3888-
3889- if ( char_code.at ( 0 ) == ' x' )
3890- {
3891- char_code = char_code.right ( char_code.length () - 1 );
3892- bool ok;
3893- unsigned c = char_code.toUInt ( &ok, 16 );
3894- if ( !ok )
3895- {
3896- qWarning () << " decodeEntityValue(): bad entity literal: \" " + literal + " \" " ;
3897- return QString ();
3898- }
3899- result += QChar ( c );
3900- }
3901- else
3902- {
3903- bool ok;
3904- unsigned c = char_code.toUInt ( &ok, 10 );
3905- if ( !ok )
3906- {
3907- qWarning () << " decodeEntityValue(): bad entity literal: \" " + literal + " \" " ;
3908- return QString ();
3909- }
3910- result += QChar ( c );
3911- }
3912- }
3913-
3914- return result;
3915- }
3916-
3917- static const QwtMmlEntitySpec *searchEntitySpecData ( const QString &value, const QwtMmlEntitySpec *from = 0 )
3918- {
3919- const QwtMmlEntitySpec *ent = from;
3920- if ( ent == 0 )
3921- ent = g_xml_entity_data;
3922- for ( ; ent->name != 0 ; ++ent )
3923- {
3924- QString ent_value = decodeEntityValue ( ent->value );
3925- if ( value == ent_value )
3926- return ent;
3927- }
3928- return 0 ;
3929- }
3930-
39313858struct OperSpecSearchResult
39323859{
39333860 OperSpecSearchResult () { prefix_form = infix_form = postfix_form = 0 ; }
0 commit comments