Diffstat (limited to 'noncore/apps/opie-reader/BuffDoc.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/BuffDoc.cpp | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/noncore/apps/opie-reader/BuffDoc.cpp b/noncore/apps/opie-reader/BuffDoc.cpp index e37b136..d4541ea 100644 --- a/noncore/apps/opie-reader/BuffDoc.cpp +++ b/noncore/apps/opie-reader/BuffDoc.cpp | |||
@@ -15,4 +15,4 @@ bool BuffDoc::hyperlink(unsigned int n) | |||
15 | { | 15 | { |
16 | bRet = exp->hyperlink(n); | 16 | bRet = exp->hyperlink(n); |
17 | lastsizes[0] = laststartline = exp->locate(); | 17 | lastsizes[0] = laststartline = exp->locate(); |
18 | } | 18 | } |
@@ -39,5 +39,5 @@ bool BuffDoc::getline(CDrawBuffer* buff, int w) | |||
39 | { | 39 | { |
40 | //(*buff)[0] = '\0'; | 40 | // (*buff)[0] = '\0'; |
41 | buff->empty(); | 41 | buff->empty(); |
42 | return false; | 42 | return false; |
43 | } | 43 | } |
@@ -56,5 +56,5 @@ bool BuffDoc::getline(CDrawBuffer* buff, int w) | |||
56 | for ( ; len > 0; len--) | 56 | for ( ; len > 0; len--) |
57 | { | 57 | { |
58 | if (buff->width(len) < w) break; | 58 | if (buff->width(len) < w) break; |
59 | } | 59 | } |
60 | // lastword = buff->data() + len - 1; | 60 | // lastword = buff->data() + len - 1; |
@@ -90,6 +90,6 @@ bool BuffDoc::getline(CDrawBuffer* buff, int w) | |||
90 | { | 90 | { |
91 | len++; | 91 | len++; |
92 | buff->addch(ch,cs); | 92 | buff->addch(ch,cs); |
93 | allsizes[len] = exp->locate(); | 93 | allsizes[len] = exp->locate(); |
94 | getch(ch, cs); | 94 | getch(ch, cs); |
95 | } | 95 | } |
@@ -102,4 +102,4 @@ bool BuffDoc::getline(CDrawBuffer* buff, int w) | |||
102 | { | 102 | { |
103 | lastcheck = len; | 103 | lastcheck = len; |
104 | break; | 104 | break; |
105 | } | 105 | } |
@@ -132,3 +132,3 @@ bool BuffDoc::getline(CDrawBuffer* buff, int w, int cw) | |||
132 | { | 132 | { |
133 | return false; | 133 | return false; |
134 | } | 134 | } |
@@ -139,6 +139,6 @@ bool BuffDoc::getline(CDrawBuffer* buff, int w, int cw) | |||
139 | { | 139 | { |
140 | getch(ch, cs); | 140 | getch(ch, cs); |
141 | if (ch == '\12' || ch == UEOF) break; | 141 | if (ch == '\12' || ch == UEOF) break; |
142 | buff->addch(ch,cs); | 142 | buff->addch(ch,cs); |
143 | i++; | 143 | i++; |
144 | } | 144 | } |
@@ -166,5 +166,5 @@ int BuffDoc::openfile(QWidget* _parent, const char *src) | |||
166 | { | 166 | { |
167 | delete exp; | 167 | delete exp; |
168 | exp = NULL; | 168 | exp = NULL; |
169 | return ret; | 169 | return ret; |
170 | } | 170 | } |
@@ -173,5 +173,5 @@ int BuffDoc::openfile(QWidget* _parent, const char *src) | |||
173 | 173 | ||
174 | delete exp; | 174 | delete exp; |
175 | exp = new ztxt; | 175 | exp = new ztxt; |
176 | ret = exp->openfile(src); | 176 | ret = exp->openfile(src); |
177 | } | 177 | } |
@@ -180,5 +180,5 @@ int BuffDoc::openfile(QWidget* _parent, const char *src) | |||
180 | 180 | ||
181 | delete exp; | 181 | delete exp; |
182 | exp = new CPlucker; | 182 | exp = new CPlucker; |
183 | ret = exp->openfile(src); | 183 | ret = exp->openfile(src); |
184 | } | 184 | } |
@@ -187,14 +187,14 @@ int BuffDoc::openfile(QWidget* _parent, const char *src) | |||
187 | { | 187 | { |
188 | delete exp; | 188 | delete exp; |
189 | qDebug("Trying ppms"); | 189 | qDebug("Trying ppms"); |
190 | exp = new ppm_expander; | 190 | exp = new ppm_expander; |
191 | ret = exp->openfile(src); | 191 | ret = exp->openfile(src); |
192 | } | 192 | } |
193 | 193 | ||
194 | if (ret != 0) | 194 | if (ret != 0) |
195 | { | 195 | { |
196 | delete exp; | 196 | delete exp; |
197 | exp = new Text; | 197 | exp = new Text; |
198 | // qDebug("Trying text"); | 198 | // qDebug("Trying text"); |
199 | ret = exp->openfile(src); | 199 | ret = exp->openfile(src); |
200 | } | 200 | } |
@@ -203,5 +203,5 @@ int BuffDoc::openfile(QWidget* _parent, const char *src) | |||
203 | { | 203 | { |
204 | delete exp; | 204 | delete exp; |
205 | exp = new Text; | 205 | exp = new Text; |
206 | ret = exp->openfile(src); | 206 | ret = exp->openfile(src); |
207 | } | 207 | } |
@@ -210,5 +210,5 @@ int BuffDoc::openfile(QWidget* _parent, const char *src) | |||
210 | { | 210 | { |
211 | delete exp; | 211 | delete exp; |
212 | QMessageBox::information(_parent, "QTReader", "Unknown file compression type","Try another file"); | 212 | QMessageBox::information(_parent, "OpieReader", "Unknown file compression type","Try another file"); |
213 | return ret; | 213 | return ret; |
214 | } | 214 | } |