summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/CFilter.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-reader/CFilter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/CFilter.cpp58
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
@@ -679,6 +679,64 @@ void repalm::getch(tchar& ch, CStyle& sty)
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
689void 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}