Diffstat (limited to 'noncore/apps/opie-reader/CDrawBuffer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/CDrawBuffer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/opie-reader/CDrawBuffer.cpp b/noncore/apps/opie-reader/CDrawBuffer.cpp index 2ceb2d5..892456f 100644 --- a/noncore/apps/opie-reader/CDrawBuffer.cpp +++ b/noncore/apps/opie-reader/CDrawBuffer.cpp | |||
@@ -96,25 +96,25 @@ void CDrawBuffer::addch(tchar ch, CStyle _style/* = ucFontBase*/) | |||
96 | } | 96 | } |
97 | segs.push_back(textsegment(len, _style)); | 97 | segs.push_back(textsegment(len, _style)); |
98 | } | 98 | } |
99 | (*this)[len++] = ch; | 99 | (*this)[len++] = ch; |
100 | } | 100 | } |
101 | 101 | ||
102 | void CDrawBuffer::truncate(int n) | 102 | void CDrawBuffer::truncate(int n) |
103 | { | 103 | { |
104 | len = n; | 104 | len = n; |
105 | (*this)[n] = 0; | 105 | (*this)[n] = 0; |
106 | } | 106 | } |
107 | 107 | ||
108 | int CDrawBuffer::width(int numchars = -1) | 108 | int CDrawBuffer::width(int numchars) |
109 | { | 109 | { |
110 | int currentx = 0, end = 0; | 110 | int currentx = 0, end = 0; |
111 | QString text = toQString(data()); | 111 | QString text = toQString(data()); |
112 | CList<textsegment>::iterator textstart = segs.begin(); | 112 | CList<textsegment>::iterator textstart = segs.begin(); |
113 | CList<textsegment>::iterator textend = textstart; | 113 | CList<textsegment>::iterator textend = textstart; |
114 | do | 114 | do |
115 | { | 115 | { |
116 | textend++; | 116 | textend++; |
117 | end = (textend != segs.end()) ? textend->start : length(); | 117 | end = (textend != segs.end()) ? textend->start : length(); |
118 | if (numchars >= 0 && end > numchars) | 118 | if (numchars >= 0 && end > numchars) |
119 | { | 119 | { |
120 | end = numchars; | 120 | end = numchars; |