summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dw/alignedtablecell.cc2
-rw-r--r--dw/bullet.cc2
-rw-r--r--dw/image.cc12
-rw-r--r--dw/iterator.cc4
-rw-r--r--dw/layout.cc6
-rw-r--r--dw/layout.hh2
-rw-r--r--dw/outofflowmgr.cc14
-rw-r--r--dw/outofflowmgr.hh18
-rw-r--r--dw/style.hh2
-rw-r--r--dw/table.cc74
-rw-r--r--dw/textblock.cc88
-rw-r--r--dw/textblock.hh14
-rw-r--r--dw/textblock_iterator.cc24
-rw-r--r--dw/textblock_linebreaking.cc130
-rw-r--r--dw/ui.cc4
-rw-r--r--dw/widget.cc52
-rw-r--r--dw/widget.hh18
-rw-r--r--lout/container.cc6
-rw-r--r--lout/misc.hh2
-rw-r--r--src/IO/http.c2
-rw-r--r--src/cache.c2
-rw-r--r--src/css.cc2
-rw-r--r--src/cssparser.cc2
-rw-r--r--src/html_charrefs.h2
-rw-r--r--test/dw_float_test.cc14
-rw-r--r--test/dw_simple_container.cc4
-rw-r--r--test/dw_simple_container.hh2
-rw-r--r--test/dw_simple_container_test.cc4
28 files changed, 254 insertions, 254 deletions
diff --git a/dw/alignedtablecell.cc b/dw/alignedtablecell.cc
index 394b89df..633c4e68 100644
--- a/dw/alignedtablecell.cc
+++ b/dw/alignedtablecell.cc
@@ -110,7 +110,7 @@ void AlignedTableCell::correctExtremesOfChild (Widget *child,
"%p, %d (%d) / %d (%d)",
child, extremes->minWidth, extremes->minWidthIntrinsic,
extremes->maxWidth, extremes->maxWidthIntrinsic);
-
+
AlignedTextblock::correctExtremesOfChild (child, extremes);
tablecell::correctCorrectedExtremesOfChild (this, child, extremes);
diff --git a/dw/bullet.cc b/dw/bullet.cc
index 79b1c3ec..acaf81cc 100644
--- a/dw/bullet.cc
+++ b/dw/bullet.cc
@@ -44,7 +44,7 @@ void Bullet::sizeRequestImpl (core::Requisition *requisition)
void Bullet::getExtremesImpl (core::Extremes *extremes)
{
- extremes->minWidth = extremes->maxWidth =
+ extremes->minWidth = extremes->maxWidth =
lout::misc::max (getStyle()->font->xHeight * 4 / 5, 1);
extremes->minWidthIntrinsic = extremes->minWidth;
extremes->maxWidthIntrinsic = extremes->maxWidth;
diff --git a/dw/image.cc b/dw/image.cc
index d753a0f2..d04d993b 100644
--- a/dw/image.cc
+++ b/dw/image.cc
@@ -217,7 +217,7 @@ void Image::sizeRequestImpl (core::Requisition *requisition)
+ boxOffsetY ();
requisition->descent = boxRestHeight ();
}
- }
+ }
DBG_OBJ_MSGF ("resize", 1, "=> %d * (%d + %d)",
requisition->width, requisition->ascent, requisition->descent);
@@ -247,7 +247,7 @@ void Image::sizeAllocateImpl (core::Allocation *allocation)
allocation->x, allocation->y, allocation->width,
allocation->ascent, allocation->descent);
-
+
int newBufWidth = allocation->width - boxDiffWidth ();
int newBufHeight =
allocation->ascent + allocation->descent - boxDiffHeight ();
@@ -256,19 +256,19 @@ void Image::sizeAllocateImpl (core::Allocation *allocation)
// Save some time when size did not change:
(newBufWidth != bufWidth || newBufHeight != bufHeight)) {
DBG_OBJ_MSG ("resize", 1, "replacing buffer");
-
+
core::Imgbuf *oldBuffer = buffer;
buffer = oldBuffer->getScaledBuf (newBufWidth, newBufHeight);
oldBuffer->unref ();
-
+
bufWidth = newBufWidth;
bufHeight = newBufHeight;
-
+
DBG_OBJ_ASSOC_CHILD (this->buffer);
DBG_OBJ_SET_NUM ("bufWidth", bufWidth);
DBG_OBJ_SET_NUM ("bufHeight", bufHeight);
}
-
+
DBG_OBJ_LEAVE ();
}
diff --git a/dw/iterator.cc b/dw/iterator.cc
index 18d62a49..0edb580b 100644
--- a/dw/iterator.cc
+++ b/dw/iterator.cc
@@ -558,7 +558,7 @@ DeepIterator::DeepIterator (Iterator *it)
//printf ("Starting with: ");
//it->print ();
//printf ("\n");
-
+
// Construct the iterators.
int thisLevel = getRespectiveLevel (it->getWidget()), level;
Widget *w;
@@ -632,7 +632,7 @@ int DeepIterator::compareTo (object::Comparable *other)
assert (stack.size() > 0);
assert (otherDeepIterator->stack.size() > 0);
-
+
//printf ("Equal? The %s %p (of %p) and the %s %p (of %p)?\n",
// stack.get(0)->getWidget()->getClassName(),
// stack.get(0)->getWidget(), this,
diff --git a/dw/layout.cc b/dw/layout.cc
index 82a21f57..e8907d21 100644
--- a/dw/layout.cc
+++ b/dw/layout.cc
@@ -348,7 +348,7 @@ Layout::~Layout ()
}
void Layout::detachWidget (Widget *widget)
-{
+{
// Called form ~Layout. Sometimes, the widgets (not only the toplevel widget)
// do some stuff after the layout has been deleted, so *all* widgets have to
// be detached, and check "layout != NULL" at relevant points.
@@ -849,7 +849,7 @@ void Layout::setBgImage (style::StyleImage *bgImage,
void Layout::resizeIdle ()
{
DBG_OBJ_ENTER0 ("resize", 0, "resizeIdle");
-
+
enterResizeIdle ();
//static int calls = 0;
@@ -904,7 +904,7 @@ void Layout::resizeIdle ()
// toplevel widget is not affected, are filtered out some lines
// above: "if (topLevel && topLevel->needsResize ())".)
assert (topLevel->needsAllocate ());
-
+
allocation.x = allocation.y = 0;
allocation.width = requisition.width;
allocation.ascent = requisition.ascent;
diff --git a/dw/layout.hh b/dw/layout.hh
index 88532187..39ff74db 100644
--- a/dw/layout.hh
+++ b/dw/layout.hh
@@ -158,7 +158,7 @@ private:
Widget *widget;
int ref;
bool extremesChanged, fast;
-
+
inline QueueResizeItem (Widget *widget, int ref, bool extremesChanged,
bool fast)
{
diff --git a/dw/outofflowmgr.cc b/dw/outofflowmgr.cc
index a924d107..072d6a65 100644
--- a/dw/outofflowmgr.cc
+++ b/dw/outofflowmgr.cc
@@ -912,7 +912,7 @@ bool OutOfFlowMgr::doFloatsExceedCB (Side side)
// allocated at a different size.)
core::Requisition cbReq;
containingBlock->sizeRequest (&cbReq);
-
+
SortedFloatsVector *list = side == LEFT ? leftFloatsCB : rightFloatsCB;
bool exceeds = false;
@@ -1110,7 +1110,7 @@ int OutOfFlowMgr::calcFloatX (Float *vloat, Side side, int gbX, int gbWidth,
DBG_OBJ_MSGF ("resize.common", 1,
"corrected to: max (0, %d - %d) = %d",
containingBlock->getLineBreakWidth (), vloat->size.width,
- x);
+ x);
}
break;
@@ -1180,7 +1180,7 @@ void OutOfFlowMgr::drawAbsolutelyPositioned (View *view, Rectangle *area)
* leads sometimes to a cleaner rendering.
*/
bool OutOfFlowMgr::isWidgetOutOfFlow (Widget *widget)
-{
+{
// This is only half-baked, will perhaps be reactivated:
//
//return
@@ -1500,7 +1500,7 @@ void OutOfFlowMgr::tellFloatPosition (Widget *widget, int yReq)
// horizontal dimensions (because #f2 and #f3 are too
// narrow). However, a collision has to be tested with #f1;
// otherwise #f3 and #f1 would overlap.
-
+
int oppFloatIndex =
listOpp->findLastBeforeSideSpanningIndex (vloat->sideSpanningIndex);
// Generally, the rules are simple: loop as long as the vertical
@@ -1607,7 +1607,7 @@ bool OutOfFlowMgr::collidesH (Float *vloat, Float *other, SFVType type)
else {
assert (wasAllocated (vloat->generatingBlock));
assert (wasAllocated (other->generatingBlock));
-
+
// Again, if the other float is not allocated, there is no
// collision. Compare to collidesV. (But vloat->size is used
// here.)
@@ -1621,7 +1621,7 @@ bool OutOfFlowMgr::collidesH (Float *vloat, Float *other, SFVType type)
LEFT : RIGHT,
gba->x, gba->width,
vloat->generatingBlock->getLineBreakWidth ());
-
+
// Generally: right border of the left float > left border of
// the right float (all in canvas coordinates).
if (vloat->getWidget()->getStyle()->vloat == FLOAT_LEFT)
@@ -2178,7 +2178,7 @@ void OutOfFlowMgr::ensureFloatSize (Float *vloat)
// "sizeChangedSinceLastAllocation" is reset in sizeAllocateEnd()
}
-
+
DBG_OBJ_LEAVE ();
}
diff --git a/dw/outofflowmgr.hh b/dw/outofflowmgr.hh
index a89e8662..a690a770 100644
--- a/dw/outofflowmgr.hh
+++ b/dw/outofflowmgr.hh
@@ -40,14 +40,14 @@ private:
public:
WidgetInfo (OutOfFlowMgr *oofm, core::Widget *widget);
-
+
inline bool wasThenAllocated () { return wasAllocated; }
inline int getOldXCB () { return xCB; }
inline int getOldYCB () { return yCB; }
inline int getOldWidth () { return width; }
inline int getOldHeight () { return height; }
-
+
void update (bool wasAllocated, int xCB, int yCB, int width, int height);
inline core::Widget *getWidget () { return widget; }
@@ -146,7 +146,7 @@ private:
private:
OutOfFlowMgr *oofm;
Side side;
-
+
public:
inline SortedFloatsVector (OutOfFlowMgr *oofm, Side side, SFVType type) :
lout::container::typed::Vector<Float> (1, false)
@@ -177,7 +177,7 @@ private:
TBInfo *parent;
int parentExtIndex;
-
+
// These two values are set by sizeAllocateStart(), and they are
// accessable also within sizeAllocateEnd() for the same
// textblock, for which allocation and WAS_ALLOCATED is set
@@ -244,7 +244,7 @@ private:
lout::container::typed::Vector<TBInfo> *tbInfos;
lout::container::typed::HashTable<lout::object::TypedPointer <Textblock>,
TBInfo> *tbInfosByTextblock;
-
+
lout::container::typed::Vector<AbsolutelyPositioned> *absolutelyPositioned;
int lastLeftTBIndex, lastRightTBIndex, leftFloatsMark, rightFloatsMark;
@@ -264,7 +264,7 @@ private:
inline core::Allocation *getAllocation (Textblock *textblock) {
return &(getTextblock(textblock)->allocation);
}
-
+
void moveExternalIndices (SortedFloatsVector *list, int oldStartIndex,
int diff);
Float *findFloatByWidget (core::Widget *widget);
@@ -298,7 +298,7 @@ private:
bool collidesV (Float *vloat, Float *other, SFVType type, int *yReal);
bool collidesH (Float *vloat, Float *other, SFVType type);
-
+
void getFloatsListsAndSide (Float *vloat, SortedFloatsVector **listSame,
SortedFloatsVector **listOpp, Side *side);
@@ -362,14 +362,14 @@ private:
* +---+ - - - +---+---+- - - - - -+---+---+---+---+
* | right float index | 1 | 0 | 1 |
* +---+ - - - +---+---+- - - - - -+---+---+---+---+
- *
+ *
* Absolutely positioned blocks:
*
* +---+ - - - +---+---+- - - - - -+---+---+---+---+
* | index | 1 | 1 |
* +---+ - - - +---+---+- - - - - -+---+---+---+---+
*/
-
+
inline static bool isRefFloat (int ref)
{ return ref != -1 && (ref & 3) == 1; }
inline static bool isRefLeftFloat (int ref)
diff --git a/dw/style.hh b/dw/style.hh
index 0fb941b2..bda567ce 100644
--- a/dw/style.hh
+++ b/dw/style.hh
@@ -523,7 +523,7 @@ public:
VAlignType valign;
char textAlignChar; /* In future, strings will be supported. */
TextTransform textTransform;
-
+
FloatType vloat; /* "float" is a keyword. */
ClearType clear;
diff --git a/dw/table.cc b/dw/table.cc
index b1c04018..54264828 100644
--- a/dw/table.cc
+++ b/dw/table.cc
@@ -136,9 +136,9 @@ void Table::getExtremesImpl (core::Extremes *extremes)
extremes->maxWidthIntrinsic = boxDiffWidth ();
else {
forceCalcColumnExtremes ();
-
+
extremes->minWidth = extremes->minWidthIntrinsic = extremes->maxWidth =
- extremes->maxWidthIntrinsic =
+ extremes->maxWidthIntrinsic =
(numCols + 1) * getStyle()->hBorderSpacing + boxDiffWidth ();
for (int col = 0; col < numCols; col++) {
extremes->minWidth += colExtremes->getRef(col)->minWidth;
@@ -147,7 +147,7 @@ void Table::getExtremesImpl (core::Extremes *extremes)
extremes->maxWidth += colExtremes->getRef(col)->maxWidth;
extremes->maxWidthIntrinsic +=
colExtremes->getRef(col)->maxWidthIntrinsic;
- }
+ }
}
correctExtremes (extremes);
@@ -269,9 +269,9 @@ int Table::calcAvailWidthForDescendant (Widget *child)
Widget *actualChild = child;
while (actualChild != NULL && actualChild->getParent () != this)
actualChild = actualChild->getParent ();
-
+
assert (actualChild != NULL);
-
+
// TODO This is inefficient. (Use parentRef?)
int width = -1;
for (int row = numRows - 1; width == -1 && row >= 0; row--) {
@@ -288,7 +288,7 @@ int Table::calcAvailWidthForDescendant (Widget *child)
}
}
}
-
+
assert (width != -1);
DBG_OBJ_MSGF ("resize", 1, "=> %d", width);
@@ -340,7 +340,7 @@ bool Table::affectsSizeChangeContainerChild (core::Widget *child)
DBG_OBJ_MSGF ("resize", 1, "=> %s", ret ? "true" : "false");
DBG_OBJ_LEAVE ();
- return ret;
+ return ret;
}
bool Table::usesAvailWidth ()
@@ -627,7 +627,7 @@ int Table::getColExtreme (int col, ExtrMod mod, void *data)
switch (mod) {
case DATA:
return ((misc::SimpleVector<int>*)data)->get (col);
-
+
default:
return getExtreme (colExtremes->getRef(col), mod);
}
@@ -638,7 +638,7 @@ void Table::setColExtreme (int col, ExtrMod mod, void *data, int value)
switch (mod) {
case DATA:
((misc::SimpleVector<int>*)data)->set (col, value);
-
+
default:
setExtreme (colExtremes->getRef(col), mod, value);
}
@@ -784,7 +784,7 @@ void Table::forceCalcCellSizes (bool calcHeights)
"totalWidth = %d, %s",
minWidth, minWidthIntrinsic, maxWidth, totalWidth,
totalWidthSpecified ? "specified" : "not specified");
-
+
if (minWidth > totalWidth) {
DBG_OBJ_MSG ("resize", 1, "case 1: minWidth > totalWidth");
@@ -844,15 +844,15 @@ void Table::forceCalcCellSizes (bool calcHeights)
colExtremes->getRef(col)->minWidthIntrinsic;
else
// Columns without percentage width get only the
- // intrinsic mininal, so subtract this from the width for the
+ // intrinsic mininal, so subtract this from the width for the
// columns *with* percentage
- widthPartPer -=
+ widthPartPer -=
colExtremes->getRef(col)->minWidthIntrinsic;
DBG_OBJ_MSGF ("resize", 1,
"widthPartPer = %d, minWidthIntrinsicPer = %d",
widthPartPer, minWidthIntrinsicPer);
-
+
for (int col = 0; col < colExtremes->size(); col++)
if (colWidthPercentage->get (col)) {
int colWidth = colExtremes->getRef(col)->minWidth;
@@ -862,7 +862,7 @@ void Table::forceCalcCellSizes (bool calcHeights)
if (colWidth > widthPartPer - minWidthIntrinsicPer)
colWidth = widthPartPer - minWidthIntrinsicPer;
-
+
colWidths->set (col, colWidth);
widthPartPer -= colWidth;
@@ -874,7 +874,7 @@ void Table::forceCalcCellSizes (bool calcHeights)
} else
colWidths->set (col,
colExtremes->getRef(col)->minWidthIntrinsic);
-
+
}
} else if (totalWidthSpecified && totalWidth > maxWidth) {
DBG_OBJ_MSG ("resize", 1,
@@ -930,14 +930,14 @@ void Table::forceCalcCellSizes (bool calcHeights)
DBG_OBJ_MSG ("resize", 1, "widthsNotSpecified:");
DBG_OBJ_MSG_START ();
-
+
for (int i = 0; i < widthsNotSpecified.size (); i++)
DBG_OBJ_MSGF ("resize", 1, "#%d: %d",
i, widthsNotSpecified.get (i));
-
+
DBG_OBJ_MSG_END ();
}
-
+
apportion2 (totalWidthNotSpecified, 0, numNotSpecified - 1, DATA, DATA,
(void*)&widthsNotSpecified, &apportionDest, 0);
@@ -947,7 +947,7 @@ void Table::forceCalcCellSizes (bool calcHeights)
for (int i = 0; i < apportionDest.size (); i++)
DBG_OBJ_MSGF ("resize", 1, "#%d: %d", i, apportionDest.get (i));
-
+
DBG_OBJ_MSG_END ();
}
@@ -988,7 +988,7 @@ void Table::forceCalcCellSizes (bool calcHeights)
if (colWidths->get (col) != oldColWidths->get (col))
redrawX = lout::misc::min (redrawX, colWidths->get (col));
}
-
+
DBG_IF_RTFL {
DBG_OBJ_SET_NUM ("colWidths.size", colWidths->size ());
for (int i = 0; i < colWidths->size (); i++)
@@ -1022,7 +1022,7 @@ void Table::forceCalcCellSizes (bool calcHeights)
* \bug dw::Table::baseline is not filled.
*/
int rowHeight = 0;
-
+
for (int col = 0; col < numCols; col++) {
int n = row * numCols + col;
if (childDefined (n)) {
@@ -1030,7 +1030,7 @@ void Table::forceCalcCellSizes (bool calcHeights)
* getStyle()->hBorderSpacing;
for (int i = 0; i < children->get(n)->cell.colspanEff; i++)
width += colWidths->get (col + i);
-
+
core::Requisition childRequisition;
//children->get(n)->cell.widget->setWidth (width);
children->get(n)->cell.widget->sizeRequest (&childRequisition);
@@ -1043,7 +1043,7 @@ void Table::forceCalcCellSizes (bool calcHeights)
}
}
} // for col
-
+
setCumHeight (row + 1,
cumHeight->get (row) + rowHeight + getStyle()->vBorderSpacing);
} // for row
@@ -1157,7 +1157,7 @@ void Table::forceCalcColumnExtremes ()
colExtremes->getRef(col)->minWidthIntrinsic = 0;
colExtremes->getRef(col)->maxWidth = 0;
colExtremes->getRef(col)->maxWidthIntrinsic = 0;
-
+
for (int row = 0; row < numRows; row++) {
DBG_OBJ_MSGF ("resize", 1, "row %d", row);
DBG_OBJ_MSG_START ();
@@ -1179,7 +1179,7 @@ void Table::forceCalcColumnExtremes ()
misc::max (colExtremes->getRef(col)->minWidthIntrinsic,
colExtremes->getRef(col)->maxWidthIntrinsic,
cellExtremes.maxWidthIntrinsic);
-
+
colExtremes->getRef(col)->minWidth =
misc::max (colExtremes->getRef(col)->minWidth,
cellExtremes.minWidth);
@@ -1293,7 +1293,7 @@ void Table::calcExtremesSpanMulteCols (int col, int cs,
"%d, %d, ..., %s, %s, ...",
col, cs, getExtrModName (minExtrMod),
getExtrModName (maxExtrMod));
-
+
int cellMin = getExtreme (cellExtremes, minExtrMod);
int cellMax = getExtreme (cellExtremes, maxExtrMod);
@@ -1308,7 +1308,7 @@ void Table::calcExtremesSpanMulteCols (int col, int cs,
cs, cellMin, cellMax, minSumCols, maxSumCols);
bool changeMin = cellMin > minSumCols;
- bool changeMax = cellMax > maxSumCols;
+ bool changeMax = cellMax > maxSumCols;
if (changeMin || changeMax) {
// TODO This differs from the documentation? Should work, anyway.
misc::SimpleVector<int> newMin, newMax;
@@ -1316,13 +1316,13 @@ void Table::calcExtremesSpanMulteCols (int col, int cs,
apportion2 (cellMin, col, col + cs - 1, MIN, MAX, NULL, &newMin, 0);
if (changeMax)
apportion2 (cellMax, col, col + cs - 1, MIN, MAX, NULL, &newMax, 0);
-
+
for (int j = 0; j < cs; j++) {
if (changeMin)
setColExtreme (col + j, minExtrMod, extrData, newMin.get (j));
if (changeMax)
setColExtreme (col + j, maxExtrMod, extrData, newMax.get (j));
-
+
// For cases where min and max are somewhat confused:
setColExtreme (col + j, maxExtrMod, extrData,
misc::max (getColExtreme (col + j, minExtrMod,
@@ -1354,7 +1354,7 @@ void Table::apportion2 (int totalWidth, int firstCol, int lastCol,
totalMin += getColExtreme (col, minExtrMod, extrData);
totalMax += getColExtreme (col, maxExtrMod, extrData);
}
-
+
DBG_OBJ_MSGF ("resize", 1,
"totalWidth = %d, totalMin = %d, totalMax = %d",
totalWidth, totalMin, totalMax);
@@ -1392,12 +1392,12 @@ void Table::apportion2 (int totalWidth, int firstCol, int lastCol,
// the result is
//
// width[i] = totalWidth / n
-
+
int totalDiffExtr = totalMax - totalMin;
if (totalDiffExtr != 0) {
// Normal case. The algorithm described in
// "rounding-errors.doc" is used, with:
- //
+ //
// x[i] = diffExtr[i]
// y[i] = diffWidth[i]
// a = totalDiffWidth
@@ -1407,7 +1407,7 @@ void Table::apportion2 (int totalWidth, int firstCol, int lastCol,
int totalDiffWidth = totalWidth - totalMin;
int cumDiffExtr = 0, cumDiffWidth = 0;
-
+
for (int col = firstCol; col <= lastCol; col++) {
int min = getColExtreme (col, minExtrMod, extrData);
int max = getColExtreme (col, maxExtrMod, extrData);
@@ -1417,12 +1417,12 @@ void Table::apportion2 (int totalWidth, int firstCol, int lastCol,
int diffWidth =
(cumDiffExtr * totalDiffWidth) / totalDiffExtr - cumDiffWidth;
cumDiffWidth += diffWidth;
-
+
dest->set (destOffset - firstCol + col, diffWidth + min);
}
} else if (totalMin != 0) {
// Special case. Again, same algorithm, with
- //
+ //
// x[i] = min[i]
// y[i] = width[i]
// a = totalWidth
@@ -1441,7 +1441,7 @@ void Table::apportion2 (int totalWidth, int firstCol, int lastCol,
}
} else { // if (totalMin == 0)
// Last special case. Ssame algorithm, with
- //
+ //
// x[i] = 1 (so cumX = i = col - firstCol + 1)
// y[i] = width[i]
// a = totalWidth
@@ -1459,7 +1459,7 @@ void Table::apportion2 (int totalWidth, int firstCol, int lastCol,
}
}
}
-
+
DBG_OBJ_LEAVE ();
}
diff --git a/dw/textblock.cc b/dw/textblock.cc
index 8456366a..baf757b1 100644
--- a/dw/textblock.cc
+++ b/dw/textblock.cc
@@ -194,7 +194,7 @@ void Textblock::setPenaltyHyphen (int penaltyHyphen)
{
penalties[PENALTY_HYPHEN][0] = penaltyHyphen;
}
-
+
void Textblock::setPenaltyHyphen2 (int penaltyHyphen2)
{
penalties[PENALTY_HYPHEN][1] = penaltyHyphen2;
@@ -258,8 +258,8 @@ Textblock::Textblock (bool limitTextWidth)
DBG_OBJ_SET_NUM ("lines.size", lines->size ());
DBG_OBJ_SET_NUM ("words.size", words->size ());
- DBG_OBJ_SET_NUM ("wrapRefLines", wrapRefLines);
- DBG_OBJ_SET_NUM ("wrapRefParagraphs", wrapRefParagraphs);
+ DBG_OBJ_SET_NUM ("wrapRefLines", wrapRefLines);
+ DBG_OBJ_SET_NUM ("wrapRefParagraphs", wrapRefParagraphs);
hoverLink = -1;
@@ -337,14 +337,14 @@ void Textblock::sizeRequestImpl (core::Requisition *requisition)
DBG_OBJ_SET_NUM ("lineBreakWidth", lineBreakWidth);
DBG_OBJ_SET_NUM ("wrapRefLines", wrapRefLines);
}
-
+
rewrap ();
showMissingLines ();
if (lines->size () > 0) {
Line *lastLine = lines->getRef (lines->size () - 1);
requisition->width = lastLine->maxLineWidth;
-
+
DBG_OBJ_MSGF ("resize", 1, "lines[%d]->maxLineWidth = %d",
lines->size () - 1, lastLine->maxLineWidth);
@@ -352,9 +352,9 @@ void Textblock::sizeRequestImpl (core::Requisition *requisition)
lines->getRef(0)->boxAscent);
DBG_OBJ_MSGF ("resize", 1, "lines[%d]->top = %d",
lines->size () - 1, lastLine->top);
- DBG_OBJ_MSGF ("resize", 1, "lines[%d]->boxAscent = %d",
+ DBG_OBJ_MSGF ("resize", 1, "lines[%d]->boxAscent = %d",
lines->size () - 1, lastLine->boxAscent);
- DBG_OBJ_MSGF ("resize", 1, "lines[%d]->boxDescent = %d",
+ DBG_OBJ_MSGF ("resize", 1, "lines[%d]->boxDescent = %d",
lines->size () - 1, lastLine->boxDescent);
/* Note: the breakSpace of the last line is ignored, so breaks
@@ -415,7 +415,7 @@ void Textblock::sizeRequestImpl (core::Requisition *requisition)
requisition->width = misc::max (requisition->width, oofWidth);
if (oofHeight > requisition->ascent + requisition->descent)
requisition->descent = oofHeight - requisition->ascent;
- }
+ }
DBG_OBJ_MSGF ("resize", 1, "final: %d * (%d + %d)",
requisition->width, requisition->ascent, requisition->descent);
@@ -499,17 +499,17 @@ void Textblock::getExtremesImpl (core::Extremes *extremes)
if (outOfFlowMgr) {
int oofMinWidth, oofMaxWidth;
outOfFlowMgr->getExtremes (extremes, &oofMinWidth, &oofMaxWidth);
-
+
DBG_OBJ_MSGF ("resize", 1, "OOFM correction: %d / %d",
oofMinWidth, oofMaxWidth);
extremes->minWidth = misc::max (extremes->minWidth, oofMinWidth);
extremes->minWidthIntrinsic =
misc::max (extremes->minWidthIntrinsic, oofMinWidth);
- extremes->maxWidth = misc::max (extremes->maxWidth, oofMaxWidth);
+ extremes->maxWidth = misc::max (extremes->maxWidth, oofMaxWidth);
extremes->maxWidthIntrinsic =
misc::max (extremes->maxWidthIntrinsic, oofMinWidth);
- }
+ }
DBG_OBJ_MSGF ("resize", 0,
"finally, after considering OOFM: %d (%d) / %d (%d)",
@@ -574,7 +574,7 @@ void Textblock::sizeAllocateImpl (core::Allocation *allocation)
lineYOffsetCanvasAllocation (line, allocation)
+ (line->boxAscent - word->size.ascent)
- word->content.widget->getStyle()->margin.top;
-
+
childAllocation.width = word->size.width;
childAllocation.ascent = word->size.ascent
+ word->content.widget->getStyle()->margin.top;
@@ -639,7 +639,7 @@ void Textblock::sizeAllocateImpl (core::Allocation *allocation)
if (containingBlock->outOfFlowMgr)
containingBlock->outOfFlowMgr->sizeAllocateEnd (this);
-
+
for (int i = 0; i < anchors->size(); i++) {
Anchor *anchor = anchors->getRef(i);
int y;
@@ -745,7 +745,7 @@ void Textblock::markSizeChange (int ref)
}
DBG_OBJ_SET_NUM ("wrapRefLines", wrapRefLines);
-
+
// It seems that sometimes (even without floats) the lines
// structure is changed, so that wrapRefLines may refers to a
// line which does not exist anymore. Should be examined
@@ -834,7 +834,7 @@ void Textblock::notifySetParent ()
containingBlock, this);
}
}
-
+
assert (containingBlock != NULL);
}
@@ -1151,13 +1151,13 @@ void Textblock::drawText(core::View *view, core::style::Style *style,
if (isStart) {
/* \bug No way to know about non-ASCII punctuation. */
bool initial_seen = false;
-
+
for (int i = 0; i < start; i++)
if (!ispunct(text[i]))
initial_seen = true;
if (initial_seen)
break;
-
+
int after = 0;
text += start;
while (ispunct(text[after]))
@@ -1166,7 +1166,7 @@ void Textblock::drawText(core::View *view, core::style::Style *style,
after = layout->nextGlyph(text, after);
if (after > len)
after = len;
-
+
char *initial = layout->textToUpper(text, after);
int newlen = strlen(initial) + len-after;
str = (char *)malloc(newlen + 1);
@@ -1177,7 +1177,7 @@ void Textblock::drawText(core::View *view, core::style::Style *style,
}
break;
}
-
+
view->drawText(style->font, style->color, shading, x, y,
str ? str : text + start, str ? strlen(str) : len);
if (str)
@@ -1237,7 +1237,7 @@ void Textblock::drawWord (Line *line, int wordIndex1, int wordIndex2,
text[p++] = hyphenDrawChar[i];
text[p++] = 0;
}
-
+
drawWord0 (wordIndex1, wordIndex2, text, totalWidth, drawHyphen,
style, view, area, xWidget, yWidgetBase);
}
@@ -1404,7 +1404,7 @@ void Textblock::drawLine (Line *line, core::View *view, core::Rectangle *area)
{
DBG_OBJ_ENTER ("draw", 0, "drawLine", "..., %d, %d, %d * %d",
area->x, area->y, area->width, area->height);
-
+
int xWidget = line->textOffset;
int yWidgetBase = lineYOffsetWidget (line) + line->boxAscent;
@@ -1653,7 +1653,7 @@ void Textblock::draw (core::View *view, core::Rectangle *area)
DBG_OBJ_MSGF ("draw", 0, "line %d (of %d)", lineIndex, lines->size ());
drawLine (line, view, area);
}
-
+
if(outOfFlowMgr)
outOfFlowMgr->draw(view, area);
@@ -1816,7 +1816,7 @@ int Textblock::textWidth(const char *text, int start, int len,
if (isStart) {
/* \bug No way to know about non-ASCII punctuation. */
bool initial_seen = false;
-
+
for (int i = 0; i < start; i++)
if (!ispunct(text[i]))
initial_seen = true;
@@ -1824,7 +1824,7 @@ int Textblock::textWidth(const char *text, int start, int len,
ret = layout->textWidth(style->font, text+start, len);
} else {
int after = 0;
-
+
text += start;
while (ispunct(text[after]))
after++;
@@ -1972,10 +1972,10 @@ void Textblock::addText (const char *text, size_t len,
foundDiv = j;
}
}
-
+
if (foundDiv != -1) {
int lDiv = strlen (divChars[foundDiv].s);
-
+
if (divChars[foundDiv].charRemoved) {
assert (divChars[foundDiv].penaltyIndexLeft != -1);
assert (divChars[foundDiv].penaltyIndexRight == -1);
@@ -2060,7 +2060,7 @@ void Textblock::addText (const char *text, size_t len,
// Finished!
for (int i = 0; i < numParts; i++) {
short flags = 0;
-
+
// If this parts adjoins at least one division characters,
// for which canBeHyphenated is set to false (this is the
// case for soft hyphens), do not hyphenate.
@@ -2083,14 +2083,14 @@ void Textblock::addText (const char *text, size_t len,
flags |= Word::WORD_START;
if (i == numParts - 1)
flags |= Word::WORD_END;
-
+
addText0 (text + partStart[i], partEnd[i] - partStart[i],
flags, style, &wordSize[i]);
//printf ("[%p] %d: added word part: ", this, words->size() - 1);
//printWordWithFlags (words->getLastRef());
//printf ("\n");
-
+
//PRINTF("H... [%d] '", i);
//for (int j = partStart[i]; j < partEnd[i]; j++)
// PUTCHAR(text[j]);
@@ -2223,7 +2223,7 @@ void Textblock::addWidget (core::Widget *widget, core::style::Style *style)
containingBlock->outOfFlowMgr = new OutOfFlowMgr (containingBlock);
DBG_OBJ_ASSOC (containingBlock, containingBlock->outOfFlowMgr);
}
-
+
if (OutOfFlowMgr::isWidgetHandledByOOFM (widget)) {
PRINTF (" -> out of flow.\n");
@@ -2372,12 +2372,12 @@ void Textblock::fillSpace (int wordNo, core::style::Style *style)
"pre-line" : "???");
// Old comment:
- //
+ //
// According to
// http://www.w3.org/TR/CSS2/text.html#white-space-model: "line
// breaking opportunities are determined based on the text
// prior to the white space collapsing steps".
- //
+ //
// So we call addBreakOption () for each Textblock::addSpace ()
// call. This is important e.g. to be able to break between
// foo and bar in: <span style="white-space:nowrap">foo </span>
@@ -2404,7 +2404,7 @@ void Textblock::fillSpace (int wordNo, core::style::Style *style)
word->spaceStyle->unref ();
word->spaceStyle = style;
style->ref ();
-
+
setSpaceImgRenderer (wordNo);
}
@@ -2451,7 +2451,7 @@ bool Textblock::isBreakAllowed (core::style::Style *style)
// compiler happiness
lout::misc::assertNotReached ();
return false;
- }
+ }
}
@@ -2689,14 +2689,14 @@ void Textblock::handOverBreak (core::style::Style *style)
void Textblock::flush ()
{
DBG_OBJ_ENTER0 ("resize", 0, "flush");
-
+
if (mustQueueResize) {
DBG_OBJ_MSG ("resize", 0, "mustQueueResize set");
queueResize (-1, true);
mustQueueResize = false;
}
-
+
DBG_OBJ_LEAVE ();
}
@@ -2823,7 +2823,7 @@ void Textblock::borderChanged (int y, Widget *vloat)
wrapLineIndex = 0;
else
wrapLineIndex = lineIndex;
-
+
int realWrapLineIndex = wrapLineIndex;
// The following two variables are only used for debugging:
int minWrapLineIndex = wrapLineIndex, maxWrapLineIndex = wrapLineIndex;
@@ -2842,7 +2842,7 @@ void Textblock::borderChanged (int y, Widget *vloat)
word->content.widget == vloat)
found = true;
}
-
+
// We search for the line of the float reference. There are
// two cases when this is not the line corresponsing to y:
//
@@ -2860,7 +2860,7 @@ void Textblock::borderChanged (int y, Widget *vloat)
// why a correction is neccessary.)
//
// Searched is done in the following order:
- //
+ //
// - wrapLineIndex,
// - wrapLineIndex - 1,
// - wrapLineIndex + 1,
@@ -2927,7 +2927,7 @@ void Textblock::borderChanged (int y, Widget *vloat)
wrapLineIndex, realWrapLineIndex, lines->size (),
minWrapLineIndex, maxWrapLineIndex,
vloat->getGenerator() == this ? "yes" : "no");
-
+
queueResize (OutOfFlowMgr::createRefNormalFlow (realWrapLineIndex), true);
// Notice that the line no. realWrapLineIndex may not exist yet.
@@ -2971,13 +2971,13 @@ Textblock *Textblock::getTextblockForLine (int firstWord, int lastWord)
// A textblock is always between two line breaks, and so the
// first word of the line.
Word *word = words->getRef (firstWord);
-
+
if (word->content.type == core::Content::WIDGET_IN_FLOW &&
word->content.widget->instanceOf (Textblock::CLASS_ID)) {
//printf (" word %d: ", firstWord);
//printWordShort (word);
//printf ("\n");
-
+
return (Textblock*)word->content.widget;
}
}
@@ -3023,7 +3023,7 @@ int Textblock::heightOfPossiblyMissingLine (int lineNo)
"%d <i>of %d</i>", lineNo, lines->size());
int result;
-
+
if (lineNo < lines->size()) {
// An existing line.
@@ -3047,7 +3047,7 @@ int Textblock::heightOfPossiblyMissingLine (int lineNo)
} else if (lineNo == lines->size()) {
// The line to be constructed: some words exist, but not the
// line. Accumulate the word heights.
-
+
// Old comment: Furthermore, this is in some cases incomplete:
// see doc/dw-out-of-flow.doc. -- Still the case?
diff --git a/dw/textblock.hh b/dw/textblock.hh
index c83c7c83..dcfe8586 100644
--- a/dw/textblock.hh
+++ b/dw/textblock.hh
@@ -163,7 +163,7 @@ private:
* badness is not well defined, so fiddling with the penalties is a
* bit difficult.
*/
-
+
enum {
PENALTY_FORCE_BREAK = INT_MIN,
PENALTY_PROHIBIT_BREAK = INT_MAX
@@ -176,7 +176,7 @@ private:
badnessState;
int ratio; // ratio is only defined when badness is defined
int badness, penalty[2];
-
+
// For debugging: define DEBUG for more informations in print().
#ifdef DEBUG
int totalWidth, idealWidth, totalStretchability, totalShrinkability;
@@ -210,7 +210,7 @@ private:
void setSinglePenalty (int index, int penalty);
int badnessValue (int infLevel);
int penaltyValue (int index, int infLevel);
-
+
public:
void calcBadness (int totalWidth, int idealWidth,
int totalStretchability, int totalShrinkability);
@@ -264,7 +264,7 @@ protected:
public:
WordImgRenderer (Textblock *textblock, int wordNo);
~WordImgRenderer ();
-
+
void setData (int xWordWidget, int lineNo);
bool readyToDraw ();
@@ -605,7 +605,7 @@ protected:
core::style::Style *style);
void breakAdded ();
void initWord (int wordNo);
- void cleanupWord (int wordNo);
+ void cleanupWord (int wordNo);
void removeWordImgRenderer (int wordNo);
void setWordImgRenderer (int wordNo);
void removeSpaceImgRenderer (int wordNo);
@@ -681,7 +681,7 @@ protected:
{
return lineYOffsetCanvas (lines->getRef (lineIndex));
}
-
+
inline int calcPenaltyIndexForNewLine ()
{
if (lines->size() == 0)
@@ -729,7 +729,7 @@ protected:
int considerHyphenation (int firstIndex, int breakPos);
bool isHyphenationCandidate (Word *word);
int calcLinePartHeight (int firstWord, int lastWord);
-
+
void handleWordExtremes (int wordIndex);
void correctLastWordExtremes ();
diff --git a/dw/textblock_iterator.cc b/dw/textblock_iterator.cc
index 56ad6e15..c09d9a75 100644
--- a/dw/textblock_iterator.cc
+++ b/dw/textblock_iterator.cc
@@ -205,25 +205,25 @@ void Textblock::TextblockIterator::highlight (int start, int end,
int oldStartChar = textblock->hlStart[layer].nChar;
int oldEndIndex = textblock->hlEnd[layer].index;
int oldEndChar = textblock->hlEnd[layer].nChar;
-
+
if (textblock->hlStart[layer].index > textblock->hlEnd[layer].index) {
/* nothing is highlighted */
textblock->hlStart[layer].index = index;
textblock->hlEnd[layer].index = index;
}
-
+
if (textblock->hlStart[layer].index >= index) {
index2 = textblock->hlStart[layer].index;
textblock->hlStart[layer].index = index;
textblock->hlStart[layer].nChar = start;
}
-
+
if (textblock->hlEnd[layer].index <= index) {
index2 = textblock->hlEnd[layer].index;
textblock->hlEnd[layer].index = index;
textblock->hlEnd[layer].nChar = end;
}
-
+
if (oldStartIndex != textblock->hlStart[layer].index ||
oldStartChar != textblock->hlStart[layer].nChar ||
oldEndIndex != textblock->hlEnd[layer].index ||
@@ -240,15 +240,15 @@ void Textblock::TextblockIterator::unhighlight (int direction,
if (!oofm) {
Textblock *textblock = (Textblock*)getWidget();
int index1 = index, index2 = index;
-
+
if (textblock->hlStart[layer].index > textblock->hlEnd[layer].index)
return;
-
+
int oldStartIndex = textblock->hlStart[layer].index;
int oldStartChar = textblock->hlStart[layer].nChar;
int oldEndIndex = textblock->hlEnd[layer].index;
int oldEndChar = textblock->hlEnd[layer].nChar;
-
+
if (direction == 0) {
index1 = textblock->hlStart[layer].index;
index2 = textblock->hlEnd[layer].index;
@@ -263,7 +263,7 @@ void Textblock::TextblockIterator::unhighlight (int direction,
textblock->hlEnd[layer].index = index - 1;
textblock->hlEnd[layer].nChar = INT_MAX;
}
-
+
if (oldStartIndex != textblock->hlStart[layer].index ||
oldStartChar != textblock->hlStart[layer].nChar ||
oldEndIndex != textblock->hlEnd[layer].index ||
@@ -287,10 +287,10 @@ void Textblock::TextblockIterator::getAllocation (int start, int end,
int lineIndex = textblock->findLineOfWord (index);
Line *line = textblock->lines->getRef (lineIndex);
Word *word = textblock->words->getRef (index);
-
+
allocation->x =
textblock->allocation.x + line->textOffset;
-
+
for (int i = line->firstWord; i < index; i++) {
Word *w = textblock->words->getRef(i);
allocation->x += w->size.width + w->effSpace;
@@ -305,11 +305,11 @@ void Textblock::TextblockIterator::getAllocation (int start, int end,
}
allocation->y = textblock->lineYOffsetCanvas (line) + line->boxAscent -
word->size.ascent;
-
+
allocation->width = word->size.width;
if (word->content.type == core::Content::TEXT) {
int wordEnd = strlen(word->content.text);
-
+
if (start > 0 || end < wordEnd) {
end = misc::min(end, wordEnd); /* end could be INT_MAX */
allocation->width =
diff --git a/dw/textblock_linebreaking.cc b/dw/textblock_linebreaking.cc
index 4f53954b..fc9b9318 100644
--- a/dw/textblock_linebreaking.cc
+++ b/dw/textblock_linebreaking.cc
@@ -187,7 +187,7 @@ int Textblock::BadnessAndPenalty::compareTo (int penaltyIndex,
if (thisValue != otherValue)
return thisValue - otherValue;
}
-
+
return 0;
}
@@ -353,7 +353,7 @@ Textblock::Line *Textblock::addLine (int firstWord, int lastWord,
firstWord, lastWord, newLastOofPos,
temporary ? "true" : "false", minHeight);
DBG_OBJ_MSGF ("construct.line", 0, "=> %d", lines->size ());
-
+
int lineWidth;
if (lastWord >= firstWord) {
DBG_MSG_WORD ("construct.line", 1, "<i>first word:</i> ", firstWord, "");
@@ -423,7 +423,7 @@ Textblock::Line *Textblock::addLine (int firstWord, int lastWord,
"lineWidth [corrected space (%d - %d) after word %d]: %d",
word->effSpace, word->origSpace, i, lineWidth);
}
-
+
if (lines->size () == 1) {
// first line
line->top = 0;
@@ -437,7 +437,7 @@ Textblock::Line *Textblock::addLine (int firstWord, int lastWord,
line->lastOofRefPositionedBeforeThisLine =
prevLine->lastOofRefPositionedBeforeThisLine;
}
-
+
for(int i = line->firstWord; i <= line->lastWord; i++)
accumulateWordForLine (lineIndex, i);
@@ -476,7 +476,7 @@ Textblock::Line *Textblock::addLine (int firstWord, int lastWord,
word->spaceImgRenderer->setData (xWidget, lines->size () - 1);
xWidget += word->size.width + word->effSpace;
}
-
+
line->finished = true;
line->lastOofRefPositionedBeforeThisLine =
misc::max (line->lastOofRefPositionedBeforeThisLine, newLastOofPos);
@@ -609,8 +609,8 @@ int Textblock::wrapWordInFlow (int wordIndex, bool wrapAll)
newLineHasFloatLeft ? "true" : "false",
newLineHasFloatRight ? "true" : "false",
thereWillBeMoreSpace ? "true" : "false");
-
-
+
+
bool tempNewLine = false;
int firstIndex =
lines->size() == 0 ? 0 : lines->getLastRef()->lastWord + 1;
@@ -637,10 +637,10 @@ int Textblock::wrapWordInFlow (int wordIndex, bool wrapAll)
// Break the line when too tight, but only when there is a
// possible break point so far. (TODO: I've forgotten the
// original bug which is fixed by this.)
-
+
// Exception of the latter rule: thereWillBeMoreSpace; see
// above, where it is defined.
-
+
DBG_OBJ_MSGF ("construct.word", 1,
"possible line break between %d and %d?",
firstIndex, wordIndex - 1);
@@ -720,7 +720,7 @@ int Textblock::wrapWordInFlow (int wordIndex, bool wrapAll)
DBG_OBJ_MSGF ("construct.word", 2,
"breakPos = %d, height = %d, lastFloatPos = %d",
breakPos, height, lastFloatPos);
-
+
int startSearch = misc::max (firstIndex, lastFloatPos + 1);
int newFloatPos = -1;
@@ -778,19 +778,19 @@ int Textblock::wrapWordInFlow (int wordIndex, bool wrapAll)
minHeight = misc::max (newLineLeftFloatHeight, 1);
else if (!newLineHasFloatLeft && newLineHasFloatRight)
minHeight = misc::max (newLineRightFloatHeight, 1);
- else
+ else
// May this happen?
minHeight = 1;
}
addLine (firstIndex, breakPos, lastFloatPos, tempNewLine, minHeight);
-
+
DBG_OBJ_MSGF ("construct.word", 1,
"accumulating again from %d to %d\n",
breakPos + 1, wordIndexEnd);
for(int i = breakPos + 1; i <= wordIndexEnd; i++)
accumulateWordData (i);
-
+
// update word pointer as hyphenateWord() can trigger a
// reorganization of the words structure
word = words->getRef (wordIndex);
@@ -814,7 +814,7 @@ int Textblock::wrapWordInFlow (int wordIndex, bool wrapAll)
firstWordWithoutLine = 0;
else
firstWordWithoutLine = lines->getLastRef()->lastWord + 1;
-
+
if (wordIndex >= firstWordWithoutLine) {
word->content.widget->parentRef =
OutOfFlowMgr::createRefNormalFlow (lines->size ());
@@ -876,11 +876,11 @@ void Textblock::balanceBreakPosAndHeight (int wordIndex, int firstIndex,
calcBorders (*lastFloatPos, *height);
*thereWillBeMoreSpace = regardBorder ?
newLineHasFloatLeft || newLineHasFloatRight : false;
-
+
for(int i = firstIndex; i <= *wordIndexEnd; i++)
accumulateWordData (i);
}
-
+
DBG_OBJ_MSGF ("construct.word", 1, "thereWillBeMoreSpace = %s",
*thereWillBeMoreSpace ? "true" : "false");
@@ -889,7 +889,7 @@ void Textblock::balanceBreakPosAndHeight (int wordIndex, int firstIndex,
tempNewLine, penaltyIndex, *thereWillBeMoreSpace,
wrapAll, diffWords, wordIndexEnd, lastFloatPos);
int newHeight = calcLinePartHeight (firstIndex, newBreakPos);
-
+
DBG_OBJ_MSGF ("construct.word", 1,
"runNo = %d, newBreakPos = %d, newHeight = %d",
runNo, newBreakPos, newHeight);
@@ -899,7 +899,7 @@ void Textblock::balanceBreakPosAndHeight (int wordIndex, int firstIndex,
else
DBG_OBJ_MSGF ("construct.word", 1,
"old: height = %d, breakPos = %d", *height, *breakPos);
-
+
if (runNo != 1 /* Since *some* value are needed, the results
from the first run are never discarded. */
&& newHeight >= *height) {
@@ -947,7 +947,7 @@ int Textblock::searchBreakPos (int wordIndex, int firstIndex, int *searchUntil,
do {
DBG_OBJ_MSG ("construct.word", 1, "<i>searchBreakPos loop cycle</i>");
DBG_OBJ_MSG_START ();
-
+
if (firstIndex > *searchUntil) {
// empty line
DBG_OBJ_MSG ("construct.word", 1, "empty line");
@@ -978,12 +978,12 @@ int Textblock::searchBreakPos (int wordIndex, int firstIndex, int *searchUntil,
}
} else {
DBG_OBJ_MSG ("construct.word", 1, "non-empty line");
-
+
int breakPos =
- searchMinBap (firstIndex, *searchUntil, penaltyIndex,
+ searchMinBap (firstIndex, *searchUntil, penaltyIndex,
thereWillBeMoreSpace, wrapAll);
int hyphenatedWord = considerHyphenation (firstIndex, breakPos);
-
+
DBG_OBJ_MSGF ("construct.word", 1, "breakPos = %d", breakPos);
DBG_MSG_WORD ("construct.word", 1, "<i>break at word:</i> ",
breakPos, "");
@@ -993,7 +993,7 @@ int Textblock::searchBreakPos (int wordIndex, int firstIndex, int *searchUntil,
DBG_MSG_WORD ("construct.word", 1,
"<i>hyphenate at word:</i> ",
hyphenatedWord, "");
-
+
if(hyphenatedWord == -1) {
result = breakPos;
lineAdded = true;
@@ -1012,7 +1012,7 @@ int Textblock::searchBreakPos (int wordIndex, int firstIndex, int *searchUntil,
DBG_OBJ_MSGF ("construct.word", 1, "new searchUntil = %d",
*searchUntil);
lineAdded = false;
-
+
if (hyphenatedWord <= wordIndex)
*diffWords += n;
@@ -1021,15 +1021,15 @@ int Textblock::searchBreakPos (int wordIndex, int firstIndex, int *searchUntil,
breakPos + 1, *wordIndexEnd);
for(int i = breakPos + 1; i <= *wordIndexEnd; i++)
accumulateWordData (i);
- }
+ }
}
-
+
DBG_OBJ_MSG_END ();
} while(!lineAdded);
DBG_OBJ_MSGF ("construct.word", 1, "=> %d", result);
DBG_OBJ_LEAVE ();
-
+
return result;
}
@@ -1046,7 +1046,7 @@ int Textblock::searchMinBap (int firstWord, int lastWord, int penaltyIndex,
DBG_OBJ_MSG_START ();
for (int i = firstWord; i <= lastWord; i++) {
Word *w = words->getRef(i);
-
+
DBG_IF_RTFL {
misc::StringBuffer sb;
w->badnessAndPenalty.intoStringBuffer (&sb);
@@ -1075,7 +1075,7 @@ int Textblock::searchMinBap (int firstWord, int lastWord, int penaltyIndex,
// the last word. However, since more words may follow, the
// penalty is not changed, but here, the search is corrected
// (maybe only temporary).
-
+
// (Notice that it was once (temporally) set to -inf, not 0, but
// this will make e.g. test/table-1.html not work.)
Word *w = words->getRef (lastWord);
@@ -1088,14 +1088,14 @@ int Textblock::searchMinBap (int firstWord, int lastWord, int penaltyIndex,
DBG_OBJ_MSGF ("construct.word", 1, "corrected b+p: %s",
sb.getChars ());
}
-
+
if (correctedBap.compareTo(penaltyIndex,
&words->getRef(pos)->badnessAndPenalty) <= 0) {
pos = lastWord;
DBG_OBJ_MSGF ("construct.word", 1, "corrected: %d\n", pos);
}
}
-
+
DBG_OBJ_LEAVE ();
return pos;
}
@@ -1119,7 +1119,7 @@ int Textblock::considerHyphenation (int firstIndex, int breakPos)
if (wordBreak->badnessAndPenalty.lineTight ()) {
// Sometimes, it is not the last word, which must be hyphenated,
// but some word before. Here, we search for the first word
- // which can be hyphenated, *and* makes the line too tight.
+ // which can be hyphenated, *and* makes the line too tight.
for (int i = breakPos; i >= firstIndex; i--) {
Word *word1 = words->getRef (i);
if (word1->badnessAndPenalty.lineTight () &&
@@ -1230,7 +1230,7 @@ void Textblock::handleWordExtremes (int wordIndex)
corrDiffMin = 0;
else
corrDiffMin = lastWord->origSpace - lastWord->hyphenWidth;
-
+
corrDiffMax = lastWord->origSpace - lastWord->hyphenWidth;
} else
corrDiffMin = corrDiffMax = 0;
@@ -1301,7 +1301,7 @@ void Textblock::correctLastWordExtremes ()
int Textblock::hyphenateWord (int wordIndex, int *addIndex1)
{
Word *hyphenatedWord = words->getRef(wordIndex);
- char lang[3] = { hyphenatedWord->style->x_lang[0],
+ char lang[3] = { hyphenatedWord->style->x_lang[0],
hyphenatedWord->style->x_lang[1], 0 };
Hyphenator *hyphenator = Hyphenator::getHyphenator (lang);
PRINTF ("[%p] considering to hyphenate word %d, '%s', in language '%s'\n",
@@ -1317,7 +1317,7 @@ int Textblock::hyphenateWord (int wordIndex, int *addIndex1)
core::Requisition wordSize[numBreaks + 1];
calcTextSizes (origWord.content.text, strlen (origWord.content.text),
origWord.style, numBreaks, breakPos, wordSize);
-
+
PRINTF ("[%p] %d words ...\n", this, words->size ());
words->insert (wordIndex, numBreaks);
@@ -1338,7 +1338,7 @@ int Textblock::hyphenateWord (int wordIndex, int *addIndex1)
if (anchor->wordIndex > wordIndex)
anchor->wordIndex += numBreaks;
}
-
+
for (int i = 0; i < numBreaks + 1; i++) {
Word *w = words->getRef (wordIndex + i);
fillWord (wordIndex + i, wordSize[i].width, wordSize[i].ascent,
@@ -1357,12 +1357,12 @@ int Textblock::hyphenateWord (int wordIndex, int *addIndex1)
// Note: there are numBreaks + 1 word parts.
if (i == 0)
w->flags |= Word::WORD_START;
- else
+ else
w->flags &= ~Word::WORD_START;
if (i == numBreaks)
w->flags |= Word::WORD_END;
- else
+ else
w->flags &= ~Word::WORD_END;
if (i < numBreaks) {
@@ -1393,7 +1393,7 @@ int Textblock::hyphenateWord (int wordIndex, int *addIndex1)
accumulateWordData (wordIndex + i);
PRINTF (" finished\n");
-
+
//delete origword->content.text; TODO: Via textZone?
origWord.style->unref ();
origWord.spaceStyle->unref ();
@@ -1457,7 +1457,7 @@ void Textblock::accumulateWordForLine (int lineIndex, int wordIndex)
if (word->style->valign == core::style::VALIGN_SUPER)
len += len / 2;
line->contentAscent = misc::max (line->contentAscent, len);
-
+
len = word->style->font->descent;
if (word->style->valign == core::style::VALIGN_SUB)
len += word->style->font->ascent / 3;
@@ -1672,10 +1672,10 @@ void Textblock::alignLine (int lineIndex)
Word *lastWord = words->getRef (line->lastWord);
int lineBreakWidth =
this->lineBreakWidth - (line->leftOffset + line->rightOffset);
-
+
for (int i = line->firstWord; i < line->lastWord; i++)
words->getRef(i)->origSpace = words->getRef(i)->effSpace;
-
+
if (firstWord->content.type != core::Content::BREAK) {
switch (firstWord->style->textAlign) {
case core::style::TEXT_ALIGN_LEFT:
@@ -1734,7 +1734,7 @@ void Textblock::calcTextOffset (int lineIndex, int totalWidth)
Line *line = lines->getRef (lineIndex);
int lineWidth = line->firstWord <= line->lastWord ?
words->getRef(line->lastWord)->totalWidth : 0;
-
+
switch (line->alignment) {
case Line::LEFT:
line->textOffset = line->leftOffset;
@@ -1777,16 +1777,16 @@ void Textblock::rewrap ()
lines->setSize (wrapRefLines);
DBG_OBJ_SET_NUM ("lines.size", lines->size ());
nonTemporaryLines = misc::min (nonTemporaryLines, wrapRefLines);
-
+
initNewLine ();
-
+
int firstWord;
if (lines->size () > 0) {
Line *lastLine = lines->getLastRef();
firstWord = lastLine->lastWord + 1;
} else
firstWord = 0;
-
+
DBG_OBJ_MSGF ("construct.line", 0, "starting with word %d", firstWord);
lastWordDrawn = misc::min (lastWordDrawn, firstWord - 1);
@@ -1794,12 +1794,12 @@ void Textblock::rewrap ()
for (int i = firstWord; i < words->size (); i++) {
Word *word = words->getRef (i);
-
+
if (word->content.type == core::Content::WIDGET_IN_FLOW)
calcWidgetSize (word->content.widget, &word->size);
-
+
wordWrap (i, false);
-
+
// Somewhat historical, but still important, note:
//
// For the case that something else is done with this word, it
@@ -1814,7 +1814,7 @@ void Textblock::rewrap ()
wrapRefLines = -1;
DBG_OBJ_SET_NUM ("wrapRefLines", wrapRefLines);
}
-
+
DBG_OBJ_LEAVE ();
}
@@ -1826,7 +1826,7 @@ void Textblock::fillParagraphs ()
DBG_OBJ_ENTER0 ("resize", 0, "fillParagraphs");
DBG_OBJ_MSGF ("resize", 1, "wrapRefParagraphs = %d", wrapRefParagraphs);
-
+
if (wrapRefParagraphs != -1) {
// Notice that wrapRefParagraphs refers to the lines, not to the
// paragraphs.
@@ -1838,7 +1838,7 @@ void Textblock::fillParagraphs ()
firstWordOfLine = lines->getRef(lineNo)->lastWord + 1;
} else
firstWordOfLine = 0;
-
+
int parNo;
if (paragraphs->size() > 0 &&
firstWordOfLine > paragraphs->getLastRef()->firstWord)
@@ -1853,25 +1853,25 @@ void Textblock::fillParagraphs ()
// If there are no paragraphs yet, findParagraphOfWord will return
// -1: use 0 then instead.
parNo = misc::max (0, findParagraphOfWord (firstWordOfLine));
-
+
paragraphs->setSize (parNo);
-
+
int firstWord;
if (paragraphs->size () > 0)
firstWord = paragraphs->getLastRef()->lastWord + 1;
else
firstWord = 0;
-
+
DBG_OBJ_MSGF ("resize", 1, "firstWord = %d, words->size() = %d [before]",
firstWord, words->size ());
-
+
for (int i = firstWord; i < words->size (); i++)
handleWordExtremes (i);
-
+
DBG_OBJ_MSGF ("resize", 1, "words->size() = %d [after]", words->size ());
-
+
wrapRefParagraphs = -1;
- DBG_OBJ_SET_NUM ("wrapRefParagraphs", wrapRefParagraphs);
+ DBG_OBJ_SET_NUM ("wrapRefParagraphs", wrapRefParagraphs);
}
DBG_OBJ_LEAVE ();
@@ -1922,7 +1922,7 @@ void Textblock::calcBorders (int lastOofRef, int height)
// paragraph, "Some more text C ...":
//
// Some more text A ...
- //
+ //
// Some more ,---------.
// text B ... | |
// | <img> |
@@ -1941,8 +1941,8 @@ void Textblock::calcBorders (int lastOofRef, int height)
// Line::lastOofRefPositionedBeforeThisLine are those greater
// than the first word of the new line, so a solution is to use
// the maximum of both.
-
-
+
+
int firstWordOfLine = lines->size() > 0 ?
lines->getLastRef()->lastWord + 1 : 0;
int effOofRef = misc::max (lastOofRef, firstWordOfLine - 1);
@@ -1969,7 +1969,7 @@ void Textblock::calcBorders (int lastOofRef, int height)
containingBlock->outOfFlowMgr->getRightFloatHeight (this, y, height,
this, effOofRef) :
0;
-
+
DBG_OBJ_MSGF ("construct.line", 1,
"%d * %d (%s) / %d * %d (%s), at %d (%d), until %d = "
"max (%d, %d - 1)",
@@ -1982,7 +1982,7 @@ void Textblock::calcBorders (int lastOofRef, int height)
newLineHasFloatLeft = newLineHasFloatRight = false;
newLineLeftBorder = newLineRightBorder = 0;
newLineLeftFloatHeight = newLineRightFloatHeight = 0;
-
+
DBG_OBJ_MSG ("construct.line", 0, "<i>no CB of OOFM</i>");
}
@@ -2012,7 +2012,7 @@ void Textblock::showMissingLines ()
DBG_OBJ_MSGF ("construct.line", 1,
"words->size() = %d, firstWordToWrap = %d, tempWord = %s",
words->size (), firstWordToWrap, tempWord ? "true" : "false");
-
+
if (tempWord) {
core::Requisition size = { 0, 0, 0 };
addText0 ("", 0, Word::WORD_START | Word::WORD_END, getStyle (), &size);
diff --git a/dw/ui.cc b/dw/ui.cc
index 3bf70fea..67e3fabc 100644
--- a/dw/ui.cc
+++ b/dw/ui.cc
@@ -416,7 +416,7 @@ void ComplexButtonResource::correctRequisitionOfChild (Widget *child,
{
// Similar to Widget::correctRequisitionOfChild, but for percentage
// the relief has to be considered.
-
+
if (style::isPerLength (child->getStyle()->width)) {
int availWidth = getEmbed()->getAvailHeight (false);
if (availWidth != -1) {
@@ -441,7 +441,7 @@ void ComplexButtonResource::correctExtremesOfChild (Widget *child,
{
// Similar to Widget::correctExtremesOfChild, but for percentage
// the relief has to be considered.
-
+
if (style::isPerLength (child->getStyle()->width)) {
int availWidth = getEmbed()->getAvailHeight (false);
if (availWidth != -1) {
diff --git a/dw/widget.cc b/dw/widget.cc
index 21fb80a4..2b153ae2 100644
--- a/dw/widget.cc
+++ b/dw/widget.cc
@@ -83,7 +83,7 @@ Widget::Widget ()
allocation.descent = 0;
extraSpace.top = extraSpace.right = extraSpace.bottom = extraSpace.left = 0;
-
+
style = NULL;
bgColor = NULL;
buttonSensitive = true;
@@ -178,7 +178,7 @@ void Widget::setParent (Widget *parent)
void Widget::setQuasiParent (Widget *quasiParent)
{
this->quasiParent = quasiParent;
-
+
// More to do? Compare with setParent().
DBG_OBJ_SET_PTR ("quasiParent", quasiParent);
@@ -265,7 +265,7 @@ void Widget::queueResize (int ref, bool extremesChanged, bool fast)
void Widget::actualQueueResize (int ref, bool extremesChanged, bool fast)
{
assert (!queueResizeEntered ());
-
+
DBG_OBJ_ENTER ("resize", 0, "actualQueueResize", "%d, %s, %s",
ref, extremesChanged ? "true" : "false",
fast ? "true" : "false");
@@ -291,7 +291,7 @@ void Widget::actualQueueResize (int ref, bool extremesChanged, bool fast)
setFlags (resizeFlag);
setFlags (ALLOCATE_QUEUED);
markSizeChange (ref);
-
+
if (extremesChanged) {
setFlags (extremesFlag);
markExtremesChange (ref);
@@ -312,7 +312,7 @@ void Widget::actualQueueResize (int ref, bool extremesChanged, bool fast)
}
} else {
for (widget2 = parent, child = this; widget2;
- child = widget2, widget2 = widget2->parent) {
+ child = widget2, widget2 = widget2->parent) {
if (layout && !widget2->resizeQueued ())
layout->queueResizeList->put (widget2);
@@ -320,11 +320,11 @@ void Widget::actualQueueResize (int ref, bool extremesChanged, bool fast)
resizeFlag == RESIZE_QUEUED ?
"RESIZE_QUEUED" : "NEEDS_RESIZE",
widget2);
-
+
widget2->setFlags (resizeFlag);
widget2->markSizeChange (child->parentRef);
widget2->setFlags (ALLOCATE_QUEUED);
-
+
if (extremesChanged) {
widget2->setFlags (extremesFlag);
widget2->markExtremesChange (child->parentRef);
@@ -349,7 +349,7 @@ void Widget::containerSizeChanged ()
// flags: this method is called recursively), this widget will
// neither change its size. Also, the recursive iteration can be
// stopped, since the children of this widget will
- if (container == NULL ||
+ if (container == NULL ||
container->needsResize () || container->resizeQueued () ||
container->extremesChanged () || container->extremesQueued ()) {
// Viewport (container == NULL) or container widget has changed
@@ -428,7 +428,7 @@ bool Widget::affectsSizeChangeContainerChild (Widget *child)
DBG_OBJ_MSGF ("resize", 1, "=> %s", ret ? "true" : "false");
DBG_OBJ_LEAVE ();
- return ret;
+ return ret;
}
void Widget::containerSizeChangedForChildren ()
@@ -532,7 +532,7 @@ int Widget::getMinWidth (Extremes *extremes, bool forceValue)
extremes = &extremes2;
}
}
-
+
// TODO Not completely clear whether this is feasable: Within
// the context of getAvailWidth(false) etc., getExtremes may not
// be called. We ignore the minimal width then.
@@ -542,7 +542,7 @@ int Widget::getMinWidth (Extremes *extremes, bool forceValue)
DBG_OBJ_MSGF ("resize", 1, "=> %d", minWidth);
DBG_OBJ_LEAVE ();
-
+
return minWidth;
}
@@ -729,7 +729,7 @@ void Widget::correctRequisition (Requisition *requisition,
DBG_OBJ_MSGF ("resize", 1, "=> %d * (%d + %d)",
requisition->width, requisition->ascent,
requisition->descent);
- DBG_OBJ_LEAVE ();
+ DBG_OBJ_LEAVE ();
}
void Widget::correctExtremes (Extremes *extremes)
@@ -814,7 +814,7 @@ int Widget::calcWidth (style::Length cssValue, int refWidth, Widget *refWidget,
} else {
DBG_OBJ_MSG ("resize", 1, "not specified");
width = -1;
- }
+ }
DBG_OBJ_MSGF ("resize", 1, "=> %d", width);
DBG_OBJ_LEAVE ();
@@ -861,7 +861,7 @@ int Widget::calcHeight (style::Length cssValue, bool usePercentage,
} else {
DBG_OBJ_MSG ("resize", 1, "not specified");
height = -1;
- }
+ }
DBG_OBJ_MSGF ("resize", 1, "=> %d", height);
DBG_OBJ_LEAVE ();
@@ -1435,7 +1435,7 @@ int Widget::getAvailWidthOfChild (Widget *child, bool forceValue)
// in case, regard also parent. And quasiParent.
Widget *effContainer = child->quasiParent ? child->quasiParent :
(child->container ? child->container : child->parent);
-
+
if (effContainer == this) {
if (style::isAbsLength (child->getStyle()->width)) {
DBG_OBJ_MSGF ("resize", 1, "absolute width: %dpx",
@@ -1447,7 +1447,7 @@ int Widget::getAvailWidthOfChild (Widget *child, bool forceValue)
DBG_OBJ_MSGF ("resize", 1, "percentage width: %g%%",
100 * style::perLengthVal_useThisOnlyForDebugging
(child->getStyle()->width));
-
+
int availWidth = getAvailWidth (forceValue);
if (availWidth == -1)
width = -1;
@@ -1495,7 +1495,7 @@ int Widget::getAvailHeightOfChild (Widget *child, bool forceValue)
// See comment in Widget::getAvailWidthOfChild.
Widget *effContainer = child->quasiParent ? child->quasiParent :
(child->container ? child->container : child->parent);
-
+
if (effContainer == this) {
if (style::isAbsLength (child->getStyle()->height)) {
DBG_OBJ_MSGF ("resize", 1, "absolute height: %dpx",
@@ -1507,7 +1507,7 @@ int Widget::getAvailHeightOfChild (Widget *child, bool forceValue)
DBG_OBJ_MSGF ("resize", 1, "percentage height: %g%%",
100 * style::perLengthVal_useThisOnlyForDebugging
(child->getStyle()->height));
-
+
int availHeight = getAvailHeight (forceValue);
if (availHeight == -1)
height = -1;
@@ -1545,7 +1545,7 @@ void Widget::correctRequisitionOfChild (Widget *child, Requisition *requisition,
// See comment in Widget::getAvailWidthOfChild.
Widget *effContainer = child->quasiParent ? child->quasiParent :
(child->container ? child->container : child->parent);
-
+
if (effContainer == this) {
correctReqWidthOfChild (child, requisition);
correctReqHeightOfChild (child, requisition, splitHeightFun);
@@ -1641,7 +1641,7 @@ void Widget::correctExtremesOfChild (Widget *child, Extremes *extremes)
// See comment in Widget::getAvailWidthOfChild.
Widget *effContainer = child->quasiParent ? child->quasiParent :
(child->container ? child->container : child->parent);
-
+
if (effContainer == this) {
int limit = child->getMinWidth (extremes, false);
int width = child->calcWidth (child->getStyle()->width, -1, this, limit);
@@ -1649,7 +1649,7 @@ void Widget::correctExtremesOfChild (Widget *child, Extremes *extremes)
child->calcWidth (child->getStyle()->minWidth, -1, this, limit);
int maxWidth =
child->calcWidth (child->getStyle()->maxWidth, -1, this, limit);
-
+
DBG_OBJ_MSGF ("resize", 1, "width = %d, minWidth = %d, maxWidth = %d",
width, minWidth, maxWidth);
@@ -1675,7 +1675,7 @@ void Widget::correctExtremesOfChild (Widget *child, Extremes *extremes)
/**
* \brief This method is called after a widget has been set as the top of a
* widget tree.
- *
+ *
* A widget may override this method when it is necessary to be notified.
*/
void Widget::notifySetAsTopLevel()
@@ -1683,8 +1683,8 @@ void Widget::notifySetAsTopLevel()
}
/**
- * \brief This method is called after a widget has been added to a parent.
- *
+ * \brief This method is called after a widget has been added to a parent.
+ *
* A widget may override this method when it is necessary to be notified.
*/
void Widget::notifySetParent()
@@ -1748,7 +1748,7 @@ void splitHeightPreserveAscent (int height, int *ascent, int *descent)
if (*descent < 0) {
*descent = 0;
*ascent = height;
- }
+ }
}
void splitHeightPreserveDescent (int height, int *ascent, int *descent)
@@ -1757,7 +1757,7 @@ void splitHeightPreserveDescent (int height, int *ascent, int *descent)
if (*ascent < 0) {
*ascent = 0;
*descent = height;
- }
+ }
}
} // namespace core
diff --git a/dw/widget.hh b/dw/widget.hh
index c87b3a77..50d1f543 100644
--- a/dw/widget.hh
+++ b/dw/widget.hh
@@ -215,36 +215,36 @@ protected:
DBG_OBJ_SET_SYM ("flags.RESIZE_QUEUED",
(flags & RESIZE_QUEUED) ? "true" : "false");
break;
-
+
case EXTREMES_QUEUED:
DBG_OBJ_SET_SYM ("flags.EXTREMES_QUEUED",
(flags & EXTREMES_QUEUED) ? "true" : "false");
break;
-
+
case NEEDS_RESIZE:
DBG_OBJ_SET_SYM ("flags.NEEDS_RESIZE",
(flags & NEEDS_RESIZE) ? "true" : "false");
break;
-
+
case NEEDS_ALLOCATE:
DBG_OBJ_SET_SYM ("flags.NEEDS_ALLOCATE",
(flags & NEEDS_ALLOCATE) ? "true" : "false");
break;
-
+
case ALLOCATE_QUEUED:
DBG_OBJ_SET_SYM ("flags.ALLOCATE_QUEUED",
(flags & ALLOCATE_QUEUED) ? "true" : "false");
break;
-
+
case EXTREMES_CHANGED:
DBG_OBJ_SET_SYM ("flags.EXTREMES_CHANGED",
(flags & EXTREMES_CHANGED) ? "true" : "false");
break;
-
+
case WAS_ALLOCATED:
DBG_OBJ_SET_SYM ("flags.WAS_ALLOCATED",
(flags & WAS_ALLOCATED) ? "true" : "false");
- break;
+ break;
}
}
}
@@ -374,7 +374,7 @@ private:
void enterSizeAllocate () { if (layout) layout->sizeAllocateCounter++; }
void leaveSizeAllocate () { if (layout) layout->sizeAllocateCounter--; }
bool sizeAllocateEntered () { return layout && layout->sizeAllocateCounter; }
-
+
void enterSizeRequest () { if (layout) layout->sizeRequestCounter++; }
void leaveSizeRequest () { if (layout) layout->sizeRequestCounter--; }
bool sizeRequestEntered () { return layout && layout->sizeRequestCounter; }
@@ -438,7 +438,7 @@ public:
virtual int applyPerWidth (int containerWidth, style::Length perWidth);
virtual int applyPerHeight (int containerHeight, style::Length perHeight);
-
+
virtual bool isBlockLevel ();
virtual bool isPossibleContainer ();
diff --git a/lout/container.cc b/lout/container.cc
index db1cc560..2dd56255 100644
--- a/lout/container.cc
+++ b/lout/container.cc
@@ -229,7 +229,7 @@ int Vector::bsearch(Object *key, bool mustExist, int start, int end,
int low = start, high = end;
bool found = false;
- while (!found) {
+ while (!found) {
int index = (low + high) / 2;
int c = comparator->compare (key, array[index]);
DBG_OBJ_MSGF ("container", 1,
@@ -248,14 +248,14 @@ int Vector::bsearch(Object *key, bool mustExist, int start, int end,
result = c > 0 ? index + 1 : index;
}
}
-
+
if (c < 0)
high = index - 1;
else
low = index + 1;
}
}
- }
+ }
DBG_OBJ_MSGF ("container", 1, "result = %d", result);
DBG_OBJ_MSG_END ();
diff --git a/lout/misc.hh b/lout/misc.hh
index cac3da77..7edf83c1 100644
--- a/lout/misc.hh
+++ b/lout/misc.hh
@@ -440,7 +440,7 @@ public:
// The original assertion
///
// "assert (i < this->numMain + this->numExtra)"
- //
+ //
// causes this warnung in dw::Textblock::breakAdded:
//
// "assuming signed overflow does not occur when assuming that
diff --git a/src/IO/http.c b/src/IO/http.c
index d5664fb2..7bc0287a 100644
--- a/src/IO/http.c
+++ b/src/IO/http.c
@@ -653,7 +653,7 @@ static void Http_make_fd_available(int fd)
return;
}
}
- }
+ }
}
/*
diff --git a/src/cache.c b/src/cache.c
index d28faa7a..78096af7 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -727,7 +727,7 @@ static void Cache_parse_header(CacheEntry_t *entry)
entry->Flags |= CA_KeepAlive;
dFree(connection);
}
-
+
/*
* Get Transfer-Encoding and initialize decoder
*/
diff --git a/src/css.cc b/src/css.cc
index 5bdf4fdb..5c64c619 100644
--- a/src/css.cc
+++ b/src/css.cc
@@ -544,7 +544,7 @@ void CssContext::addRule (CssSelector *sel, CssPropertyList *props,
if (order == CSS_PRIMARY_USER_AGENT) {
userAgentSheet.addRule (rule);
- } else {
+ } else {
sheet[order].addRule (rule);
}
}
diff --git a/src/cssparser.cc b/src/cssparser.cc
index accdf478..a8de027a 100644
--- a/src/cssparser.cc
+++ b/src/cssparser.cc
@@ -293,7 +293,7 @@ typedef struct {
} type;
const CssPropertyName *properties; /* CSS_SHORTHAND_MULTIPLE:
* must be terminated by
- * CSS_PROPERTY_END
+ * CSS_PROPERTY_END
* CSS_SHORTHAND_DIRECTIONS:
* must have length 4
* CSS_SHORTHAND_BORDERS:
diff --git a/src/html_charrefs.h b/src/html_charrefs.h
index b9a47b7b..e493bff5 100644
--- a/src/html_charrefs.h
+++ b/src/html_charrefs.h
@@ -4,7 +4,7 @@
typedef struct {
const char *ref;
const char *html5_str;
- const char *html4_str;
+ const char *html4_str;
} Charref_t;
#define NumRef 2125
diff --git a/test/dw_float_test.cc b/test/dw_float_test.cc
index 57d53340..807002b2 100644
--- a/test/dw_float_test.cc
+++ b/test/dw_float_test.cc
@@ -26,7 +26,7 @@ static void addTextToFloatTimeout (void *data)
firstFloat->addText(fWords[k], wordStyle);
firstFloat->addSpace(wordStyle);
}
-
+
firstFloat->flush();
Fl::repeat_timeout (2, addTextToFloatTimeout, NULL);
@@ -66,7 +66,7 @@ int main(int argc, char **argv)
styleAttrs.width = createAbsLength(100);
styleAttrs.vloat = FLOAT_LEFT;
Style *leftFloatStyle = Style::create (&styleAttrs);
-
+
styleAttrs.width = createAbsLength(80);
styleAttrs.vloat = FLOAT_RIGHT;
Style *rightFloatStyle = Style::create (&styleAttrs);
@@ -98,14 +98,14 @@ int main(int argc, char **argv)
for(int j = 0; words[j]; j++) {
textblock->addText(words[j], wordStyle);
textblock->addSpace(wordStyle);
-
+
if ((i == 3 || i == 5) && j == 8) {
textblock->addText("[float]", wordStyle);
textblock->addSpace(wordStyle);
-
+
Textblock *vloat = new Textblock (false);
textblock->addWidget(vloat, i == 3 ? leftFloatStyle : rightFloatStyle);
-
+
const char *fWords[] = { "This", "is", "a", "float,", "which", "is",
"set", "aside", "from", "the", "main",
"text.", NULL };
@@ -117,9 +117,9 @@ int main(int argc, char **argv)
vloat->addText(fWords[k], wordStyle);
vloat->addSpace(wordStyle);
}
-
+
vloat->flush ();
-
+
if(i == 3)
firstFloat = vloat;
}
diff --git a/test/dw_simple_container.cc b/test/dw_simple_container.cc
index c4a1aa2a..e19511a6 100644
--- a/test/dw_simple_container.cc
+++ b/test/dw_simple_container.cc
@@ -65,7 +65,7 @@ int SimpleContainer::SimpleContainerIterator::index ()
int SimpleContainer::SimpleContainerIterator::compareTo
(lout::object::Comparable *other)
{
- return index () - ((SimpleContainerIterator*)other)->index ();
+ return index () - ((SimpleContainerIterator*)other)->index ();
}
bool SimpleContainer::SimpleContainerIterator::next ()
@@ -167,7 +167,7 @@ void SimpleContainer::sizeRequestImpl (Requisition *requisition)
child->sizeRequest (&childReq);
else
childReq.width = childReq.ascent = childReq.descent = 0;
-
+
requisition->width = childReq.width + boxDiffWidth ();
requisition->ascent = childReq.ascent + boxOffsetY ();
requisition->descent = childReq.descent + boxRestHeight ();
diff --git a/test/dw_simple_container.hh b/test/dw_simple_container.hh
index c8a629db..bb1a37af 100644
--- a/test/dw_simple_container.hh
+++ b/test/dw_simple_container.hh
@@ -30,7 +30,7 @@ private:
void unhighlight (int direction, core::HighlightLayer layer);
void getAllocation (int start, int end, core::Allocation *allocation);
};
-
+
Widget *child;
protected:
diff --git a/test/dw_simple_container_test.cc b/test/dw_simple_container_test.cc
index 20697dd6..83d0a77f 100644
--- a/test/dw_simple_container_test.cc
+++ b/test/dw_simple_container_test.cc
@@ -90,7 +90,7 @@ int main(int argc, char **argv)
const char *words[] = { "This", "is", "only", "a", "short", "paragraph.",
NULL };
-
+
for(int j = 0; words[j]; j++) {
textblock2->addText(words[j], wordStyle);
textblock2->addSpace(wordStyle);
@@ -99,7 +99,7 @@ int main(int argc, char **argv)
textblockStyle1->unref();
textblockStyle2->unref();
containerStyle->unref();
- wordStyle->unref();
+ wordStyle->unref();
textblock1->flush ();
textblock2->flush ();