aboutsummaryrefslogtreecommitdiff
path: root/dw
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2009-10-24 00:49:31 +0000
committercorvid <corvid@lavabit.com>2009-10-24 00:49:31 +0000
commit4f4fb36ddea6793d2ce39e7cb53e2dfe2e2bcd65 (patch)
tree426c428d81d778f0acf5ff014f982270a0adf431 /dw
parentd8b1c71b7f9ad6e4764ae95ecdd8fdc25fa84e52 (diff)
tiny cleanup of addParbreak
Diffstat (limited to 'dw')
-rw-r--r--dw/textblock.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc
index e8da3422..69239011 100644
--- a/dw/textblock.cc
+++ b/dw/textblock.cc
@@ -1717,10 +1717,7 @@ void Textblock::addSpace (core::style::Style *style)
*/
void Textblock::addParbreak (int space, core::style::Style *style)
{
- Word *word, *word2 = NULL; // Latter for compiler happiness, search!
- bool isfirst;
- Widget *widget;
- int lineno;
+ Word *word;
/* A break may not be the first word of a page, or directly after
the bullet/number (which is the first word) in a list item. (See
@@ -1733,6 +1730,7 @@ void Textblock::addParbreak (int space, core::style::Style *style)
a widget is used as a text box (lists, blockquotes, list
items etc) -- then we simply adjust the break before, in a
way that the space is in any case visible. */
+ Widget *widget;
/* Find the widget where to adjust the break_space. */
for (widget = this;
@@ -1743,13 +1741,15 @@ void Textblock::addParbreak (int space, core::style::Style *style)
int index = (textblock2->listItem &&
(textblock2->getStyle()->listStyleType !=
dw::core::style::LIST_STYLE_TYPE_NONE)) ? 1 : 0;
- isfirst = (textblock2->words->getRef(index)->content.type
- == core::Content::WIDGET
- && textblock2->words->getRef(index)->content.widget
- == widget);
+ bool isfirst = (textblock2->words->getRef(index)->content.type
+ == core::Content::WIDGET
+ && textblock2->words->getRef(index)->content.widget
+ == widget);
if (!isfirst) {
/* The page we searched for has been found. */
- lineno = widget->parentRef;
+ Word *word2;
+ int lineno = widget->parentRef;
+
if (lineno > 0 &&
(word2 =
textblock2->words->getRef(textblock2->lines