Diffstat (limited to 'noncore/apps/opie-reader/CDrawBuffer.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/CDrawBuffer.cpp | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/noncore/apps/opie-reader/CDrawBuffer.cpp b/noncore/apps/opie-reader/CDrawBuffer.cpp index bfb3027..227f0f6 100644 --- a/noncore/apps/opie-reader/CDrawBuffer.cpp +++ b/noncore/apps/opie-reader/CDrawBuffer.cpp | |||
@@ -365,4 +365,5 @@ int CDrawBuffer::offset(int scwidth, unsigned short _lborder, unsigned short _rb | |||
365 | case m_AlignJustify: | 365 | case m_AlignJustify: |
366 | case m_AlignLeft: | 366 | case m_AlignLeft: |
367 | case m_AlignNone: | ||
367 | currentx = _lborder + leftMargin(); | 368 | currentx = _lborder + leftMargin(); |
368 | break; | 369 | break; |
@@ -485,5 +486,5 @@ void CDrawBuffer::render(QPainter* _p, int _y, bool _bMono, int _charWidth, int | |||
485 | QString str = text.mid(textstart->start, end-textstart->start); | 486 | QString str = text.mid(textstart->start, end-textstart->start); |
486 | #if defined(OPIE) || !defined(USEQPE) | 487 | #if defined(OPIE) || !defined(USEQPE) |
487 | _p->setPen(QPen(QColor(currentstyle.Red(), currentstyle.Green(), currentstyle.Blue()), fc->getsize(currentstyle)/100)); | 488 | _p->setPen(QPen(QColor(currentstyle.Red(), currentstyle.Green(), currentstyle.Blue()), fc->getsize(currentstyle)/10/*0*/)); |
488 | #else | 489 | #else |
489 | _p->setPen(QPen(QColor(currentstyle.Red(), currentstyle.Green(), currentstyle.Blue()), fc->getsize(currentstyle)/10)); | 490 | _p->setPen(QPen(QColor(currentstyle.Red(), currentstyle.Green(), currentstyle.Blue()), fc->getsize(currentstyle)/10)); |
@@ -659,5 +660,5 @@ CStyle CDrawBuffer::firststyle() | |||
659 | } | 660 | } |
660 | 661 | ||
661 | linkType CDrawBuffer::getLinkType(int numchars, size_t& tgt, size_t& offset, size_t& pictgt, QImage*& img) | 662 | linkType CDrawBuffer::getLinkType(int numchars, size_t& tgt, size_t& offset, size_t& pictgt, QImage*& img, size_t& tabletgt) |
662 | { | 663 | { |
663 | linkType ret = eNone; | 664 | linkType ret = eNone; |
@@ -691,4 +692,9 @@ linkType CDrawBuffer::getLinkType(int numchars, size_t& tgt, size_t& offset, siz | |||
691 | ret |= eLink; | 692 | ret |= eLink; |
692 | } | 693 | } |
694 | if (currentstyle.isTable()) | ||
695 | { | ||
696 | tabletgt = currentstyle.getTable(); | ||
697 | ret |= eTable; | ||
698 | } | ||
693 | return ret; | 699 | return ret; |
694 | } | 700 | } |
@@ -717,5 +723,5 @@ void CDrawBuffer::resize(int availht) | |||
717 | if (m_hastext) | 723 | if (m_hastext) |
718 | { | 724 | { |
719 | 725 | int p_linespacing = 0; | |
720 | for (CList<textsegment>::iterator iter = segs.begin(); iter != segs.end() && iter->start <= len; ) | 726 | for (CList<textsegment>::iterator iter = segs.begin(); iter != segs.end() && iter->start <= len; ) |
721 | { | 727 | { |
@@ -757,4 +763,15 @@ void CDrawBuffer::resize(int availht) | |||
757 | ascent = ((gzoom*_style.getPicture()->height())/100+ascent)/2; | 763 | ascent = ((gzoom*_style.getPicture()->height())/100+ascent)/2; |
758 | } | 764 | } |
765 | else | ||
766 | { | ||
767 | descent = (_style.getPicture()->height()-ascent)/2; | ||
768 | ascent = (_style.getPicture()->height()+ascent)/2; | ||
769 | } | ||
770 | int lineSpacing = ascent+descent; | ||
771 | if (lineSpacing > p_linespacing) | ||
772 | { | ||
773 | p_linespacing = lineSpacing; | ||
774 | } | ||
775 | extra = 0; | ||
759 | } | 776 | } |
760 | 777 | ||
@@ -773,5 +790,5 @@ void CDrawBuffer::resize(int availht) | |||
773 | m_lineSpacing = m_ascent+m_descent+m_lineExtraSpacing; | 790 | m_lineSpacing = m_ascent+m_descent+m_lineExtraSpacing; |
774 | } | 791 | } |
775 | m_showPartial = (m_lineSpacing > t_lineSpacing); | 792 | m_showPartial = (p_linespacing > t_lineSpacing); |
776 | int lead = fc->getlead(); | 793 | int lead = fc->getlead(); |
777 | if (lead != 0) | 794 | if (lead != 0) |