summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2015-10-03 13:26:09 +0200
committerSebastian Geerken <devnull@localhost>2015-10-03 13:26:09 +0200
commitc1c494441f1bcf3a2ae70186cbf1eaed08cf6882 (patch)
tree8a99bd6484a36c29a3e375a12d75e016b7c9aaf3
parent061b93f81103e9a111c7912019f4786a69f3e8b0 (diff)
SRDOP: OOFAwareWidget::getGeneratorX (signature, implementation).
-rw-r--r--dw/oofawarewidget.cc2
-rw-r--r--dw/oofawarewidget.hh2
-rw-r--r--dw/textblock.cc11
-rw-r--r--dw/textblock.hh2
4 files changed, 12 insertions, 5 deletions
diff --git a/dw/oofawarewidget.cc b/dw/oofawarewidget.cc
index 21c9fd63..cc397986 100644
--- a/dw/oofawarewidget.cc
+++ b/dw/oofawarewidget.cc
@@ -566,7 +566,7 @@ void OOFAwareWidget::oofSizeChanged (bool extremesChanged)
DBG_OBJ_LEAVE ();
}
-int OOFAwareWidget::getGeneratorX ()
+int OOFAwareWidget::getGeneratorX (int oofmIndex)
{
assertNotReached ();
return 0;
diff --git a/dw/oofawarewidget.hh b/dw/oofawarewidget.hh
index 6a401e4e..4f26b91f 100644
--- a/dw/oofawarewidget.hh
+++ b/dw/oofawarewidget.hh
@@ -287,7 +287,7 @@ public:
* Return position relative to container, not regarding
* margin/border/padding, Called by OOFFloatsMgr to position floats.
*/
- virtual int getGeneratorX ();
+ virtual int getGeneratorX (int oofmIndex);
/**
* Return width including margin/border/padding Called by OOFFloatsMgr to
diff --git a/dw/textblock.cc b/dw/textblock.cc
index a34ea025..77672449 100644
--- a/dw/textblock.cc
+++ b/dw/textblock.cc
@@ -3179,9 +3179,16 @@ void Textblock::oofSizeChanged (bool extremesChanged)
DBG_OBJ_LEAVE ();
}
-int Textblock::getGeneratorX ()
+int Textblock::getGeneratorX (int oofmIndex)
{
- return 0; // TODO
+ int xRef;
+ if (findSizeRequestReference (oofmIndex, &xRef, NULL))
+ return xRef;
+ else {
+ // Only called by by OOFFloatsMgr, so this should not happen:
+ assertNotReached ();
+ return 0;
+ }
}
int Textblock::getGeneratorWidth ()
diff --git a/dw/textblock.hh b/dw/textblock.hh
index e3f565a2..515d67f6 100644
--- a/dw/textblock.hh
+++ b/dw/textblock.hh
@@ -908,7 +908,7 @@ public:
void widgetRefSizeChanged (int externalIndex);
void clearPositionChanged ();
void oofSizeChanged (bool extremesChanged);
- int getGeneratorX ();
+ int getGeneratorX (int oofmIndex);
int getGeneratorWidth ();
bool isPossibleContainer (int oofmIndex);
bool isPossibleContainerParent (int oofmIndex);