Commit b901d81b authored by Albert Astals Cid's avatar Albert Astals Cid

Better search of non latin-1 characters

svn path=/trunk/kdegraphics/kpdf/; revision=376531
parent 6589342b
......@@ -116,11 +116,11 @@ bool KPDFPage::hasText( const QString & text, bool strictCase, bool fromTop )
if ( !m_text )
return false;
const char * str = text.latin1();
const QChar* str = text.unicode();
int len = text.length();
Unicode *u = (Unicode *)gmalloc(len * sizeof(Unicode));
for (int i = 0; i < len; ++i)
u[i] = (Unicode) str[i];
u[i] = str[i].unicode();
bool found = m_text->findText( u, len, fromTop ? gTrue : gFalse, gTrue, fromTop ? gFalse : gTrue, gFalse, &m_sLeft, &m_sTop, &m_sRight, &m_sBottom );
if( found && strictCase )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment