summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/plucker_base.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-reader/plucker_base.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-reader/plucker_base.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/noncore/apps/opie-reader/plucker_base.cpp b/noncore/apps/opie-reader/plucker_base.cpp
index 9047a45..caa945d 100644
--- a/noncore/apps/opie-reader/plucker_base.cpp
+++ b/noncore/apps/opie-reader/plucker_base.cpp
@@ -1,27 +1,24 @@
1#include "useqpe.h" 1#include "useqpe.h"
2#include <stdio.h> 2#include <stdio.h>
3#include <string.h> 3#include <string.h>
4#include <qmessagebox.h>
5#include <qpixmap.h>
6#ifdef USEQPE 4#ifdef USEQPE
7#include <qpe/qcopenvelope_qws.h> 5#include <qpe/qcopenvelope_qws.h>
8#endif /* USEQPE */ 6#endif /* USEQPE */
9#ifdef LOCALPICTURES 7#ifdef LOCALPICTURES
10#include <qscrollview.h> 8#include <qscrollview.h>
11#endif 9#endif
12#ifdef USEQPE 10#ifdef USEQPE
13#include <qpe/global.h> 11#include <qpe/global.h>
14#endif /* USEQPE */ 12#endif /* USEQPE */
15#include <qclipboard.h>
16#ifndef USEQPE 13#ifndef USEQPE
17#include <qapplication.h> 14#include <qapplication.h>
18#else /* USEQPE */ 15#else /* USEQPE */
19#include <qpe/qpeapplication.h> 16#include <qpe/qpeapplication.h>
20#endif /* USEQPE */ 17#endif /* USEQPE */
21 18
22#include "plucker_base.h" 19#include "plucker_base.h"
23#include "Aportis.h" 20#include "Aportis.h"
24#include "Palm2QImage.h" 21#include "Palm2QImage.h"
25 22
26CPlucker_base::CPlucker_base() : 23CPlucker_base::CPlucker_base() :
27#ifdef LOCALPICTURES 24#ifdef LOCALPICTURES
@@ -536,25 +533,24 @@ CList<Bkmk>* CPlucker_base::getbkmklist()
536 { 533 {
537 UInt16 n; 534 UInt16 n;
538 fread(&n, 1, sizeof(n), fin); 535 fread(&n, 1, sizeof(n), fin);
539 n = ntohs(n); 536 n = ntohs(n);
540 //qDebug("Found %u bookmarks", n); 537 //qDebug("Found %u bookmarks", n);
541 } 538 }
542 //qDebug("Found:%d, %u", i , thishdr_type); 539 //qDebug("Found:%d, %u", i , thishdr_type);
543 } 540 }
544*/ 541*/
545 return NULL; 542 return NULL;
546} 543}
547 544
548#include <qnamespace.h>
549 545
550QImage* CPlucker_base::expandimg(UInt16 tgt, bool border) 546QImage* CPlucker_base::expandimg(UInt16 tgt, bool border)
551{ 547{
552 QImage* qimage = getimg(tgt); 548 QImage* qimage = getimg(tgt);
553 QImage* ret; 549 QImage* ret;
554 if (qimage == NULL) return NULL; 550 if (qimage == NULL) return NULL;
555 if (border) 551 if (border)
556 { 552 {
557 QPixmap* image = new QPixmap(0,0); 553 QPixmap* image = new QPixmap(0,0);
558 image->convertFromImage(*qimage); 554 image->convertFromImage(*qimage);
559 delete qimage; 555 delete qimage;
560 QPixmap* pret = new QPixmap(image->width()+4, image->height()+4); 556 QPixmap* pret = new QPixmap(image->width()+4, image->height()+4);
@@ -671,25 +667,24 @@ unsigned short CPlucker_base::finduid(unsigned short urlid)
671 gotorecordnumber(jmax); 667 gotorecordnumber(jmax);
672 GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); 668 GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved);
673 luid = thishdr_uid; 669 luid = thishdr_uid;
674 //qDebug("jmax at end:%u,%u", jmax, luid); 670 //qDebug("jmax at end:%u,%u", jmax, luid);
675 if (luid == urlid) 671 if (luid == urlid)
676 { 672 {
677 return jmax; 673 return jmax;
678 } 674 }
679 //qDebug("Couldn't find %u", urlid); 675 //qDebug("Couldn't find %u", urlid);
680 return 0; // Not found! 676 return 0; // Not found!
681} 677}
682 678
683#include <qnamespace.h>
684 679
685void CPlucker_base::setSaveData(unsigned char*& data, unsigned short& len, unsigned char* src, unsigned short srclen) 680void CPlucker_base::setSaveData(unsigned char*& data, unsigned short& len, unsigned char* src, unsigned short srclen)
686{ 681{
687 unsigned short sz = 0; 682 unsigned short sz = 0;
688 for (CList<unsigned long>::iterator it = visited.begin(); it != visited.end(); it++) 683 for (CList<unsigned long>::iterator it = visited.begin(); it != visited.end(); it++)
689 { 684 {
690 sz++; 685 sz++;
691 } 686 }
692 size_t newlen = srclen+sizeof(sz)+sz*sizeof(unsigned long); 687 size_t newlen = srclen+sizeof(sz)+sz*sizeof(unsigned long);
693 unsigned char* newdata = new unsigned char[newlen]; 688 unsigned char* newdata = new unsigned char[newlen];
694 unsigned char* pdata = newdata; 689 unsigned char* pdata = newdata;
695 memcpy(newdata, src, srclen); 690 memcpy(newdata, src, srclen);