Diffstat (limited to 'noncore/apps/opie-reader/CFilter.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/CFilter.cpp | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/noncore/apps/opie-reader/CFilter.cpp b/noncore/apps/opie-reader/CFilter.cpp index d5e3116..73a0872 100644 --- a/noncore/apps/opie-reader/CFilter.cpp +++ b/noncore/apps/opie-reader/CFilter.cpp | |||
@@ -673,12 +673,70 @@ void repalm::getch(tchar& ch, CStyle& sty) | |||
673 | break; | 673 | break; |
674 | case 0x8f: | 674 | case 0x8f: |
675 | ch = 0x2661; | 675 | ch = 0x2661; |
676 | break; | 676 | break; |
677 | case 0x90: | 677 | case 0x90: |
678 | ch = 0x2660; | 678 | ch = 0x2660; |
679 | break; | 679 | break; |
680 | default: | 680 | default: |
681 | break; | 681 | break; |
682 | } | 682 | } |
683 | } | 683 | } |
684 | #endif | 684 | #endif |
685 | |||
686 | //static tchar nextpart[] = { 'C','l','i','c','k',' ','h','e','r','e',' ','f','o','r',' ','t','h','e',' ','n','e','x','t',' ','p','a','r','t',0 }; | ||
687 | //static tchar prevpart[] = { 'C','l','i','c','k',' ','h','e','r','e',' ','f','o','r',' ','t','h','e',' ','p','r','e','v','i','o','u','s',' ','p','a','r','t',0 }; | ||
688 | |||
689 | void DePluck::getch(tchar& ch, CStyle& sty) | ||
690 | { | ||
691 | if (m_buffed > 0) | ||
692 | { | ||
693 | sty = m_laststyle; | ||
694 | ch = nextpart[m_current++]; | ||
695 | if (m_current == m_buffed) | ||
696 | { | ||
697 | m_current = m_buffed = 0; | ||
698 | } | ||
699 | } | ||
700 | else | ||
701 | { | ||
702 | if (m_buffer != 0) | ||
703 | { | ||
704 | ch = m_buffer; | ||
705 | m_buffer = 0; | ||
706 | return; | ||
707 | } | ||
708 | unsigned long lnk; | ||
709 | do | ||
710 | { | ||
711 | if (nextpart[m_buffed] == 0) break; | ||
712 | parent->getch(ch, sty); | ||
713 | m_laststyle = sty; | ||
714 | if (sty.getLink()) lnk = sty.getData(); | ||
715 | } while (ch == nextpart[m_buffed] && sty.getLink() && ++m_buffed); | ||
716 | m_current = 0; | ||
717 | if (nextpart[m_buffed] == 0) | ||
718 | { | ||
719 | m_buffed = 0; | ||
720 | QString dmy; | ||
721 | parent->hyperlink(lnk, dmy); | ||
722 | do | ||
723 | { | ||
724 | parent->getch(ch, sty); | ||
725 | } | ||
726 | while (ch != 10); | ||
727 | parent->getch(ch, sty); | ||
728 | } | ||
729 | else if (m_buffed > 0) | ||
730 | { | ||
731 | m_buffer = ch; | ||
732 | ch = nextpart[0]; | ||
733 | if (m_buffed == 1) | ||
734 | { | ||
735 | m_buffed = 0; | ||
736 | } | ||
737 | else m_current = 1; | ||
738 | } | ||
739 | } | ||
740 | |||
741 | return; | ||
742 | } | ||