aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dw/alignedtablecell.cc6
-rw-r--r--dw/alignedtablecell.hh2
-rw-r--r--dw/simpletablecell.cc6
-rw-r--r--dw/simpletablecell.hh3
-rw-r--r--dw/table.cc17
-rw-r--r--dw/table.hh3
-rw-r--r--dw/widget.cc1
7 files changed, 34 insertions, 4 deletions
diff --git a/dw/alignedtablecell.cc b/dw/alignedtablecell.cc
index a9f091f3..f1e1203a 100644
--- a/dw/alignedtablecell.cc
+++ b/dw/alignedtablecell.cc
@@ -20,6 +20,7 @@
#include "alignedtablecell.hh"
+#include "table.hh"
#include "../lout/debug.hh"
#include <stdio.h>
@@ -62,6 +63,11 @@ int AlignedTableCell::applyPerHeight (int containerHeight,
return core::style::multiplyWithPerLength (containerHeight, perHeight);
}
+bool AlignedTableCell::getAdjustMinWidth ()
+{
+ return Table::getAdjustTableMinWidth ();
+}
+
int AlignedTableCell::wordWrap(int wordIndex, bool wrapAll)
{
Textblock::Word *word;
diff --git a/dw/alignedtablecell.hh b/dw/alignedtablecell.hh
index caf59307..20733bce 100644
--- a/dw/alignedtablecell.hh
+++ b/dw/alignedtablecell.hh
@@ -12,6 +12,8 @@ private:
int charWordIndex, charWordPos;
protected:
+ bool getAdjustMinWidth ();
+
int wordWrap (int wordIndex, bool wrapAll);
int getValue ();
diff --git a/dw/simpletablecell.cc b/dw/simpletablecell.cc
index 083deaed..43dec92a 100644
--- a/dw/simpletablecell.cc
+++ b/dw/simpletablecell.cc
@@ -20,6 +20,7 @@
#include "simpletablecell.hh"
+#include "table.hh"
#include "../lout/debug.hh"
namespace dw {
@@ -38,6 +39,11 @@ SimpleTableCell::~SimpleTableCell()
DBG_OBJ_DELETE ();
}
+bool SimpleTableCell::getAdjustMinWidth ()
+{
+ return Table::getAdjustTableMinWidth ();
+}
+
bool SimpleTableCell::isBlockLevel ()
{
return false;
diff --git a/dw/simpletablecell.hh b/dw/simpletablecell.hh
index a452add9..45a6d31f 100644
--- a/dw/simpletablecell.hh
+++ b/dw/simpletablecell.hh
@@ -7,6 +7,9 @@ namespace dw {
class SimpleTableCell: public Textblock
{
+protected:
+ bool getAdjustMinWidth ();
+
public:
static int CLASS_ID;
diff --git a/dw/table.cc b/dw/table.cc
index b19db790..3959f01a 100644
--- a/dw/table.cc
+++ b/dw/table.cc
@@ -894,7 +894,7 @@ void Table::forceCalcCellSizes (bool calcHeights)
colWidths, 0);
} else {
DBG_OBJ_MSGF ("resize", 1,
- "subcase 2b: %d columns with specified width",
+ "subcase 2b: %d column(s) with specified width",
numColWidthSpecified);
// Seperate columns with specified and unspecified width, and
@@ -943,15 +943,26 @@ void Table::forceCalcCellSizes (bool calcHeights)
DBG_OBJ_MSG_END ();
}
+ DBG_OBJ_MSG ("resize", 1, "finally setting column widths:");
+ DBG_OBJ_MSG_START ();
+
colWidths->setSize (colExtremes->size());
indexNotSpecified = 0;
for (int col = 0; col < colExtremes->size(); col++)
- if (colWidthSpecified->get (col))
+ if (colWidthSpecified->get (col)) {
+ DBG_OBJ_MSGF ("resize", 1, "#%d: specified, gets maximum %d",
+ col, colExtremes->getRef(col)->maxWidth);
colWidths->set (col, colExtremes->getRef(col)->maxWidth);
- else {
+ } else {
+ DBG_OBJ_MSGF ("resize", 1, "#%d: not specified, gets value %d "
+ "at position %d from temporary list",
+ col, apportionDest.get (indexNotSpecified),
+ indexNotSpecified);
colWidths->set (col, apportionDest.get (indexNotSpecified));
indexNotSpecified++;
}
+
+ DBG_OBJ_MSG_END ();
}
} else {
// Normal apportioning.
diff --git a/dw/table.hh b/dw/table.hh
index 109bbf30..a20e8c6b 100644
--- a/dw/table.hh
+++ b/dw/table.hh
@@ -491,6 +491,9 @@ public:
inline static void setAdjustTableMinWidth (bool adjustTableMinWidth)
{ Table::adjustTableMinWidth = adjustTableMinWidth; }
+ inline static int getAdjustTableMinWidth ()
+ { return Table::adjustTableMinWidth; }
+
Table(bool limitTextWidth);
~Table();
diff --git a/dw/widget.cc b/dw/widget.cc
index 9cf53ec4..7192008a 100644
--- a/dw/widget.cc
+++ b/dw/widget.cc
@@ -760,7 +760,6 @@ void Widget::getExtremes (Extremes *extremes)
assert (!queueResizeEntered ());
DBG_OBJ_ENTER0 ("resize", 0, "getExtremes");
- DBG_OBJ_MSG_START ();
enterGetExtremes ();