summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/striphtml.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-reader/striphtml.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-reader/striphtml.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/opie-reader/striphtml.cpp b/noncore/apps/opie-reader/striphtml.cpp
index c434dbb..a2ad56b 100644
--- a/noncore/apps/opie-reader/striphtml.cpp
+++ b/noncore/apps/opie-reader/striphtml.cpp
@@ -452,49 +452,49 @@ QString striphtml::getattr(tchar& ch)
452} 452}
453 453
454linkType striphtml::hyperlink(unsigned int n, unsigned int, QString& w, QString& nm) 454linkType striphtml::hyperlink(unsigned int n, unsigned int, QString& w, QString& nm)
455{ 455{
456#if defined(USEQPE) || defined(_WINDOWS) 456#if defined(USEQPE) || defined(_WINDOWS)
457 QMap<unsigned long, QString>::Iterator hrefit = id2href->find(n); 457 QMap<unsigned long, QString>::Iterator hrefit = id2href->find(n);
458#else 458#else
459 QMap<unsigned long, QString>::iterator hrefit = id2href->find(n); 459 QMap<unsigned long, QString>::iterator hrefit = id2href->find(n);
460#endif 460#endif
461 if (hrefit == id2href->end()) 461 if (hrefit == id2href->end())
462 { 462 {
463 return eNone; 463 return eNone;
464 } 464 }
465 QString href = *hrefit; 465 QString href = *hrefit;
466#if defined(USEQPE) || defined(_WINDOWS) 466#if defined(USEQPE) || defined(_WINDOWS)
467 QMap<QString, unsigned long>::Iterator fpit = href2filepos->find(href); 467 QMap<QString, unsigned long>::Iterator fpit = href2filepos->find(href);
468#else 468#else
469 QMap<QString, unsigned long>::iterator fpit = href2filepos->find(href); 469 QMap<QString, unsigned long>::iterator fpit = href2filepos->find(href);
470#endif 470#endif
471 if (fpit == href2filepos->end()) 471 if (fpit == href2filepos->end())
472 { 472 {
473 if (href == "history.back()") 473 if (href == "history.back()")
474 { 474 {
475 QString fc = currentfile; 475 QString fc = currentfile;
476 unsigned long loc; 476 unsigned long loc = 0;
477 htmlmark m(fc, loc); 477 htmlmark m(fc, loc);
478 linkType ret = (m_nav.back(m)) ? eFile : eNone; 478 linkType ret = (m_nav.back(m)) ? eFile : eNone;
479 if (fc == m.filename()) 479 if (fc == m.filename())
480 { 480 {
481 if ((ret & eFile) != 0) 481 if ((ret & eFile) != 0)
482 { 482 {
483 locate(m.posn()); 483 locate(m.posn());
484 return eLink; 484 return eLink;
485 } 485 }
486 } 486 }
487 return eNone; 487 return eNone;
488 } 488 }
489 qDebug("Searching for %s", (const char*)href); 489 qDebug("Searching for %s", (const char*)href);
490 490
491 491
492 QString file, name; 492 QString file, name;
493 493
494 int colon = href.find('#'); 494 int colon = href.find('#');
495 if (colon >= 0) 495 if (colon >= 0)
496 { 496 {
497 file = dehtml(href.left(colon)); 497 file = dehtml(href.left(colon));
498 name = dehtml(href.right(href.length()-colon-1)); 498 name = dehtml(href.right(href.length()-colon-1));
499 } 499 }
500 else 500 else