summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/BuffDoc.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-reader/BuffDoc.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/BuffDoc.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/noncore/apps/opie-reader/BuffDoc.cpp b/noncore/apps/opie-reader/BuffDoc.cpp
index 4fbab93..68391b8 100644
--- a/noncore/apps/opie-reader/BuffDoc.cpp
+++ b/noncore/apps/opie-reader/BuffDoc.cpp
@@ -31,9 +31,9 @@ linkType BuffDoc::hyperlink(unsigned int n, QString& wrd)
31} 31}
32 32
33void BuffDoc::locate(unsigned int n) 33void BuffDoc::locate(unsigned int n)
34{ 34{
35 // //qDebug("BuffDoc:locating:%u",n); 35 // //odebug << "BuffDoc:locating:" << n << "" << oendl;
36 lastword.empty(); 36 lastword.empty();
37 lastsizes[0] = laststartline = n; 37 lastsizes[0] = laststartline = n;
38#ifdef NEWLINEBREAK 38#ifdef NEWLINEBREAK
39 lastispara = true; 39 lastispara = true;
@@ -41,9 +41,9 @@ void BuffDoc::locate(unsigned int n)
41 lastispara = false; 41 lastispara = false;
42#endif 42#endif
43 // tchar linebuf[1024]; 43 // tchar linebuf[1024];
44 if (exp != NULL) exp->locate(n); 44 if (exp != NULL) exp->locate(n);
45 // //qDebug("BuffDoc:Located"); 45 // //odebug << "BuffDoc:Located" << oendl;
46} 46}
47 47
48#ifdef NEWLINEBREAK 48#ifdef NEWLINEBREAK
49bool BuffDoc::getline(CDrawBuffer* buff, int wth, unsigned char _border) 49bool BuffDoc::getline(CDrawBuffer* buff, int wth, unsigned char _border)
@@ -187,9 +187,9 @@ bool BuffDoc::getline(CDrawBuffer* buff, int wth, unsigned char _border)
187 w -= buff->leftMargin() + buff->rightMargin(); 187 w -= buff->leftMargin() + buff->rightMargin();
188 margindone = true; 188 margindone = true;
189 } 189 }
190 else buff->empty(); 190 else buff->empty();
191// //qDebug("Buff:%s Lastword:%s", (const char*)toQString(buff->data()), (const char*)toQString(lastword.data())); 191// //odebug << "Buff:" << toQString(buff->data()) << " Lastword:" << toQString(lastword.data()) << "" << oendl;
192 lastcheck = len = buff->length(); 192 lastcheck = len = buff->length();
193 unsigned int slen = buff->width(len); 193 unsigned int slen = buff->width(len);
194 if (slen > w) 194 if (slen > w)
195 { 195 {
@@ -321,10 +321,10 @@ bool BuffDoc::getline(CDrawBuffer* buff, int wth, int cw, unsigned char _border)
321} 321}
322 322
323int BuffDoc::openfile(QWidget* _parent, const char *src) 323int BuffDoc::openfile(QWidget* _parent, const char *src)
324{ 324{
325 // //qDebug("BuffDoc:Openfile:%s", src); 325 // //odebug << "BuffDoc:Openfile:" << src << "" << oendl;
326 // //qDebug("Trying aportis %x",exp); 326 // //odebug << "Trying aportis " << exp << "" << oendl;
327 if (exp != NULL) delete exp; 327 if (exp != NULL) delete exp;
328 lastword.empty(); 328 lastword.empty();
329 lastsizes[0] = laststartline = 0; 329 lastsizes[0] = laststartline = 0;
330#ifdef NEWLINEBREAK 330#ifdef NEWLINEBREAK
@@ -377,17 +377,17 @@ int BuffDoc::openfile(QWidget* _parent, const char *src)
377 } 377 }
378 if (ret != 0) 378 if (ret != 0)
379 { 379 {
380 delete exp; 380 delete exp;
381 //qDebug("Trying ppms"); 381 //odebug << "Trying ppms" << oendl;
382 exp = new ppm_expander; 382 exp = new ppm_expander;
383 ret = exp->openfile(src); 383 ret = exp->openfile(src);
384 } 384 }
385 if (ret != 0) 385 if (ret != 0)
386 { 386 {
387 delete exp; 387 delete exp;
388 exp = new Text; 388 exp = new Text;
389 // //qDebug("Trying text"); 389 // //odebug << "Trying text" << oendl;
390 ret = exp->openfile(src); 390 ret = exp->openfile(src);
391 } 391 }
392 392
393 if (ret != 0) 393 if (ret != 0)
@@ -395,9 +395,9 @@ int BuffDoc::openfile(QWidget* _parent, const char *src)
395 delete exp; 395 delete exp;
396 QMessageBox::information(_parent, PROGNAME, "Unknown file compression type","Try another file"); 396 QMessageBox::information(_parent, PROGNAME, "Unknown file compression type","Try another file");
397 return ret; 397 return ret;
398 } 398 }
399 // //qDebug("Doing final open:%x:%x",exp,filt); 399 // //odebug << "Doing final open:" << exp << ":" << filt << "" << oendl;
400 400
401 lastword.empty(); 401 lastword.empty();
402 lastsizes[0] = laststartline = 0; 402 lastsizes[0] = laststartline = 0;
403#ifdef NEWLINEBREAK 403#ifdef NEWLINEBREAK
@@ -406,7 +406,7 @@ int BuffDoc::openfile(QWidget* _parent, const char *src)
406 lastispara = false; 406 lastispara = false;
407#endif 407#endif
408 exp->locate(0); 408 exp->locate(0);
409 filt->setsource(exp); 409 filt->setsource(exp);
410 // //qDebug("BuffDoc:file opened"); 410 // //odebug << "BuffDoc:file opened" << oendl;
411 return 0; 411 return 0;
412} 412}