aboutsummaryrefslogtreecommitdiff
path: root/dw/textblock.cc
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2013-11-03 12:23:40 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2013-11-03 12:23:40 +0100
commitc6b750dcfc9529033a2aaaca8b61fd97038c7e60 (patch)
treefdbf82b9edd97aef3eb1a3530b27bc170a831fee /dw/textblock.cc
parent9b068e74be8c7935e12b63181b8726b9595cf152 (diff)
code cleanup
Diffstat (limited to 'dw/textblock.cc')
-rw-r--r--dw/textblock.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc
index cd301871..dec512d4 100644
--- a/dw/textblock.cc
+++ b/dw/textblock.cc
@@ -1447,8 +1447,6 @@ void Textblock::calcTextSize (const char *text, size_t len,
core::style::Style *style,
core::Requisition *size, bool isStart, bool isEnd)
{
- int requiredAscent, requiredDescent;
-
size->width = textWidth (text, 0, len, style, isStart, isEnd);
size->ascent = style->font->ascent;
size->descent = style->font->descent;
@@ -1488,10 +1486,10 @@ void Textblock::calcTextSize (const char *text, size_t len,
* potentially the line's height.
*/
if (style->valign == core::style::VALIGN_SUB) {
- requiredDescent = style->font->descent + style->font->ascent / 3;
+ int requiredDescent = style->font->descent + style->font->ascent / 3;
size->descent = misc::max (size->descent, requiredDescent);
} else if (style->valign == core::style::VALIGN_SUPER) {
- requiredAscent = style->font->ascent + style->font->ascent / 2;
+ int requiredAscent = style->font->ascent + style->font->ascent / 2;
size->ascent = misc::max (size->ascent, requiredAscent);
}
}