[glom/glom-1-20] ReportBuilder: Add error checking.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom/glom-1-20] ReportBuilder: Add error checking.
- Date: Mon, 6 Feb 2012 11:36:39 +0000 (UTC)
commit a2031a9cda7b2ce7ac76b930d71da8e0d34c7b5f
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Feb 3 13:52:29 2012 +0100
ReportBuilder: Add error checking.
* glom/libglom/report_builder.[h|cc]: Return bool
from the private methods and check those results.
ChangeLog | 7 ++
glom/libglom/report_builder.cc | 209 ++++++++++++++++++++++++++++++++--------
glom/libglom/report_builder.h | 20 ++--
3 files changed, 186 insertions(+), 50 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 23910cd..0d894a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2012-02-03 Murray Cumming <murrayc murrayc com>
+ ReportBuilder: Add error checking.
+
+ * glom/libglom/report_builder.[h|cc]: Return bool
+ from the private methods and check those results.
+
+2012-02-03 Murray Cumming <murrayc murrayc com>
+
Reports: Make summary fields work again.
* glom/libglom/report_builder.cc: report_build_summary():
diff --git a/glom/libglom/report_builder.cc b/glom/libglom/report_builder.cc
index 0490e7f..78fc108 100644
--- a/glom/libglom/report_builder.cc
+++ b/glom/libglom/report_builder.cc
@@ -39,7 +39,7 @@ ReportBuilder::~ReportBuilder()
{
}
-void ReportBuilder::report_build_headerfooter(const FoundSet& found_set, xmlpp::Element& parent_node, const sharedptr<LayoutGroup>& group)
+bool ReportBuilder::report_build_headerfooter(const FoundSet& found_set, xmlpp::Element& parent_node, const sharedptr<LayoutGroup>& group)
{
//Add XML node:
xmlpp::Element* node = parent_node.add_child(group->get_report_part_id());
@@ -53,14 +53,22 @@ void ReportBuilder::report_build_headerfooter(const FoundSet& found_set, xmlpp::
sharedptr<LayoutItem_Text> item_text = sharedptr<LayoutItem_Text>::cast_dynamic(item);
if(item_text)
{
- report_build_records_text(found_set, *node, item_text);
+ if(!report_build_records_text(found_set, *node, item_text))
+ {
+ std::cerr << G_STRFUNC << ": report_build_records_text() failed." << std::endl;
+ return false;
+ }
}
else
{
sharedptr<LayoutItem_Image> item_image = sharedptr<LayoutItem_Image>::cast_dynamic(item);
if(item_image)
{
- report_build_records_image(found_set, *node, item_image);
+ if(!report_build_records_image(found_set, *node, item_image))
+ {
+ std::cerr << G_STRFUNC << ": report_build_records_image() failed." << std::endl;
+ return false;
+ }
}
else
{
@@ -68,7 +76,11 @@ void ReportBuilder::report_build_headerfooter(const FoundSet& found_set, xmlpp::
if(pField)
{
guint col_index = 0; //ignored.
- report_build_records_field(found_set, *node, pField, Glib::RefPtr<Gnome::Gda::DataModel>(), 0, col_index);
+ if(!report_build_records_field(found_set, *node, pField, Glib::RefPtr<Gnome::Gda::DataModel>(), 0, col_index))
+ {
+ std::cerr << G_STRFUNC << ": report_build_records_field() failed." << std::endl;
+ return false;
+ }
}
else
{
@@ -77,16 +89,21 @@ void ReportBuilder::report_build_headerfooter(const FoundSet& found_set, xmlpp::
{
//Reuse (a bit hacky) this function for the header and footer:
guint col_index = 0; //Ignored, because the model is null.
- report_build_records_vertical_group(found_set, *node, vertical_group, Glib::RefPtr<Gnome::Gda::DataModel>(), 0, col_index);
+ if(!report_build_records_vertical_group(found_set, *node, vertical_group, Glib::RefPtr<Gnome::Gda::DataModel>(), 0, col_index))
+ {
+ std::cerr << G_STRFUNC << ": report_build_records_vertical_group() failed." << std::endl;
+ return false;
+ }
}
}
}
}
}
+ return true;
}
-void ReportBuilder::report_build_summary(const FoundSet& found_set, xmlpp::Element& parent_node, const sharedptr<LayoutItem_Summary>& summary)
+bool ReportBuilder::report_build_summary(const FoundSet& found_set, xmlpp::Element& parent_node, const sharedptr<LayoutItem_Summary>& summary)
{
//Add XML node:
xmlpp::Element* node = parent_node.add_child(summary->get_report_part_id());
@@ -101,7 +118,11 @@ void ReportBuilder::report_build_summary(const FoundSet& found_set, xmlpp::Eleme
if(pGroupBy)
{
//Recurse, adding a sub-groupby block:
- report_build_groupby(found_set, *node, pGroupBy);
+ if(!report_build_groupby(found_set, *node, pGroupBy))
+ {
+ std::cerr << G_STRFUNC << ": report_build_groupby() failed." << std::endl;
+ return false;
+ }
}
else
{
@@ -109,7 +130,11 @@ void ReportBuilder::report_build_summary(const FoundSet& found_set, xmlpp::Eleme
if(pSummary)
{
//Recurse, adding a summary block:
- report_build_summary(found_set, *node, pSummary);
+ if(!report_build_summary(found_set, *node, pSummary))
+ {
+ std::cerr << G_STRFUNC << ": report_build_summary() failed." << std::endl;
+ return false;
+ }
}
else
{
@@ -127,13 +152,19 @@ void ReportBuilder::report_build_summary(const FoundSet& found_set, xmlpp::Eleme
found_set_used.m_sort_clause.clear();
//Rows, with data:
- report_build_records(found_set_used, *node, itemsToGet); //TODO: Check for failures.
+ if(!report_build_records(found_set_used, *node, itemsToGet))
+ {
+ std::cerr << G_STRFUNC << ": report_build_records() failed." << std::endl;
+ return false;
+ }
}
+
+ return true;
}
-void ReportBuilder::report_build_groupby_children(const FoundSet& found_set, xmlpp::Element& node, const sharedptr<LayoutItem_GroupBy>& group_by)
+bool ReportBuilder::report_build_groupby_children(const FoundSet& found_set, xmlpp::Element& node, const sharedptr<LayoutItem_GroupBy>& group_by)
{
//Get data and add child rows:
type_vecLayoutItems itemsToGet;
@@ -145,7 +176,11 @@ void ReportBuilder::report_build_groupby_children(const FoundSet& found_set, xml
if(pGroupBy)
{
//Recurse, adding a sub-groupby block:
- report_build_groupby(found_set, node, pGroupBy);
+ if(!report_build_groupby(found_set, node, pGroupBy))
+ {
+ std::cerr << G_STRFUNC << ": report_build_groupby() failed." << std::endl;
+ return false;
+ }
}
else
{
@@ -153,7 +188,11 @@ void ReportBuilder::report_build_groupby_children(const FoundSet& found_set, xml
if(pSummary)
{
//Recurse, adding a summary block:
- report_build_summary(found_set, node, pSummary);
+ if(!report_build_summary(found_set, node, pSummary))
+ {
+ std::cerr << G_STRFUNC << ": report_build_summary() failed." << std::endl;
+ return false;
+ }
}
else
{
@@ -167,11 +206,17 @@ void ReportBuilder::report_build_groupby_children(const FoundSet& found_set, xml
//Rows, with data:
FoundSet found_set_records = found_set;
found_set_records.m_sort_clause = group_by->get_fields_sort_by();
- report_build_records(found_set_records, node, itemsToGet);
+ if(!report_build_records(found_set_records, node, itemsToGet))
+ {
+ std::cerr << G_STRFUNC << ": report_build_records() failed." << std::endl;
+ return false;
+ }
}
+
+ return true;
}
-void ReportBuilder::report_build_groupby(const FoundSet& found_set_parent, xmlpp::Element& parent_node, const sharedptr<LayoutItem_GroupBy>& group_by)
+bool ReportBuilder::report_build_groupby(const FoundSet& found_set_parent, xmlpp::Element& parent_node, const sharedptr<LayoutItem_GroupBy>& group_by)
{
//Get the possible heading values.
if(group_by->get_has_field_group_by())
@@ -195,9 +240,14 @@ void ReportBuilder::report_build_groupby(const FoundSet& found_set_parent, xmlpp
builder->select_group_by( builder->add_field_id(field_group_by->get_name(), group_field_table_name) ); //TODO: And restrict to the current found set.
Glib::RefPtr<Gnome::Gda::DataModel> datamodel = DbUtils::query_execute_select(builder);
- if(datamodel)
+ if(!datamodel)
+ {
+ std::cerr << G_STRFUNC << ": The SQL query failed." << std::endl;
+ return false;
+ }
+ else
{
- guint rows_count = datamodel->get_n_rows();
+ const guint rows_count = datamodel->get_n_rows();
for(guint row = 0; row < rows_count; ++row)
{
const Gnome::Gda::Value group_value = datamodel->get_value_at(0 /* col*/, row); //TODO: Catch exceptions.
@@ -238,12 +288,20 @@ void ReportBuilder::report_build_groupby(const FoundSet& found_set_parent, xmlpp
if(!itemsToGet.empty())
{
- report_build_records(found_set_records, *nodeSecondaryFields, itemsToGet, true /* one record only */);
+ if(!report_build_records(found_set_records, *nodeSecondaryFields, itemsToGet, true /* one record only */))
+ {
+ std::cerr << G_STRFUNC << ": report_build_records() failed." << std::endl;
+ return false;
+ }
}
}
//Get data and add child rows:
- report_build_groupby_children(found_set_records, *nodeGroupBy, group_by);
+ if(!report_build_groupby_children(found_set_records, *nodeGroupBy, group_by))
+ {
+ std::cerr << G_STRFUNC << ": report_build_groupby_children() failed." << std::endl;
+ return false;
+ }
}
}
}
@@ -253,11 +311,13 @@ void ReportBuilder::report_build_groupby(const FoundSet& found_set_parent, xmlpp
//For instance, the user could use the GroupBy part just to specify a sort, though that would be a bit of a hack:
xmlpp::Element* nodeGroupBy = parent_node.add_child(group_by->get_report_part_id()); //We need this to create the HTML table.
Document::set_node_attribute_value_as_decimal_double(nodeGroupBy, "border_width", group_by->get_border_width());
- report_build_groupby_children(found_set_parent, *nodeGroupBy, group_by);
+ return report_build_groupby_children(found_set_parent, *nodeGroupBy, group_by);
}
+
+ return true;
}
-void ReportBuilder::report_build_records_get_fields(const FoundSet& found_set, const sharedptr<LayoutGroup>& group, type_vecLayoutFields& items)
+bool ReportBuilder::report_build_records_get_fields(const FoundSet& found_set, const sharedptr<LayoutGroup>& group, type_vecLayoutFields& items)
{
for(LayoutGroup::type_list_items::iterator iterChildren = group->m_list_items.begin(); iterChildren != group->m_list_items.end(); ++iterChildren)
{
@@ -266,7 +326,11 @@ void ReportBuilder::report_build_records_get_fields(const FoundSet& found_set, c
sharedptr<LayoutItem_VerticalGroup> pVerticalGroup = sharedptr<LayoutItem_VerticalGroup>::cast_dynamic(item);
if(pVerticalGroup)
{
- report_build_records_get_fields(found_set, pVerticalGroup, items);
+ if(!report_build_records_get_fields(found_set, pVerticalGroup, items))
+ {
+ std::cerr << G_STRFUNC << ": report_build_records_get_fields() failed." << std::endl;
+ return false;
+ }
}
else
{
@@ -275,9 +339,11 @@ void ReportBuilder::report_build_records_get_fields(const FoundSet& found_set, c
items.push_back(pField);
}
}
+
+ return true;
}
-void ReportBuilder::report_build_records(const FoundSet& found_set, xmlpp::Element& parent_node, const type_vecLayoutItems& items, bool one_record_only)
+bool ReportBuilder::report_build_records(const FoundSet& found_set, xmlpp::Element& parent_node, const type_vecLayoutItems& items, bool one_record_only)
{
if(!items.empty())
{
@@ -310,7 +376,11 @@ void ReportBuilder::report_build_records(const FoundSet& found_set, xmlpp::Eleme
if(vertical_group)
{
//Get all the fields in this group:
- report_build_records_get_fields(found_set, vertical_group, fieldsToGet);
+ if(!report_build_records_get_fields(found_set, vertical_group, fieldsToGet))
+ {
+ std::cerr << G_STRFUNC << ": report_build_records_get_fields() failed." << std::endl;
+ return false;
+ }
}
}
}
@@ -326,7 +396,12 @@ void ReportBuilder::report_build_records(const FoundSet& found_set, xmlpp::Eleme
limit);
Glib::RefPtr<Gnome::Gda::DataModel> datamodel = DbUtils::query_execute_select(sql_query);
- if(datamodel)
+ if(!datamodel)
+ {
+ std::cerr << G_STRFUNC << ": The SLQ query failed." << std::endl;
+ return false;
+ }
+ else
{
const guint rows_count = datamodel->get_n_rows();
@@ -343,22 +418,33 @@ void ReportBuilder::report_build_records(const FoundSet& found_set, xmlpp::Eleme
sharedptr<LayoutItem_Field> field = sharedptr<LayoutItem_Field>::cast_dynamic(item);
if(field)
{
- report_build_records_field(found_set, *nodeRow, field, datamodel, row, colField);
+ if(!report_build_records_field(found_set, *nodeRow, field, datamodel, row, colField))
+ {
+ std::cerr << G_STRFUNC << ": report_build_records_field() failed." << std::endl;
+ return false;
+ }
}
else
{
sharedptr<LayoutItem_Text> item_text = sharedptr<LayoutItem_Text>::cast_dynamic(item);
if(item_text)
{
- report_build_records_text(found_set, *nodeRow, item_text);
+ if(!report_build_records_text(found_set, *nodeRow, item_text))
+ {
+ std::cerr << G_STRFUNC << ": report_build_records_text() failed." << std::endl;
+ return false;
+ }
}
else
{
sharedptr<LayoutItem_VerticalGroup> item_verticalgroup = sharedptr<LayoutItem_VerticalGroup>::cast_dynamic(item);
if(item_verticalgroup)
{
- report_build_records_vertical_group(found_set, *nodeRow, item_verticalgroup, datamodel, row, colField);
- //TODO
+ if(!report_build_records_vertical_group(found_set, *nodeRow, item_verticalgroup, datamodel, row, colField))
+ {
+ std::cerr << G_STRFUNC << ": report_build_records_vertical_group() failed." << std::endl;
+ return false;
+ }
}
}
}
@@ -373,9 +459,11 @@ void ReportBuilder::report_build_records(const FoundSet& found_set, xmlpp::Eleme
//If there are no records, show zero
//if(!rows_found && show_null_row)
}
+
+ return true;
}
-void ReportBuilder::report_build_records_field(const FoundSet& found_set, xmlpp::Element& nodeParent, const sharedptr<const LayoutItem_Field>& field, const Glib::RefPtr<Gnome::Gda::DataModel>& datamodel, guint row, guint& colField, bool vertical)
+bool ReportBuilder::report_build_records_field(const FoundSet& found_set, xmlpp::Element& nodeParent, const sharedptr<const LayoutItem_Field>& field, const Glib::RefPtr<Gnome::Gda::DataModel>& datamodel, guint row, guint& colField, bool vertical)
{
const Field::glom_field_type field_type = field->get_glom_type();
@@ -400,7 +488,10 @@ void ReportBuilder::report_build_records_field(const FoundSet& found_set, xmlpp:
Glib::RefPtr<Gnome::Gda::DataModel> datamodel = DbUtils::query_execute_select(builder);
if(!datamodel)
- return;
+ {
+ std::cerr << G_STRFUNC << ": The SQL query failed." << std::endl;
+ return false;
+ }
value = datamodel->get_value_at(colField, row); //TODO: Catch exceptions.
colField = 0;
@@ -432,9 +523,11 @@ void ReportBuilder::report_build_records_field(const FoundSet& found_set, xmlpp:
}
++colField;
+
+ return true;
}
-void ReportBuilder::report_build_records_text(const FoundSet& /* found_set */, xmlpp::Element& nodeParent, const sharedptr<const LayoutItem_Text>& textobject, bool vertical)
+bool ReportBuilder::report_build_records_text(const FoundSet& /* found_set */, xmlpp::Element& nodeParent, const sharedptr<const LayoutItem_Text>& textobject, bool vertical)
{
//Text object:
xmlpp::Element* nodeField = nodeParent.add_child(textobject->get_report_part_id()); //We reuse this node type for text objects.
@@ -442,9 +535,11 @@ void ReportBuilder::report_build_records_text(const FoundSet& /* found_set */, x
if(vertical)
nodeField->set_attribute("vertical", "true");
+
+ return true;
}
-void ReportBuilder::report_build_records_image(const FoundSet& /* found_set */, xmlpp::Element& nodeParent, const sharedptr<const LayoutItem_Image>& imageobject, bool vertical)
+bool ReportBuilder::report_build_records_image(const FoundSet& /* found_set */, xmlpp::Element& nodeParent, const sharedptr<const LayoutItem_Image>& imageobject, bool vertical)
{
//Text object:
xmlpp::Element* nodeImage = nodeParent.add_child(imageobject->get_report_part_id()); //We reuse this node type for text objects.
@@ -452,9 +547,11 @@ void ReportBuilder::report_build_records_image(const FoundSet& /* found_set */,
if(vertical)
nodeImage->set_attribute("vertical", "true");
+
+ return true;
}
-void ReportBuilder::report_build_records_vertical_group(const FoundSet& found_set, xmlpp::Element& parentNode, const sharedptr<LayoutItem_VerticalGroup>& group, const Glib::RefPtr<Gnome::Gda::DataModel>& datamodel, guint row, guint& field_index)
+bool ReportBuilder::report_build_records_vertical_group(const FoundSet& found_set, xmlpp::Element& parentNode, const sharedptr<LayoutItem_VerticalGroup>& group, const Glib::RefPtr<Gnome::Gda::DataModel>& datamodel, guint row, guint& field_index)
{
xmlpp::Element* nodeGroupVertical = parentNode.add_child(group->get_report_part_id());
@@ -465,25 +562,39 @@ void ReportBuilder::report_build_records_vertical_group(const FoundSet& found_se
sharedptr<LayoutItem_VerticalGroup> pVerticalGroup = sharedptr<LayoutItem_VerticalGroup>::cast_dynamic(item);
if(pVerticalGroup)
{
- report_build_records_vertical_group(found_set, *nodeGroupVertical, pVerticalGroup, datamodel, row, field_index);
+ if(!report_build_records_vertical_group(found_set, *nodeGroupVertical, pVerticalGroup, datamodel, row, field_index))
+ {
+ std::cerr << G_STRFUNC << ": report_build_records_vertical_group() failed." << std::endl;
+ return false;
+ }
}
else
{
sharedptr<LayoutItem_Field> pField = sharedptr<LayoutItem_Field>::cast_dynamic(item);
if(pField)
{
- report_build_records_field(found_set, *nodeGroupVertical, pField, datamodel, row, field_index, true /* vertical, so we get a row for each field too. */);
+ if(!report_build_records_field(found_set, *nodeGroupVertical, pField, datamodel, row, field_index, true /* vertical, so we get a row for each field too. */))
+ {
+ std::cerr << G_STRFUNC << ": report_build_records_field() failed." << std::endl;
+ return false;
+ }
}
else
{
sharedptr<LayoutItem_Text> pText = sharedptr<LayoutItem_Text>::cast_dynamic(item);
if(pText)
{
- report_build_records_text(found_set, *nodeGroupVertical, pText, true);
+ if(!report_build_records_text(found_set, *nodeGroupVertical, pText, true))
+ {
+ std::cerr << G_STRFUNC << ": report_build_records_text() failed." << std::endl;
+ return false;
+ }
}
}
}
}
+
+ return true;
}
//TODO: Return a URI
@@ -575,14 +686,24 @@ Glib::ustring ReportBuilder::report_build(const FoundSet& found_set, const share
//The Group, and the details for each record in the group:
sharedptr<LayoutItem_GroupBy> pGroupBy = sharedptr<LayoutItem_GroupBy>::cast_dynamic(pPart);
if(pGroupBy)
- report_build_groupby(found_set, *nodeParent, pGroupBy);
+ {
+ if(!report_build_groupby(found_set, *nodeParent, pGroupBy))
+ {
+ std::cerr << G_STRFUNC << ": report_build_groupby() failed." << std::endl;
+ return Glib::ustring();
+ }
+ }
else
{
sharedptr<LayoutItem_Summary> pSummary = sharedptr<LayoutItem_Summary>::cast_dynamic(pPart);
if(pSummary)
{
//Recurse, adding a summary block:
- report_build_summary(found_set, *nodeParent, pSummary);
+ if(!report_build_summary(found_set, *nodeParent, pSummary))
+ {
+ std::cerr << G_STRFUNC << ": report_build_summary() failed." << std::endl;
+ return Glib::ustring();
+ }
}
else
{
@@ -594,7 +715,11 @@ Glib::ustring ReportBuilder::report_build(const FoundSet& found_set, const share
if(pHeader || pFooter)
{
//Recurse, adding a summary block:
- report_build_headerfooter(found_set, *nodeParent, pGroup);
+ if(!report_build_headerfooter(found_set, *nodeParent, pGroup))
+ {
+ std::cerr << G_STRFUNC << ": report_build_headerfooter() failed." << std::endl;
+ return Glib::ustring();
+ }
}
}
else
@@ -607,7 +732,11 @@ Glib::ustring ReportBuilder::report_build(const FoundSet& found_set, const share
if(!itemsToGet_TopLevel.empty())
{
xmlpp::Element* nodeGroupBy = nodeParent->add_child("ungrouped_records");
- report_build_records(found_set, *nodeGroupBy, itemsToGet_TopLevel);
+ if(!report_build_records(found_set, *nodeGroupBy, itemsToGet_TopLevel))
+ {
+ std::cerr << G_STRFUNC << ": report_build_records() failed." << std::endl;
+ return Glib::ustring();
+ }
}
return GlomXslUtils::transform(*pDocument, "print_report_to_html.xsl");
diff --git a/glom/libglom/report_builder.h b/glom/libglom/report_builder.h
index 641c7f6..0c1292f 100644
--- a/glom/libglom/report_builder.h
+++ b/glom/libglom/report_builder.h
@@ -58,20 +58,20 @@ public:
private:
- void report_build_groupby(const FoundSet& found_set_parent, xmlpp::Element& parent_node, const sharedptr<LayoutItem_GroupBy>& group_by);
- void report_build_groupby_children(const FoundSet& found_set, xmlpp::Element& nodeGroupBy, const sharedptr<LayoutItem_GroupBy>& group_by);
- void report_build_summary(const FoundSet& found_set_parent, xmlpp::Element& parent_node, const sharedptr<LayoutItem_Summary>& summary);
- void report_build_headerfooter(const FoundSet& found_set, xmlpp::Element& parent_node, const sharedptr<LayoutGroup>& group);
+ bool report_build_groupby(const FoundSet& found_set_parent, xmlpp::Element& parent_node, const sharedptr<LayoutItem_GroupBy>& group_by);
+ bool report_build_groupby_children(const FoundSet& found_set, xmlpp::Element& nodeGroupBy, const sharedptr<LayoutItem_GroupBy>& group_by);
+ bool report_build_summary(const FoundSet& found_set_parent, xmlpp::Element& parent_node, const sharedptr<LayoutItem_Summary>& summary);
+ bool report_build_headerfooter(const FoundSet& found_set, xmlpp::Element& parent_node, const sharedptr<LayoutGroup>& group);
typedef std::vector< sharedptr<LayoutItem> > type_vecLayoutItems;
typedef std::vector< sharedptr<LayoutItem_Field> > type_vecLayoutFields;
- void report_build_records(const FoundSet& found_set, xmlpp::Element& parent_node, const type_vecLayoutItems& items, bool one_record_only = false);
- void report_build_records_get_fields(const FoundSet& found_set, const sharedptr<LayoutGroup>& group, type_vecLayoutFields& items);
- void report_build_records_field(const FoundSet& found_set, xmlpp::Element& nodeParent, const sharedptr<const LayoutItem_Field>& field, const Glib::RefPtr<Gnome::Gda::DataModel>& datamodel, guint row, guint& colField, bool vertical = false);
- void report_build_records_text(const FoundSet& found_set, xmlpp::Element& nodeParent, const sharedptr<const LayoutItem_Text>& textobject, bool vertical = false);
- void report_build_records_image(const FoundSet& found_set, xmlpp::Element& nodeParent, const sharedptr<const LayoutItem_Image>& imageobject, bool vertical = false);
- void report_build_records_vertical_group(const FoundSet& found_set, xmlpp::Element& vertical_group_node, const sharedptr<LayoutItem_VerticalGroup>& group, const Glib::RefPtr<Gnome::Gda::DataModel>& datamodel, guint row, guint& field_index);
+ bool report_build_records(const FoundSet& found_set, xmlpp::Element& parent_node, const type_vecLayoutItems& items, bool one_record_only = false);
+ bool report_build_records_get_fields(const FoundSet& found_set, const sharedptr<LayoutGroup>& group, type_vecLayoutFields& items);
+ bool report_build_records_field(const FoundSet& found_set, xmlpp::Element& nodeParent, const sharedptr<const LayoutItem_Field>& field, const Glib::RefPtr<Gnome::Gda::DataModel>& datamodel, guint row, guint& colField, bool vertical = false);
+ bool report_build_records_text(const FoundSet& found_set, xmlpp::Element& nodeParent, const sharedptr<const LayoutItem_Text>& textobject, bool vertical = false);
+ bool report_build_records_image(const FoundSet& found_set, xmlpp::Element& nodeParent, const sharedptr<const LayoutItem_Image>& imageobject, bool vertical = false);
+ bool report_build_records_vertical_group(const FoundSet& found_set, xmlpp::Element& vertical_group_node, const sharedptr<LayoutItem_VerticalGroup>& group, const Glib::RefPtr<Gnome::Gda::DataModel>& datamodel, guint row, guint& field_index);
Document* get_document();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]