From 8bf0c66790637b072ff04746e80f97ee5485428b Mon Sep 17 00:00:00 2001 From: Sebastian Geerken Date: Mon, 8 Oct 2012 10:37:01 +0200 Subject: Cleanup related to iterators. --- dw/textblock_iterator.cc | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'dw/textblock_iterator.cc') diff --git a/dw/textblock_iterator.cc b/dw/textblock_iterator.cc index 63720ffb..b5d28885 100644 --- a/dw/textblock_iterator.cc +++ b/dw/textblock_iterator.cc @@ -154,31 +154,6 @@ void Textblock::TextblockIterator::unhighlight (int direction, textblock->queueDrawRange (index1, index2); } -void Textblock::queueDrawRange (int index1, int index2) -{ - int from = misc::min (index1, index2); - int to = misc::max (index1, index2); - - from = misc::min (from, words->size () - 1); - from = misc::max (from, 0); - to = misc::min (to, words->size () - 1); - to = misc::max (to, 0); - - int line1idx = findLineOfWord (from); - int line2idx = findLineOfWord (to); - - if (line1idx >= 0 && line2idx >= 0) { - Line *line1 = lines->getRef (line1idx), - *line2 = lines->getRef (line2idx); - int y = lineYOffsetWidget (line1) + line1->boxAscent - - line1->contentAscent; - int h = lineYOffsetWidget (line2) + line2->boxAscent + - line2->contentDescent - y; - - queueDrawArea (0, y, allocation.width, h); - } -} - void Textblock::TextblockIterator::getAllocation (int start, int end, core::Allocation *allocation) { -- cgit v1.2.3