aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dw/textblock.hh2
-rw-r--r--dw/textblock_linebreaking.cc42
2 files changed, 0 insertions, 44 deletions
diff --git a/dw/textblock.hh b/dw/textblock.hh
index 0f73736d..b112ba29 100644
--- a/dw/textblock.hh
+++ b/dw/textblock.hh
@@ -708,8 +708,6 @@ protected:
bool sendSelectionEvent (core::SelectionState::EventType eventType,
core::MousePositionEvent *event);
- void accumulateWordExtremes (int firstWord, int lastWord,
- int *maxOfMinWidth, int *sumOfMaxWidth);
void processWord (int wordIndex);
virtual int wordWrap (int wordIndex, bool wrapAll);
int wrapWordInFlow (int wordIndex, bool wrapAll);
diff --git a/dw/textblock_linebreaking.cc b/dw/textblock_linebreaking.cc
index bf41436b..7787ce63 100644
--- a/dw/textblock_linebreaking.cc
+++ b/dw/textblock_linebreaking.cc
@@ -378,10 +378,6 @@ Textblock::Line *Textblock::addLine (int firstWord, int lastWord,
lineWidth);
}
- int maxOfMinWidth, sumOfMaxWidth;
- accumulateWordExtremes (firstWord, lastWord, &maxOfMinWidth,
- &sumOfMaxWidth);
-
lines->increase ();
DBG_OBJ_SET_NUM ("lines.size", lines->size ());
@@ -487,44 +483,6 @@ Textblock::Line *Textblock::addLine (int firstWord, int lastWord,
return line;
}
-void Textblock::accumulateWordExtremes (int firstWord, int lastWord,
- int *maxOfMinWidth, int *sumOfMaxWidth)
-{
- int parMin = 0;
- *maxOfMinWidth = *sumOfMaxWidth = 0;
-
- for (int i = firstWord; i <= lastWord; i++) {
- Word *word = words->getRef (i);
- bool atLastWord = i == lastWord;
-
- core::Extremes extremes;
- getWordExtremes (word, &extremes);
-
- // Minimum: between two *possible* breaks (or at the end).
- // TODO This is redundant to getExtremesImpl().
- // TODO: Again, index 1 is used for lineCanBeBroken(). See getExtremes().
- if (word->badnessAndPenalty.lineCanBeBroken (1) || atLastWord) {
- parMin += extremes.minWidth + word->hyphenWidth;
- *maxOfMinWidth = misc::max (*maxOfMinWidth, parMin);
- parMin = 0;
- } else
- // Shrinkability could be considered, but really does not play a
- // role.
- parMin += extremes.minWidth + word->origSpace;
-
- //printf ("[%p] after word: ", this);
- //printWord (word);
- //printf ("\n");
-
- //printf ("[%p] (%d / %d) => parMin = %d, maxOfMinWidth = %d\n",
- // this, extremes.minWidth, extremes.maxWidth, parMin,
- // *maxOfMinWidth);
-
- *sumOfMaxWidth += (extremes.maxWidth + word->origSpace);
- // Notice that the last space is added. See also: Line::parMax.
- }
-}
-
void Textblock::processWord (int wordIndex)
{
DBG_OBJ_MSGF ("construct.all", 0, "<b>processWord</b> (%d)", wordIndex);