summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/CFilter.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-reader/CFilter.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-reader/CFilter.cpp54
1 files changed, 50 insertions, 4 deletions
diff --git a/noncore/apps/opie-reader/CFilter.cpp b/noncore/apps/opie-reader/CFilter.cpp
index ab98829..25cdfae 100644
--- a/noncore/apps/opie-reader/CFilter.cpp
+++ b/noncore/apps/opie-reader/CFilter.cpp
@@ -4,2 +4,3 @@
4#include <qdir.h> 4#include <qdir.h>
5
5#ifdef USEQPE 6#ifdef USEQPE
@@ -10,3 +11,2 @@
10#include "hrule.h" 11#include "hrule.h"
11#include "util.h"
12 12
@@ -667,4 +667,13 @@ ExternFilter::ExternFilter(const QString& nm, const QString& optional) : filt(NU
667{ 667{
668 QString filterpath(QTReaderUtil::getPluginPath("filters")); 668#ifdef USEQPE
669 filterpath += "/lib"; 669#ifdef OPIE
670 QString filterpath(getenv("OPIEDIR"));
671#else
672 QString filterpath(getenv("QTDIR"));
673#endif
674 filterpath += "/plugins/reader/filters/lib";
675#else
676 QString filterpath(getenv("READERDIR"));
677 filterpath += "/filters/lib";
678#endif
670 filterpath += nm; 679 filterpath += nm;
@@ -694,3 +703,3 @@ ExternFilter::ExternFilter(const QString& nm, const QString& optional) : filt(NU
694 { 703 {
695 qDebug("No filter path"); 704 qDebug("No filter path:%s", (const char*)filterpath);
696 filt = new ErrorFilter(QString("No filter plugins installed:")+nm); 705 filt = new ErrorFilter(QString("No filter plugins installed:")+nm);
@@ -815 +824,38 @@ void repara::getch(tchar& ch, CStyle& sty, unsigned long& pos)
815} 824}
825
826void tableLink::getch(tchar& ch, CStyle& sty, unsigned long& pos)
827{
828 if (offset >= (int)text.length())
829 {
830 offset = -1;
831 sty.setColour(m_r, m_g, m_b);
832 do
833 {
834 parent->getch(ch, sty, pos);
835 }
836 while (sty.isTable());
837 return;
838 }
839 if (offset >= 0)
840 {
841 ch = text[offset++].unicode();
842 return;
843 }
844 parent->getch(ch, sty, pos);
845 if (sty.isTable())
846 {
847 offset = 1;
848 ch = text[0].unicode();
849 m_r = sty.Red(), m_g = sty.Green(), m_b = sty.Blue();
850 sty.setColour(255, 0, 0);
851 }
852 return;
853}
854
855void underlineLink::getch(tchar& ch, CStyle& sty, unsigned long& pos)
856{
857 parent->getch(ch, sty, pos);
858 if (sty.getLink()) sty.setUnderline();
859 //if (isLink && !sty.getLink()) sty.unsetUnderline();
860 //isLink = sty.getLink();
861}