summaryrefslogtreecommitdiff
path: root/dw/textblock_linebreaking.cc
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2016-04-02 22:48:21 +0200
committerSebastian Geerken <devnull@localhost>2016-04-02 22:48:21 +0200
commit70b9f2b70d9f0c0f48d2ae649023ea3ae5271367 (patch)
tree41c998067cde197225621171b0ab096734e5812e /dw/textblock_linebreaking.cc
parent639fbbfd350e32ab128482078d83a05a3f208983 (diff)
Content with type WIDGET_OOF_REF now refers to new class WidgetReference.
Diffstat (limited to 'dw/textblock_linebreaking.cc')
-rw-r--r--dw/textblock_linebreaking.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/dw/textblock_linebreaking.cc b/dw/textblock_linebreaking.cc
index ab4e3eab..1ef4b932 100644
--- a/dw/textblock_linebreaking.cc
+++ b/dw/textblock_linebreaking.cc
@@ -463,7 +463,7 @@ Textblock::Line *Textblock::addLine (int firstWord, int lastWord,
word->spaceImgRenderer->setData (xWidget, lines->size () - 1);
if (word->content.type == core::Content::WIDGET_OOF_REF) {
- Widget *widget = word->content.widget;
+ Widget *widget = word->content.widgetReference->widget;
int oofmIndex = getWidgetOOFIndex (widget);
oof::OutOfFlowMgr *oofm = searchOutOfFlowMgr (oofmIndex);
// See also Textblock::sizeAllocate, and notes there about
@@ -737,10 +737,9 @@ int Textblock::wrapWordInFlow (int wordIndex, bool wrapAll)
core::Content *content = &(words->getRef(i)->content);
if (content->type == core::Content::WIDGET_OOF_REF) {
for (int j = 0; newFloatPos == -1 && j < NUM_OOFM; j++) {
- if ((searchOutOfFlowMgr(j)->affectsLeftBorder(content
- ->widget) ||
- searchOutOfFlowMgr(j)->affectsRightBorder (content
- ->widget)))
+ Widget *widget = content->widgetReference->widget;
+ if ((searchOutOfFlowMgr(j)->affectsLeftBorder(widget) ||
+ searchOutOfFlowMgr(j)->affectsRightBorder (widget)))
newFloatPos = i;
}
}
@@ -760,7 +759,8 @@ int Textblock::wrapWordInFlow (int wordIndex, bool wrapAll)
lastFloatPos = newFloatPos;
- Widget *widget = words->getRef(lastFloatPos)->content.widget;
+ Widget *widget =
+ words->getRef(lastFloatPos)->content.widgetReference->widget;
int oofmIndex = getWidgetOOFIndex (widget);
oof::OutOfFlowMgr *oofm = searchOutOfFlowMgr (oofmIndex);
if (oofm && oofm->mayAffectBordersAtAll ()) {
@@ -862,7 +862,7 @@ int Textblock::wrapWordOofRef (int wordIndex, bool wrapAll)
wordIndex, wrapAll ? "true" : "false");
Word *word = words->getRef (wordIndex);
- Widget *widget = word->content.widget;
+ Widget *widget = word->content.widgetReference->widget;
int yNewLine = yOffsetOfLineToBeCreated ();
// Floats, which affect either border, are handled in wrapWordInFlow; this
@@ -1920,9 +1920,11 @@ void Textblock::rewrap ()
case core::Content::WIDGET_OOF_REF:
{
- int oofmIndex = getOOFMIndex (word->content.widget);
+ int oofmIndex =
+ getOOFMIndex (word->content.widgetReference->widget);
oof::OutOfFlowMgr *oofm = searchOutOfFlowMgr (oofmIndex);
- oofm->calcWidgetRefSize (word->content.widget, &(word->size));
+ oofm->calcWidgetRefSize (word->content.widgetReference->widget,
+ &(word->size));
DBG_SET_WORD_SIZE (i);
}
break;