summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--project2/rowView.cpp8
-rw-r--r--project2/xmlPresenter.cpp8
2 files changed, 8 insertions, 8 deletions
diff --git a/project2/rowView.cpp b/project2/rowView.cpp
index be1800c..864580a 100644
--- a/project2/rowView.cpp
+++ b/project2/rowView.cpp
@@ -40,16 +40,12 @@ RowView::rowReady() const
if (viewColumns.empty()) {
unsigned int cols = source->columnCount();
for (unsigned int c = 0; c < cols; c += 1) {
- if (!source->isNull(c)) {
- presenter->addField(source->getColumnName(c), source->getCurrentValue(c));
- }
+ presenter->addField(source->getColumnName(c), source->getCurrentValue(c));
}
}
else {
BOOST_FOREACH(const Columns::value_type & col, viewColumns) {
- if (!source->isNull(col.first)) {
- presenter->addField(col.first, col.second);
- }
+ presenter->addField(col.first, col.second);
}
}
executeChildren();
diff --git a/project2/xmlPresenter.cpp b/project2/xmlPresenter.cpp
index 68368ec..a8db552 100644
--- a/project2/xmlPresenter.cpp
+++ b/project2/xmlPresenter.cpp
@@ -47,13 +47,17 @@ XmlPresenter::pushSub(const Glib::ustring & name, const Glib::ustring & ns) cons
void
XmlPresenter::addAttr(const Glib::ustring & name, const Glib::ustring & ns, const VariableType & value) const
{
- nodeStack.back()->set_attribute(name, value, ns);
+ if (!boost::get<Null>(&value)) {
+ nodeStack.back()->set_attribute(name, value, ns);
+ }
}
void
XmlPresenter::setText(const VariableType & value) const
{
- nodeStack.back()->set_child_text(value);
+ if (!boost::get<Null>(&value)) {
+ nodeStack.back()->set_child_text(value);
+ }
}
void