[glom] Remove trailing whitespace.



commit d2dc831d506e2737c69b8e51bd51a98ff111d8d1
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon May 16 16:33:44 2016 +0200

    Remove trailing whitespace.

 glom/application.cc                                |   10 +-
 glom/application.h                                 |    4 +-
 glom/appwindow.cc                                  |   44 ++++----
 glom/appwindow.h                                   |    6 +-
 glom/bakery/appwindow.cc                           |    6 +-
 glom/bakery/appwindow.h                            |   14 +-
 glom/bakery/appwindow_withdoc.h                    |   10 +-
 glom/bakery/busy_cursor.h                          |    2 +-
 glom/bakery/dialog_offersave.cc                    |    4 +-
 glom/base_db.cc                                    |    8 +-
 glom/base_db_table.h                               |    6 +-
 glom/base_db_table_data.cc                         |    4 +-
 glom/box_db_table.h                                |    2 +-
 glom/box_withbuttons.cc                            |    2 +-
 glom/box_withbuttons.h                             |    6 +-
 glom/dialog_connection.cc                          |   12 +-
 glom/dialog_connection.h                           |    4 +-
 glom/dialog_existing_or_new.cc                     |    6 +-
 glom/dialog_existing_or_new.h                      |   18 ++--
 glom/dialog_invalid_data.cc                        |    6 +-
 glom/filechooser_export.cc                         |    4 +-
 glom/filechooser_export.h                          |    2 +-
 glom/frame_glom.cc                                 |   42 +++---
 glom/frame_glom.h                                  |    4 +-
 glom/glade_utils.h                                 |    8 +-
 glom/glom_create_from_example.cc                   |   42 +++---
 glom/glom_export_po.cc                             |   14 +-
 glom/glom_export_po_all.cc                         |   12 +-
 glom/glom_import_po_all.cc                         |   14 +-
 glom/glom_test_connection.cc                       |   12 +-
 glom/import_csv/csv_parser.cc                      |    2 +-
 glom/import_csv/dialog_import_csv_progress.cc      |    8 +-
 glom/import_csv/dialog_import_csv_progress.h       |    2 +-
 glom/import_csv/file_encodings.h                   |    2 +-
 glom/infobar_progress_creating.h                   |    2 +-
 glom/libglom/calcinprogress.h                      |    2 +-
 glom/libglom/connectionpool.cc                     |   10 +-
 glom/libglom/connectionpool.h                      |   18 ++--
 glom/libglom/connectionpool_backends/mysql.cc      |   14 +-
 glom/libglom/connectionpool_backends/mysql.h       |    2 +-
 .../connectionpool_backends/mysql_central.cc       |    4 +-
 glom/libglom/connectionpool_backends/mysql_self.cc |   20 ++--
 glom/libglom/connectionpool_backends/mysql_self.h  |    4 +-
 glom/libglom/connectionpool_backends/postgres.cc   |   18 ++--
 glom/libglom/connectionpool_backends/postgres.h    |    2 +-
 .../connectionpool_backends/postgres_central.cc    |    4 +-
 .../connectionpool_backends/postgres_self.cc       |   22 ++--
 .../connectionpool_backends/postgres_self.h        |    4 +-
 glom/libglom/connectionpool_backends/sqlite.cc     |   16 ++--
 glom/libglom/data_structure/choicevalue.h          |    2 +-
 glom/libglom/data_structure/database_title.h       |    2 +-
 glom/libglom/data_structure/field.cc               |   32 +++---
 glom/libglom/data_structure/field.h                |    2 +-
 glom/libglom/data_structure/fieldtypes.cc          |   16 ++--
 glom/libglom/data_structure/fieldtypes.h           |    2 +-
 glom/libglom/data_structure/foundset.h             |    2 +-
 glom/libglom/data_structure/glomconversions.cc     |   72 ++++++------
 glom/libglom/data_structure/glomconversions.h      |    8 +-
 glom/libglom/data_structure/has_title_singular.cc  |    4 +-
 glom/libglom/data_structure/has_title_singular.h   |    6 +-
 glom/libglom/data_structure/layout/custom_title.cc |    2 +-
 glom/libglom/data_structure/layout/custom_title.h  |    2 +-
 glom/libglom/data_structure/layout/formatting.cc   |    8 +-
 glom/libglom/data_structure/layout/formatting.h    |    6 +-
 glom/libglom/data_structure/layout/layoutgroup.cc  |   18 ++--
 glom/libglom/data_structure/layout/layoutgroup.h   |    2 +-
 glom/libglom/data_structure/layout/layoutitem.h    |    4 +-
 .../data_structure/layout/layoutitem_button.cc     |    2 +-
 .../data_structure/layout/layoutitem_button.h      |    2 +-
 .../layout/layoutitem_calendarportal.cc            |    4 +-
 .../layout/layoutitem_calendarportal.h             |    4 +-
 .../data_structure/layout/layoutitem_field.cc      |    8 +-
 .../data_structure/layout/layoutitem_field.h       |   12 +-
 .../data_structure/layout/layoutitem_image.cc      |    2 +-
 .../data_structure/layout/layoutitem_image.h       |    2 +-
 .../data_structure/layout/layoutitem_line.cc       |   12 +-
 .../data_structure/layout/layoutitem_line.h        |    6 +-
 .../layout/layoutitem_placeholder.cc               |   20 ++--
 .../data_structure/layout/layoutitem_placeholder.h |   18 ++--
 .../data_structure/layout/layoutitem_portal.cc     |   14 +-
 .../data_structure/layout/layoutitem_portal.h      |   32 +++---
 .../data_structure/layout/layoutitem_text.cc       |    2 +-
 .../data_structure/layout/layoutitem_text.h        |    2 +-
 .../layout/layoutitem_withformatting.cc            |    8 +-
 .../layout/layoutitem_withformatting.h             |    4 +-
 .../layout/report_parts/layoutitem_footer.h        |    2 +-
 .../layout/report_parts/layoutitem_groupby.h       |    4 +-
 .../layout/report_parts/layoutitem_header.h        |    2 +-
 .../layout/report_parts/layoutitem_summary.h       |    2 +-
 glom/libglom/data_structure/layout/static_text.cc  |    2 +-
 glom/libglom/data_structure/layout/static_text.h   |    2 +-
 .../data_structure/layout/usesrelationship.cc      |    4 +-
 .../data_structure/layout/usesrelationship.h       |   32 +++---
 glom/libglom/data_structure/numeric_format.cc      |    4 +-
 glom/libglom/data_structure/numeric_format.h       |    4 +-
 glom/libglom/data_structure/print_layout.cc        |    2 +-
 glom/libglom/data_structure/print_layout.h         |    4 +-
 glom/libglom/data_structure/privileges.h           |    2 +-
 glom/libglom/data_structure/relationship.h         |    2 +-
 glom/libglom/data_structure/system_prefs.cc        |    2 +-
 glom/libglom/data_structure/system_prefs.h         |    4 +-
 glom/libglom/data_structure/tableinfo.cc           |    2 +-
 glom/libglom/data_structure/translatable_item.cc   |    2 +-
 glom/libglom/data_structure/translatable_item.h    |    4 +-
 glom/libglom/db_utils.cc                           |   62 +++++-----
 glom/libglom/db_utils.h                            |    4 +-
 glom/libglom/document/bakery/document.cc           |    2 +-
 glom/libglom/document/bakery/document_xml.cc       |    6 +-
 glom/libglom/document/bakery/document_xml.h        |   10 +-
 glom/libglom/document/bakery/view/view.h           |    4 +-
 glom/libglom/document/bakery/view/view_composite.h |    4 +-
 glom/libglom/document/bakery/view/viewbase.h       |    4 +-
 glom/libglom/document/document.cc                  |  102 ++++++++--------
 glom/libglom/document/document.h                   |   16 ++--
 glom/libglom/layout_utils.cc                       |    6 +-
 glom/libglom/privs.cc                              |    6 +-
 glom/libglom/privs.h                               |    8 +-
 glom/libglom/python_embed/py_glom_record.h         |    6 +-
 .../libglom/python_embed/pygdavalue_conversions.cc |   18 ++--
 glom/libglom/report_builder.cc                     |    8 +-
 glom/libglom/report_builder.h                      |    4 +-
 glom/libglom/spawn_with_feedback.cc                |    8 +-
 glom/libglom/spawn_with_feedback.h                 |    2 +-
 glom/libglom/test_avahi_publisher.cc               |    2 +-
 glom/libglom/test_connectionpool.cc                |    4 +-
 glom/libglom/test_sync.cc                          |    4 +-
 glom/libglom/translations_po.cc                    |   32 +++---
 glom/libglom/translations_po.h                     |    4 +-
 glom/libglom/utils.h                               |    4 +-
 glom/libglom/xml_utils.cc                          |    8 +-
 glom/main.cc                                       |    2 +-
 glom/main_local_options.cc                         |    6 +-
 glom/main_local_options.h                          |    4 +-
 glom/mode_data/box_data_calendar_related.cc        |    2 +-
 glom/mode_data/box_data_calendar_related.h         |   20 ++--
 glom/mode_data/box_data_details.cc                 |   18 ++--
 glom/mode_data/box_data_details.h                  |    2 +-
 glom/mode_data/box_data_list.cc                    |    2 +-
 glom/mode_data/box_data_list_related.cc            |    6 +-
 glom/mode_data/box_data_manyrecords.cc             |    2 +-
 glom/mode_data/box_data_manyrecords.h              |    4 +-
 glom/mode_data/box_data_portal.cc                  |    6 +-
 glom/mode_data/box_data_portal.h                   |   26 ++--
 glom/mode_data/buttonglom.cc                       |    2 +-
 glom/mode_data/buttonglom.h                        |    2 +-
 .../datawidget/cellrenderer_buttonimage.h          |    4 +-
 .../mode_data/datawidget/cellrenderer_buttontext.h |    4 +-
 glom/mode_data/datawidget/cellrenderer_dblist.h    |    2 +-
 glom/mode_data/datawidget/checkbutton.cc           |    2 +-
 glom/mode_data/datawidget/checkbutton.h            |    2 +-
 glom/mode_data/datawidget/combo.cc                 |    4 +-
 .../datawidget/combochoiceswithtreemodel.cc        |   16 ++--
 .../datawidget/combochoiceswithtreemodel.h         |    6 +-
 glom/mode_data/datawidget/datawidget.cc            |   14 +-
 glom/mode_data/datawidget/entry.cc                 |    6 +-
 glom/mode_data/datawidget/label.h                  |    8 +-
 glom/mode_data/datawidget/textview.cc              |    4 +-
 glom/mode_data/datawidget/textview.h               |    4 +-
 glom/mode_data/datawidget/treemodel_db.cc          |   10 +-
 glom/mode_data/datawidget/treemodel_db.h           |    6 +-
 .../datawidget/treemodel_db_withextratext.cc       |   12 +-
 .../datawidget/treemodel_db_withextratext.h        |    8 +-
 glom/mode_data/db_adddel/db_adddel.cc              |   46 ++++----
 glom/mode_data/db_adddel/db_adddel.h               |   12 +-
 glom/mode_data/db_adddel/db_adddel_withbuttons.cc  |    2 +-
 glom/mode_data/db_adddel/db_adddel_withbuttons.h   |    6 +-
 glom/mode_data/db_adddel/db_treeviewcolumn_glom.h  |    2 +-
 glom/mode_data/flowtablewithfields.cc              |   16 ++--
 glom/mode_data/flowtablewithfields.h               |    4 +-
 glom/mode_data/notebook_data.cc                    |   10 +-
 glom/mode_data/notebook_data.h                     |    2 +-
 glom/mode_data/test_flowtablewithfields.cc         |    6 +-
 glom/mode_design/dialog_add_related_table.cc       |    8 +-
 glom/mode_design/dialog_database_preferences.cc    |   12 +-
 glom/mode_design/dialog_initial_password.cc        |    2 +-
 glom/mode_design/dialog_relationships.cc           |    4 +-
 glom/mode_design/fields/box_db_table_definition.cc |   18 ++--
 glom/mode_design/fields/box_db_table_definition.h  |    2 +-
 glom/mode_design/fields/combo_fieldtype.h          |    2 +-
 glom/mode_design/layout/combobox_fields.cc         |   10 +-
 glom/mode_design/layout/combobox_fields.h          |    8 +-
 glom/mode_design/layout/dialog_choose_field.cc     |   38 +++---
 glom/mode_design/layout/dialog_choose_field.h      |    4 +-
 .../layout/dialog_choose_relationship.h            |    2 +-
 glom/mode_design/layout/dialog_layout.h            |    4 +-
 .../layout/dialog_layout_calendar_related.cc       |    4 +-
 .../layout/dialog_layout_calendar_related.h        |    8 +-
 glom/mode_design/layout/dialog_layout_details.cc   |    4 +-
 glom/mode_design/layout/dialog_layout_details.h    |    2 +-
 glom/mode_design/layout/dialog_layout_export.cc    |    4 +-
 glom/mode_design/layout/dialog_layout_list.cc      |    2 +-
 glom/mode_design/layout/dialog_layout_list.h       |    2 +-
 .../layout/dialog_layout_list_related.cc           |   20 ++--
 .../layout/dialog_layout_list_related.h            |   10 +-
 .../layout_item_dialogs/dialog_buttonscript.cc     |    6 +-
 .../layout_item_dialogs/dialog_buttonscript.h      |    2 +-
 .../layout_item_dialogs/dialog_fieldslist.cc       |    4 +-
 .../layout/layout_item_dialogs/dialog_line.cc      |    4 +-
 .../layout/layout_item_dialogs/dialog_line.h       |    2 +-
 .../layout_item_dialogs/dialog_sortfields.cc       |    4 +-
 .../layout/layout_item_dialogs/dialog_textobject.h |    2 +-
 glom/mode_design/layout/treestore_layout.h         |    2 +-
 .../print_layouts/dialog_text_formatting.cc        |    2 +-
 .../print_layouts/print_layout_toolbar.h           |    2 +-
 .../print_layouts/print_layout_toolbar_button.cc   |    6 +-
 .../print_layouts/print_layout_toolbar_button.h    |    4 +-
 .../print_layouts/window_print_layout_edit.cc      |   96 +++++++-------
 .../print_layouts/window_print_layout_edit.h       |   14 +-
 .../relationships_overview/canvas_group_dbtable.cc |   10 +-
 .../relationships_overview/canvas_group_dbtable.h  |    2 +-
 .../printoperation_relationshipsoverview.cc        |    4 +-
 .../window_relationships_overview.cc               |    2 +-
 .../window_relationships_overview.h                |    8 +-
 .../report_layout/treestore_report_layout.h        |    2 +-
 .../script_library/dialog_new_script.cc            |    2 +-
 .../script_library/dialog_script_library.cc        |    8 +-
 glom/mode_design/translation/combobox_locale.cc    |    2 +-
 .../translation/dialog_change_language.h           |    2 +-
 .../mode_design/translation/window_translations.cc |   20 ++--
 glom/mode_design/users/dialog_choose_user.cc       |    2 +-
 glom/mode_design/users/dialog_groups_list.cc       |    4 +-
 glom/mode_design/users/dialog_new_group.cc         |    2 +-
 glom/mode_design/users/dialog_users_list.cc        |    4 +-
 glom/mode_find/box_data_details_find.cc            |    2 +-
 glom/mode_find/box_data_details_find.h             |    2 +-
 glom/mode_find/box_data_list_find.h                |    2 +-
 glom/mode_find/notebook_find.cc                    |    2 +-
 glom/mode_find/notebook_find.h                     |    4 +-
 glom/navigation/box_tables.cc                      |   20 ++--
 glom/navigation/box_tables.h                       |    4 +-
 glom/notebook_glom.h                               |    2 +-
 glom/print_layout/canvas_layout_item.cc            |   20 ++--
 glom/print_layout/canvas_layout_item.h             |    6 +-
 glom/print_layout/canvas_print_layout.cc           |   72 ++++++------
 glom/print_layout/canvas_print_layout.h            |   20 ++--
 glom/print_layout/print_layout_utils.cc            |   58 +++++-----
 glom/print_layout/printoperation_printlayout.cc    |    4 +-
 glom/python_embed/glom_python.h                    |    4 +-
 glom/signal_reemitter.h                            |    4 +-
 glom/test_pyembed.cc                               |    2 +-
 glom/test_pyembed_singleline.cc                    |    4 +-
 glom/utility_widgets/adddel/adddel_withbuttons.cc  |    2 +-
 glom/utility_widgets/adddel/adddel_withbuttons.h   |    2 +-
 glom/utility_widgets/adddel/treeviewcolumn_glom.h  |    2 +-
 glom/utility_widgets/canvas/canvas_editable.cc     |    2 +-
 glom/utility_widgets/canvas/canvas_editable.h      |    6 +-
 glom/utility_widgets/canvas/canvas_group_grid.cc   |   14 +-
 glom/utility_widgets/canvas/canvas_group_grid.h    |    6 +-
 .../canvas/canvas_group_resizable.cc               |   52 ++++----
 .../canvas/canvas_group_resizable.h                |    6 +-
 .../utility_widgets/canvas/canvas_image_movable.cc |   14 +-
 glom/utility_widgets/canvas/canvas_image_movable.h |    8 +-
 glom/utility_widgets/canvas/canvas_item_movable.cc |   14 +-
 glom/utility_widgets/canvas/canvas_item_movable.h  |    2 +-
 glom/utility_widgets/canvas/canvas_line_movable.cc |    2 +-
 .../utility_widgets/canvas/canvas_table_movable.cc |    6 +-
 glom/utility_widgets/canvas/canvas_table_movable.h |    2 +-
 glom/utility_widgets/canvas/canvas_text_movable.cc |   14 +-
 glom/utility_widgets/canvas/canvas_text_movable.h  |    2 +-
 .../utility_widgets/canvas/test_canvas_editable.cc |   24 ++--
 glom/utility_widgets/combo_textglade.h             |    2 +-
 glom/utility_widgets/dialog_flowtable.cc           |    4 +-
 glom/utility_widgets/dialog_flowtable.h            |    8 +-
 glom/utility_widgets/dialog_image_load_progress.cc |    8 +-
 glom/utility_widgets/dialog_image_save_progress.cc |   10 +-
 .../eggspreadtable/eggplaceholder.h                |    4 +-
 .../eggspreadtable/eggspreadtable.h                |    2 +-
 .../eggspreadtable/eggspreadtablednd.h             |    4 +-
 .../eggspreadtablemm/eggspreadtabledndmm.cc        |    6 +-
 .../eggspreadtablemm/test_spreadtablednd.cc        |   12 +-
 glom/utility_widgets/flowtable.cc                  |   26 ++--
 glom/utility_widgets/flowtable.h                   |    2 +-
 .../gimpruler/libgimpbase/gimpbaseenums.h          |    2 +-
 glom/utility_widgets/imageglom.cc                  |  134 ++++++++++----------
 glom/utility_widgets/imageglom.h                   |   20 ++--
 glom/utility_widgets/layouttoolbar.cc              |   10 +-
 glom/utility_widgets/layouttoolbarbutton.h         |    4 +-
 glom/utility_widgets/layoutwidgetbase.cc           |    8 +-
 glom/utility_widgets/layoutwidgetfield.h           |    2 +-
 glom/utility_widgets/layoutwidgetmenu.cc           |   12 +-
 glom/utility_widgets/layoutwidgetmenu.h            |   10 +-
 glom/utility_widgets/layoutwidgetutils.cc          |   14 +-
 glom/utility_widgets/layoutwidgetutils.h           |   12 +-
 glom/utility_widgets/notebookglom.h                |    4 +-
 glom/utility_widgets/notebooklabelglom.cc          |   10 +-
 glom/utility_widgets/notebooklabelglom.h           |   14 +-
 glom/utility_widgets/placeholder.cc                |    2 +-
 glom/utility_widgets/placeholder.h                 |    2 +-
 glom/utility_widgets/test_flowtable.cc             |    4 +-
 glom/utility_widgets/test_flowtable_dnd.cc         |    6 +-
 glom/utils_ui.cc                                   |   14 +-
 glom/variablesmap.cc                               |   26 ++--
 glom/window_boxholder.cc                           |    2 +-
 glom/window_boxholder.h                            |    2 +-
 tests/export/test_selfhosting_new_then_export.cc   |   10 +-
 ...est_selfhosting_new_then_export_with_big_num.cc |   10 +-
 tests/import/utils.cc                              |    2 +-
 tests/python/test_python_execute_func_date.cc      |    6 +-
 ..._python_execute_func_with_record_field_types.cc |    4 +-
 tests/python/test_python_module.cc                 |   10 +-
 tests/test_document_autosave.cc                    |    2 +-
 tests/test_document_change.cc                      |    4 +-
 tests/test_document_load.cc                        |   52 ++++----
 tests/test_document_load_and_change.cc             |   28 ++--
 tests/test_document_load_and_save.cc               |    4 +-
 tests/test_document_load_image.cc                  |    6 +-
 tests/test_document_load_translations.cc           |   18 ++--
 tests/test_fake_connection.cc                      |    6 +-
 tests/test_selfhosting_new_empty.cc                |    2 +-
 .../test_selfhosting_new_empty_change_sysprefs.cc  |    4 +-
 tests/test_selfhosting_new_empty_then_users.cc     |    4 +-
 tests/test_selfhosting_new_from_example.cc         |   14 +-
 ...t_selfhosting_new_from_example_defaultvalues.cc |   10 +-
 tests/test_selfhosting_new_from_example_float.cc   |   20 ++--
 .../test_selfhosting_new_from_example_operator.cc  |   14 +-
 ...est_selfhosting_new_from_example_strangepath.cc |   12 +-
 ...sting_new_from_example_table_name_with_space.cc |   12 +-
 tests/test_selfhosting_new_then_alter_table.cc     |   10 +-
 tests/test_selfhosting_new_then_backup_restore.cc  |   16 ++--
 tests/test_selfhosting_new_then_change_columns.cc  |   28 ++--
 tests/test_selfhosting_new_then_choices.cc         |   12 +-
 tests/test_selfhosting_new_then_get_privs.cc       |   12 +-
 tests/test_selfhosting_new_then_image.cc           |   20 ++--
 tests/test_selfhosting_new_then_lookup.cc          |   20 ++--
 tests/test_selfhosting_new_then_report.cc          |   10 +-
 tests/test_selfhosting_new_then_report_summary.cc  |   10 +-
 tests/test_selfhosting_non_numeric_primary_keys.cc |   12 +-
 tests/test_selfhosting_sqlinjection.cc             |   44 ++++----
 tests/test_selfhosting_utils.cc                    |   40 +++---
 tests/test_utils.cc                                |    4 +-
 tests/test_utils_images.cc                         |    2 +-
 tests/translations_po/test_document_export_po.cc   |    8 +-
 tests/translations_po/test_document_import_po.cc   |    6 +-
 tests/ui/glade_toplevels_instantiation.cc          |    2 +-
 tests/ui/test_glade_derived_instantiation.cc       |   16 ++--
 tests/ui/test_imageglom_widget.cc                  |    6 +-
 336 files changed, 1655 insertions(+), 1655 deletions(-)
---
diff --git a/glom/application.cc b/glom/application.cc
index d77d146..5be747f 100644
--- a/glom/application.cc
+++ b/glom/application.cc
@@ -60,7 +60,7 @@ void Application::create_window(const Glib::RefPtr<Gio::File>& file)
   //Delete the window when it is hidden:
   window->signal_hide().connect(sigc::bind<Gtk::Window*>(sigc::mem_fun(*this,
     &Application::on_window_hide), window));
-      
+
   Glib::ustring input_uri;
   if(file) //If it's empty then this is a new empty file, as a result of an activation rather than an open.
   {
@@ -113,7 +113,7 @@ void Application::on_open(const Gio::Application::type_vec_files& files,
   const Glib::ustring& hint)
 {
   //std::cout << G_STRFUNC << ": debug\n";
-  
+
   // The application has been asked to open some files,
   // so let's open a new window for each one.
   //std::cout << "debug: files.size()=" << files.size() << std::endl;
@@ -134,7 +134,7 @@ void Application::on_open(const Gio::Application::type_vec_files& files,
 int Application::on_command_line(const Glib::RefPtr<Gio::ApplicationCommandLine>& command_line)
 {
   //std::cout << G_STRFUNC << ": debug\n";
-  
+
   //Parse command-line arguments that were passed either to the main (first) instance
   //or to subsequent instances.
   //Note that this parsing is happening in the main (not remote) instance.
@@ -143,7 +143,7 @@ int Application::on_command_line(const Glib::RefPtr<Gio::ApplicationCommandLine>
 
   Glib::OptionContext context;
   context.set_main_group(m_remote_option_group);
-  
+
   //Note that these options should really be parsed in main(),
   //but we do it here because of glib bug: https://bugzilla.gnome.org/show_bug.cgi?id=634990#c6
   //Handling the two groups together here is possible due to our use of Gio::APPLICATION_NON_UNIQUE .
@@ -169,7 +169,7 @@ int Application::on_command_line(const Glib::RefPtr<Gio::ApplicationCommandLine>
   //Get command-line parameters, if any:
   if(!local_group.handle_options())
     return EXIT_FAILURE;
-    
+
   bool stop = false;
   const auto date_check_ok = local_group.get_debug_date_check_result(stop);
   if(stop)
diff --git a/glom/application.h b/glom/application.h
index 51b8416..e6d1fb5 100644
--- a/glom/application.h
+++ b/glom/application.h
@@ -34,7 +34,7 @@ protected:
 
 public:
   static Glib::RefPtr<Application> create();
-    
+
 protected:
   //Overrides of default signal handlers:
   void on_activate() override;
@@ -47,7 +47,7 @@ private:
   void create_window(const Glib::RefPtr<Gio::File>& file = Glib::RefPtr<Gio::File>());
 
   void on_window_hide(Gtk::Window* window);
-  
+
   RemoteOptionGroup m_remote_option_group;
 };
 
diff --git a/glom/appwindow.cc b/glom/appwindow.cc
index 1828894..12c3d65 100644
--- a/glom/appwindow.cc
+++ b/glom/appwindow.cc
@@ -159,7 +159,7 @@ AppWindow::~AppWindow()
   m_avahi_progress_dialog = nullptr;
 
   #endif // !GLOM_ENABLE_CLIENT_ONLY
-  
+
   delete m_about;
   m_about = nullptr;
 
@@ -195,7 +195,7 @@ void AppWindow::on_connection_avahi_done()
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
 void AppWindow::init()
-{  
+{
   GlomBakery::AppWindow_WithDoc::init(); //Create document and ask to show it in the UI.
   init_layout();
   show();
@@ -428,9 +428,9 @@ void AppWindow::init_menus()
 
   insert_action_group("developer", m_action_group_developer);
 
-  
+
   m_help_action_group = Gio::SimpleActionGroup::create();
- 
+
   m_help_action_group->add_action("about",
     sigc::mem_fun(*this, &AppWindow::on_menu_help_about) );
   m_help_action_group->add_action("contents",
@@ -466,7 +466,7 @@ void AppWindow::on_menu_help_about()
     m_about->set_copyright(_("© 2000-2011 Murray Cumming, Openismus GmbH"));
     const std::vector<Glib::ustring> vecAuthors({"Murray Cumming <murrayc murrayc com>"});
     m_about->set_authors(vecAuthors);
-    
+
     //For some reason this use of the resource:// syntax does not work:
     const char* about_icon_name = "48x48/glom.png";
     //const Glib::ustring glom_icon_path = "resource://" + UiUtils::get_icon_path(about_icon_name);
@@ -1231,10 +1231,10 @@ void AppWindow::update_table_sensitive_ui()
     has_table = !m_frame->get_shown_table_name().empty();
 
   for(const auto& action : m_listTableSensitiveActions)
-  { 
+  {
     bool sensitive = has_table;
 
-    const bool is_developer_item = 
+    const bool is_developer_item =
       (Utils::find_exists(m_listDeveloperActions, action));
     if(is_developer_item)
       sensitive = sensitive && (userlevel == AppState::userlevels::DEVELOPER);
@@ -1284,7 +1284,7 @@ void AppWindow::update_userlevel_ui()
     // Remove the drag layout toolbar
   }
   */
-  
+
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
@@ -1841,7 +1841,7 @@ void AppWindow::fill_menu_tables()
     {
       const auto title = Utils::string_escape_underscores(item_get_title_or_name(table_info));
       const auto action_name = escape_for_action_name(table_info->get_name());
-  
+
       menu->append(title, ACTION_GROUP_NAME_TABLES + "." + action_name);
 
       auto action = m_nav_tables_action_group->add_action(action_name,
@@ -1899,7 +1899,7 @@ void AppWindow::fill_menu_reports(const Glib::ustring& table_name)
       {
         const auto title = Utils::string_escape_underscores(item_get_title_or_name(report));
         const Glib::ustring action_name = report_name;
-  
+
         menu->append(title, ACTION_GROUP_NAME_REPORTS + "." + report_name);
 
         auto action = m_nav_reports_action_group->add_action(action_name,
@@ -1924,7 +1924,7 @@ void AppWindow::enable_menu_print_layouts_details(bool enable)
   //TODO: Suggest a simpler get_actions() method?
   for(const auto& name : m_nav_print_layouts_action_group->list_actions())
   {
-    auto action = 
+    auto action =
       Glib::RefPtr<Gio::SimpleAction>::cast_dynamic(m_nav_print_layouts_action_group->lookup_action(name));
     if(action)
       action->set_enabled(enable);
@@ -2311,7 +2311,7 @@ void AppWindow::on_menu_developer_changelanguage()
   Utils::get_glade_widget_derived_with_warning(dialog);
   if(!dialog) //Unlikely and it already warns on stderr.
     return;
-    
+
   dialog->set_transient_for(*this);
   const auto response = Glom::UiUtils::dialog_run_with_help(dialog);
   dialog->hide();
@@ -2449,7 +2449,7 @@ bool AppWindow::do_restore_backup(const Glib::ustring& backup_uri)
   auto document = std::dynamic_pointer_cast<Document>(get_document());
   if(!document)
     return false;
-    
+
   ShowProgressMessage progress_message(_("Restoring backup"));
   const auto backup_glom_file_contents = Glom::Document::extract_backup_file(
     backup_uri, m_backup_data_filepath,
@@ -2503,7 +2503,7 @@ void AppWindow::document_history_add(const Glib::ustring& file_uri)
 
   //This can sometimes be called for a file that does not yet exist on disk.
   //Avoid warning in RecentManager if that is the case.
-  //For instance, Glom does this when the user chooses a new filename, 
+  //For instance, Glom does this when the user chooses a new filename,
   //but before Glom has enough information to save a useful file.
   if(!file_exists(file_uri))
     return;
@@ -2625,7 +2625,7 @@ void AppWindow::set_progress_message(const Glib::ustring& message)
 
   // Pulse the progress bar regardless of whether the message is new or not.
   m_infobar_progress->pulse();
-  
+
   //Block interaction with the rest of the UI.
   if(m_menubar)
     m_menubar->set_sensitive(false);
@@ -2671,7 +2671,7 @@ Glib::ustring AppWindow::get_original_locale()
   if(m_original_locale.empty())
     m_original_locale = "en";
 
-  return m_original_locale; 
+  return m_original_locale;
 }
 
 bool AppWindow::get_current_locale_not_original()
@@ -2727,7 +2727,7 @@ void AppWindow::on_hide()
 
 void AppWindow::ui_hide()
 {
-  hide();  
+  hide();
 }
 
 void AppWindow::ui_bring_to_front()
@@ -2738,7 +2738,7 @@ void AppWindow::ui_bring_to_front()
 void AppWindow::init_menus_edit()
 {
   //Edit menu
-  
+
   //Build actions:
   m_action_group_edit = Gio::SimpleActionGroup::create();
 
@@ -2839,7 +2839,7 @@ AppWindow::enumSaveChanges AppWindow::ui_offer_to_save_changes()
   if(!m_document)
     return result;
 
-  GlomBakery::Dialog_OfferSave* pDialogQuestion 
+  GlomBakery::Dialog_OfferSave* pDialogQuestion
     = new GlomBakery::Dialog_OfferSave( m_document->get_file_uri() );
 
   Gtk::Window* pWindow = this;
@@ -2890,7 +2890,7 @@ void AppWindow::on_menu_edit_copy_activate()
     auto buffer = textview->get_buffer();
     if(buffer)
     {
-      auto clipboard = 
+      auto clipboard =
         Gtk::Clipboard::get_for_display(get_display());
       buffer->copy_clipboard(clipboard);
     }
@@ -2916,7 +2916,7 @@ void AppWindow::on_menu_edit_cut_activate()
     auto buffer = textview->get_buffer();
     if(buffer)
     {
-      auto clipboard = 
+      auto clipboard =
         Gtk::Clipboard::get_for_display(get_display());
       buffer->cut_clipboard(clipboard, textview->get_editable());
     }
@@ -2942,7 +2942,7 @@ void AppWindow::on_menu_edit_paste_activate()
     auto buffer = textview->get_buffer();
     if(buffer)
     {
-      auto clipboard = 
+      auto clipboard =
         Gtk::Clipboard::get_for_display(get_display());
       buffer->paste_clipboard(clipboard);
     }
diff --git a/glom/appwindow.h b/glom/appwindow.h
index cbbac86..994a3d0 100644
--- a/glom/appwindow.h
+++ b/glom/appwindow.h
@@ -145,8 +145,8 @@ public:
   void pulse_progress_message();
   void clear_progress_message();
 
-  /** Set the locale used for original text of titles. This 
-   * must usually be stored in the document. 
+  /** Set the locale used for original text of titles. This
+   * must usually be stored in the document.
    * Ideally, it would be English.
    */
   static void set_original_locale(const Glib::ustring& locale);
@@ -308,7 +308,7 @@ private:
 
   Gtk::Box* m_box_top;
   Frame_Glom* m_frame;
-  
+
   bool m_about_shown;
   Gtk::AboutDialog* m_about; //About box.
 
diff --git a/glom/bakery/appwindow.cc b/glom/bakery/appwindow.cc
index c5f5887..32d26a7 100644
--- a/glom/bakery/appwindow.cc
+++ b/glom/bakery/appwindow.cc
@@ -75,17 +75,17 @@ void AppWindow::on_menu_edit_cut()
 
 void AppWindow::on_menu_edit_copy()
 {
-  
+
 }
 
 void AppWindow::on_menu_edit_paste()
 {
-  
+
 }
 
 void AppWindow::on_menu_edit_clear()
 {
-  
+
 }
 
 void AppWindow::set_operation_cancelled(bool value /* = true */)
diff --git a/glom/bakery/appwindow.h b/glom/bakery/appwindow.h
index 656507f..d7fecad 100644
--- a/glom/bakery/appwindow.h
+++ b/glom/bakery/appwindow.h
@@ -34,7 +34,7 @@ namespace GlomBakery
  * - Override methods to add/change menus/toolbars/statusbar.
  *   - Default is basic File, Edit, Help menus and toolbar icons.
  *
- 
+
  *
  * TODO:
  * - Command-line args - wrap popt?
@@ -72,17 +72,17 @@ protected:
   virtual void init_menus_file() = 0;
 
   /** Call this from init_menus() to add the standard edit menu
-   */ 
+   */
   virtual void init_menus_edit() = 0;
-  
+
   virtual void new_instance(const Glib::ustring& uri = Glib::ustring()) = 0; //Must override in order to 
new() the derived document class.
 
 //  virtual void close_window() = 0;
 //  virtual void bring_to_front() = 0;
   //Signal handlers:
 
-public: // We can not take function pointers of these methods in a 
-        // derived class, if they are protected - for instance, with sigc::mem_fun() 
+public: // We can not take function pointers of these methods in a
+        // derived class, if they are protected - for instance, with sigc::mem_fun()
   //Menus:
   virtual void on_menu_file_new();
   virtual void on_menu_file_close();
@@ -102,12 +102,12 @@ protected:
 
   //operation_cancelled:
   //e.g. A File|Open tries to save existing data,
-  //but this needs to be cancelled if the save failed. 
+  //but this needs to be cancelled if the save failed.
   static void set_operation_cancelled(bool value = true);
   static bool get_operation_cancelled();
 
   //Member data:
-  
+
   //'About Box'/WM Class information:
   static Glib::ustring m_strAppName;
 
diff --git a/glom/bakery/appwindow_withdoc.h b/glom/bakery/appwindow_withdoc.h
index 74d4ced..8e30e8d 100644
--- a/glom/bakery/appwindow_withdoc.h
+++ b/glom/bakery/appwindow_withdoc.h
@@ -29,7 +29,7 @@ namespace GlomBakery
  *
  * This is an abstract class. You must use a class such as AppWindow_WithDoc_Gtk, which implements
  * the ui_* methods for a particular GUI toolkit.
- 
+
  * Features:
  * - 1 document per application instance. Uses Document-derived class polymorphically.
  * - Override init_create_document() to create new blank document.
@@ -54,7 +54,7 @@ namespace GlomBakery
  */
 class AppWindow_WithDoc : public AppWindow
 {
-public: 
+public:
   ///Don't forget to call init() too.
   explicit AppWindow_WithDoc(const Glib::ustring& appname = ""); //TODO: appname when using 
get_derived_widget()
 
@@ -108,7 +108,7 @@ protected:
   virtual void document_history_remove(const Glib::ustring& file_uri);
 
 public:
-  // We can not take function pointers of these methods in 
+  // We can not take function pointers of these methods in
   // a derived class if they are protected - for instance, with sigc::mem_fun()
   //Signal handlers:
 
@@ -131,7 +131,7 @@ protected:
 
   ///override this to show document contents.
   virtual bool on_document_load();
-  
+
   ///override this to do extra cleanup.
   virtual void on_document_close();
 
@@ -147,7 +147,7 @@ protected:
   virtual void ui_warning(const Glib::ustring& text, const Glib::ustring& secondary_text) = 0;
 
   /** Warn the user about a failure while loading a document.
-   * Override this to show a specific message in response to your application's 
+   * Override this to show a specific message in response to your application's
    * custom @a failure_code.
    */
   virtual void ui_warning_load_failed(int failure_code = 0);
diff --git a/glom/bakery/busy_cursor.h b/glom/bakery/busy_cursor.h
index a345a23..20752ba 100644
--- a/glom/bakery/busy_cursor.h
+++ b/glom/bakery/busy_cursor.h
@@ -28,7 +28,7 @@ namespace Glom
 
 /** Changes the cursor for as long as this instance lives.
  * For instance, put it at the start of code in a { and } block.
- */ 
+ */
 class BusyCursor
 {
 public:
diff --git a/glom/bakery/dialog_offersave.cc b/glom/bakery/dialog_offersave.cc
index f746c9d..63d50be 100644
--- a/glom/bakery/dialog_offersave.cc
+++ b/glom/bakery/dialog_offersave.cc
@@ -21,7 +21,7 @@
 #include <glom/bakery/dialog_offersave.h>
 #include <glom/appwindow.h>
 #include <libglom/utils.h>
-#include <glibmm/convert.h> 
+#include <glibmm/convert.h>
 #include <glibmm/i18n.h>
 
 namespace
@@ -50,7 +50,7 @@ Dialog_OfferSave::Dialog_OfferSave(const Glib::ustring& file_uri)
 : Gtk::MessageDialog( Glom::AppWindow::util_bold_message(_("Close without Saving")), true /* use markup */, 
Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_NONE)
 {
   set_title(""); //The HIG says that alert dialogs should not have titles. The default comes from the 
message type.
-  
+
   set_secondary_text(get_confirmation_message(file_uri));
 
   add_button(_("Discard"), Glom::Utils::to_utype(enumButtons::Discard));
diff --git a/glom/base_db.cc b/glom/base_db.cc
index 9571e7e..b708d78 100644
--- a/glom/base_db.cc
+++ b/glom/base_db.cc
@@ -742,10 +742,10 @@ bool Base_DB::set_field_value_in_database(const LayoutFieldInRecord& layoutfield
   const auto field_name = field_in_record.m_field->get_name();
   if(!field_name.empty()) //This should not happen.
   {
-    const Gnome::Gda::SqlExpr where_clause = 
+    const Gnome::Gda::SqlExpr where_clause =
       SqlUtils::build_simple_where_expression(field_in_record.m_table_name,
         field_in_record.m_key, field_in_record.m_key_value);
-    const Glib::RefPtr<const Gnome::Gda::SqlBuilder> builder = 
+    const Glib::RefPtr<const Gnome::Gda::SqlBuilder> builder =
       SqlUtils::build_sql_update_with_where_clause(field_in_record.m_table_name,
         field_in_record.m_field, field_value, where_clause);
 
@@ -810,14 +810,14 @@ Gnome::Gda::Value Base_DB::get_field_value_in_database(const LayoutFieldInRecord
     {
       to_field = field_in_record.m_field->get_relationship()->get_to_field();
     }
-      
+
     if(!to_field.empty())
     {
       std::cerr << G_STRFUNC << ": field_in_record.m_key is empty.\n";
       return result;
     }
   }
-  
+
 
   type_vecConstLayoutFields list_fields;
   auto layout_item = field_in_record.m_field;
diff --git a/glom/base_db_table.h b/glom/base_db_table.h
index 35a08b3..7fc8d14 100644
--- a/glom/base_db_table.h
+++ b/glom/base_db_table.h
@@ -28,19 +28,19 @@
 namespace Glom
 {
 
-/** A base class that is a Bakery View with some database functionality 
+/** A base class that is a Bakery View with some database functionality
  * for use with a specific database table.
  */
 class Base_DB_Table : public Base_DB
 {
-public: 
+public:
   Base_DB_Table();
 
   bool init_db_details(const Glib::ustring& table_name);
 
   Glib::ustring get_table_name() const;
 
-protected:    
+protected:
   Glib::ustring m_table_name;
 };
 
diff --git a/glom/base_db_table_data.cc b/glom/base_db_table_data.cc
index 7a9837a..80092fb 100644
--- a/glom/base_db_table_data.cc
+++ b/glom/base_db_table_data.cc
@@ -105,7 +105,7 @@ bool Base_DB_Table_Data::record_new(bool use_entered_data, const Gnome::Gda::Val
         const auto field = layout_item->get_full_field_details();
         if(!field)
           continue;
-        
+
         //Use the specified (generated) primary key value, if there is one:
         if(primary_key_name == field_name && !Conversions::value_is_empty(primary_key_value))
         {
@@ -154,7 +154,7 @@ bool Base_DB_Table_Data::record_new(bool use_entered_data, const Gnome::Gda::Val
         //Use auto-increment values:
         if(field->get_auto_increment() && Conversions::value_is_empty(value))
         {
-          value = 
+          value =
             DbUtils::get_next_auto_increment_value(m_table_name, field->get_name());
         }
 
diff --git a/glom/box_db_table.h b/glom/box_db_table.h
index 35d0545..e120915 100644
--- a/glom/box_db_table.h
+++ b/glom/box_db_table.h
@@ -36,7 +36,7 @@ class Box_DB_Table
 : public Box_WithButtons,
   public Base_DB_Table
 {
-public: 
+public:
   Box_DB_Table();
   Box_DB_Table(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
 
diff --git a/glom/box_withbuttons.cc b/glom/box_withbuttons.cc
index 7de4648..5187fad 100644
--- a/glom/box_withbuttons.cc
+++ b/glom/box_withbuttons.cc
@@ -77,7 +77,7 @@ const Gtk::Window* Box_WithButtons::get_app_window() const
   auto nonconst = const_cast<Box_WithButtons*>(this);
   return nonconst->get_app_window();
 }
-  
+
 Gtk::Window* Box_WithButtons::get_app_window()
 {
   return dynamic_cast<Gtk::Window*>(get_toplevel());
diff --git a/glom/box_withbuttons.h b/glom/box_withbuttons.h
index cadab19..c990846 100644
--- a/glom/box_withbuttons.h
+++ b/glom/box_withbuttons.h
@@ -33,14 +33,14 @@
 namespace Glom
 {
 
-/** A Gtk::Box base widget class, 
- * with some extra signals to allow derived classes to be used generically in 
+/** A Gtk::Box base widget class,
+ * with some extra signals to allow derived classes to be used generically in
  * Window_BoxHolder, allowing the dialog to respond to buttons in the box.
  */
 class Box_WithButtons :
   public Gtk::Box
 {
-public: 
+public:
   Box_WithButtons();
 
   Box_WithButtons(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
diff --git a/glom/dialog_connection.cc b/glom/dialog_connection.cc
index d8e75c4..b386e85 100644
--- a/glom/dialog_connection.cc
+++ b/glom/dialog_connection.cc
@@ -63,7 +63,7 @@ std::shared_ptr<SharedConnection> Dialog_Connection::connect_to_server_with_conn
 
   auto connection_pool = ConnectionPool::get_instance();
   g_assert(connection_pool);
-  
+
   //Set the connection details in the ConnectionPool singleton.
   //The ConnectionPool will now use these every time it tries to connect.
 
@@ -92,7 +92,7 @@ std::shared_ptr<SharedConnection> Dialog_Connection::connect_to_server_with_conn
   result = Base_DB::connect_to_server(const_cast<Dialog_Connection*>(this));
 
 #ifdef GLOM_ENABLE_POSTGRESQL
-  //Remember the port, 
+  //Remember the port,
   //to make opening faster next time,
   //and so we can tell connecting clients (using browse network) what port to use:
   auto unconst = std::const_pointer_cast<Document>(document);
@@ -120,9 +120,9 @@ std::shared_ptr<SharedConnection> Dialog_Connection::connect_to_server_with_conn
     unconst->set_connection_try_other_ports(false);
   }
 #endif //GLOM_ENABLE_CLIENT_ONLY
- 
+
 #endif //GLOM_ENABLE_POSTGRESQL
- 
+
   return result;
 }
 
@@ -146,7 +146,7 @@ void Dialog_Connection::load_from_document()
       Glib::ustring host = document->get_connection_server();
       if(host.empty())
         host = "localhost";
-     
+
       m_entry_host->set_text(host);
       m_entry_host->set_sensitive(true);
     }
@@ -156,7 +156,7 @@ void Dialog_Connection::load_from_document()
     if(user.empty())
     {
       //Default to the UNIX user name, which is often the same as the Postgres user name:
-      const auto pchUser = getenv("USER"); 
+      const auto pchUser = getenv("USER");
       if(pchUser)
         user = pchUser;
     }
diff --git a/glom/dialog_connection.h b/glom/dialog_connection.h
index 427e3e6..a8d3bb8 100644
--- a/glom/dialog_connection.h
+++ b/glom/dialog_connection.h
@@ -46,8 +46,8 @@ public:
   ///Disable irrelevant fields:
   void set_connect_to_browsed();
 
-  /** Change the main message text of the dialog, so we can use the dialog 
-   * to confirm that the user knows a password before disconnecting, when 
+  /** Change the main message text of the dialog, so we can use the dialog
+   * to confirm that the user knows a password before disconnecting, when
    * switching to network sharing.
    */
   void set_confirm_existing_user_note();
diff --git a/glom/dialog_existing_or_new.cc b/glom/dialog_existing_or_new.cc
index 490d0bf..b67d114 100644
--- a/glom/dialog_existing_or_new.cc
+++ b/glom/dialog_existing_or_new.cc
@@ -198,7 +198,7 @@ Dialog_ExistingOrNew::Dialog_ExistingOrNew(BaseObjectType* cobject, const Glib::
 #endif
 
   m_select_button->signal_clicked().connect(sigc::mem_fun(*this, &Dialog_ExistingOrNew::on_select_clicked));
- 
+
 #ifndef GLOM_ENABLE_CLIENT_ONLY
   m_notebook->signal_switch_page().connect(sigc::mem_fun(*this, &Dialog_ExistingOrNew::on_switch_page));
 #endif /* !GLOM_ENABLE_CLIENT_ONLY */
@@ -262,7 +262,7 @@ bool Dialog_ExistingOrNew::list_examples()
   {
     const char* examples_dir = "/org/gnome/glom/examples/";
     const auto examples = Gio::Resource::enumerate_children_global(examples_dir);
-    
+
     bool example_found = false;
     for(const auto& example_name : examples)
     {
@@ -641,7 +641,7 @@ Glib::ustring Dialog_ExistingOrNew::get_title_from_example(const std::string& re
   {
     auto stream =
       Gio::Resource::open_stream_global(resource_name);
-    
+
     //TODO: Really do this asynchronously?
     m_current_buffer.reset(new buffer);
     const auto bytes_read = stream->read(m_current_buffer->buf, buffer::SIZE);
diff --git a/glom/dialog_existing_or_new.h b/glom/dialog_existing_or_new.h
index 80a0ee3..bb5fcfc 100644
--- a/glom/dialog_existing_or_new.h
+++ b/glom/dialog_existing_or_new.h
@@ -92,12 +92,12 @@ private:
   bool on_new_select_func(const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::Path& path, bool 
path_currently_selected);
   void on_new_row_activated(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* column);
 
-  
+
   bool list_examples();
   Glib::ustring get_title_from_example(const std::string& resource_name);
   void append_example(const Glib::ustring& title, const std::string& resource_name);
 #endif /* !GLOM_ENABLE_CLIENT_ONLY */
-    
+
 #ifndef G_OS_WIN32
   static void on_service_found_static(EpcServiceMonitor* monitor, gchar* name, EpcServiceInfo* info, 
gpointer user_data);
   static void on_service_removed_static(EpcServiceMonitor* monitor, gchar* name, gchar* type, gpointer 
user_data);
@@ -108,8 +108,8 @@ private:
 
   void on_existing_row_activated(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* column);
   void on_select_clicked();
-  
-  
+
+
   Gtk::Notebook* m_notebook;
   Gtk::Button* m_select_button;
 
@@ -142,7 +142,7 @@ private:
     // For recently used resources:
     Gtk::TreeModelColumn< Glib::RefPtr<Gtk::RecentInfo> > m_col_recent_info;
   };
-  
+
 
   ExistingModelColumns m_existing_columns;
   Glib::RefPtr<Gtk::TreeStore> m_existing_model;
@@ -159,11 +159,11 @@ private:
     Gtk::TreeModelColumn<Glib::ustring> m_col_title;
     Gtk::TreeModelColumn<Glib::ustring> m_col_template_uri;
   };
-  
+
   NewModelColumns m_new_columns;
   Gtk::TreeView* m_new_view;
   Glib::RefPtr<Gtk::TreeStore> m_new_model;
-  
+
   Gtk::TreeViewColumn m_new_column_title;
   Gtk::TreeViewColumn m_new_column_button;
   Gtk::CellRendererPixbuf m_new_icon_renderer;
@@ -184,7 +184,7 @@ private:
   Gtk::TreeModel::iterator m_iter_existing_network;
 #endif
   Gtk::TreeModel::iterator m_iter_existing_other;
- 
+
   // Dummy children to indicate that a parent item has no (real) children
 #ifndef G_OS_WIN32
   std::shared_ptr<Gtk::TreeModel::iterator> m_iter_existing_network_dummy;
@@ -196,7 +196,7 @@ private:
   struct buffer { static const guint SIZE = 1024; char buf[SIZE]; };
   std::shared_ptr<buffer> m_current_buffer;
 #endif /* !GLOM_ENABLE_CLIENT_ONLY */
-    
+
 #ifndef G_OS_WIN32
   EpcServiceMonitor* m_service_monitor;
 #endif
diff --git a/glom/dialog_invalid_data.cc b/glom/dialog_invalid_data.cc
index 2c32043..0fb7baf 100644
--- a/glom/dialog_invalid_data.cc
+++ b/glom/dialog_invalid_data.cc
@@ -17,7 +17,7 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  */
- 
+
 #include "dialog_invalid_data.h"
 #include <libglom/data_structure/glomconversions.h>
 #include <glom/utils_ui.h>
@@ -38,11 +38,11 @@ bool glom_show_dialog_invalid_data(Field::glom_field_type glom_type)
   Utils::get_glade_widget_derived_with_warning(dialog);
   if(!dialog) //Unlikely and it already warns on stderr.
     return false;
-    
+
   dialog->set_example_data(glom_type);
   //dialog->set_transient_for(*this);
   const auto response = Glom::UiUtils::dialog_run_with_help(dialog);
-  
+
   delete dialog;
   return (response == 2); //The glade file has a response of 2 for the Revert button.
 }
diff --git a/glom/filechooser_export.cc b/glom/filechooser_export.cc
index 84f6c2d..1b7e340 100644
--- a/glom/filechooser_export.cc
+++ b/glom/filechooser_export.cc
@@ -57,7 +57,7 @@ FileChooser_Export::FileChooser_Export()
   Utils::get_glade_widget_derived_with_warning(dialog);
   if(!dialog)
     return;
-  
+
   m_dialog_layout = dialog;
   //add_view(m_dialog_layout); //Give it access to the document.
   m_dialog_layout->signal_hide().connect( sigc::mem_fun(*this, &FileChooser_Export::on_dialog_layout_hide) );
@@ -81,7 +81,7 @@ void FileChooser_Export::set_export_layout(const Document::type_list_const_layou
     std::cerr << G_STRFUNC << ": FileChooser_Export::set_export_layout() document is NULL.\n";
 }
 
-//We only allow a full export in client-only mode, 
+//We only allow a full export in client-only mode,
 //to avoid building a large part of the layout definition code.
 #ifndef GLOM_ENABLE_CLIENT_ONLY
 void FileChooser_Export::on_button_define_layout()
diff --git a/glom/filechooser_export.h b/glom/filechooser_export.h
index 8c7d931..53ac9d4 100644
--- a/glom/filechooser_export.h
+++ b/glom/filechooser_export.h
@@ -32,7 +32,7 @@ class Dialog_Layout_Export;
 class FileChooser_Export :
   public Gtk::FileChooserDialog
 {
-public: 
+public:
   FileChooser_Export();
   virtual ~FileChooser_Export();
 
diff --git a/glom/frame_glom.cc b/glom/frame_glom.cc
index 1ab8347..e85abd3 100644
--- a/glom/frame_glom.cc
+++ b/glom/frame_glom.cc
@@ -397,7 +397,7 @@ void Frame_Glom::show_table_allow_empty(const Glib::ustring& table_name, const G
           int count = 0;
           if(table_privs.m_view) //Avoid the query if the user does not have view rights, because it would 
fail.
             count = DbUtils::count_rows_returned_by(sql_query_without_sort);
-            
+
           if(count < 10000) //Arbitrary large number.
             found_set.m_sort_clause.emplace_back( SqlUtils::type_pair_sort_field(layout_item_sort, true /* 
ascending */) );
         }
@@ -527,7 +527,7 @@ bool Frame_Glom::attempt_change_usermode_to_operator()
   auto document = std::dynamic_pointer_cast<Document>(get_document());
   if(!document)
     return false;
-    
+
   document->set_userlevel(AppState::userlevels::OPERATOR);
 
   return true;
@@ -1189,7 +1189,7 @@ void Frame_Glom::on_notebook_find_criteria(const Gnome::Gda::SqlExpr& where_clau
   const auto quickfind_criteria = m_entry_quick_find->get_text();
   if(!quickfind_criteria.empty())
   {
-    where_clause_to_use = 
+    where_clause_to_use =
       SqlUtils::get_find_where_clause_quick(get_document(), m_table_name, 
Gnome::Gda::Value(quickfind_criteria));
   }
 
@@ -1206,7 +1206,7 @@ void Frame_Glom::on_notebook_find_criteria(const Gnome::Gda::SqlExpr& where_clau
   }
 
   //std::cout << "debug: " << G_STRFUNC << ": " << where_clause << std::endl;
-  
+
 
   //Try to find some records with the where_clause:
   bool records_found = false;
@@ -1294,7 +1294,7 @@ void Frame_Glom::update_table_in_document_from_database()
   if(fieldsDatabase.empty())
   {
     std::cerr << G_STRFUNC << ": Could not get the list of fields for table=" << m_table_name <<
-      " from the database. This might be due to insufficient database user rights." << 
+      " from the database. This might be due to insufficient database user rights." <<
       " Falling back to the field details in the document.\n";
   }
 
@@ -1405,7 +1405,7 @@ void Frame_Glom::on_menu_developer_database_preferences()
   Utils::get_glade_widget_derived_with_warning(dialog);
   if(!dialog) //Unlikely and it already warns on stderr.
     return;
-        
+
   dialog->set_transient_for(*(get_app_window()));
   add_view(dialog);
   dialog->load_from_document();
@@ -1500,7 +1500,7 @@ void Frame_Glom::do_menu_developer_relationships(Gtk::Window& parent, const Glib
       std::cerr << G_STRFUNC << ": m_dialog_relationships is null.\n";
       return;
     }
-    
+
     m_dialog_relationships->set_title("Relationships");
     m_dialog_relationships->signal_hide().connect( sigc::mem_fun(*this, 
&Frame_Glom::on_developer_dialog_hide));
     add_view(m_dialog_relationships); //Also a composite view.
@@ -1528,7 +1528,7 @@ void Frame_Glom::on_menu_developer_users()
   Utils::get_glade_widget_derived_with_warning(dialog);
   if(!dialog) //Unlikely and it already warns on stderr.
     return;
-    
+
   dialog->set_transient_for(*get_app_window());
 
   add_view(dialog); //Give it access to the document.
@@ -1636,7 +1636,7 @@ void Frame_Glom::on_menu_developer_script_library()
   Utils::get_glade_widget_derived_with_warning(dialog);
   if(!dialog) //Unlikely and it already warns on stderr.
     return;
-    
+
   dialog->set_transient_for(*(get_app_window()));
   add_view(dialog); //Give it access to the document.
   dialog->load_from_document();
@@ -1963,7 +1963,7 @@ bool Frame_Glom::connection_request_password_and_choose_new_database_name()
 
         //m_dialog_connection->load_from_document(); //Get good defaults.
         // No authentication required
-        
+
         break;
       }
   #endif //GLOM_ENABLE_SQLITE
@@ -2264,13 +2264,13 @@ void Frame_Glom::on_menu_report_selected(const Glib::ustring& report_name)
   //TODO: Find a way to get a full locale name from the simplified locale name from 
AppWindow::get_current_locale():
   ReportBuilder report_builder(std::locale("") /* the user's current locale */);
   report_builder.set_document(document);
-  const auto filepath = 
+  const auto filepath =
     report_builder.report_build_and_save(found_set, report); //TODO: Use found set's where_clause.
   UiUtils::show_report_in_browser(filepath, get_app_window());
 }
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
- 
+
 void Frame_Glom::on_menu_print_layout_selected(const Glib::ustring& print_layout_name)
 {
   do_print_layout(print_layout_name, false /* not preview */, get_app_window());
@@ -2280,7 +2280,7 @@ void Frame_Glom::do_print_layout(const Glib::ustring& print_layout_name, bool pr
 {
   const auto document = get_document();
   auto print_layout = document->get_print_layout(m_table_name, print_layout_name);
-    
+
   const auto table_privs = Privs::get_current_privs(m_table_name);
 
   //Don't try to print tables that the user can't view.
@@ -2289,17 +2289,17 @@ void Frame_Glom::do_print_layout(const Glib::ustring& print_layout_name, bool pr
     //TODO: Warn the user.
     return;
   }
-  
+
   //TODO: When expanding items, avoid the page gaps that the print layout's design
-  //has added.  
+  //has added.
   const auto found_set = m_notebook_data.get_found_set_selected();
   //Note that found_set.m_where_clause could be empty if there are no records yet,
-  //and that is acceptable if this is for a print preview while designing the print layout. 
-  
-  PrintLayoutUtils::do_print_layout(print_layout, found_set, 
+  //and that is acceptable if this is for a print preview while designing the print layout.
+
+  PrintLayoutUtils::do_print_layout(print_layout, found_set,
     preview, document, false /* do not avoid print margins */, transient_for);
 }
- 
+
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
@@ -2394,10 +2394,10 @@ void Frame_Glom::on_notebook_data_record_selection_changed()
   const auto found_set = m_notebook_data.get_found_set_selected();
   if(!found_set.m_where_clause.empty())
     something_selected = true;
-  
+
   auto pApp = dynamic_cast<AppWindow*>(get_app_window());
   if(pApp)
-    pApp->enable_menu_print_layouts_details(something_selected);  
+    pApp->enable_menu_print_layouts_details(something_selected);
 }
 
 namespace {
diff --git a/glom/frame_glom.h b/glom/frame_glom.h
index 5227f9d..b245b26 100644
--- a/glom/frame_glom.h
+++ b/glom/frame_glom.h
@@ -95,7 +95,7 @@ public:
    * It is up to the caller to indicate in the menu that find mode is not active.
    */
   void set_mode_data();
-  
+
   void on_menu_add_record();
 
   void on_menu_report_selected(const Glib::ustring& report_name);
@@ -166,7 +166,7 @@ public:
 
   ///Create the database for new documents, showing the Connection dialog
   bool create_database(const Glib::ustring& database_name, const Glib::ustring& title);
-  
+
   void set_enable_layout_drag_and_drop(bool enable = true);
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
diff --git a/glom/glade_utils.h b/glom/glade_utils.h
index 77e2daa..5364077 100644
--- a/glom/glade_utils.h
+++ b/glom/glade_utils.h
@@ -99,8 +99,8 @@ Glib::RefPtr<Gtk::Builder> get_glade_child_widget_derived_with_warning(T_Widget*
   // TODO: Should we use build_filename()?
   const auto filename = Glib::build_filename(
       (T_Widget::glade_developer ? "developer" : "operator"),
-      std::string(T_Widget::glade_id) + ".glade"); 
-  
+      std::string(T_Widget::glade_id) + ".glade");
+
   return helper_get_glade_widget_derived_with_warning(filename, T_Widget::glade_id, widget, false /* load 
just this */);
 }
 
@@ -132,8 +132,8 @@ void get_glade_widget_derived_with_warning(T_Widget*& widget)
   // The id is the same as the filename, in a developer/operator sub-directory:
   const auto filename = Glib::build_filename(
       (T_Widget::glade_developer ? "developer" : "operator"),
-      std::string(T_Widget::glade_id) + ".glade"); 
-  
+      std::string(T_Widget::glade_id) + ".glade");
+
   helper_get_glade_widget_derived_with_warning(filename, T_Widget::glade_id, widget, true /* load_all */);
 }
 
diff --git a/glom/glom_create_from_example.cc b/glom/glom_create_from_example.cc
index ee36499..6146b9f 100644
--- a/glom/glom_create_from_example.cc
+++ b/glom/glom_create_from_example.cc
@@ -58,7 +58,7 @@ public:
   std::string m_arg_filepath_dir_output;
   std::string m_arg_filepath_name_output;
   bool m_arg_version;
-  
+
   //If not using self-hosting:
   Glib::ustring m_arg_server_hostname;
   double m_arg_server_port;
@@ -84,12 +84,12 @@ GlomCreateOptionGroup::GlomCreateOptionGroup()
   entry.set_short_name('i');
   entry.set_description(_("The example .glom file to open."));
   add_entry_filename(entry, m_arg_filename_input);
-  
+
   entry.set_long_name("output-path");
   entry.set_short_name('o');
   entry.set_description(_("The directory in which to save the created .glom file, or sub-directory if 
necessary, such as /home/someuser/ ."));
   add_entry_filename(entry, m_arg_filepath_dir_output);
-  
+
   entry.set_long_name("output-name");
   entry.set_short_name('n');
   entry.set_description(_("The name for the created .glom file, such as something.glom ."));
@@ -105,12 +105,12 @@ GlomCreateOptionGroup::GlomCreateOptionGroup()
   entry.set_short_name('h');
   entry.set_description(_("The hostname of the PostgreSQL server, such as localhost. If this is not 
specified then a self-hosted database will be created."));
   add_entry(entry, m_arg_server_hostname);
-  
+
   entry.set_long_name("server-port");
   entry.set_short_name('p');
   entry.set_description(_("The port of the PostgreSQL server, such as 5434."));
   add_entry(entry, m_arg_server_port);
-  
+
   entry.set_long_name("server-username");
   entry.set_short_name('u');
   entry.set_description(_("The username for the PostgreSQL server."));
@@ -244,13 +244,13 @@ int main(int argc, char* argv[])
     std::cerr << G_STRFUNC << ":   This can happen if the locale is not properly installed or configured.\n";
   }
 
-  
+
   Glom::libglom_init();
-  
+
   Glib::OptionContext context;
   GlomCreateOptionGroup group;
   context.set_main_group(group);
-  
+
   try
   {
     context.parse(argc, argv);
@@ -284,7 +284,7 @@ int main(int argc, char* argv[])
      if(pch)
        input_uri = pch;
   }
-  
+
   if(!input_uri.empty())
   {
     //Get a URI (file://something) from the filepath:
@@ -310,7 +310,7 @@ int main(int argc, char* argv[])
     input_uri = file->get_uri();
 
   }
-  
+
   if(input_uri.empty())
   {
     std::cerr << G_STRFUNC << ": Please specify a glom example file.\n";
@@ -319,7 +319,7 @@ int main(int argc, char* argv[])
   }
 
 
-  //Check the output directory path: 
+  //Check the output directory path:
   if(group.m_arg_filepath_dir_output.empty())
   {
     std::cerr << G_STRFUNC << ": Please specify an output directory path.\n";
@@ -348,8 +348,8 @@ int main(int argc, char* argv[])
       return EXIT_FAILURE;
     }
   }
-  
-  //Check the output name path: 
+
+  //Check the output name path:
   if(group.m_arg_filepath_name_output.empty())
   {
     std::cerr << G_STRFUNC << ": Please specify an output name.\n";
@@ -376,7 +376,7 @@ int main(int argc, char* argv[])
   auto connection_pool = Glom::ConnectionPool::get_instance();
 
   //Save a copy, specifying the path to file in a directory:
-  filepath_dir = 
+  filepath_dir =
     Glom::FileUtils::get_file_path_without_extension(
       Glib::build_filename(
         group.m_arg_filepath_dir_output,
@@ -389,7 +389,7 @@ int main(int argc, char* argv[])
     const auto uri = convert_filepath_to_uri(filepath_dir);
     if(uri.empty())
       return EXIT_FAILURE;
-        
+
     auto file = Gio::File::create_for_commandline_arg(uri);
     if(file->query_exists())
     {
@@ -432,7 +432,7 @@ int main(int argc, char* argv[])
       document->set_hosting_mode(Glom::Document::HostingMode::POSTGRES_CENTRAL);
     }
   }
-   
+
   document->set_is_example_file(false);
   document->set_network_shared(false);
   const auto saved = document->save();
@@ -468,13 +468,13 @@ int main(int argc, char* argv[])
     //Central hosting:
     connection_pool->set_user(group.m_arg_server_username);
     connection_pool->set_password(password); //TODO: Take this from stdin instead.
-    
+
     auto backend = connection_pool->get_backend();
     auto central = std::dynamic_pointer_cast<Glom::ConnectionPoolBackends::PostgresCentralHosted>(backend);
     g_assert(central);
 
     central->set_host(group.m_arg_server_hostname);
-    
+
     if(group.m_arg_server_port)
     {
       central->set_port(group.m_arg_server_port);
@@ -485,7 +485,7 @@ int main(int argc, char* argv[])
       //Try all ports:
       central->set_try_other_ports(false);
     }
-    
+
     const Glib::ustring database_name =
       Glom::DbUtils::get_unused_database_name(document->get_connection_database());
     if(database_name.empty())
@@ -495,7 +495,7 @@ int main(int argc, char* argv[])
     else
       document->set_connection_database(database_name);
   }
-        
+
   //Startup. For instance, create the self-hosting files if necessary:
   const auto initialized_errors =
     connection_pool->initialize( sigc::ptr_fun(&on_initialize_progress) );
@@ -526,7 +526,7 @@ int main(int argc, char* argv[])
   {
     std::cerr << G_STRFUNC << ": Could not convert URI to output filepath: " << document->get_file_uri() << 
std::endl;
   }
-   
+
   std::cout << "Glom file created at: " << output_path_used << std::endl;
 
 
diff --git a/glom/glom_export_po.cc b/glom/glom_export_po.cc
index b1304fc..e4b73ee 100644
--- a/glom/glom_export_po.cc
+++ b/glom/glom_export_po.cc
@@ -51,7 +51,7 @@ GlomCreateOptionGroup::GlomCreateOptionGroup()
 : Glib::OptionGroup("glom_export_po", _("Glom options"), _("Command-line options")),
   m_arg_version(false)
 {
-  Glib::OptionEntry entry; 
+  Glib::OptionEntry entry;
   entry.set_long_name("output-path");
   entry.set_short_name('o');
   entry.set_description(_("The path at which to save the created .po file, such as 
/home/someuser/somefile.po ."));
@@ -66,7 +66,7 @@ GlomCreateOptionGroup::GlomCreateOptionGroup()
   entry.set_short_name('t');
   entry.set_description(_("Generate a .pot template file instead of a .po file for a locale."));
   add_entry(entry, m_arg_template);
-  
+
   entry.set_long_name("version");
   entry.set_short_name('V');
   entry.set_description(_("The version of this application."));
@@ -95,10 +95,10 @@ int main(int argc, char* argv[])
     std::cerr << G_STRFUNC << ": exception from std::locale::global(std::locale(\"\")): " << ex.what() << 
std::endl;
     std::cerr << G_STRFUNC << ":   This can happen if the locale is not properly installed or configured.\n";
   }
-  
+
 
   Glom::libglom_init();
-  
+
   Glib::OptionContext context;
   GlomCreateOptionGroup group;
   context.set_main_group(group);
@@ -174,7 +174,7 @@ int main(int argc, char* argv[])
     return EXIT_FAILURE;
   }
 
-  //Check the output path: 
+  //Check the output path:
   if(group.m_arg_filepath_output.empty())
   {
     std::cerr << _("Please specify an output path.") << std::endl;
@@ -213,7 +213,7 @@ int main(int argc, char* argv[])
 
   if(group.m_arg_template)
   {
-    const bool succeeded = 
+    const bool succeeded =
       Glom::write_pot_file(document, output_uri);
     if(!succeeded)
     {
@@ -225,7 +225,7 @@ int main(int argc, char* argv[])
   }
   else
   {
-    const bool succeeded = 
+    const bool succeeded =
       Glom::write_translations_to_po_file(document, output_uri, group.m_arg_locale_id);
     if(!succeeded)
     {
diff --git a/glom/glom_export_po_all.cc b/glom/glom_export_po_all.cc
index d2d97f3..5d9bff8 100644
--- a/glom/glom_export_po_all.cc
+++ b/glom/glom_export_po_all.cc
@@ -49,7 +49,7 @@ GlomCreateOptionGroup::GlomCreateOptionGroup()
 : Glib::OptionGroup("glom_export_po_all", _("Glom options"), _("Command-line options")),
   m_arg_version(false)
 {
-  Glib::OptionEntry entry; 
+  Glib::OptionEntry entry;
   entry.set_long_name("output-path");
   entry.set_short_name('o');
   entry.set_description(_("The directory path at which to save the created .po files, such as 
/home/someuser/po_files/ ."));
@@ -84,9 +84,9 @@ int main(int argc, char* argv[])
     std::cerr << G_STRFUNC << ":   This can happen if the locale is not properly installed or configured.\n";
   }
 
-  
+
   Glom::libglom_init();
-  
+
   Glib::OptionContext context;
   GlomCreateOptionGroup group;
   context.set_main_group(group);
@@ -155,7 +155,7 @@ int main(int argc, char* argv[])
     return EXIT_FAILURE;
   }
 
-  //Check the output path: 
+  //Check the output path:
   if(group.m_arg_filepath_output.empty())
   {
     std::cerr << _("Please specify an output path.") << std::endl;
@@ -165,7 +165,7 @@ int main(int argc, char* argv[])
 
   //Get a URI (file://something) from the filepath:
   auto file_output = Gio::File::create_for_commandline_arg(group.m_arg_filepath_output);
-  
+
   //Create the directory, if necessary:
   if(!(file_output->query_exists()))
   {
@@ -214,7 +214,7 @@ int main(int argc, char* argv[])
     const Glib::RefPtr<const Gio::File> file_output_full = file_output->get_child(locale_id + ".po");
     const auto output_uri = file_output_full->get_uri();
 
-    const bool succeeded = 
+    const bool succeeded =
       Glom::write_translations_to_po_file(document, output_uri, locale_id);
     if(!succeeded)
     {
diff --git a/glom/glom_import_po_all.cc b/glom/glom_import_po_all.cc
index 7f43372..6dd20a5 100644
--- a/glom/glom_import_po_all.cc
+++ b/glom/glom_import_po_all.cc
@@ -51,7 +51,7 @@ GlomCreateOptionGroup::GlomCreateOptionGroup()
 : Glib::OptionGroup("glom_import_po_all", _("Glom options"), _("Command-line options")),
   m_arg_version(false)
 {
-  Glib::OptionEntry entry; 
+  Glib::OptionEntry entry;
   entry.set_long_name("input-path");
   entry.set_short_name('o');
   entry.set_description(_("The path to a directory containing .po files, such as /home/someuser/po_files/ 
."));
@@ -86,9 +86,9 @@ int main(int argc, char* argv[])
     std::cerr << G_STRFUNC << ":   This can happen if the locale is not properly installed or configured.\n";
   }
 
-  
+
   Glom::libglom_init();
-  
+
   Glib::OptionContext context;
   GlomCreateOptionGroup group;
   context.set_main_group(group);
@@ -157,7 +157,7 @@ int main(int argc, char* argv[])
     return EXIT_FAILURE;
   }
 
-  //Check the po files path: 
+  //Check the po files path:
   if(group.m_arg_filepath_po_input.empty())
   {
     std::cerr << _("Please specify the path to a directory containing po files.") << std::endl;
@@ -201,13 +201,13 @@ int main(int argc, char* argv[])
 
     //Check that it has the .po file extension:
     const auto basename = child->get_basename();
-    const auto locale_id = 
+    const auto locale_id =
       Glom::Utils::string_remove_suffix(basename, ".po");
     if(locale_id == basename)
       continue;
-    
+
     document->set_allow_autosave(false); //Prevent saving while we modify the document.
-    const bool succeeded = 
+    const bool succeeded =
       Glom::import_translations_from_po_file(document, child->get_uri(), locale_id);
     if(!succeeded)
     {
diff --git a/glom/glom_test_connection.cc b/glom/glom_test_connection.cc
index 0020836..743c5dc 100644
--- a/glom/glom_test_connection.cc
+++ b/glom/glom_test_connection.cc
@@ -76,12 +76,12 @@ GlomCreateOptionGroup::GlomCreateOptionGroup()
   entry.set_short_name('h');
   entry.set_description(_("The hostname of the PostgreSQL server, such as localhost."));
   add_entry(entry, m_arg_server_hostname);
-  
+
   entry.set_long_name("server-port");
   entry.set_short_name('p');
   entry.set_description(_("The port of the PostgreSQL server, such as 5434."));
   add_entry(entry, m_arg_server_port);
-  
+
   entry.set_long_name("server-username");
   entry.set_short_name('u');
   entry.set_description(_("The username for the PostgreSQL server."));
@@ -134,11 +134,11 @@ int main(int argc, char* argv[])
 
 
   Glom::libglom_init();
-  
+
   Glib::OptionContext context;
   GlomCreateOptionGroup group;
   context.set_main_group(group);
-  
+
   try
   {
     context.parse(argc, argv);
@@ -268,7 +268,7 @@ int main(int argc, char* argv[])
     {
       //We expect this exception if we did not specify a database:
       if(!(group.m_arg_server_database.empty()))
-      {  
+      {
         std::cerr << _("Error: Could not connect to the specified database.") << std::endl;
         return EXIT_FAILURE;
       }
@@ -276,7 +276,7 @@ int main(int argc, char* argv[])
   }
 
   std::cout << _("Successful connection.") << std::endl;
-        
+
   Glom::libglom_deinit();
 
   return EXIT_SUCCESS;
diff --git a/glom/import_csv/csv_parser.cc b/glom/import_csv/csv_parser.cc
index 522aed5..95fc8d5 100644
--- a/glom/import_csv/csv_parser.cc
+++ b/glom/import_csv/csv_parser.cc
@@ -72,7 +72,7 @@ void CsvParser::set_file_and_start_parsing(const std::string& file_uri)
   auto file = Gio::File::create_for_uri(file_uri);
 
   set_state(CsvParser::State::PARSING);
-  
+
   //TODO Get a rough estimate of the number of rows (for showing progress),
   //by counting the number of lines:
   //guint lines_count = 0;
diff --git a/glom/import_csv/dialog_import_csv_progress.cc b/glom/import_csv/dialog_import_csv_progress.cc
index 14d8eb9..84159ab 100644
--- a/glom/import_csv/dialog_import_csv_progress.cc
+++ b/glom/import_csv/dialog_import_csv_progress.cc
@@ -36,8 +36,8 @@ const char* Dialog_Import_CSV_Progress::glade_id("dialog_import_csv_progress");
 const bool Dialog_Import_CSV_Progress::glade_developer(false);
 
 Dialog_Import_CSV_Progress::Dialog_Import_CSV_Progress(BaseObjectType* cobject, const 
Glib::RefPtr<Gtk::Builder>& builder)
-: Gtk::Dialog(cobject), 
-  m_data_source(nullptr), 
+: Gtk::Dialog(cobject),
+  m_data_source(nullptr),
   m_current_row(0)
 {
   builder->get_widget("import_csv_progress_progress_bar", m_progress_bar);
@@ -72,7 +72,7 @@ void Dialog_Import_CSV_Progress::import(Dialog_Import_CSV& data_source)
     // Wait for the parsing to finish. We do not start importing before the file has been
     // parsed completely since we would not to rollback our changes in case of a
     // parsing error.
-    
+
     std::string filename;
     try
     {
@@ -155,7 +155,7 @@ bool Dialog_Import_CSV_Progress::on_idle_import()
   m_progress_bar->pulse();
 
   std::cout << "debug: status_text=" << status_text << std::endl;
-  
+
   //Allow GTK+ to process events, so that the UI is responsive.
   //TODO: This does not seem to actually work.
   //TODO: Make sure that gtkmm has some non-Gtk::Main API for this:
diff --git a/glom/import_csv/dialog_import_csv_progress.h b/glom/import_csv/dialog_import_csv_progress.h
index f87b273..214e11f 100644
--- a/glom/import_csv/dialog_import_csv_progress.h
+++ b/glom/import_csv/dialog_import_csv_progress.h
@@ -37,7 +37,7 @@ class Dialog_Import_CSV_Progress
 public:
   static const char* glade_id;
   static const bool glade_developer;
-  
+
   Dialog_Import_CSV_Progress(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
 
   bool init_db_details(const Glib::ustring& table_name);
diff --git a/glom/import_csv/file_encodings.h b/glom/import_csv/file_encodings.h
index 603ca8e..88a0a26 100644
--- a/glom/import_csv/file_encodings.h
+++ b/glom/import_csv/file_encodings.h
@@ -49,7 +49,7 @@ typedef std::list<Encoding> type_list_encodings;
  */
 type_list_encodings get_list_of_encodings();
 
-/** Discover the human-readable name (such as "Western") of a charset 
+/** Discover the human-readable name (such as "Western") of a charset
  * (such as "ISO-8859-1")
  */
 Glib::ustring get_name_of_charset(const Glib::ustring& charset);
diff --git a/glom/infobar_progress_creating.h b/glom/infobar_progress_creating.h
index 9dcce1a..02ff7c2 100644
--- a/glom/infobar_progress_creating.h
+++ b/glom/infobar_progress_creating.h
@@ -30,7 +30,7 @@ namespace Glom
 {
 
 /** Use this to show the user that something is happening.
- * Call pulse() repeatedly to show that we are still working. 
+ * Call pulse() repeatedly to show that we are still working.
  */
 class Infobar_ProgressCreating
   : public Gtk::InfoBar
diff --git a/glom/libglom/calcinprogress.h b/glom/libglom/calcinprogress.h
index 524d0e4..b7753cf 100644
--- a/glom/libglom/calcinprogress.h
+++ b/glom/libglom/calcinprogress.h
@@ -31,7 +31,7 @@ class CalcInProgress
 public:
   CalcInProgress();
 
-  std::shared_ptr<const Field> m_field; 
+  std::shared_ptr<const Field> m_field;
   Gnome::Gda::Value m_value; //If it's been calculated.
   bool m_calc_in_progress;
   bool m_calc_finished;
diff --git a/glom/libglom/connectionpool.cc b/glom/libglom/connectionpool.cc
index 35a960b..21f094d 100644
--- a/glom/libglom/connectionpool.cc
+++ b/glom/libglom/connectionpool.cc
@@ -501,7 +501,7 @@ void ConnectionPool::invalidate_connection()
 
   if(m_gda_connection)
     m_gda_connection->close();
-    
+
   m_gda_connection.reset();
   m_sharedconnection_refcount = 0;
 
@@ -636,7 +636,7 @@ bool ConnectionPool::cleanup(const SlotProgress& slot_progress)
   //Otherwise database shutdown could fail.
   //And make sure that connect() tries to make a new connection:
   invalidate_connection();
-      
+
   if(m_backend)
     result = m_backend->cleanup(slot_progress);
 
@@ -751,7 +751,7 @@ bool ConnectionPool::change_columns(const Glib::ustring& table_name, const type_
 
   //Add or remove any auto-increment rows:
   //The new auto-increment row would actually be added automatically,
-  //but this makes it available even before a record has been added. 
+  //but this makes it available even before a record has been added.
   auto iter_old = old_fields.begin();
   auto iter_new = new_fields.begin();
   while( (iter_old != old_fields.end()) && (iter_new != new_fields.end()) )
@@ -770,7 +770,7 @@ bool ConnectionPool::change_columns(const Glib::ustring& table_name, const type_
     ++iter_old;
     ++iter_new;
   }
- 
+
   return result;
 }
 
@@ -786,7 +786,7 @@ std::shared_ptr<Document> ConnectionPool::get_document()
 {
   if(!m_slot_get_document)
   {
-    //Don't bother warning because all the code that calls get_document() checks 
+    //Don't bother warning because all the code that calls get_document() checks
     //for 0 and responds reasonably.
     //std::cerr << G_STRFUNC << ": m_slot_get_document is null.\n";
     return nullptr;
diff --git a/glom/libglom/connectionpool.h b/glom/libglom/connectionpool.h
index 17985d3..dcdf8e1 100644
--- a/glom/libglom/connectionpool.h
+++ b/glom/libglom/connectionpool.h
@@ -98,9 +98,9 @@ public:
    * Use delete_instance() when the program quits.
    */
   static std::shared_ptr<ConnectionPool> get_instance();
-  
+
   /** Whether the connection is ready to be used.
-   */ 
+   */
   static bool get_instance_is_ready();
 
   /** Make the ConnectionPool use the correct backend, with the necessary details,
@@ -138,7 +138,7 @@ public:
 
   std::shared_ptr<Backend> get_backend();
   std::shared_ptr<const Backend> get_backend() const;
-  
+
   /** Discover whether the backend can create GdaDataModels that can be iterated,
    * by creating them with the GDA_STATEMENT_MODEL_CURSOR_FORWARD flag.
    * If not (with sqlite, for instance), the GdaDataAccessWrapper model can provide that API, without the 
performance.
@@ -243,7 +243,7 @@ public:
 
   /** Add a field to the database.
    * The caller should then update the document's list of fields,
-   * for instance by calling Document::set_table_fields(). 
+   * for instance by calling Document::set_table_fields().
    *
    * @param table_name The parent table of the fields to be changed.
    * @param field The field to be added.
@@ -252,7 +252,7 @@ public:
 
   /** Remove a field from the database.
    * The caller should then update the document's list of fields,
-   * for instance by calling Document::set_table_fields(). 
+   * for instance by calling Document::set_table_fields().
    *
    * @param table_name The parent table of the fields to be changed.
    * @param field_name The name of the field to be removed.
@@ -261,21 +261,21 @@ public:
 
   /** Change some detail about a field in the database.
    * The caller should then update the document's list of fields,
-   * for instance by calling Document::set_table_fields(). 
+   * for instance by calling Document::set_table_fields().
    *
    * @param table_name The parent table of the field to be changed.
    * @param field_old The old field information.
-   * @param field The new field information. 
+   * @param field The new field information.
    */
   bool change_column(const Glib::ustring& table_name, const std::shared_ptr<const Field>& field_old, const 
std::shared_ptr<const Field>& field) noexcept;
 
   /** Change some detail about some fields in the database.
    * The caller should then update the document's list of fields,
-   * for instance by calling Document::set_table_fields(). 
+   * for instance by calling Document::set_table_fields().
    *
    * @param table_name The parent table of the fields to be changed.
    * @param old_fields The old field information.
-   * @param fields The new field information. 
+   * @param fields The new field information.
    */
   bool change_columns(const Glib::ustring& table_name, const type_vec_const_fields& old_fields, const 
type_vec_const_fields& fields) noexcept;
 
diff --git a/glom/libglom/connectionpool_backends/mysql.cc b/glom/libglom/connectionpool_backends/mysql.cc
index 33d4389..0731236 100644
--- a/glom/libglom/connectionpool_backends/mysql.cc
+++ b/glom/libglom/connectionpool_backends/mysql.cc
@@ -185,7 +185,7 @@ bool MySQL::change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connectio
     std::cerr << G_STRFUNC << ": begin_transaction failed: " << ex.what() << std::endl;
   }
 
-  //Do this all in one big try/catch, block, 
+  //Do this all in one big try/catch, block,
   //reverting the transaction if anything fails:
   try
   {
@@ -222,7 +222,7 @@ bool MySQL::change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connectio
                      
http://groups.google.de/groups?hl=en&lr=&ie=UTF-8&frame=right&th=a7a62337ad5a8f13&seekm=23739.1073660245%40sss.pgh.pa.us#link5
                      UPDATE _table
                      SET _bbb = to_number(substring(_aaa from 1 for 5), '99999')
-                     WHERE _aaa <> '     ';  
+                     WHERE _aaa <> '     ';
                      */
 
                      switch(new_fields[i]->get_glom_type())
@@ -253,7 +253,7 @@ bool MySQL::change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connectio
                          else
                          {
                            //We use to_number, with textcat() so that to_number always has usable data.
-                           //Otherwise, it says 
+                           //Otherwise, it says
                            //invalid input syntax for type numeric: " "
                            //
                            //We must use single quotes with the 0, otherwise it says "column 0 does not 
exist.".
@@ -378,7 +378,7 @@ bool MySQL::change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connectio
                    }
                  }
                }
-               
+
                connection->commit_transaction(TRANSACTION_NAME);
                return true;
   }
@@ -386,7 +386,7 @@ bool MySQL::change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connectio
   {
     std::cerr << G_STRFUNC << "Exception: " << ex.what() << std::endl;
     std::cerr << G_STRFUNC << ":   Reverting the transaction.\n";
-    
+
     try
     {
       connection->rollback_transaction(TRANSACTION_NAME);
@@ -396,7 +396,7 @@ bool MySQL::change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connectio
       std::cerr << G_STRFUNC << "Could not rollback the transaction: Exception: " << ex_rollback.what() << 
std::endl;
     }
   }
-  
+
   return false;
 }
 
@@ -405,7 +405,7 @@ bool MySQL::attempt_create_database(const SlotProgress& slot_progress, const Gli
   if(slot_progress)
     slot_progress();
 
-  auto op = 
+  auto op =
     Gnome::Gda::ServerOperation::prepare_create_database("MySQL", database_name);
 
   if(slot_progress)
diff --git a/glom/libglom/connectionpool_backends/mysql.h b/glom/libglom/connectionpool_backends/mysql.h
index d2956fb..e327b18 100644
--- a/glom/libglom/connectionpool_backends/mysql.h
+++ b/glom/libglom/connectionpool_backends/mysql.h
@@ -69,7 +69,7 @@ protected:
 
   /** Attempt to connect to the database with the specified criteria.
    * @throws An ExceptionConnection if the correction failed.
-   */ 
+   */
   Glib::RefPtr<Gnome::Gda::Connection> attempt_connect(const Glib::ustring& port, const Glib::ustring& 
database, const Glib::ustring& username, const Glib::ustring& password, bool fake_connection);
 
  std::string get_self_hosting_path(bool create = false, const std::string& child_directory = std::string());
diff --git a/glom/libglom/connectionpool_backends/mysql_central.cc 
b/glom/libglom/connectionpool_backends/mysql_central.cc
index 18497f6..bd7be06 100644
--- a/glom/libglom/connectionpool_backends/mysql_central.cc
+++ b/glom/libglom/connectionpool_backends/mysql_central.cc
@@ -37,7 +37,7 @@ MySQLCentralHosted::MySQLCentralHosted()
     "5434", //Earlier versions of Ubuntu Feisty defaulted to this for MySQL 8.2.
     "5435", //In case Ubuntu increases the port number again in future.
     "5436"} ), //In case Ubuntu increases the port number again in future.
-  m_try_other_ports(true)  
+  m_try_other_ports(true)
 {
 }
 
@@ -123,7 +123,7 @@ Glib::RefPtr<Gnome::Gda::Connection> MySQLCentralHosted::connect(const Glib::ust
       }
       catch(const ExceptionConnection& ex)
       {
-        //Don't set this, because we might have previously set it to true to 
+        //Don't set this, because we might have previously set it to true to
         //show that a connection was possible with a previously-tried port: connection_possible = false;
 
         // Remember port if only the database was missing
diff --git a/glom/libglom/connectionpool_backends/mysql_self.cc 
b/glom/libglom/connectionpool_backends/mysql_self.cc
index 7fbf260..46abb7a 100644
--- a/glom/libglom/connectionpool_backends/mysql_self.cc
+++ b/glom/libglom/connectionpool_backends/mysql_self.cc
@@ -196,7 +196,7 @@ Backend::InitErrors MySQLSelfHosted::initialize(const SlotProgress& slot_progres
   else
   {
     //std::cout << "debug: command_initdb succeeded" << ", this=" << this << std::endl;
-  
+
     //This is used during the first start:
     m_initial_password_to_set = password;
     m_initial_username_to_set = initial_username;
@@ -457,16 +457,16 @@ void MySQLSelfHosted::show_active_connections()
       Gnome::Gda::SqlBuilder::create(Gnome::Gda::SQL_STATEMENT_SELECT);
   builder->select_add_field("*", "pg_stat_activity");
   builder->select_add_target("pg_stat_activity");
- 
+
   auto gda_connection = connect(m_saved_database_name, m_saved_username, m_saved_password);
   if(!gda_connection)
     std::cerr << G_STRFUNC << ": connection failed.\n";
-  
+
   auto datamodel = DbUtils::query_execute_select(builder);
   if(!datamodel)
     std::cerr << G_STRFUNC << ": pg_stat_activity SQL query failed.\n";
-  
-  const auto rows_count = datamodel->get_n_rows(); 
+
+  const auto rows_count = datamodel->get_n_rows();
   if(datamodel->get_n_rows() < 1)
     std::cerr << G_STRFUNC << ": pg_stat_activity SQL query returned no rows.\n";
 
@@ -478,13 +478,13 @@ void MySQLSelfHosted::show_active_connections()
     {
       if(col != 0)
         std::cout << ", ";
-        
+
       std::cout << datamodel->get_value_at(col, row).to_string();
     }
-    
+
     std::cout << std::endl;
   }
-  
+
   //Make sure that this connection does not stop a further attempt to stop the server.
   gda_connection->close();
 */
@@ -547,7 +547,7 @@ bool MySQLSelfHosted::cleanup(const SlotProgress& slot_progress)
   if(!result)
   {
     std::cerr << G_STRFUNC << ": Error while attempting to stop self-hosting of the MySQL database. Trying 
again."  << std::endl;
-    
+
     //Show open connections for debugging:
     try
     {
@@ -557,7 +557,7 @@ bool MySQLSelfHosted::cleanup(const SlotProgress& slot_progress)
     {
       std::cerr << G_STRFUNC << ": exception while trying to show active MySQL connections: " << ex.what() 
<< std::endl;
     }
-    
+
     //I've seen it fail when running under valgrind, and there are reports of failures in bug #420962.
     //Maybe it will help to try again:
     if(!Glom::Spawn::execute_command_line_and_wait(command_mysql_stop, slot_progress))
diff --git a/glom/libglom/connectionpool_backends/mysql_self.h 
b/glom/libglom/connectionpool_backends/mysql_self.h
index 66af37c..feca761 100644
--- a/glom/libglom/connectionpool_backends/mysql_self.h
+++ b/glom/libglom/connectionpool_backends/mysql_self.h
@@ -80,11 +80,11 @@ private:
   Glib::ustring get_mysqlql_utils_version(const SlotProgress& slot_progress);
 
   float get_mysqlql_utils_version_as_number(const SlotProgress& slot_progress);
-  
+
   void show_active_connections();
 
   bool m_network_shared;
-  
+
   //These are remembered in order to use them to issue the shutdown command via mysqladmin:
   Glib::ustring m_saved_username, m_saved_password;
 
diff --git a/glom/libglom/connectionpool_backends/postgres.cc 
b/glom/libglom/connectionpool_backends/postgres.cc
index e06ecdf..7d52dcd 100644
--- a/glom/libglom/connectionpool_backends/postgres.cc
+++ b/glom/libglom/connectionpool_backends/postgres.cc
@@ -45,7 +45,7 @@ static Glib::ustring create_auth_string(const Glib::ustring& username, const Gli
   if(username.empty() and password.empty())
     return Glib::ustring();
   else
-    return "USERNAME=" + Glom::DbUtils::gda_cnc_string_encode(username) + 
+    return "USERNAME=" + Glom::DbUtils::gda_cnc_string_encode(username) +
       ";PASSWORD=" + Glom::DbUtils::gda_cnc_string_encode(password);
 }
 
@@ -174,7 +174,7 @@ bool Postgres::change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connec
     std::cerr << G_STRFUNC << ": begin_transaction failed: " << ex.what() << std::endl;
   }
 
-  //Do this all in one big try/catch, block, 
+  //Do this all in one big try/catch, block,
   //reverting the transaction if anything fails:
   try
   {
@@ -211,7 +211,7 @@ bool Postgres::change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connec
                      
http://groups.google.de/groups?hl=en&lr=&ie=UTF-8&frame=right&th=a7a62337ad5a8f13&seekm=23739.1073660245%40sss.pgh.pa.us#link5
                      UPDATE _table
                      SET _bbb = to_number(substring(_aaa from 1 for 5), '99999')
-                     WHERE _aaa <> '     ';  
+                     WHERE _aaa <> '     ';
                      */
 
                      switch(new_fields[i]->get_glom_type())
@@ -242,7 +242,7 @@ bool Postgres::change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connec
                          else
                          {
                            //We use to_number, with textcat() so that to_number always has usable data.
-                           //Otherwise, it says 
+                           //Otherwise, it says
                            //invalid input syntax for type numeric: " "
                            //
                            //We must use single quotes with the 0, otherwise it says "column 0 does not 
exist.".
@@ -365,7 +365,7 @@ bool Postgres::change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connec
                    }
                  }
                }
-               
+
                connection->commit_transaction(TRANSACTION_NAME);
                return true;
   }
@@ -373,7 +373,7 @@ bool Postgres::change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connec
   {
     std::cerr << G_STRFUNC << ": Exception: " << ex.what() << std::endl;
     std::cerr << G_STRFUNC << ": Reverting the transaction.\n";
-    
+
     try
     {
       connection->rollback_transaction(TRANSACTION_NAME);
@@ -383,7 +383,7 @@ bool Postgres::change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connec
       std::cerr << G_STRFUNC << ": Could not rollback the transaction: Exception: " << ex_rollback.what() << 
std::endl;
     }
   }
-  
+
   return false;
 }
 
@@ -392,10 +392,10 @@ bool Postgres::attempt_create_database(const SlotProgress& slot_progress, const
   if(slot_progress)
     slot_progress();
 
-  auto op = 
+  auto op =
     Gnome::Gda::ServerOperation::prepare_create_database("PostgreSQL", database_name);
 
-  if(slot_progress)  
+  if(slot_progress)
     slot_progress();
 
   g_assert(op);
diff --git a/glom/libglom/connectionpool_backends/postgres.h b/glom/libglom/connectionpool_backends/postgres.h
index 130ab2e..a4e1652 100644
--- a/glom/libglom/connectionpool_backends/postgres.h
+++ b/glom/libglom/connectionpool_backends/postgres.h
@@ -69,7 +69,7 @@ protected:
 
   /** Attempt to connect to the database with the specified criteria.
    * @throws An ExceptionConnection if the correction failed.
-   */ 
+   */
   Glib::RefPtr<Gnome::Gda::Connection> attempt_connect(const Glib::ustring& port, const Glib::ustring& 
database, const Glib::ustring& username, const Glib::ustring& password, bool fake_connection);
 
  std::string get_self_hosting_path(bool create = false, const std::string& child_directory = std::string());
diff --git a/glom/libglom/connectionpool_backends/postgres_central.cc 
b/glom/libglom/connectionpool_backends/postgres_central.cc
index ec6f4cd..90bd7d2 100644
--- a/glom/libglom/connectionpool_backends/postgres_central.cc
+++ b/glom/libglom/connectionpool_backends/postgres_central.cc
@@ -36,7 +36,7 @@ PostgresCentralHosted::PostgresCentralHosted()
     "5434", //Earlier versions of Ubuntu Feisty defaulted to this for Postgres 8.2.
     "5435", //In case Ubuntu increases the port number again in future.
     "5436"} ), //In case Ubuntu increases the port number again in future.
-  m_try_other_ports(true) 
+  m_try_other_ports(true)
 {
 }
 
@@ -122,7 +122,7 @@ Glib::RefPtr<Gnome::Gda::Connection> PostgresCentralHosted::connect(const Glib::
       }
       catch(const ExceptionConnection& ex)
       {
-        //Don't set this, because we might have previously set it to true to 
+        //Don't set this, because we might have previously set it to true to
         //show that a connection was possible with a previously-tried port: connection_possible = false;
 
         // Remember port if only the database was missing
diff --git a/glom/libglom/connectionpool_backends/postgres_self.cc 
b/glom/libglom/connectionpool_backends/postgres_self.cc
index cd2f1db..b3ccf52 100644
--- a/glom/libglom/connectionpool_backends/postgres_self.cc
+++ b/glom/libglom/connectionpool_backends/postgres_self.cc
@@ -358,16 +358,16 @@ void PostgresSelfHosted::show_active_connections()
       Gnome::Gda::SqlBuilder::create(Gnome::Gda::SQL_STATEMENT_SELECT);
   builder->select_add_field("*", "pg_stat_activity");
   builder->select_add_target("pg_stat_activity");
- 
+
   auto gda_connection = connect(m_saved_database_name, m_saved_username, m_saved_password);
   if(!gda_connection)
     std::cerr << G_STRFUNC << ": connection failed.\n";
-  
+
   auto datamodel = DbUtils::query_execute_select(builder);
   if(!datamodel)
     std::cerr << G_STRFUNC << ": pg_stat_activity SQL query failed.\n";
-  
-  const auto rows_count = datamodel->get_n_rows(); 
+
+  const auto rows_count = datamodel->get_n_rows();
   if(datamodel->get_n_rows() < 1)
     std::cerr << G_STRFUNC << ": pg_stat_activity SQL query returned no rows.\n";
 
@@ -379,13 +379,13 @@ void PostgresSelfHosted::show_active_connections()
     {
       if(col != 0)
         std::cout << ", ";
-        
+
       std::cout << datamodel->get_value_at(col, row).to_string();
     }
-    
+
     std::cout << std::endl;
   }
-  
+
   //Make sure that this connection does not stop a further attempt to stop the server.
   gda_connection->close();
 }
@@ -432,7 +432,7 @@ bool PostgresSelfHosted::cleanup(const SlotProgress& slot_progress)
   if(!Glom::Spawn::execute_command_line_and_wait(command_postgres_stop, slot_progress))
   {
     std::cerr << G_STRFUNC << ": Error while attempting to stop self-hosting of the database. Trying again." 
 << std::endl;
-    
+
     //Show open connections for debugging:
     try
     {
@@ -442,7 +442,7 @@ bool PostgresSelfHosted::cleanup(const SlotProgress& slot_progress)
     {
       std::cerr << G_STRFUNC << ": exception while trying to show active connections: " << ex.what() << 
std::endl;
     }
-    
+
     //I've seen it fail when running under valgrind, and there are reports of failures in bug #420962.
     //Maybe it will help to try again:
     if(!Glom::Spawn::execute_command_line_and_wait(command_postgres_stop, slot_progress))
@@ -468,7 +468,7 @@ bool PostgresSelfHosted::set_network_shared(const SlotProgress& /* slot_progress
   const std::string dbdir_uri_config = m_database_directory_uri + "/config";
   const char* default_conf_contents = nullptr;
 
-  // Choose the configuration contents based on 
+  // Choose the configuration contents based on
   // whether we want to be network-shared:
   //const auto postgresql_version = get_postgresql_utils_version_as_number(slot_progress);
   //std::cout << "DEBUG: postgresql_version=" << postgresql_version << std::endl;
@@ -551,7 +551,7 @@ Glib::RefPtr<Gnome::Gda::Connection> PostgresSelfHosted::connect(const Glib::ust
   }
 
   //Save the connection details _only_ for later debug use:
-  
+
   m_saved_database_name = database;
   m_saved_username = username;
   m_saved_password = password;
diff --git a/glom/libglom/connectionpool_backends/postgres_self.h 
b/glom/libglom/connectionpool_backends/postgres_self.h
index 38d0df9..b930bca 100644
--- a/glom/libglom/connectionpool_backends/postgres_self.h
+++ b/glom/libglom/connectionpool_backends/postgres_self.h
@@ -70,11 +70,11 @@ private:
    * order, and return the first one that is available.
    */
   static unsigned int discover_first_free_port(unsigned int start_port, unsigned int end_port);
-  
+
   void show_active_connections();
 
   bool m_network_shared;
-  
+
   //These are only remembered in order to use them to provide debug
   //information when the PostgreSQL shutdown fails:
   Glib::ustring m_saved_database_name, m_saved_username, m_saved_password;
diff --git a/glom/libglom/connectionpool_backends/sqlite.cc b/glom/libglom/connectionpool_backends/sqlite.cc
index e4e1846..d966d8e 100644
--- a/glom/libglom/connectionpool_backends/sqlite.cc
+++ b/glom/libglom/connectionpool_backends/sqlite.cc
@@ -71,9 +71,9 @@ Glib::RefPtr<Gnome::Gda::Connection> Sqlite::connect(const Glib::ustring& databa
       // Convert URI to path, for GDA connection string
       const auto database_directory = db_dir->get_path();
 
-      const auto cnc_string = "DB_DIR=" + DbUtils::gda_cnc_string_encode(database_directory) + 
+      const auto cnc_string = "DB_DIR=" + DbUtils::gda_cnc_string_encode(database_directory) +
         ";DB_NAME=" + DbUtils::gda_cnc_string_encode(database);
-      const auto auth_string = Glib::ustring::compose("USERNAME=%1;PASSWORD=%2", 
+      const auto auth_string = Glib::ustring::compose("USERNAME=%1;PASSWORD=%2",
         DbUtils::gda_cnc_string_encode(username), DbUtils::gda_cnc_string_encode(password));
 
       if(fake_connection)
@@ -114,16 +114,16 @@ bool Sqlite::create_database(const SlotProgress& slot_progress, const Glib::ustr
     std::cerr << G_STRFUNC << ": m_database_directory_uri was empty.\n";
     return false;
   }
- 
-  if(slot_progress)  
+
+  if(slot_progress)
     slot_progress();
- 
+
   auto file = Gio::File::create_for_uri(m_database_directory_uri);
   const auto database_directory = file->get_path();
-  const auto cnc_string = Glib::ustring::compose("DB_DIR=%1;DB_NAME=%2", 
+  const auto cnc_string = Glib::ustring::compose("DB_DIR=%1;DB_NAME=%2",
     DbUtils::gda_cnc_string_encode(database_directory), DbUtils::gda_cnc_string_encode(database_name));
 
-  if(slot_progress)  
+  if(slot_progress)
     slot_progress();
 
   auto cnc =
@@ -131,7 +131,7 @@ bool Sqlite::create_database(const SlotProgress& slot_progress, const Glib::ustr
       cnc_string, "",
       Gnome::Gda::CONNECTION_OPTIONS_SQL_IDENTIFIERS_CASE_SENSITIVE);
 
-  if(slot_progress)  
+  if(slot_progress)
     slot_progress();
 
   return true;
diff --git a/glom/libglom/data_structure/choicevalue.h b/glom/libglom/data_structure/choicevalue.h
index 84ef8f0..bac6288 100644
--- a/glom/libglom/data_structure/choicevalue.h
+++ b/glom/libglom/data_structure/choicevalue.h
@@ -63,7 +63,7 @@ public:
    * This means that it must be a text type.
    */
   bool is_translatable() const;
-  
+
 
 private:
   Gnome::Gda::Value m_value;
diff --git a/glom/libglom/data_structure/database_title.h b/glom/libglom/data_structure/database_title.h
index 5fec97f..7ed9ccf 100644
--- a/glom/libglom/data_structure/database_title.h
+++ b/glom/libglom/data_structure/database_title.h
@@ -26,7 +26,7 @@
 namespace Glom
 {
 
-/** This is a separate class, instead of just deriving Document from 
+/** This is a separate class, instead of just deriving Document from
  * TranslatableItem, to avoid the need to use Document via std::shared_ptr.
  */
 class DatabaseTitle
diff --git a/glom/libglom/data_structure/field.cc b/glom/libglom/data_structure/field.cc
index a387633..dd44b68 100644
--- a/glom/libglom/data_structure/field.cc
+++ b/glom/libglom/data_structure/field.cc
@@ -243,10 +243,10 @@ Glib::ustring Field::sql(const Gnome::Gda::Value& value, const Glib::RefPtr<Gnom
   {
     std::cerr << G_STRFUNC << ": The ServerProvider was null.\n";
     return Glib::ustring();
-  } 
+  }
 
   const auto gda_type = get_gda_type_for_glom_type(m_glom_type);
-  Glib::RefPtr<const Gnome::Gda::DataHandler> datahandler = 
+  Glib::RefPtr<const Gnome::Gda::DataHandler> datahandler =
     provider->get_data_handler_g_type(connection, gda_type);
   if(datahandler)
   {
@@ -274,7 +274,7 @@ Glib::ustring Field::to_file_format(const Gnome::Gda::Value& value, glom_field_t
   {
     if(!value.gobj())
       return Glib::ustring();
- 
+
     gchar* str = nullptr;
     const auto value_type = value.get_value_type();
     if(value_type == GDA_TYPE_BINARY)
@@ -332,10 +332,10 @@ Glib::ustring Field::to_file_format(const Gnome::Gda::Value& value, glom_field_t
     result = Utils::string_replace(result, "\r", "\\015");
     return Utils::string_replace(result, "\"", "\\042");
   }
-  
+
   NumericFormat format_ignored; //Because we use ISO format.
   const auto result = Conversions::get_text_for_gda_value(glom_type, value, std::locale::classic() /* SQL 
uses the C locale */, format_ignored, true /* ISO standard */);
-  
+
   //Escape " as "", as specified by the CSV RFC:
   return Utils::string_replace(result, GLOM_QUOTE_FOR_FILE_FORMAT, GLOM_QUOTE_FOR_FILE_FORMAT 
GLOM_QUOTE_FOR_FILE_FORMAT);
 }
@@ -370,7 +370,7 @@ Gnome::Gda::Value Field::from_file_format(const Glib::ustring& str, glom_field_t
   }
   else
   {
-    string_unescaped = 
+    string_unescaped =
       Utils::string_replace(str, GLOM_QUOTE_FOR_FILE_FORMAT GLOM_QUOTE_FOR_FILE_FORMAT, 
GLOM_QUOTE_FOR_FILE_FORMAT);
   }
 
@@ -421,7 +421,7 @@ Glib::ustring Field::sql_find(const Gnome::Gda::Value& value, const Glib::RefPtr
     case(glom_field_type::TEXT):
     {
       //% means 0 or more characters.
-      
+
       if(value.is_null())
         return "''"; //We want to ignore the concept of NULL strings, and deal only with empty strings.
       else
@@ -578,7 +578,7 @@ bool Field::field_info_from_database_is_equal(const Glib::RefPtr<const Gnome::Gd
 
   //TODO_gda: temp->set_primary_key( field->get_primary_key() ); //Don't compare this, because the data is 
incorrect when libgda reads it from the database.
 
-  return temp->equal(field); 
+  return temp->equal(field);
 }
 
 Field::glom_field_type Field::get_glom_type_for_gda_type(GType gda_type)
@@ -617,7 +617,7 @@ GType Field::get_gda_type_for_glom_type(Field::glom_field_type glom_type)
   }
 
   //std::cout << "debug: " << G_STRFUNC << ": returning: " << g_type_name(ideal_gda_type) << std::endl;
-  
+
   return ideal_gda_type;
 }
 
@@ -654,22 +654,22 @@ void Field::init_map()
 
     // Translators: This means an unknown or unnacceptable value type in a database.
     m_map_type_names_ui[glom_field_type::INVALID] = _("Invalid");
-    
+
     // Translators: This means a numeric value type in a database.
     m_map_type_names_ui[glom_field_type::NUMERIC] = _("Number");
-    
+
     // Translators: This means a text/string value type in a database.
     m_map_type_names_ui[glom_field_type::TEXT] = _("Text");
-    
+
     // Translators: This means a time value type in a database.
     m_map_type_names_ui[glom_field_type::TIME] = _("Time");
-    
+
     // Translators: This means a time value type in a database.
     m_map_type_names_ui[glom_field_type::DATE] = _("Date");
-    
+
     // Translators: This means a true/false value type in a database.
     m_map_type_names_ui[glom_field_type::BOOLEAN] = _("Boolean");
-    
+
     // Translators: This means a picture value type in a database.
     m_map_type_names_ui[glom_field_type::IMAGE] = _("Image");
 
@@ -739,7 +739,7 @@ bool Field::get_conversion_possible(glom_field_type field_type_src, glom_field_t
     if(Utils::find_exists(list_conversions, field_type_dest))
       return true; //Success: conversion found.
   }
-  
+
   return false; //failed.
 }
 
diff --git a/glom/libglom/data_structure/field.h b/glom/libglom/data_structure/field.h
index 36d6257..84defde 100644
--- a/glom/libglom/data_structure/field.h
+++ b/glom/libglom/data_structure/field.h
@@ -154,7 +154,7 @@ public:
    */
   Glib::ustring sql(const Gnome::Gda::Value& value, const Glib::RefPtr<Gnome::Gda::Connection>& connection) 
const;
 
-  /** Get the canonical format for a file, for instance for 
+  /** Get the canonical format for a file, for instance for
    * a default value or for example data.
    * This does not add quotes for text fields so the caller may need to do that.
    * Note that this does not do any extra escaping such as an XML file might need.
diff --git a/glom/libglom/data_structure/fieldtypes.cc b/glom/libglom/data_structure/fieldtypes.cc
index 5b12e05..a6fcba4 100644
--- a/glom/libglom/data_structure/fieldtypes.cc
+++ b/glom/libglom/data_structure/fieldtypes.cc
@@ -37,7 +37,7 @@ FieldTypes::FieldTypes(const Glib::RefPtr<Gnome::Gda::Connection>& gda_connectio
     COMMENTS = 2,
     SYNONYMS = 3
   };
-  
+
   if(gda_connection && gda_connection->is_opened())
   {
     //Read the Types information, so that we can map the string representation of the type (returned by 
CONNECTION_META_FIELDS) to
@@ -74,7 +74,7 @@ FieldTypes::FieldTypes(const Glib::RefPtr<Gnome::Gda::Connection>& gda_connectio
         Glib::ustring schema_type_string;
         if(value_name.get_value_type() == G_TYPE_STRING)
           schema_type_string = value_name.get_string();
-        
+
         if(!schema_type_string.empty())
         {
           const auto value_gdatype = 
data_model_tables->get_value_at(Utils::to_utype(GlomGdaDataModelTypesColumns::GTYPE), i);
@@ -87,15 +87,15 @@ FieldTypes::FieldTypes(const Glib::RefPtr<Gnome::Gda::Connection>& gda_connectio
 
             //Save it for later:
             //const auto gdatypestring = gda_g_type_to_string(gdatype);
-           
+
             //std::cout << "schema type: " << schema_type_string << " = gdatype " << (guint)gdatype << "(" 
<< gdatypestring << ")\n";
-            
+
             m_mapGdaTypesToSchemaStrings[gdatype] = schema_type_string; //We save it twice, to just to make 
searching easier, without using std::find.
-            
+
             //g_warning("debug: schema type: %s = gdatype %d", schema_type_string.c_str(), gdatype);
           }
         }
-          
+
       }
     }
   }
@@ -167,7 +167,7 @@ guint FieldTypes::get_types_count() const
 
 Glib::ustring FieldTypes::get_string_name_for_gdavaluetype(GType field_type) const
 {
-  //Special-case gchararray (G_TYPE_STRING) because Gda reports this GType for several 
+  //Special-case gchararray (G_TYPE_STRING) because Gda reports this GType for several
   //postgres field types (xml, inet, tinterval, etc),
   //though we only care about varchar:
   if(field_type == G_TYPE_STRING)
@@ -187,7 +187,7 @@ Glib::ustring FieldTypes::get_string_name_for_gdavaluetype(GType field_type) con
     {
       std::cerr << G_STRFUNC << ":     gdatype=" << item.first << " (" << g_type_name(item.first) << "), 
sqltype=" << item.second << std::endl;
     }
-    
+
     return "unknowntype";
   }
   else
diff --git a/glom/libglom/data_structure/fieldtypes.h b/glom/libglom/data_structure/fieldtypes.h
index 623274c..5723f9b 100644
--- a/glom/libglom/data_structure/fieldtypes.h
+++ b/glom/libglom/data_structure/fieldtypes.h
@@ -40,7 +40,7 @@ public:
   GType get_fallback_type_for_gdavaluetype(GType field_type) const;
 
   guint get_types_count() const;
-  
+
 private:
   /** Use some default mappings,
    * if, for some reason, we cannot get it from the database server at runtime.
diff --git a/glom/libglom/data_structure/foundset.h b/glom/libglom/data_structure/foundset.h
index 6657837..5fd5f35 100644
--- a/glom/libglom/data_structure/foundset.h
+++ b/glom/libglom/data_structure/foundset.h
@@ -30,7 +30,7 @@
 namespace Glom
 {
 
-/** A grouping of information about a view of a table, 
+/** A grouping of information about a view of a table,
  * including what records are viewed (the where clause),
  * how the are  sorted (the sort clause).
  */
diff --git a/glom/libglom/data_structure/glomconversions.cc b/glom/libglom/data_structure/glomconversions.cc
index c8b8b6b..ba5ae37 100644
--- a/glom/libglom/data_structure/glomconversions.cc
+++ b/glom/libglom/data_structure/glomconversions.cc
@@ -50,7 +50,7 @@ Glib::ustring Conversions::format_time(const tm& tm_data)
     std::cerr << G_STRFUNC << ": exception from std::locale(\"\")): " << ex.what() << std::endl;
     std::cerr << G_STRFUNC << ":   This can happen if the locale is not properly installed or configured.\n";
     return Glib::ustring();
-  } 
+  }
 }
 
 
@@ -132,11 +132,11 @@ static inline const char* glom_get_locale_date_format()
       }
     }
 
-    /* TRANSLATORS: Please only translate this string if you know that strftime() 
-     * shows only 2 year digits when using format "x". We want to always display 
-     * 4 year digits. For instance, en_GB should translate it to "%d/%m/%Y". 
-     * Glom will show a warning in the terminal at startup if this is necessary 
-     * and default to %d/%m/%Y" if it detects a problem, but that might not be 
+    /* TRANSLATORS: Please only translate this string if you know that strftime()
+     * shows only 2 year digits when using format "x". We want to always display
+     * 4 year digits. For instance, en_GB should translate it to "%d/%m/%Y".
+     * Glom will show a warning in the terminal at startup if this is necessary
+     * and default to %d/%m/%Y" if it detects a problem, but that might not be
      * correct for your locale.
      * Thanks.
      * xgettext:no-c-format */
@@ -199,8 +199,8 @@ bool Conversions::sanity_check_date_parsing()
   }
 
   if(!success ||
-     parsed_date.tm_year != the_c_time.tm_year || 
-     parsed_date.tm_mon != the_c_time.tm_mon || 
+     parsed_date.tm_year != the_c_time.tm_year ||
+     parsed_date.tm_mon != the_c_time.tm_mon ||
      parsed_date.tm_mday != the_c_time.tm_mday)
   {
     //Note to translators: If you see this error in the terminal at startup then you need to translate the 
%x elsewhere.
@@ -209,8 +209,8 @@ bool Conversions::sanity_check_date_parsing()
     //If translators cannot be relied upon to do this, maybe we should default to "%d/%m/%Y" when "%x" fails 
this test.
 
     return false;
-  } 
-     
+  }
+
   return true;
 }
 
@@ -246,7 +246,7 @@ bool Conversions::sanity_check_date_text_representation_uses_4_digit_years(bool
     std::cout << "  Current locale: " << std::locale("").name() << std::endl;
 
     //Do not depend on translators to do what we ask.
-    //Default to a common format, though this would be incorrect in some 
+    //Default to a common format, though this would be incorrect in some
     //locales, such as German.
     c_locale_date_format = "%d/%m/%Y";
 
@@ -258,7 +258,7 @@ bool Conversions::sanity_check_date_text_representation_uses_4_digit_years(bool
 
 
 Glib::ustring Conversions::format_tm(const tm& tm_data, const std::locale& locale, const char* format)
-{   
+{
   //This is based on docs found here:
   //http://www.roguewave.com/support/docs/sourcepro/stdlibref/time-put.html
 
@@ -519,7 +519,7 @@ Glib::ustring Conversions::get_text_for_gda_value(Field::glom_field_type glom_ty
       }
       else
       {
-        //Increase the number of digits (even before the decimal point) we can 
+        //Increase the number of digits (even before the decimal point) we can
         //have until it uses the awkward e syntax. The default seems to be 7.
         another_stream << std::setprecision( NumericFormat::get_default_precision() );
       }
@@ -555,7 +555,7 @@ Glib::ustring Conversions::get_text_for_gda_value(Field::glom_field_type glom_ty
     {
       std::cerr << G_STRFUNC << ": exception from std::locale(\"\")): " << ex.what() << std::endl;
       std::cerr << G_STRFUNC << ":   This can happen if the locale is not properly installed or 
configured.\n";
-    }      
+    }
 
     //std::cout << "debug: " << G_STRFUNC << ": number=" << number << ", text=" << text << std::endl;
     return text; //Do something like Glib::locale_to_utf(), but with the specified locale instead of the 
current locale.
@@ -576,8 +576,8 @@ Glib::ustring Conversions::get_text_for_gda_value(Field::glom_field_type glom_ty
   else if(glom_type == Field::glom_field_type::IMAGE)
   {
     //This function is only used for :
-    //- UI-visible strings, but images should never be shown as text in the UI. 
-    //- Values in SQL queries, but we only do that for clauses (where/sort/order) 
+    //- UI-visible strings, but images should never be shown as text in the UI.
+    //- Values in SQL queries, but we only do that for clauses (where/sort/order)
     //  which should never use image values.
     std::cerr << G_STRFUNC << ": Unexpected enumType::IMAGE field type: " << Utils::to_utype(glom_type) << 
std::endl;
     return Glib::ustring();
@@ -614,8 +614,8 @@ Gnome::Gda::Value Conversions::parse_value(Field::glom_field_type glom_type, con
   {
     std::cerr << G_STRFUNC << ": exception from std::locale(\"\")): " << ex.what() << std::endl;
     std::cerr << G_STRFUNC << ":   This can happen if the locale is not properly installed or configured.\n";
-  } 
-  
+  }
+
   //Put a NULL in the database for empty dates, times, and numerics, because 0 would be an actual value.
   //But we use "" for strings, because the distinction between NULL and "" would not be clear to users.
   if(text.empty())
@@ -680,7 +680,7 @@ Gnome::Gda::Value Conversions::parse_value(Field::glom_field_type glom_type, con
     the_stream >> the_number;  //TODO: Does this throw any exception if the text is an invalid number?
 
     //std::cout << "debug: " << G_STRFUNC << ": text=" << text_to_parse << ", number=" << the_number << 
std::endl;
-   
+
 
     Gnome::Gda::Numeric numeric;
     numeric.set_double(the_number);
@@ -696,7 +696,7 @@ Gnome::Gda::Value Conversions::parse_value(Field::glom_field_type glom_type, con
   else if(glom_type == Field::glom_field_type::IMAGE)
   {
     //This function is only used for :
-    //- UI-visible strings, but images should never be entered as text in the UI. 
+    //- UI-visible strings, but images should never be entered as text in the UI.
     std::cerr << G_STRFUNC << ": Unexpected enumType::IMAGE field type: " << Utils::to_utype(glom_type) << 
std::endl;
     return Gnome::Gda::Value();
   }
@@ -716,11 +716,11 @@ tm Conversions::parse_date(const Glib::ustring& text, bool& success)
   {
     std::cerr << G_STRFUNC << ": exception from std::locale(\"\")): " << ex.what() << std::endl;
     std::cerr << G_STRFUNC << ":   This can happen if the locale is not properly installed or configured.\n";
-    
+
     tm the_c_time;
     memset(&the_c_time, 0, sizeof(the_c_time));
     return the_c_time;
-  } 
+  }
 }
 
 tm Conversions::parse_date(const Glib::ustring& text, const std::locale& locale, bool& success)
@@ -782,7 +782,7 @@ tm Conversions::parse_date(const Glib::ustring& text, const std::locale& locale,
   }
   else
   {
-    //time_get can fail just because you have entered "1/2/1903" instead of "01/02/1903", 
+    //time_get can fail just because you have entered "1/2/1903" instead of "01/02/1903",
     //or maybe we chose to skip it because it is not useful in this locale,
     //so let's try another, more liberal, way:
     Glib::Date date;
@@ -842,7 +842,7 @@ tm Conversions::parse_time(const Glib::ustring& text, bool& success)
 
   //time_get() does not seem to work with non-C locales.  TODO: Try again.
   tm the_time;
-  
+
   try
   {
     the_time = parse_time( text, std::locale("") /* the user's current locale */, success );
@@ -851,8 +851,8 @@ tm Conversions::parse_time(const Glib::ustring& text, bool& success)
   {
     std::cerr << G_STRFUNC << ": exception from std::locale(\"\")): " << ex.what() << std::endl;
     std::cerr << G_STRFUNC << ":   This can happen if the locale is not properly installed or configured.\n";
-  } 
-  
+  }
+
   if(success)
   {
     return the_time;
@@ -911,7 +911,7 @@ tm Conversions::parse_time(const Glib::ustring& text, const std::locale& locale,
     success = true;
     return the_c_time;
   }
-  
+
 #ifdef HAVE_STRPTIME
   //Fall back to strptime():
   //This fallback will be used in most cases. TODO: Remove the useless? time_get<> code then?
@@ -919,7 +919,7 @@ tm Conversions::parse_time(const Glib::ustring& text, const std::locale& locale,
   // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2070.html
   //
   //Try various formats:
-  
+
   memset(&the_c_time, 0, sizeof(the_c_time));
   char* lastchar = strptime(text.c_str(), "%r" /* 12-hour clock time using the AM/PM notation */, 
&the_c_time);
   if(lastchar)
@@ -927,7 +927,7 @@ tm Conversions::parse_time(const Glib::ustring& text, const std::locale& locale,
     success = true;
     return the_c_time;
   }
-  
+
   memset(&the_c_time, 0, sizeof(the_c_time));
   lastchar = strptime(text.c_str(), "%X" /* The time, using the locale's time format. */, &the_c_time);
   if(lastchar)
@@ -936,9 +936,9 @@ tm Conversions::parse_time(const Glib::ustring& text, const std::locale& locale,
     success = true;
     return the_c_time;
   }
-  
+
   //Note: strptime() with "%OI" parses "01:00 PM" incorrectly as 01:00, though it claims to parse 
successfully.
-  
+
   memset(&the_c_time, 0, sizeof(the_c_time));
   lastchar = strptime(text.c_str(), "%c" /* alternative 12-hour clock */, &the_c_time);
   if(lastchar)
@@ -947,7 +947,7 @@ tm Conversions::parse_time(const Glib::ustring& text, const std::locale& locale,
     success = true;
     return the_c_time;
   }
-  
+
   //This seems to be the only one that can parse "01:00 PM":
   memset(&the_c_time, 0, sizeof(the_c_time));
   lastchar = strptime(text.c_str(), "%I : %M %p" /* 12 hours clock with AM/PM, without seconds. */, 
&the_c_time);
@@ -957,7 +957,7 @@ tm Conversions::parse_time(const Glib::ustring& text, const std::locale& locale,
     success = true;
     return the_c_time;
   }
- 
+
   //std::cout << "  DEBUG: strptime(%c) failed on text=" << text << std::endl;
 
 #endif // HAVE_STRPTIME
@@ -1083,13 +1083,13 @@ Gnome::Gda::Value Conversions::convert_value(const Gnome::Gda::Value& value, Fie
   const auto gvalue_type_source = value.get_value_type();
   if(gvalue_type_source == gvalue_type_target)
     return value; //No conversion necessary, and no loss of precision.
-  
+
   const auto source_glom_type = Field::get_glom_type_for_gda_type(gvalue_type_source);
   if(source_glom_type == target_glom_type)
   {
-    //Try to return the canonical type, 
+    //Try to return the canonical type,
     //instead of just something of a similar GType:
-    if((target_glom_type == Field::glom_field_type::NUMERIC) && 
+    if((target_glom_type == Field::glom_field_type::NUMERIC) &&
       (vtype_is_numeric(gvalue_type_source)))
     {
       const auto number = get_double_for_gda_value_numeric(value);
diff --git a/glom/libglom/data_structure/glomconversions.h b/glom/libglom/data_structure/glomconversions.h
index 87e25b2..de54b65 100644
--- a/glom/libglom/data_structure/glomconversions.h
+++ b/glom/libglom/data_structure/glomconversions.h
@@ -45,7 +45,7 @@ namespace Conversions
   Glib::ustring format_date(const tm& tm_data);
   Glib::ustring format_date(const tm& tm_data, const std::locale& locale, bool iso_format = false);
 
-  Gnome::Gda::Value parse_value(double number);  
+  Gnome::Gda::Value parse_value(double number);
   Gnome::Gda::Value parse_value(Field::glom_field_type glom_type, const Glib::ustring& text, bool& success, 
bool iso_format = false);
   Gnome::Gda::Value parse_value(Field::glom_field_type glom_type, const Glib::ustring& text, const 
NumericFormat& numeric_format, bool& success, bool iso_format = false);
 
@@ -54,7 +54,7 @@ namespace Conversions
   tm parse_time(const Glib::ustring& text, bool& success);
   tm parse_time(const Glib::ustring& text, const std::locale& locale, bool& success);
 
-  /** Check that Glom can parse text representations of dates for which is has 
+  /** Check that Glom can parse text representations of dates for which is has
    * itself created the text representation.
    * This may fail in some locales if a translation of the date format is missing.
    *
@@ -64,7 +64,7 @@ namespace Conversions
 
   /** Check that Glom uses 4 digits to show years in text representations of dates.
    * This may fail in some locales if a translation of the date format is missing.
-   * If it fails then Glom will default to using a dd/mm/yy format, which 
+   * If it fails then Glom will default to using a dd/mm/yy format, which
    * might be incorrect for the locale.
    *
    * @result true if 4 digits are used.
@@ -84,7 +84,7 @@ namespace Conversions
    * ignoring the current locale.
    */
   Gnome::Gda::Value convert_value(const Gnome::Gda::Value& value, Field::glom_field_type target_glom_type);
-  
+
 } //namespace Conversions
 
 } //namespace Glom
diff --git a/glom/libglom/data_structure/has_title_singular.cc 
b/glom/libglom/data_structure/has_title_singular.cc
index b777de9..0d4c0c0 100644
--- a/glom/libglom/data_structure/has_title_singular.cc
+++ b/glom/libglom/data_structure/has_title_singular.cc
@@ -81,8 +81,8 @@ Glib::ustring HasTitleSingular::get_title_singular_with_fallback(const Glib::ust
   const auto result = get_title_singular(locale);
   if(!result.empty())
     return result;
-  
-  //If it this is also a regular TranslatableItem (usually it is), 
+
+  //If it this is also a regular TranslatableItem (usually it is),
   //then try getting the regular title instead.
   const auto translatable = dynamic_cast<const TranslatableItem*>(this);
   if(translatable)
diff --git a/glom/libglom/data_structure/has_title_singular.h 
b/glom/libglom/data_structure/has_title_singular.h
index 9209121..f5f2db4 100644
--- a/glom/libglom/data_structure/has_title_singular.h
+++ b/glom/libglom/data_structure/has_title_singular.h
@@ -44,7 +44,7 @@ public:
   bool operator==(const HasTitleSingular& src) const;
   bool operator!=(const HasTitleSingular& src) const;
 
-  /** Get the (translation of the) singular form of the title, in the current locale, 
+  /** Get the (translation of the) singular form of the title, in the current locale,
    * if specified.
    */
   Glib::ustring get_title_singular(const Glib::ustring& locale) const;
@@ -53,8 +53,8 @@ public:
    */
   Glib::ustring get_title_singular_original() const;
 
-  /** Get the (translation of the) singular form of the title, in the current locale, 
-   * if specified, falling back to the non-singular title, and 
+  /** Get the (translation of the) singular form of the title, in the current locale,
+   * if specified, falling back to the non-singular title, and
    * then falling back to the table name.
    */
   Glib::ustring get_title_singular_with_fallback(const Glib::ustring& locale) const;
diff --git a/glom/libglom/data_structure/layout/custom_title.cc 
b/glom/libglom/data_structure/layout/custom_title.cc
index b90be79..6a3b063 100644
--- a/glom/libglom/data_structure/layout/custom_title.cc
+++ b/glom/libglom/data_structure/layout/custom_title.cc
@@ -17,7 +17,7 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  */
- 
+
 #include <libglom/data_structure/layout/custom_title.h>
 
 namespace Glom
diff --git a/glom/libglom/data_structure/layout/custom_title.h 
b/glom/libglom/data_structure/layout/custom_title.h
index d54130f..fdf760a 100644
--- a/glom/libglom/data_structure/layout/custom_title.h
+++ b/glom/libglom/data_structure/layout/custom_title.h
@@ -26,7 +26,7 @@
 namespace Glom
 {
 
-class CustomTitle 
+class CustomTitle
  : public TranslatableItem
 {
 public:
diff --git a/glom/libglom/data_structure/layout/formatting.cc 
b/glom/libglom/data_structure/layout/formatting.cc
index 9bc6115..6c8504f 100644
--- a/glom/libglom/data_structure/layout/formatting.cc
+++ b/glom/libglom/data_structure/layout/formatting.cc
@@ -312,8 +312,8 @@ bool Formatting::change_field_item_name(const Glib::ustring& table_name, const G
     return false; //Nothing changed.
 
   auto relationship = get_relationship();
-  
-  const Glib::ustring field_table = 
+
+  const Glib::ustring field_table =
     m_choices_related_field->get_table_used( relationship->get_to_table() );
 
   if((field_table == table_name) &&
@@ -323,10 +323,10 @@ bool Formatting::change_field_item_name(const Glib::ustring& table_name, const G
     m_choices_related_field->set_name(field_name_new);
     return true; //something changed.
   }
-  
+
   if(m_choices_extra_layout_group)
   {
-    m_choices_extra_layout_group->change_field_item_name(table_name, 
+    m_choices_extra_layout_group->change_field_item_name(table_name,
       field_name_old, field_name_new);
   }
 
diff --git a/glom/libglom/data_structure/layout/formatting.h b/glom/libglom/data_structure/layout/formatting.h
index dd847f4..d77471d 100644
--- a/glom/libglom/data_structure/layout/formatting.h
+++ b/glom/libglom/data_structure/layout/formatting.h
@@ -61,12 +61,12 @@ public:
   type_list_values get_choices_custom() const;
   void set_choices_custom(const type_list_values& choices);
 
-  /** Get the original text that corresponds to the translated choice for the 
+  /** Get the original text that corresponds to the translated choice for the
    * current locale.
    */
   Glib::ustring get_custom_choice_original_for_translated_text(const Glib::ustring& text, const 
Glib::ustring& locale = Glib::ustring()) const;
 
-  /** Get the translated choice text, for the 
+  /** Get the translated choice text, for the
    * current locale, that corresponds to the original text .
    */
   Glib::ustring get_custom_choice_translated(const Glib::ustring& original_text, const Glib::ustring& locale 
= Glib::ustring()) const;
@@ -87,7 +87,7 @@ public:
 
   //TODO: Add a ChoicesRelated class?
 
-  
+
   void get_choices_related(std::shared_ptr<const Relationship>& relationship, 
std::shared_ptr<LayoutItem_Field>& field, std::shared_ptr<LayoutGroup>& extra_layout, type_list_sort_fields& 
sort_fields, bool& show_all);
   void get_choices_related(std::shared_ptr<const Relationship>& relationship, std::shared_ptr<const 
LayoutItem_Field>& field, std::shared_ptr<const LayoutGroup>& extra_layout, type_list_sort_fields& 
sort_fields, bool& show_all) const;
   void set_choices_related(const std::shared_ptr<const Relationship>& relationship_name, const 
std::shared_ptr<LayoutItem_Field>& field, const std::shared_ptr<LayoutGroup>& extra_layout, const 
type_list_sort_fields& sort_fields, bool show_all);
diff --git a/glom/libglom/data_structure/layout/layoutgroup.cc 
b/glom/libglom/data_structure/layout/layoutgroup.cc
index 4dd202a..508b54d 100644
--- a/glom/libglom/data_structure/layout/layoutgroup.cc
+++ b/glom/libglom/data_structure/layout/layoutgroup.cc
@@ -22,7 +22,7 @@
 #include <libglom/data_structure/layout/layoutgroup.h>
 #include <libglom/algorithms_utils.h>
 #include <glibmm/i18n-lib.h>
-#include <iostream> 
+#include <iostream>
 
 namespace Glom
 {
@@ -172,7 +172,7 @@ LayoutGroup::type_list_const_items LayoutGroup::get_items_recursive() const
   type_list_const_items result;
 
   for(const auto& item : m_list_items)
-  {    
+  {
     auto group = std::dynamic_pointer_cast<const LayoutGroup>(item);
     if(group)
     {
@@ -191,7 +191,7 @@ LayoutGroup::type_list_items LayoutGroup::get_items_recursive()
   type_list_items result;
 
   for(const auto& item : m_list_items)
-  {    
+  {
     auto group = std::dynamic_pointer_cast<LayoutGroup>(item);
     if(group)
     {
@@ -210,10 +210,10 @@ LayoutGroup::type_list_const_items LayoutGroup::get_items_recursive_with_groups(
   type_list_const_items result;
 
   for(const auto& item : m_list_items)
-  {    
+  {
     //Add the item itself:
     result.emplace_back(item);
-    
+
     auto group = std::dynamic_pointer_cast<const LayoutGroup>(item);
     if(group)
     {
@@ -319,9 +319,9 @@ void LayoutGroup::change_field_item_name(const Glib::ustring& table_name, const
   //Look at each item:
   for(const auto& item : m_list_items)
   {
-    auto field_item = 
+    auto field_item =
       std::dynamic_pointer_cast<LayoutItem_Field>(item);
-    
+
     //Field layout items:
     if(field_item)
     {
@@ -346,14 +346,14 @@ void LayoutGroup::change_field_item_name(const Glib::ustring& table_name, const
     else
     {
       //Formatting:
-      auto with_formatting = 
+      auto with_formatting =
         std::dynamic_pointer_cast<LayoutItem_WithFormatting>(item);
       if(with_formatting)
       {
         auto formatting = with_formatting->m_formatting;
         formatting.change_field_item_name(table_name, field_name, field_name_new);
       }
-   
+
       //Recurse into sub-groups:
       auto sub_group = std::dynamic_pointer_cast<LayoutGroup>(item);
       if(sub_group)
diff --git a/glom/libglom/data_structure/layout/layoutgroup.h 
b/glom/libglom/data_structure/layout/layoutgroup.h
index d934a60..1dfcfac 100644
--- a/glom/libglom/data_structure/layout/layoutgroup.h
+++ b/glom/libglom/data_structure/layout/layoutgroup.h
@@ -71,7 +71,7 @@ public:
    * @param item The item to remove.
    */
   void remove_item(const std::shared_ptr<LayoutItem>& item);
-  
+
   /** Remove any instance of the field from the layout.
    *
    * @param parent_table_name The table to which this layout belongs.
diff --git a/glom/libglom/data_structure/layout/layoutitem.h b/glom/libglom/data_structure/layout/layoutitem.h
index 633e1db..d4b4771 100644
--- a/glom/libglom/data_structure/layout/layoutitem.h
+++ b/glom/libglom/data_structure/layout/layoutitem.h
@@ -64,7 +64,7 @@ public:
 
   /// This is used only for the print layouts.
   void set_print_layout_position(double x, double y, double width, double height);
-  
+
   /// This is used only for the print layouts.
   void set_print_layout_position_y(double y);
 
@@ -109,7 +109,7 @@ private:
     //(A split will happen anyway if it is too big for a whole page):
     bool m_split_across_pages;
   };
-  
+
   mutable std::unique_ptr<PrintLayoutPosition> m_positions;
 };
 
diff --git a/glom/libglom/data_structure/layout/layoutitem_button.cc 
b/glom/libglom/data_structure/layout/layoutitem_button.cc
index 85969a3..f654936 100644
--- a/glom/libglom/data_structure/layout/layoutitem_button.cc
+++ b/glom/libglom/data_structure/layout/layoutitem_button.cc
@@ -43,7 +43,7 @@ LayoutItem* LayoutItem_Button::clone() const
 
 bool LayoutItem_Button::operator==(const LayoutItem_Button& src) const
 {
-  auto result = LayoutItem_WithFormatting::operator==(src) && 
+  auto result = LayoutItem_WithFormatting::operator==(src) &&
                 (m_script == src.m_script);
 
   return result;
diff --git a/glom/libglom/data_structure/layout/layoutitem_button.h 
b/glom/libglom/data_structure/layout/layoutitem_button.h
index 9c599c3..4d9e81b 100644
--- a/glom/libglom/data_structure/layout/layoutitem_button.h
+++ b/glom/libglom/data_structure/layout/layoutitem_button.h
@@ -26,7 +26,7 @@
 namespace Glom
 {
 
-class LayoutItem_Button 
+class LayoutItem_Button
  : public LayoutItem_WithFormatting
 {
 public:
diff --git a/glom/libglom/data_structure/layout/layoutitem_calendarportal.cc 
b/glom/libglom/data_structure/layout/layoutitem_calendarportal.cc
index cb6a29b..52e6679 100644
--- a/glom/libglom/data_structure/layout/layoutitem_calendarportal.cc
+++ b/glom/libglom/data_structure/layout/layoutitem_calendarportal.cc
@@ -63,9 +63,9 @@ void LayoutItem_CalendarPortal::change_related_field_item_name(const Glib::ustri
 void LayoutItem_CalendarPortal::change_field_item_name(const Glib::ustring& table_name, const Glib::ustring& 
field_name, const Glib::ustring& field_name_new)
 {
   LayoutItem_Portal::change_field_item_name(table_name, field_name, field_name_new);
-  
+
   auto relationship = get_relationship();
-        
+
   if(relationship && (relationship->get_to_table() == table_name) && (m_date_field->get_name() == 
field_name))
       m_date_field->set_name(field_name_new); //Change it.
 }
diff --git a/glom/libglom/data_structure/layout/layoutitem_calendarportal.h 
b/glom/libglom/data_structure/layout/layoutitem_calendarportal.h
index 9daad36..76a34f1 100644
--- a/glom/libglom/data_structure/layout/layoutitem_calendarportal.h
+++ b/glom/libglom/data_structure/layout/layoutitem_calendarportal.h
@@ -42,9 +42,9 @@ public:
 
   std::shared_ptr<Field> get_date_field();
   std::shared_ptr<const Field> get_date_field() const;
-    
+
   void set_date_field(const std::shared_ptr<Field>& field);
-    
+
   void change_field_item_name(const Glib::ustring& table_name, const Glib::ustring& field_name, const 
Glib::ustring& field_name_new) override;
   void change_related_field_item_name(const Glib::ustring& table_name, const Glib::ustring& field_name, 
const Glib::ustring& field_name_new) override;
 
diff --git a/glom/libglom/data_structure/layout/layoutitem_field.cc 
b/glom/libglom/data_structure/layout/layoutitem_field.cc
index 60a462e..afa94da 100644
--- a/glom/libglom/data_structure/layout/layoutitem_field.cc
+++ b/glom/libglom/data_structure/layout/layoutitem_field.cc
@@ -252,9 +252,9 @@ const Formatting& LayoutItem_Field::get_formatting_used() const
 Formatting::HorizontalAlignment LayoutItem_Field::get_formatting_used_horizontal_alignment(bool 
for_details_view) const
 {
   const auto format = get_formatting_used();
-  Formatting::HorizontalAlignment alignment = 
+  Formatting::HorizontalAlignment alignment =
     format.get_horizontal_alignment();
-  
+
   if(alignment == Formatting::HorizontalAlignment::AUTO)
   {
     //By default, right-align numbers on list views, unless they are ID fields.
@@ -267,7 +267,7 @@ Formatting::HorizontalAlignment LayoutItem_Field::get_formatting_used_horizontal
     else
       alignment = Formatting::HorizontalAlignment::LEFT;
   }
-  
+
   return alignment;
 }
 
@@ -342,7 +342,7 @@ bool LayoutItem_Field::is_same_field(const std::shared_ptr<const LayoutItem_Fiel
   const UsesRelationship* uses_b = &(*field);
   if(!uses_a || !uses_b)
     return false; //Shouldn't happen.
-    
+
   return (get_name() == field->get_name()) &&
          (*uses_a == *uses_b);
 }
diff --git a/glom/libglom/data_structure/layout/layoutitem_field.h 
b/glom/libglom/data_structure/layout/layoutitem_field.h
index 99f231b..9feddd9 100644
--- a/glom/libglom/data_structure/layout/layoutitem_field.h
+++ b/glom/libglom/data_structure/layout/layoutitem_field.h
@@ -32,15 +32,15 @@ namespace Glom
 {
 
 /** A LayoutItem that shows the data from a table field.
- * The field may be in a known table, or in a to table of a relationship 
- * or related relatinoship. See UsesRelationship::get_relationship() and 
+ * The field may be in a known table, or in a to table of a relationship
+ * or related relatinoship. See UsesRelationship::get_relationship() and
  * UsesRelationship::get_related_relationship() in the base class.
  *
  * get_title() returns either the title of the Field or the CustomTitle.
  * You should not call get/set_title_original() or get/set_title_translation()
  * on items of this type.
  */
-class LayoutItem_Field 
+class LayoutItem_Field
  : public LayoutItem_WithFormatting,
    public UsesRelationship
 {
@@ -109,17 +109,17 @@ public:
   bool m_priv_view;
   bool m_priv_edit;
 
-  /** Discover whether to use the default formatting for this field, 
+  /** Discover whether to use the default formatting for this field,
    * instead of some custom per-layout-item field formatting.
    */
   bool get_formatting_use_default() const;
 
-  /** Specify whether to use the default formatting for this field, 
+  /** Specify whether to use the default formatting for this field,
    * instead of some custom per-layout-item field formatting.
    */
   void set_formatting_use_default(bool use_default = true);
 
-  /** Get the field formatting used by this layout item, which 
+  /** Get the field formatting used by this layout item, which
    * may be either custom field formatting or the default field formatting.
    */
   const Formatting& get_formatting_used() const override;
diff --git a/glom/libglom/data_structure/layout/layoutitem_image.cc 
b/glom/libglom/data_structure/layout/layoutitem_image.cc
index 5ba02b7..1571a49 100644
--- a/glom/libglom/data_structure/layout/layoutitem_image.cc
+++ b/glom/libglom/data_structure/layout/layoutitem_image.cc
@@ -44,7 +44,7 @@ LayoutItem* LayoutItem_Image::clone() const
 
 bool LayoutItem_Image::operator==(const LayoutItem_Image& src) const
 {
-  auto result = LayoutItem::operator==(src) && 
+  auto result = LayoutItem::operator==(src) &&
                 (m_image == src.m_image);
 
   return result;
diff --git a/glom/libglom/data_structure/layout/layoutitem_image.h 
b/glom/libglom/data_structure/layout/layoutitem_image.h
index 3a94b97..762c8f9 100644
--- a/glom/libglom/data_structure/layout/layoutitem_image.h
+++ b/glom/libglom/data_structure/layout/layoutitem_image.h
@@ -33,7 +33,7 @@ namespace Glom
   const char GLOM_IMAGE_FORMAT[] = "png";
   const char GLOM_IMAGE_FORMAT_MIME_TYPE[] = "image/png";
 
-class LayoutItem_Image 
+class LayoutItem_Image
  : public LayoutItem
 {
 public:
diff --git a/glom/libglom/data_structure/layout/layoutitem_line.cc 
b/glom/libglom/data_structure/layout/layoutitem_line.cc
index 0e5c410..ddd58d2 100644
--- a/glom/libglom/data_structure/layout/layoutitem_line.cc
+++ b/glom/libglom/data_structure/layout/layoutitem_line.cc
@@ -54,10 +54,10 @@ LayoutItem* LayoutItem_Line::clone() const
 
 bool LayoutItem_Line::operator==(const LayoutItem_Line& src) const
 {
-  auto result = LayoutItem::operator==(src) && 
-                (m_start_x == src.m_start_x) && 
-                (m_start_y == src.m_start_y) && 
-                (m_end_x == src.m_end_x) && 
+  auto result = LayoutItem::operator==(src) &&
+                (m_start_x == src.m_start_x) &&
+                (m_start_y == src.m_start_y) &&
+                (m_end_x == src.m_end_x) &&
                 (m_end_y == src.m_end_y) &&
                 (m_line_width == src.m_line_width) &&
                 (m_color == src.m_color);
@@ -107,7 +107,7 @@ void LayoutItem_Line::set_coordinates(double start_x, double start_y, double end
   m_end_x = end_x;
   m_end_y = end_y;
 
-  //Set the x,y,height,width too, 
+  //Set the x,y,height,width too,
   //for generic code that deals with that API:
   set_print_layout_position(m_start_x, m_start_y, (m_end_x - m_start_x), (m_end_y - m_start_y));
 }
@@ -121,7 +121,7 @@ void LayoutItem_Line::set_line_width(double line_width)
 {
   m_line_width = line_width;
 }
-  
+
 Glib::ustring LayoutItem_Line::get_line_color() const
 {
   return m_color;
diff --git a/glom/libglom/data_structure/layout/layoutitem_line.h 
b/glom/libglom/data_structure/layout/layoutitem_line.h
index 451597e..eb29ba5 100644
--- a/glom/libglom/data_structure/layout/layoutitem_line.h
+++ b/glom/libglom/data_structure/layout/layoutitem_line.h
@@ -28,7 +28,7 @@ namespace Glom
 {
 
 /// This is only used on print layouts.
-class LayoutItem_Line 
+class LayoutItem_Line
  : public LayoutItem
 {
 public:
@@ -52,10 +52,10 @@ public:
   /** Set the coordinates.
    */
   void set_coordinates(double start_x, double start_y, double end_x, double end_y);
-  
+
   double get_line_width() const;
   void set_line_width(double line_width);
-  
+
   /** Get the line color in CSS3 format.
    */
   Glib::ustring get_line_color() const;
diff --git a/glom/libglom/data_structure/layout/layoutitem_placeholder.cc 
b/glom/libglom/data_structure/layout/layoutitem_placeholder.cc
index bf3bfca..99a4405 100644
--- a/glom/libglom/data_structure/layout/layoutitem_placeholder.cc
+++ b/glom/libglom/data_structure/layout/layoutitem_placeholder.cc
@@ -2,19 +2,19 @@
 /*
  * glom
  * Copyright (C) Johannes Schmid 2007 <jhs gnome org>
- * 
+ *
  * glom is free software.
- * 
+ *
  * You may redistribute it and/or modify it under the terms of the
  * GNU General Public License, as published by the Free Software
  * Foundation; either version 2 of the License, or (at your option)
  * any later version.
- * 
+ *
  * glom is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  * See the GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with glom.  If not, write to:
  *   The Free Software Foundation, Inc.,
@@ -28,26 +28,26 @@
 
 namespace Glom
 {
-  
+
 LayoutItem_Placeholder::LayoutItem_Placeholder()
 {
 
 }
-  
+
 LayoutItem_Placeholder::LayoutItem_Placeholder(const LayoutItem_Placeholder& src) :
   LayoutItem(src)
 {
-  
+
 }
-  
+
 LayoutItem* LayoutItem_Placeholder::clone() const
 {
   return new LayoutItem_Placeholder(*this);
 }
-  
+
 bool LayoutItem_Placeholder::operator==(const LayoutItem_Placeholder* src) const
 {
-  return LayoutItem::operator==(*src);  
+  return LayoutItem::operator==(*src);
 }
 
 Glib::ustring LayoutItem_Placeholder::get_part_type_name() const
diff --git a/glom/libglom/data_structure/layout/layoutitem_placeholder.h 
b/glom/libglom/data_structure/layout/layoutitem_placeholder.h
index 0aa8a34..92cf5d7 100644
--- a/glom/libglom/data_structure/layout/layoutitem_placeholder.h
+++ b/glom/libglom/data_structure/layout/layoutitem_placeholder.h
@@ -2,19 +2,19 @@
 /*
  * glom
  * Copyright (C) Johannes Schmid 2007 <jhs gnome org>
- * 
+ *
  * glom is free software.
- * 
+ *
  * You may redistribute it and/or modify it under the terms of the
  * GNU General Public License, as published by the Free Software
  * Foundation; either version 2 of the License, or (at your option)
  * any later version.
- * 
+ *
  * glom is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  * See the GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with glom.  If not, write to:
  *   The Free Software Foundation, Inc.,
@@ -30,24 +30,24 @@
 namespace Glom
 {
 
-class LayoutItem_Placeholder: public LayoutItem 
+class LayoutItem_Placeholder: public LayoutItem
 {
 public:
   LayoutItem_Placeholder();
-  
+
   LayoutItem_Placeholder(const LayoutItem_Placeholder& src);
   LayoutItem_Placeholder(LayoutItem_Placeholder&& src) = delete;
 
   //TODO: Add operator=().
-  
+
   /** Create a new copied instance.
   * This allows us to deep-copy a list of LayoutItems.
   */
   LayoutItem* clone() const override;
-  
+
   Glib::ustring get_part_type_name() const override;
   Glib::ustring get_report_part_id() const override;
-  
+
   bool operator==(const LayoutItem_Placeholder* src) const;
 };
 
diff --git a/glom/libglom/data_structure/layout/layoutitem_portal.cc 
b/glom/libglom/data_structure/layout/layoutitem_portal.cc
index f15587b..51e32ee 100644
--- a/glom/libglom/data_structure/layout/layoutitem_portal.cc
+++ b/glom/libglom/data_structure/layout/layoutitem_portal.cc
@@ -173,7 +173,7 @@ void LayoutItem_Portal::get_rows_count(gulong& rows_count_min, gulong& rows_coun
   rows_count_min = m_rows_count_min;
   rows_count_max = m_rows_count_max;
 }
-  
+
 void LayoutItem_Portal::set_rows_count(gulong rows_count_min, gulong rows_count_max)
 {
   m_rows_count_min = rows_count_min;
@@ -198,7 +198,7 @@ double LayoutItem_Portal::get_print_layout_column_line_width() const
 {
   return m_print_layout_column_line_width;
 }
-  
+
 void LayoutItem_Portal::set_print_layout_column_line_width(double width)
 {
   m_print_layout_column_line_width = width;
@@ -251,7 +251,7 @@ void LayoutItem_Portal::get_suitable_table_to_view_details(Glib::ustring& table_
   }
   else if(get_navigation_type() != LayoutItem_Portal::navigation_type::NONE)
   {
-    //An empty result from get_portal_navigation_relationship_automatic() or 
+    //An empty result from get_portal_navigation_relationship_automatic() or
     //get_navigation_relationship_specific() means we should use the directly related table:
     navigation_table_name = directly_related_table_name;
   }
@@ -261,13 +261,13 @@ void LayoutItem_Portal::get_suitable_table_to_view_details(Glib::ustring& table_
     //std::cerr << G_STRFUNC << ": navigation_table_name is empty.\n";
     return;
   }
-  
+
   if(!document)
   {
     std::cerr << G_STRFUNC << ": document is null\n";
     return;
   }
-  
+
   if(document->get_table_is_hidden(navigation_table_name))
   {
     std::cerr << G_STRFUNC << ": navigation_table_name indicates a hidden table: " << navigation_table_name 
<< std::endl;
@@ -339,7 +339,7 @@ std::shared_ptr<const LayoutItem_Field> LayoutItem_Portal::get_field_is_from_non
     std::cerr << G_STRFUNC << ": document is null\n";
     return result;
   }
-  
+
   const auto parent_table_name = get_table_used(Glib::ustring() /* parent table - not relevant */);
 
   auto items = get_items();
@@ -404,7 +404,7 @@ Glib::ustring LayoutItem_Portal::get_title_or_name(const Glib::ustring& locale)
   auto title = get_title_used(Glib::ustring() /* parent table - not relevant */, locale);
   if(title.empty())
     title = get_relationship_name_used();
-  
+
   if(title.empty()) //TODO: This prevents "" as a real title.
    title = _("Undefined Table");
 
diff --git a/glom/libglom/data_structure/layout/layoutitem_portal.h 
b/glom/libglom/data_structure/layout/layoutitem_portal.h
index f0a136c..ba95c38 100644
--- a/glom/libglom/data_structure/layout/layoutitem_portal.h
+++ b/glom/libglom/data_structure/layout/layoutitem_portal.h
@@ -39,7 +39,7 @@ class Document; //For the utility functions.
 class LayoutItem_Portal
 : public LayoutGroup,
   public UsesRelationship
-  
+
   //TODO: Allow portals to have custom titles that override the relationship titles?
   //public HasTitleSingular
 {
@@ -68,24 +68,24 @@ public:
 
   //virtual void debug(guint level = 0) const;
 
-  /** Gets the relationship to use for navigation if get_navigation_type() is 
+  /** Gets the relationship to use for navigation if get_navigation_type() is
    * NAVIGATION_NONE.
    */
   std::shared_ptr<UsesRelationship> get_navigation_relationship_specific();
 
-  /** Get the @a relationship to use for navigation if get_navigation_type() is 
+  /** Get the @a relationship to use for navigation if get_navigation_type() is
    * NAVIGATION_NONE.
    */
   std::shared_ptr<const UsesRelationship> get_navigation_relationship_specific() const;
 
-  /** Set the @a relationship to use for navigation if get_navigation_type() is 
+  /** Set the @a relationship to use for navigation if get_navigation_type() is
    * NAVIGATION_NONE.
    */
   void set_navigation_relationship_specific(const std::shared_ptr<UsesRelationship>& relationship);
 
   void reset_navigation_relationship();
 
-  /** The navigation (if any) that should be used when the user 
+  /** The navigation (if any) that should be used when the user
    * activates a related record row.
    */
   enum class navigation_type
@@ -95,16 +95,16 @@ public:
     SPECIFIC /**< The destination related table will be determined by a specified relationship. */
   };
 
-  /** Discover what @a type (if any) navigation should be used when the user 
+  /** Discover what @a type (if any) navigation should be used when the user
    * activates a related record row.
    */
   navigation_type get_navigation_type() const;
 
-  /** Set what @a type (if any) navigation should be used when the user 
+  /** Set what @a type (if any) navigation should be used when the user
    * activates a related record row.
    */
   void set_navigation_type(navigation_type type);
-  
+
   /** Discover what table to show when clicking on a related record.
    * This table will not necessarily just be the directly related table.
    * The caller should check, in the document, that the returned @a table_name is not hidden.
@@ -129,26 +129,26 @@ public:
 
   /// This is used only for the print layouts.
   double get_print_layout_row_line_width() const;
-    
+
   /// This is used only for the print layouts.
   void set_print_layout_row_line_width(double width);
-  
+
   /// This is used only for the print layouts.
   double get_print_layout_column_line_width() const;
-  
+
   /// This is used only for the print layouts.
   void set_print_layout_column_line_width(double width);
-  
+
   /// This is used only for the print layouts.
   Glib::ustring get_print_layout_line_color() const;
-  
+
   /// This is used only for the print layouts.
   void set_print_layout_line_color(const Glib::ustring& color);
-  
+
   /** Get the number of rows that should be displayed.
    */
   void get_rows_count(gulong& rows_count_min, gulong& rows_count_max) const;
-  
+
   /** Set the number of rows that should be displayed.
    */
   void set_rows_count(gulong rows_count_min, gulong rows_count_max);
@@ -169,7 +169,7 @@ private:
 
   //If no navigation relationship has been specified then it will be automatically chosen or navigation will 
be disabled:
   navigation_type m_navigation_type;
-  
+
   gulong m_rows_count_min, m_rows_count_max;
 };
 
diff --git a/glom/libglom/data_structure/layout/layoutitem_text.cc 
b/glom/libglom/data_structure/layout/layoutitem_text.cc
index a72930a..67a942a 100644
--- a/glom/libglom/data_structure/layout/layoutitem_text.cc
+++ b/glom/libglom/data_structure/layout/layoutitem_text.cc
@@ -46,7 +46,7 @@ LayoutItem* LayoutItem_Text::clone() const
 
 bool LayoutItem_Text::operator==(const LayoutItem_Text& src) const
 {
-  auto result = LayoutItem_WithFormatting::operator==(src) && 
+  auto result = LayoutItem_WithFormatting::operator==(src) &&
                 (*m_text == *(src.m_text));
 
   return result;
diff --git a/glom/libglom/data_structure/layout/layoutitem_text.h 
b/glom/libglom/data_structure/layout/layoutitem_text.h
index 8afb524..149a01c 100644
--- a/glom/libglom/data_structure/layout/layoutitem_text.h
+++ b/glom/libglom/data_structure/layout/layoutitem_text.h
@@ -32,7 +32,7 @@ namespace Glom
  * The base class TranslatableItem holds the title,
  * and the actual (translatable) text is in the m_text member.
  */
-class LayoutItem_Text 
+class LayoutItem_Text
  : public LayoutItem_WithFormatting
 {
 public:
diff --git a/glom/libglom/data_structure/layout/layoutitem_withformatting.cc 
b/glom/libglom/data_structure/layout/layoutitem_withformatting.cc
index 8ff225a..daba8cb 100644
--- a/glom/libglom/data_structure/layout/layoutitem_withformatting.cc
+++ b/glom/libglom/data_structure/layout/layoutitem_withformatting.cc
@@ -35,7 +35,7 @@ LayoutItem_WithFormatting::LayoutItem_WithFormatting(const LayoutItem_WithFormat
 
 bool LayoutItem_WithFormatting::operator==(const LayoutItem_WithFormatting& src) const
 {
-  auto result = LayoutItem::operator==(src) && 
+  auto result = LayoutItem::operator==(src) &&
                 (m_formatting == src.m_formatting);
 
   return result;
@@ -59,12 +59,12 @@ const Formatting& LayoutItem_WithFormatting::get_formatting_used() const
 Formatting::HorizontalAlignment LayoutItem_WithFormatting::get_formatting_used_horizontal_alignment(bool /* 
for_details_view */) const
 {
   const auto format = get_formatting_used();
-  Formatting::HorizontalAlignment alignment = 
+  Formatting::HorizontalAlignment alignment =
     format.get_horizontal_alignment();
-  
+
   if(alignment == Formatting::HorizontalAlignment::AUTO)
     alignment = Formatting::HorizontalAlignment::LEFT;
-  
+
   return alignment;
 }
 
diff --git a/glom/libglom/data_structure/layout/layoutitem_withformatting.h 
b/glom/libglom/data_structure/layout/layoutitem_withformatting.h
index f49a750..70eeabd 100644
--- a/glom/libglom/data_structure/layout/layoutitem_withformatting.h
+++ b/glom/libglom/data_structure/layout/layoutitem_withformatting.h
@@ -30,7 +30,7 @@ namespace Glom
 /** A base class for all layout items that may have formatting options.
  * See get_formatting_used().
  */
-class LayoutItem_WithFormatting 
+class LayoutItem_WithFormatting
  : public LayoutItem
 {
 public:
@@ -45,7 +45,7 @@ public:
 
   Formatting m_formatting;
 
-  /** Get the field formatting used by this layout item, which 
+  /** Get the field formatting used by this layout item, which
    * may be either custom field formatting or the default field formatting.
    */
   virtual const Formatting& get_formatting_used() const;
diff --git a/glom/libglom/data_structure/layout/report_parts/layoutitem_footer.h 
b/glom/libglom/data_structure/layout/report_parts/layoutitem_footer.h
index d3fd418..0b67b20 100644
--- a/glom/libglom/data_structure/layout/report_parts/layoutitem_footer.h
+++ b/glom/libglom/data_structure/layout/report_parts/layoutitem_footer.h
@@ -27,7 +27,7 @@
 namespace Glom
 {
 
-/** 
+/**
  */
 class LayoutItem_Footer
 : public LayoutGroup
diff --git a/glom/libglom/data_structure/layout/report_parts/layoutitem_groupby.h 
b/glom/libglom/data_structure/layout/report_parts/layoutitem_groupby.h
index 4fb25f9..12db52c 100644
--- a/glom/libglom/data_structure/layout/report_parts/layoutitem_groupby.h
+++ b/glom/libglom/data_structure/layout/report_parts/layoutitem_groupby.h
@@ -17,7 +17,7 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  */
- 
+
 #ifndef GLOM_DATASTRUCTURE_LAYOUTITEM_GROUPBY_H
 #define GLOM_DATASTRUCTURE_LAYOUTITEM_GROUPBY_H
 
@@ -72,7 +72,7 @@ public:
 
   std::shared_ptr<LayoutGroup> get_secondary_fields();
   std::shared_ptr<const LayoutGroup> get_secondary_fields() const;
-  
+
 private:
 
   std::shared_ptr<LayoutItem_Field> m_field_group_by;
diff --git a/glom/libglom/data_structure/layout/report_parts/layoutitem_header.h 
b/glom/libglom/data_structure/layout/report_parts/layoutitem_header.h
index a337ffb..2e98103 100644
--- a/glom/libglom/data_structure/layout/report_parts/layoutitem_header.h
+++ b/glom/libglom/data_structure/layout/report_parts/layoutitem_header.h
@@ -27,7 +27,7 @@
 namespace Glom
 {
 
-/** 
+/**
  */
 class LayoutItem_Header
 : public LayoutGroup
diff --git a/glom/libglom/data_structure/layout/report_parts/layoutitem_summary.h 
b/glom/libglom/data_structure/layout/report_parts/layoutitem_summary.h
index b19b1bc..2ad0181 100644
--- a/glom/libglom/data_structure/layout/report_parts/layoutitem_summary.h
+++ b/glom/libglom/data_structure/layout/report_parts/layoutitem_summary.h
@@ -17,7 +17,7 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  */
- 
+
 #ifndef GLOM_DATASTRUCTURE_LAYOUTITEM_SUMMARY_H
 #define GLOM_DATASTRUCTURE_LAYOUTITEM_SUMMARY_H
 
diff --git a/glom/libglom/data_structure/layout/static_text.cc 
b/glom/libglom/data_structure/layout/static_text.cc
index f22eee0..6dc7f89 100644
--- a/glom/libglom/data_structure/layout/static_text.cc
+++ b/glom/libglom/data_structure/layout/static_text.cc
@@ -17,7 +17,7 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  */
- 
+
 #include <libglom/data_structure/layout/static_text.h>
 
 namespace Glom
diff --git a/glom/libglom/data_structure/layout/static_text.h 
b/glom/libglom/data_structure/layout/static_text.h
index 52e1f85..f7a172b 100644
--- a/glom/libglom/data_structure/layout/static_text.h
+++ b/glom/libglom/data_structure/layout/static_text.h
@@ -28,7 +28,7 @@ namespace Glom
 
 /** This reuses the title concept of the TranslatableItem base class to give us translatable text.
  */
-class StaticText 
+class StaticText
  : public TranslatableItem
 {
 public:
diff --git a/glom/libglom/data_structure/layout/usesrelationship.cc 
b/glom/libglom/data_structure/layout/usesrelationship.cc
index 73372b2..dcdbfa7 100644
--- a/glom/libglom/data_structure/layout/usesrelationship.cc
+++ b/glom/libglom/data_structure/layout/usesrelationship.cc
@@ -216,13 +216,13 @@ Glib::ustring UsesRelationship::get_sql_join_alias_name() const
 Glib::ustring UsesRelationship::get_relationship_display_name() const
 {
   Glib::ustring result;
-  
+
   if(get_has_relationship_name())
     result = get_relationship_name();
 
   if(get_has_related_relationship_name())
     result += ("::" + get_related_relationship_name());
-  
+
   return result;
 }
 
diff --git a/glom/libglom/data_structure/layout/usesrelationship.h 
b/glom/libglom/data_structure/layout/usesrelationship.h
index 77c7883..5752f15 100644
--- a/glom/libglom/data_structure/layout/usesrelationship.h
+++ b/glom/libglom/data_structure/layout/usesrelationship.h
@@ -17,7 +17,7 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  */
- 
+
 #ifndef GLOM_DATASTRUCTURE_LAYOUT_USESRELATIONSHIP_H
 #define GLOM_DATASTRUCTURE_LAYOUT_USESRELATIONSHIP_H
 
@@ -30,7 +30,7 @@ namespace Glom
 
 class Field;
 
-/* Base class for classes that need to store a relationship name 
+/* Base class for classes that need to store a relationship name
 * and a cache of the actual relationship information.
 */
 class UsesRelationship
@@ -57,17 +57,17 @@ public:
   Glib::ustring get_related_relationship_name() const;
 
   /** Return the relationship used by this item, if any, or a null std::shared_ptr.
-   * See also get_has_relationship_name() which can prevent the need for your  
+   * See also get_has_relationship_name() which can prevent the need for your
    * own null std::shared_ptr check.
-   */ 
+   */
   std::shared_ptr<const Relationship> get_relationship() const;
 
   void set_relationship(const std::shared_ptr<const Relationship>& relationship);
 
   /** Return the related relationship used by this item, if any, or a null std::shared_ptr.
-   * See also get_has_related_relationship_name() which can prevent the need for your  
+   * See also get_has_related_relationship_name() which can prevent the need for your
    * own null std::shared_ptr check.
-   */ 
+   */
   std::shared_ptr<const Relationship> get_related_relationship() const;
 
   void set_related_relationship(const std::shared_ptr<const Relationship>& relationship);
@@ -81,7 +81,7 @@ public:
    * @param parent_table_title The title of table to which the item (or its relatinoships) belong.
    */
   Glib::ustring get_title_used(const Glib::ustring& parent_table_title, const Glib::ustring& locale) const;
-  
+
   /** Get the singular title of the relationship that is actually used,
    * falling back to the regular (plural) title, and then to the relationship's name.
    * @param parent_table_title The title of table to which the item (or its relatinoships) belong.
@@ -90,28 +90,28 @@ public:
 
   Glib::ustring get_to_field_used() const;
 
-  /** Get the name of the related relationship used, if any, or the relationship 
-   * if there is no related relationship, or an empty string if neither are 
+  /** Get the name of the related relationship used, if any, or the relationship
+   * if there is no related relationship, or an empty string if neither are
    * used by this item.
-   */ 
+   */
   Glib::ustring get_relationship_name_used() const;
 
-  /** Discover whether the relationship used allows the user to edit values 
+  /** Discover whether the relationship used allows the user to edit values
    * in its to table.
    */
   bool get_relationship_used_allows_edit() const;
 
   /** Get a name to use as an alias in SQL statements.
    * This will always be the same string for items that have the same definition.
-   */ 
+   */
   Glib::ustring get_sql_join_alias_name() const;
-  
+
   /** Get the item's alias name, if it uses a relationship, or just get its table name.
    * @param parent_table The table to which the item (or its relatinoships) belong.
-   */ 
+   */
   Glib::ustring get_sql_table_or_join_alias_name(const Glib::ustring& parent_table) const;
-  
-  
+
+
   /** Get a human-readable representation of th relationship.
    * This just concatenates the chain of relationships, separating them by ":".
    */
diff --git a/glom/libglom/data_structure/numeric_format.cc b/glom/libglom/data_structure/numeric_format.cc
index 3142b41..0cec819 100644
--- a/glom/libglom/data_structure/numeric_format.cc
+++ b/glom/libglom/data_structure/numeric_format.cc
@@ -49,10 +49,10 @@ NumericFormat& NumericFormat::operator=(const NumericFormat& src)
 
 bool NumericFormat::operator==(const NumericFormat& src) const
 {
-  return (m_currency_symbol == src.m_currency_symbol) && 
+  return (m_currency_symbol == src.m_currency_symbol) &&
          (m_use_thousands_separator == src.m_use_thousands_separator) &&
          (m_decimal_places_restricted == src.m_decimal_places_restricted) &&
-         (m_decimal_places == src.m_decimal_places) && 
+         (m_decimal_places == src.m_decimal_places) &&
          (m_alt_foreground_color_for_negatives == src.m_alt_foreground_color_for_negatives);
 }
 
diff --git a/glom/libglom/data_structure/numeric_format.h b/glom/libglom/data_structure/numeric_format.h
index 7bce000..38f238f 100644
--- a/glom/libglom/data_structure/numeric_format.h
+++ b/glom/libglom/data_structure/numeric_format.h
@@ -38,7 +38,7 @@ public:
 
   bool operator==(const NumericFormat& src) const;
   bool operator!=(const NumericFormat& src) const;
-  
+
   /** The foreground color to use for negative values, if
    * m_alt_foreground_color_for_negatives is true.
    * @returns the foreground color, in a format recognised by XParseColor
@@ -74,7 +74,7 @@ public:
    * m_decimal_places_restricted is false.
    */
   guint m_decimal_places;
-  
+
   /** Whether to use an alternative foreground color for negative values. */
   bool m_alt_foreground_color_for_negatives;
 };
diff --git a/glom/libglom/data_structure/print_layout.cc b/glom/libglom/data_structure/print_layout.cc
index d876789..015d4ed 100644
--- a/glom/libglom/data_structure/print_layout.cc
+++ b/glom/libglom/data_structure/print_layout.cc
@@ -61,7 +61,7 @@ PrintLayout& PrintLayout::operator=(const PrintLayout& src)
   m_page_count = src.m_page_count;
   m_horizontal_rules = src.m_horizontal_rules;
   m_vertical_rules = src.m_vertical_rules;
-  
+
   return *this;
 }
 
diff --git a/glom/libglom/data_structure/print_layout.h b/glom/libglom/data_structure/print_layout.h
index 79e6257..e06ed30 100644
--- a/glom/libglom/data_structure/print_layout.h
+++ b/glom/libglom/data_structure/print_layout.h
@@ -47,10 +47,10 @@ public:
    */
   void set_page_setup(const std::string& page_setup);
 
-  /** Returns the Page Setup as it would be created by a Gtk::PageSetup.   
+  /** Returns the Page Setup as it would be created by a Gtk::PageSetup.
    */
   std::string get_page_setup() const;
-  
+
   void set_page_count(guint count);
   guint get_page_count() const;
 
diff --git a/glom/libglom/data_structure/privileges.h b/glom/libglom/data_structure/privileges.h
index ed73c02..40debb7 100644
--- a/glom/libglom/data_structure/privileges.h
+++ b/glom/libglom/data_structure/privileges.h
@@ -31,7 +31,7 @@ namespace Glom
 
 class Privileges
 {
-public: 
+public:
   Privileges();
   Privileges(const Privileges& src);
   Privileges(Privileges&& src);
diff --git a/glom/libglom/data_structure/relationship.h b/glom/libglom/data_structure/relationship.h
index 05cbaa4..6777f48 100644
--- a/glom/libglom/data_structure/relationship.h
+++ b/glom/libglom/data_structure/relationship.h
@@ -32,7 +32,7 @@ class Relationship
  : public TranslatableItem,
    public HasTitleSingular
 {
-public: 
+public:
   Relationship();
   Relationship(const Relationship& src);
   Relationship(Relationship&& src) = delete;
diff --git a/glom/libglom/data_structure/system_prefs.cc b/glom/libglom/data_structure/system_prefs.cc
index f8be6ba..1740918 100644
--- a/glom/libglom/data_structure/system_prefs.cc
+++ b/glom/libglom/data_structure/system_prefs.cc
@@ -17,7 +17,7 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  */
- 
+
 #include <libglom/data_structure/system_prefs.h>
 
 namespace Glom
diff --git a/glom/libglom/data_structure/system_prefs.h b/glom/libglom/data_structure/system_prefs.h
index 7423e82..b63c679 100644
--- a/glom/libglom/data_structure/system_prefs.h
+++ b/glom/libglom/data_structure/system_prefs.h
@@ -39,11 +39,11 @@ public:
 
   bool operator==(const SystemPrefs& src) const;
   bool operator!=(const SystemPrefs& src) const;
- 
+
 
   //TODO: Add getters and setters:
   Glib::ustring m_name, m_org_name,
-    m_org_address_street, m_org_address_street2, m_org_address_town, 
+    m_org_address_street, m_org_address_street2, m_org_address_town,
     m_org_address_county, m_org_address_country, m_org_address_postcode;
   Gnome::Gda::Value m_org_logo; //enumType::IMAGE.
 };
diff --git a/glom/libglom/data_structure/tableinfo.cc b/glom/libglom/data_structure/tableinfo.cc
index 5fd58ca..e1e626e 100644
--- a/glom/libglom/data_structure/tableinfo.cc
+++ b/glom/libglom/data_structure/tableinfo.cc
@@ -52,7 +52,7 @@ TableInfo& TableInfo::operator=(const TableInfo& src) noexcept
 bool TableInfo::operator==(const TableInfo& src) const noexcept
 {
   return TranslatableItem::operator==(src) &&
-    HasTitleSingular::operator==(src) && 
+    HasTitleSingular::operator==(src) &&
     (m_hidden == src.m_hidden) &&
     (m_default == src.m_default);
 }
diff --git a/glom/libglom/data_structure/translatable_item.cc 
b/glom/libglom/data_structure/translatable_item.cc
index 72ab2d7..6f48652 100644
--- a/glom/libglom/data_structure/translatable_item.cc
+++ b/glom/libglom/data_structure/translatable_item.cc
@@ -191,7 +191,7 @@ void TranslatableItem::set_title_original(const Glib::ustring& title) noexcept
 void TranslatableItem::clear_title_in_all_locales() noexcept
 {
   m_title.clear();
-  
+
   for(const auto& the_pair : m_map_translations)
   {
     auto translation = the_pair.second;
diff --git a/glom/libglom/data_structure/translatable_item.h b/glom/libglom/data_structure/translatable_item.h
index bf50f45..96609f4 100644
--- a/glom/libglom/data_structure/translatable_item.h
+++ b/glom/libglom/data_structure/translatable_item.h
@@ -72,12 +72,12 @@ public:
   virtual Glib::ustring get_title_original() const noexcept;
 
   /** Get the title's translation for the specified @a locale, optionally
-   * falling back to a locale of the same language, and then falling back to 
+   * falling back to a locale of the same language, and then falling back to
    * the original.
    * Calling this with the current locale is the same as calling get_title_original().
    */
   Glib::ustring get_title_translation(const Glib::ustring& locale, bool fallback = true) const noexcept;
-  
+
 
   /** Set the title's translation for the specified locale.
    * @param title The text of the title.
diff --git a/glom/libglom/db_utils.cc b/glom/libglom/db_utils.cc
index efe1e45..b0532c5 100644
--- a/glom/libglom/db_utils.cc
+++ b/glom/libglom/db_utils.cc
@@ -165,7 +165,7 @@ bool create_database(const std::shared_ptr<Document>& document, const Glib::ustr
       std::cerr << G_STRFUNC << ": add_standard_tables() failed.\n";
       return false;
     }
-    
+
     if(progress)
       progress();
 
@@ -177,7 +177,7 @@ bool create_database(const std::shared_ptr<Document>& document, const Glib::ustr
       std::cerr << G_STRFUNC << ": add_standard_groups() failed.\n";
       return false;
     }
-    
+
     if(progress)
       progress();
 
@@ -198,7 +198,7 @@ bool create_database(const std::shared_ptr<Document>& document, const Glib::ustr
 
     if(progress)
       progress();
-    
+
     //Save the port, if appropriate, so the document can be used to connect again:
     auto backend = connection_pool->get_backend();
     auto central = std::dynamic_pointer_cast<Glom::ConnectionPoolBackends::PostgresCentralHosted>(backend);
@@ -309,7 +309,7 @@ bool recreate_database_from_document(const std::shared_ptr<Document>& document,
     std::cerr << G_STRFUNC << ": add_groups_from_document() failed.\n";
     return false;
   }
-  
+
   //Set table privileges, using the groups we just added:
   if(progress)
     progress();
@@ -318,7 +318,7 @@ bool recreate_database_from_document(const std::shared_ptr<Document>& document,
     std::cerr << G_STRFUNC << ": set_table_privileges_groups_from_document() failed.\n";
     return false;
   }
-    
+
   for(const auto& table_info : tables)
   {
     //Add any example data to the table:
@@ -344,7 +344,7 @@ bool recreate_database_from_document(const std::shared_ptr<Document>& document,
     //}
 
   } //for(tables)
-  
+
   return true; //All tables created successfully.
 }
 
@@ -429,7 +429,7 @@ SystemPrefs get_database_preferences(const std::shared_ptr<const Document>& docu
       {
          std::cerr << G_STRFUNC << ": add_standard_tables() failed.\n";
       }
-      
+
       ++attempts; //Try again now that we have tried to create the table.
     }
   }
@@ -969,7 +969,7 @@ type_vec_fields get_fields_for_table_from_database(const Glib::ustring& table_na
   return result;
 }
 
-//TODO: This is very inefficient, because it is 
+//TODO: This is very inefficient, because it is
 type_vec_fields get_fields_for_table(const std::shared_ptr<const Document>& document, const Glib::ustring& 
table_name, bool /* including_system_fields */)
 {
   //We could also get the field definitions from the database:
@@ -994,7 +994,7 @@ type_vec_fields get_fields_for_table(const std::shared_ptr<const Document>& docu
 
     //Get the field info from the database:
     //This is in the document as well, but it _might_ have changed.
-    const auto iterFindDatabase = 
+    const auto iterFindDatabase =
       find_if_same_name(fieldsDatabase, field_name);
 
     if(iterFindDatabase != fieldsDatabase.end() ) //Ignore fields that don't exist in the database anymore.
@@ -1199,7 +1199,7 @@ bool create_table_with_default_fields(const std::shared_ptr<Document>& document,
     std::cerr << G_STRFUNC << ": document was null.\n";
     return false;
   }
-  
+
   created = create_table(document->get_hosting_mode(), table_info, fields);
   if(created)
   {
@@ -1368,13 +1368,13 @@ static void builder_set_where_autoincrement(const Glib::RefPtr<Gnome::Gda::SqlBu
     std::cerr << G_STRFUNC << ": table_name is empty\n";
     return;
   }
-  
+
   if(field_name.empty())
   {
     std::cerr << G_STRFUNC << ": field_name is empty\n";
     return;
   }
-  
+
   builder->set_where(builder->add_cond(Gnome::Gda::SQL_OPERATOR_TYPE_AND,
     builder->add_cond(Gnome::Gda::SQL_OPERATOR_TYPE_EQ,
       builder->add_field_id(GLOM_STANDARD_TABLE_AUTOINCREMENTS_FIELD_TABLE_NAME, 
GLOM_STANDARD_TABLE_AUTOINCREMENTS_TABLE_NAME),
@@ -1391,13 +1391,13 @@ Gnome::Gda::Value get_next_auto_increment_value(const Glib::ustring& table_name,
     std::cerr << G_STRFUNC << ": table_name is empty\n";
     return Gnome::Gda::Value();
   }
-  
+
   if(field_name.empty())
   {
     std::cerr << G_STRFUNC << ": field_name is empty\n";
     return Gnome::Gda::Value();
   }
-  
+
   const auto result = DbUtils::auto_increment_insert_first_if_necessary(table_name, field_name);
   double num_result = Conversions::get_double_for_gda_value_numeric(result);
 
@@ -1424,7 +1424,7 @@ Gnome::Gda::Value auto_increment_insert_first_if_necessary(const Glib::ustring&
     std::cerr << G_STRFUNC << ": table_name is empty\n";
     return Gnome::Gda::Value();
   }
-  
+
   if(field_name.empty())
   {
     std::cerr << G_STRFUNC << ": field_name is empty\n";
@@ -1493,7 +1493,7 @@ static void recalculate_next_auto_increment_value(const Glib::ustring& table_nam
     std::cerr << G_STRFUNC << ": table_name is empty\n";
     return;
   }
-  
+
   if(field_name.empty())
   {
     std::cerr << G_STRFUNC << ": field_name is empty\n";
@@ -1550,13 +1550,13 @@ void remove_auto_increment(const Glib::ustring& table_name, const Glib::ustring&
     std::cerr << G_STRFUNC << ": table_name is empty\n";
     return;
   }
-  
+
   if(field_name.empty())
   {
     std::cerr << G_STRFUNC << ": field_name is empty\n";
     return;
   }
-  
+
   auto builder =
     Gnome::Gda::SqlBuilder::create(Gnome::Gda::SQL_STATEMENT_DELETE);
   builder->set_table(GLOM_STANDARD_TABLE_AUTOINCREMENTS_TABLE_NAME);
@@ -1780,7 +1780,7 @@ bool query_execute_string(const Glib::ustring& strQuery, const Glib::RefPtr<Gnom
     std::cerr << G_STRFUNC << ":   full_query: " << full_query << std::endl;
     return false;
   }
-  
+
   //Note that only -1 means an error, not all negative values.
   //For instance, it can return -2 for a successful CREATE TABLE query, to mean that the backend (SQLite) 
does not report how many rows were affected.
   if(exec_retval == -1)
@@ -1789,7 +1789,7 @@ bool query_execute_string(const Glib::ustring& strQuery, const Glib::RefPtr<Gnom
     std::cerr << G_STRFUNC << "Gnome::Gda::Connection::statement_execute_non_select() failed with SQL: " << 
full_query << std::endl;
     return false;
   }
-  
+
   return true;
 }
 
@@ -1865,19 +1865,19 @@ bool layout_field_should_have_navigation(const Glib::ustring& table_name, const
 {
   //Initialize output parameter:
   field_used_in_relationship_to_one = std::shared_ptr<Relationship>();
-  
+
   if(!document)
   {
     std::cerr << G_STRFUNC << ": document was null.\n";
     return false;
   }
-  
+
   if(table_name.empty())
   {
     std::cerr << G_STRFUNC << ": table_name was empty.\n";
     return false;
-  } 
-  
+  }
+
   if(!layout_item)
   {
     std::cerr << G_STRFUNC << ": layout_item was null.\n";
@@ -1903,7 +1903,7 @@ bool layout_field_should_have_navigation(const Glib::ustring& table_name, const
 }
 
 Glib::ustring get_unused_database_name(const Glib::ustring& base_name)
-{ 
+{
   auto connection_pool = Glom::ConnectionPool::get_instance();
   if(!connection_pool)
     return Glib::ustring();
@@ -1937,7 +1937,7 @@ Glib::ustring get_unused_database_name(const Glib::ustring& base_name)
       database_name_possible = (base_name + pchExtraNum);
     }
     ++extra_num;
-    
+
     connection_pool->set_database(database_name_possible);
     connection_pool->set_ready_to_connect();
 
@@ -1966,8 +1966,8 @@ Glib::ustring get_unused_database_name(const Glib::ustring& base_name)
       }
     }
   }
-  
-  return Glib::ustring();    
+
+  return Glib::ustring();
 }
 
 int count_rows_returned_by(const Glib::RefPtr<const Gnome::Gda::SqlBuilder>& sql_query)
@@ -2041,7 +2041,7 @@ Glib::ustring escape_sql_id(const Glib::ustring& id)
     return id;
   }
 
-  //Always put it in quotes even if 
+  //Always put it in quotes even if
 
   return gda_connection->quote_sql_identifier(id);
 }
@@ -2179,7 +2179,7 @@ bool add_group(const std::shared_ptr<const Document>& document, const Glib::ustr
     std::cerr << G_STRFUNC << ": group is empty.\n";
     return false;
   }
- 
+
   const auto strQuery = DbUtils::build_query_create_group(group, superuser);
   //std::cout << "DEBUGCREATE: " << strQuery << std::endl;
   const auto test = DbUtils::query_execute_string(strQuery);
@@ -2209,7 +2209,7 @@ bool add_group(const std::shared_ptr<const Document>& document, const Glib::ustr
   //Do not fail if the autoincrements table does not yet exist, because this can happen during restoring of 
a backup.
   if(!Utils::find_exists(table_list, GLOM_STANDARD_TABLE_AUTOINCREMENTS_TABLE_NAME))
     return true;
-    
+
   if(!Privs::set_table_privileges(group, GLOM_STANDARD_TABLE_AUTOINCREMENTS_TABLE_NAME, priv))
   {
     std::cerr << G_STRFUNC << "Privs::set_table_privileges() failed.\n";
diff --git a/glom/libglom/db_utils.h b/glom/libglom/db_utils.h
index 10cae91..84ccda6 100644
--- a/glom/libglom/db_utils.h
+++ b/glom/libglom/db_utils.h
@@ -191,7 +191,7 @@ Glib::ustring escape_sql_id(const Glib::ustring& id);
 
 /** Just a wrapper around gda_rfc1738_encode(),
  * for use when building libgda connection strings or authentication strings.
- */ 
+ */
 Glib::ustring gda_cnc_string_encode(const Glib::ustring& str);
 
 Glib::ustring build_query_create_group(const Glib::ustring& group, bool superuser = false);
@@ -223,7 +223,7 @@ typedef std::map<Glib::ustring, Gnome::Gda::Value> type_map_fields;
 
 //TODO: Performance: This is massively inefficient:
 type_map_fields get_record_field_values(const std::shared_ptr<const Document>& document, const 
Glib::ustring& table_name, const std::shared_ptr<const Field>& primary_key, const Gnome::Gda::Value& 
primary_key_value);
-  
+
 /** Allow a fake connection, so sqlbuilder_get_full_query() can work.
  */
 void set_fake_connection();
diff --git a/glom/libglom/document/bakery/document.cc b/glom/libglom/document/bakery/document.cc
index e3f345a..98ad171 100644
--- a/glom/libglom/document/bakery/document.cc
+++ b/glom/libglom/document/bakery/document.cc
@@ -314,7 +314,7 @@ bool Document::write_to_disk()
             std::cerr << G_STRFUNC << ": This part of the URI is not a directory: " << parent->get_uri() <<  
std::endl;
             std::cerr << G_STRFUNC << ":   using m_file_uri = " << m_file_uri << std::endl;
             return false;
-          } 
+          }
         }
         else
         {
diff --git a/glom/libglom/document/bakery/document_xml.cc b/glom/libglom/document/bakery/document_xml.cc
index ec627c6..6c291c2 100644
--- a/glom/libglom/document/bakery/document_xml.cc
+++ b/glom/libglom/document/bakery/document_xml.cc
@@ -140,7 +140,7 @@ xmlpp::Element* Document_XML::get_node_document()
 {
   if(!m_dom_document)
     m_dom_document = m_dom_parser.get_document();
-  
+
   //Make sure that it has the DTD declaration:
   //TODO: Put this in a better place, where it's more guaranteed to always be set?
   //TODO: Add API to specify the PUBLIC URI, if the document should write this:
@@ -154,7 +154,7 @@ xmlpp::Element* Document_XML::get_node_document()
     //Add it if it isn't there already:
     nodeRoot = m_dom_document->create_root_node(m_root_node_name, m_root_xmlns);
   }
-  
+
   //Make sure that it has the root name name and xmlns:
   nodeRoot->set_namespace_declaration(m_root_xmlns);
 
@@ -182,7 +182,7 @@ void Document_XML::add_indenting_white_space_to_node(xmlpp::Node* node, const Gl
   }
   }
 
-  //All indents have a newline, 
+  //All indents have a newline,
   //and we add spaces each time we recurse:
   auto indent = start_indent;
   if(indent.empty())
diff --git a/glom/libglom/document/bakery/document_xml.h b/glom/libglom/document/bakery/document_xml.h
index 593a78d..df8270e 100644
--- a/glom/libglom/document/bakery/document_xml.h
+++ b/glom/libglom/document/bakery/document_xml.h
@@ -33,7 +33,7 @@ namespace GlomBakery
 
 class Document_XML : public GlomBakery::Document
 {
-public: 
+public:
   Document_XML();
   ~Document_XML() override;
 
@@ -43,14 +43,14 @@ public:
   void set_dtd_name(const std::string& strVal); //e.g. "glom.dtd"
   std::string get_dtd_name() const;
 
-  /** Set the root node name and (optionally) the xmlns ID to be written 
+  /** Set the root node name and (optionally) the xmlns ID to be written
    * when writing the document.
    * The root node name is also used when reading documents.
    */
   void set_dtd_root_node_name(const Glib::ustring& strVal, const Glib::ustring& xmlns = Glib::ustring());
-  
+
   Glib::ustring get_dtd_root_node_name() const;
-  
+
   Glib::ustring get_xml() const; //Get the text for the XML.
 
 protected:
@@ -72,7 +72,7 @@ protected:
   //XML Parsing bits:
   xmlpp::DomParser m_dom_parser; //Could be mutable to allow us to guarantee a root node.
   xmlpp::Document* m_dom_document; //1-to-1 with the m_dom_parser.
-  
+
   std::string m_dtd_name;
   Glib::ustring m_root_node_name, m_root_xmlns;
   bool m_write_formatted;
diff --git a/glom/libglom/document/bakery/view/view.h b/glom/libglom/document/bakery/view/view.h
index 8cc72eb..c6dfb23 100644
--- a/glom/libglom/document/bakery/view/view.h
+++ b/glom/libglom/document/bakery/view/view.h
@@ -33,7 +33,7 @@ namespace GlomBakery
 template< class T_Document >
 class View : public ViewBase
 {
-public: 
+public:
   View()
   {
   }
@@ -65,7 +65,7 @@ public:
   }
 
 protected:
-  
+
   std::shared_ptr<T_Document> m_document;
 };
 
diff --git a/glom/libglom/document/bakery/view/view_composite.h 
b/glom/libglom/document/bakery/view/view_composite.h
index 3381b4b..a3963cb 100644
--- a/glom/libglom/document/bakery/view/view_composite.h
+++ b/glom/libglom/document/bakery/view/view_composite.h
@@ -32,7 +32,7 @@ namespace GlomBakery
 template< class T_Document >
 class View_Composite : public View<T_Document>
 {
-public: 
+public:
   View_Composite()
   {
   }
@@ -94,7 +94,7 @@ public:
 
 protected:
   typedef std::vector<type_view*> type_vec_views;
-  type_vec_views m_vecViews;    
+  type_vec_views m_vecViews;
 };
 
 } //namespace
diff --git a/glom/libglom/document/bakery/view/viewbase.h b/glom/libglom/document/bakery/view/viewbase.h
index ccfbb1c..1976a88 100644
--- a/glom/libglom/document/bakery/view/viewbase.h
+++ b/glom/libglom/document/bakery/view/viewbase.h
@@ -30,10 +30,10 @@ namespace GlomBakery
  */
 class ViewBase : virtual public sigc::trackable
 {
-public: 
+public:
   ViewBase();
   virtual ~ViewBase();
-  
+
   virtual void load_from_document();
   virtual void save_to_document();
 
diff --git a/glom/libglom/document/document.cc b/glom/libglom/document/document.cc
index 19318ba..e325185 100644
--- a/glom/libglom/document/document.cc
+++ b/glom/libglom/document/document.cc
@@ -476,7 +476,7 @@ void Document::set_relationship(const Glib::ustring& table_name, const std::shar
   const auto info = get_table_info(table_name);
   if(!info)
     return;
-   
+
   //Look for the relationship with this name:
   bool existing = false;
   const auto relationship_name = glom_get_sharedptr_name(relationship);
@@ -1078,7 +1078,7 @@ void Document::change_relationship_name(const Glib::ustring& table_name, const G
   if(doctableinfo)
   {
     const auto relationships = doctableinfo->m_relationships;
-      
+
     //Change the relationship name:
     auto iterRelFind = find_if_same_name(relationships, name);
     if(iterRelFind != relationships.end())
@@ -1295,7 +1295,7 @@ void Document::fill_sort_field_details(const Glib::ustring& parent_table_name, F
     auto sort_field = sort_pair.first;
     if(!sort_field)
      continue;
- 
+
     //TODO: Avoid this unconst?
     auto unconst_sort_field = std::const_pointer_cast<LayoutItem_Field>(sort_field);
     auto field = get_field( sort_field->get_table_used(parent_table_name), sort_field->get_name() );
@@ -1407,7 +1407,7 @@ Document::type_list_layout_groups Document::get_data_layout_groups_default(const
     details->set_columns_count(2);
     result.emplace_back(details);
   }
-  
+
   //If, for some reason, we didn't create the-subgroups, add everything to a top level group:
   if(!overview && !details)
   {
@@ -1415,7 +1415,7 @@ Document::type_list_layout_groups Document::get_data_layout_groups_default(const
     overview->set_name("main");
     overview->set_columns_count(1);
     result.emplace_back(overview);
-      
+
     details = overview; //Adding anything to details adds it to the overview, which is the only group.
   }
 
@@ -1927,7 +1927,7 @@ void Document::load_after_layout_item_formatting(const xmlpp::Element* element,
   if(field_type == Field::glom_field_type::TEXT)
   {
     format.set_text_format_multiline( XmlUtils::get_node_attribute_value_as_bool(element, 
GLOM_ATTRIBUTE_FORMAT_TEXT_MULTILINE) );
-    format.set_text_format_multiline_height_lines( XmlUtils::get_node_attribute_value_as_decimal(element, 
+    format.set_text_format_multiline_height_lines( XmlUtils::get_node_attribute_value_as_decimal(element,
       GLOM_ATTRIBUTE_FORMAT_TEXT_MULTILINE_HEIGHT_LINES, 
GLOM_ATTRIBUTE_FORMAT_TEXT_MULTILINE_HEIGHT_LINES_DEFAULT) );
   }
 
@@ -2094,7 +2094,7 @@ void Document::load_after_layout_item_field(const xmlpp::Element* element, const
 
   //Needed to decide what formatting to load/save:
   const auto field = get_field(item->get_table_used(table_name), name);
-  
+
   // This is not unusual, because tables often refer to tables that have not been loaded yet.
   // Code should sometimes check this before returning the layout items.
   //
@@ -2241,10 +2241,10 @@ void Document::load_after_layout_group(const xmlpp::Element* node, const Glib::u
           XmlUtils::get_node_attribute_value_as_decimal_double(element, 
GLOM_ATTRIBUTE_DATA_LAYOUT_LINE_START_Y),
           XmlUtils::get_node_attribute_value_as_decimal_double(element, 
GLOM_ATTRIBUTE_DATA_LAYOUT_LINE_END_X),
           XmlUtils::get_node_attribute_value_as_decimal_double(element, 
GLOM_ATTRIBUTE_DATA_LAYOUT_LINE_END_Y) );
-          
+
         item->set_line_width(
           XmlUtils::get_node_attribute_value_as_decimal_double(element, 
GLOM_ATTRIBUTE_DATA_LAYOUT_LINE_WIDTH) );
-          
+
         item->set_line_color(
           XmlUtils::get_node_attribute_value(element, GLOM_ATTRIBUTE_DATA_LAYOUT_LINE_COLOR) );
 
@@ -2338,31 +2338,31 @@ void Document::load_after_layout_group(const xmlpp::Element* node, const Glib::u
 
         if(!calendar_portal)
         {
-          const gulong rows_count_min = 
-            XmlUtils::get_node_attribute_value_as_decimal_double(element, 
+          const gulong rows_count_min =
+            XmlUtils::get_node_attribute_value_as_decimal_double(element,
               GLOM_ATTRIBUTE_PORTAL_ROWS_COUNT_MIN);
-          const gulong rows_count_max = 
-            XmlUtils::get_node_attribute_value_as_decimal_double(element, 
+          const gulong rows_count_max =
+            XmlUtils::get_node_attribute_value_as_decimal_double(element,
               GLOM_ATTRIBUTE_PORTAL_ROWS_COUNT_MAX);
           if(rows_count_min || rows_count_max) //Ignore useless 0, 0 values.
             portal->set_rows_count(rows_count_min, rows_count_max);
-            
+
           //Print Layout specific stuff:
           portal->set_print_layout_row_height(
-            XmlUtils::get_node_attribute_value_as_decimal(element, 
+            XmlUtils::get_node_attribute_value_as_decimal(element,
               GLOM_ATTRIBUTE_PORTAL_PRINT_LAYOUT_ROW_HEIGHT) );
-            
+
           portal->set_print_layout_row_line_width(
-            XmlUtils::get_node_attribute_value_as_decimal(element, 
+            XmlUtils::get_node_attribute_value_as_decimal(element,
               GLOM_ATTRIBUTE_PORTAL_PRINT_LAYOUT_ROW_LINE_WIDTH) );
           portal->set_print_layout_column_line_width(
-            XmlUtils::get_node_attribute_value_as_decimal(element, 
+            XmlUtils::get_node_attribute_value_as_decimal(element,
               GLOM_ATTRIBUTE_PORTAL_PRINT_LAYOUT_COLUMN_LINE_WIDTH) );
           portal->set_print_layout_line_color(
-            XmlUtils::get_node_attribute_value(element, 
+            XmlUtils::get_node_attribute_value(element,
               GLOM_ATTRIBUTE_PORTAL_PRINT_LAYOUT_LINE_COLOR) );
         }
-                
+
         item_added = portal;
       }
       else if(element->get_name() == GLOM_NODE_DATA_LAYOUT_ITEM_GROUPBY)
@@ -2564,7 +2564,7 @@ bool Document::load_after(int& failure_code)
       //"database_title" is deprecated in favour of "title", loaded in
       //load_after_translations(), but load this from old documents if
       //if it is present, and the only thing present:
-      const Glib::ustring database_title_deprecated = 
+      const Glib::ustring database_title_deprecated =
         XmlUtils::get_node_attribute_value(nodeRoot, GLOM_DEPRECATED_ATTRIBUTE_CONNECTION_DATABASE_TITLE);
       if(!database_title_deprecated.empty() && get_database_title_original().empty())
         m_database_title->set_title_original(database_title_deprecated);
@@ -2959,10 +2959,10 @@ bool Document::load_after(int& failure_code)
                 //Page Setup:
                 const auto key_file_text = XmlUtils::get_child_text_node(node_print_layout, 
GLOM_NODE_PAGE_SETUP);
                 print_layout->set_page_setup(key_file_text);
-                
+
                 print_layout->set_page_count(
                   XmlUtils::get_node_attribute_value_as_decimal(node_print_layout, 
GLOM_ATTRIBUTE_PRINT_LAYOUT_PAGE_COUNT, 1));
-                 
+
 
                 //Layout Groups:
                 const auto nodeGroups = XmlUtils::get_node_child_named(node_print_layout, 
GLOM_NODE_DATA_LAYOUT_GROUPS);
@@ -3116,7 +3116,7 @@ void Document::save_before_layout_item_formatting(xmlpp::Element* nodeItem, cons
   if(field_type == Field::glom_field_type::TEXT)
   {
     XmlUtils::set_node_attribute_value_as_bool(nodeItem, GLOM_ATTRIBUTE_FORMAT_TEXT_MULTILINE, 
format.get_text_format_multiline());
-    XmlUtils::set_node_attribute_value_as_decimal(nodeItem, 
GLOM_ATTRIBUTE_FORMAT_TEXT_MULTILINE_HEIGHT_LINES, 
+    XmlUtils::set_node_attribute_value_as_decimal(nodeItem, 
GLOM_ATTRIBUTE_FORMAT_TEXT_MULTILINE_HEIGHT_LINES,
       format.get_text_format_multiline_height_lines(), 
GLOM_ATTRIBUTE_FORMAT_TEXT_MULTILINE_HEIGHT_LINES_DEFAULT);
   }
 
@@ -3344,24 +3344,24 @@ void Document::save_before_layout_group(xmlpp::Element* node, const std::shared_
                 gulong rows_count_min = 0;
                 gulong rows_count_max = 0;
                 portal->get_rows_count(rows_count_min, rows_count_max);
-                XmlUtils::set_node_attribute_value_as_decimal_double(child, 
+                XmlUtils::set_node_attribute_value_as_decimal_double(child,
                   GLOM_ATTRIBUTE_PORTAL_ROWS_COUNT_MIN, rows_count_min);
-                XmlUtils::set_node_attribute_value_as_decimal_double(child, 
+                XmlUtils::set_node_attribute_value_as_decimal_double(child,
                   GLOM_ATTRIBUTE_PORTAL_ROWS_COUNT_MAX, rows_count_max);
 
                 //Print Layout specific stuff:
                 XmlUtils::set_node_attribute_value_as_decimal(child,
-                  GLOM_ATTRIBUTE_PORTAL_PRINT_LAYOUT_ROW_HEIGHT, 
+                  GLOM_ATTRIBUTE_PORTAL_PRINT_LAYOUT_ROW_HEIGHT,
                   portal->get_print_layout_row_height());
-                
+
                 XmlUtils::set_node_attribute_value_as_decimal(child,
-                  GLOM_ATTRIBUTE_PORTAL_PRINT_LAYOUT_ROW_LINE_WIDTH, 
+                  GLOM_ATTRIBUTE_PORTAL_PRINT_LAYOUT_ROW_LINE_WIDTH,
                   portal->get_print_layout_row_line_width());
                 XmlUtils::set_node_attribute_value(child,
-                  GLOM_ATTRIBUTE_PORTAL_PRINT_LAYOUT_ROW_LINE_COLOR, 
+                  GLOM_ATTRIBUTE_PORTAL_PRINT_LAYOUT_ROW_LINE_COLOR,
                   portal->get_print_layout_line_color());
                 XmlUtils::set_node_attribute_value(child,
-                  GLOM_ATTRIBUTE_PORTAL_PRINT_LAYOUT_LINE_COLOR, 
+                  GLOM_ATTRIBUTE_PORTAL_PRINT_LAYOUT_LINE_COLOR,
                   portal->get_print_layout_line_color());
               }
             }
@@ -3479,10 +3479,10 @@ void Document::save_before_layout_group(xmlpp::Element* node, const std::shared_
                   XmlUtils::set_node_attribute_value_as_decimal_double(nodeItem, 
GLOM_ATTRIBUTE_DATA_LAYOUT_LINE_START_Y, start_y);
                   XmlUtils::set_node_attribute_value_as_decimal_double(nodeItem, 
GLOM_ATTRIBUTE_DATA_LAYOUT_LINE_END_X, end_x);
                   XmlUtils::set_node_attribute_value_as_decimal_double(nodeItem, 
GLOM_ATTRIBUTE_DATA_LAYOUT_LINE_END_Y, end_y);
-                  
-                  XmlUtils::set_node_attribute_value_as_decimal_double(nodeItem, 
+
+                  XmlUtils::set_node_attribute_value_as_decimal_double(nodeItem,
                     GLOM_ATTRIBUTE_DATA_LAYOUT_LINE_WIDTH, line->get_line_width());
-                  XmlUtils::set_node_attribute_value(nodeItem, 
+                  XmlUtils::set_node_attribute_value(nodeItem,
                     GLOM_ATTRIBUTE_DATA_LAYOUT_LINE_COLOR, line->get_line_color());
                 }
               }
@@ -3619,7 +3619,7 @@ bool Document::save_before()
     switch(m_hosting_mode)
     {
     case HostingMode::POSTGRES_CENTRAL:
-      XmlUtils::set_node_attribute_value(nodeConnection, 
+      XmlUtils::set_node_attribute_value(nodeConnection,
         GLOM_ATTRIBUTE_CONNECTION_HOSTING_MODE, GLOM_ATTRIBUTE_CONNECTION_HOSTING_POSTGRES_CENTRAL);
       break;
     case HostingMode::POSTGRES_SELF:
@@ -3631,7 +3631,7 @@ bool Document::save_before()
         GLOM_ATTRIBUTE_CONNECTION_HOSTING_MODE, GLOM_ATTRIBUTE_CONNECTION_HOSTING_SQLITE);
       break;
     case HostingMode::MYSQL_CENTRAL:
-      XmlUtils::set_node_attribute_value(nodeConnection, 
+      XmlUtils::set_node_attribute_value(nodeConnection,
         GLOM_ATTRIBUTE_CONNECTION_HOSTING_MODE, GLOM_ATTRIBUTE_CONNECTION_HOSTING_MYSQL_CENTRAL);
       break;
     case HostingMode::MYSQL_SELF:
@@ -3843,8 +3843,8 @@ bool Document::save_before()
             auto child = nodePrintLayout->add_child_element(GLOM_NODE_PAGE_SETUP);
             child->add_child_text( Utils::string_clean_for_xml(page_setup) );
           }
-          
-          XmlUtils::set_node_attribute_value_as_decimal(nodePrintLayout, 
GLOM_ATTRIBUTE_PRINT_LAYOUT_PAGE_COUNT, 
+
+          XmlUtils::set_node_attribute_value_as_decimal(nodePrintLayout, 
GLOM_ATTRIBUTE_PRINT_LAYOUT_PAGE_COUNT,
             print_layout->get_page_count(), 1);
 
           auto nodeGroups = nodePrintLayout->add_child_element(GLOM_NODE_DATA_LAYOUT_GROUPS);
@@ -4151,7 +4151,7 @@ std::shared_ptr<const Relationship> Document::get_field_used_in_relationship_to_
     //This table is special. We would not create a relationship to it using a field:
     if(table_used == GLOM_STANDARD_TABLE_PREFS_TABLE_NAME)
       return result;
-     
+
     std::cerr << G_STRFUNC << ": table not found:" << table_used << std::endl;
     return result;
   }
@@ -4315,7 +4315,7 @@ auto find_if_item_and_hint_equal(T_Container& container, const Document::pair_tr
           return false;
       }
 
-      if(get_po_context_for_item(element.first, element.second) != 
+      if(get_po_context_for_item(element.first, element.second) !=
         get_po_context_for_item(item_and_hint.first, item_and_hint.second))
       {
         return false;
@@ -4386,7 +4386,7 @@ Document::type_list_translatables Document::get_translatable_items()
       //Custom Choices, if any:
       if(field->get_glom_type() == Field::glom_field_type::TEXT) //Choices for other field types could not 
be translated.
       {
-        const auto this_hint = hint + ", Parent Field: " + field->get_name();   
+        const auto this_hint = hint + ", Parent Field: " + field->get_name();
         type_list_translatables list_choice_items;
         Document::fill_translatable_custom_choices(field->m_default_formatting, list_choice_items, 
this_hint);
         add_to_translatable_list(result, list_choice_items);
@@ -4405,7 +4405,7 @@ Document::type_list_translatables Document::get_translatable_items()
         continue;
 
       add_to_translatable_list(result, report, hint);
-      
+
       //Translatable report items:
       const auto this_hint = hint + ", Parent Report: " + report->get_name();
       const auto list_layout_items = get_translatable_report_items(table_name, report_name, this_hint);
@@ -4420,7 +4420,7 @@ Document::type_list_translatables Document::get_translatable_items()
         continue;
 
       add_to_translatable_list(result, print_layout, hint);
-      
+
       //Translatable print layout items:
       const auto this_hint = hint + ", Print Layout: " + print_layout->get_name();
       const auto list_layout_items = get_translatable_print_layout_items(table_name, print_layout_name, 
this_hint);
@@ -4500,11 +4500,11 @@ void Document::fill_translatable_layout_items(const std::shared_ptr<LayoutItem_F
   auto custom_title = layout_field->get_title_custom();
   if(custom_title)
   {
-    the_list.emplace_back( pair_translatable_item_and_hint(custom_title, hint) ); 
+    the_list.emplace_back( pair_translatable_item_and_hint(custom_title, hint) );
   }
 
   //The field will be added separately.
-  
+
   //Custom Choices, if any:
   //Only text fields can have translated choice values:
   if(layout_field->get_glom_type() == Field::glom_field_type::TEXT)
@@ -4523,7 +4523,7 @@ void Document::fill_translatable_layout_items(const std::shared_ptr<LayoutGroup>
   {
     the_list.emplace_back( pair_translatable_item_and_hint(group, hint) );
   }
-  
+
   const auto group_name = group->get_name();
   Glib::ustring this_hint = hint;
   if(!group_name.empty())
@@ -4806,7 +4806,7 @@ bool add_file_to_archive(archive* a, const std::string& parent_dir_path, const s
   {
     // Query size of the file, so that we can show progress:
     //TODO: stream->query_info_async(sigc::mem_fun(*this, &DialogImageLoadProgress::on_query_info), 
G_FILE_ATTRIBUTE_STANDARD_SIZE);
-  
+
     const guint BYTES_TO_PROCESS = 256;
     guint buffer[BYTES_TO_PROCESS] = {0, }; // For each chunk.
     bool bContinue = true;
@@ -4884,7 +4884,7 @@ Glib::ustring Document::save_backup_file(const Glib::ustring& uri, const SlotPro
 
   //Save the data:
   auto connection_pool = ConnectionPool::get_instance();
-  const bool data_saved = 
+  const bool data_saved =
     connection_pool->save_backup(slot_progress, path_dir);
   if(!data_saved)
   {
@@ -4954,7 +4954,7 @@ void read_archive_entry_file_contents(archive* a, archive_entry* entry, std::str
   const std::unique_ptr<char[]> buf(new char[size + 1]);
 
   const auto r = archive_read_data(a, buf.get(), size);
-    
+
   if((r == ARCHIVE_FATAL) || (r == ARCHIVE_WARN) ||
     (r == ARCHIVE_RETRY)) //0 or a number of bytes read are the signs of success.
   {
@@ -5020,14 +5020,14 @@ Glib::ustring Document::extract_backup_file(const Glib::ustring& backup_uri, std
     return Glib::ustring();
   }
 
-  if(slot_progress)   
+  if(slot_progress)
     slot_progress();
 
 
   //const char *name = archive_entry_pathname(entry);
   //std::cout << "debug: name=" << name << std::endl;
 
-  if(slot_progress)  
+  if(slot_progress)
     slot_progress();
 
   Glib::ustring contents;
diff --git a/glom/libglom/document/document.h b/glom/libglom/document/document.h
index cd024f7..2ad2bcd 100644
--- a/glom/libglom/document/document.h
+++ b/glom/libglom/document/document.h
@@ -88,7 +88,7 @@ public:
 
   bool get_is_example_file() const;
   void set_is_example_file(bool value = true);
-  
+
   bool get_is_backup_file() const;
   void set_is_backup_file(bool value = true);
 
@@ -217,11 +217,11 @@ public:
    * so that it is not used anymore in relationships, layouts, reports, etc.
    */
   void remove_field(const Glib::ustring& table_name, const Glib::ustring& field_name);
-  
-  
+
+
   typedef std::pair< std::shared_ptr<LayoutItem_Field>, std::shared_ptr<Relationship> > 
type_pairFieldTrigger;
   typedef std::vector<type_pairFieldTrigger> type_list_lookups;
-  
+
   /** Get the fields whose values should be looked up when @a field_name changes, with
    * the relationship used to lookup the value.
    */
@@ -463,14 +463,14 @@ public:
    * For instance, a pulsing ProgressBar.
    */
   typedef std::function<void()> SlotProgress;
-  
+
   /** Save a copy of the document as a backup.
    * This document (and its URI) will not be changed.
    * @param uri The location at which to save the backup Glom file.
    * @result The URI of the .tar.gz tarball.
    */
   Glib::ustring save_backup_file(const Glib::ustring& uri, const SlotProgress& slot_progress);
-  
+
   /** Extract the .glom file and backup data from a .tar.gz archive.
    * The backup data must be stored temporarily on disk because pg_restore requires a file on disk.
    *
@@ -479,7 +479,7 @@ public:
    * @result The contents of the .glom file from the .tar.gz file.
    */
   static Glib::ustring extract_backup_file(const Glib::ustring& backup_uri, std::string& backup_path, const 
SlotProgress& slot_progress);
-  
+
 
 private:
 
@@ -551,7 +551,7 @@ private:
     Glib::RefPtr<Gio::FileInputStream> stream;
 
     struct archive* a;
-    
+
   private:
     //Prevent copying:
     FileReadWriteToArchiveData(const FileReadWriteToArchiveData& src);
diff --git a/glom/libglom/layout_utils.cc b/glom/libglom/layout_utils.cc
index ae1bfa6..5c2b514 100644
--- a/glom/libglom/layout_utils.cc
+++ b/glom/libglom/layout_utils.cc
@@ -68,7 +68,7 @@ Glib::ustring Utils::get_list_of_sort_fields_for_display(const Formatting::type_
     const auto item = the_pair.first;
     if(!item)
       continue;
-    
+
     if(!text.empty())
       text += ", ";
 
@@ -97,7 +97,7 @@ LayoutGroup::type_list_const_items Utils::get_layout_items_plus_primary_key(cons
   auto pk_layout_item = std::make_shared<LayoutItem_Field>();
   pk_layout_item->set_hidden();
   pk_layout_item->set_full_field_details(field_primary_key);
-  
+
   if(find_if_layout_item_field_is_same_field_exists(items, pk_layout_item))
     return items; //It is already in the list:
 
@@ -125,7 +125,7 @@ LayoutGroup::type_list_items Utils::get_layout_items_plus_primary_key(const Layo
   auto pk_layout_item = std::make_shared<LayoutItem_Field>();
   pk_layout_item->set_hidden();
   pk_layout_item->set_full_field_details(field_primary_key);
-  
+
   if(find_if_layout_item_field_is_same_field_exists(items, pk_layout_item))
     return items; //It is already in the list:
 
diff --git a/glom/libglom/privs.cc b/glom/libglom/privs.cc
index 27f1edb..68c82cd 100644
--- a/glom/libglom/privs.cc
+++ b/glom/libglom/privs.cc
@@ -172,7 +172,7 @@ Privs::type_vec_strings Privs::get_database_users(const Glib::ustring& group_nam
           if(data_model_user && data_model_user->get_n_rows() && data_model_user->get_n_columns())
           {
             const auto value_user = data_model_user->get_value_at(0, 0);
-            //std::cout << G_STRFUNC << "DEBUG:  username=" << value.get_string() << std::endl; 
+            //std::cout << G_STRFUNC << "DEBUG:  username=" << value.get_string() << std::endl;
             result.emplace_back(value_user.get_string());
           }
           else
@@ -372,7 +372,7 @@ Privileges Privs::get_table_privileges(const Glib::ustring& group_name, const Gl
   result.m_create = value.get_boolean();
   value = data_model->get_value_at(3, 0);
   result.m_delete = value.get_boolean();
-  
+
   //std::cout << G_STRFUNC << ": group_name=" << group_name << ", table_name=" << table_name << ", returning 
create=" << result.m_create << std::endl;
   return result;
 }
@@ -439,7 +439,7 @@ Privileges Privs::get_current_privs(const Glib::ustring& table_name)
     std::cerr << G_STRFUNC << ": table_name is empty.\n";
     return Privileges();
   }
-  
+
   //TODO_Performance: There's lots of database access here.
   //We could maybe replace some with the postgres has_table_* function().
 
diff --git a/glom/libglom/privs.h b/glom/libglom/privs.h
index 39c5e60..b30e7b3 100644
--- a/glom/libglom/privs.h
+++ b/glom/libglom/privs.h
@@ -89,12 +89,12 @@ private:
 
   typedef std::map<Glib::ustring, Privileges> type_map_privileges;
 
-  //A map of table names to cached privileges: 
+  //A map of table names to cached privileges:
   static type_map_privileges m_privileges_cache;
 
-  // Store the cache for a few seconds in case it 
-  // is immediately requested again, to avoid 
-  // introspecting again, which is slow. 
+  // Store the cache for a few seconds in case it
+  // is immediately requested again, to avoid
+  // introspecting again, which is slow.
   typedef std::map<Glib::ustring, sigc::connection> type_map_cache_timeouts;
   static type_map_cache_timeouts m_map_cache_timeouts;
 };
diff --git a/glom/libglom/python_embed/py_glom_record.h b/glom/libglom/python_embed/py_glom_record.h
index 631696f..719c4da 100644
--- a/glom/libglom/python_embed/py_glom_record.h
+++ b/glom/libglom/python_embed/py_glom_record.h
@@ -37,9 +37,9 @@ class PyGlomRecord
 public:
   PyGlomRecord();
   ~PyGlomRecord();
-  
+
   /* Prevent python code from changing data in the database via this object.
-   * For instance, this should be used in a field calculation, 
+   * For instance, this should be used in a field calculation,
    * though changing data would be OK from a script.
    * This is not exposed via Python.
    */
@@ -78,7 +78,7 @@ private:
   boost::python::object m_related; //Actually a PyGlomRelated
 
   Glib::RefPtr<Gnome::Gda::Connection> m_connection;
-  
+
 private:
   bool m_read_only;
 };
diff --git a/glom/libglom/python_embed/pygdavalue_conversions.cc 
b/glom/libglom/python_embed/pygdavalue_conversions.cc
index 1fe297b..f39766b 100644
--- a/glom/libglom/python_embed/pygdavalue_conversions.cc
+++ b/glom/libglom/python_embed/pygdavalue_conversions.cc
@@ -33,7 +33,7 @@
  */
 bool
 glom_pygda_value_from_pyobject(GValue* boxed, const boost::python::object& input)
-{       
+{
     /* Use an appropriate gda_value_set_*() function.
        We cannot know what GValue type is actually wanted, so
        we must still have the get_*() functions in the python API.
@@ -41,7 +41,7 @@ glom_pygda_value_from_pyobject(GValue* boxed, const boost::python::object& input
 
     if(G_IS_VALUE (boxed))
       g_value_unset(boxed);
-      
+
     auto input_c = input.ptr();
 
     if(input_c == Py_None)
@@ -49,8 +49,8 @@ glom_pygda_value_from_pyobject(GValue* boxed, const boost::python::object& input
       std::cerr << G_STRFUNC << ": Returning false for Py_None\n";
       return false;
     }
-    
-    //We check for bool first, 
+
+    //We check for bool first,
     //because bool is derived from int in Python,
     //so PyInt_Check() would also succeed on a bool object.
     //  This comment probably only applies to Python 2,
@@ -66,7 +66,7 @@ glom_pygda_value_from_pyobject(GValue* boxed, const boost::python::object& input
         return true;
       }
     }
- 
+
 #if PY_MAJOR_VERSION < 3
     //Python 3 doesn't seem to have an Integer type.
     if(PyInt_Check(input_c))
@@ -93,7 +93,7 @@ glom_pygda_value_from_pyobject(GValue* boxed, const boost::python::object& input
         return true;
       }
     }
-    
+
     if(PyFloat_Check(input_c))
     {
       boost::python::extract<double> extractor_double(input);
@@ -105,7 +105,7 @@ glom_pygda_value_from_pyobject(GValue* boxed, const boost::python::object& input
         return true;
       }
     }
-    
+
     if(PyUnicode_Check(input_c))
     {
       boost::python::extract<std::string> extractor_string(input);
@@ -117,7 +117,7 @@ glom_pygda_value_from_pyobject(GValue* boxed, const boost::python::object& input
         return true;
       }
     }
-    
+
 #if PY_VERSION_HEX >= 0x02040000
 
     // Note that this sets a local copy of PyDateTimeAPI (in Python's datetime.h
@@ -171,7 +171,7 @@ glom_pygda_value_from_pyobject(GValue* boxed, const boost::python::object& input
 
     std::cerr << G_STRFUNC << ": Unhandled python type: object as string:" <<
       str_as_string << std::endl;
-    std::cerr << G_STRFUNC << ": PY_MAJOR_VERSION=" << PY_MAJOR_VERSION << 
+    std::cerr << G_STRFUNC << ": PY_MAJOR_VERSION=" << PY_MAJOR_VERSION <<
       ", PY_VERSION_HEX=" << std::hex << PY_VERSION_HEX << std::endl;
     return false; /* failed. */
 }
diff --git a/glom/libglom/report_builder.cc b/glom/libglom/report_builder.cc
index b85f2fb..7cee86c 100644
--- a/glom/libglom/report_builder.cc
+++ b/glom/libglom/report_builder.cc
@@ -238,7 +238,7 @@ bool ReportBuilder::report_build_groupby(const FoundSet& found_set_parent, xmlpp
     if(!datamodel)
     {
       std::cerr << G_STRFUNC << ": The SQL query failed.\n";
-      return false; 
+      return false;
     }
     else
     {
@@ -386,7 +386,7 @@ bool ReportBuilder::report_build_records(const FoundSet& found_set, xmlpp::Eleme
     if(!datamodel)
     {
       std::cerr << G_STRFUNC << ": The SLQ query failed.\n";
-      return false; 
+      return false;
     }
     else
     {
@@ -624,7 +624,7 @@ std::string ReportBuilder::report_build_and_save(const FoundSet& found_set, cons
 
   return file->get_path();
 }
- 
+
 
 Glib::ustring ReportBuilder::report_build(const FoundSet& found_set, const std::shared_ptr<const Report>& 
report)
 {
@@ -743,7 +743,7 @@ std::shared_ptr<Report> ReportBuilder::create_standard_list_report(const std::sh
   //Translators: This is a noun. It is the title of a report.
   result->set_title_original(_("List"));
 
-  const Document::type_list_layout_groups layout_groups = 
+  const Document::type_list_layout_groups layout_groups =
     document->get_data_layout_groups("list", table_name); //TODO: layout_platform.
   for(const auto& group : layout_groups)
   {
diff --git a/glom/libglom/report_builder.h b/glom/libglom/report_builder.h
index 7b5bbbf..8816e45 100644
--- a/glom/libglom/report_builder.h
+++ b/glom/libglom/report_builder.h
@@ -54,8 +54,8 @@ public:
    * @result The filepath of a temporary file containing the generated HTML file.
    */
   std::string report_build_and_save(const FoundSet& found_set, const std::shared_ptr<const Report>& report);
- 
- 
+
+
 private:
 
   bool report_build_groupby(const FoundSet& found_set_parent, xmlpp::Element& parent_node, const 
std::shared_ptr<LayoutItem_GroupBy>& group_by);
diff --git a/glom/libglom/spawn_with_feedback.cc b/glom/libglom/spawn_with_feedback.cc
index f12c8f2..4771348 100644
--- a/glom/libglom/spawn_with_feedback.cc
+++ b/glom/libglom/spawn_with_feedback.cc
@@ -342,7 +342,7 @@ bool execute_command_line_and_wait(const std::string& command, const SlotProgres
   //Show UI progress feedback while we wait for the command to finish:
 
   std::shared_ptr<const Impl::SpawnInfo> info;
-  
+
   try
   {
     info = Impl::spawn_async(command, 0);
@@ -386,7 +386,7 @@ bool execute_command_line_and_wait(const std::string& command, const SlotProgres
   //Show UI progress feedback while we wait for the command to finish:
 
   std::shared_ptr<const Impl::SpawnInfo> info;
-  
+
   try
   {
     info = Impl::spawn_async(command, Impl::REDIRECT_STDOUT | Impl::REDIRECT_STDERR);
@@ -396,7 +396,7 @@ bool execute_command_line_and_wait(const std::string& command, const SlotProgres
     std::cerr << G_STRFUNC << ": exception: " << ex.what() << std::endl;
     return false;
   }
-  
+
 
   auto mainloop = Glib::MainLoop::create(false);
   info->signal_finished().connect(
@@ -561,7 +561,7 @@ bool execute_command_line_and_wait_until_second_command_returns_success(const st
     std::cerr << G_STRFUNC << ": exception: " << ex.what() << std::endl;
     return false;
   }
-  
+
   // While we wait for the second command to finish we
   // a) check whether the first command finished. If it did, and has a
   // negative error code, we assume it failed and return directly.
diff --git a/glom/libglom/spawn_with_feedback.h b/glom/libglom/spawn_with_feedback.h
index e59e78a..d755687 100644
--- a/glom/libglom/spawn_with_feedback.h
+++ b/glom/libglom/spawn_with_feedback.h
@@ -52,7 +52,7 @@ bool execute_command_line_and_wait(const std::string& command, const SlotProgres
 
 /** Execute a command-line command, and repeatedly call a second command that tests whether the first 
command has finished.
  * @param command The command-line command.
- * @param message A human-readable message to be shown, for instance in a dialog, while waiting. 
+ * @param message A human-readable message to be shown, for instance in a dialog, while waiting.
  * @slot_progress A callback to call while the work is still happening.
  * @success_text If this is not empty, then the second command will only be considered to have succeeded 
when this text is found in its stdout output.
  */
diff --git a/glom/libglom/test_avahi_publisher.cc b/glom/libglom/test_avahi_publisher.cc
index 7c27230..641b67d 100644
--- a/glom/libglom/test_avahi_publisher.cc
+++ b/glom/libglom/test_avahi_publisher.cc
@@ -53,7 +53,7 @@ void TestWindow::on_button_start()
     return;
 
   std::cout << "Starting\n";
- 
+
   m_avahi_publisher = std::make_unique<Glom::AvahiPublisher>("testservice", "_testthing._tcp", 1234 /* port 
*/);
 }
 
diff --git a/glom/libglom/test_connectionpool.cc b/glom/libglom/test_connectionpool.cc
index e35f6d5..6b63eb4 100644
--- a/glom/libglom/test_connectionpool.cc
+++ b/glom/libglom/test_connectionpool.cc
@@ -64,7 +64,7 @@ int main()
 
     //Connect:
     std::shared_ptr<Glom::SharedConnection> connection;
-    
+
     try
     {
       connection = Glom::ConnectionPool::get_and_connect();
@@ -73,7 +73,7 @@ int main()
     {
       std::cout << "Exception: " << ex.what() << std::endl;
     }
-    
+
     if(connection)
       std::cout << "Connected\n";
     else
diff --git a/glom/libglom/test_sync.cc b/glom/libglom/test_sync.cc
index 1cdbeee..9d7e9ac 100644
--- a/glom/libglom/test_sync.cc
+++ b/glom/libglom/test_sync.cc
@@ -17,7 +17,7 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  */
- 
+
 #include <libglom/spawn_with_feedback.h>
 #include <iostream>
 
@@ -26,7 +26,7 @@ main(int argc, char* argv[])
 {
   Glib::init();
 
- 
+
   const Glib::ustring command = "sh `LANG=C;LANGUAGE=C;echo $LANG;echo $LANGUAGE`";
   std::cout << "command=" << command << std::endl;
   try
diff --git a/glom/libglom/translations_po.cc b/glom/libglom/translations_po.cc
index 880eae6..024ff9d 100644
--- a/glom/libglom/translations_po.cc
+++ b/glom/libglom/translations_po.cc
@@ -63,7 +63,7 @@ static void show_gettext_error(int severity, const char* filename, const gchar*
 
   switch(severity)
   {
-    #ifdef PO_SEVERITY_WARNING //This was introduced in libgettext-po some time after gettext version 0.14.5 
+    #ifdef PO_SEVERITY_WARNING //This was introduced in libgettext-po some time after gettext version 0.14.5
     case PO_SEVERITY_WARNING:
     {
       // Show only debug output
@@ -73,11 +73,11 @@ static void show_gettext_error(int severity, const char* filename, const gchar*
     #endif //PO_SEVERITY_WARNING
 
 
-    #ifdef PO_SEVERITY_ERROR //This was introduced in libgettext-po some time after gettext version 0.14.5 
+    #ifdef PO_SEVERITY_ERROR //This was introduced in libgettext-po some time after gettext version 0.14.5
     case PO_SEVERITY_ERROR:
     #endif //PO_SEVERITY_ERROR
 
-    #ifdef PO_SEVERITY_FATAL_ERROR //This was introduced in libgettext-po some time after gettext version 
0.14.5 
+    #ifdef PO_SEVERITY_FATAL_ERROR //This was introduced in libgettext-po some time after gettext version 
0.14.5
     case PO_SEVERITY_FATAL_ERROR:
     #endif //PO_SEVERITY_FATAL_ERROR
 
@@ -88,7 +88,7 @@ static void show_gettext_error(int severity, const char* filename, const gchar*
       //dlg.run();
       break;
     }
-  }   
+  }
 }
 
 /*
@@ -102,7 +102,7 @@ static void on_gettextpo_xerror (int severity, po_message_t /* message */, const
 {
   show_gettext_error(severity, filename, message_text);
 
-  #ifdef PO_SEVERITY_FATAL_ERROR  //This was introduced in libgettext-po some time after gettext version 
0.14.5 
+  #ifdef PO_SEVERITY_FATAL_ERROR  //This was introduced in libgettext-po some time after gettext version 
0.14.5
   if(severity == PO_SEVERITY_FATAL_ERROR)
     longjmp(jump, 1);
   #endif //PO_SEVERITY_FATAL_ERROR
@@ -114,8 +114,8 @@ static void on_gettextpo_xerror2 (int severity, po_message_t /* message1 */, con
   int /* multiline_p2 */, const char * /* message_text2 */)
 {
   show_gettext_error(severity, filename1, message_text1);
-  
-  #ifdef PO_SEVERITY_FATAL_ERROR  //This was introduced in libgettext-po some time after gettext version 
0.14.5 
+
+  #ifdef PO_SEVERITY_FATAL_ERROR  //This was introduced in libgettext-po some time after gettext version 
0.14.5
   if(severity == PO_SEVERITY_FATAL_ERROR)
     longjmp(jump, 1);
   #endif //PO_SEVERITY_FATAL_ERROR
@@ -179,13 +179,13 @@ Glib::ustring get_po_context_for_item(const std::shared_ptr<const TranslatableIt
       remaining = remaining.substr(part.size());
     }
   }
-  
+
   return result;
 }
 
 bool write_pot_file(const std::shared_ptr<Document>& document, const Glib::ustring& pot_file_uri)
 {
-  //A .pot file 
+  //A .pot file
   return write_translations_to_po_file(document, pot_file_uri, Glib::ustring() /* no locale */);
 }
 
@@ -204,9 +204,9 @@ bool write_translations_to_po_file(const std::shared_ptr<Document>& document, co
   }
 
   //We do not use gettext-po.h and its po_file_write() function for this,
-  //because that does not allow us to specify UTF-8, so it drops non-ASCII 
+  //because that does not allow us to specify UTF-8, so it drops non-ASCII
   //characters such as U with umlaut.
-  //It also has no obvious API for setting the header, so we would have to 
+  //It also has no obvious API for setting the header, so we would have to
   //do that manually anyway.
   Glib::ustring data;
 
@@ -224,11 +224,11 @@ bool write_translations_to_po_file(const std::shared_ptr<Document>& document, co
     // Add "context" comments, to uniquely identify similar strings, used in different places,
     // and to provide a hint for translators.
     Glib::ustring msg = "msgctxt \"" + get_po_context_for_item(item, hint) + "\"\n";
-    
+
     //The original and its translation:
     msg += "msgid \"" + item->get_title_original() + "\"\n";
     msg += "msgstr \"" + item->get_title_translation(translation_locale, false) + "\"";
-    
+
     data += msg + "\n\n";
   }
 
@@ -237,7 +237,7 @@ bool write_translations_to_po_file(const std::shared_ptr<Document>& document, co
   const auto revision_date_str = revision_date.format("%F %R%z");
   const auto header = Glib::ustring::compose(GLOM_PO_HEADER,
     document->get_database_title_original(), revision_date_str, locale_name);
-  
+
   const Glib::ustring full = header + "\n\n" + data;
   Glib::file_set_contents(filename, full);
 
@@ -263,7 +263,7 @@ bool import_translations_from_po_file(const std::shared_ptr<Document>& document,
     return false;
 
   if(setjmp(jump) != 0)
-    return false;  
+    return false;
 
   #ifdef HAVE_GETTEXTPO_XERROR
   po_xerror_handler error_handler;
@@ -308,7 +308,7 @@ bool import_translations_from_po_file(const std::shared_ptr<Document>& document,
 
         const auto& hint = the_pair.second;
 
-        if( (item->get_title_original() == msgid) && 
+        if( (item->get_title_original() == msgid) &&
           (get_po_context_for_item(item, hint) == msgcontext) ) // This is not efficient, but it should be 
reliable.
         {
           item->set_title(msgstr, translation_locale);
diff --git a/glom/libglom/translations_po.h b/glom/libglom/translations_po.h
index d5ad2bf..c0d72b0 100644
--- a/glom/libglom/translations_po.h
+++ b/glom/libglom/translations_po.h
@@ -49,9 +49,9 @@ bool import_translations_from_po_file(const std::shared_ptr<Document>& document,
 
 /** Get a hint about what the text is for.
  * This is also necessary to uniquely identify the item,
- * because not all text with the same contents should be translated the same 
+ * because not all text with the same contents should be translated the same
  * way in all languages - the context might change the translation.
- */ 
+ */
 Glib::ustring get_po_context_for_item(const std::shared_ptr<const TranslatableItem>& item, const 
Glib::ustring& hint);
 
 } //namespace Glom
diff --git a/glom/libglom/utils.h b/glom/libglom/utils.h
index 1b9101a..fe78595 100644
--- a/glom/libglom/utils.h
+++ b/glom/libglom/utils.h
@@ -45,13 +45,13 @@ Glib::ustring locale_simplify(const Glib::ustring& locale_id);
 Glib::ustring locale_language_id(const Glib::ustring& locale_id);
 
 
-/** @returns true if the script is OK, or 
+/** @returns true if the script is OK, or
  * false if the script uses pygtk2, which would cause a crash,
  * because Glom itself uses GTK+ 3.
  */
 bool script_check_for_pygtk2(const Glib::ustring& script);
 
-/** 
+/**
  * This is simpler than catching the exception from Gio::Resource::get_info_global().
  *
  * @returns true if the GResource exists.
diff --git a/glom/libglom/xml_utils.cc b/glom/libglom/xml_utils.cc
index d943902..c15428e 100644
--- a/glom/libglom/xml_utils.cc
+++ b/glom/libglom/xml_utils.cc
@@ -72,18 +72,18 @@ const xmlpp::Element* get_node_child_named(const xmlpp::Element* node, const Gli
   const xmlpp::Element* nodeResult = nullptr;
 
   if(node)
-  { 
+  {
     const auto list = node->get_children(strName);
 
     //We check all of them, instead of just the first, until we find one,
-    //because get_children() returns, for instance, TextNodes (which are not Elements) for "text", 
+    //because get_children() returns, for instance, TextNodes (which are not Elements) for "text",
     //as well as Elements with the name "text".
     for(const auto& item : list)
     {
       nodeResult = dynamic_cast<const xmlpp::Element*>(item);
       if(nodeResult)
         return nodeResult;
-    }                       
+    }
   }
 
   return nodeResult;
@@ -261,7 +261,7 @@ Gnome::Gda::Value get_node_text_child_as_value(const xmlpp::Element* node, Field
   const auto format = get_node_attribute_value(node, GLOM_ATTRIBUTE_IMAGE_DATA_FORMAT);
   if(format.empty()) //We previously used the GDA format, before we even specified it.
     old_image_format = true;
-    
+
   bool success = false;
   const auto result = Field::from_file_format(value_string, field_type, success, old_image_format);
   if(success)
diff --git a/glom/main.cc b/glom/main.cc
index 662c7eb..b8d4b90 100644
--- a/glom/main.cc
+++ b/glom/main.cc
@@ -491,7 +491,7 @@ main(int argc, char* argv[])
     //Create the app here,
     //so we can use UI, for instance with Gtk::MessageDialog,
     //even before calling run().
-    auto application = 
+    auto application =
       Glom::Application::create();
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
diff --git a/glom/main_local_options.cc b/glom/main_local_options.cc
index ca89437..67ce088 100644
--- a/glom/main_local_options.cc
+++ b/glom/main_local_options.cc
@@ -61,7 +61,7 @@ bool LocalOptionGroup::handle_options()
     std::cout << PACKAGE_STRING << std::endl;
     return false; //Then stop.
   }
-  
+
   // Some more sanity checking:
   // These print errors to the stdout if they fail.
   // In future we might refuse to start if they fail.
@@ -87,9 +87,9 @@ bool LocalOptionGroup::handle_options()
 bool LocalOptionGroup::get_debug_date_check_result(bool& stop) const
 {
   //This command-line option is documented as stopping executing after checking,
-  //so that the execution result can be checked: 
+  //so that the execution result can be checked:
   stop = m_arg_debug_date_check;
-  
+
   return m_debug_date_check_result;
 }
 
diff --git a/glom/main_local_options.h b/glom/main_local_options.h
index 42bf225..defdf34 100644
--- a/glom/main_local_options.h
+++ b/glom/main_local_options.h
@@ -36,12 +36,12 @@ class LocalOptionGroup : public Glib::OptionGroup
 {
 public:
   LocalOptionGroup();
-  
+
   /**
    * @result If this is false then the GApplication, or main() should return EXIT_FAILURE.
    */
   bool handle_options();
-  
+
   bool get_debug_date_check_result(bool& stop) const;
 
 private:
diff --git a/glom/mode_data/box_data_calendar_related.cc b/glom/mode_data/box_data_calendar_related.cc
index 181c15b..69fcafa 100644
--- a/glom/mode_data/box_data_calendar_related.cc
+++ b/glom/mode_data/box_data_calendar_related.cc
@@ -40,7 +40,7 @@ Box_Data_Calendar_Related::Box_Data_Calendar_Related()
 
   m_Frame.add(m_calendar);
   m_calendar.set_margin_start(Utils::to_utype(UiUtils::DefaultSpacings::LARGE));
-  m_calendar.set_margin_top(Utils::to_utype(UiUtils::DefaultSpacings::SMALL));   
+  m_calendar.set_margin_top(Utils::to_utype(UiUtils::DefaultSpacings::SMALL));
   m_calendar.show();
 
   //m_calendar.set_show_details();
diff --git a/glom/mode_data/box_data_calendar_related.h b/glom/mode_data/box_data_calendar_related.h
index aeac0fd..479d50c 100644
--- a/glom/mode_data/box_data_calendar_related.h
+++ b/glom/mode_data/box_data_calendar_related.h
@@ -36,7 +36,7 @@ class Dialog_Layout_Calendar_Related;
 
 class Box_Data_Calendar_Related : public Box_Data_Portal
 {
-public: 
+public:
   Box_Data_Calendar_Related();
   virtual ~Box_Data_Calendar_Related();
 
@@ -49,7 +49,7 @@ private:
 
   //Implementations of pure virtual methods from Base_DB_Table_Data:
   void set_primary_key_value(const Gtk::TreeModel::iterator& row, const Gnome::Gda::Value& value) override;
-    
+
 
   void on_record_added(const Gnome::Gda::Value& primary_key_value, const Gtk::TreeModel::iterator& row) 
override; //Not a signal handler.
 
@@ -58,7 +58,7 @@ private:
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
   void enable_buttons();
-    
+
   //Implementations of pure virtual methods from Base_DB_Table_Data:
   Gnome::Gda::Value get_primary_key_value_selected() const override;
   Gnome::Gda::Value get_primary_key_value(const Gtk::TreeModel::iterator& row) const override;
@@ -70,21 +70,21 @@ private:
 
   Glib::ustring on_calendar_details(guint year, guint month, guint day);
   void on_calendar_month_changed();
-    
+
   void setup_menu(Gtk::Widget* widget);
   void on_calendar_button_press_event(GdkEventButton *event);
- 
+
   void on_MenuPopup_activate_Edit();
-    
+
   #ifndef GLOM_ENABLE_CLIENT_ONLY
   void on_MenuPopup_activate_layout();
   #endif
-  
+
   void clear_cached_database_values();
-    
+
 private:
   Gtk::Calendar m_calendar;
-    
+
   //TODO: Avoid repeating these in so many widgets:
   std::unique_ptr<Gtk::Menu> m_menu_popup;
   Glib::RefPtr<Gio::SimpleActionGroup> m_action_group;
@@ -93,7 +93,7 @@ private:
 #ifndef GLOM_ENABLE_CLIENT_ONLY
   Glib::RefPtr<Gio::SimpleAction> m_context_layout;
 #endif
-    
+
   //The cached data for the month:
   //For each date we have a list of rows (vectors):
   typedef std::vector<Gnome::Gda::Value> type_vector_values;
diff --git a/glom/mode_data/box_data_details.cc b/glom/mode_data/box_data_details.cc
index b9dba8b..3a758db 100644
--- a/glom/mode_data/box_data_details.cc
+++ b/glom/mode_data/box_data_details.cc
@@ -655,12 +655,12 @@ void Box_Data_Details::on_flowtable_field_open_details_requested(const std::shar
   ////auto unconst_field = std::const_pointer_cast<LayoutItem_Field>(layout_field); //A hack, because 
layout_field_should_have_navigation() needs to get full field details.
   //unconst_field->set_full_field_details(
   //  document->get_field(field->get_table_used(table_name), field->get_name()) ); //Otherwise 
get_primary_key() returns false always.
-      
+
   std::shared_ptr<Relationship> field_used_in_relationship_to_one;
-  const bool has_open_button = 
-    DbUtils::layout_field_should_have_navigation(m_table_name, layout_field, get_document(), 
+  const bool has_open_button =
+    DbUtils::layout_field_should_have_navigation(m_table_name, layout_field, get_document(),
     field_used_in_relationship_to_one);
-         
+
   //If it's a simple field that is part of a relationship,
   //identifying a related record.
   if(field_used_in_relationship_to_one)
@@ -684,7 +684,7 @@ void Box_Data_Details::on_flowtable_script_button_clicked(const std::shared_ptr<
     std::cerr << G_STRFUNC << ": layout_item is null\n";
     return;
   }
-  
+
   const auto primary_key_value = get_primary_key_value_selected();
   const Glib::ustring table_name_before = m_table_name;
   execute_button_script(layout_item, primary_key_value);
@@ -927,7 +927,7 @@ void Box_Data_Details::print_layout()
   //Don't try to print tables that the user can't view.
   if(!table_privs.m_view)
     return;  //TODO: Warn the user.
-   
+
   const auto document = std::dynamic_pointer_cast<const Document>(get_document());
   if(!document)
   {
@@ -942,14 +942,14 @@ void Box_Data_Details::print_layout()
     return;
   }
 
-  //Note that we initially create the page layout without spaces for page 
+  //Note that we initially create the page layout without spaces for page
   //breaks because those spaces would be empty space on the page after
   //we have moved items down when expanding:
   //TODO: Squash that space when expanding custom layouts.
-  auto layout = 
+  auto layout =
     PrintLayoutUtils::create_standard(page_setup, m_table_name, document,
       false /* do not avoid page margins */);
-  
+
   //Show the print preview window:
   auto app = AppWindow::get_appwindow();
   PrintLayoutUtils::do_print_layout(layout, m_found_set,
diff --git a/glom/mode_data/box_data_details.h b/glom/mode_data/box_data_details.h
index df7c231..7d9f1d7 100644
--- a/glom/mode_data/box_data_details.h
+++ b/glom/mode_data/box_data_details.h
@@ -68,7 +68,7 @@ public:
 #endif
 
   void do_new_record();
-  
+
   void set_enable_drag_and_drop(bool enabled = true);
 
 protected:
diff --git a/glom/mode_data/box_data_list.cc b/glom/mode_data/box_data_list.cc
index f15ac7c..82a20a3 100644
--- a/glom/mode_data/box_data_list.cc
+++ b/glom/mode_data/box_data_list.cc
@@ -449,7 +449,7 @@ void Box_Data_List::create_layout()
 
   const auto table_privs = Privs::get_current_privs(m_found_set.m_table_name);
   m_AddDel.set_allow_view(table_privs.m_view);
-    
+
   m_AddDel.set_found_set(m_found_set);
   m_AddDel.set_columns(items_to_use); //TODO: Use LayoutGroup::type_list_const_items instead?
 
diff --git a/glom/mode_data/box_data_list_related.cc b/glom/mode_data/box_data_list_related.cc
index 31b3c1a..0aac3e0 100644
--- a/glom/mode_data/box_data_list_related.cc
+++ b/glom/mode_data/box_data_list_related.cc
@@ -187,7 +187,7 @@ void Box_Data_List_Related::on_adddel_user_requested_edit(const Gtk::TreeModel::
   //Note that this is really an Open rather than an Edit.
 
   const auto primary_key_value = m_AddDel.get_value_key(row); //The primary key is in the key.
-  
+
   if(!Conversions::value_is_empty(primary_key_value))
   {
     //std::cout << "debug: " << G_STRFUNC << ": Requesting edit for primary_key=" << 
primary_key_value.to_string() << std::endl;
@@ -454,7 +454,7 @@ void Box_Data_List_Related::create_layout()
         child_item->set_editable(false);
 
       auto child_field = std::dynamic_pointer_cast<const LayoutItem_Field>(child_item);
-      
+
       //This check has already happened in Frame_Glom::update_table_in_document_from_database().
       //It is inefficient and unnecessary to do it here too.
       /*
@@ -489,7 +489,7 @@ void Box_Data_List_Related::create_layout()
 
   const auto table_privs = Privs::get_current_privs(m_found_set.m_table_name);
   m_AddDel.set_allow_view(table_privs.m_view);
-  
+
   m_AddDel.set_found_set(m_found_set);
   m_AddDel.set_columns(items_to_use);
 
diff --git a/glom/mode_data/box_data_manyrecords.cc b/glom/mode_data/box_data_manyrecords.cc
index e3df142..553e869 100644
--- a/glom/mode_data/box_data_manyrecords.cc
+++ b/glom/mode_data/box_data_manyrecords.cc
@@ -84,7 +84,7 @@ void Box_Data_ManyRecords::print_layout()
     //TODO: Find a way to get a full locale name from the simplified locale name from 
AppWindow::get_current_locale():
     ReportBuilder report_builder(std::locale("") /* the user's current locale */);
     report_builder.set_document(document);
-    const auto filepath = 
+    const auto filepath =
       report_builder.report_build_and_save(m_found_set, report_temp);
     UiUtils::show_report_in_browser(filepath, get_app_window());
   }
diff --git a/glom/mode_data/box_data_manyrecords.h b/glom/mode_data/box_data_manyrecords.h
index b9414d3..c042ecb 100644
--- a/glom/mode_data/box_data_manyrecords.h
+++ b/glom/mode_data/box_data_manyrecords.h
@@ -31,7 +31,7 @@ namespace Glom
 
 class Box_Data_ManyRecords : public Box_Data
 {
-public: 
+public:
   Box_Data_ManyRecords();
 
   void refresh_data_from_database_blank();
@@ -42,7 +42,7 @@ public:
   //Primary Key value:
   typedef sigc::signal<void(const Gnome::Gda::Value&)> type_signal_user_requested_details;
   type_signal_user_requested_details signal_user_requested_details();
-  
+
   typedef sigc::signal<void()> type_signal_record_selection_changed;
   type_signal_record_selection_changed signal_record_selection_changed();
 protected:
diff --git a/glom/mode_data/box_data_portal.cc b/glom/mode_data/box_data_portal.cc
index 64140f6..008ad47 100644
--- a/glom/mode_data/box_data_portal.cc
+++ b/glom/mode_data/box_data_portal.cc
@@ -287,7 +287,7 @@ bool Box_Data_Portal::get_has_suitable_record_to_view_details() const
   const auto document = get_document();
   if(!document)
     return false;
-    
+
   Glib::ustring navigation_table_name;
   std::shared_ptr<const UsesRelationship> navigation_relationship; //Ignored.
   portal->get_suitable_table_to_view_details(navigation_table_name, navigation_relationship, document);
@@ -308,11 +308,11 @@ void Box_Data_Portal::get_suitable_record_to_view_details(const Gnome::Gda::Valu
   const auto document = get_document();
   if(!document)
     return;
-    
+
   Glib::ustring navigation_table_name;
   std::shared_ptr<const UsesRelationship> navigation_relationship;
   portal->get_suitable_table_to_view_details(navigation_table_name, navigation_relationship, document);
-  
+
   //if(navigation_relationship && navigation_relationship->get_relationship())
   //  std::cout << "debug: navigation_relationship=" << 
navigation_relationship->get_relationship()->get_name() << std::endl;
   //if(navigation_relationship && navigation_relationship->get_related_relationship())
diff --git a/glom/mode_data/box_data_portal.h b/glom/mode_data/box_data_portal.h
index 33b80af..267c2ce 100644
--- a/glom/mode_data/box_data_portal.h
+++ b/glom/mode_data/box_data_portal.h
@@ -36,13 +36,13 @@ class Box_Data_Details;
 
 /** This is a base class for data widgets that should show multiple related records.
  */
-class Box_Data_Portal : 
+class Box_Data_Portal :
   public Box_Data_ManyRecords,
-  public LayoutWidgetBase     
+  public LayoutWidgetBase
 {
-public: 
+public:
   Box_Data_Portal();
-  
+
   /**
    * @param portal: The full portal details
    */
@@ -72,7 +72,7 @@ public:
    */
   typedef sigc::signal<void(const Glib::ustring&)> type_signal_portal_record_changed;
   type_signal_portal_record_changed signal_portal_record_changed();
-    
+
   bool get_has_suitable_record_to_view_details() const;
 
   /** Discover what record to show, in what table, when clicking on a related record.
@@ -98,11 +98,11 @@ public:
 
 protected:
   type_vecConstLayoutFields get_fields_to_show() const override;
-    
+
   //Implementations of pure virtual methods from Base_DB_Table_Data:
   std::shared_ptr<Field> get_field_primary_key() const override;
 
-  //Overrides of virtual methods from Base_Db_Table_Data: 
+  //Overrides of virtual methods from Base_Db_Table_Data:
   void on_record_added(const Gnome::Gda::Value& primary_key_value, const Gtk::TreeModel::iterator& row) 
override; // Not a signal handler.
   void on_record_deleted(const Gnome::Gda::Value& primary_key_value) override;
 
@@ -119,18 +119,18 @@ protected:
   /** Get the title of the relationship used by the portal.
    */
   Glib::ustring get_title(const Glib::ustring& locale) const;
-  
+
   /** Get the singular title of the relationship used by the portal.
    */
-  Glib::ustring get_title_singular(const Glib::ustring& locale) const;  
-  
+  Glib::ustring get_title_singular(const Glib::ustring& locale) const;
+
   Gtk::Frame m_Frame;
   Gtk::Label m_Label;
 
 private:
   Glib::ustring m_parent_table; //A duplicate of the from_table in the poral, but only when get_portal() is 
not null.
-  
-  // m_key_field and m_key_value are the field and its value in this table that 
+
+  // m_key_field and m_key_value are the field and its value in this table that
   // must match another field in the parent table.
 
 public:
@@ -139,7 +139,7 @@ public:
 
 private:
   bool m_find_mode;
-    
+
   type_signal_portal_record_changed m_signal_portal_record_changed;
 };
 
diff --git a/glom/mode_data/buttonglom.cc b/glom/mode_data/buttonglom.cc
index 07a9978..eb50e12 100644
--- a/glom/mode_data/buttonglom.cc
+++ b/glom/mode_data/buttonglom.cc
@@ -63,7 +63,7 @@ void ButtonGlom::on_menu_properties_activate()
   if(!dialog) //Unlikely and it already warns on stderr.
     return;
 
-  auto layout_item = 
+  auto layout_item =
     std::dynamic_pointer_cast<LayoutItem_Button>(get_layout_item());
   dialog->set_script(layout_item, m_table_name);
   const auto response = Glom::UiUtils::dialog_run_with_help(dialog);
diff --git a/glom/mode_data/buttonglom.h b/glom/mode_data/buttonglom.h
index 5ad358e..31bbfc7 100644
--- a/glom/mode_data/buttonglom.h
+++ b/glom/mode_data/buttonglom.h
@@ -44,7 +44,7 @@ private:
 
   AppWindow* get_appwindow() const override;
 
-#ifndef GLOM_ENABLE_CLIENT_ONLY    
+#ifndef GLOM_ENABLE_CLIENT_ONLY
   void on_menu_properties_activate() override;
   bool on_button_press_event(GdkEventButton *event) override;
 #endif // !GLOM_ENABLE_CLIENT_ONLY
diff --git a/glom/mode_data/datawidget/cellrenderer_buttonimage.h 
b/glom/mode_data/datawidget/cellrenderer_buttonimage.h
index fc1595f..ecf62a0 100644
--- a/glom/mode_data/datawidget/cellrenderer_buttonimage.h
+++ b/glom/mode_data/datawidget/cellrenderer_buttonimage.h
@@ -30,12 +30,12 @@ namespace Glom
 
 class GlomCellRenderer_ButtonImage : public Gtk::CellRendererPixbuf
 {
-public: 
+public:
   GlomCellRenderer_ButtonImage();
 
   typedef sigc::signal<void(const Gtk::TreeModel::Path&)> type_signal_clicked;
   type_signal_clicked signal_clicked();
-  
+
 private:
 
   bool activate_vfunc(GdkEvent* event, Gtk::Widget& widget, const Glib::ustring& path, const Gdk::Rectangle& 
background_area, const Gdk::Rectangle& cell_area, Gtk::CellRendererState flags) override;
diff --git a/glom/mode_data/datawidget/cellrenderer_buttontext.h 
b/glom/mode_data/datawidget/cellrenderer_buttontext.h
index a86ed56..7848430 100644
--- a/glom/mode_data/datawidget/cellrenderer_buttontext.h
+++ b/glom/mode_data/datawidget/cellrenderer_buttontext.h
@@ -30,12 +30,12 @@ namespace Glom
 
 class GlomCellRenderer_ButtonText : public Gtk::CellRendererText
 {
-public: 
+public:
   GlomCellRenderer_ButtonText();
 
   typedef sigc::signal<void(const Gtk::TreeModel::Path&)> type_signal_clicked;
   type_signal_clicked signal_clicked();
-  
+
 private:
 
   bool activate_vfunc(GdkEvent* event, Gtk::Widget& widget, const Glib::ustring& path, const Gdk::Rectangle& 
background_area, const Gdk::Rectangle& cell_area, Gtk::CellRendererState flags) override;
diff --git a/glom/mode_data/datawidget/cellrenderer_dblist.h b/glom/mode_data/datawidget/cellrenderer_dblist.h
index a91a9e3..51d62f8 100644
--- a/glom/mode_data/datawidget/cellrenderer_dblist.h
+++ b/glom/mode_data/datawidget/cellrenderer_dblist.h
@@ -53,7 +53,7 @@ private:
 
   void set_value(const Gnome::Gda::Value& value) override;
   Gnome::Gda::Value get_value() const override;
-  
+
   void repack_cells_fixed(Gtk::CellLayout* combobox);
   void repack_cells_related(Gtk::CellLayout* combobox);
 
diff --git a/glom/mode_data/datawidget/checkbutton.cc b/glom/mode_data/datawidget/checkbutton.cc
index dd77343..cd50697 100644
--- a/glom/mode_data/datawidget/checkbutton.cc
+++ b/glom/mode_data/datawidget/checkbutton.cc
@@ -50,7 +50,7 @@ bool CheckButton::on_button_press_event(GdkEventButton *button_event)
     pApp->add_developer_action(m_context_add_related_records);
     pApp->add_developer_action(m_context_add_group);
 
-    pApp->update_userlevel_ui(); //Update our action's sensitivity. 
+    pApp->update_userlevel_ui(); //Update our action's sensitivity.
 
     //Only show this popup in developer mode, so operators still see the default GtkCheckButton context menu.
     //TODO: It would be better to add it somehow to the standard context menu.
diff --git a/glom/mode_data/datawidget/checkbutton.h b/glom/mode_data/datawidget/checkbutton.h
index 4d280fb..7ad055a 100644
--- a/glom/mode_data/datawidget/checkbutton.h
+++ b/glom/mode_data/datawidget/checkbutton.h
@@ -44,7 +44,7 @@ public:
   explicit CheckButton(const Glib::ustring& title = Glib::ustring());
 
   void set_value(const Gnome::Gda::Value& value) override;
-  Gnome::Gda::Value get_value() const override;    
+  Gnome::Gda::Value get_value() const override;
 
 private:
 #ifndef GLOM_ENABLE_CLIENT_ONLY
diff --git a/glom/mode_data/datawidget/combo.cc b/glom/mode_data/datawidget/combo.cc
index fd23a13..ff06a56 100644
--- a/glom/mode_data/datawidget/combo.cc
+++ b/glom/mode_data/datawidget/combo.cc
@@ -96,14 +96,14 @@ void ComboGlom::set_choices_fixed(const Formatting::type_list_values& list_value
     clear(); //This breaks GtkCombo with has-entry.
   }
 
-  auto cell_area = 
+  auto cell_area =
     Glib::RefPtr<Gtk::CellAreaBox>::cast_dynamic(get_area());
   if(!cell_area)
   {
     std::cerr << G_STRFUNC << ": Unexpected or null CellArea type.\n";
     return;
   }
-  
+
   int columns_count = model->get_n_columns();
   if(columns_count)
     columns_count -= 1; //The last one is the just the extra text-equivalent of the first one, for 
GtkComboBox with has-entry=true, or for translations.
diff --git a/glom/mode_data/datawidget/combochoiceswithtreemodel.cc 
b/glom/mode_data/datawidget/combochoiceswithtreemodel.cc
index 1e1338f..62bc226 100644
--- a/glom/mode_data/datawidget/combochoiceswithtreemodel.cc
+++ b/glom/mode_data/datawidget/combochoiceswithtreemodel.cc
@@ -66,10 +66,10 @@ void ComboChoicesWithTreeModel::create_model_non_db(guint columns_count)
   Gtk::TreeModel::ColumnRecord record;
 
   //Create the TreeModelColumns, adding them to the ColumnRecord:
-    
+
   m_vec_model_columns_value_fixed.resize(columns_count);
   for(guint i = 0; i < columns_count; ++i)
-  {    
+  {
     //Create a value column for all columns
     //for instance for later value comparison.
     auto model_column = std::make_unique<type_model_column_value_fixed>();
@@ -78,7 +78,7 @@ void ComboChoicesWithTreeModel::create_model_non_db(guint columns_count)
     //Store it so we can use it and delete it later:
     m_vec_model_columns_value_fixed[i] = std::move(model_column);
   }
-  
+
   //Create a text column, for use by a GtkComboBox with has-entry, which allows no other column type:
   //Note that get_fixed_model_text_column() assumes that this is the last column:
   m_vec_model_columns_string_fixed.resize(1); //TODO: Shouldn't this be 0?
@@ -199,7 +199,7 @@ void ComboChoicesWithTreeModel::set_choices_fixed(const Formatting::type_list_va
     auto layout_item = std::dynamic_pointer_cast<LayoutItem_Field>(get_layout_item());
     if(!layout_item)
       continue;
-    
+
     if(!choicevalue)
       continue;
 
@@ -218,7 +218,7 @@ void ComboChoicesWithTreeModel::set_choices_fixed(const Formatting::type_list_va
     }
     else
     {
-      text = Conversions::get_text_for_gda_value(layout_item->get_glom_type(), 
+      text = Conversions::get_text_for_gda_value(layout_item->get_glom_type(),
         value, layout_item->get_formatting_used().m_numeric_format);
     }
 
@@ -287,7 +287,7 @@ void ComboChoicesWithTreeModel::set_choices_related(const std::shared_ptr<const
 
   m_db_layout_items.clear();
 
-  //We create DbTreeModelWithExtraText rather than just DbTreeModel, 
+  //We create DbTreeModelWithExtraText rather than just DbTreeModel,
   //because Combo(has_entry) needs it.
   //TODO: Avoid getting the actual data if the user does not have view rights.
   const auto table_privs = Privs::get_current_privs(found_set.m_table_name);
@@ -381,7 +381,7 @@ void ComboChoicesWithTreeModel::on_cell_data(const Gtk::TreeModel::iterator& ite
     std::cerr << G_STRFUNC << ": model_column_index (" << model_column_index << ") is out of range. size=" 
<< m_db_layout_items.size() << std::endl;
     return;
   }
-   
+
   if(!cell)
   {
     std::cerr << G_STRFUNC << ": cell is null.\n";
@@ -410,7 +410,7 @@ void ComboChoicesWithTreeModel::cell_connect_cell_data_func(Gtk::CellLayout* cel
     std::cerr << G_STRFUNC << ": model_column_index (" << model_column_index << ") is out of range. size=" 
<< m_db_layout_items.size() << std::endl;
     return;
   }
-  
+
   celllayout->set_cell_data_func(*cell,
     sigc::bind( sigc::mem_fun(*this, &ComboChoicesWithTreeModel::on_cell_data), cell, model_column_index));
 }
diff --git a/glom/mode_data/datawidget/combochoiceswithtreemodel.h 
b/glom/mode_data/datawidget/combochoiceswithtreemodel.h
index ce01317..fe94ff2 100644
--- a/glom/mode_data/datawidget/combochoiceswithtreemodel.h
+++ b/glom/mode_data/datawidget/combochoiceswithtreemodel.h
@@ -56,7 +56,7 @@ protected:
    * This caches the result to avoid repeated recalculation.
    */
   int get_fixed_cell_height(Gtk::Widget& widget);
-  
+
 
   typedef Gtk::TreeModelColumn<Glib::ustring> type_model_column_string_fixed;
   typedef std::vector<std::unique_ptr<type_model_column_string_fixed>> type_vec_model_columns_string_fixed;
@@ -66,7 +66,7 @@ protected:
   typedef std::vector<std::unique_ptr<type_model_column_value_fixed>> type_vec_model_columns_value_fixed;
   type_vec_model_columns_value_fixed m_vec_model_columns_value_fixed; //If set_choices_fixed() was used.
 
-  /** Get the index of the extra column, at the end, that is just a 
+  /** Get the index of the extra column, at the end, that is just a
    * text representation of the first column, for use by GtkCombo with has-entry=true,
    * which accepts only a text column.
    */
@@ -91,7 +91,7 @@ private:
   Glib::RefPtr<Gtk::TreeModel> m_model;
 
   void delete_model();
-  
+
   int m_fixed_cell_height;
 };
 
diff --git a/glom/mode_data/datawidget/datawidget.cc b/glom/mode_data/datawidget/datawidget.cc
index 8b42498..443feb2 100644
--- a/glom/mode_data/datawidget/datawidget.cc
+++ b/glom/mode_data/datawidget/datawidget.cc
@@ -68,13 +68,13 @@ DataWidget::DataWidget(const std::shared_ptr<LayoutItem_Field>& field, const Gli
 {
   const auto glom_type = field->get_glom_type();
   set_layout_item(field, table_name);
-  
+
   //The GNOME HIG says that labels should have ":" at the end:
   //http://library.gnome.org/devel/hig-book/stable/design-text-labels.html.en
   const auto title = Glib::ustring::compose(_("%1:"), item_get_title_or_name(field));
 
   m_child = 0;
-  LayoutWidgetField* pFieldWidget = nullptr;  
+  LayoutWidgetField* pFieldWidget = nullptr;
   if(glom_type == Field::glom_field_type::BOOLEAN)
   {
     auto checkbutton = Gtk::manage( new DataWidgetChildren::CheckButton() );
@@ -188,8 +188,8 @@ DataWidget::DataWidget(const std::shared_ptr<LayoutItem_Field>& field, const Gli
       document->get_field(field->get_table_used(table_name), field->get_name()) ); //Otherwise 
get_primary_key() returns false always.
 
     std::shared_ptr<Relationship> field_used_in_relationship_to_one;
-    const bool add_open_button = 
-       DbUtils::layout_field_should_have_navigation(table_name, field, document, 
+    const bool add_open_button =
+       DbUtils::layout_field_should_have_navigation(table_name, field, document,
          field_used_in_relationship_to_one);
 
     Gtk::Box* hbox_parent = nullptr; //Only used if there are extra widgets.
@@ -390,20 +390,20 @@ void DataWidget::set_editable(bool editable)
     gtkeditable->set_editable(editable);
     return;
   }
-  
+
   //GtkTextView does not implement GtkEditable:
   //See https://bugzilla.gnome.org/show_bug.cgi?id=667008
   //and our TextView class actually derives from ScrolledView anyway,
   //and out LayoutWidgetBase::set_read_only() override takes care of it instead.
   //But let's leave this here just in case:
-  auto textview = 
+  auto textview =
     dynamic_cast<Gtk::TextView*>(child);
   if(textview)
   {
     textview->set_editable(editable);
     return;
   }
-  
+
   auto base = dynamic_cast<LayoutWidgetBase*>(child);
   if(base)
   {
diff --git a/glom/mode_data/datawidget/entry.cc b/glom/mode_data/datawidget/entry.cc
index 5eb87d7..24331ee 100644
--- a/glom/mode_data/datawidget/entry.cc
+++ b/glom/mode_data/datawidget/entry.cc
@@ -61,7 +61,7 @@ void Entry::set_layout_item(const std::shared_ptr<LayoutItem>& layout_item, cons
 #endif
 
   //Horizontal Alignment:
-  Formatting::HorizontalAlignment alignment = 
+  Formatting::HorizontalAlignment alignment =
     Formatting::HorizontalAlignment::LEFT;
   auto layout_field =
     std::dynamic_pointer_cast<LayoutItem_Field>(get_layout_item());
@@ -148,7 +148,7 @@ void Entry::set_value(const Gnome::Gda::Value& value)
   //Show a different color if the value is numeric, if that's specified:
   if(layout_item->get_glom_type() == Field::glom_field_type::NUMERIC)
   {
-    const Glib::ustring fg_color = 
+    const Glib::ustring fg_color =
     layout_item->get_formatting_used().get_text_format_color_foreground_to_use(value);
     if(!fg_color.empty())
     {
@@ -190,7 +190,7 @@ bool Entry::on_button_press_event(GdkEventButton *button_event)
     pApp->add_developer_action(m_context_add_related_records);
     pApp->add_developer_action(m_context_add_group);
 
-    pApp->update_userlevel_ui(); //Update our action's sensitivity. 
+    pApp->update_userlevel_ui(); //Update our action's sensitivity.
 
     //Only show this popup in developer mode, so operators still see the default GtkEntry context menu.
     //TODO: It would be better to add it somehow to the standard context menu.
diff --git a/glom/mode_data/datawidget/label.h b/glom/mode_data/datawidget/label.h
index b6368e2..14ba9ff 100644
--- a/glom/mode_data/datawidget/label.h
+++ b/glom/mode_data/datawidget/label.h
@@ -44,20 +44,20 @@ public:
   Label();
   explicit Label(const Glib::ustring& label, bool mnemonic = false);
   explicit Label(const Glib::ustring& label, Gtk::Align xalign, Gtk::Align yalign, bool mnemonic = false);
-  
+
   Gtk::Label* get_label();
 
 private:
   void init();
 
   AppWindow* get_appwindow() const override;
-    
+
   Gtk::Label m_label;
-#ifndef GLOM_ENABLE_CLIENT_ONLY    
+#ifndef GLOM_ENABLE_CLIENT_ONLY
   bool on_button_press_event(GdkEventButton *event) override;
   void on_menu_properties_activate() override;
 #endif // !GLOM_ENABLE_CLIENT_ONLY
-    
+
 };
 
 } //namespace DataWidetChildren
diff --git a/glom/mode_data/datawidget/textview.cc b/glom/mode_data/datawidget/textview.cc
index 47bc47b..139cb15 100644
--- a/glom/mode_data/datawidget/textview.cc
+++ b/glom/mode_data/datawidget/textview.cc
@@ -56,7 +56,7 @@ void TextView::init()
   add(m_TextView);
 
   //Wrap text, and allow vertical scrolling:
-  set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); 
+  set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
   set_shadow_type(Gtk::SHADOW_IN);
   m_TextView.set_wrap_mode(Gtk::WRAP_WORD);
 
@@ -149,7 +149,7 @@ bool TextView::on_button_press_event(GdkEventButton *button_event)
     pApp->add_developer_action(m_context_add_related_records);
     pApp->add_developer_action(m_context_add_group);
 
-    pApp->update_userlevel_ui(); //Update our action's sensitivity. 
+    pApp->update_userlevel_ui(); //Update our action's sensitivity.
 
     //Only show this popup in developer mode, so operators still see the default GtkEntry context menu.
     //TODO: It would be better to add it somehow to the standard context menu.
diff --git a/glom/mode_data/datawidget/textview.h b/glom/mode_data/datawidget/textview.h
index ac49c6c..3c2e081 100644
--- a/glom/mode_data/datawidget/textview.h
+++ b/glom/mode_data/datawidget/textview.h
@@ -58,9 +58,9 @@ public:
   Gnome::Gda::Value get_value() const override;
 
   typedef Gtk::TextView type_text_view;
-  
+
   type_text_view* get_textview();
-  
+
   void set_read_only(bool read_only = true) override;
 
 private:
diff --git a/glom/mode_data/datawidget/treemodel_db.cc b/glom/mode_data/datawidget/treemodel_db.cc
index 2c8b141..fd933b2 100644
--- a/glom/mode_data/datawidget/treemodel_db.cc
+++ b/glom/mode_data/datawidget/treemodel_db.cc
@@ -253,12 +253,12 @@ DbTreeModel::DbTreeModel(const FoundSet& found_set, const type_vec_const_layout_
         if(layout_item)
           std::cerr << G_STRFUNC << ":   field: " << layout_item->get_name() << std::endl;
       }
-      
+
       return;
     }
-      
+
     m_column_index_key = column_index_key;
-      
+
     //The Column information that can be used with TreeView::append(), TreeModel::iterator[], etc.
     m_columns_count = m_column_fields.size();
     refresh_from_database(m_found_set);
@@ -914,10 +914,10 @@ Gtk::TreeModel::iterator DbTreeModel::get_last_row()
   if(rows_count)
   {
     auto row = rows_count - 1;
-    
+
     if(row > 0) //This should always be true, because there is always a placeholder.
       --row; //Ignore the placeholder.
-   
+
     //Step backwards until we find one that is not removed.
     while((m_map_rows.find(row) != m_map_rows.end()) && m_map_rows[row].m_removed)
     {
diff --git a/glom/mode_data/datawidget/treemodel_db.h b/glom/mode_data/datawidget/treemodel_db.h
index d42d721..c33366f 100644
--- a/glom/mode_data/datawidget/treemodel_db.h
+++ b/glom/mode_data/datawidget/treemodel_db.h
@@ -75,7 +75,7 @@ public:
 public:
   typedef std::vector< std::shared_ptr<LayoutItem> > type_vec_layout_items;
   typedef std::vector< std::shared_ptr<const LayoutItem> > type_vec_const_layout_items;
-  
+
 protected:
 
   /**
@@ -90,7 +90,7 @@ protected:
   virtual ~DbTreeModel();
 
 public:
- 
+
   /** A convenience method, creating the model from a list of LayoutItems,
    * instead of a list of LayoutItem_Fields.
    *
@@ -122,7 +122,7 @@ public:
   DbValue get_key_value(const TreeModel::iterator& iter) const;
 
   /** Get the last row.
-   * This will never return the placeholder row. 
+   * This will never return the placeholder row.
    */
   TreeModel::iterator get_last_row();
 
diff --git a/glom/mode_data/datawidget/treemodel_db_withextratext.cc 
b/glom/mode_data/datawidget/treemodel_db_withextratext.cc
index 0ad74e5..75b3def 100644
--- a/glom/mode_data/datawidget/treemodel_db_withextratext.cc
+++ b/glom/mode_data/datawidget/treemodel_db_withextratext.cc
@@ -36,18 +36,18 @@ DbTreeModelWithExtraText::DbTreeModelWithExtraText(const FoundSet& found_set, co
   int column_index = 0;
   for(const auto& item : layout_items)
   {
-    const auto item_field = 
+    const auto item_field =
       std::dynamic_pointer_cast<const LayoutItem_Field>(item);
     if(item_field)
     {
       m_item_first = item_field;
       break;
     }
-    
+
     ++column_index;
   }
 
-  
+
   if(m_item_first)
   {
    m_column_index_first = column_index;
@@ -96,7 +96,7 @@ void DbTreeModelWithExtraText::get_value_vfunc(const TreeModel::iterator& iter,
   if(column == get_text_column())
   {
     Glib::ustring text;
-    
+
     if(m_column_index_first == -1)
     {
       std::cerr << G_STRFUNC << ": m_column_index_first is not set.\n";
@@ -107,14 +107,14 @@ void DbTreeModelWithExtraText::get_value_vfunc(const TreeModel::iterator& iter,
       Glib::Value<Gnome::Gda::Value> value_db;
       get_value_vfunc(iter, m_column_index_first, value_db);
       const auto dbvalue = value_db.get();
-      
+
       text =
         Conversions::get_text_for_gda_value(m_item_first->get_glom_type(), dbvalue, 
m_item_first->get_formatting_used().m_numeric_format);
       //std::cout << "debug: text=" << text << std::endl;
       //std::cout << "  debug: m_item_key name=" << m_item_key->get_name() << std::endl;
       //std::cout << "  debug: dbvalue=" << dbvalue.to_string() << std::endl;
     }
-  
+
     type_value_string value_specific;
     value_specific.init( type_value_string::value_type() );  //TODO: Is there any way to avoid this step?
     value_specific.set(text);
diff --git a/glom/mode_data/datawidget/treemodel_db_withextratext.h 
b/glom/mode_data/datawidget/treemodel_db_withextratext.h
index 71b9232..92aa7af 100644
--- a/glom/mode_data/datawidget/treemodel_db_withextratext.h
+++ b/glom/mode_data/datawidget/treemodel_db_withextratext.h
@@ -26,7 +26,7 @@
 namespace Glom
 {
 
-/** This awkward class is just a version of DbTreeModel that has an 
+/** This awkward class is just a version of DbTreeModel that has an
  * extra text column that is a text representation of the primary key,
  * for use in a GtkCombo with has_entry, which requires a text column in the model.
  */
@@ -51,7 +51,7 @@ public:
    * Any LayoutItem_Fields should already have their full field details.
    */
   static Glib::RefPtr<DbTreeModelWithExtraText> create(const FoundSet& found_set, const 
type_vec_const_layout_items& layout_items, bool get_records, bool find_mode, 
Base_DB::type_vecConstLayoutFields& fields_shown);
-  
+
   /** This column is a text representation of the first field column.
    */
   int get_text_column() const;
@@ -60,8 +60,8 @@ private:
   int get_n_columns_vfunc() const override;
   GType get_column_type_vfunc(int index) const override;
   void get_value_vfunc(const TreeModel::iterator& iter, int column, Glib::ValueBase& value) const override;
-  
-  
+
+
   int m_column_index_first; //The index of the first field in the TreeModel.
   std::shared_ptr<const LayoutItem_Field> m_item_first;
 };
diff --git a/glom/mode_data/db_adddel/db_adddel.cc b/glom/mode_data/db_adddel/db_adddel.cc
index df720e1..edf1d85 100644
--- a/glom/mode_data/db_adddel/db_adddel.cc
+++ b/glom/mode_data/db_adddel/db_adddel.cc
@@ -175,9 +175,9 @@ void DbAddDel::on_cell_button_clicked(const Gtk::TreeModel::Path& path)
   }
 
   //This delayed action avoids a warning about a NULL GtkAdjustment.
-  //It's fairly understandable that GtkTreeView doesn't like to be destroyed 
+  //It's fairly understandable that GtkTreeView doesn't like to be destroyed
   //as a side-effect of a click on one of its GtkCellRenderers.
-  //That's unlikely to be fixed properly until GtkTreeView supports a real 
+  //That's unlikely to be fixed properly until GtkTreeView supports a real
   //button cell-renderer.
   Glib::signal_idle().connect_once(
     sigc::mem_fun(*this, &DbAddDel::on_idle_row_edit));
@@ -543,9 +543,9 @@ guint DbAddDel::get_fixed_cell_height()
         m_fixed_cell_height = (guint)height;
     }
   }
-  
+
   //We add extra spacing, because otherwise the bottom of letters such as "g" get cut off.
-  //We get this style property, which might be causing it. murrayc 
+  //We get this style property, which might be causing it. murrayc
   //TODO: Find out if this is reallyt the right way to calculate the correct height:
   int extra_height = 0;
   gtk_widget_style_get(GTK_WIDGET(m_tree_view.gobj()), "vertical-separator", &extra_height, (void*)0);
@@ -762,7 +762,7 @@ void DbAddDel::construct_specified_columns()
   auto refModelDerived = Glib::RefPtr<DbTreeModel>::cast_dynamic(m_list_store);
   if(refModelDerived)
     refModelDerived->get_record_counts(total, db_rows_count_found);
-  
+
   //+1 for the empty row:
   gulong rows_count = std::min(m_rows_count_max,  db_rows_count_found + 1);
   //Do not use less than the minimum:
@@ -1358,9 +1358,9 @@ void DbAddDel::on_idle_treeview_cell_edited_revert(const Gtk::TreeModel::Row& ro
   auto refTreeSelection = m_tree_view.get_selection();
   if(!refTreeSelection)
     return;
-    
+
   refTreeSelection->select(row); //TODO: This does not seem to work.
-  
+
   guint view_column_index = 0;
   get_view_column_index(model_column_index, view_column_index);
   auto pColumn = m_tree_view.get_column(view_column_index);
@@ -1369,16 +1369,16 @@ void DbAddDel::on_idle_treeview_cell_edited_revert(const Gtk::TreeModel::Row& ro
     std::cerr << G_STRFUNC << ": pColumn is null.\n";
     return;
   }
-  
+
   auto pCell = dynamic_cast<Gtk::CellRendererText*>(pColumn->get_first_cell());
   if(!pCell)
   {
     std::cerr << G_STRFUNC << ": pCell is null.\n";
     return;
   }
-    
+
   const auto path = get_model()->get_path(row);
-  
+
   //Highlights the cell, and start the editing:
   m_tree_view.set_cursor(path, *pColumn, *pCell, true /* start_editing */);
 }
@@ -1393,7 +1393,7 @@ void DbAddDel::on_treeview_cell_edited(const Glib::ustring& path_string, const G
     return;
 
   const Gtk::TreeModel::Path path(path_string);
- 
+
   if(path.empty())
   {
     std::cerr << G_STRFUNC << ": path is empty.\n";
@@ -1461,7 +1461,7 @@ void DbAddDel::on_treeview_cell_edited(const Glib::ustring& path_string, const G
         const auto formatting = item_field->get_formatting_used();
         new_text_to_save = formatting.get_custom_choice_original_for_translated_text(new_text);
 
-        //If somehow (though this should be impossible), the user entered a 
+        //If somehow (though this should be impossible), the user entered a
         //translated value with no corresponding original text, then
         //store the translated version rather than losing data.
         if(new_text_to_save.empty())
@@ -1470,7 +1470,7 @@ void DbAddDel::on_treeview_cell_edited(const Glib::ustring& path_string, const G
 
       const auto value = Conversions::parse_value(field_type, new_text_to_save, 
item_field->get_formatting_used().m_numeric_format, success);
       if(!success)
-      {  
+      {
           //Tell the user and offer to revert or try again:
           const auto revert = glom_show_dialog_invalid_data(field_type);
           if(revert)
@@ -1481,12 +1481,12 @@ void DbAddDel::on_treeview_cell_edited(const Glib::ustring& path_string, const G
           else
           {
             //Reactivate the cell so that the data can be corrected.
-            
+
             //Set the text to be used in the start_editing signal handler:
             m_validation_invalid_text_for_retry = new_text;
             m_validation_retry = true;
 
-            //But do this in an idle timout, so that the TreeView doesn't get 
+            //But do this in an idle timout, so that the TreeView doesn't get
             //confused by us changing editing state in this signal handler.
             Glib::signal_idle().connect_once(
               sigc::bind(
@@ -1534,7 +1534,7 @@ void DbAddDel::on_treeview_button_press_event(GdkEventButton* button_event)
 }
 
 /* We do not let the developer resize the columns directly in the treeview
- * because we cannot easily avoid this signal handler from being called just during the 
+ * because we cannot easily avoid this signal handler from being called just during the
  * intial size allocation.
  * Anyway, this would be rather implicit anyway - people might not know that they are changing it in the 
document.
  * The size can still be specified in the layout dialog.
@@ -1784,7 +1784,7 @@ Gnome::Gda::Value DbAddDel::get_value_key(const Gtk::TreeModel::iterator& iter)
 void DbAddDel::set_value_key(const Gtk::TreeModel::iterator& iter, const Gnome::Gda::Value& value)
 {
   if(iter && m_list_store)
-  { 
+  {
     if(!(Conversions::value_is_empty(value)))
     {
       //This is not a placeholder anymore, if it every was:
@@ -1967,11 +1967,11 @@ AppWindow* DbAddDel::get_appwindow()
 
 void DbAddDel::on_treeview_cell_editing_started(Gtk::CellEditable* cell_editable, const Glib::ustring& /* 
path */)
 {
-  //Start editing with previously-entered (but invalid) text, 
-  //if we are allowing the user to correct some invalid data. 
+  //Start editing with previously-entered (but invalid) text,
+  //if we are allowing the user to correct some invalid data.
   if(m_validation_retry)
   {
-    //This is the CellEditable inside the CellRenderer. 
+    //This is the CellEditable inside the CellRenderer.
     auto celleditable_validated = cell_editable;
 
     //It's usually an Entry, at least for a CellRendererText:
@@ -2124,7 +2124,7 @@ void DbAddDel::user_changed(const Gtk::TreeModel::iterator& row, guint col)
           table_name = relationship->get_to_table();
           const auto to_field_name = relationship->get_to_field();
           //Get the key field in the other table (the table that we will change)
-          primary_key_field = DbUtils::get_fields_for_table_one_field(document, 
+          primary_key_field = DbUtils::get_fields_for_table_one_field(document,
             table_name, to_field_name); //TODO_Performance.
           if(primary_key_field)
           {
@@ -2405,7 +2405,7 @@ void DbAddDel::on_selection_changed(bool selection)
 {
   m_context_delete->set_enabled(selection);
   m_context_add->set_enabled(selection);
-  
+
   m_signal_record_selection_changed.emit();
 }
 
@@ -2422,7 +2422,7 @@ const Gtk::Window* DbAddDel::get_app_window() const
   auto nonconst = const_cast<DbAddDel*>(this);
   return nonconst->get_app_window();
 }
-  
+
 Gtk::Window* DbAddDel::get_app_window()
 {
   return dynamic_cast<Gtk::Window*>(get_toplevel());
diff --git a/glom/mode_data/db_adddel/db_adddel.h b/glom/mode_data/db_adddel/db_adddel.h
index 1868fb6..d5a5f83 100644
--- a/glom/mode_data/db_adddel/db_adddel.h
+++ b/glom/mode_data/db_adddel/db_adddel.h
@@ -235,19 +235,19 @@ public:
    */
   typedef sigc::signal<void()> type_signal_sort_clause_changed;
   type_signal_sort_clause_changed signal_sort_clause_changed();
-  
+
   /** Emitted when the user selected (or deselected) a record.
    */
   typedef sigc::signal<void()> type_signal_record_selection_changed;
   type_signal_record_selection_changed signal_record_selection_changed();
 
   /** Get the last row.
-   * This will never return the placeholder row. 
+   * This will never return the placeholder row.
    */
   Gtk::TreeModel::iterator get_last_row();
-  
+
   /** Get the last row.
-   * This will never return the placeholder row. 
+   * This will never return the placeholder row.
    */
   Gtk::TreeModel::iterator get_last_row() const;
 
@@ -258,9 +258,9 @@ public:
    * adding the generated primary key if necessary.
    */
   bool start_new_record();
-  
+
   /** Request a height for this widget, based on the number of rows to show.
-   * The widget will change its requested height if it is filled with enough 
+   * The widget will change its requested height if it is filled with enough
    * data to need more than the @a rows_count_min, if @a rows_count_max allows that.
    */
   void set_height_rows(gulong rows_count_min, gulong rows_count_max);
diff --git a/glom/mode_data/db_adddel/db_adddel_withbuttons.cc 
b/glom/mode_data/db_adddel/db_adddel_withbuttons.cc
index 7ab604c..a1205c9 100644
--- a/glom/mode_data/db_adddel/db_adddel_withbuttons.cc
+++ b/glom/mode_data/db_adddel/db_adddel_withbuttons.cc
@@ -132,7 +132,7 @@ void DbAddDel_WithButtons::on_selection_changed(bool selection)
 {
   m_Button_Edit.set_sensitive(selection);
   m_Button_Del.set_sensitive(selection);
-  
+
   DbAddDel::on_selection_changed(selection);
 }
 
diff --git a/glom/mode_data/db_adddel/db_adddel_withbuttons.h 
b/glom/mode_data/db_adddel/db_adddel_withbuttons.h
index 0ceec94..2281d3e 100644
--- a/glom/mode_data/db_adddel/db_adddel_withbuttons.h
+++ b/glom/mode_data/db_adddel/db_adddel_withbuttons.h
@@ -29,7 +29,7 @@ namespace Glom
 
 class DbAddDel_WithButtons : public DbAddDel
 {
-public: 
+public:
   DbAddDel_WithButtons();
 
   void set_allow_add(bool val = true) override;
@@ -41,7 +41,7 @@ public:
 
 private:
   void setup_buttons();
-  
+
   void on_button_add();
   void on_button_del();
   void on_button_edit();
@@ -51,7 +51,7 @@ private:
 
   //member widgets:
   Gtk::ButtonBox m_ButtonBox;
-  
+
   typedef Gtk::Button type_button;
 
   type_button m_Button_Del;
diff --git a/glom/mode_data/db_adddel/db_treeviewcolumn_glom.h 
b/glom/mode_data/db_adddel/db_treeviewcolumn_glom.h
index d5a73fc..f4f71d7 100644
--- a/glom/mode_data/db_adddel/db_treeviewcolumn_glom.h
+++ b/glom/mode_data/db_adddel/db_treeviewcolumn_glom.h
@@ -35,7 +35,7 @@ public:
   void set_column_id(const Glib::ustring& value);
 
 private:
-  Glib::ustring m_column_id; 
+  Glib::ustring m_column_id;
 };
 
 } //namespace Glom
diff --git a/glom/mode_data/flowtablewithfields.cc b/glom/mode_data/flowtablewithfields.cc
index f5466de..6c4201f 100644
--- a/glom/mode_data/flowtablewithfields.cc
+++ b/glom/mode_data/flowtablewithfields.cc
@@ -159,7 +159,7 @@ void FlowTableWithFields::add_layout_group_or_derived(const std::shared_ptr<Layo
     }
   }
 }
-          
+
 void FlowTableWithFields::add_layout_group(const std::shared_ptr<LayoutGroup>& group, bool with_indent)
 {
   if(!group)
@@ -209,11 +209,11 @@ void FlowTableWithFields::add_layout_group(const std::shared_ptr<LayoutGroup>& g
       //Add some indenting just to avoid the out-denting caused by this GtkFrame bug:
       //https://bugzilla.gnome.org/show_bug.cgi?id=644199
       const int BASE_INDENT = 3;
-      
+
       //std::cout << "title= " << group_title << ", with_indent=" << with_indent << std::endl;
       event_box->set_margin_top(Utils::to_utype(Glom::UiUtils::DefaultSpacings::SMALL));
 
-      if(with_indent) 
+      if(with_indent)
       {
         event_box->set_margin_start(Utils::to_utype(Glom::UiUtils::DefaultSpacings::SMALL) + BASE_INDENT);
       }
@@ -759,7 +759,7 @@ void FlowTableWithFields::update_choices(const std::shared_ptr<const LayoutItem_
       continue;
 
     const auto layout_item = combo->get_layout_item();
-    const auto layout_item_field = 
+    const auto layout_item_field =
       std::dynamic_pointer_cast<const LayoutItem_Field>(layout_item);
     if(!layout_item_field || !layout_item_field->get_formatting_used().get_has_related_choices())
       continue;
@@ -1373,7 +1373,7 @@ void FlowTableWithFields::set_find_mode(bool val)
 
 void FlowTableWithFields::set_enable_drag_and_drop(bool enabled)
 {
-  const EggDragEnableMode drag_mode = 
+  const EggDragEnableMode drag_mode =
     (enabled ? EGG_DRAG_FULL : EGG_DRAG_DISABLED);
 
   //Only enable dragging of the sub-tables.
@@ -1381,18 +1381,18 @@ void FlowTableWithFields::set_enable_drag_and_drop(bool enabled)
   //though there would be nowhere to drop it:
   set_drag_enabled(EGG_DRAG_DISABLED);
   set_drop_enabled(enabled);
-  
+
   for(const auto& child : m_sub_flow_tables)
   {
     if(child)
     {
       //std::cout << G_STRFUNC << ": child\n";
       child->set_drag_enabled(drag_mode);
-      child->set_drop_enabled(enabled);  
+      child->set_drop_enabled(enabled);
     }
   }
 }
-  
+
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
 } //namespace Glom
diff --git a/glom/mode_data/flowtablewithfields.h b/glom/mode_data/flowtablewithfields.h
index afe20b1..d22fecf 100644
--- a/glom/mode_data/flowtablewithfields.h
+++ b/glom/mode_data/flowtablewithfields.h
@@ -103,7 +103,7 @@ public:
    */
   void set_other_field_value(const std::shared_ptr<const LayoutItem_Field>& layout_field, const 
Gnome::Gda::Value& value);
 
-  /** Refresh the list of related records in choice combo boxes, 
+  /** Refresh the list of related records in choice combo boxes,
    * in any instance of the specified field.
    */
   void update_choices(const std::shared_ptr<const LayoutItem_Field>& field);
@@ -136,7 +136,7 @@ public:
    */
   void get_layout_groups(Document::type_list_layout_groups& groups);
   std::shared_ptr<LayoutGroup> get_layout_group();
-  
+
   void set_enable_drag_and_drop(bool enabled = true);
 
   /** For instance,
diff --git a/glom/mode_data/notebook_data.cc b/glom/mode_data/notebook_data.cc
index 5bf0cce..825c058 100644
--- a/glom/mode_data/notebook_data.cc
+++ b/glom/mode_data/notebook_data.cc
@@ -54,7 +54,7 @@ Notebook_Data::Notebook_Data()
   //Allow List to ask Details to show a record.
   m_Box_List.signal_user_requested_details().connect(sigc::mem_fun(*this,
     &Notebook_Data::on_list_user_requested_details));
-  
+
   //Allow the parent widget to detect list selection changes:
   m_Box_List.signal_record_selection_changed().connect(m_signal_record_selection_changed.make_slot());
 
@@ -69,7 +69,7 @@ Notebook_Data::Notebook_Data()
 
   //Allow Details to ask to show a different record in a different table:
   signal_connect_for_reemit_2args(m_Box_Details.signal_requested_related_details(), 
m_signal_record_details_requested);
-  
+
 
   //Fill composite view:
   add_view(&m_Box_List);
@@ -240,8 +240,8 @@ FoundSet Notebook_Data::get_found_set_selected() const
   {
     //Start with something sensible:
     FoundSet found_set = m_Box_List.get_found_set();
-    
-    const Gnome::Gda::Value primary_key_value_selected = 
+
+    const Gnome::Gda::Value primary_key_value_selected =
       m_Box_List.get_primary_key_value_selected();
     if(Conversions::value_is_empty(primary_key_value_selected))
     {
@@ -257,7 +257,7 @@ FoundSet Notebook_Data::get_found_set_selected() const
       found_set.m_where_clause = Gnome::Gda::SqlExpr();
       return found_set;
     }
-    
+
     auto primary_key_field =
       document->get_field_primary_key(m_table_name);
     found_set.m_where_clause = SqlUtils::build_simple_where_expression(
diff --git a/glom/mode_data/notebook_data.h b/glom/mode_data/notebook_data.h
index e066af7..2feb618 100644
--- a/glom/mode_data/notebook_data.h
+++ b/glom/mode_data/notebook_data.h
@@ -79,7 +79,7 @@ public:
   type_signal_record_details_requested signal_record_details_requested();
 
   typedef sigc::signal<void()> type_signal_record_selection_changed;
-  
+
   /** This signal is emitted when the a record is selected, or deselected,
    * in the list view.
    */
diff --git a/glom/mode_data/test_flowtablewithfields.cc b/glom/mode_data/test_flowtablewithfields.cc
index 6c3d46a..9e933fa 100644
--- a/glom/mode_data/test_flowtablewithfields.cc
+++ b/glom/mode_data/test_flowtablewithfields.cc
@@ -61,8 +61,8 @@ static void fill_flowtable(Glom::FlowTableWithFields& flowtable)
     item->set_title("title for image", AppWindow::get_current_locale());
     flowtable.add_layout_item(item);
   }
-  
-  auto group = 
+
+  auto group =
     std::make_shared<Glom::LayoutGroup>();
   auto item =
     std::make_shared<Glom::LayoutItem_Text>();
@@ -99,7 +99,7 @@ main(int argc, char* argv[])
   window.add(flowtable);
   flowtable.set_design_mode();
   flowtable.show();
-  
+
   flowtable.set_enable_drag_and_drop(true);
   //flowtable.set_drag_enabled(EGG_DRAG_FULL);
   //flowtable.set_drop_enabled(true);
diff --git a/glom/mode_design/dialog_add_related_table.cc b/glom/mode_design/dialog_add_related_table.cc
index 2462240..cec5447 100644
--- a/glom/mode_design/dialog_add_related_table.cc
+++ b/glom/mode_design/dialog_add_related_table.cc
@@ -17,7 +17,7 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  */
- 
+
 #include "dialog_add_related_table.h"
 #include <glom/frame_glom.h> //For show_ok_dialog.h
 #include <libglom/db_utils.h>
@@ -88,7 +88,7 @@ void Dialog_AddRelatedTable::on_entry_table_name()
   //Guess a possible relationship name, based on the table name:
   Glib::ustring possible_relationship_name = table_name;
 
-  //Discover whether a table with this name exists already, 
+  //Discover whether a table with this name exists already,
   //and append a numerical prefix until we find one that doesn't exist.
   //TODO: A numerical prefix would look pretty stupid, but I suppose must do something. murrayc
   bool exists_already = true;
@@ -119,14 +119,14 @@ void Dialog_AddRelatedTable::on_combo_field_name()
 
   //Guess a possible related table name, based on the from key:
   Glib::ustring possible_table_name = field_name;
-  
+
   //If the field has an _id prefix then remove that:
   possible_table_name = Utils::string_remove_suffix(possible_table_name, "_id", false /* not case sensitive 
*/);
 
   //Add a "s" to the end, though this probably only makes sense in English. TODO: Don't do this?
   possible_table_name += 's';
 
-  //Discover whether a table with this name exists already, 
+  //Discover whether a table with this name exists already,
   //and append a numerical prefix until we find one that doesn't exist:
   bool exists_already = true;
   Glib::ustring name_to_try = possible_table_name;
diff --git a/glom/mode_design/dialog_database_preferences.cc b/glom/mode_design/dialog_database_preferences.cc
index 00bfdb7..14a36c6 100644
--- a/glom/mode_design/dialog_database_preferences.cc
+++ b/glom/mode_design/dialog_database_preferences.cc
@@ -17,7 +17,7 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  */
- 
+
 #include "dialog_database_preferences.h"
 #include <glom/python_embed/glom_python.h>
 #include <libglom/standard_table_prefs_fields.h>
@@ -79,7 +79,7 @@ Dialog_Database_Preferences::Dialog_Database_Preferences(BaseObjectType* cobject
   builder->get_widget("textview_calculation",  m_text_view_script);
   builder->get_widget("button_test",  m_button_test_script);
 
-  m_button_test_script->signal_clicked().connect( 
+  m_button_test_script->signal_clicked().connect(
     sigc::mem_fun(*this, &Dialog_Database_Preferences::on_button_test_script) );
 
   // Set a monospace font
@@ -88,10 +88,10 @@ Dialog_Database_Preferences::Dialog_Database_Preferences(BaseObjectType* cobject
   //Dialog_Properties::set_modified(false);
 
   //Tell the SourceView to do syntax highlighting for Python:
-  auto languages_manager = 
+  auto languages_manager =
     Gsv::LanguageManager::get_default();
 
-  auto language = 
+  auto language =
     languages_manager->get_language("python"); //This is the GtkSourceView language ID.
   if(language)
   {
@@ -125,7 +125,7 @@ void Dialog_Database_Preferences::on_treeview_cell_edited_next_value(const Glib:
     const Glib::ustring field_name = row[m_columns.m_col_field];
 
     const Gnome::Gda::Value next_value = Conversions::parse_value(new_value);
-               
+
     auto builder = Gnome::Gda::SqlBuilder::create(Gnome::Gda::SQL_STATEMENT_UPDATE);
     builder->set_table(GLOM_STANDARD_TABLE_AUTOINCREMENTS_TABLE_NAME);
     builder->add_field_value_as_value(GLOM_STANDARD_TABLE_AUTOINCREMENTS_FIELD_NEXT_VALUE, next_value);
@@ -178,7 +178,7 @@ void Dialog_Database_Preferences::load_from_document()
   builder->select_add_field(GLOM_STANDARD_TABLE_AUTOINCREMENTS_FIELD_NEXT_VALUE,
     GLOM_STANDARD_TABLE_AUTOINCREMENTS_TABLE_NAME);
   builder->select_add_target(GLOM_STANDARD_TABLE_AUTOINCREMENTS_TABLE_NAME);
-  
+
   NumericFormat numeric_format; //ignored
 
   auto datamodel = DbUtils::query_execute_select(builder);
diff --git a/glom/mode_design/dialog_initial_password.cc b/glom/mode_design/dialog_initial_password.cc
index a204e91..f148922 100644
--- a/glom/mode_design/dialog_initial_password.cc
+++ b/glom/mode_design/dialog_initial_password.cc
@@ -60,7 +60,7 @@ void Dialog_InitialPassword::load_from_document()
     if(user.empty())
     {
       //Default to the UNIX user name, which is often the same as the Postgres user name:
-      const auto pchUser = getenv("USER"); 
+      const auto pchUser = getenv("USER");
       if(pchUser)
         user = pchUser;
     }
diff --git a/glom/mode_design/dialog_relationships.cc b/glom/mode_design/dialog_relationships.cc
index 866ef85..47c6775 100644
--- a/glom/mode_design/dialog_relationships.cc
+++ b/glom/mode_design/dialog_relationships.cc
@@ -46,8 +46,8 @@ Dialog_Relationships::~Dialog_Relationships()
 }
 
 /**
- * 
- * @param table_name 
+ *
+ * @param table_name
  */
 bool Dialog_Relationships::init_db_details(const Glib::ustring& table_name)
 {
diff --git a/glom/mode_design/fields/box_db_table_definition.cc 
b/glom/mode_design/fields/box_db_table_definition.cc
index a264b51..ac6c809 100644
--- a/glom/mode_design/fields/box_db_table_definition.cc
+++ b/glom/mode_design/fields/box_db_table_definition.cc
@@ -309,7 +309,7 @@ bool Box_DB_Table_Definition::check_field_change(const std::shared_ptr<const Fie
   //Refuse to have no primary key set:
   if(field_old->get_primary_key() && !field_new->get_primary_key()) //Was the primary key column unchecked?
   {
-    UiUtils::show_ok_dialog(_("Primary key required"), 
+    UiUtils::show_ok_dialog(_("Primary key required"),
       _("You may not unset the primary key because the table must have a primary key. You may set another 
field as the primary key instead."), parent_window, Gtk::MESSAGE_ERROR);
 
       return false;
@@ -354,7 +354,7 @@ bool Box_DB_Table_Definition::check_field_change(const std::shared_ptr<const Fie
     std::cout << "get_field_exists_in_database(" << m_table_name << ", " << field_new->get_name() << ") 
returned true\n";
 
     //Warn the user and refuse to make the change:
-    UiUtils::show_ok_dialog(_("Field Name Already Exists"), 
+    UiUtils::show_ok_dialog(_("Field Name Already Exists"),
       _("This field already exists. Please choose a different field name"), parent_window, 
Gtk::MESSAGE_ERROR);
 
     return false;
@@ -394,7 +394,7 @@ void Box_DB_Table_Definition::on_adddel_changed(const Gtk::TreeModel::iterator&
         {
           auto fieldNewWithModifications = change_definition(m_Field_BeingEdited, fieldNew);
 
-          //Update the row to show any extra changes (such as unique being set/unset whenever the primary 
key is set/unset) 
+          //Update the row to show any extra changes (such as unique being set/unset whenever the primary 
key is set/unset)
          // TODO: When change_definition decides to unset another column from
          // being primary key, then we also need to refill that row, so that
          // the user interface does not show two primary keys.
@@ -473,7 +473,7 @@ std::shared_ptr<Field> Box_DB_Table_Definition::get_field_definition(const Gtk::
 
   //Start with original definitions, so that we preserve things like UNSIGNED.
   //TODO maybe use document's fieldinfo instead of m_vecFields.
-  auto field_temp = 
+  auto field_temp =
     DbUtils::get_fields_for_table_one_field(pDoc, m_table_name, strFieldNameBeforeEdit);
   if(field_temp)
   {
@@ -570,7 +570,7 @@ std::shared_ptr<Field> Box_DB_Table_Definition::change_definition(const std::sha
   //DB field definition:
 
   std::shared_ptr<Field> result;
-  
+
   if(!fieldOld || !field)
     return result;
 
@@ -595,7 +595,7 @@ std::shared_ptr<Field> Box_DB_Table_Definition::change_definition(const std::sha
       }
     }
 
-    //Forget the remembered currently-viewed primary key value, 
+    //Forget the remembered currently-viewed primary key value,
     //because it will be useless with a different field as the primary key, or with no field as primary key:
     auto document = get_document();
     document->forget_layout_record_viewed(m_table_name);
@@ -715,7 +715,7 @@ bool Box_DB_Table_Definition::field_has_null_values(const std::shared_ptr<const
     std::cerr << G_STRFUNC << ": query failed.\n";
   }
 
-  return null_count > 0; 
+  return null_count > 0;
 }
 
 bool Box_DB_Table_Definition::field_has_non_unique_values(const std::shared_ptr<const Field>& field)
@@ -723,7 +723,7 @@ bool Box_DB_Table_Definition::field_has_non_unique_values(const std::shared_ptr<
   long count_distinct = 0;
   long count_all = 0;
 
-  //Count the distinct rows:  
+  //Count the distinct rows:
   auto builder_query_distinct = Gnome::Gda::SqlBuilder::create(Gnome::Gda::SQL_STATEMENT_UPDATE);
   builder_query_distinct->select_set_distinct();
   builder_query_distinct->set_table(m_table_name);
@@ -745,7 +745,7 @@ bool Box_DB_Table_Definition::field_has_non_unique_values(const std::shared_ptr<
     Gnome::Gda::SqlBuilder::create(Gnome::Gda::SQL_STATEMENT_SELECT);
   builder_query_all->select_add_field(field->get_name(), m_table_name);
   builder_query_all->select_add_target(m_table_name);
-      
+
   datamodel = DbUtils::query_execute_select(builder_query_all);
   if(datamodel)
   {
diff --git a/glom/mode_design/fields/box_db_table_definition.h 
b/glom/mode_design/fields/box_db_table_definition.h
index 2d1c8f8..08882a2 100644
--- a/glom/mode_design/fields/box_db_table_definition.h
+++ b/glom/mode_design/fields/box_db_table_definition.h
@@ -30,7 +30,7 @@ namespace Glom
 
 class Box_DB_Table_Definition : public Box_DB_Table
 {
-public: 
+public:
   Box_DB_Table_Definition();
   Box_DB_Table_Definition(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
   virtual ~Box_DB_Table_Definition();
diff --git a/glom/mode_design/fields/combo_fieldtype.h b/glom/mode_design/fields/combo_fieldtype.h
index b158955..1881203 100644
--- a/glom/mode_design/fields/combo_fieldtype.h
+++ b/glom/mode_design/fields/combo_fieldtype.h
@@ -31,7 +31,7 @@ namespace Glom
 
 class Combo_FieldType : public Gtk::ComboBox
 {
-public: 
+public:
   Combo_FieldType();
   Combo_FieldType(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
 
diff --git a/glom/mode_design/layout/combobox_fields.cc b/glom/mode_design/layout/combobox_fields.cc
index 881c945..e1b6a84 100644
--- a/glom/mode_design/layout/combobox_fields.cc
+++ b/glom/mode_design/layout/combobox_fields.cc
@@ -109,7 +109,7 @@ void ComboBox_Fields::set_fields(const std::shared_ptr<Document>& document, cons
 
   if(!m_model)
     return;
-  
+
   m_model->clear();
 
   //Fill the model:
@@ -131,7 +131,7 @@ void ComboBox_Fields::set_fields(const std::shared_ptr<Document>& document, cons
 
   if(!m_model)
     return;
-  
+
   m_model->clear();
 
   //Fill the model:
@@ -154,7 +154,7 @@ void ComboBox_Fields::set_fields(const type_vec_fields& fields, bool with_none_i
 {
   if(!m_model)
     return;
-  
+
   m_model->clear();
 
   if(with_none_item)
@@ -163,14 +163,14 @@ void ComboBox_Fields::set_fields(const type_vec_fields& fields, bool with_none_i
     auto tree_iter = m_model->append();
     Gtk::TreeModel::Row row = *tree_iter;
 
-    row[m_model_columns.m_field] = std::shared_ptr<Field>(); 
+    row[m_model_columns.m_field] = std::shared_ptr<Field>();
     row[m_model_columns.m_separator] = false;
 
     //Add a separator after the "None" item:
     tree_iter = m_model->append();
     row = *tree_iter;
 
-    row[m_model_columns.m_field] = std::shared_ptr<Field>(); 
+    row[m_model_columns.m_field] = std::shared_ptr<Field>();
     row[m_model_columns.m_separator] = true;
   }
 
diff --git a/glom/mode_design/layout/combobox_fields.h b/glom/mode_design/layout/combobox_fields.h
index 144a4c8..ecae649 100644
--- a/glom/mode_design/layout/combobox_fields.h
+++ b/glom/mode_design/layout/combobox_fields.h
@@ -38,7 +38,7 @@ public:
   ComboBox_Fields(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
 
   typedef std::vector< std::shared_ptr<Field> > type_vec_fields;
-    
+
   /** Fill the combo box with fields.
    * @param fields The fields to show in the combo box.
    * @param with_none_type Whether to show an extra None item.
@@ -51,7 +51,7 @@ public:
    * @param field_type Show only fields of this type.
    */
   void set_fields(const std::shared_ptr<Document>& document, const Glib::ustring parent_table_name);
-    
+
   /** Fill the combo box with fields, but only fields of a certain type.
    * @param document The Document, used to get the list of fields.
    * @param parent_table_name The table whose fields should be shown.
@@ -61,7 +61,7 @@ public:
 
   void set_selected_field(const std::shared_ptr<const Field>& field);
   void set_selected_field(const Glib::ustring& field_name);
- 
+
   std::shared_ptr<Field> get_selected_field() const;
   Glib::ustring get_selected_field_name() const;
 
@@ -72,7 +72,7 @@ private:
   void on_cell_data_title(const Gtk::TreeModel::const_iterator& iter);
   bool on_row_separator(const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::const_iterator& 
iter);
 
- 
+
   //Tree model columns:
   //These columns are used by the model that is created by the default constructor
   class ModelColumns : public Gtk::TreeModel::ColumnRecord
diff --git a/glom/mode_design/layout/dialog_choose_field.cc b/glom/mode_design/layout/dialog_choose_field.cc
index a6b432c..799e758 100644
--- a/glom/mode_design/layout/dialog_choose_field.cc
+++ b/glom/mode_design/layout/dialog_choose_field.cc
@@ -88,15 +88,15 @@ void Dialog_ChooseField::set_document(const std::shared_ptr<Document>& document,
     m_combo_relationship->set_selected_relationship( field->get_relationship(), 
field->get_related_relationship());
   }
   else
-    m_combo_relationship->set_selected_parent_table(table_name, document->get_table_title(table_name, 
AppWindow::get_current_locale())); 
+    m_combo_relationship->set_selected_parent_table(table_name, document->get_table_title(table_name, 
AppWindow::get_current_locale()));
 
-  //If one start field was specified, then multiple selection would not make 
+  //If one start field was specified, then multiple selection would not make
   //much sense. The caller probably wants single selection.
   //Make this explicit in the API if that is not always suitable.
   auto selection = m_treeview->get_selection();
   selection->set_mode((field && !(field->get_name().empty()))
-    ? Gtk::SELECTION_SINGLE : Gtk::SELECTION_MULTIPLE); 
-   
+    ? Gtk::SELECTION_SINGLE : Gtk::SELECTION_MULTIPLE);
+
   //Select the current field at the start:
   if(field)
   {
@@ -115,7 +115,7 @@ void Dialog_ChooseField::set_document(const std::shared_ptr<Document>& document,
 
     if(iterFound != m_model->children().end())
     {
-      
+
       selection->select(iterFound);
 
       //Make sure that it is scrolled into view:
@@ -139,10 +139,10 @@ void Dialog_ChooseField::set_document(const std::shared_ptr<Document>& document,
   {
     std::cerr << G_STRFUNC << ": table_name is empty\n";
   }
-  
+
   auto selection = m_treeview->get_selection();
-  selection->set_mode(Gtk::SELECTION_MULTIPLE); 
-   
+  selection->set_mode(Gtk::SELECTION_MULTIPLE);
+
 
   //Update the tree models from the document
   if(document)
@@ -201,7 +201,7 @@ std::shared_ptr<LayoutItem_Field> Dialog_ChooseField::get_field_chosen() const
   const auto list_fields = get_fields_chosen();
   if(!(list_fields.empty()))
   {
-    field = *(list_fields.begin()); 
+    field = *(list_fields.begin());
   }
 
   if(!field)
@@ -218,7 +218,7 @@ std::shared_ptr<LayoutItem_Field> Dialog_ChooseField::get_field_chosen() const
     m_start_field->set_full_field_details( field->get_full_field_details() );
     m_start_field->set_relationship( field->get_relationship() );
     m_start_field->set_related_relationship( field->get_related_relationship() );
-  
+
     return m_start_field;
   }
 }
@@ -231,7 +231,7 @@ Dialog_ChooseField::type_list_field_items Dialog_ChooseField::get_fields_chosen(
   auto refTreeSelection = m_treeview->get_selection();
   if(!refTreeSelection)
     return list_fields;
-    
+
   //Relationship:
   //Note that a null relationship means that the parent table was selected instead.
   std::shared_ptr<Relationship> related_relationship;
@@ -242,22 +242,22 @@ Dialog_ChooseField::type_list_field_items Dialog_ChooseField::get_fields_chosen(
     auto tree_iter = m_model->get_iter(path);
     if(!tree_iter)
       continue;
-      
 
-    // Setup a LayoutItem_Field for the Field, 
+
+    // Setup a LayoutItem_Field for the Field,
     // so is_same_field() can work:
     auto field = std::make_shared<LayoutItem_Field>();
     field->set_relationship(relationship);
     field->set_related_relationship(related_relationship);
-      
+
     Gtk::TreeModel::Row row = *tree_iter;
     std::shared_ptr<Field> field_details = row[m_ColumnsFields.m_col_field];
-    field->set_full_field_details(field_details); 
-      
-    // Start with the original LayoutItem_Field, 
+    field->set_full_field_details(field_details);
+
+    // Start with the original LayoutItem_Field,
     // to preserve extra information such as Translations:
     if(m_start_field && m_start_field->is_same_field(field))
-      field = m_start_field; 
+      field = m_start_field;
     else
       field = std::make_shared<LayoutItem_Field>();
 
@@ -267,7 +267,7 @@ Dialog_ChooseField::type_list_field_items Dialog_ChooseField::get_fields_chosen(
     field->set_full_field_details(field_details); //So is_same_field() can work.
 
     field->set_name(row[m_ColumnsFields.m_col_name]);
-    
+
     list_fields.emplace_back(field);
   }
 
diff --git a/glom/mode_design/layout/dialog_choose_field.h b/glom/mode_design/layout/dialog_choose_field.h
index dc72179..25af29f 100644
--- a/glom/mode_design/layout/dialog_choose_field.h
+++ b/glom/mode_design/layout/dialog_choose_field.h
@@ -37,7 +37,7 @@ class Dialog_ChooseField : public Gtk::Dialog
 public:
   static const char* glade_id;
   static const bool glade_developer;
-  
+
   Dialog_ChooseField(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
 
   /**
@@ -52,7 +52,7 @@ public:
   //void select_item(const std::shared_ptr<const Field>& field);
 
   std::shared_ptr<LayoutItem_Field> get_field_chosen() const;
-  
+
   typedef std::list< std::shared_ptr<LayoutItem_Field> > type_list_field_items;
   type_list_field_items get_fields_chosen() const;
 
diff --git a/glom/mode_design/layout/dialog_choose_relationship.h 
b/glom/mode_design/layout/dialog_choose_relationship.h
index 6b015ba..dce0e65 100644
--- a/glom/mode_design/layout/dialog_choose_relationship.h
+++ b/glom/mode_design/layout/dialog_choose_relationship.h
@@ -34,7 +34,7 @@ class Dialog_ChooseRelationship : public Gtk::Dialog
 public:
   static const char* glade_id;
   static const bool glade_developer;
-       
+
   Dialog_ChooseRelationship();
   Dialog_ChooseRelationship(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
 
diff --git a/glom/mode_design/layout/dialog_layout.h b/glom/mode_design/layout/dialog_layout.h
index efd5c47..47fde99 100644
--- a/glom/mode_design/layout/dialog_layout.h
+++ b/glom/mode_design/layout/dialog_layout.h
@@ -47,7 +47,7 @@ public:
    * @param table_fields: The actual fields in the table, in case the document does not yet know about them 
all.
    */
   virtual void init(const Glib::ustring& layout_name, const Glib::ustring& layout_platform, const 
std::shared_ptr<Document>& document, const Glib::ustring& table_name, const type_vecConstLayoutFields& 
table_fields);
-  
+
 protected:
 
   void treeview_fill_sequences(const Glib::RefPtr<Gtk::TreeModel> model, const Gtk::TreeModelColumn<guint>& 
sequence_column);
@@ -76,7 +76,7 @@ protected:
   //Whether the layout is for a view that allows editing.
   //If so, various editing options will be available in the formatting.
   bool m_editable_layout;
-  
+
   bool m_modified;
 };
 
diff --git a/glom/mode_design/layout/dialog_layout_calendar_related.cc 
b/glom/mode_design/layout/dialog_layout_calendar_related.cc
index a2e0575..8286721 100644
--- a/glom/mode_design/layout/dialog_layout_calendar_related.cc
+++ b/glom/mode_design/layout/dialog_layout_calendar_related.cc
@@ -68,7 +68,7 @@ Dialog_Layout_Calendar_Related::Dialog_Layout_Calendar_Related(BaseObjectType* c
   builder->get_widget("radiobutton_navigation_specify", m_radio_navigation_specify);
   builder->get_widget_derived("combobox_navigation_specify", m_combo_navigation_specify);
   if(m_radio_navigation_specify && m_combo_navigation_specify)
-  { 
+  {
     make_sensitivity_depend_on_toggle_button(*m_radio_navigation_specify, *m_combo_navigation_specify);
     m_combo_navigation_specify->signal_changed().connect(sigc::mem_fun(*this, 
&Dialog_Layout_Calendar_Related::on_combo_navigation_specific_changed));
   }
@@ -228,7 +228,7 @@ void Dialog_Layout_Calendar_Related::update_ui(bool including_relationship_list)
   //Describe the automatic navigation:
   std::shared_ptr<const UsesRelationship> relationship_navigation_automatic
     = m_portal->get_portal_navigation_relationship_automatic(document);
-  Glib::ustring automatic_navigation_description = 
+  Glib::ustring automatic_navigation_description =
     m_portal->get_relationship_name_used(); //TODO: Use get_relationship_display_name() instead?
   if(relationship_navigation_automatic) //This is a relationship in the related table.
   {
diff --git a/glom/mode_design/layout/dialog_layout_calendar_related.h 
b/glom/mode_design/layout/dialog_layout_calendar_related.h
index 820371b..0515228 100644
--- a/glom/mode_design/layout/dialog_layout_calendar_related.h
+++ b/glom/mode_design/layout/dialog_layout_calendar_related.h
@@ -36,7 +36,7 @@ class Dialog_Layout_Calendar_Related : public Dialog_Layout_List
 public:
   static const char* glade_id;
   static const bool glade_developer;
-  
+
   Dialog_Layout_Calendar_Related(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
 
   /**
@@ -61,9 +61,9 @@ private:
   //signal handlers:
   void on_button_add_field() override;
   void on_button_edit() override;
- 
+
   void on_combo_relationship_changed();
-  
+
   void on_combo_navigation_specific_changed();
   void on_combo_date_field_changed();
   void on_checkbutton_show_child_relationships();
@@ -77,7 +77,7 @@ private:
   Gtk::RadioButton* m_radio_navigation_specify;
   Gtk::Label* m_label_navigation_automatic;
   ComboBox_Relationship* m_combo_navigation_specify;
-    
+
   ComboBox_Fields* m_combobox_date_field;
 };
 
diff --git a/glom/mode_design/layout/dialog_layout_details.cc 
b/glom/mode_design/layout/dialog_layout_details.cc
index 20ae49e..98e158e 100644
--- a/glom/mode_design/layout/dialog_layout_details.cc
+++ b/glom/mode_design/layout/dialog_layout_details.cc
@@ -80,13 +80,13 @@ Dialog_Layout_Details::Dialog_Layout_Details(BaseObjectType* cobject, const Glib
   box_calendar->hide();
 
   builder->get_widget("label_table_name", m_label_table_name);
-  
+
   //This is only shown in Dialog_Layout_List_Related:
   builder->get_widget("hbox_rows_count", m_hbox_rows_count);
   builder->get_widget("spinbutton_rows_count_min", m_spinbutton_rows_count_min);
   builder->get_widget("spinbutton_rows_count_max", m_spinbutton_rows_count_max);
   m_hbox_rows_count->hide();
-  
+
   builder->get_widget("treeview_fields", m_treeview_fields);
   if(m_treeview_fields)
   {
diff --git a/glom/mode_design/layout/dialog_layout_details.h b/glom/mode_design/layout/dialog_layout_details.h
index 713cf81..a5076ef 100644
--- a/glom/mode_design/layout/dialog_layout_details.h
+++ b/glom/mode_design/layout/dialog_layout_details.h
@@ -122,7 +122,7 @@ protected:
   Gtk::Button* m_button_formatting;
   Gtk::Button* m_button_edit;
   Gtk::Label* m_label_table_name;
-  
+
   Gtk::Box* m_hbox_rows_count;
   Gtk::SpinButton* m_spinbutton_rows_count_min;
   Gtk::SpinButton* m_spinbutton_rows_count_max;
diff --git a/glom/mode_design/layout/dialog_layout_export.cc b/glom/mode_design/layout/dialog_layout_export.cc
index c4afea1..7add035 100644
--- a/glom/mode_design/layout/dialog_layout_export.cc
+++ b/glom/mode_design/layout/dialog_layout_export.cc
@@ -139,7 +139,7 @@ void Dialog_Layout_Export::set_layout_groups(Document::type_list_const_layout_gr
       //Add the group's fields:
       for(const auto& base_item : group->get_items())
       {
-        auto item = std::dynamic_pointer_cast<const LayoutItem_Field>(base_item); 
+        auto item = std::dynamic_pointer_cast<const LayoutItem_Field>(base_item);
         if(item)
         {
           auto iterTree = m_model_fields->append();
@@ -251,7 +251,7 @@ void Dialog_Layout_Export::on_button_add_field()
 {
   //Get the chosen fields:
   const auto fields_list = offer_field_list(m_table_name, this);
-  for(const auto& field : fields_list) 
+  for(const auto& field : fields_list)
   {
     if(!field)
       continue;
diff --git a/glom/mode_design/layout/dialog_layout_list.cc b/glom/mode_design/layout/dialog_layout_list.cc
index cea2646..abd7323 100644
--- a/glom/mode_design/layout/dialog_layout_list.cc
+++ b/glom/mode_design/layout/dialog_layout_list.cc
@@ -45,7 +45,7 @@ Dialog_Layout_List::Dialog_Layout_List(BaseObjectType* cobject, const Glib::RefP
   //We don't want this part of the dialog:
   //(We share one glade definition for several dialogs.)
   Gtk::Frame* box_calendar = nullptr;
-  builder->get_widget("frame_calendar", box_calendar); 
+  builder->get_widget("frame_calendar", box_calendar);
   box_calendar->hide();
 
   //We don't use this column:
diff --git a/glom/mode_design/layout/dialog_layout_list.h b/glom/mode_design/layout/dialog_layout_list.h
index af00264..7fbfef8 100644
--- a/glom/mode_design/layout/dialog_layout_list.h
+++ b/glom/mode_design/layout/dialog_layout_list.h
@@ -31,7 +31,7 @@ class Dialog_Layout_List : public Dialog_Layout_Details
 public:
   static const char* glade_id;
   static const bool glade_developer;
-  
+
   Dialog_Layout_List(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
 };
 
diff --git a/glom/mode_design/layout/dialog_layout_list_related.cc 
b/glom/mode_design/layout/dialog_layout_list_related.cc
index a0b5648..edcc8ed 100644
--- a/glom/mode_design/layout/dialog_layout_list_related.cc
+++ b/glom/mode_design/layout/dialog_layout_list_related.cc
@@ -48,13 +48,13 @@ Dialog_Layout_List_Related::Dialog_Layout_List_Related(BaseObjectType* cobject,
   m_spinbutton_column_line_width(nullptr),
   m_colorbutton_line(nullptr),
   m_for_print_layout(false)
-{  
+{
   // Show the appropriate alternate widgets:
   m_box_table_widgets->hide();
   m_box_related_table_widgets->show();
   m_box_related_navigation->show();
   m_hbox_rows_count->show();
-  
+
   m_spinbutton_rows_count_min->set_range(0, 100); //Otherwise only 0 would be allowed.
   m_spinbutton_rows_count_min->set_increments(1, 10); //Otherwise the buttons do nothing.
   m_spinbutton_rows_count_min->signal_value_changed().connect(
@@ -162,7 +162,7 @@ void Dialog_Layout_List_Related::init_with_portal(const Glib::ustring& layout_na
   {
     m_box_related_navigation->hide();
     m_box_frame_lines->show();
-    
+
     m_spinbutton_row_line_width->set_value(
       portal->get_print_layout_row_line_width());
     m_spinbutton_column_line_width->set_value(
@@ -290,9 +290,9 @@ void Dialog_Layout_List_Related::update_ui(bool including_relationship_list)
   }
 
   //Describe the automatic navigation:
-  auto relationship_navigation_automatic = 
+  auto relationship_navigation_automatic =
     m_portal->get_portal_navigation_relationship_automatic(document);
-  Glib::ustring automatic_navigation_description = 
+  Glib::ustring automatic_navigation_description =
     m_portal->get_relationship_name_used(); //TODO: Use get_relationship_display_name() instead?
   if(relationship_navigation_automatic) //This is a relationship in the related table.
   {
@@ -316,7 +316,7 @@ void Dialog_Layout_List_Related::save_to_document()
   if(m_modified)
   {
     //Get the data from the TreeView and store it in the document:
-    
+
     //Get the groups and their fields:
     Document::type_list_layout_groups mapGroups;
 
@@ -370,17 +370,17 @@ void Dialog_Layout_List_Related::save_to_document()
       uses_rel->set_related_relationship(std::shared_ptr<Relationship>());
       m_portal->set_navigation_type(LayoutItem_Portal::navigation_type::NONE);
     }
-    
+
     m_portal->set_rows_count(
       m_spinbutton_rows_count_min->get_value(),
       m_spinbutton_rows_count_max->get_value());
-    
+
     if(m_for_print_layout)
     {
       m_portal->set_print_layout_row_line_width(
         m_spinbutton_row_line_width->get_value());
       m_portal->set_print_layout_column_line_width(
-        m_spinbutton_column_line_width->get_value());      
+        m_spinbutton_column_line_width->get_value());
       m_portal->set_print_layout_line_color(
         m_colorbutton_line->get_rgba().to_string() );
     }
@@ -406,7 +406,7 @@ void Dialog_Layout_List_Related::on_combo_relationship_changed()
   //The relationship's to field may not be a unique field, because that would
   //prevent the portal from having multiple records.
   auto to_key_field =
-    DbUtils::get_fields_for_table_one_field(get_document(), 
+    DbUtils::get_fields_for_table_one_field(get_document(),
       relationship->get_to_table(), relationship->get_to_field());
   bool relationship_invalid = false;
   if(!to_key_field)
diff --git a/glom/mode_design/layout/dialog_layout_list_related.h 
b/glom/mode_design/layout/dialog_layout_list_related.h
index 2d41608..61a625c 100644
--- a/glom/mode_design/layout/dialog_layout_list_related.h
+++ b/glom/mode_design/layout/dialog_layout_list_related.h
@@ -35,7 +35,7 @@ class Dialog_Layout_List_Related : public Dialog_Layout_List
 public:
   static const char* glade_id;
   static const bool glade_developer;
-  
+
   Dialog_Layout_List_Related(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
 
   /**
@@ -62,9 +62,9 @@ protected:
   //signal handlers:
   void on_button_add_field() override;
   void on_button_edit() override;
- 
+
   void on_combo_relationship_changed();
-  
+
   void on_combo_navigation_specific_changed();
   void on_checkbutton_show_child_relationships();
   void on_spinbutton_changed();
@@ -78,11 +78,11 @@ protected:
   Gtk::RadioButton* m_radio_navigation_specify;
   Gtk::Label* m_label_navigation_automatic;
   ComboBox_Relationship* m_combo_navigation_specify;
-  
+
   Gtk::SpinButton* m_spinbutton_row_line_width;
   Gtk::SpinButton* m_spinbutton_column_line_width;
   Gtk::ColorButton* m_colorbutton_line;
-  
+
   bool m_for_print_layout;
 };
 
diff --git a/glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.cc 
b/glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.cc
index c20b1fa..9fefbb0 100644
--- a/glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.cc
+++ b/glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.cc
@@ -53,10 +53,10 @@ Dialog_ButtonScript::Dialog_ButtonScript(BaseObjectType* cobject, const Glib::Re
   //Dialog_Properties::set_modified(false);
 
   //Tell the SourceView to do syntax highlighting for Python:
-  auto languages_manager = 
+  auto languages_manager =
     Gsv::LanguageManager::get_default();
 
-  auto language = 
+  auto language =
     languages_manager->get_language("python"); //This is the GtkSourceView language ID.
   if(language)
   {
@@ -130,7 +130,7 @@ void Dialog_ButtonScript::on_button_test_script()
     sharedconnection->get_gda_connection(),
     callbacks,
     error_message);
-    
+
   if(!error_message.empty())
     UiUtils::show_ok_dialog(_("Calculation failed"), Glib::ustring::compose(_("The calculation failed with 
this error:\n%1"), error_message), *this, Gtk::MESSAGE_ERROR);
 }
diff --git a/glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.h 
b/glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.h
index d7e2fdc..78abea7 100644
--- a/glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.h
+++ b/glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.h
@@ -40,7 +40,7 @@ class Dialog_ButtonScript
 public:
   static const char* glade_id;
   static const bool glade_developer;
-  
+
   Dialog_ButtonScript(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
 
   void set_script(const std::shared_ptr<const LayoutItem_Button>& script, const Glib::ustring& table_name);
diff --git a/glom/mode_design/layout/layout_item_dialogs/dialog_fieldslist.cc 
b/glom/mode_design/layout/layout_item_dialogs/dialog_fieldslist.cc
index 1532809..614f545 100644
--- a/glom/mode_design/layout/layout_item_dialogs/dialog_fieldslist.cc
+++ b/glom/mode_design/layout/layout_item_dialogs/dialog_fieldslist.cc
@@ -228,9 +228,9 @@ Gtk::TreeModel::iterator Dialog_FieldsList::append_appropriate_row()
   }
   else
   {
-    result = m_model_fields->append(); 
+    result = m_model_fields->append();
   }
-  
+
   return result;
 }
 
diff --git a/glom/mode_design/layout/layout_item_dialogs/dialog_line.cc 
b/glom/mode_design/layout/layout_item_dialogs/dialog_line.cc
index 09e720f..7017b03 100644
--- a/glom/mode_design/layout/layout_item_dialogs/dialog_line.cc
+++ b/glom/mode_design/layout/layout_item_dialogs/dialog_line.cc
@@ -59,7 +59,7 @@ void Dialog_Line::set_line(const std::shared_ptr<const LayoutItem_Line>& line)
   m_line = glom_sharedptr_clone(line); //Remember it so we save any details that are not in our UI.
 
   m_spinbutton_line_width->set_value(line->get_line_width());
-  
+
   const Gdk::RGBA color( line->get_line_color() );
   m_colorbutton->set_rgba(color);
 
@@ -74,7 +74,7 @@ std::shared_ptr<LayoutItem_Line> Dialog_Line::get_line() const
   {
     std::cerr << G_STRFUNC <<  ": m_line is null\n";
   }
-  
+
   auto result = glom_sharedptr_clone(m_line); //Start with the old details, to preserve anything that is not 
in our UI.
 
   if(!result)
diff --git a/glom/mode_design/layout/layout_item_dialogs/dialog_line.h 
b/glom/mode_design/layout/layout_item_dialogs/dialog_line.h
index e78ee7a..387d2e8 100644
--- a/glom/mode_design/layout/layout_item_dialogs/dialog_line.h
+++ b/glom/mode_design/layout/layout_item_dialogs/dialog_line.h
@@ -39,7 +39,7 @@ class Dialog_Line
 public:
   static const char* glade_id;
   static const bool glade_developer;
-  
+
   Dialog_Line(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
 
   void set_line(const std::shared_ptr<const LayoutItem_Line>& line);
diff --git a/glom/mode_design/layout/layout_item_dialogs/dialog_sortfields.cc 
b/glom/mode_design/layout/layout_item_dialogs/dialog_sortfields.cc
index 60a9298..9a525b2 100644
--- a/glom/mode_design/layout/layout_item_dialogs/dialog_sortfields.cc
+++ b/glom/mode_design/layout/layout_item_dialogs/dialog_sortfields.cc
@@ -211,7 +211,7 @@ void Dialog_SortFields::on_button_add_field()
 {
   //Get the chosen fields:
   const auto fields_list = offer_field_list(m_table_name, this);
-  for(const auto& field : fields_list) 
+  for(const auto& field : fields_list)
   {
     if(!field)
       continue;
@@ -285,7 +285,7 @@ void Dialog_SortFields::on_button_edit_field()
       std::shared_ptr<const LayoutItem_Field> field = row[m_ColumnsFields.m_col_layout_item];
 
       //Get the chosen field:
-      auto field_chosen = 
+      auto field_chosen =
         offer_field_list_select_one_field(field, m_table_name, this);
       if(field_chosen)
 
diff --git a/glom/mode_design/layout/layout_item_dialogs/dialog_textobject.h 
b/glom/mode_design/layout/layout_item_dialogs/dialog_textobject.h
index 379d619..6eefd25 100644
--- a/glom/mode_design/layout/layout_item_dialogs/dialog_textobject.h
+++ b/glom/mode_design/layout/layout_item_dialogs/dialog_textobject.h
@@ -39,7 +39,7 @@ class Dialog_TextObject
 public:
   static const char* glade_id;
   static const bool glade_developer;
-  
+
   Dialog_TextObject(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
 
   void set_textobject(const std::shared_ptr<const LayoutItem_Text>& textobject, const Glib::ustring& 
table_name, bool show_title = true);
diff --git a/glom/mode_design/layout/treestore_layout.h b/glom/mode_design/layout/treestore_layout.h
index 23b8edb..188b473 100644
--- a/glom/mode_design/layout/treestore_layout.h
+++ b/glom/mode_design/layout/treestore_layout.h
@@ -35,7 +35,7 @@ private:
 
 public:
 
-  //Tree model columns:  
+  //Tree model columns:
   class ModelColumns : public Gtk::TreeModel::ColumnRecord
   {
   public:
diff --git a/glom/mode_design/print_layouts/dialog_text_formatting.cc 
b/glom/mode_design/print_layouts/dialog_text_formatting.cc
index 03eaba6..5511951 100644
--- a/glom/mode_design/print_layouts/dialog_text_formatting.cc
+++ b/glom/mode_design/print_layouts/dialog_text_formatting.cc
@@ -42,7 +42,7 @@ Dialog_TextFormatting::Dialog_TextFormatting(BaseObjectType* cobject, const Glib
   //Formatting:
   //Get the place to put the Formatting stuff:
   builder->get_widget("box_formatting_placeholder", m_box_formatting_placeholder);
- 
+
   Utils::box_pack_start_glade_child_widget_derived_with_warning(m_box_formatting_placeholder, 
m_box_formatting);
   if(m_box_formatting)
   {
diff --git a/glom/mode_design/print_layouts/print_layout_toolbar.h 
b/glom/mode_design/print_layouts/print_layout_toolbar.h
index d0bf441..64c0fe6 100644
--- a/glom/mode_design/print_layouts/print_layout_toolbar.h
+++ b/glom/mode_design/print_layouts/print_layout_toolbar.h
@@ -37,7 +37,7 @@ public:
 
 private:
   Gtk::ToolItemGroup m_group_items, m_group_lines, m_group_records;
-  PrintLayoutToolbarButton m_drag_field, m_drag_text, m_drag_image, 
+  PrintLayoutToolbarButton m_drag_field, m_drag_text, m_drag_image,
     m_drag_line_horizontal, m_drag_line_vertical, m_drag_related_records;
 };
 
diff --git a/glom/mode_design/print_layouts/print_layout_toolbar_button.cc 
b/glom/mode_design/print_layouts/print_layout_toolbar_button.cc
index 7dbb043..2da1125 100644
--- a/glom/mode_design/print_layouts/print_layout_toolbar_button.cc
+++ b/glom/mode_design/print_layouts/print_layout_toolbar_button.cc
@@ -17,7 +17,7 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  */
- 
+
 #include "print_layout_toolbar_button.h"
 #include <glom/utils_ui.h>
 #include <libglom/utils.h>
@@ -49,7 +49,7 @@ PrintLayoutToolbarButton::PrintLayoutToolbarButton(const std::string& icon_name,
   std::vector<Gtk::TargetEntry> targetentries;
   targetentries.emplace_back(Gtk::TargetEntry(get_target()));
 
-  drag_source_set(targetentries, Gdk::MODIFIER_MASK, 
+  drag_source_set(targetentries, Gdk::MODIFIER_MASK,
                   Gdk::ACTION_COPY | Gdk::ACTION_MOVE);
   set_tooltip_text(tooltip);
   set_label(title);
@@ -66,7 +66,7 @@ PrintLayoutToolbarButton::enumItems PrintLayoutToolbarButton::get_item_type_from
     palette_candidate = palette_candidate->get_parent();
     palette = dynamic_cast<Gtk::ToolPalette*>(palette_candidate);
   }
-  
+
   if(!palette)
     return result;
 
diff --git a/glom/mode_design/print_layouts/print_layout_toolbar_button.h 
b/glom/mode_design/print_layouts/print_layout_toolbar_button.h
index 9052068..4636880 100644
--- a/glom/mode_design/print_layouts/print_layout_toolbar_button.h
+++ b/glom/mode_design/print_layouts/print_layout_toolbar_button.h
@@ -17,7 +17,7 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  */
- 
+
 
 #ifndef GLOM_PRINT_LAYOUT_TOOLBAR_BUTTON_H
 #define GLOM_PRINT_LAYOUT_TOOLBAR_BUTTON_H
@@ -59,7 +59,7 @@ private:
   {
     return "flowtable";
   };
-  
+
 private:
   enumItems m_type;
 };
diff --git a/glom/mode_design/print_layouts/window_print_layout_edit.cc 
b/glom/mode_design/print_layouts/window_print_layout_edit.cc
index e6b8a65..f52f5b6 100644
--- a/glom/mode_design/print_layouts/window_print_layout_edit.cc
+++ b/glom/mode_design/print_layouts/window_print_layout_edit.cc
@@ -68,7 +68,7 @@ Window_PrintLayout_Edit::Window_PrintLayout_Edit(BaseObjectType* cobject, const
   //for an attempt to do this properly.
 
   //Try to give the user a large-enough window for working with a whole page:
-  //TODO: Make this even larger if we can be sure that no WM will make 
+  //TODO: Make this even larger if we can be sure that no WM will make
   //the window bigger than the screen.
   set_default_size(900, 640);
 
@@ -99,7 +99,7 @@ Window_PrintLayout_Edit::Window_PrintLayout_Edit(BaseObjectType* cobject, const
   const Gtk::TargetEntry target_rule(DRAG_TARGET_NAME_RULE, Gtk::TARGET_SAME_APP, 0);
   m_drag_targets_rule.emplace_back(target_rule);
 
-  //The rulers are not in the glade file because they use an unusual widget 
+  //The rulers are not in the glade file because they use an unusual widget
   //that Glade wouldn't usually know about:
   m_vruler = GIMP_RULER(gimp_ruler_new(GTK_ORIENTATION_VERTICAL));
   gtk_widget_show(GTK_WIDGET(m_vruler));
@@ -116,17 +116,17 @@ Window_PrintLayout_Edit::Window_PrintLayout_Edit(BaseObjectType* cobject, const
     sigc::mem_fun(*this, &Window_PrintLayout_Edit::on_hruler_button_press_event), true);
   Glib::wrap(GTK_WIDGET(m_vruler))->signal_button_press_event().connect(
     sigc::mem_fun(*this, &Window_PrintLayout_Edit::on_vruler_button_press_event), false);
- 
+
   //Add the ruler widgets to the table at the left and top:
   //TODO: Use C++ API here:
   Gtk::Grid* grid = nullptr;
   builder->get_widget("grid_canvas", grid);
-  gtk_grid_attach(grid->gobj(), GTK_WIDGET(m_vruler), 
+  gtk_grid_attach(grid->gobj(), GTK_WIDGET(m_vruler),
     0, 1, 1, 1);
   gtk_widget_set_hexpand(GTK_WIDGET(m_vruler), FALSE);
   gtk_widget_set_vexpand(GTK_WIDGET(m_vruler), TRUE);
 
-  gtk_grid_attach(grid->gobj(), GTK_WIDGET(m_hruler), 
+  gtk_grid_attach(grid->gobj(), GTK_WIDGET(m_hruler),
     1, 0, 1, 1);
   gtk_widget_set_hexpand(GTK_WIDGET(m_hruler), TRUE);
   gtk_widget_set_vexpand(GTK_WIDGET(m_hruler), FALSE);
@@ -188,7 +188,7 @@ Window_PrintLayout_Edit::Window_PrintLayout_Edit(BaseObjectType* cobject, const
   m_canvas.signal_selection_changed().connect(
     sigc::mem_fun(*this, &Window_PrintLayout_Edit::on_canvas_selection_changed));
   on_canvas_selection_changed(); //Disable relevant widgets or actions by default.
-  
+
   show_all_children();
 }
 
@@ -207,8 +207,8 @@ void Window_PrintLayout_Edit::init_menu()
 
   m_action_edit_copy = add_action("copy",
     sigc::mem_fun(*this, &Window_PrintLayout_Edit::on_menu_edit_copy) );
-  
-  m_action_edit_paste = add_action("paste", 
+
+  m_action_edit_paste = add_action("paste",
     sigc::mem_fun(*this, &Window_PrintLayout_Edit::on_menu_edit_paste) );
   m_action_edit_paste->set_enabled(false); //This is enabled when something is copied or cut.
 
@@ -240,12 +240,12 @@ void Window_PrintLayout_Edit::init_menu()
    sigc::mem_fun(*this, &Window_PrintLayout_Edit::on_menu_insert_delete_page) );
 
 
-  m_action_align_top = action_group->add_action("align-top", 
+  m_action_align_top = action_group->add_action("align-top",
     sigc::mem_fun(*this, &Window_PrintLayout_Edit::on_menu_align_top) );
 
   m_action_align_bottom = action_group->add_action("align-bottom",
     sigc::mem_fun(*this, &Window_PrintLayout_Edit::on_menu_align_bottom) );
-  
+
   m_action_align_left = action_group->add_action("align-left",
     sigc::mem_fun(*this, &Window_PrintLayout_Edit::on_menu_align_left) );
 
@@ -301,7 +301,7 @@ bool Window_PrintLayout_Edit::on_canvas_drag_drop(const Glib::RefPtr<Gdk::DragCo
     return false;
 
   //Cause our drag_data_received callback to be called:
-  //Note that this isn't necessary when using DEST_DEFAULT_DEFAULTS (or DEST_DEFAULT_DROP), 
+  //Note that this isn't necessary when using DEST_DEFAULT_DEFAULTS (or DEST_DEFAULT_DROP),
   //because that would allow us to just return true to make this happen automatically.
   m_canvas.drag_get_data(drag_context, target, timestamp);
 
@@ -382,7 +382,7 @@ std::shared_ptr<LayoutItem> Window_PrintLayout_Edit::create_empty_item(PrintLayo
   {
     auto layout_item_derived = std::make_shared<LayoutItem_Text>();
 
-    // Note to translators: This is the default contents of a text item on a print layout: 
+    // Note to translators: This is the default contents of a text item on a print layout:
     layout_item_derived->set_text_original(_("text")); //TODO: Choose some other longer default because this 
is hidden under the drag icon?
     layout_item = layout_item_derived;
     layout_item->set_print_layout_position(0, 0,
@@ -423,7 +423,7 @@ std::shared_ptr<LayoutItem> Window_PrintLayout_Edit::create_empty_item(PrintLayo
   //Set a default text style and size:
   //12pt text seems sane. It is what OpenOffice/LibreOffice and Abiword use:
   //Serif (rather than sans-serif) is sane for body text:
-  auto with_formatting = 
+  auto with_formatting =
     std::dynamic_pointer_cast<LayoutItem_WithFormatting>(layout_item);
   if(with_formatting)
     with_formatting->m_formatting.set_text_format_font("Serif 12");
@@ -439,7 +439,7 @@ void Window_PrintLayout_Edit::canvas_convert_from_drag_pixels(double& x, double&
   {
     const auto scroll_x = m_scrolled_window.get_hadjustment()->get_value();
     const auto scroll_y = m_scrolled_window.get_vadjustment()->get_value();
-  
+
     x += scroll_x;
     y += scroll_y;
   }
@@ -451,7 +451,7 @@ void Window_PrintLayout_Edit::canvas_convert_from_drag_pixels(double& x, double&
 void Window_PrintLayout_Edit::on_canvas_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& 
drag_context, int x, int y, const Gtk::SelectionData& selection_data, guint /* info */, guint timestamp)
 {
   //This is called when an item is dropped on the canvas,
-  //or after our drag_motion handler has called drag_get_data()):      
+  //or after our drag_motion handler has called drag_get_data()):
 
   const auto target = m_canvas.drag_dest_find_target(drag_context);
   if(target.empty())
@@ -470,7 +470,7 @@ void Window_PrintLayout_Edit::on_canvas_drag_data_received(const Glib::RefPtr<Gd
       return;
 
     m_canvas.show_temp_rule(0, 0, false);
- 
+
     if(m_temp_rule_horizontal)
       m_canvas.add_horizontal_rule(item_y);
     else
@@ -480,7 +480,7 @@ void Window_PrintLayout_Edit::on_canvas_drag_data_received(const Glib::RefPtr<Gd
 
     return;
   }
-  
+
   //Discover what toolbar item was dropped:
   const auto item_type = PrintLayoutToolbarButton::get_item_type_from_selection_data(drag_context, 
selection_data);
   if(item_type == PrintLayoutToolbarButton::enumItems::INVALID)
@@ -499,7 +499,7 @@ void Window_PrintLayout_Edit::on_canvas_drag_data_received(const Glib::RefPtr<Gd
       //Show it on the canvas, at the position:
       if(layout_item)
       {
-        m_layout_item_dropping = 
+        m_layout_item_dropping =
           create_canvas_layout_item_and_add(layout_item);
 
         m_layout_item_dropping->snap_position(item_x, item_y);
@@ -528,7 +528,7 @@ void Window_PrintLayout_Edit::on_canvas_drag_data_received(const Glib::RefPtr<Gd
       create_canvas_layout_item_and_add(layout_item);
     item->snap_position(item_x, item_y);
     item->set_xy(item_x, item_y);
-   
+
     if(m_layout_item_dropping)
     {
       m_layout_item_dropping->remove();
@@ -609,7 +609,7 @@ void Window_PrintLayout_Edit::set_print_layout(const Glib::ustring& table_name,
   //Set the table name and title:
   update_table_title();
 
-  m_entry_name->set_text(print_layout->get_name()); 
+  m_entry_name->set_text(print_layout->get_name());
   m_entry_title->set_text(item_get_title(print_layout));
 
   set_ruler_sizes();
@@ -635,7 +635,7 @@ std::shared_ptr<PrintLayout> Window_PrintLayout_Edit::get_print_layout()
   m_print_layout->set_title( m_entry_title->get_text() , AppWindow::get_current_locale());
 
   bool showgrid = false;
-  m_action_showgrid->get_state(showgrid); 
+  m_action_showgrid->get_state(showgrid);
   m_print_layout->set_show_grid(showgrid);
 
   bool showrules = false;
@@ -713,7 +713,7 @@ void Window_PrintLayout_Edit::setup_context_menu()
 
 bool Window_PrintLayout_Edit::on_canvas_motion_notify_event(GdkEventMotion* motion_event)
 {
-  //Notice that, unlike drag-motion, motion-notify-event's x/y position already 
+  //Notice that, unlike drag-motion, motion-notify-event's x/y position already
   //seems to have the scrolling taken into account.
   double x = motion_event->x;
   double y = motion_event->y;
@@ -752,7 +752,7 @@ void Window_PrintLayout_Edit::set_default_position(const std::shared_ptr<LayoutI
   double item_x = 10;
   double item_y = 10;
   canvas_convert_from_drag_pixels(item_x, item_y);
-  
+
   //TODO: This doesn't seem to actually work:
   while(get_is_item_at(item_x, item_y))
   {
@@ -774,7 +774,7 @@ void Window_PrintLayout_Edit::on_menu_insert_field()
 {
   auto layout_item = create_empty_item(PrintLayoutToolbarButton::enumItems::FIELD);
 
-  // Note to translators: This is the default contents of a text item on a print layout: 
+  // Note to translators: This is the default contents of a text item on a print layout:
   set_default_position(layout_item);
 
   create_canvas_layout_item_and_add(layout_item);
@@ -791,7 +791,7 @@ void Window_PrintLayout_Edit::on_menu_insert_text()
 void Window_PrintLayout_Edit::on_menu_insert_image()
 {
   auto layout_item = create_empty_item(PrintLayoutToolbarButton::enumItems::IMAGE);
-  // Note to translators: This is the default contents of a text item on a print layout: 
+  // Note to translators: This is the default contents of a text item on a print layout:
   //layout_item->set_text_original(_("text"));
   set_default_position(layout_item);
 
@@ -816,7 +816,7 @@ void Window_PrintLayout_Edit::on_menu_insert_line_horizontal()
   m_canvas.convert_from_pixels(item_x, item_y);
   */
 
-  // Note to translators: This is the default contents of a text item on a print layout: 
+  // Note to translators: This is the default contents of a text item on a print layout:
   //layout_item->set_text_original(_("text"));
   //layout_item->set_coordinates(item_x, item_y, item_x + 100, item_y);
 
@@ -856,9 +856,9 @@ void Window_PrintLayout_Edit::on_menu_insert_create_standard()
     std::cerr << G_STRFUNC << ": page_setup was null\n";
     return;
   }
-  
+
   m_print_layout = PrintLayoutUtils::create_standard(page_setup, m_table_name, document, true /* avoid page 
margins */);
-  
+
   m_canvas.set_print_layout(m_table_name, m_print_layout);
 }
 
@@ -884,7 +884,7 @@ void Window_PrintLayout_Edit::on_menu_insert_delete_page()
   dialog.add_button(_("Remove Page"), Gtk::RESPONSE_OK);
   if(dialog.run() != Gtk::RESPONSE_OK)
     return;
-      
+
   m_canvas.set_page_count(page_count - 1);
 }
 
@@ -976,7 +976,7 @@ void Window_PrintLayout_Edit::on_menu_view_zoom(int parameter)
     //Get the canvas size:
     Goocanvas::Bounds bounds;
     m_canvas.get_bounds(bounds);
-  
+
     double canvas_width_pixels = bounds.get_x2() - bounds.get_x1();
     double canvas_height_pixels = bounds.get_y2() - bounds.get_y1();
     m_canvas.convert_to_pixels(canvas_width_pixels, canvas_height_pixels);
@@ -999,7 +999,7 @@ void Window_PrintLayout_Edit::on_menu_view_zoom(int parameter)
   else
   {
     m_canvas.set_zoom_percent(parameter);
-  }  
+  }
 }
 
 void Window_PrintLayout_Edit::on_menu_file_page_setup()
@@ -1056,7 +1056,7 @@ void Window_PrintLayout_Edit::on_menu_edit_copy()
     if(item)
       item->update_layout_position_from_canvas();
 
-    auto cloned = 
+    auto cloned =
       glom_sharedptr_clone(item->get_layout_item());
 
     m_layout_items_to_paste.emplace_back(cloned);
@@ -1098,9 +1098,9 @@ Glib::RefPtr<CanvasLayoutItem> Window_PrintLayout_Edit::create_canvas_layout_ite
   auto canvas_item = CanvasLayoutItem::create();
   m_canvas.add_canvas_layout_item(canvas_item);
   canvas_item->set_layout_item(layout_item);
-  
+
   //canvas_item->set_outline_visible(m_outline_visibility);
-  
+
   return canvas_item;
 }
 
@@ -1146,7 +1146,7 @@ void Window_PrintLayout_Edit::on_menu_align_top()
     else if(y < top)
       top = y;
   }
-  
+
   //Give all items the same top position:
   for(const auto& selected_item : m_layout_items_selected)
   {
@@ -1174,7 +1174,7 @@ void Window_PrintLayout_Edit::on_menu_align_bottom()
     double x = 0;
     double y = 0;
     selected_item->get_xy(x, y);
-    
+
     double width = 0;
     double height = 0;
     selected_item->get_width_height(width, height);
@@ -1185,7 +1185,7 @@ void Window_PrintLayout_Edit::on_menu_align_bottom()
     else if(this_bottom > bottom)
       bottom = this_bottom;
   }
-  
+
   //Give all items the same top position:
   for(const auto& selected_item : m_layout_items_selected)
   {
@@ -1195,7 +1195,7 @@ void Window_PrintLayout_Edit::on_menu_align_bottom()
     double x = 0;
     double y = 0;
     selected_item->get_xy(x, y);
-    
+
     double width = 0;
     double height = 0;
     selected_item->get_width_height(width, height);
@@ -1226,7 +1226,7 @@ void Window_PrintLayout_Edit::on_menu_align_left()
     else if(x < left)
       left = x;
   }
-  
+
   //Give all items the same left position:
   for(const auto& selected_item : m_layout_items_selected)
   {
@@ -1255,7 +1255,7 @@ void Window_PrintLayout_Edit::on_menu_align_right()
     double x = 0;
     double y = 0;
     selected_item->get_xy(x, y);
-    
+
     double width = 0;
     double height = 0;
     selected_item->get_width_height(width, height);
@@ -1266,7 +1266,7 @@ void Window_PrintLayout_Edit::on_menu_align_right()
     else if(this_right > right)
       right = this_right;
   }
-  
+
   //Give all items the same top position:
   for(const auto& selected_item : m_layout_items_selected)
   {
@@ -1276,7 +1276,7 @@ void Window_PrintLayout_Edit::on_menu_align_right()
     double x = 0;
     double y = 0;
     selected_item->get_xy(x, y);
-    
+
     double width = 0;
     double height = 0;
     selected_item->get_width_height(width, height);
@@ -1320,10 +1320,10 @@ void Window_PrintLayout_Edit::on_scroll_value_changed()
   double height = m_scrolled_window.get_vadjustment()->get_page_size();
   double x = m_scrolled_window.get_hadjustment()->get_value();
   double y = m_scrolled_window.get_vadjustment()->get_value();
-  
+
   //This definitely seems to give the correct mm values.
   //(It understands the canvas units and scale):
-  m_canvas.convert_from_pixels(width, height); 
+  m_canvas.convert_from_pixels(width, height);
   m_canvas.convert_from_pixels(x, y);
 
   //std::cout << "DEBUG: Calling m_hruler->set_range(" << x << ", " << x + width << ", 0, " <<  x + width << 
std::endl;
@@ -1400,7 +1400,7 @@ void Window_PrintLayout_Edit::on_canvas_selection_changed()
     item.disconnect();
   }
   m_connections_items_selected_moved.clear();
-  
+
   const auto items = m_canvas.get_selected_items();
   for(const auto& base_item : items)
   {
@@ -1469,12 +1469,12 @@ void Window_PrintLayout_Edit::on_selected_item_moved(const Glib::RefPtr<CanvasIt
     selected_item->get_xy(x, y);
     selected_item->set_xy(x + x_offset, y + y_offset);
   }
-  
+
   //Show the new positions in the spinbuttons:
   on_canvas_selection_changed();
 
   //Show the left-most and top-most position in the rulers:
-  //TODO: Maybe showing the position of the one item being 
+  //TODO: Maybe showing the position of the one item being
   //moved (though part of a group) would be better.
   //Inkscape just tracks the cursor, which doesn't seem useful.
   double x = 0;
@@ -1596,7 +1596,7 @@ bool Window_PrintLayout_Edit::on_hruler_button_press_event(GdkEventButton* butto
     return true;
 
   m_temp_rule_horizontal = true;
- 
+
   return false;
 }
 
diff --git a/glom/mode_design/print_layouts/window_print_layout_edit.h 
b/glom/mode_design/print_layouts/window_print_layout_edit.h
index df79d74..b58a6b1 100644
--- a/glom/mode_design/print_layouts/window_print_layout_edit.h
+++ b/glom/mode_design/print_layouts/window_print_layout_edit.h
@@ -74,7 +74,7 @@ private:
   void on_menu_insert_create_standard();
   void on_menu_insert_add_page();
   void on_menu_insert_delete_page();
-  
+
   void on_menu_view_show_grid();
   void on_menu_view_show_rules();
   void on_menu_view_show_outlines();
@@ -86,7 +86,7 @@ private:
   void on_menu_edit_delete();
   void on_menu_edit_selectall();
   void on_menu_edit_unselectall();
-  
+
   void on_menu_align_top();
   void on_menu_align_bottom();
   void on_menu_align_left();
@@ -131,7 +131,7 @@ private:
 
   bool get_is_item_at(double x, double y) const;
   void set_default_position(const std::shared_ptr<LayoutItem>& item);
-  
+
   void canvas_convert_from_drag_pixels(double& x, double& y, bool adjust_for_scrolling = false) const;
   void get_dimensions_of_multiple_selected_items(double& x, double& y, double& width, double& height) const;
 
@@ -192,18 +192,18 @@ private:
   Glib::RefPtr<Gio::SimpleAction> m_action_zoom;
 
   //Edit menu:
-  Glib::RefPtr<Gio::SimpleAction> m_action_edit_cut, m_action_edit_copy, 
+  Glib::RefPtr<Gio::SimpleAction> m_action_edit_cut, m_action_edit_copy,
     m_action_edit_paste, m_action_edit_delete;
-    
+
   //Align menu:
-  Glib::RefPtr<Gio::SimpleAction> m_action_align_top, m_action_align_bottom, 
+  Glib::RefPtr<Gio::SimpleAction> m_action_align_top, m_action_align_bottom,
     m_action_align_left, m_action_align_right;
 
   //Toolbar:
   Gtk::Box* m_palette_box;
   std::vector<Gtk::TargetEntry> m_drag_targets_all;
   PrintLayoutToolbar m_toolbar;
-  
+
   //Context menu for clicking on empty space on the canvas:
   std::unique_ptr<Gtk::Menu> m_context_menu;
 };
diff --git a/glom/mode_design/relationships_overview/canvas_group_dbtable.cc 
b/glom/mode_design/relationships_overview/canvas_group_dbtable.cc
index 5f8e8fc..3fe24fa 100644
--- a/glom/mode_design/relationships_overview/canvas_group_dbtable.cc
+++ b/glom/mode_design/relationships_overview/canvas_group_dbtable.cc
@@ -40,16 +40,16 @@ double CanvasGroupDbTable::m_table_width = 200; //TODO: Calculate based on the t
 double margin = 5.0;
 
 CanvasGroupDbTable::CanvasGroupDbTable(const Glib::ustring& table_name, const Glib::ustring& table_title, 
const Document::type_vec_fields& fields, double x, double y)
-: m_table_height(0) 
+: m_table_height(0)
 {
   m_table_name = table_name;
 
   //double max_table_height = 0;
-  
+
   const double field_height = 20;
   m_table_height = field_height * (fields.size() + 1);
 
-  
+
   auto rect = CanvasRectMovable::create(x, y, m_table_width, m_table_height);
   rect->property_line_width() = 2.0;
   rect->property_radius_x() = 4.0,
@@ -89,14 +89,14 @@ CanvasGroupDbTable::CanvasGroupDbTable(const Glib::ustring& table_name, const Gl
     else
       title_field = item_get_title_or_name(field);
 
-    auto text_item = CanvasTextMovable::create(title_field, 
+    auto text_item = CanvasTextMovable::create(title_field,
       x + margin, y + margin + field_y, m_table_width - margin*2,
       Goocanvas::ANCHOR_NORTH_WEST);
     text_item->property_font() = "Sans 12"; //TODO: Let the user specify this.
     text_item->property_use_markup() = true;
     text_item->set_movement_allowed(false, false); //Move only as part of the parent group.
     add_child(text_item);
-    
+
     //Remember the postion for later, for drawing relationships lines:
     m_map_fields_y[field->get_name()] = field_y;
 
diff --git a/glom/mode_design/relationships_overview/canvas_group_dbtable.h 
b/glom/mode_design/relationships_overview/canvas_group_dbtable.h
index 47bb2b8..8e44dde 100644
--- a/glom/mode_design/relationships_overview/canvas_group_dbtable.h
+++ b/glom/mode_design/relationships_overview/canvas_group_dbtable.h
@@ -35,7 +35,7 @@ private:
 
 public:
   static Glib::RefPtr<CanvasGroupDbTable> create(const Glib::ustring& table_name, const Glib::ustring& 
table_title, const Document::type_vec_fields& fields, double x = 0.0, double y = 0.0);
- 
+
   //TODO: Use bounds instead?
   double get_table_height() const;
   double get_table_width() const;
diff --git a/glom/mode_design/relationships_overview/printoperation_relationshipsoverview.cc 
b/glom/mode_design/relationships_overview/printoperation_relationshipsoverview.cc
index 6417108..b959210 100644
--- a/glom/mode_design/relationships_overview/printoperation_relationshipsoverview.cc
+++ b/glom/mode_design/relationships_overview/printoperation_relationshipsoverview.cc
@@ -44,13 +44,13 @@ void PrintOperationRelationshipsOverview::on_draw_page(
 
   //Get a Cairo Context, which is used as a drawing board:
   Cairo::RefPtr<Cairo::Context> cairo_context = print_context->get_cairo_context();
-  
+
   //Set a drawing scale (before drawing) so that the cairo context fits on the page:
   const auto print_height = print_context->get_height();
   const auto print_width = print_context->get_width();
   //std::cout << "print_height=" << print_height << ", print_width=" << print_width << std::endl;
 
-  //TODO: Get the total size of the drawn objects instead of the bounds (which includes extra whitespace): 
+  //TODO: Get the total size of the drawn objects instead of the bounds (which includes extra whitespace):
   double canvas_left = 0;
   double canvas_top = 0;
   double canvas_right = 0;
diff --git a/glom/mode_design/relationships_overview/window_relationships_overview.cc 
b/glom/mode_design/relationships_overview/window_relationships_overview.cc
index a89a7de..fde97c8 100644
--- a/glom/mode_design/relationships_overview/window_relationships_overview.cc
+++ b/glom/mode_design/relationships_overview/window_relationships_overview.cc
@@ -406,7 +406,7 @@ Glib::RefPtr<CanvasGroupDbTable> Window_RelationshipsOverview::get_table_group(c
 
 void Window_RelationshipsOverview::on_table_moved(const Glib::RefPtr<CanvasItemMovable>& item, double /* 
x_offset */, double /* y_offset */)
 {
-  auto table = 
+  auto table =
     Glib::RefPtr<CanvasGroupDbTable>::cast_dynamic(item);
   if(!table)
     return;
diff --git a/glom/mode_design/relationships_overview/window_relationships_overview.h 
b/glom/mode_design/relationships_overview/window_relationships_overview.h
index 89f633e..02dbcf9 100644
--- a/glom/mode_design/relationships_overview/window_relationships_overview.h
+++ b/glom/mode_design/relationships_overview/window_relationships_overview.h
@@ -39,7 +39,7 @@
 
 namespace Glom
 {
- 
+
 class Window_RelationshipsOverview
  : public Gtk::ApplicationWindow,
    public View_Composite_Glom
@@ -50,12 +50,12 @@ public:
 
   Window_RelationshipsOverview(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
   virtual ~Window_RelationshipsOverview();
-  
+
   void load_from_document() override;
 
 private:
   class TableView;
-  
+
   void draw_tables();
   void draw_lines();
   void setup_context_menu();
@@ -94,7 +94,7 @@ private:
 
   typedef std::list<sigc::connection> type_list_connections;
   type_list_connections m_list_table_connections;
-  
+
   //Context menu:
   std::unique_ptr<Gtk::Menu> m_context_menu;
   Glib::RefPtr<Gio::SimpleAction> m_action_edit_fields, m_action_edit_relationships;
diff --git a/glom/mode_design/report_layout/treestore_report_layout.h 
b/glom/mode_design/report_layout/treestore_report_layout.h
index 4034c29..346cd8d 100644
--- a/glom/mode_design/report_layout/treestore_report_layout.h
+++ b/glom/mode_design/report_layout/treestore_report_layout.h
@@ -34,7 +34,7 @@ private:
 
 public:
 
-  //Tree model columns:  
+  //Tree model columns:
   class ModelColumns : public Gtk::TreeModel::ColumnRecord
   {
   public:
diff --git a/glom/mode_design/script_library/dialog_new_script.cc 
b/glom/mode_design/script_library/dialog_new_script.cc
index 1997475..ff462e7 100644
--- a/glom/mode_design/script_library/dialog_new_script.cc
+++ b/glom/mode_design/script_library/dialog_new_script.cc
@@ -17,7 +17,7 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  */
- 
+
 #include "dialog_new_script.h"
 
 namespace Glom
diff --git a/glom/mode_design/script_library/dialog_script_library.cc 
b/glom/mode_design/script_library/dialog_script_library.cc
index 5b681ad..942bfb4 100644
--- a/glom/mode_design/script_library/dialog_script_library.cc
+++ b/glom/mode_design/script_library/dialog_script_library.cc
@@ -91,7 +91,7 @@ void Dialog_ScriptLibrary::on_button_add()
   Utils::get_glade_widget_derived_with_warning(dialog);
   if(!dialog) //Unlikely and it already warns on stderr.
     return;
-    
+
   dialog->set_transient_for(*this);
   const auto dialog_response = Glom::UiUtils::dialog_run_with_help(dialog);
   dialog->hide();
@@ -164,7 +164,7 @@ void Dialog_ScriptLibrary::load_current_script()
   {
     script = document->get_library_module(name);
   }
- 
+
   //Show the script text:
   m_text_view->get_buffer()->set_text(script);
 
@@ -197,7 +197,7 @@ void Dialog_ScriptLibrary::load_from_document()
     return;
 
   m_combobox_name->remove_all();
- 
+
   for(const auto& name : document->get_library_module_names())
   {
     m_combobox_name->append(name);
@@ -227,7 +227,7 @@ void Dialog_ScriptLibrary::save_to_document()
   if(!document)
     return;
 
-  save_current_script();  
+  save_current_script();
 }
 
 
diff --git a/glom/mode_design/translation/combobox_locale.cc b/glom/mode_design/translation/combobox_locale.cc
index ea937e0..ed886ab 100644
--- a/glom/mode_design/translation/combobox_locale.cc
+++ b/glom/mode_design/translation/combobox_locale.cc
@@ -76,7 +76,7 @@ void ComboBox_Locale::set_selected_locale(const Glib::ustring& locale)
     {
       const Glib::ustring& this_text = row[m_model_columns.m_identifier];
       //std::cout << G_STRFUNC << ": DEBUG: locale=" << locale << ", this_text=" << this_text << ".\n";
- 
+
       if(this_text == locale)
       {
         set_active(row);
diff --git a/glom/mode_design/translation/dialog_change_language.h 
b/glom/mode_design/translation/dialog_change_language.h
index 869329a..a1c9d2c 100644
--- a/glom/mode_design/translation/dialog_change_language.h
+++ b/glom/mode_design/translation/dialog_change_language.h
@@ -28,7 +28,7 @@
 namespace Glom
 {
 
-/** 
+/**
  */
 class Dialog_ChangeLanguage
   : public Gtk::Dialog
diff --git a/glom/mode_design/translation/window_translations.cc 
b/glom/mode_design/translation/window_translations.cc
index aac7174..af2390a 100644
--- a/glom/mode_design/translation/window_translations.cc
+++ b/glom/mode_design/translation/window_translations.cc
@@ -190,7 +190,7 @@ void Window_Translations::on_cell_data_original(Gtk::CellRenderer* renderer, con
 
       //Use the name if there is no title:
       if(text.empty())
-        text = item->get_name(); 
+        text = item->get_name();
 
       //TODO: Mark non-English originals.
       renderer_text->property_text() = text;
@@ -241,7 +241,7 @@ void Window_Translations::load_from_document()
 
     if(item->get_title_original().empty())
       continue;
-      
+
     auto iterTree = m_model->append();
     Gtk::TreeModel::Row row = *iterTree;
 
@@ -338,12 +338,12 @@ void Window_Translations::on_treeview_edited(const Glib::ustring& /* path */, co
 }
 
 void Window_Translations::on_button_export()
-{ 
+{
   //Show the file-chooser dialog, to select an output .po file:
   Gtk::FileChooserDialog file_dlg(_("Choose .po File Name"), Gtk::FILE_CHOOSER_ACTION_SAVE);
   file_dlg.set_transient_for(*this);
   file_dlg.set_do_overwrite_confirmation();
-  
+
   // Only po files
   auto filter = Gtk::FileFilter::create();
   filter->set_name(_("Po files"));
@@ -351,8 +351,8 @@ void Window_Translations::on_button_export()
   file_dlg.add_filter(filter);
 
   file_dlg.add_button(_("_Cancel"), Gtk::RESPONSE_CANCEL);
-  file_dlg.add_button(_("Export"), Gtk::RESPONSE_OK); 
-  
+  file_dlg.add_button(_("Export"), Gtk::RESPONSE_OK);
+
   const auto result = file_dlg.run();
   if(result != Gtk::RESPONSE_OK)
     return;
@@ -362,7 +362,7 @@ void Window_Translations::on_button_export()
     return;
 
   save_to_document();
-  
+
   //Enforce the file extension:
   const Glib::ustring extension = ".po";
   bool add_extension = false;
@@ -391,9 +391,9 @@ void Window_Translations::on_button_import()
 
   file_dlg.add_button(_("_Cancel"), Gtk::RESPONSE_CANCEL);
 
-  //Note to translators: "Import" here is an action verb - it's a button. 
+  //Note to translators: "Import" here is an action verb - it's a button.
   file_dlg.add_button(_("Import"), Gtk::RESPONSE_OK);
-  
+
   const auto result = file_dlg.run();
   if(result != Gtk::RESPONSE_OK)
     return;
@@ -403,7 +403,7 @@ void Window_Translations::on_button_import()
     return;
 
   Glom::import_translations_from_po_file(get_document(), uri, m_translation_locale);
-  
+
   //Show the changed document in the UI:
   load_from_document();
 }
diff --git a/glom/mode_design/users/dialog_choose_user.cc b/glom/mode_design/users/dialog_choose_user.cc
index 5aa5782..5148f07 100644
--- a/glom/mode_design/users/dialog_choose_user.cc
+++ b/glom/mode_design/users/dialog_choose_user.cc
@@ -17,7 +17,7 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  */
- 
+
 #include "dialog_choose_user.h"
 
 namespace Glom
diff --git a/glom/mode_design/users/dialog_groups_list.cc b/glom/mode_design/users/dialog_groups_list.cc
index 87f0bd2..d59a295 100644
--- a/glom/mode_design/users/dialog_groups_list.cc
+++ b/glom/mode_design/users/dialog_groups_list.cc
@@ -238,7 +238,7 @@ void Dialog_GroupsList::on_button_group_new()
   Utils::get_glade_widget_derived_with_warning(dialog);
   if(!dialog) //Unlikely and it already warns on stderr.
     return;
-    
+
   dialog->set_transient_for(*this);
   const auto dialog_response = Glom::UiUtils::dialog_run_with_help(dialog);
 
@@ -280,7 +280,7 @@ void Dialog_GroupsList::on_button_group_users()
       Utils::get_glade_widget_derived_with_warning(dialog);
       if(!dialog) //Unlikely and it already warns on stderr.
         return;
-    
+
       dialog->set_transient_for(*this);
       add_view(dialog); //Give it access to the document.
 
diff --git a/glom/mode_design/users/dialog_new_group.cc b/glom/mode_design/users/dialog_new_group.cc
index 8677878..dda2eb3 100644
--- a/glom/mode_design/users/dialog_new_group.cc
+++ b/glom/mode_design/users/dialog_new_group.cc
@@ -17,7 +17,7 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  */
- 
+
 #include "dialog_new_group.h"
 #include <libglom/privs.h>
 
diff --git a/glom/mode_design/users/dialog_users_list.cc b/glom/mode_design/users/dialog_users_list.cc
index 7494738..b63c175 100644
--- a/glom/mode_design/users/dialog_users_list.cc
+++ b/glom/mode_design/users/dialog_users_list.cc
@@ -167,7 +167,7 @@ void Dialog_UsersList::on_button_user_delete()
             fill_list();
           }
         }
-  
+
         //m_modified = true;
       }
     }
@@ -233,7 +233,7 @@ void Dialog_UsersList::on_button_user_new()
 
   dialog->set_transient_for(*this);
   dialog->m_combo_group->set_sensitive(false); //It is being added to the current group, so don't offer a 
different group.
- 
+
   int dialog_response = Gtk::RESPONSE_OK;
   bool keep_trying = true;
   while(keep_trying)
diff --git a/glom/mode_find/box_data_details_find.cc b/glom/mode_find/box_data_details_find.cc
index 2b93a25..6ab3450 100644
--- a/glom/mode_find/box_data_details_find.cc
+++ b/glom/mode_find/box_data_details_find.cc
@@ -83,5 +83,5 @@ Gtk::Widget* Box_Data_Details_Find::get_default_button() //override
 {
   return &m_Button_Find;
 }
- 
+
 } //namespace Glom
diff --git a/glom/mode_find/box_data_details_find.h b/glom/mode_find/box_data_details_find.h
index 178ec3e..4a8ac73 100644
--- a/glom/mode_find/box_data_details_find.h
+++ b/glom/mode_find/box_data_details_find.h
@@ -28,7 +28,7 @@ namespace Glom
 
 class Box_Data_Details_Find : public Box_Data_Details
 {
-public: 
+public:
   Box_Data_Details_Find();
 
   bool init_db_details(const Glib::ustring& table_name, const Glib::ustring& layout_platform);
diff --git a/glom/mode_find/box_data_list_find.h b/glom/mode_find/box_data_list_find.h
index 9bcf9ce..5ecb8c2 100644
--- a/glom/mode_find/box_data_list_find.h
+++ b/glom/mode_find/box_data_list_find.h
@@ -28,7 +28,7 @@ namespace Glom
 
 class Box_Data_List_Find : public Box_Data_List
 {
-public: 
+public:
   Box_Data_List_Find();
 
   virtual bool init_db_details(const Glib::ustring& table_name, const Glib::ustring& layout_platform);
diff --git a/glom/mode_find/notebook_find.cc b/glom/mode_find/notebook_find.cc
index 4c70d02..6a6ea69 100644
--- a/glom/mode_find/notebook_find.cc
+++ b/glom/mode_find/notebook_find.cc
@@ -44,7 +44,7 @@ Notebook_Find::Notebook_Find()
   //Pass it up to the application:
   signal_connect_for_reemit_1arg(m_Box_List.signal_find_criteria, signal_find_criteria);
   signal_connect_for_reemit_1arg(m_Box_Details.signal_find_criteria, signal_find_criteria);
-  
+
 
   add_view(&m_Box_Details);
 
diff --git a/glom/mode_find/notebook_find.h b/glom/mode_find/notebook_find.h
index f2f777e..a021aef 100644
--- a/glom/mode_find/notebook_find.h
+++ b/glom/mode_find/notebook_find.h
@@ -30,7 +30,7 @@ namespace Glom
 
 class Notebook_Find : public Notebook_Glom
 {
-public: 
+public:
   Notebook_Find();
   virtual ~Notebook_Find();
 
@@ -50,7 +50,7 @@ private:
 
   //Member widgets:
   Box_Data_List_Find m_Box_List;
-  
+
   Box_Data_Details_Find m_Box_Details;
 };
 
diff --git a/glom/navigation/box_tables.cc b/glom/navigation/box_tables.cc
index 447c203..9ffa5f7 100644
--- a/glom/navigation/box_tables.cc
+++ b/glom/navigation/box_tables.cc
@@ -73,7 +73,7 @@ void Box_Tables::fill_table_row(const Gtk::TreeModel::iterator& iter, const std:
     std::cerr << G_STRFUNC << ": table_info was null.\n";
     return;
   }
-  
+
   if(iter)
   {
     const auto developer_mode = (get_userlevel() == AppState::userlevels::DEVELOPER);
@@ -219,7 +219,7 @@ void Box_Tables::on_adddel_Add(const Gtk::TreeModel::iterator& row)
   if(table_name.empty())
     return;
 
-  bool created = false; 
+  bool created = false;
 
   //Check whether it exists already. (Maybe it is somehow in the database but not in the document. That 
shouldn't happen.)
   const auto exists_in_db = DbUtils::get_table_exists_in_database(table_name);
@@ -243,11 +243,11 @@ void Box_Tables::on_adddel_Add(const Gtk::TreeModel::iterator& row)
   {
     created = DbUtils::create_table_with_default_fields(get_document(), table_name);
   }
-  
+
   if(created)
   {
     //Show the new information for this whole row:
-    
+
     auto document = get_document();
     if(document)
     {
@@ -303,7 +303,7 @@ void Box_Tables::on_adddel_Delete(const Gtk::TreeModel::iterator& rowStart, cons
           dialog.add_button(_("_Cancel"), Gtk::RESPONSE_CANCEL);
           dialog.add_button(_("Delete Table"), Gtk::RESPONSE_OK);
           const auto iButtonClicked = dialog.run();
-          
+
           //Get a list of autoincrementing fields in the table:
           const auto fields = document->get_table_fields(table_name);
 
@@ -317,19 +317,19 @@ void Box_Tables::on_adddel_Delete(const Gtk::TreeModel::iterator& rowStart, cons
             {
               //Forget about it in the document too.
               get_document()->remove_table(table_name);
-              
+
               something_changed = true;
             }
-            
+
             //Remove the auto-increment rows.
             //Otherwise it would not start at 0 if a table with the same name, and same field, is added 
again later.
             for(const auto& field : fields)
             {
               if(!field || !field->get_auto_increment())
                 continue;
-                
+
               const auto field_name = field->get_name();
-            
+
               if(!field_name.empty())
                 DbUtils::remove_auto_increment(table_name, field_name);
               else
@@ -442,7 +442,7 @@ void Box_Tables::on_adddel_Edit(const Gtk::TreeModel::iterator& row)
     else
     {
        //Go ahead:
- 
+
        save_to_document();
 
        //Emit the signal:
diff --git a/glom/navigation/box_tables.h b/glom/navigation/box_tables.h
index c85eb82..1e7de55 100644
--- a/glom/navigation/box_tables.h
+++ b/glom/navigation/box_tables.h
@@ -34,7 +34,7 @@ namespace Glom
   * allowing the user to select a table,
   * or add or delete a table.
   */
-class Box_Tables 
+class Box_Tables
 : public Box_WithButtons,
   public Base_DB
 {
@@ -62,7 +62,7 @@ private:
   void on_show_hidden_toggled();
 
   void on_userlevel_changed(AppState::userlevels userlevel) override;
-      
+
   Gtk::CheckButton* m_check_button_show_hidden;
   guint m_col_table_name;
   guint m_col_hidden;
diff --git a/glom/notebook_glom.h b/glom/notebook_glom.h
index 33cb923..790098a 100644
--- a/glom/notebook_glom.h
+++ b/glom/notebook_glom.h
@@ -34,7 +34,7 @@ class Notebook_Glom :
   public NotebookNoFrame,
   public Base_DB
 {
-public: 
+public:
   Notebook_Glom();
 
   //virtual void show_hint();
diff --git a/glom/print_layout/canvas_layout_item.cc b/glom/print_layout/canvas_layout_item.cc
index 3c6a57f..1620e91 100644
--- a/glom/print_layout/canvas_layout_item.cc
+++ b/glom/print_layout/canvas_layout_item.cc
@@ -115,7 +115,7 @@ void CanvasLayoutItem::set_layout_item(const std::shared_ptr<LayoutItem>& layout
   {
     std::cerr << G_STRFUNC << ": get_canvas() returned null. This should not be called before the 
CanvasLayoutItem is in a canvas due to goocanvas bug https://bugzilla.gnome.org/show_bug.cgi?id=657592#c16 
.\n";
   }
-  
+
   //Add the new child:
   m_layout_item = layout_item;
 
@@ -308,12 +308,12 @@ Glib::RefPtr<Goocanvas::Item> CanvasLayoutItem::get_canvas_table_cell_child(cons
 void CanvasLayoutItem::add_portal_rows_if_necessary(guint rows_count)
 {
   auto child = get_child();
-  auto canvas_table = 
+  auto canvas_table =
     Glib::RefPtr<CanvasTableMovable>::cast_dynamic(child);
   if(!canvas_table)
     return;
 
-  auto portal = 
+  auto portal =
     std::dynamic_pointer_cast<LayoutItem_Portal>(get_layout_item());
   if(!portal)
   {
@@ -339,7 +339,7 @@ void CanvasLayoutItem::add_portal_rows_if_necessary(const Glib::RefPtr<CanvasTab
       //std::cout << "  row=" << row << ", col=" << col << std::endl;
 
       //Check if a child already exists:
-      auto existing_child = 
+      auto existing_child =
         get_canvas_table_cell_child(canvas_table, row, col);
       if(existing_child)
       {
@@ -359,7 +359,7 @@ void CanvasLayoutItem::add_portal_rows_if_necessary(const Glib::RefPtr<CanvasTab
       {
         const auto width = layout_item->get_display_width();
         bool expand = (width == 0);
-        
+
         //If this is the last item, and no other item has expanded,
         //let this one expand,
         //Otherwise, we could allocate less space than the table has left.
@@ -368,7 +368,7 @@ void CanvasLayoutItem::add_portal_rows_if_necessary(const Glib::RefPtr<CanvasTab
         {
           expand = true;
         }
-        
+
         if(expand)
         {
             //Let the table allocate the width automatically:
@@ -378,7 +378,7 @@ void CanvasLayoutItem::add_portal_rows_if_necessary(const Glib::RefPtr<CanvasTab
               col /* left_attach */, col + 1 /* right_attach */,
               row /* top_attach */, row + 1 /* right_attach */,
               (Gtk::AttachOptions)(Gtk::FILL | Gtk::EXPAND), (Gtk::AttachOptions)(Gtk::FILL | Gtk::EXPAND));
-  
+
             something_expanded = true;
         }
         else
@@ -392,13 +392,13 @@ void CanvasLayoutItem::add_portal_rows_if_necessary(const Glib::RefPtr<CanvasTab
               col /* left_attach */, col + 1 /* right_attach */,
               row /* top_attach */, row + 1 /* right_attach */,
               (Gtk::FILL), (Gtk::AttachOptions)(Gtk::FILL | Gtk::EXPAND));
-  
+
             //Add a second item (an invisible rect) to make sure that the size is really used:
-            auto rect = 
+            auto rect =
               Goocanvas::Rect::create(0, 0, width, row_height);
             //TODO: Find out why this doesn't work: rect->property_stroke_pattern() = 
Cairo::RefPtr<Cairo::Pattern>();
             g_object_set(rect->gobj(), "stroke-pattern", (void*)0, (void*)0);
- 
+
             canvas_table->attach(rect,
               col /* left_attach */, col + 1 /* right_attach */,
               row /* top_attach */, row + 1 /* right_attach */,
diff --git a/glom/print_layout/canvas_layout_item.h b/glom/print_layout/canvas_layout_item.h
index b8726fd..93efa03 100644
--- a/glom/print_layout/canvas_layout_item.h
+++ b/glom/print_layout/canvas_layout_item.h
@@ -40,7 +40,7 @@ class LayoutItem_Portal;
  *
  * If the CanvasLayoutItem is not already (indirectly) in a GooCanvas::Canvas then
  * Goocanvas::Image items will show over-scaled images, due to goocanvas bug:
- * https://bugzilla.gnome.org/show_bug.cgi?id=657592#c16 
+ * https://bugzilla.gnome.org/show_bug.cgi?id=657592#c16
  */
 class CanvasLayoutItem : public CanvasGroupResizable
 {
@@ -56,7 +56,7 @@ public:
   //Create an appropriate child canvas item,
   //and sets the position and size of this canvas item to the position in the LayoutItem.
   void set_layout_item(const std::shared_ptr<LayoutItem>& layout_item);
-  
+
   /// Make the canvas item show actual data instead of, for instance, a field name.
   void set_db_data(const Gnome::Gda::Value& value);
 
@@ -79,7 +79,7 @@ private:
   static Glib::RefPtr<CanvasItemMovable> create_canvas_item_for_layout_item(const 
std::shared_ptr<LayoutItem>& layout_item);
 
   static void apply_formatting(const Glib::RefPtr<CanvasTextMovable>& canvas_item, const 
std::shared_ptr<const LayoutItem_WithFormatting>& layout_item);
-  
+
   static void add_portal_rows_if_necessary(const Glib::RefPtr<CanvasTableMovable>& canvas_table, const 
std::shared_ptr<LayoutItem_Portal>& portal, guint rows_count);
 
   void on_resized();
diff --git a/glom/print_layout/canvas_print_layout.cc b/glom/print_layout/canvas_print_layout.cc
index c21f955..55d16b5 100644
--- a/glom/print_layout/canvas_print_layout.cc
+++ b/glom/print_layout/canvas_print_layout.cc
@@ -86,7 +86,7 @@ void Canvas_PrintLayout::set_print_layout(const Glib::ustring& table_name, const
     //TODO: Catch an exception
     key_file.load_from_data(key_file_text);
 
-    auto page_setup = 
+    auto page_setup =
       Gtk::PageSetup::create_from_key_file(key_file);
     set_page_setup(page_setup);
   }
@@ -176,7 +176,7 @@ void Canvas_PrintLayout::create_canvas_layout_item_and_add(const std::shared_ptr
   auto canvas_item = CanvasLayoutItem::create();
   add_canvas_layout_item(canvas_item);
   canvas_item->set_layout_item(layout_item);
-  
+
   canvas_item->set_outline_visible(m_outline_visibility);
 }
 
@@ -297,7 +297,7 @@ void Canvas_PrintLayout::on_item_show_context_menu(guint button, guint32 activat
     return;
 
   m_context_item = item;
-  
+
   //Do not enable the Formatting menu item for all types of items:
   auto layout_item = m_context_item->get_layout_item();
   bool enable_formatting = false;
@@ -357,7 +357,7 @@ std::shared_ptr<LayoutItem_Line> Canvas_PrintLayout::offer_line(const std::share
 
   if(parent)
     dialog->set_transient_for(*parent);
-    
+
   dialog->set_line(line);
 
   const int response = Glom::UiUtils::dialog_run_with_help(dialog);
@@ -380,7 +380,7 @@ void Canvas_PrintLayout::on_context_menu_edit()
   m_context_item->update_layout_position_from_canvas();
 
   auto layout_item = m_context_item->get_layout_item();
-  auto field = 
+  auto field =
     std::dynamic_pointer_cast<LayoutItem_Field>(layout_item);
   if(field)
   {
@@ -501,13 +501,13 @@ void Canvas_PrintLayout::on_context_menu_delete()
   {
     if(!selected_item)
       continue;
-      
-    const Glib::RefPtr<CanvasLayoutItem> canvas_layout_item = 
+
+    const Glib::RefPtr<CanvasLayoutItem> canvas_layout_item =
       Glib::RefPtr<CanvasLayoutItem>::cast_dynamic(selected_item);
     if(canvas_layout_item)
       remove_canvas_layout_item(canvas_layout_item);
   }
-  
+
   signal_selection_changed().emit();
 }
 
@@ -532,7 +532,7 @@ void Canvas_PrintLayout::on_dialog_format_hide()
   else if(layout_item_text)
     m_dialog_format->m_box_formatting->get_formatting(layout_item_text->m_formatting);
 
-  
+
   m_context_item->set_layout_item(layout_item); //Redraw the child item with the new formatting.
 
   delete m_dialog_format;
@@ -581,7 +581,7 @@ void Canvas_PrintLayout::update_page_bounds()
     page_width = paper_size.get_height(units);
     page_height = paper_size.get_width(units);
   }
-  
+
   bounds.set_x2( page_width );
   bounds.set_y2( page_height * m_page_count );
   set_bounds(bounds);
@@ -613,24 +613,24 @@ void Canvas_PrintLayout::update_page_bounds()
 
   m_margin_left = create_margin_line(m_page_setup->get_left_margin(units), bounds.get_y1(), 
m_page_setup->get_left_margin(units), bounds.get_y2());
   m_margin_right = create_margin_line(bounds.get_x2() - m_page_setup->get_right_margin(units), 
bounds.get_y1(), bounds.get_x2() - m_page_setup->get_right_margin(units), bounds.get_y2());
- 
-  m_vec_margin_tops.clear();  
+
+  m_vec_margin_tops.clear();
   m_vec_margin_bottoms.clear();
   for(guint page = 0; page < m_page_count; ++page)
   {
     const double top_y = paper_size.get_height(units) * page + m_page_setup->get_top_margin(units);
-    auto margin_top = 
+    auto margin_top =
       create_margin_line(
         bounds.get_x1(), top_y, bounds.get_x2(), top_y);
     m_vec_margin_tops.emplace_back(margin_top);
-      
+
     const double bottom_y = paper_size.get_height(units) * (page + 1) - 
m_page_setup->get_bottom_margin(units);
-    auto margin_bottom = 
+    auto margin_bottom =
       create_margin_line(
         bounds.get_x1(), bottom_y, bounds.get_x2(), bottom_y);
     m_vec_margin_bottoms.emplace_back(margin_bottom);
   }
-  
+
   m_bounds_group->lower();
 
   //Try to show the whole thing, by (indirectly) making the parent window big enough:
@@ -641,7 +641,7 @@ void Canvas_PrintLayout::update_page_bounds()
   std::cout << "DEBUG: width_pixels=" << width_pixels << ", height_pixels=" << height_pixels << std::endl;
   set_size_request(width_pixels, height_pixels);
   */
-  
+
   //Update the grid lines:
   m_grid->update_grid_for_new_size();
 }
@@ -675,7 +675,7 @@ void Canvas_PrintLayout::set_page_count(guint count)
   }
 
   m_page_count = count;
-  
+
   update_page_bounds();
   m_modified = true;
 }
@@ -694,21 +694,21 @@ void Canvas_PrintLayout::fill_with_data(const FoundSet& found_set, bool avoid_pa
     std::cout << G_STRFUNC << ": Not attempting to show real data because the where_clause is empty, maybe 
because there are no records in the database yet.\n";
     return;
   }
-  
+
   fill_with_data(m_items_group, found_set, avoid_page_margins);
 }
 
 void Canvas_PrintLayout::fill_with_data_system_preferences(const Glib::RefPtr<CanvasLayoutItem>& 
canvas_item, const std::shared_ptr<Document>& document)
 {
-  auto layoutitem_field = 
+  auto layoutitem_field =
     std::dynamic_pointer_cast<LayoutItem_Field>(canvas_item->get_layout_item());
   if(!layoutitem_field)
     return;
-  
+
   bool empty = true;
   if(!layoutitem_field->get_name().empty())
   {
-    const auto relationship = 
+    const auto relationship =
       layoutitem_field->get_relationship();
 
     if(!document)
@@ -735,7 +735,7 @@ void Canvas_PrintLayout::fill_with_data_system_preferences(const Glib::RefPtr<Ca
     }
   }
 }
- 
+
 
 void Canvas_PrintLayout::fill_with_data(const Glib::RefPtr<Goocanvas::Group>& canvas_group, const FoundSet& 
found_set, bool avoid_page_margins)
 {
@@ -852,7 +852,7 @@ void Canvas_PrintLayout::fill_with_data(const Glib::RefPtr<Goocanvas::Group>& ca
       //Clear the no-image pixbuf from images:
       canvas_item->remove_empty_indicators();
     }
-    
+
     if(avoid_page_margins)
     {
       const Glib::RefPtr<Gtk::PageSetup> page_setup = get_page_setup();
@@ -866,7 +866,7 @@ void Canvas_PrintLayout::fill_with_data(const Glib::RefPtr<Goocanvas::Group>& ca
         double width = 0;
         double height = 0;
         canvas_item->get_width_height(width, height);
-               
+
         const double offset = PrintLayoutUtils::get_offset_to_move_fully_to_next_page(page_setup, units, y, 
height);
         move_items_down(y, offset);
       }
@@ -951,7 +951,7 @@ void Canvas_PrintLayout::fill_with_data_portal(const Glib::RefPtr<CanvasLayoutIt
     for(guint col = 0; col < cols_count; ++col)
     {
       //Glib::RefPtr<Goocanvas::Item> canvas_child = base_item->get_cell_child(row, col); //TODO: Add this 
to Goocanvas::Table.
-      auto canvas_child = 
+      auto canvas_child =
         CanvasLayoutItem::get_canvas_table_cell_child(canvas_table, row, col); //TODO: Add this to 
Goocanvas::Table.
       if(!canvas_child)
       {
@@ -1008,17 +1008,17 @@ void Canvas_PrintLayout::set_canvas_item_field_value(const Glib::RefPtr<Goocanva
 
     Glib::ustring text;
 
-    auto with_formatting = 
+    auto with_formatting =
       std::dynamic_pointer_cast<const LayoutItem_WithFormatting>(field);
     if(with_formatting)
     {
       const Formatting& formatting = with_formatting->get_formatting_used();
-      text = Conversions::get_text_for_gda_value(field->get_glom_type(), 
+      text = Conversions::get_text_for_gda_value(field->get_glom_type(),
         value, formatting.m_numeric_format);
     }
     else
     {
-      text = Conversions::get_text_for_gda_value(field->get_glom_type(), 
+      text = Conversions::get_text_for_gda_value(field->get_glom_type(),
         value);
     }
 
@@ -1164,7 +1164,7 @@ void Canvas_PrintLayout::select_all(bool selected)
 Goocanvas::Bounds Canvas_PrintLayout::get_page_bounds(guint page_num) const
 {
   Goocanvas::Bounds bounds;
-  
+
    //Change the scroll extents to match the page size:
   const Gtk::PaperSize paper_size = m_page_setup->get_paper_size();
   const Gtk::Unit units = property_units();
@@ -1183,7 +1183,7 @@ Goocanvas::Bounds Canvas_PrintLayout::get_page_bounds(guint page_num) const
     page_width = paper_size.get_height(units);
     page_height = paper_size.get_width(units);
   }
-  
+
   bounds.set_x1(0);
   bounds.set_y1( page_height * page_num);
   bounds.set_x2( page_width );
@@ -1204,14 +1204,14 @@ Glib::RefPtr<CanvasLayoutItem> Canvas_PrintLayout::move_items_down(double y_star
     return needs_moving_top;
 
   double bottom_max = 0;
-  
+
   const Glib::RefPtr<Gtk::PageSetup> page_Setup = get_page_setup();
 
   const int count = root->get_n_children();
   for(int i = 0; i < count; ++i)
   {
     auto child = root->get_child(i);
-    auto derived = 
+    auto derived =
       Glib::RefPtr<CanvasLayoutItem>::cast_dynamic(child);
     if(!derived)
     {
@@ -1260,7 +1260,7 @@ Glib::RefPtr<CanvasLayoutItem> Canvas_PrintLayout::move_items_down(double y_star
   }
 
   //Add extra pages if necessary:
-  const auto last_page_needed = PrintLayoutUtils::get_page_for_y(page_Setup, 
+  const auto last_page_needed = PrintLayoutUtils::get_page_for_y(page_Setup,
     property_units(), bottom_max);
   if((last_page_needed + 1) > get_page_count())
   {
@@ -1272,7 +1272,7 @@ Glib::RefPtr<CanvasLayoutItem> Canvas_PrintLayout::move_items_down(double y_star
   if(needs_moving_top && (y_needs_moving_top > y_start))
   {
     std::cout << "extra move: y_needs_moving_top=" << y_needs_moving_top << std::endl;
-    const double extra_offset = 
+    const double extra_offset =
       PrintLayoutUtils::get_offset_to_move_fully_to_next_page(
         page_Setup, property_units(),
         y_needs_moving_top, needs_moving_top_height);
@@ -1289,7 +1289,7 @@ Glib::RefPtr<CanvasLayoutItem> Canvas_PrintLayout::move_items_down(double y_star
 
 double Canvas_PrintLayout::get_page_height() const
 {
-  const Glib::RefPtr<const Gtk::PageSetup> page_setup = get_page_setup(); 
+  const Glib::RefPtr<const Gtk::PageSetup> page_setup = get_page_setup();
   return PrintLayoutUtils::get_page_height(page_setup, property_units());
 }
 
diff --git a/glom/print_layout/canvas_print_layout.h b/glom/print_layout/canvas_print_layout.h
index f922ce4..e441334 100644
--- a/glom/print_layout/canvas_print_layout.h
+++ b/glom/print_layout/canvas_print_layout.h
@@ -50,12 +50,12 @@ public:
   void set_page_setup(const Glib::RefPtr<Gtk::PageSetup>& page_setup);
   Glib::RefPtr<Gtk::PageSetup> get_page_setup();
   Glib::RefPtr<const Gtk::PageSetup> get_page_setup() const;
-  
+
   void set_page_count(guint count);
   guint get_page_count() const;
 
   void set_zoom_percent(guint percent);
- 
+
   /** Hide the bounds rectangle and the margin lines:
    */
   void hide_page_bounds();
@@ -80,12 +80,12 @@ public:
    */
   type_vec_items get_selected_items() override;
 
-  /** Set all items as selected or unselected. 
+  /** Set all items as selected or unselected.
    * @param selected Use false to unselect all.
    */
   void select_all(bool selected = true);
-  
-  
+
+
   Goocanvas::Bounds get_page_bounds(guint page_num) const;
 
   /** Look for any items that overlap the @a canvas_item and move them down so that the no longer overlap.
@@ -94,7 +94,7 @@ public:
    * @param result The highest item that should be moved down to the start of the next page, if any:
    */
   Glib::RefPtr<CanvasLayoutItem> move_items_down(double y_start, double offset);
-  
+
 private:
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
@@ -109,7 +109,7 @@ private:
   void fill_with_data(const Glib::RefPtr<Goocanvas::Group>& canvas_group, const FoundSet& found_set, bool 
avoid_page_margins);
   void fill_with_data_portal(const Glib::RefPtr<CanvasLayoutItem>& canvas_item, const Gnome::Gda::Value& 
foreign_key_value);
   static void set_canvas_item_field_value(const Glib::RefPtr<Goocanvas::Item>& canvas_item, const 
std::shared_ptr<const LayoutItem_Field>& field, const Gnome::Gda::Value& value);
-  
+
   type_vecConstLayoutFields get_portal_fields_to_show(const std::shared_ptr<const LayoutItem_Portal>& 
portal);
 
   void create_canvas_layout_item_and_add(const std::shared_ptr<LayoutItem>& layout_item);
@@ -117,7 +117,7 @@ private:
 #ifndef GLOM_ENABLE_CLIENT_ONLY
   std::shared_ptr<LayoutItem_Portal> offer_related_records(const std::shared_ptr<LayoutItem_Portal>& portal, 
Gtk::Window* parent);
   std::shared_ptr<LayoutItem_Line> offer_line(const std::shared_ptr<LayoutItem_Line>& portal, Gtk::Window* 
parent);
-  
+
   //TODO: Make the signal send the item, so we can pass it by const reference:
   void on_item_show_context_menu(guint button, guint32 activate_time, Glib::RefPtr<CanvasLayoutItem> item);
   void on_context_menu_edit();
@@ -129,7 +129,7 @@ private:
 #endif
 
   void update_page_bounds();
-  
+
   Glib::RefPtr<Goocanvas::Polyline> create_margin_line(double x1, double y1, double x2, double y2);
 
   double get_page_height() const;
@@ -145,7 +145,7 @@ private:
   Glib::RefPtr<Goocanvas::Group> m_bounds_group; //the page and its margins.
   Glib::RefPtr<Goocanvas::Rect> m_bounds_rect;
   Glib::RefPtr<Goocanvas::Polyline> m_margin_left, m_margin_right;
-  
+
   typedef std::vector< Glib::RefPtr<Goocanvas::Polyline> > type_vec_margins;
   type_vec_margins m_vec_margin_tops;
   type_vec_margins m_vec_margin_bottoms;
diff --git a/glom/print_layout/print_layout_utils.cc b/glom/print_layout/print_layout_utils.cc
index 8dc65c1..dcfaa00 100644
--- a/glom/print_layout/print_layout_utils.cc
+++ b/glom/print_layout/print_layout_utils.cc
@@ -44,7 +44,7 @@ double get_page_height(const Glib::RefPtr<const Gtk::PageSetup>& page_setup, Gtk
   margin_bottom = 0;
 
   const auto paper_size = page_setup->get_paper_size();
-  
+
   double page_height = 0;
   if(page_setup->get_orientation() == Gtk::PAGE_ORIENTATION_PORTRAIT) //TODO: Handle the reverse 
orientations too?
   {
@@ -68,22 +68,22 @@ static void get_page_y_start_and_end(const Glib::RefPtr<const Gtk::PageSetup>& p
 {
   y1 = 0;
   y2 = 0;
-  
+
   const auto paper_size = page_setup->get_paper_size();
-  
+
   double margin_top = 0;
   double margin_bottom = 0;
-  const auto page_height = get_page_height(page_setup, units, 
+  const auto page_height = get_page_height(page_setup, units,
     margin_top, margin_bottom);
-    
+
   //y1:
-  y1 = page_height * (page_number);  
+  y1 = page_height * (page_number);
   double y_border = margin_top;
   while(y1 <= y_border)
     y1 += GRID_GAP;
-  
+
   //y2:
-  y2 = page_height * (page_number + 1);  
+  y2 = page_height * (page_number + 1);
   y2 -= margin_bottom;
 
   //std::cout << G_STRFUNC << "page_number=" << page_number << ", y1=" << y1 << "y2=" << y2 << std::endl;
@@ -136,12 +136,12 @@ bool needs_move_fully_to_page(const Glib::RefPtr<const Gtk::PageSetup>& page_set
   double x = 0;
   double y = 0;
   item->get_xy(x, y);
-  
+
   double width = 0;
   double height = 0;
   item->get_width_height(width, height);
-  
-  //We don't actually move it, because items would then group together 
+
+  //We don't actually move it, because items would then group together
   //at the top of pages.
   //Instead, the caller will discover an offset to apply to all items:
   const auto y_new = move_fully_to_page(page_setup, units, y, height);
@@ -159,11 +159,11 @@ static double move_fully_to_page(const Glib::RefPtr<const Gtk::PageSetup>& page_
   double width = 0;
   double height = 0;
   item->get_print_layout_position(x, y, width, height);
-  
+
   const auto y_new = move_fully_to_page(page_setup, units, y, height);
   if(y_new != y)
     item->set_print_layout_position(x, y_new, width, height);
-    
+
   return y_new;
 }
 */
@@ -200,8 +200,8 @@ static void create_standard(const std::shared_ptr<const LayoutGroup>& layout_gro
     print_layout_group->add_item(text);
   }
 
-  //Deal with a portal group: 
-  const auto portal = std::dynamic_pointer_cast<const LayoutItem_Portal>(layout_group); 
+  //Deal with a portal group:
+  const auto portal = std::dynamic_pointer_cast<const LayoutItem_Portal>(layout_group);
   if(portal)
   {
     auto portal_clone = glom_sharedptr_clone(portal);
@@ -209,14 +209,14 @@ static void create_standard(const std::shared_ptr<const LayoutGroup>& layout_gro
 
     //We ignore the rows count for the details layout's portal,
     //because that is only suitable for the on-screen layout,
-    //and because, on the print layout, we want to show (almost) all rows: 
+    //and because, on the print layout, we want to show (almost) all rows:
     portal_clone->set_rows_count(1 /* min */, 100 /* max */);
 
     //Set an initial default height, though this will be changed
     //when we fill it with data:
     if(avoid_page_margins)
       y = move_fully_to_page(page_setup, units, y, field_height);
-    
+
     portal_clone->set_print_layout_position(x, y, item_width, field_height);
     y += field_height + gap; //padding.
 
@@ -249,7 +249,7 @@ static void create_standard(const std::shared_ptr<const LayoutGroup>& layout_gro
         text_title = std::make_shared<LayoutItem_Text>();
         const auto field_title = item_get_title_or_name(field);
         text_title->set_text(field_title + ":", AppWindow::get_current_locale());
-        
+
         if(avoid_page_margins)
           y = move_fully_to_page(page_setup, units, y, field_height);
 
@@ -284,13 +284,13 @@ static void create_standard(const std::shared_ptr<const LayoutGroup>& layout_gro
 
       if(avoid_page_margins)
         y = move_fully_to_page(page_setup, units, y, this_field_height); //TODO: Move the title down too, if 
this was moved.
-        
+
       clone->set_print_layout_position(item_x, y, field_width, this_field_height); //TODO: Enough and no 
more.
-      
+
       //Make sure that the title is still aligned, even if this was moved by move_fully_to_page().
       if(text_title)
         text_title->set_print_layout_position_y(y);
-      
+
       y += this_field_height + gap; //padding.
 
       print_layout_group->add_item(clone);
@@ -313,20 +313,20 @@ guint get_page_for_y(const Glib::RefPtr<const Gtk::PageSetup>& page_setup, Gtk::
 std::shared_ptr<PrintLayout> create_standard(const Glib::RefPtr<const Gtk::PageSetup>& page_setup, const 
Glib::ustring& table_name, const std::shared_ptr<const Document>& document, bool avoid_page_margins)
 {
   const Gtk::Unit units = Gtk::UNIT_MM;
-  auto print_layout = std::make_shared<PrintLayout>();  
-  
+  auto print_layout = std::make_shared<PrintLayout>();
+
   //Start inside the border, on the next grid line:
   double y = 0;
   double max_y = 0; //ignored
   get_page_y_start_and_end(page_setup, units, 0, y, max_y);
-  
+
   double x = 0;
   double x_border = 0;
   if(page_setup)
     x_border = page_setup->get_left_margin(units);
   while(x <= x_border)
     x += GRID_GAP;
-  
+
   //The table title:
   const auto title = document->get_table_title_singular(table_name, AppWindow::get_current_locale());
   if(!title.empty())
@@ -361,7 +361,7 @@ std::shared_ptr<PrintLayout> create_standard(const Glib::RefPtr<const Gtk::PageS
   {
     print_layout->set_page_count(page_number + 1);
   }
-  
+
   return print_layout;
 }
 
@@ -372,13 +372,13 @@ void do_print_layout(const std::shared_ptr<const PrintLayout>& print_layout, con
     std::cerr << G_STRFUNC << ": print_layout was null\n";
     return;
   }
-  
+
   if(!document)
   {
     std::cerr << G_STRFUNC << ": document was null\n";
     return;
   }
-  
+
   //TODO: All this to be null when we allow that in Gtk::PrintOperation::run().
   if(!transient_for)
   {
@@ -389,7 +389,7 @@ void do_print_layout(const std::shared_ptr<const PrintLayout>& print_layout, con
   Canvas_PrintLayout canvas;
   canvas.set_document(std::const_pointer_cast<Document>(document)); //We const_cast because, for this use, 
it will not be changed.
 
-  //We cast to unconst because we know that the layout will not be changed by this use: 
+  //We cast to unconst because we know that the layout will not be changed by this use:
   auto unconst = std::const_pointer_cast<PrintLayout>(print_layout);
   canvas.set_print_layout(found_set.m_table_name, unconst);
 
diff --git a/glom/print_layout/printoperation_printlayout.cc b/glom/print_layout/printoperation_printlayout.cc
index e4e8369..b358ae9 100644
--- a/glom/print_layout/printoperation_printlayout.cc
+++ b/glom/print_layout/printoperation_printlayout.cc
@@ -38,7 +38,7 @@ void PrintOperationPrintLayout::on_begin_print(
 {
   //Call base class:
   Gtk::PrintOperation::on_begin_print(print_context);
-  
+
   set_n_pages( m_canvas->get_page_count() );
   //std::cout << G_STRFUNC << ": n pages =" <<  m_canvas->get_page_count() << std::endl;
 }
@@ -80,7 +80,7 @@ void PrintOperationPrintLayout::on_draw_page(
 
   //Shift the renderer context up into the page:
   cairo_context->translate(0, - bounds.get_y1());
-  
+
   m_canvas->render(cairo_context, bounds);
 
   //Call base class:
diff --git a/glom/python_embed/glom_python.h b/glom/python_embed/glom_python.h
index 554e482..5a089b0 100644
--- a/glom/python_embed/glom_python.h
+++ b/glom/python_embed/glom_python.h
@@ -47,7 +47,7 @@ bool gda_python_module_is_available();
 typedef std::map<Glib::ustring, Gnome::Gda::Value> type_map_fields;
 
 /** Run a script, ignoring the python return value.
- * The record object will be writable and the function will receive a ui 
+ * The record object will be writable and the function will receive a ui
  * parameter so it can control navigation in the UI.
  */
 void glom_execute_python_function_implementation(const Glib::ustring& func_impl,
@@ -61,7 +61,7 @@ void glom_execute_python_function_implementation(const Glib::ustring& func_impl,
   Glib::ustring& error_message);
 
 /** Run a python calculation, returning the python return value.
- * @param for_script: If this is true then the record object will be writable, 
+ * @param for_script: If this is true then the record object will be writable,
  * and the function will receive a ui parameter so it can control navigation in the UI.
  */
 Gnome::Gda::Value glom_evaluate_python_function_implementation(Field::glom_field_type result_type,
diff --git a/glom/signal_reemitter.h b/glom/signal_reemitter.h
index 1ead723..d678aeb 100644
--- a/glom/signal_reemitter.h
+++ b/glom/signal_reemitter.h
@@ -44,8 +44,8 @@ void reemit_2args(T_arg1 arg1, T_arg2 arg2, const T_sig_to_emit& sig_to_emit)
   sig_to_emit.emit(arg1, arg2);
 }
 
-//Note that sig_to_catch is by-value instead of const-reference, 
-//because connect() is a non-const method, 
+//Note that sig_to_catch is by-value instead of const-reference,
+//because connect() is a non-const method,
 //and a non-const-reference could not be used with a temporary instance.
 
 /** Emit a signal when another signal is emitted.
diff --git a/glom/test_pyembed.cc b/glom/test_pyembed.cc
index 977b895..1316887 100644
--- a/glom/test_pyembed.cc
+++ b/glom/test_pyembed.cc
@@ -43,7 +43,7 @@ void evaluate_function_implementation(const Glib::ustring& func_impl)
   func_def = "def glom_calc_field_value():\n" + func_def;
 
   std::cout << func_def << std::endl;
-  
+
   Py_Initialize();
   //PyDateTime_IMPORT; //A macro, needed to use PyDate_Check(), PyDateTime_Check(), etc.
 
diff --git a/glom/test_pyembed_singleline.cc b/glom/test_pyembed_singleline.cc
index bcd735d..944b1a7 100644
--- a/glom/test_pyembed_singleline.cc
+++ b/glom/test_pyembed_singleline.cc
@@ -47,7 +47,7 @@ void evaluate_function_implementation(const Glib::ustring& func_impl)
 
 
   Py_Finalize();
-  
+
 }
 
 int main ()
@@ -55,6 +55,6 @@ int main ()
   Glib::ustring func_impl = "import time\nreturn time.clock()";
   evaluate_function_implementation(func_impl);
 
-   
+
   return EXIT_SUCCESS;
 }
diff --git a/glom/utility_widgets/adddel/adddel_withbuttons.cc 
b/glom/utility_widgets/adddel/adddel_withbuttons.cc
index da9c3d4..cd9a178 100644
--- a/glom/utility_widgets/adddel/adddel_withbuttons.cc
+++ b/glom/utility_widgets/adddel/adddel_withbuttons.cc
@@ -104,7 +104,7 @@ void AddDel_WithButtons::on_button_extra()
   auto iter = refSelection->get_selected();
   if(!iter)
     return;
-   
+
   if(get_is_placeholder_row(iter))
     return;
 
diff --git a/glom/utility_widgets/adddel/adddel_withbuttons.h 
b/glom/utility_widgets/adddel/adddel_withbuttons.h
index bce1343..7c5d467 100644
--- a/glom/utility_widgets/adddel/adddel_withbuttons.h
+++ b/glom/utility_widgets/adddel/adddel_withbuttons.h
@@ -29,7 +29,7 @@ namespace Glom
 
 class AddDel_WithButtons : public AddDel
 {
-public: 
+public:
   AddDel_WithButtons();
   AddDel_WithButtons(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
 
diff --git a/glom/utility_widgets/adddel/treeviewcolumn_glom.h 
b/glom/utility_widgets/adddel/treeviewcolumn_glom.h
index 54f462d..2e639bb 100644
--- a/glom/utility_widgets/adddel/treeviewcolumn_glom.h
+++ b/glom/utility_widgets/adddel/treeviewcolumn_glom.h
@@ -35,7 +35,7 @@ public:
   void set_column_id(const Glib::ustring& value);
 
 private:
-  Glib::ustring m_column_id; 
+  Glib::ustring m_column_id;
 };
 
 } //namespace Glom
diff --git a/glom/utility_widgets/canvas/canvas_editable.cc b/glom/utility_widgets/canvas/canvas_editable.cc
index c4e4bcc..e391a8e 100644
--- a/glom/utility_widgets/canvas/canvas_editable.cc
+++ b/glom/utility_widgets/canvas/canvas_editable.cc
@@ -217,7 +217,7 @@ CanvasEditable::type_vec_items CanvasEditable::get_selected_items()
 
 void CanvasEditable::set_rules_visibility(bool visible)
 {
-  m_grid->set_rules_visibility(visible);  
+  m_grid->set_rules_visibility(visible);
 }
 
 
diff --git a/glom/utility_widgets/canvas/canvas_editable.h b/glom/utility_widgets/canvas/canvas_editable.h
index a0515e6..490bdad 100644
--- a/glom/utility_widgets/canvas/canvas_editable.h
+++ b/glom/utility_widgets/canvas/canvas_editable.h
@@ -43,7 +43,7 @@ public:
   void remove_all_items();
   void remove_all_items(const Glib::RefPtr<Goocanvas::Group>& group);
 
-  /** Set the distance between grid lines, 
+  /** Set the distance between grid lines,
    * used to snap to the grid lines when moving or resizing items.
    */
   virtual void set_grid_gap(double gap = 20.0);
@@ -93,13 +93,13 @@ public:
    */
   typedef sigc::signal<void()> type_signal_selection_changed;
 
-  /** This signal is emitted if the user causes items 
+  /** This signal is emitted if the user causes items
    * to be selected or deselected. See get_selected_items().
    */
   type_signal_selection_changed signal_selection_changed();
 
 private:
-  
+
   void on_item_selected(const Glib::RefPtr<CanvasItemMovable>& item, bool group_select);
 
   class ItemInfo
diff --git a/glom/utility_widgets/canvas/canvas_group_grid.cc 
b/glom/utility_widgets/canvas/canvas_group_grid.cc
index f5830f5..d43fc08 100644
--- a/glom/utility_widgets/canvas/canvas_group_grid.cc
+++ b/glom/utility_widgets/canvas/canvas_group_grid.cc
@@ -74,7 +74,7 @@ double CanvasGroupGrid::snap_position_rules(const type_vec_doubles& rules, doubl
     if(is_close(a, rule_a))
     {
       if(result == a) //Prefer some snap to no snap
-        result = rule_a; 
+        result = rule_a;
       else if(std::abs((long)(a - rule_a)) < std::abs((long)(a - result))) //Use the closest one.
         result = rule_a;
     }
@@ -107,11 +107,11 @@ double CanvasGroupGrid::snap_position_grid(double a) const
     double distance_after_grid_line_before = 0;
     division_and_remainder(a, m_grid_gap, grid_line_num_before, distance_after_grid_line_before);
     //printf("grid_line_num_before=%f, distance_after_grid_line_before=%f\n", grid_line_num_before, 
distance_after_grid_line_before);
-    
+
     if(is_close(0, distance_after_grid_line_before))
     {
       //Snap to the grid line:
-      result = grid_line_num_before * m_grid_gap; 
+      result = grid_line_num_before * m_grid_gap;
     }
     else
     {
@@ -119,7 +119,7 @@ double CanvasGroupGrid::snap_position_grid(double a) const
       if(is_close(m_grid_gap, distance_to_next_grid_line))
       {
         //Snap to the grid line:
-        result = (grid_line_num_before + 1) * m_grid_gap; 
+        result = (grid_line_num_before + 1) * m_grid_gap;
       }
     }
   }
@@ -139,7 +139,7 @@ void CanvasGroupGrid::snap_position(double& x, double& y) const
     //Try snapping to the grid:
     double temp_x = snap_position_grid(x);
     double temp_y = snap_position_grid(y);
-   
+
     offset_x = temp_x - x;
     offset_y = temp_y - y;
 
@@ -299,10 +299,10 @@ void CanvasGroupGrid::create_grid_lines()
   auto canvas = get_canvas();
   if(canvas)
     canvas->get_bounds(left, top, right, bottom);
- 
+
   const double width = right - left;
   const double height = bottom - top;
-  
+
   //Vertical and horizontal grid lines:
   if(m_grid_gap > 0) //0 steps cause a crash in older versions of goocanvas.
   {
diff --git a/glom/utility_widgets/canvas/canvas_group_grid.h b/glom/utility_widgets/canvas/canvas_group_grid.h
index 8fe2fa2..691aac5 100644
--- a/glom/utility_widgets/canvas/canvas_group_grid.h
+++ b/glom/utility_widgets/canvas/canvas_group_grid.h
@@ -40,16 +40,16 @@ private:
 
 public:
   static Glib::RefPtr<CanvasGroupGrid> create();
- 
+
   /** Snap a coordinate position to any nearby grid or rule line, if the coordinate is close enough to one.
    */
   void snap_position(double& x, double& y) const;
 
-  /** Set the distance between grid lines, 
+  /** Set the distance between grid lines,
    * used to snap to the grid lines when moving or resizing items.
    */
   void set_grid_gap(double gap);
-  
+
   /** Recreate the grid lines if this item has changed size.
    * TODO: Just do this in response to some property change?
    */
diff --git a/glom/utility_widgets/canvas/canvas_group_resizable.cc 
b/glom/utility_widgets/canvas/canvas_group_resizable.cc
index dd6550e..a595df7 100644
--- a/glom/utility_widgets/canvas/canvas_group_resizable.cc
+++ b/glom/utility_widgets/canvas/canvas_group_resizable.cc
@@ -48,8 +48,8 @@ CanvasGroupResizable::CanvasGroupResizable()
 : m_in_manipulator(false),
   m_x(0), m_y(0), m_width(0), m_height(0)
 {
-  //property_pointer_events() = 
-  //    (Goocanvas::PointerEvents)(Goocanvas::EVENTS_VISIBLE_FILL & GOO_CANVAS_EVENTS_VISIBLE_STROKE);  
+  //property_pointer_events() =
+  //    (Goocanvas::PointerEvents)(Goocanvas::EVENTS_VISIBLE_FILL & GOO_CANVAS_EVENTS_VISIBLE_STROKE);
 
 
   set_drag_cursor(Gdk::FLEUR);
@@ -63,7 +63,7 @@ void CanvasGroupResizable::create_manipulators()
 
   if(m_group_corner_manipulators)
     m_group_corner_manipulators->remove();
-  
+
   m_group_edge_manipulators = Goocanvas::Group::create();
   add_child(m_group_edge_manipulators);
 
@@ -88,9 +88,9 @@ void CanvasGroupResizable::create_rect_manipulators()
   m_rect->signal_button_press_event().connect(sigc::mem_fun(*this, 
&CanvasGroupResizable::on_child_button_press_event));
   m_rect->signal_button_release_event().connect(sigc::mem_fun(*this, 
&CanvasGroupResizable::on_child_button_release_event));
 
-  //m_rect->property_pointer_events() = 
+  //m_rect->property_pointer_events() =
   //    (Goocanvas::PointerEvents)(Goocanvas::EVENTS_VISIBLE_FILL & GOO_CANVAS_EVENTS_VISIBLE_STROKE);
-   
+
   m_rect->signal_enter_notify_event().connect(sigc::mem_fun(*this, 
&CanvasGroupResizable::on_rect_enter_notify_event), false);
   m_rect->signal_leave_notify_event().connect(sigc::mem_fun(*this, 
&CanvasGroupResizable::on_rect_leave_notify_event), false);
 
@@ -155,7 +155,7 @@ void CanvasGroupResizable::create_line_manipulators()
   m_manipulator_start = create_corner_manipulator();
   m_manipulator_end = create_corner_manipulator();
 
-  //We add these to the edge manipulators, though they look like 
+  //We add these to the edge manipulators, though they look like
   //corner manipulators, because we want to use them to show selection.
   m_group_edge_manipulators->add_child(m_manipulator_start);
   m_group_edge_manipulators->add_child(m_manipulator_end);
@@ -164,10 +164,10 @@ void CanvasGroupResizable::create_line_manipulators()
   //m_manipulator_corner_top_left->set_snap_corner(CanvasRectMovable::Corners::TOP_LEFT);
   m_manipulator_end->set_grid(m_grid);
   //m_manipulator_corner_top_right->set_snap_corner(CanvasRectMovable::Corners::TOP_RIGHT);
-  
+
   m_manipulator_start->set_drag_cursor(Gdk::TCROSS); //A rather arbitrary cursor.
   m_manipulator_end->set_drag_cursor(Gdk::TCROSS);
- 
+
   manipulator_connect_signals(m_manipulator_start, Manipulators::START);
   manipulator_connect_signals(m_manipulator_end, Manipulators::END);
 }
@@ -215,8 +215,8 @@ void CanvasGroupResizable::set_outline_visible(bool visible)
     std::cerr << G_STRFUNC << ": m_group_outline was null.\n";
     return;
   }
-  
-  m_group_outline->property_visibility() = 
+
+  m_group_outline->property_visibility() =
     (visible ? Goocanvas::ITEM_VISIBLE : Goocanvas::ITEM_INVISIBLE);
 }
 
@@ -247,7 +247,7 @@ void CanvasGroupResizable::position_rect_manipulators()
   //Note that this only works after the child has been added to the canvas:
   //Goocanvas::Bounds bounds;
   //m_child->get_bounds(bounds);
- 
+
   double x1 = 0;
   double y1 = 0;
   get_xy(x1, y1);
@@ -334,7 +334,7 @@ void CanvasGroupResizable::position_outline()
   //Note that this only works after the child has been added to the canvas:
   //Goocanvas::Bounds bounds;
   //m_child->get_bounds(bounds);
- 
+
   double x1 = 0;
   double y1 = 0;
   get_xy(x1, y1);
@@ -416,8 +416,8 @@ void CanvasGroupResizable::set_child(const Glib::RefPtr<CanvasItemMovable>& chil
   create_outline_group();
 
   //Set the child's position to match this parent resizable's position, if any was set:
-  //(Note that the resizable should have its position set to that of the child, 
-  //if that is the position that is wanted. 
+  //(Note that the resizable should have its position set to that of the child,
+  //if that is the position that is wanted.
   set_xy(x, y);
   set_width_height(width, height);
 
@@ -431,7 +431,7 @@ Glib::RefPtr<CanvasItemMovable> CanvasGroupResizable::get_child()
   return m_child;
 }
 
-  
+
 Glib::RefPtr<const CanvasItemMovable> CanvasGroupResizable::get_child() const
 {
   return m_child;
@@ -546,7 +546,7 @@ void CanvasGroupResizable::on_manipulator_corner_moved(const Glib::RefPtr<Canvas
   get_width_height(child_width, child_height);
 
   switch(manipulator_id)
-  {     
+  {
     case(Manipulators::CORNER_TOP_LEFT):
     {
       const double new_x = std::min(manipulator_x, child_x + child_width);
@@ -619,7 +619,7 @@ void CanvasGroupResizable::on_manipulator_line_end_moved(const Glib::RefPtr<Canv
   manipulator->get_xy(manipulator_x, manipulator_y);
 
   Goocanvas::Points points = line->property_points();
-  
+
   if(points.get_num_points() < 2)
     return;
 
@@ -653,7 +653,7 @@ void CanvasGroupResizable::on_manipulator_edge_moved(const Glib::RefPtr<CanvasIt
 
   auto manipulator_base = get_manipulator(manipulator_id);
   auto manipulator = Glib::RefPtr<CanvasLineMovable>::cast_dynamic(manipulator_base);
-  
+
   //std::cout << "debug: " << G_STRFUNC << ": manipulator=" << manipulator_id << std::endl;
 
   Goocanvas::Points points = manipulator->property_points();
@@ -670,7 +670,7 @@ void CanvasGroupResizable::on_manipulator_edge_moved(const Glib::RefPtr<CanvasIt
   double child_width = 0;
   double child_height = 0;
   get_width_height(child_width, child_height);
-  
+
   switch(manipulator_id)
   {
     case(Manipulators::EDGE_TOP):
@@ -715,7 +715,7 @@ void CanvasGroupResizable::on_manipulator_edge_moved(const Glib::RefPtr<CanvasIt
   }
 
   position_extras();
-  
+
   m_signal_resized.emit();
 }
 
@@ -726,11 +726,11 @@ bool CanvasGroupResizable::on_child_button_press_event(const Glib::RefPtr<Goocan
 }
 
 bool CanvasGroupResizable::on_child_motion_notify_event(const Glib::RefPtr<Goocanvas::Item>& target, 
GdkEventMotion* event)
-{ 
+{
   //std::cout << "CanvasGroupResizable::on_motion_notify_event()\n";
 
   const bool result = CanvasItemMovable::on_motion_notify_event(target, event);
-  
+
   position_extras();
 
   return result;
@@ -777,7 +777,7 @@ void CanvasGroupResizable::set_manipulators_visibility(Goocanvas::ItemVisibility
 
   //Also show grid lines in the portal table,
   //though these are not actually manipulatable.
-  auto table = 
+  auto table =
     Glib::RefPtr<CanvasTableMovable>::cast_dynamic(get_child());
   if(table)
   {
@@ -786,7 +786,7 @@ void CanvasGroupResizable::set_manipulators_visibility(Goocanvas::ItemVisibility
     else
       table->set_lines_visibility(false);
   }
-  
+
 }
 
 bool CanvasGroupResizable::on_rect_enter_notify_event(const Glib::RefPtr<Goocanvas::Item>& /* target */, 
GdkEventCrossing* /* event */)
@@ -876,7 +876,7 @@ void CanvasGroupResizable::set_xy(double x, double y)
   //std::cout << "debug: " << G_STRFUNC << ": " << x << ", " << y << std::endl;
   if(m_child)
     m_child->set_xy(x, y);
-  
+
   //Store them for use when we have a child.
   m_x = x;
   m_y = y;
@@ -908,7 +908,7 @@ void CanvasGroupResizable::set_width_height(double width, double height)
 {
   if(m_child)
     m_child->set_width_height(width, height);
-  
+
   //Store them for use when we have a child.
   m_width = width;
   m_height = height;
diff --git a/glom/utility_widgets/canvas/canvas_group_resizable.h 
b/glom/utility_widgets/canvas/canvas_group_resizable.h
index 2c326e2..62e96ca 100644
--- a/glom/utility_widgets/canvas/canvas_group_resizable.h
+++ b/glom/utility_widgets/canvas/canvas_group_resizable.h
@@ -44,13 +44,13 @@ public:
 
   /** This should only be called after this CanvasGroupResizable has already been added to a canvas.
    * The position (x, y, width, height) of the child will match the position of the CanvasGroupResizable,
-   * overriding any previous position of the child. 
+   * overriding any previous position of the child.
    */
   void set_child(const Glib::RefPtr<CanvasItemMovable>& child);
-  
+
   /// Get the only child:
   Glib::RefPtr<CanvasItemMovable> get_child();
-  
+
   /// Get the only child:
   Glib::RefPtr<const CanvasItemMovable> get_child() const;
 
diff --git a/glom/utility_widgets/canvas/canvas_image_movable.cc 
b/glom/utility_widgets/canvas/canvas_image_movable.cc
index 1530050..860c94d 100644
--- a/glom/utility_widgets/canvas/canvas_image_movable.cc
+++ b/glom/utility_widgets/canvas/canvas_image_movable.cc
@@ -17,7 +17,7 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  */
- 
+
 #include <glom/appwindow.h> // For get_appwindow().
 
 #include "canvas_image_movable.h"
@@ -38,7 +38,7 @@ CanvasImageMovable::CanvasImageMovable(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf,
 }
 
 CanvasImageMovable::CanvasImageMovable(double x, double y)
-: Goocanvas::Image(x, y), 
+: Goocanvas::Image(x, y),
   CanvasItemMovable(),
   m_snap_corner(Corners::TOP_LEFT) //arbitrary default.
 {
@@ -81,7 +81,7 @@ void CanvasImageMovable::get_width_height(double& width, double& height) const
 {
   //TODO: This only works when it is on a canvas already,
   //and this is apparently incorrect when the "coordinate space" of the item changes, whatever that means. 
murrayc.
-  
+
   width = property_width();
   height = property_height();
 }
@@ -156,7 +156,7 @@ void CanvasImageMovable::set_image(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf, bool
 
   if(scale_image)
     scale_to_size();
- 
+
   m_image_empty = false;
 }
 
@@ -174,7 +174,7 @@ void CanvasImageMovable::scale_to_size()
     std::cerr << G_STRFUNC << ": canvas is null\n";
     return;
   }
-  
+
   //Convert, because our canvas uses units (mm) but the pixbuf uses pixels:
   double width_pixels = width;
   double height_pixels = height;
@@ -188,8 +188,8 @@ void CanvasImageMovable::scale_to_size()
 
   //Make sure that the size stays the same even if the scaling wasn't exact:
   set_width_height(width, height);
-  
-  //TODO: Fix this goocanvas bug http://bugzilla.gnome.org/show_bug.cgi?id=657592, 
+
+  //TODO: Fix this goocanvas bug http://bugzilla.gnome.org/show_bug.cgi?id=657592,
   //We can't work around it by forcing an extra scale in GooCanvasItem like so:
   //property_scale_to_fit() = true;
   //because that does not keep the aspect ratio.
diff --git a/glom/utility_widgets/canvas/canvas_image_movable.h 
b/glom/utility_widgets/canvas/canvas_image_movable.h
index 7a889df..84f494b 100644
--- a/glom/utility_widgets/canvas/canvas_image_movable.h
+++ b/glom/utility_widgets/canvas/canvas_image_movable.h
@@ -41,20 +41,20 @@ public:
   static Glib::RefPtr<CanvasImageMovable> create(double x = 0.0, double y = 0.0);
   static Glib::RefPtr<CanvasImageMovable> create(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf, double x = 0.0, 
double y = 0.0);
 
-  /** Use this instead of property_pixbuf(), 
+  /** Use this instead of property_pixbuf(),
    * to make sure that m_image_empty is set to false.
    *
-   * This also scales the image (maintaining the aspect ratio) to fit the current width and 
+   * This also scales the image (maintaining the aspect ratio) to fit the current width and
    * height if they are not 0.
    */
   void set_image(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf, bool scale = true);
 
-  /// Show the no-image picture. 
+  /// Show the no-image picture.
   void set_image_empty();
   bool get_image_empty() const;
 
   /** Scale the pixbuf to the current height and width, keeping the aspect ratio.
-   * This uses the original pixbuf provided to set_image(), so this should not 
+   * This uses the original pixbuf provided to set_image(), so this should not
    * result in a loss of quality if the original was large enough.
    */
   void scale_to_size();
diff --git a/glom/utility_widgets/canvas/canvas_item_movable.cc 
b/glom/utility_widgets/canvas/canvas_item_movable.cc
index 29888b2..3f58416 100644
--- a/glom/utility_widgets/canvas/canvas_item_movable.cc
+++ b/glom/utility_widgets/canvas/canvas_item_movable.cc
@@ -83,14 +83,14 @@ bool CanvasItemMovable::on_button_press_event(const Glib::RefPtr<Goocanvas::Item
         return false; // Not handled. Let it be handled by an item lower in the z order, or a parent group, 
if any.
 
       auto item = target;
-    
+
       m_drag_start_cursor_x = event->x;
       m_drag_start_cursor_y = event->y;
 
       get_xy(m_drag_start_position_x, m_drag_start_position_y);
       m_drag_latest_position_x = m_drag_start_position_x;
-      m_drag_latest_position_y = m_drag_start_position_y; 
-    
+      m_drag_latest_position_y = m_drag_start_position_y;
+
       auto canvas = get_parent_canvas_widget();
       if(canvas)
       {
@@ -118,7 +118,7 @@ bool CanvasItemMovable::on_button_press_event(const Glib::RefPtr<Goocanvas::Item
       break;
   }
 
-  
+
   return false; // Not handled. Pass it to an item lower in the z order, if any.
 }
 
@@ -128,13 +128,13 @@ bool CanvasItemMovable::on_motion_notify_event(const Glib::RefPtr<Goocanvas::Ite
     return false; // Not handled. Let it be handled by an item lower in the z order, or a parent group, if 
any.
 
   auto item = target;
-  
+
   if(item && m_dragging && (event->state & Gdk::BUTTON1_MASK))
   {
     const double offset_x = event->x - m_drag_start_cursor_x;
     const double offset_y = event->y - m_drag_start_cursor_y;
 
-    // Inkscape uses the Ctrl key to restrict movement to horizontal or vertical, 
+    // Inkscape uses the Ctrl key to restrict movement to horizontal or vertical,
     // so let's do that too.
     if( (event->state & Gdk::CONTROL_MASK) && !m_dragging_vertical_only && !m_dragging_horizontal_only )
     {
@@ -282,7 +282,7 @@ void CanvasItemMovable::set_cursor(const Glib::RefPtr<Gdk::Cursor>& cursor)
    auto canvas = get_parent_canvas_widget();
    if(!canvas)
      return;
-     
+
    auto window = canvas->get_window();
    if(window)
      window->set_cursor(cursor);
diff --git a/glom/utility_widgets/canvas/canvas_item_movable.h 
b/glom/utility_widgets/canvas/canvas_item_movable.h
index b77826d..72d43a3 100644
--- a/glom/utility_widgets/canvas/canvas_item_movable.h
+++ b/glom/utility_widgets/canvas/canvas_item_movable.h
@@ -85,7 +85,7 @@ public:
    */
   typedef sigc::signal<void(const Glib::RefPtr<CanvasItemMovable>&, bool)> type_signal_selected;
 
-  /** This signal is emitted if the user causes the item 
+  /** This signal is emitted if the user causes the item
    * to be selected or deselected. See get_selected().
    */
   type_signal_selected signal_selected();
diff --git a/glom/utility_widgets/canvas/canvas_line_movable.cc 
b/glom/utility_widgets/canvas/canvas_line_movable.cc
index f88d2ae..88bdac5 100644
--- a/glom/utility_widgets/canvas/canvas_line_movable.cc
+++ b/glom/utility_widgets/canvas/canvas_line_movable.cc
@@ -93,7 +93,7 @@ bool CanvasLineMovable::on_enter_notify_event(const Glib::RefPtr<Item>& target,
 }
 
 bool CanvasLineMovable::on_leave_notify_event(const Glib::RefPtr<Item>& target, GdkEventCrossing* event)
-{ 
+{
   if(!m_hover_color.empty())
     property_stroke_color_gdk_rgba() = m_stroke_color;
 
diff --git a/glom/utility_widgets/canvas/canvas_table_movable.cc 
b/glom/utility_widgets/canvas/canvas_table_movable.cc
index d0252e9..b058e5e 100644
--- a/glom/utility_widgets/canvas/canvas_table_movable.cc
+++ b/glom/utility_widgets/canvas/canvas_table_movable.cc
@@ -30,7 +30,7 @@ namespace Glom
 CanvasTableMovable::CanvasTableMovable()
 : m_row_line_width(0),
   m_column_line_width(0)
-  
+
 {
   signal_motion_notify_event().connect(sigc::mem_fun(*this, &CanvasItemMovable::on_motion_notify_event));
   signal_button_press_event().connect(sigc::mem_fun(*this, &CanvasItemMovable::on_button_press_event));
@@ -185,13 +185,13 @@ void CanvasTableMovable::set_lines_details(double row_line_width, double column_
   m_column_line_width = row_line_width;
   m_row_line_width = column_line_width;
   m_line_color = color;
-  
+
   set_lines_visibility(false);
 }
 
 void CanvasTableMovable::set_lines_visibility(bool show)
 {
-  if(show && 
+  if(show &&
     (m_line_color.empty() || ((m_row_line_width == 0) && (m_column_line_width == 0))))
   {
     //TODO: Use constants or function calls from somewhere else:
diff --git a/glom/utility_widgets/canvas/canvas_table_movable.h 
b/glom/utility_widgets/canvas/canvas_table_movable.h
index ba9b8cf..a22107d 100644
--- a/glom/utility_widgets/canvas/canvas_table_movable.h
+++ b/glom/utility_widgets/canvas/canvas_table_movable.h
@@ -65,7 +65,7 @@ private:
   void snap_position_one_corner(Corners corner, double& x, double& y) const;
 
   void snap_position(double& x, double& y) const override;
-  
+
   double m_row_line_width, m_column_line_width;
   Glib::ustring m_line_color;
 };
diff --git a/glom/utility_widgets/canvas/canvas_text_movable.cc 
b/glom/utility_widgets/canvas/canvas_text_movable.cc
index 144061f..287d268 100644
--- a/glom/utility_widgets/canvas/canvas_text_movable.cc
+++ b/glom/utility_widgets/canvas/canvas_text_movable.cc
@@ -29,7 +29,7 @@ namespace Glom
 
 
 CanvasTextMovable::CanvasTextMovable(const Glib::ustring& text, double x, double y, double width, 
Goocanvas::AnchorType anchor)
-: Goocanvas::Text(text, x, y, width, anchor), 
+: Goocanvas::Text(text, x, y, width, anchor),
   m_snap_corner(Corners::TOP_LEFT) //arbitrary default.
 {
   init();
@@ -66,7 +66,7 @@ void CanvasTextMovable::get_width_height(double& width, double& height) const
 {
   //TODO: This only works when it is on a canvas already,
   //and this is apparently incorrect when the "coordinate space" of the item changes, whatever that means. 
murrayc.
-  
+
   width = property_width();
   height = property_height();
 }
@@ -148,14 +148,14 @@ void CanvasTextMovable::set_font_points(const Glib::ustring& font)
 
   //Convert the size to mm, because GooCanvasText can only understand font sizes in terms of the canvas 
units,
   //but user will provide the size in points.
-  //TODO: Discover the canvas units and do an appropriate conversion, 
+  //TODO: Discover the canvas units and do an appropriate conversion,
   //so that this works for other canvas units:
   Pango::FontDescription pango_font(font_points);
   pango_font.set_absolute_size( (int)((double)pango_font.get_size() * 0.375) ); //according to Wikipedia.
   //I don't know what it would be relative to, but it seems necessary to specify the absolute size.
 
   font_points = pango_font.to_string();
-  
+
   m_font = font_points;
   //std::cout << "DEBUG: m_font=" << m_font << std::endl;
 
@@ -173,15 +173,15 @@ void CanvasTextMovable::reconstruct_markup()
   char* markup = nullptr;
   if(!m_text.empty())
   {
-    //We will use the text as markup, so remove anything that could be 
+    //We will use the text as markup, so remove anything that could be
     //interpreted as pango markup.
     //This is not really pango-specific, but it might just work:
     const auto text_escaped = Glib::Markup::escape_text(m_text);
-    
+
     //We add px (meaning absolute points size).
     //Otherwise both GooCanvas and GTK+ scale the font up, making it too large.
     //This really seems like a bug in GooCanvas.
-    //TODO: This might not be robust - it assumes that the font size is at the end of the font_desc 
+    //TODO: This might not be robust - it assumes that the font size is at the end of the font_desc
     //provided by GtkFontButton.
     markup = g_strdup_printf("<span font_desc=\"%s\">%s</span>", m_font.c_str(), text_escaped.c_str());
     //std::cout << "DEBUG: markup=" << markup << std::endl;
diff --git a/glom/utility_widgets/canvas/canvas_text_movable.h 
b/glom/utility_widgets/canvas/canvas_text_movable.h
index c3cdeb0..b8e5c15 100644
--- a/glom/utility_widgets/canvas/canvas_text_movable.h
+++ b/glom/utility_widgets/canvas/canvas_text_movable.h
@@ -61,7 +61,7 @@ public:
    */
   void set_text(const Glib::ustring& text);
 
-  /** The font name, as returned from Gtk::FontButton::get_font_name(), 
+  /** The font name, as returned from Gtk::FontButton::get_font_name(),
    * which may include the size and style.
    * This assumes that the font size is specified in points.
    * Note that property_font() assumes that the size is in canavs units (usually mm).
diff --git a/glom/utility_widgets/canvas/test_canvas_editable.cc 
b/glom/utility_widgets/canvas/test_canvas_editable.cc
index e7b040c..43ac440 100644
--- a/glom/utility_widgets/canvas/test_canvas_editable.cc
+++ b/glom/utility_widgets/canvas/test_canvas_editable.cc
@@ -17,7 +17,7 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  */
- 
+
 #include <gtkmm/window.h>
 #include "canvas_editable.h"
 #include "canvas_line_movable.h"
@@ -32,7 +32,7 @@
 class MyCanvas : public Glom::CanvasEditable
 {
 public:
-  
+
   MyCanvas()
   : m_context_menu(nullptr)
   {
@@ -112,8 +112,8 @@ public:
     goo_canvas_item_set_child_properties(GOO_CANVAS_ITEM(table->gobj()), GOO_CANVAS_ITEM(innerrect1->gobj()),
                                        "row", 0,
                                        "column", 0,
-                                       "x-fill", TRUE, 
-                                       "x-expand", TRUE, 
+                                       "x-fill", TRUE,
+                                       "x-expand", TRUE,
                                        (void*)0);
     auto innerrect2 = Glom::CanvasRectMovable::create();
     innerrect2->property_fill_color() = "green"; //This makes the whole area clickable, not just the outline 
stroke.
@@ -124,8 +124,8 @@ public:
     goo_canvas_item_set_child_properties(GOO_CANVAS_ITEM(table->gobj()), GOO_CANVAS_ITEM(innerrect2->gobj()),
                                        "row", 1,
                                        "column", 1,
-                                       "x-fill", TRUE, 
-                                       "x-expand", TRUE, 
+                                       "x-fill", TRUE,
+                                       "x-expand", TRUE,
                                        (void*)0);
     auto innerrect3 = Goocanvas::Text::create();
     innerrect3->property_fill_color() = "yellow"; //This makes the whole area clickable, not just the 
outline stroke.
@@ -139,8 +139,8 @@ public:
     goo_canvas_item_set_child_properties(GOO_CANVAS_ITEM(table->gobj()), GOO_CANVAS_ITEM(innerrect3->gobj()),
                                        "row", 2,
                                        "column", 2,
-                                       "x-fill", TRUE, 
-                                       "x-expand", TRUE, 
+                                       "x-fill", TRUE,
+                                       "x-expand", TRUE,
                                        (void*)0);
 
     add_item(table, true);
@@ -164,7 +164,7 @@ private:
   void on_context_menu_delete()
   {
   }
-  
+
   void setup_context_menu()
   {
     m_context_menu_action_group = Gtk::ActionGroup::create();
@@ -182,12 +182,12 @@ private:
     auto menu = Gio::Menu::create();
     menu->append(_("_Edit"), "context.edit");
     menu->append(_("_Delete"), "context.delete");
-    
+
     //Get the menu:
     m_context_menu = std::make_unique<Gtk::Menu>(menu);
     m_context_menu->attach_to_widget(*this);
   }
- 
+
   std::unique_ptr<Gtk::Menu> m_context_menu;
   Glib::RefPtr<Gtk::ActionGroup> m_context_menu_action_group;
   Glib::RefPtr<Gtk::Builder> m_context_menu_builder;
@@ -203,7 +203,7 @@ main(int argc, char* argv[])
   MyCanvas canvas;
   window.add(canvas);
   canvas.show();
-  
+
 
   Gtk::Main::run(window);
 
diff --git a/glom/utility_widgets/combo_textglade.h b/glom/utility_widgets/combo_textglade.h
index 9c979b6..a5564b6 100644
--- a/glom/utility_widgets/combo_textglade.h
+++ b/glom/utility_widgets/combo_textglade.h
@@ -36,7 +36,7 @@ class Combo_TextGlade : public Gtk::ComboBoxText
 {
 public:
   Combo_TextGlade(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
-  
+
   ///This ensures that something is selected,
   void set_first_active();
 };
diff --git a/glom/utility_widgets/dialog_flowtable.cc b/glom/utility_widgets/dialog_flowtable.cc
index 0ff8d8f..b66b7fb 100644
--- a/glom/utility_widgets/dialog_flowtable.cc
+++ b/glom/utility_widgets/dialog_flowtable.cc
@@ -27,7 +27,7 @@ namespace Glom
 
 const char* Dialog_FlowTable::glade_id("dialog_flowtable");
 const bool Dialog_FlowTable::glade_developer(true);
-               
+
 Dialog_FlowTable::Dialog_FlowTable(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder)
 : Gtk::Dialog(cobject),
   m_entry_title(nullptr),
@@ -36,7 +36,7 @@ Dialog_FlowTable::Dialog_FlowTable(BaseObjectType* cobject, const Glib::RefPtr<G
 {
   builder->get_widget("entry_title",  m_entry_title);
   builder->get_widget("spin_columns",  m_spin_columns);
-  
+
   //Set the adjustment details, to avoid a useless 0-to-0 range and a 0 incremenet.
   //We don't do this the Glade file because GtkBuilder wouldn't find the
   //associated adjustment object unless we specified it explictly:
diff --git a/glom/utility_widgets/dialog_flowtable.h b/glom/utility_widgets/dialog_flowtable.h
index 478c250..aa19d1d 100644
--- a/glom/utility_widgets/dialog_flowtable.h
+++ b/glom/utility_widgets/dialog_flowtable.h
@@ -40,22 +40,22 @@ class Dialog_FlowTable
 public:
   static const char* glade_id;
   static const bool glade_developer;
-       
+
   Dialog_FlowTable(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
 
   void set_flowtable(FlowTableWithFields* flowtable);
-  
+
   gint get_columns_count() const;
 
   //TODO: Isn't this the same as Window::get_title()?
   //  Probably, yes, at least when it is properly const.
   //  so, TODO: find out what calls it.
   Glib::ustring get_title();
-    
+
 private:
   Gtk::Entry* m_entry_title;
   Gtk::SpinButton* m_spin_columns;
-   
+
   FlowTableWithFields* m_flowtable;
   std::shared_ptr<LayoutGroup> m_layoutgroup;
 };
diff --git a/glom/utility_widgets/dialog_image_load_progress.cc 
b/glom/utility_widgets/dialog_image_load_progress.cc
index 24d9007..ea7747f 100644
--- a/glom/utility_widgets/dialog_image_load_progress.cc
+++ b/glom/utility_widgets/dialog_image_load_progress.cc
@@ -60,7 +60,7 @@ DialogImageLoadProgress::~DialogImageLoadProgress()
 
 void DialogImageLoadProgress::load(const Glib::ustring& uri)
 {
-  // Can only load one file with data 
+  // Can only load one file with data
   g_assert(!m_data.get());
 
   m_data = std::make_unique<GdaBinary>();
@@ -122,13 +122,13 @@ void DialogImageLoadProgress::on_stream_read(const Glib::RefPtr<Gio::AsyncResult
   {
     const auto size = m_stream->read_finish(result);
     g_assert(size >= 0); // Would have thrown an exception otherwise
-    
+
     // Cannot read more data than there is available in the file:
     g_assert( static_cast<gssize>(offset + size) <= static_cast<gssize>(m_data->binary_length));
-    
+
     // Set progress
     m_progress_bar->set_fraction(static_cast<double>(offset + size) / m_data->binary_length);
-    
+
     // Read next chunk, if any
     if( static_cast<gssize>(offset + size) < static_cast<gssize>(m_data->binary_length) )
     {
diff --git a/glom/utility_widgets/dialog_image_save_progress.cc 
b/glom/utility_widgets/dialog_image_save_progress.cc
index d88180f..87ffd53 100644
--- a/glom/utility_widgets/dialog_image_save_progress.cc
+++ b/glom/utility_widgets/dialog_image_save_progress.cc
@@ -57,7 +57,7 @@ void DialogImageSaveProgress::save(const Glib::ustring& uri)
 
   if(m_data->data == 0)
     return;
-    
+
   if(m_data->binary_length == 0)
     return;
 
@@ -65,7 +65,7 @@ void DialogImageSaveProgress::save(const Glib::ustring& uri)
   m_progress_bar->set_text(Glib::ustring::compose("Saving %1...", m_file->get_parse_name()));
 
   m_stream.reset();
-   
+
   try
   {
     if(m_file->query_exists())
@@ -85,7 +85,7 @@ void DialogImageSaveProgress::save(const Glib::ustring& uri)
     response(Gtk::RESPONSE_REJECT);
     return;
   }
-  
+
   //Write the data to the output uri
   try
   {
@@ -107,10 +107,10 @@ void DialogImageSaveProgress::on_stream_write(const Glib::RefPtr<Gio::AsyncResul
   {
     const auto size = m_stream->write_finish(result);
     g_assert(size >= 0); // Would have thrown an exception otherwise
-    
+
     // Set progress
     m_progress_bar->set_fraction(static_cast<double>(offset + size) / m_data->binary_length);
-    
+
     // Write next chunk, if any
     if(  static_cast<gssize>(offset + size) < static_cast<gssize>(m_data->binary_length))
       // Even if choose a priority lower than GDK_PRIORITY_REDRAW + 10 for the
diff --git a/glom/utility_widgets/eggspreadtable/eggplaceholder.h 
b/glom/utility_widgets/eggspreadtable/eggplaceholder.h
index 496cdff..537b2e6 100644
--- a/glom/utility_widgets/eggspreadtable/eggplaceholder.h
+++ b/glom/utility_widgets/eggspreadtable/eggplaceholder.h
@@ -1,4 +1,4 @@
- 
+
 #ifndef __EGG_PLACEHOLDER_H__
 #define __EGG_PLACEHOLDER_H__
 
@@ -28,7 +28,7 @@ typedef enum {
 struct _EggPlaceholder
 {
   GtkDrawingArea drawing_area;
-       
+
   EggPlaceholderPrivate *priv;
 };
 
diff --git a/glom/utility_widgets/eggspreadtable/eggspreadtable.h 
b/glom/utility_widgets/eggspreadtable/eggspreadtable.h
index f02ac78..f38957b 100644
--- a/glom/utility_widgets/eggspreadtable/eggspreadtable.h
+++ b/glom/utility_widgets/eggspreadtable/eggspreadtable.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (C) 2010 Openismus GmbH
  *
  * Authors:
diff --git a/glom/utility_widgets/eggspreadtable/eggspreadtablednd.h 
b/glom/utility_widgets/eggspreadtable/eggspreadtablednd.h
index 9409883..c33b9cb 100644
--- a/glom/utility_widgets/eggspreadtable/eggspreadtablednd.h
+++ b/glom/utility_widgets/eggspreadtable/eggspreadtablednd.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (C) 2011 Openismus GmbH
  *
  * Authors:
@@ -43,7 +43,7 @@ typedef struct _EggSpreadTableDndClass       EggSpreadTableDndClass;
 /**
  * EggDragEnableMode:
  * @EGG_DRAG_DISABLED: Children cannot be dragged.
- * @EGG_DRAG_ENABLED:  Children can be dragged if the needed mouse events 
+ * @EGG_DRAG_ENABLED:  Children can be dragged if the needed mouse events
  *                     are not handled by those said children.
  * @EGG_DRAG_FULL:     All mouse events on children are consumed for the
  *                     purpose of starting drag and drop operations on children.
diff --git a/glom/utility_widgets/eggspreadtablemm/eggspreadtabledndmm.cc 
b/glom/utility_widgets/eggspreadtablemm/eggspreadtabledndmm.cc
index 8106ef0..eb1369f 100644
--- a/glom/utility_widgets/eggspreadtablemm/eggspreadtabledndmm.cc
+++ b/glom/utility_widgets/eggspreadtablemm/eggspreadtabledndmm.cc
@@ -156,8 +156,8 @@ gboolean SpreadTableDnd_Class::widget_drop_possible_callback(EggSpreadTableDnd*
       {
         // Call the virtual member method, which derived classes might override.
         bool cpp_drop_possible = false;
-        const bool result = 
-          static_cast<int>(obj->on_widget_drop_possible(Glib::wrap(p0), 
+        const bool result =
+          static_cast<int>(obj->on_widget_drop_possible(Glib::wrap(p0),
             cpp_drop_possible));
         *drop_possible = cpp_drop_possible;
         return result;
@@ -255,7 +255,7 @@ void SpreadTableDnd::remove_child(Gtk::Widget& child)
   //before being added to the first container.
   if(child.is_managed_())
     child.reference();
-    
+
   egg_spread_table_dnd_remove_child(gobj(), child.gobj());
 }
 
diff --git a/glom/utility_widgets/eggspreadtablemm/test_spreadtablednd.cc 
b/glom/utility_widgets/eggspreadtablemm/test_spreadtablednd.cc
index 13893b0..1b96fc7 100644
--- a/glom/utility_widgets/eggspreadtablemm/test_spreadtablednd.cc
+++ b/glom/utility_widgets/eggspreadtablemm/test_spreadtablednd.cc
@@ -55,7 +55,7 @@ populate_spread_table_wrappy(Egg::SpreadTableDnd* spread_table)
     "These are", "some wrappy label", "texts", "of various", "lengths.",
     "They should always be", "shown", "consecutively. Except it's",
     "hard to say", "where exactly the", "label", "will wrap", "and where exactly",
-    "the actual", "container", "will wrap.", "This label is really really really long !", 
+    "the actual", "container", "will wrap.", "This label is really really really long !",
     "Let's add some more", "labels to the",
     "mix. Just to", "make sure we", "got something to work", "with here."
   };
@@ -166,11 +166,11 @@ create_window()
 
   auto swindow = Gtk::manage(new Gtk::ScrolledWindow());
   swindow->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
-  
+
   swindow->show();
   frame->add(*swindow);
 
-  paper = 
+  paper =
     Gtk::manage(new Egg::SpreadTableDnd(
       Gtk::ORIENTATION_VERTICAL,
       INITIAL_LINES));
@@ -323,11 +323,11 @@ create_window()
   populate_spread_table_wrappy(paper);
 
   /* Embed another dnd spread table */
-  auto spreadtable_inner = 
+  auto spreadtable_inner =
     Gtk::manage(new Egg::SpreadTableDnd(
       Gtk::ORIENTATION_VERTICAL,
       INITIAL_LINES));
-  
+
   spreadtable_inner->set_vertical_spacing(INITIAL_VSPACING);
   spreadtable_inner->set_horizontal_spacing(INITIAL_HSPACING);
 
@@ -354,7 +354,7 @@ create_window()
 int
 main(int argc, char *argv[])
 {
-  auto app = 
+  auto app =
     Gtk::Application::create(argc, argv, "org.glom.test_spreadtablednd");
 
   auto window = create_window();
diff --git a/glom/utility_widgets/flowtable.cc b/glom/utility_widgets/flowtable.cc
index 0f4ab85..3583cf1 100644
--- a/glom/utility_widgets/flowtable.cc
+++ b/glom/utility_widgets/flowtable.cc
@@ -53,7 +53,7 @@ const Gtk::Box* FlowTable::get_parent_hbox(const Gtk::Widget* first) const
     std::cerr << G_STRFUNC << ": first was not a first widget. first=" << first << std::endl;
     return nullptr; //It has no Box parent because it is not even a first widget.
   }
-  
+
   for(const auto& hbox : m_list_hboxes)
   {
     if(!hbox)
@@ -85,7 +85,7 @@ void FlowTable::delete_and_forget_hbox(Gtk::Box* hbox)
 
   //This check does not work because EggSpreadTableDnD adds an intermediate GtkEventBox:
   //if(hbox->get_parent() == this)
-  
+
   //Check that it is in our list of hboxes:
   const auto iter = Utils::find(m_list_hboxes, hbox);
   if(iter == m_list_hboxes.end())
@@ -93,7 +93,7 @@ void FlowTable::delete_and_forget_hbox(Gtk::Box* hbox)
     std::cerr << G_STRFUNC << ": hbox=" << hbox << " is not in our list of hboxes.\n";
     return;
   }
-  
+
   //Check that it has a parent,
   //as a sanity check:
   Gtk::Widget* parent= hbox->get_parent();
@@ -164,7 +164,7 @@ void FlowTable::remove_all()
   for(const auto& item : m_list_first_widgets)
   {
     auto first_widget = const_cast<Gtk::Widget*>(item);
-    
+
     if(first_widget)
       remove(*first_widget);
   }
@@ -183,20 +183,20 @@ void FlowTable::remove_all()
 void FlowTable::remove(Gtk::Widget& first)
 {
   //std::cout << G_STRFUNC << ": debug: remove() first=" << &first << std::endl;
-  
+
   //Handle widgets that were added to an Box:
   auto parent = const_cast<Gtk::Box*>(get_parent_hbox(&first));
   if(parent)
   {
     //std::cout << "  debug: hbox=" << parent << std::endl;
- 
+
     delete_and_forget_hbox(parent);
     return;
   }
 
   Egg::SpreadTableDnd::remove_child(first);
 }
-  
+
 bool FlowTable::get_column_for_first_widget(const Gtk::Widget& first, guint& column) const
 {
   //Initialize output parameter:
@@ -208,18 +208,18 @@ bool FlowTable::get_column_for_first_widget(const Gtk::Widget& first, guint& col
   //Discover actual child widget that was added to the EggSpreadTable,
   //so we can use it again to call EggSpreadTable::get_child_line():
   const Gtk::Widget* child = nullptr;
-      
+
   //Check that it is really a child widget:
   if(!Utils::find_exists(m_list_first_widgets, &first))
     return false; //It is not a first widget.
-    
+
   child = &first;
-  
+
   //Check if it was added to an Box:
   const auto hbox = get_parent_hbox(child);
   if(hbox)
     child = hbox;
-    
+
   if(!child)
     return false;
 
@@ -227,13 +227,13 @@ bool FlowTable::get_column_for_first_widget(const Gtk::Widget& first, guint& col
   int width_natural = 0;
   child->get_preferred_width(width_min, width_natural);
   //std::cout << G_STRFUNC << ": Calling get_child_line() with child=" << child << ", for first=" << &first 
<< std::endl;
-  
+
   //Get the internal parent GtkEventBox, if any,
   //though we need a derived get_child_line() to do this automatically:
   const auto parent = child->get_parent();
   if(dynamic_cast<const Gtk::EventBox*>(parent))
      child = parent;
-     
+
   column = get_child_line(*child, width_natural);
 
   return true;
diff --git a/glom/utility_widgets/flowtable.h b/glom/utility_widgets/flowtable.h
index 115eee3..92df989 100644
--- a/glom/utility_widgets/flowtable.h
+++ b/glom/utility_widgets/flowtable.h
@@ -38,7 +38,7 @@ public:
 
   void add_widgets(Gtk::Widget& first, Gtk::Widget& second, bool expand_second = false);
   void add_widgets(Gtk::Widget& first, bool expand = false);
- 
+
   /** Show extra UI that is useful in RAD tools:
    */
   virtual void set_design_mode(bool value = true);
diff --git a/glom/utility_widgets/gimpruler/libgimpbase/gimpbaseenums.h 
b/glom/utility_widgets/gimpruler/libgimpbase/gimpbaseenums.h
index 3d499a4..b544237 100644
--- a/glom/utility_widgets/gimpruler/libgimpbase/gimpbaseenums.h
+++ b/glom/utility_widgets/gimpruler/libgimpbase/gimpbaseenums.h
@@ -171,7 +171,7 @@ GType gimp_foreground_extract_mode_get_type (void) G_GNUC_CONST;
 typedef enum
 {
   GIMP_FOREGROUND_EXTRACT_SIOX,
-  GIMP_FOREGROUND_EXTRACT_MATTING 
+  GIMP_FOREGROUND_EXTRACT_MATTING
 } GimpForegroundExtractMode;
 
 
diff --git a/glom/utility_widgets/imageglom.cc b/glom/utility_widgets/imageglom.cc
index 71c7ec1..aeec3c8 100644
--- a/glom/utility_widgets/imageglom.cc
+++ b/glom/utility_widgets/imageglom.cc
@@ -97,7 +97,7 @@ void ImageGlom::init_widgets(bool use_evince)
 
       //gtk_widget_add_events(GTK_WIDGET(m_ev_view), GDK_BUTTON_PRESS_MASK);
 
-      //Connect the the EvView's button-press-event signal, 
+      //Connect the the EvView's button-press-event signal,
       //because we don't get it otherwise.
       //For some reason this is not necessary with the GtkImage.
       auto cppEvView = Glib::wrap(GTK_WIDGET(m_ev_view));
@@ -153,7 +153,7 @@ void ImageGlom::set_layout_item(const std::shared_ptr<LayoutItem>& layout_item,
   LayoutWidgetField::set_layout_item(layout_item, table_name);
 #ifdef GTKMM_ATKMM_ENABLED
   get_accessible()->set_name(layout_item->get_name());
-#endif  
+#endif
 }
 
 bool ImageGlom::on_button_press_event(GdkEventButton *button_event)
@@ -184,7 +184,7 @@ bool ImageGlom::on_button_press_event(GdkEventButton *button_event)
       {
         //Give user choices of actions on this item:
         popup_menu(button_event->button, button_event->time);
-       
+
         return true; //We handled this event.
       }
     }
@@ -231,7 +231,7 @@ void ImageGlom::set_pixbuf(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)
 
 void ImageGlom::set_value(const Gnome::Gda::Value& value)
 {
-  // Remember original data 
+  // Remember original data
   clear_original_data();
   m_original_data = value;
   show_image_data();
@@ -257,13 +257,13 @@ void ImageGlom::on_size_allocate(Gtk::Allocation& allocation)
 static void image_glom_ev_job_finished(EvJob* job, void* user_data)
 {
   g_assert(job);
-  
+
   auto self = static_cast<ImageGlom*>(user_data);
   g_assert(self);
-  
+
   self->on_ev_job_finished(job);
 }
-  
+
 void ImageGlom::on_ev_job_finished(EvJob* job)
 {
   if(ev_job_is_failed (job)) {
@@ -276,7 +276,7 @@ void ImageGlom::on_ev_job_finished(EvJob* job)
   ev_document_model_set_document(m_ev_document_model, job->document);
   ev_document_model_set_page(m_ev_document_model, 1);
   g_object_unref (job);
-  
+
   //TODO: Show that we are no longer loading.
   //ev_view_set_loading(m_ev_view, FALSE);
 }
@@ -292,7 +292,7 @@ const GdaBinary* ImageGlom::get_binary() const
     if(gda_blob && gda_blob_op_read_all(gda_blob->op, const_cast<GdaBlob*>(gda_blob)))
       gda_binary = &(gda_blob->data);
   }
-  
+
   return gda_binary;
 }
 
@@ -302,7 +302,7 @@ Glib::ustring ImageGlom::get_mime_type() const
 
   if(!gda_binary)
     return Glib::ustring();
-    
+
   if(!gda_binary->data)
     return Glib::ustring();
 
@@ -312,7 +312,7 @@ Glib::ustring ImageGlom::get_mime_type() const
     uncertain);
 
   //std::cout << G_STRFUNC << ": mime_type=" << result << ", uncertain=" << uncertain << std::endl;
-  return result;  
+  return result;
 }
 
 void ImageGlom::fill_evince_supported_mime_types()
@@ -323,13 +323,13 @@ void ImageGlom::fill_evince_supported_mime_types()
 
   //Discover what mime types libevview can support.
   //Older versions supported image types too, via GdkPixbuf,
-  //but that support was then removed.  
+  //but that support was then removed.
   auto types_list = ev_backends_manager_get_all_types_info();
   if(!types_list)
   {
     return;
   }
-  
+
   for(GList* l = types_list; l; l = g_list_next(l))
   {
     EvTypeInfo *info = (EvTypeInfo *)l->data;
@@ -342,9 +342,9 @@ void ImageGlom::fill_evince_supported_mime_types()
     {
       if(mime_type)
         m_evince_supported_mime_types.emplace_back(mime_type);
-      //std::cout << "evince supported mime_type=" << mime_type << std::endl; 
+      //std::cout << "evince supported mime_type=" << mime_type << std::endl;
     }
-  }  
+  }
 }
 
 void ImageGlom::fill_gdkpixbuf_supported_mime_types()
@@ -365,17 +365,17 @@ void ImageGlom::fill_gdkpixbuf_supported_mime_types()
 void ImageGlom::show_image_data()
 {
   bool use_evince = false;
-  
+
   const auto mime_type = get_mime_type();
 
-  //std::cout << "mime_type=" << mime_type << std::endl; 
-  
+  //std::cout << "mime_type=" << mime_type << std::endl;
+
   fill_evince_supported_mime_types();
   if(Utils::find_exists(m_evince_supported_mime_types, mime_type))
   {
     use_evince = true;
   }
-  
+
   init_widgets(use_evince);
 
   //Clear all possible display widgets:
@@ -392,20 +392,20 @@ void ImageGlom::show_image_data()
        std::cerr << G_STRFUNC << "Data was null or empty.\n";
       return;
     }
-    
+
     EvJob *job = ev_job_load_new_with_data(
       (char*)gda_binary->data, gda_binary->binary_length);
     */
     //TODO: Test failure asynchronously.
-    
+
     const auto uri = save_to_temp_file(false /* don't show progress */);
     if(uri.empty())
     {
       std::cerr << G_STRFUNC << "Could not save temp file to show in the EvView.\n";
     }
-  
+
     EvJob *job = ev_job_load_new(uri.c_str());
-  
+
     m_ev_document_model = ev_document_model_new();
     ev_view_set_model(m_ev_view, m_ev_document_model);
     ev_document_model_set_continuous(m_ev_document_model, FALSE); //Show only one page.
@@ -421,14 +421,14 @@ void ImageGlom::show_image_data()
   {
     //Use GtkImage instead:
     Glib::RefPtr<const Gio::Icon> icon;
-      
+
     bool use_gdkpixbuf = false;
     fill_gdkpixbuf_supported_mime_types();
     if(Utils::find_exists(m_gdkpixbuf_supported_mime_types, mime_type))
     {
       use_gdkpixbuf = true;
     }
-    
+
     if(use_gdkpixbuf)
     {
       //Try to use GdkPixbuf's loader:
@@ -439,7 +439,7 @@ void ImageGlom::show_image_data()
       //Get an icon for the file type;
       icon = Gio::content_type_get_icon(mime_type);
     }
-    
+
     if(m_pixbuf_original)
     {
       auto pixbuf_scaled = get_scaled_image();
@@ -462,14 +462,14 @@ Glib::RefPtr<Gdk::Pixbuf> ImageGlom::get_scaled_image()
 
   if(!pixbuf)
     return pixbuf;
- 
+
   const auto allocation = m_image->get_allocation();
   const auto pixbuf_height = pixbuf->get_height();
   const auto pixbuf_width = pixbuf->get_width();
-    
+
   const auto allocation_height = allocation.get_height();
   const auto allocation_width = allocation.get_width();
-      
+
   //std::cout << "pixbuf_height=" << pixbuf_height << ", pixbuf_width=" << pixbuf_width << std::endl;
   //std::cout << "allocation_height=" << allocation.get_height() << ", allocation_width=" << 
allocation.get_width() << std::endl;
 
@@ -479,7 +479,7 @@ Glib::RefPtr<Gdk::Pixbuf> ImageGlom::get_scaled_image()
     if(true) //allocation_height > 10 || allocation_width > 10)
     {
       auto pixbuf_scaled = UiUtils::image_scale_keeping_ratio(pixbuf, allocation_height, allocation_width);
-      
+
       //Don't set a new pixbuf if the dimensions have not changed:
       Glib::RefPtr<Gdk::Pixbuf> pixbuf_in_image;
 
@@ -495,19 +495,19 @@ Glib::RefPtr<Gdk::Pixbuf> ImageGlom::get_scaled_image()
           std::cout << "scaled height=" << pixbuf_scaled->get_height() << ", scaled width=" << 
pixbuf_scaled->get_width() << std::endl;
         }
         */
-        
+
         return pixbuf_scaled;
       }
       else
       {
-        //Return the existing one, 
+        //Return the existing one,
         //instead of a new one with the same contents,
         //so no unnecessary changes will be triggered.
         return pixbuf_in_image;
       }
     }
   }
-  
+
   //std::cout << "get_scaled(): returning original\n";
   return pixbuf;
 }
@@ -527,20 +527,20 @@ void ImageGlom::on_menupopup_activate_open_file_with()
   {
     std::cerr << G_STRFUNC << ": mime_type is empty.\n";
   }
-  
+
   Gtk::AppChooserDialog dialog(mime_type);
   if(pApp)
     dialog.set_transient_for(*pApp);
 
   if(dialog.run() != Gtk::RESPONSE_OK)
     return;
-  
+
   auto app_info = dialog.get_app_info();
   if(!app_info)
   {
     std::cerr << G_STRFUNC << ": app_info was null.\n";
   }
-  
+
   open_with(app_info);
 }
 
@@ -557,18 +557,18 @@ static void make_file_read_only(const Glib::ustring& uri)
     std::cerr << G_STRFUNC << "Exception: " << ex.what() << std::endl;
     return;
   }
-  
+
   if(filepath.empty())
   {
     std::cerr << G_STRFUNC << ": filepath is empty.\n";
   }
-  
+
   const auto result = chmod(filepath.c_str(), S_IRUSR);
   if(result != 0)
   {
     std::cerr << G_STRFUNC << ": chmod() failed.\n";
   }
-  
+
   //Setting the attribute via gio gives us this exception:
   //"Setting attribute access::can-write not supported"
   /*
@@ -585,20 +585,20 @@ static void make_file_read_only(const Glib::ustring& uri)
     std::cerr << G_STRFUNC << ": query_info() failed: " << ex.what() << std::endl;
     return;
   }
-  
+
   if(!file_info)
   {
     std::cerr << G_STRFUNC << ": : file_info is null\n";
     return;
   }
-  
+
   const bool can_write =
     file_info->get_attribute_boolean(G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE);
   if(!can_write)
     return;
-    
+
   file_info->set_attribute_boolean(G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE, false);
-  
+
   try
   {
     file->set_attributes_from_info(file_info);
@@ -617,13 +617,13 @@ Glib::ustring ImageGlom::save_to_temp_file(bool show_progress)
   {
     std::cerr << G_STRFUNC << ": : uri is empty.\n";
   }
-  
+
   bool saved = false;
   if(show_progress)
     saved = save_file(uri);
   else
     saved = save_file_sync(uri);
-  
+
   if(!saved)
   {
     uri = Glib::ustring();
@@ -652,7 +652,7 @@ void ImageGlom::open_with(const Glib::RefPtr<Gio::AppInfo>& app_info)
   }
   else
   {
-    //TODO: Avoid duplication in xsl_utils.cc, by moving this into a utility function:  
+    //TODO: Avoid duplication in xsl_utils.cc, by moving this into a utility function:
 #ifdef G_OS_WIN32
     // gtk_show_uri doesn't seem to work on Win32, at least not for local files
     // We use Windows API instead.
@@ -674,12 +674,12 @@ static void set_file_filter_images(Gtk::FileChooser& file_chooser)
   filter->set_name(_("Images"));
   filter->add_pixbuf_formats();
   file_chooser.add_filter(filter);
-  
+
   ev_document_factory_add_filters(GTK_WIDGET(file_chooser.gobj()), 0);
-  
+
   //Make Images the currently-selected one:
   file_chooser.set_filter(filter);
-  
+
   /*  ev_document_factory_add_filters() add this already:
   filter = Gtk::FileFilter::create();
   filter->set_name(_("All Files"));
@@ -695,7 +695,7 @@ void ImageGlom::on_menupopup_activate_save_file()
   Gtk::FileChooserDialog dialog(_("Save Image"), Gtk::FILE_CHOOSER_ACTION_SAVE);
   if(pApp)
     dialog.set_transient_for(*pApp);
-          
+
   set_file_filter_images(dialog);
 
   dialog.add_button(_("_Cancel"), Gtk::RESPONSE_CANCEL);
@@ -704,28 +704,28 @@ void ImageGlom::on_menupopup_activate_save_file()
   dialog.hide();
   if(response != Gtk::RESPONSE_OK)
     return;
-    
+
   const auto uri = dialog.get_uri();
   if(uri.empty())
     return;
-    
+
   save_file(uri);
 }
 
 bool ImageGlom::save_file_sync(const Glib::ustring& uri)
 {
-  //TODO: We should still do this asynchronously, 
+  //TODO: We should still do this asynchronously,
   //even when we don't use the dialog's run() to do that
   //because we don't want to offer feedback.
   //Ideally, EvView would just load from data anyway.
-  
+
   const auto gda_binary = get_binary();
   if(!gda_binary)
   {
     std::cerr << G_STRFUNC << ": GdaBinary is null\n";
     return false;
   }
-    
+
   if(!gda_binary->data)
   {
     std::cerr << G_STRFUNC << ": GdaBinary::data is null\n";
@@ -742,7 +742,7 @@ bool ImageGlom::save_file_sync(const Glib::ustring& uri)
     std::cerr << G_STRFUNC << "Exception: " << ex.what() << std::endl;
     return false;
   }
-  
+
   return true;
 }
 
@@ -752,7 +752,7 @@ bool ImageGlom::save_file(const Glib::ustring& uri)
   Utils::get_glade_widget_derived_with_warning(dialog_save);
   if(!dialog_save)
     return false;
-    
+
   // Automatically delete the dialog when we no longer need it:
   std::shared_ptr<Gtk::Dialog> dialog_keeper(dialog_save);
 
@@ -776,13 +776,13 @@ void ImageGlom::on_menupopup_activate_select_file()
 {
   if(m_read_only)
     return;
-    
+
   auto pApp = get_appwindow();
 
   Gtk::FileChooserDialog dialog(_("Choose Image"), Gtk::FILE_CHOOSER_ACTION_OPEN);
   if(pApp)
     dialog.set_transient_for(*pApp);
-          
+
   set_file_filter_images(dialog);
 
   dialog.add_button(_("_Cancel"), Gtk::RESPONSE_CANCEL);
@@ -815,7 +815,7 @@ void ImageGlom::on_menupopup_activate_select_file()
           bin->binary_length = image_data->binary_length;
 
           clear_original_data();
-          
+
           g_value_unset(m_original_data.gobj());
           g_value_init(m_original_data.gobj(), GDA_TYPE_BINARY);
           gda_value_take_binary(m_original_data.gobj(), bin);
@@ -838,23 +838,23 @@ void ImageGlom::on_clipboard_get(Gtk::SelectionData& selection_data, guint /* in
   //info is meant to indicate the target, but it seems to be always 0,
   //so we use the selection_data's target instead.
 
-  const auto target = selection_data.get_target(); 
+  const auto target = selection_data.get_target();
 
   const auto mime_type = get_mime_type();
   if(mime_type.empty())
   {
     std::cerr << G_STRFUNC << ": mime_type is empty.\n";
   }
-  
+
   if(target == mime_type)
   {
     const auto gda_binary = get_binary();
     if(!gda_binary)
       return;
-    
+
     if(!gda_binary->data)
       return;
-    
+
     selection_data.set(mime_type, 8, gda_binary->data, gda_binary->binary_length);
 
     // This set() override uses an 8-bit text format for the data.
@@ -892,7 +892,7 @@ void ImageGlom::on_menupopup_activate_copy()
   {
     std::cerr << G_STRFUNC << ": mime_type is empty.\n";
   }
-  
+
   std::vector<Gtk::TargetEntry> listTargets;
   listTargets.emplace_back( Gtk::TargetEntry(mime_type) );
 
@@ -948,10 +948,10 @@ void ImageGlom::setup_menu_usermode()
 
   m_action_open_file_with = m_action_group_user_mode_popup->add_action("open-fil-ewith",
     sigc::mem_fun(*this, &ImageGlom::on_menupopup_activate_open_file_with) );
-    
+
   m_action_save_file = m_action_group_user_mode_popup->add_action("save-file",
     sigc::mem_fun(*this, &ImageGlom::on_menupopup_activate_save_file) );
-    
+
   m_action_select_file = m_action_group_user_mode_popup->add_action("select-file",
     sigc::mem_fun(*this, &ImageGlom::on_menupopup_activate_select_file) );
 
diff --git a/glom/utility_widgets/imageglom.h b/glom/utility_widgets/imageglom.h
index 55260e3..b20fe5b 100644
--- a/glom/utility_widgets/imageglom.h
+++ b/glom/utility_widgets/imageglom.h
@@ -48,7 +48,7 @@ public:
 
 
   virtual ~ImageGlom();
-  
+
   void set_layout_item(const std::shared_ptr<LayoutItem>& layout_item, const Glib::ustring& table_name) 
override;
 
   void set_value(const Gnome::Gda::Value& value) override;
@@ -62,7 +62,7 @@ public:
   void set_read_only(bool read_only = true) override;
 
   void on_ev_job_finished(EvJob* job);
-  
+
 private:
   void init();
   void init_widgets(bool use_evince);
@@ -91,12 +91,12 @@ private:
   void show_image_data();
 
   void popup_menu(guint button, guint32 activate_time);
-  
+
   const GdaBinary* get_binary() const;
-  
+
   //Get a pixbuf scaled down to the current size allocation:
   Glib::RefPtr<Gdk::Pixbuf> get_scaled_image();
-  
+
   Glib::ustring save_to_temp_file(bool show_progress = true);
   bool save_file(const Glib::ustring& uri);
   bool save_file_sync(const Glib::ustring& uri);
@@ -105,16 +105,16 @@ private:
   Glib::ustring get_mime_type() const;
   static void fill_evince_supported_mime_types();
   static void fill_gdkpixbuf_supported_mime_types();
- 
+
   mutable Gnome::Gda::Value m_original_data; // Original file data (mutable so that we can create it in 
get_value() if it does not exist yet)
 
   Gtk::Frame m_frame;
-  
+
   //For anything supported by Evince:
   std::unique_ptr<Gtk::ScrolledWindow> m_ev_scrolled_window;
   EvView* m_ev_view;
   EvDocumentModel* m_ev_document_model;
-  
+
   //For anything supported by GdkPixbuf,
   //or for representative thumbnails and icons:
   std::unique_ptr<Gtk::Image> m_image;
@@ -124,7 +124,7 @@ private:
 
   std::unique_ptr<Gtk::Menu> m_menu_popup_user_mode;
 
-  //TODO: Use just the Gio::ActionGroup type when it derives from Gio::ActionMap. 
+  //TODO: Use just the Gio::ActionGroup type when it derives from Gio::ActionMap.
   Glib::RefPtr<Gio::SimpleActionGroup> m_action_group_user_mode_popup;
 
   //We use Gio::SimpleAction rather than Gio::Action
@@ -133,7 +133,7 @@ private:
     m_action_save_file, m_action_select_file, m_action_copy, m_action_paste, m_action_clear;
 
   bool m_read_only;
-  
+
   typedef std::vector<Glib::ustring> type_vec_ustrings;
   static type_vec_ustrings m_evince_supported_mime_types;
   static type_vec_ustrings m_gdkpixbuf_supported_mime_types;
diff --git a/glom/utility_widgets/layouttoolbar.cc b/glom/utility_widgets/layouttoolbar.cc
index 7404d00..e954a30 100644
--- a/glom/utility_widgets/layouttoolbar.cc
+++ b/glom/utility_widgets/layouttoolbar.cc
@@ -28,9 +28,9 @@ namespace Glom
 {
 
 LayoutToolbar::LayoutToolbar()
-:  m_group_items(_("Items")), 
+:  m_group_items(_("Items")),
    m_group_containers(_("Containers")),
-   m_drag_group("glom-group.png", LayoutWidgetBase::enumType::GROUP, 
+   m_drag_group("glom-group.png", LayoutWidgetBase::enumType::GROUP,
      _("Group"), _("Drag this to the layout to add a new group.")),
    m_drag_notebook("glom-notebook.png", LayoutWidgetBase::enumType::NOTEBOOK,
      _("Notebook"), _("Drag this to the layout to add a new notebook.")),
@@ -49,7 +49,7 @@ LayoutToolbar::LayoutToolbar()
   set_size_request(100, 200);
 
   //TODO: Add a drag item for the related records item.
-  
+
   //Note for translators: These are container layout items, containing child layout items, like container 
widgets in GTK+.
   m_group_containers.add(m_drag_group);
   m_group_containers.add(m_drag_notebook);
@@ -60,12 +60,12 @@ LayoutToolbar::LayoutToolbar()
   m_group_items.add(m_drag_button);
   m_group_items.add(m_drag_text);
   m_group_items.add(m_drag_image);
-  
+
   add(m_group_containers);
   add(m_group_items);
 
   set_drag_source();
-  
+
   show_all_children();
 }
 
diff --git a/glom/utility_widgets/layouttoolbarbutton.h b/glom/utility_widgets/layouttoolbarbutton.h
index 2c03e1f..46e4548 100644
--- a/glom/utility_widgets/layouttoolbarbutton.h
+++ b/glom/utility_widgets/layouttoolbarbutton.h
@@ -17,7 +17,7 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  */
- 
+
 
 #ifndef GLOM_UTILITY_WIDGETS_LAYOUTTOOLBARBUTTON_H
 #define GLOM_UTILITY_WIDGETS_LAYOUTTOOLBARBUTTON_H
@@ -44,7 +44,7 @@ private:
   {
     return "glom_print_layout_palette";
   };
-  
+
 private:
   LayoutWidgetBase::enumType m_type;
 };
diff --git a/glom/utility_widgets/layoutwidgetbase.cc b/glom/utility_widgets/layoutwidgetbase.cc
index da6ca45..ead3079 100644
--- a/glom/utility_widgets/layoutwidgetbase.cc
+++ b/glom/utility_widgets/layoutwidgetbase.cc
@@ -107,7 +107,7 @@ void LayoutWidgetBase::apply_formatting(Gtk::Widget& widget, const std::shared_p
     return;
 
   //Set justification on labels and text views:
-  //Assume that people want left/right justification of multi-line text if they chose 
+  //Assume that people want left/right justification of multi-line text if they chose
   //left/right alignment of the text itself.
   {
     const Formatting::HorizontalAlignment alignment =
@@ -154,7 +154,7 @@ void LayoutWidgetBase::apply_formatting(Gtk::Widget& widget, const std::shared_p
     UiUtils::load_font_into_css_provider(*widget_to_change, font_desc);
   }
 
-  
+
   const auto fg = formatting.get_text_format_color_foreground();
   if(!fg.empty())
   {
@@ -168,8 +168,8 @@ void LayoutWidgetBase::apply_formatting(Gtk::Widget& widget, const std::shared_p
     {
       UiUtils::load_background_color_into_css_provider(*widget_to_change, bg);
     }
-    //According to the gtk_widget_override_background_color() documentation, 
-    //a GtkLabel can only have a background color by, for instance, placing it 
+    //According to the gtk_widget_override_background_color() documentation,
+    //a GtkLabel can only have a background color by, for instance, placing it
     //in a GtkEventBox. Luckily Label is actually derived from EventBox.
     else if(labelglom)
     {
diff --git a/glom/utility_widgets/layoutwidgetfield.h b/glom/utility_widgets/layoutwidgetfield.h
index cfdabeb..084a2e7 100644
--- a/glom/utility_widgets/layoutwidgetfield.h
+++ b/glom/utility_widgets/layoutwidgetfield.h
@@ -28,7 +28,7 @@ namespace Glom
 
 class LayoutWidgetField : public LayoutWidgetMenu
 {
-public: 
+public:
   LayoutWidgetField();
 
   virtual void set_value(const Gnome::Gda::Value& value) = 0;
diff --git a/glom/utility_widgets/layoutwidgetmenu.cc b/glom/utility_widgets/layoutwidgetmenu.cc
index 295c39d..27148cd 100644
--- a/glom/utility_widgets/layoutwidgetmenu.cc
+++ b/glom/utility_widgets/layoutwidgetmenu.cc
@@ -88,7 +88,7 @@ void LayoutWidgetMenu::setup_menu(Gtk::Widget* widget)
 
   add_action(m_context_add_text,
     sigc::bind( sigc::mem_fun(*this, &LayoutWidgetMenu::on_menupopup_add_item), enumType::TEXT ) );
-  
+
   add_action(m_context_delete,
     sigc::mem_fun(*this, &LayoutWidgetMenu::on_menupopup_activate_delete) );
 
@@ -105,7 +105,7 @@ void LayoutWidgetMenu::setup_menu(Gtk::Widget* widget)
     pApp->add_developer_action(m_context_add_button);
     pApp->add_developer_action(m_context_add_text);
 
-    pApp->update_userlevel_ui(); //Update our action's sensitivity. 
+    pApp->update_userlevel_ui(); //Update our action's sensitivity.
   }
 
   auto menu = Gio::Menu::create();
@@ -171,14 +171,14 @@ void LayoutWidgetMenu::on_menupopup_activate_delete()
 
   if(base)
   {
-    auto group = 
+    auto group =
       std::dynamic_pointer_cast<LayoutGroup>(base->get_layout_item());
     if(!group)
-      return; 
- 
+      return;
+
     group->remove_item(get_layout_item());
     base->signal_layout_changed().emit();
-  } 
+  }
 }
 
 #endif // !GLOM_ENABLE_CLIENT_ONLY
diff --git a/glom/utility_widgets/layoutwidgetmenu.h b/glom/utility_widgets/layoutwidgetmenu.h
index 2657ef0..0113da5 100644
--- a/glom/utility_widgets/layoutwidgetmenu.h
+++ b/glom/utility_widgets/layoutwidgetmenu.h
@@ -31,9 +31,9 @@ namespace Glom
 
 class LayoutWidgetMenu : public LayoutWidgetBase
 {
-public: 
+public:
   LayoutWidgetMenu();
-  
+
   //Popup-menu:
 #ifndef GLOM_ENABLE_CLIENT_ONLY
   /**
@@ -45,10 +45,10 @@ public:
   virtual void on_menupopup_activate_layout_properties();
   void on_menupopup_add_item(enumType item);
   void on_menupopup_activate_delete();
-#endif // !GLOM_ENABLE_CLIENT_ONLY  
-    
+#endif // !GLOM_ENABLE_CLIENT_ONLY
+
 protected:
-#ifndef GLOM_ENABLE_CLIENT_ONLY    
+#ifndef GLOM_ENABLE_CLIENT_ONLY
   std::unique_ptr<Gtk::Menu> m_menu_popup;
 
   //TODO_Performance: //Presumably we waste lots of memory by having this in each layout widget. Maybe we 
can use one shared menu.
diff --git a/glom/utility_widgets/layoutwidgetutils.cc b/glom/utility_widgets/layoutwidgetutils.cc
index 730d866..a1c2e44 100644
--- a/glom/utility_widgets/layoutwidgetutils.cc
+++ b/glom/utility_widgets/layoutwidgetutils.cc
@@ -1,18 +1,18 @@
 /*
  * glom
- * 
+ *
  * glom is free software.
- * 
+ *
  * You may redistribute it and/or modify it under the terms of the
  * GNU General Public License, as published by the Free Software
  * Foundation; either version 2 of the License, or (at your option)
  * any later version.
- * 
+ *
  * glom is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  * See the GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with glom.  If not, write to:
  *     The Free Software Foundation, Inc.,
@@ -28,7 +28,7 @@
 
 namespace Glom
 {
-  
+
 LayoutWidgetUtils::LayoutWidgetUtils()
 {
   //Derived class's constructors must call this:
@@ -45,7 +45,7 @@ void LayoutWidgetUtils::setup_util_menu(Gtk::Widget* widget)
     sigc::mem_fun(*this, &LayoutWidgetUtils::on_menu_properties_activate) );
   m_util_delete = m_action_group->add_action("delete",
     sigc::mem_fun(*this, &LayoutWidgetUtils::on_menu_delete_activate) );
-  
+
   widget->insert_action_group("utility", m_action_group);
 
   auto menu = Gio::Menu::create();
@@ -80,7 +80,7 @@ void LayoutWidgetUtils::on_menu_delete_activate()
 
   if(base)
   {
-    auto group = 
+    auto group =
       std::dynamic_pointer_cast<LayoutGroup>(base->get_layout_item());
     if(!group)
       return;
diff --git a/glom/utility_widgets/layoutwidgetutils.h b/glom/utility_widgets/layoutwidgetutils.h
index 82946c7..f034bcc 100644
--- a/glom/utility_widgets/layoutwidgetutils.h
+++ b/glom/utility_widgets/layoutwidgetutils.h
@@ -1,18 +1,18 @@
 /*
  * glom
- * 
+ *
  * glom is free software.
- * 
+ *
  * You may redistribute it and/or modify it under the terms of the
  * GNU General Public License, as published by the Free Software
  * Foundation; either version 2 of the License, or (at your option)
  * any later version.
- * 
+ *
  * glom is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  * See the GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with glom.  If not, write to:
  *   The Free Software Foundation, Inc.,
@@ -35,7 +35,7 @@ class LayoutWidgetUtils : public LayoutWidgetBase
 {
 public:
   LayoutWidgetUtils();
-  
+
 protected:
   void setup_util_menu(Gtk::Widget* widget);
 
@@ -47,7 +47,7 @@ protected:
   virtual void on_menu_delete_activate();
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-private:  
+private:
   Glib::RefPtr<Gio::SimpleAction> m_util_properties;
   Glib::RefPtr<Gio::SimpleAction> m_util_delete;
   Glib::RefPtr<Gio::SimpleActionGroup> m_action_group;
diff --git a/glom/utility_widgets/notebookglom.h b/glom/utility_widgets/notebookglom.h
index fca4717..36331b6 100644
--- a/glom/utility_widgets/notebookglom.h
+++ b/glom/utility_widgets/notebookglom.h
@@ -42,8 +42,8 @@ public:
 
 protected:
   friend class NotebookLabel;
-  void delete_from_layout();  
-  
+  void delete_from_layout();
+
 protected:
   void init();
 
diff --git a/glom/utility_widgets/notebooklabelglom.cc b/glom/utility_widgets/notebooklabelglom.cc
index fdde786..36c1c8c 100644
--- a/glom/utility_widgets/notebooklabelglom.cc
+++ b/glom/utility_widgets/notebooklabelglom.cc
@@ -27,7 +27,7 @@
 namespace Glom
 {
 
-NotebookLabel::NotebookLabel(NotebookGlom* notebook) 
+NotebookLabel::NotebookLabel(NotebookGlom* notebook)
 : m_notebook(notebook),
   m_popup_menu(nullptr)
 {
@@ -53,7 +53,7 @@ void NotebookLabel::init()
 
 void NotebookLabel::set_label (const Glib::ustring& title)
 {
-  m_label.set_label (title); 
+  m_label.set_label (title);
 }
 
 AppWindow* NotebookLabel::get_appwindow()
@@ -69,10 +69,10 @@ void NotebookLabel::on_menu_new_group_activate()
   auto group = std::make_shared<LayoutGroup>();
   group->set_title_original(_("New Group"));
   group->set_name(_("Group"));
-  
+
   auto notebook_group = std::dynamic_pointer_cast<LayoutGroup>(m_notebook->get_layout_item());
   notebook_group->add_item(group);
-  
+
   m_notebook->signal_layout_changed().emit();
 }
 
@@ -110,7 +110,7 @@ void NotebookLabel::setup_menu(Gtk::Widget* /* widget */)
     sigc::mem_fun(*this, &NotebookLabel::on_menu_new_group_activate) );
   m_deelete = m_action_group->add_action("delete",
     sigc::mem_fun(*this, &NotebookLabel::on_menu_delete_activate) );
- 
+
   insert_action_group("context", m_action_group);
 
   auto menu = Gio::Menu::create();
diff --git a/glom/utility_widgets/notebooklabelglom.h b/glom/utility_widgets/notebooklabelglom.h
index 9dee57b..da2db54 100644
--- a/glom/utility_widgets/notebooklabelglom.h
+++ b/glom/utility_widgets/notebooklabelglom.h
@@ -39,24 +39,24 @@ public:
   explicit NotebookLabel(NotebookGlom* notebook);
   explicit NotebookLabel(const Glib::ustring& label, NotebookGlom* notebook);
 
-  void set_label(const Glib::ustring& title);  
-    
+  void set_label(const Glib::ustring& title);
+
 private:
   void init();
 
   virtual AppWindow* get_appwindow();
-    
+
   Gtk::Label m_label;
   NotebookGlom* m_notebook;
-  
+
   void setup_menu(Gtk::Widget* widget);
   std::unique_ptr<Gtk::Menu> m_popup_menu;
-  
+
   void on_menu_new_group_activate();
   void on_menu_delete_activate();
-    
+
   bool on_button_press_event(GdkEventButton *event) override;
-  
+
   Glib::RefPtr<Gio::SimpleAction> m_new_group;
   Glib::RefPtr<Gio::SimpleAction> m_deelete;
   Glib::RefPtr<Gio::SimpleActionGroup> m_action_group;
diff --git a/glom/utility_widgets/placeholder.cc b/glom/utility_widgets/placeholder.cc
index 7a14168..53d0730 100644
--- a/glom/utility_widgets/placeholder.cc
+++ b/glom/utility_widgets/placeholder.cc
@@ -61,6 +61,6 @@ const Gtk::Widget* PlaceHolder::get_child() const
 {
   return m_pChild;
 }
- 
+
 } //namespace Glom
 
diff --git a/glom/utility_widgets/placeholder.h b/glom/utility_widgets/placeholder.h
index b33cc3d..094eca9 100644
--- a/glom/utility_widgets/placeholder.h
+++ b/glom/utility_widgets/placeholder.h
@@ -39,7 +39,7 @@ public:
   void remove();
 
   Gtk::Widget* get_child();
-  const Gtk::Widget* get_child() const;  
+  const Gtk::Widget* get_child() const;
 
 private:
   Gtk::Widget* m_pChild;
diff --git a/glom/utility_widgets/test_flowtable.cc b/glom/utility_widgets/test_flowtable.cc
index 0fb89d2..61b2686 100644
--- a/glom/utility_widgets/test_flowtable.cc
+++ b/glom/utility_widgets/test_flowtable.cc
@@ -90,7 +90,7 @@ static void clear_flowtable(Glom::FlowTable& flowtable)
   for(const auto& widget : vec_child_widgets)
   {
     //std::cout << "  loop: widget=" << widget << std::endl;
-    delete widget; //TODO: This crashes 
+    delete widget; //TODO: This crashes
   }
 
   vec_child_widgets.clear();
@@ -99,7 +99,7 @@ static void clear_flowtable(Glom::FlowTable& flowtable)
 int
 main(int argc, char* argv[])
 {
-  auto app = 
+  auto app =
     Gtk::Application::create(argc, argv, "org.glom.test_flowtable");
 
   Gtk::Window window;
diff --git a/glom/utility_widgets/test_flowtable_dnd.cc b/glom/utility_widgets/test_flowtable_dnd.cc
index a4fd2d3..2112f7f 100644
--- a/glom/utility_widgets/test_flowtable_dnd.cc
+++ b/glom/utility_widgets/test_flowtable_dnd.cc
@@ -17,7 +17,7 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  */
- 
+
 #include "flowtable_dnd.h"
 #include <gtkmm/window.h>
 
@@ -68,14 +68,14 @@ main(int argc, char* argv[])
   Gtk::Entry button12; button11.set_text("eleven");
   flowtable.add(button11, button12);
   button11.show(); button12.show();
-  
+
   window.add(flowtable);
   flowtable.set_design_mode();
   flowtable.show();
 
 //  Glom::DragWindow drag_window;
 //  drag_window.show();
-  
+
   Gtk::Main::run(window);
 
   return 0;
diff --git a/glom/utils_ui.cc b/glom/utils_ui.cc
index 7577ecb..b1bead3 100644
--- a/glom/utils_ui.cc
+++ b/glom/utils_ui.cc
@@ -88,7 +88,7 @@ namespace Glom
 int UiUtils::dialog_run_with_help(Gtk::Dialog* dialog, const Glib::ustring& id)
 {
   int result = dialog->run();
-  
+
   while (result == Gtk::RESPONSE_HELP)
   {
     show_help(dialog, id);
@@ -111,7 +111,7 @@ void UiUtils::show_help(Gtk::Window* parent_window, const Glib::ustring& id)
   Glib::ustring uri = "help:glom";
   if (!id.empty())
     uri += "/" + id;
-    
+
   try
   {
     //Use the GNOME help browser:
@@ -175,12 +175,12 @@ void UiUtils::show_window_until_hide(Gtk::Window* window)
 
   //Stop the main_loop when the window is hidden:
   sigc::connection handler_connection; //TODO: There seems to be a crash if this is on the same line.
-  handler_connection = window->signal_hide().connect( 
+  handler_connection = window->signal_hide().connect(
     sigc::bind(
       sigc::ptr_fun(&on_window_hide),
       main_loop, handler_connection
     ) );
-  
+
   window->show();
   main_loop->run(); //Run and block until it is stopped by the hide signal handler.
 }
@@ -230,7 +230,7 @@ Glib::RefPtr<Gdk::Pixbuf> UiUtils::get_pixbuf_for_gda_value(const Gnome::Gda::Va
       //  std::cout << " name=" << iter->get_name() << ", writable=" << iter->is_writable() << std::endl;
       //}
 
-      Glib::RefPtr<Gdk::PixbufLoader> refPixbufLoader;      
+      Glib::RefPtr<Gdk::PixbufLoader> refPixbufLoader;
       try
       {
         refPixbufLoader = Gdk::PixbufLoader::create();
@@ -316,7 +316,7 @@ int UiUtils::get_suitable_field_width_for_widget(Gtk::Widget& widget, const std:
         example_text = "EUR 999.99";
       else
         example_text = "EUR 9999999999";
-        
+
       break;
     }
     case(Field::glom_field_type::TEXT):
@@ -425,7 +425,7 @@ Glib::RefPtr<Gdk::Pixbuf> UiUtils::image_scale_keeping_ratio(const Glib::RefPtr<
     return pixbuf;
   else if(scale_mode == enum_scale_mode::HEIGHT)
   {
-    const float ratio = (float)target_height / (float)pixbuf_height; 
+    const float ratio = (float)target_height / (float)pixbuf_height;
     target_width = (int)((float)pixbuf_width * ratio);
   }
   else if(scale_mode == enum_scale_mode::WIDTH)
diff --git a/glom/variablesmap.cc b/glom/variablesmap.cc
index dffd397..957496e 100644
--- a/glom/variablesmap.cc
+++ b/glom/variablesmap.cc
@@ -45,7 +45,7 @@ void VariablesMap::connect_widget(const Glib::ustring& widget_name, bool& variab
 void VariablesMap::connect_widget(const Glib::ustring& widget_name, Glib::ustring& variable)
 {
   Gtk::Widget* pWidget = nullptr;
-  m_builder->get_widget(widget_name, pWidget); 
+  m_builder->get_widget(widget_name, pWidget);
 
   auto pEntry = dynamic_cast<Gtk::Entry*>(pWidget); //it mange both Gtk::entry and Gtk::SpinButton
   auto pComboBox = dynamic_cast<Gtk::ComboBox*>(pWidget);
@@ -63,9 +63,9 @@ void VariablesMap::connect_widget(const Glib::ustring& widget_name, Glib::ustrin
 void VariablesMap::connect_widget(const Glib::ustring& widget_name, double& variable)
 {
   Gtk::Widget* pWidget = nullptr;
-  m_builder->get_widget(widget_name, pWidget); 
+  m_builder->get_widget(widget_name, pWidget);
 
-  auto pScale = dynamic_cast<Gtk::Scale*>(pWidget); 
+  auto pScale = dynamic_cast<Gtk::Scale*>(pWidget);
   if(pScale)
   {
     m_mapWidgetsToVariables[pScale] = (void*)(&variable);
@@ -75,9 +75,9 @@ void VariablesMap::connect_widget(const Glib::ustring& widget_name, double& vari
 void VariablesMap::connect_widget(const Glib::ustring& widget_name, Glib::Date& variable)
 {
   Gtk::Widget* pWidget = nullptr;
-  m_builder->get_widget(widget_name, pWidget); 
+  m_builder->get_widget(widget_name, pWidget);
 
-  auto pCalendar = dynamic_cast<Gtk::Calendar*>(pWidget); 
+  auto pCalendar = dynamic_cast<Gtk::Calendar*>(pWidget);
   if(pCalendar)
   {
     m_mapWidgetsToVariables[pCalendar] = (void*)(&variable);
@@ -119,8 +119,8 @@ void VariablesMap::transfer_one_widget(Gtk::Widget* pWidget, bool to_variable)
       auto pComboBox = dynamic_cast<Gtk::ComboBox*>(pWidget);
 
       auto pToggleButton = dynamic_cast<Gtk::ToggleButton*>(pWidget); //CheckButtons and RadioButtons.
-      auto pScale = dynamic_cast<Gtk::Scale*>(pWidget); 
-      auto pCalendar = dynamic_cast<Gtk::Calendar*>(pWidget); 
+      auto pScale = dynamic_cast<Gtk::Scale*>(pWidget);
+      auto pCalendar = dynamic_cast<Gtk::Calendar*>(pWidget);
 
       if(pEntry)
       {
@@ -131,7 +131,7 @@ void VariablesMap::transfer_one_widget(Gtk::Widget* pWidget, bool to_variable)
         else
           pEntry->set_text(*pVar);
       }
-      
+
       if(pComboBox)
       {
         auto pVar = static_cast<Glib::ustring*>(pVariable);
@@ -139,14 +139,14 @@ void VariablesMap::transfer_one_widget(Gtk::Widget* pWidget, bool to_variable)
 
         if(to_variable)
         {
-             if(pIEntry) 
+             if(pIEntry)
                (*pVar) = pIEntry->get_text();
         } else {
-             if(pIEntry) 
+             if(pIEntry)
                  pIEntry->set_text(*pVar);
            }
       }
-      
+
       if(pToggleButton)
       {
         auto pVar = static_cast<bool*>(pVariable);
@@ -156,7 +156,7 @@ void VariablesMap::transfer_one_widget(Gtk::Widget* pWidget, bool to_variable)
         else
           pToggleButton->set_active(*pVar);
       }
-      
+
       if(pScale)
       {
         auto pVar = static_cast<double*>(pVariable);
@@ -166,7 +166,7 @@ void VariablesMap::transfer_one_widget(Gtk::Widget* pWidget, bool to_variable)
         else
           pScale->set_value(*pVar);
       }
-      
+
       if(pCalendar)
       {
         auto pVar = static_cast<Glib::Date*>(pVariable);
diff --git a/glom/window_boxholder.cc b/glom/window_boxholder.cc
index 7be307e..a5c217f 100644
--- a/glom/window_boxholder.cc
+++ b/glom/window_boxholder.cc
@@ -17,7 +17,7 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  */
- 
+
 #include <glom/window_boxholder.h>
 #include <glom/utils_ui.h>
 #include <libglom/utils.h>
diff --git a/glom/window_boxholder.h b/glom/window_boxholder.h
index 14599db..3eedbba 100644
--- a/glom/window_boxholder.h
+++ b/glom/window_boxholder.h
@@ -33,7 +33,7 @@ namespace Glom
 class Window_BoxHolder :
   public Gtk::Window
 {
-public: 
+public:
   explicit Window_BoxHolder(Box_WithButtons* pBox, const Glib::ustring& title = Glib::ustring());
 
 private:
diff --git a/tests/export/test_selfhosting_new_then_export.cc 
b/tests/export/test_selfhosting_new_then_export.cc
index edddfbe..0ffacf5 100644
--- a/tests/export/test_selfhosting_new_then_export.cc
+++ b/tests/export/test_selfhosting_new_then_export.cc
@@ -29,14 +29,14 @@
 static bool test(Glom::Document::HostingMode hosting_mode)
 {
   auto document = std::make_shared<Glom::Document>();
-  const bool recreated = 
+  const bool recreated =
     test_create_and_selfhost_from_example("example_music_collection.glom", document, hosting_mode);
   if(!recreated)
   {
     std::cerr << G_STRFUNC << ": Recreation failed.\n";
     return false;
   }
-  
+
   Glom::FoundSet found_set; //TODO: Test a where clause.
   found_set.m_table_name = "albums";
   Glom::Document::type_list_const_layout_groups layout_groups;
@@ -48,7 +48,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   auto field_year = std::make_shared<Glom::LayoutItem_Field>();
   field_year->set_name("year");
   group->add_item(field_year);
-  
+
   std::stringstream the_stream;
   Glom::DbUtilsExport::export_data_to_stream(document, the_stream, found_set, layout_groups);
   const auto text = the_stream.str();
@@ -67,14 +67,14 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   }
 
   test_selfhosting_cleanup();
-    
+
   return true;
 }
 
 int main()
 {
   Glom::libglom_init();
-  
+
   const auto result = test_all_hosting_modes(sigc::ptr_fun(&test));
 
   Glom::libglom_deinit();
diff --git a/tests/export/test_selfhosting_new_then_export_with_big_num.cc 
b/tests/export/test_selfhosting_new_then_export_with_big_num.cc
index d700d44..28bb1da 100644
--- a/tests/export/test_selfhosting_new_then_export_with_big_num.cc
+++ b/tests/export/test_selfhosting_new_then_export_with_big_num.cc
@@ -29,14 +29,14 @@
 static bool test(Glom::Document::HostingMode hosting_mode)
 {
   auto document = std::make_shared<Glom::Document>();
-  const bool recreated = 
+  const bool recreated =
     test_create_and_selfhost_from_test_example("export/test_example_music_collection_with_big_num.glom", 
document, hosting_mode);
   if(!recreated)
   {
     std::cerr << G_STRFUNC << ": Recreation failed.\n";
     return false;
   }
-  
+
   Glom::FoundSet found_set; //TODO: Test a where clause.
   found_set.m_table_name = "artists";
   Glom::Document::type_list_const_layout_groups layout_groups;
@@ -45,7 +45,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   auto field = std::make_shared<Glom::LayoutItem_Field>();
   field->set_name("testnum");
   group->add_item(field);
-  
+
   std::stringstream the_stream;
   Glom::DbUtilsExport::export_data_to_stream(document, the_stream, found_set, layout_groups);
   const auto text = the_stream.str();
@@ -64,14 +64,14 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   }
 
   test_selfhosting_cleanup();
-    
+
   return true;
 }
 
 int main()
 {
   Glom::libglom_init();
-  
+
   const auto result = test_all_hosting_modes(sigc::ptr_fun(&test));
 
   Glom::libglom_deinit();
diff --git a/tests/import/utils.cc b/tests/import/utils.cc
index a3eeb40..b95b1b6 100644
--- a/tests/import/utils.cc
+++ b/tests/import/utils.cc
@@ -32,7 +32,7 @@ static Glib::ustring create_file_from_buffer(const char* input, guint input_size
   auto file = Gio::File::create_for_uri(file_uri);
 
   gssize result = 0;
- 
+
   try
   {
     result = file->append_to()->write(input, input_size);
diff --git a/tests/python/test_python_execute_func_date.cc b/tests/python/test_python_execute_func_date.cc
index eefb0ec..447feb5 100644
--- a/tests/python/test_python_execute_func_date.cc
+++ b/tests/python/test_python_execute_func_date.cc
@@ -31,7 +31,7 @@ void execute_func_with_date_return_value()
     std::cerr << "Unexpected error message: " << error_message << "\n";
   }
   g_assert(error_message.empty());
-  
+
   //Check that the return value is of the expected type:
   g_assert(value.get_value_type() == G_TYPE_DATE);
 
@@ -43,7 +43,7 @@ void execute_func_with_date_return_value()
 
   //std::cout << "value=" << value.to_string() << std::endl;
 }
-                            
+
 void execute_func_with_date_input_value()
 {
   const char* calculation = "import datetime\n"
@@ -69,7 +69,7 @@ void execute_func_with_date_input_value()
     std::cerr << "Unexpected error message: " << error_message << "\n";
   }
   g_assert(error_message.empty());
-  
+
   //Check that the return value is of the expected type:
   g_assert(value.get_value_type() == GDA_TYPE_NUMERIC);
 
diff --git a/tests/python/test_python_execute_func_with_record_field_types.cc 
b/tests/python/test_python_execute_func_with_record_field_types.cc
index 78d972c..c9bcf50 100644
--- a/tests/python/test_python_execute_func_with_record_field_types.cc
+++ b/tests/python/test_python_execute_func_with_record_field_types.cc
@@ -96,7 +96,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
 {
   //Connect to a Glom database
   auto document = std::make_shared<Glom::Document>();
-  const bool recreated = 
+  const bool recreated =
     test_create_and_selfhost_from_example("example_smallbusiness.glom", document, hosting_mode);
   if(!recreated)
   {
@@ -159,7 +159,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
 int main()
 {
   Glom::libglom_init();
-  
+
   const auto result = test_all_hosting_modes(sigc::ptr_fun(&test));
 
   Glom::libglom_deinit();
diff --git a/tests/python/test_python_module.cc b/tests/python/test_python_module.cc
index fbdcd36..7206bff 100644
--- a/tests/python/test_python_module.cc
+++ b/tests/python/test_python_module.cc
@@ -32,9 +32,9 @@ bool gda_python_module_is_available()
   //TODO: How can we requests a specific version to avoid confusion
   //between the parallel-installed Gda-5.0 and Gda-6.0 APIs?
 
-  //Python code usually uses "from gi.repository import Gda" so that 
+  //Python code usually uses "from gi.repository import Gda" so that
   //the code may use Gda. rather than gi.repository.Gda in the code.
-  const gchar* name = "gi.repository.Gda"; 
+  const gchar* name = "gi.repository.Gda";
   PyObject* module_glom = PyImport_ImportModule((char*)name);
 
   if(!module_glom)
@@ -55,13 +55,13 @@ int main ()
   atexit(__libc_freeres);
 #endif
   Glom::libglom_init();  // Calls PyInitialize()
-  
+
   if(!Glom::gda_python_module_is_available())
     return EXIT_FAILURE;
   if(!Glom::glom_python_module_is_available())
     return EXIT_FAILURE;
-  
+
   Glom::libglom_deinit(); // Calls Py_Finalize();
-  
+
   return EXIT_SUCCESS;
 }
diff --git a/tests/test_document_autosave.cc b/tests/test_document_autosave.cc
index cfd6987..c43344a 100644
--- a/tests/test_document_autosave.cc
+++ b/tests/test_document_autosave.cc
@@ -60,7 +60,7 @@ int main()
   Glom::libglom_init();
 
   file_uri = Glom::FileUtils::get_temp_file_uri("testglom_document_autosave", ".glom");
-  
+
   //Make sure that the file does not exist yet:
   cleanup();
 
diff --git a/tests/test_document_change.cc b/tests/test_document_change.cc
index 511fe17..d8fc8ee 100644
--- a/tests/test_document_change.cc
+++ b/tests/test_document_change.cc
@@ -66,10 +66,10 @@ int main()
   const Glib::ustring table_name = "sometable";
   auto table_info = std::make_shared<Glom::TableInfo>();
   table_info->set_name(table_name);
-  
+
   const Glib::ustring table_title = "sometabletitle";
   table_info->set_title_original(table_title);
-  g_assert(table_info->get_title_original() == table_title);  
+  g_assert(table_info->get_title_original() == table_title);
   document->add_table(table_info);
 
   const float x = 20.0f;
diff --git a/tests/test_document_load.cc b/tests/test_document_load.cc
index 597351f..659fb7b 100644
--- a/tests/test_document_load.cc
+++ b/tests/test_document_load.cc
@@ -68,7 +68,7 @@ static bool get_group_named(const Glom::Document::type_list_groups& container, c
     group_info = *iter;
     return true;
   }
-  
+
   group_info = Glom::GroupInfo();
   return false;
 }
@@ -81,23 +81,23 @@ static bool needs_navigation(const std::shared_ptr<Glom::Document>& document, co
     document->get_field(table_name, field_name));
 
   std::shared_ptr<Glom::Relationship> field_used_in_relationship_to_one;
-  return Glom::DbUtils::layout_field_should_have_navigation(table_name, 
+  return Glom::DbUtils::layout_field_should_have_navigation(table_name,
     layout_item, document, field_used_in_relationship_to_one);
 }
 
 static std::shared_ptr<const Glom::LayoutItem_Portal> get_portal_from_details_layout(const 
std::shared_ptr<Glom::Document>& document, const Glib::ustring& table_name, const Glib::ustring& 
relationship_name)
 {
-  const auto groups = 
+  const auto groups =
     document->get_data_layout_groups("details", table_name);
   if(groups.empty())
   {
     std::cerr << G_STRFUNC << ": groups is empty.\n";
   }
-  
+
   for(const auto& group : groups)
   {
     for(const auto& layout_item : group->get_items_recursive_with_groups())
-    { 
+    {
       const auto child_group =
         std::dynamic_pointer_cast<const Glom::LayoutGroup>(layout_item);
       if(!child_group)
@@ -112,11 +112,11 @@ static std::shared_ptr<const Glom::LayoutItem_Portal> get_portal_from_details_la
         return portal;
     }
   }
-      
+
   return std::shared_ptr<Glom::LayoutItem_Portal>();
 }
-  
- 
+
+
 int main()
 {
   Glom::libglom_init();
@@ -207,35 +207,35 @@ int main()
 
 
   //Check a layout:
-  const auto groups = 
+  const auto groups =
     document->get_data_layout_groups("details", "scenes");
   g_assert(groups.size() == 3);
   const auto group =
     groups[1];
-  const auto items = 
+  const auto items =
     group->get_items_recursive();
   //std::cout << "size: " << items.size() << std::endl;
   g_assert(items.size() == 13);
-  const auto items_with_groups = 
+  const auto items_with_groups =
     group->get_items_recursive_with_groups();
   //std::cout << "size: " << items_with_groups.size() << std::endl;
   g_assert(items_with_groups.size() == 15);
 
   //Check that expected fields can be found on a layout.
-  auto field_on_layout = 
+  auto field_on_layout =
     get_field_on_layout(document, "scenes", "locations", "address_town");
   g_assert(field_on_layout);
   g_assert(field_on_layout->get_table_used("scenes") == "locations");
   g_assert(field_on_layout->get_name() == "address_town");
 
-  
+
   //Check Field Formatting:
-  field = document->get_field("contacts", "name_title");  
+  field = document->get_field("contacts", "name_title");
   g_assert(field);
   g_assert(field->get_glom_type() == Glom::Field::glom_field_type::TEXT);
   const auto& formatting = field->m_default_formatting;
   g_assert(formatting.get_horizontal_alignment() == Glom::Formatting::HorizontalAlignment::AUTO);
-  
+
   g_assert(formatting.get_has_choices());
   g_assert(formatting.get_has_custom_choices());
   g_assert(!formatting.get_has_related_choices());
@@ -243,9 +243,9 @@ int main()
   g_assert(!choices.empty());
   g_assert(contains_value(choices, "Mr"));
   g_assert(contains_value(choices, "Mrs"));
-  
+
   //Check that the default formatting is used on the layout:
-  field_on_layout = 
+  field_on_layout =
     get_field_on_layout(document, "contacts", "contacts", "name_title");
   g_assert(field_on_layout);
   g_assert(field_on_layout->get_table_used("contacts") == "contacts");
@@ -266,8 +266,8 @@ int main()
   }
 
 
-  //Test print layouts:  
-  const auto print_layout_names = 
+  //Test print layouts:
+  const auto print_layout_names =
     document->get_print_layout_names("contacts");
   if(print_layout_names.size() != 1)
   {
@@ -280,20 +280,20 @@ int main()
     std::cerr << G_STRFUNC << ": Failure: Could not find the expected print layout name.\n";
     return false;
   }
-  
+
   const auto print_layout = document->get_print_layout("contacts", "contact_details");
   if(!print_layout)
   {
     std::cerr << G_STRFUNC << ": Failure: Could not get an expected print layout.\n";
     return false;
   }
-  
+
   if(print_layout->get_title_original() != "Contact Details")
   {
     std::cerr << G_STRFUNC << ": Failure: Unexpected print layout title.\n";
     return false;
   }
-  
+
   if(!print_layout->get_layout_group())
   {
     std::cerr << G_STRFUNC << ": Failure: The print layout has no layout group.\n";
@@ -301,7 +301,7 @@ int main()
   }
 
 
-  const auto report_names = 
+  const auto report_names =
     document->get_report_names("contacts");
   if(report_names.size() != 2)
   {
@@ -321,20 +321,20 @@ int main()
     std::cerr << G_STRFUNC << ": Failure: Could not get an expected report.\n";
     return false;
   }
-  
+
   if(report->get_title_original() != "By Country, By Town")
   {
     std::cerr << G_STRFUNC << ": Failure: Unexpected report title.\n";
     return false;
   }
-  
+
   if(!report->get_layout_group())
   {
     std::cerr << G_STRFUNC << ": Failure: The report has no layout group.\n";
     return false;
   }
 
-  
+
   //Test user groups:
   Glom::Document::type_list_groups user_groups = document->get_groups();
   Glom::GroupInfo group_info_ignored;
diff --git a/tests/test_document_load_and_change.cc b/tests/test_document_load_and_change.cc
index 4946462..6390409 100644
--- a/tests/test_document_load_and_change.cc
+++ b/tests/test_document_load_and_change.cc
@@ -42,7 +42,7 @@ static bool field_is_on_a_layout(const std::shared_ptr<Glom::Document>& document
       }
     }
   }
-  
+
   return false;
 }
 
@@ -141,7 +141,7 @@ int main()
     const Glib::ustring table_name_invoices = "invoices";
     const Glib::ustring relationship_name_original = "contacts";
     const Glib::ustring relationship_name_new = "newrelationshipname";
-    document->change_relationship_name(table_name_invoices, 
+    document->change_relationship_name(table_name_invoices,
       relationship_name_original, relationship_name_new);
     if(document->get_relationship(table_name, relationship_name_original))
     {
@@ -156,7 +156,7 @@ int main()
     }
 
     //Check that the old relationship name is not used.
-    auto field_on_layout = 
+    auto field_on_layout =
       get_field_on_layout(document, table_name, "contacts", "name_full");
     g_assert(field_on_layout);
     if(field_on_layout->get_relationship_name() != relationship_name_new)
@@ -173,7 +173,7 @@ int main()
     std::cerr << G_STRFUNC << ": Failure: The removed field name is still used on a layout.\n";
     return false;
   }
-  
+
   //Remove a relationship:
   document->remove_relationship(relationship);
   relationship = document->get_relationship("invoice_lines", "products");
@@ -182,7 +182,7 @@ int main()
     std::cerr << G_STRFUNC << ": Failure: The removed relationship still exists.\n";
     return false;
   }
-  
+
   //Change a table name:
   const Glib::ustring table_renamed = "invoiceslinesrenamed";
   document->change_table_name("invoice_lines", table_renamed);
@@ -191,7 +191,7 @@ int main()
     std::cerr << G_STRFUNC << ": Failure: The renamed table still exists.\n";
     return false;
   }
-  
+
   relationship = document->get_relationship("invoices", "invoice_lines");
   if(!relationship)
   {
@@ -204,7 +204,7 @@ int main()
     std::cerr << G_STRFUNC << ": Failure: The relationship's to_table does have been renamed.\n";
     return false;
   }
-  
+
   document->remove_table("products");
   if(document->get_table("products"))
   {
@@ -212,35 +212,35 @@ int main()
     return false;
   }
 
- 
+
   //Remove a print layout:
-  auto print_layout = 
+  auto print_layout =
     document->get_print_layout("contacts", "contact_details");
   if(!print_layout)
   {
     std::cerr << G_STRFUNC << ": Failure: Could not get an expected print layout.\n";
     return false;
   }
-  
+
   document->remove_print_layout("contacts", "contact_details");
-  print_layout = 
+  print_layout =
     document->get_print_layout("contacts", "contact_details");
   if(print_layout)
   {
     std::cerr << G_STRFUNC << ": Failure: The removed print layotu still exists.\n";
     return false;
   }
-  
+
   //Test user groups:
   Glom::Document::type_list_groups groups = document->get_groups();
   g_assert(groups_contain_named(groups, "glom_developer"));
-  
+
   const Glib::ustring group_name = "accounts";
   g_assert(groups_contain_named(groups, group_name));
   document->remove_group(group_name);
   groups = document->get_groups();
   g_assert(!groups_contain_named(groups, group_name));
-  
+
   Glom::libglom_deinit();
 
   return EXIT_SUCCESS;
diff --git a/tests/test_document_load_and_save.cc b/tests/test_document_load_and_save.cc
index c37f2df..ecf3241 100644
--- a/tests/test_document_load_and_save.cc
+++ b/tests/test_document_load_and_save.cc
@@ -88,7 +88,7 @@ int main(int argc, char* argv[])
   //Validate the original document, though the test_dtd_file_validation.sh test does this anyway:
   if(!validate_glom_file(uri, dtd_filepath))
     return EXIT_FAILURE;
-  
+
 
   // Load the document:
   auto document = std::make_shared<Glom::Document>();
@@ -105,7 +105,7 @@ int main(int argc, char* argv[])
 
   // Save the document:
   document->set_allow_autosave(false);
-  const Glib::ustring temp_uri = 
+  const Glib::ustring temp_uri =
     Glom::FileUtils::get_temp_file_uri("testglom_document", ".glom");
   document->set_file_uri(temp_uri);
   document->set_modified(); //TODO: Let save() succeed without this.
diff --git a/tests/test_document_load_image.cc b/tests/test_document_load_image.cc
index a4eda72..2951d5d 100644
--- a/tests/test_document_load_image.cc
+++ b/tests/test_document_load_image.cc
@@ -27,7 +27,7 @@
 #include <glibmm/miscutils.h>
 
 #include <iostream>
- 
+
 int main()
 {
   Glom::libglom_init();
@@ -69,7 +69,7 @@ int main()
   g_assert(document->get_database_title_original() == "Project Manager Example");
 
   //Check a layout:
-  const auto groups = 
+  const auto groups =
     document->get_data_layout_groups("details", "projects");
   g_assert(groups.size() == 3);
   const auto group =
@@ -77,7 +77,7 @@ int main()
   g_assert(group);
   g_assert(group->get_name() == "overview");
 
-  const auto items = 
+  const auto items =
     group->get_items();
   //std::cout << "size: " << items.size() << std::endl;
   g_assert(items.size() == 3);
diff --git a/tests/test_document_load_translations.cc b/tests/test_document_load_translations.cc
index b37c512..a0079d4 100644
--- a/tests/test_document_load_translations.cc
+++ b/tests/test_document_load_translations.cc
@@ -78,7 +78,7 @@ static std::shared_ptr<const Glom::LayoutItem_Field> get_field_on_layout(const s
   {
     if(!group)
       continue;
-    
+
     for(const auto& layout_item : group->get_items_recursive())
     {
       const auto layout_item_field =
@@ -93,7 +93,7 @@ static std::shared_ptr<const Glom::LayoutItem_Field> get_field_on_layout(const s
       }
     }
   }
-  
+
   return std::shared_ptr<const Glom::LayoutItem_Field>();
 }
 
@@ -104,10 +104,10 @@ void check_title(const T_Item& item, const char* title_en, const char* title_de)
 {
   g_assert(item);
 
-  //The get_title_original() and get_title_translation() should not be called 
+  //The get_title_original() and get_title_translation() should not be called
   //on items that delegate to a child item:
   bool has_own_title = true;
-  auto field = 
+  auto field =
     std::dynamic_pointer_cast<const Glom::LayoutItem_Field>(item);
   if(field)
      has_own_title = false;
@@ -120,7 +120,7 @@ void check_title(const T_Item& item, const char* title_en, const char* title_de)
 
   if(has_own_title)
     g_assert( item->get_title_translation(locale_de) == title_de );
-    
+
   g_assert( item->get_title(locale_de) == title_de );
 
   g_assert( item->get_title_or_name(Glib::ustring()) == title_en );
@@ -192,7 +192,7 @@ int main()
 
   g_assert( document->get_table_title_original("scenes") == "Scenes" );
   g_assert( document->get_table_title_singular_original("scenes") == "Scene" );
-  
+
   g_assert( document->get_table_title("scenes", locale_de) == "Szenen" );
   g_assert( document->get_table_title_singular("scenes", locale_de) == "Szene" );
 
@@ -228,7 +228,7 @@ int main()
   check_title(relationship, "Actor", "Schauspieler");
 
   //Check a LayoutItemField's CustomTitle:
-  auto field_on_layout = 
+  auto field_on_layout =
     get_field_on_layout(document, "characters", "contacts", "name_full");
   g_assert(field_on_layout);
   g_assert(field_on_layout->get_has_relationship_name());
@@ -236,12 +236,12 @@ int main()
   check_title(field_on_layout, "Actor's Name", "Name des Schauspielers");
 
   //Check a LayoutItemField's Field title:
-  field_on_layout = 
+  field_on_layout =
     get_field_on_layout(document, "scenes", "locations", "name");
   g_assert(field_on_layout);
   check_title(field_on_layout, "Name", "Name" );
 
-  field_on_layout = 
+  field_on_layout =
     get_field_on_layout(document, "scenes", "scenes", "day_or_night");
   g_assert(field_on_layout);
   check_title(field_on_layout,  "Day/Night", "Tag/Nacht");
diff --git a/tests/test_fake_connection.cc b/tests/test_fake_connection.cc
index 541549b..940444f 100644
--- a/tests/test_fake_connection.cc
+++ b/tests/test_fake_connection.cc
@@ -67,9 +67,9 @@ int main()
   //Build a SQL query and get the string for it:
   const Gnome::Gda::Value value("Born To Run");
   auto where_field = document->get_field("albums", "name");
-  const Gnome::Gda::SqlExpr where_clause = 
+  const Gnome::Gda::SqlExpr where_clause =
     Glom::SqlUtils::build_simple_where_expression("albums", where_field, value);
-  
+
   Glom::SqlUtils::type_vecLayoutFields fieldsToGet;
   auto field = document->get_field("albums", "album_id");
   auto layoutitem = std::make_shared<Glom::LayoutItem_Field>();
@@ -80,7 +80,7 @@ int main()
   layoutitem->set_full_field_details(field);
   fieldsToGet.emplace_back(layoutitem);
 
-  const Glib::RefPtr<const Gnome::Gda::SqlBuilder> builder = 
+  const Glib::RefPtr<const Gnome::Gda::SqlBuilder> builder =
     Glom::SqlUtils::build_sql_select_with_where_clause("albums",
       fieldsToGet, where_clause);
   const auto query = Glom::SqlUtils::sqlbuilder_get_full_query(builder);
diff --git a/tests/test_selfhosting_new_empty.cc b/tests/test_selfhosting_new_empty.cc
index b6588a8..55e18fb 100644
--- a/tests/test_selfhosting_new_empty.cc
+++ b/tests/test_selfhosting_new_empty.cc
@@ -34,7 +34,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     std::cerr << G_STRFUNC << ": test_create_and_selfhost_new_database() failed\n";
     return false;
   }
-  
+
   //Test some simple changes to the database:
   try
   {
diff --git a/tests/test_selfhosting_new_empty_change_sysprefs.cc 
b/tests/test_selfhosting_new_empty_change_sysprefs.cc
index f7da230..fe376d0 100644
--- a/tests/test_selfhosting_new_empty_change_sysprefs.cc
+++ b/tests/test_selfhosting_new_empty_change_sysprefs.cc
@@ -34,7 +34,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     std::cerr << G_STRFUNC << ": test_create_and_selfhost_new_database() failed\n";
     return false;
   }
-  
+
   //Test some simple changes to the database:
   try
   {
@@ -48,7 +48,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     prefs_in.m_org_address_country = "test country";
     Glom::DbUtils::set_database_preferences(document, prefs_in);
 
-    const auto prefs_out = 
+    const auto prefs_out =
       Glom::DbUtils::get_database_preferences(document);
     if(prefs_out != prefs_in)
     {
diff --git a/tests/test_selfhosting_new_empty_then_users.cc b/tests/test_selfhosting_new_empty_then_users.cc
index 9492bc7..5f16974 100644
--- a/tests/test_selfhosting_new_empty_then_users.cc
+++ b/tests/test_selfhosting_new_empty_then_users.cc
@@ -268,12 +268,12 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   }
 
   //Test get_table_privileges().
- 
+
 
 
   test_selfhosting_cleanup(false /* do not delete the file. */);
 
-  return true; 
+  return true;
 }
 
 int main()
diff --git a/tests/test_selfhosting_new_from_example.cc b/tests/test_selfhosting_new_from_example.cc
index 73b08c1..6260099 100644
--- a/tests/test_selfhosting_new_from_example.cc
+++ b/tests/test_selfhosting_new_from_example.cc
@@ -29,14 +29,14 @@
 static bool test(Glom::Document::HostingMode hosting_mode)
 {
   auto document = std::make_shared<Glom::Document>();
-  const bool recreated = 
+  const bool recreated =
     test_create_and_selfhost_from_example("example_music_collection.glom", document, hosting_mode);
   if(!recreated)
   {
     std::cerr << G_STRFUNC << ": Recreation failed.\n";
     return false;
   }
-  
+
   if(!test_example_musiccollection_data(document))
   {
     std::cerr << G_STRFUNC << ": test_example_musiccollection_data() failed.\n";
@@ -57,7 +57,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   //TODO: We should store this only in the document anyway,
   //and make it translatable:
   /* TODO: This is not stored in the examples. Should it be?
-  const auto prefs = 
+  const auto prefs =
     Glom::DbUtils::get_database_preferences(document);
   g_return_val_if_fail(prefs.m_name == "Music Collection", false);
   g_return_val_if_fail(prefs.m_org_name == "SomeOrganization Incorporated", false);
@@ -70,19 +70,19 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   */
 
   test_selfhosting_cleanup();
- 
-  return true; 
+
+  return true;
 }
 
 int main()
 {
   Glom::libglom_init();
 
-  //We run this test in several locales via 
+  //We run this test in several locales via
   //test_selfhosting_new_from_example_in_locales.sh,
   //so we do this so the locale will really be used:
   setlocale(LC_ALL, "");
-  
+
   const auto result = test_all_hosting_modes(sigc::ptr_fun(&test));
 
   Glom::libglom_deinit();
diff --git a/tests/test_selfhosting_new_from_example_defaultvalues.cc 
b/tests/test_selfhosting_new_from_example_defaultvalues.cc
index 7480b49..c79aea7 100644
--- a/tests/test_selfhosting_new_from_example_defaultvalues.cc
+++ b/tests/test_selfhosting_new_from_example_defaultvalues.cc
@@ -29,7 +29,7 @@
 static bool test(Glom::Document::HostingMode hosting_mode)
 {
   auto document = std::make_shared<Glom::Document>();
-  const bool recreated = 
+  const bool recreated =
     test_create_and_selfhost_from_example("example_smallbusiness.glom", document, hosting_mode);
   if(!recreated)
   {
@@ -100,19 +100,19 @@ static bool test(Glom::Document::HostingMode hosting_mode)
 
 
   test_selfhosting_cleanup();
- 
-  return true; 
+
+  return true;
 }
 
 int main()
 {
   Glom::libglom_init();
 
-  //We run this test in several locales via 
+  //We run this test in several locales via
   //test_selfhosting_new_from_example_in_locales.sh,
   //so we do this so the locale will really be used:
   setlocale(LC_ALL, "");
-  
+
   const auto result = test_all_hosting_modes(sigc::ptr_fun(&test));
 
   Glom::libglom_deinit();
diff --git a/tests/test_selfhosting_new_from_example_float.cc 
b/tests/test_selfhosting_new_from_example_float.cc
index 8734353..ac2f7d3 100644
--- a/tests/test_selfhosting_new_from_example_float.cc
+++ b/tests/test_selfhosting_new_from_example_float.cc
@@ -33,14 +33,14 @@
 static bool test(Glom::Document::HostingMode hosting_mode)
 {
   auto document = std::make_shared<Glom::Document>();
-  const bool recreated = 
+  const bool recreated =
     test_create_and_selfhost_from_example("example_smallbusiness.glom", document, hosting_mode);
   if(!recreated)
   {
     std::cerr << G_STRFUNC << ": Recreation failed.\n";
     return false;
   }
-  
+
   const Glib::ustring table_name = "products";
   auto primary_key_field = document->get_field_primary_key(table_name);
   if(!primary_key_field)
@@ -51,23 +51,23 @@ static bool test(Glom::Document::HostingMode hosting_mode)
 
   //Check that some data is as expected:
   const auto pk_value = Gnome::Gda::Value::create_as_double(2.0l);
-  const Gnome::Gda::SqlExpr where_clause = 
+  const Gnome::Gda::SqlExpr where_clause =
     Glom::SqlUtils::build_simple_where_expression(table_name, primary_key_field, pk_value);
-  
+
   Glom::SqlUtils::type_vecLayoutFields fieldsToGet;
   auto field = document->get_field(table_name, "price");
   auto layoutitem = std::make_shared<Glom::LayoutItem_Field>();
   layoutitem->set_full_field_details(field);
   fieldsToGet.emplace_back(layoutitem);
 
-  const Glib::RefPtr<const Gnome::Gda::SqlBuilder> builder = 
+  const Glib::RefPtr<const Gnome::Gda::SqlBuilder> builder =
     Glom::SqlUtils::build_sql_select_with_where_clause(table_name,
       fieldsToGet, where_clause);
-  const Glib::RefPtr<const Gnome::Gda::DataModel> data_model = 
+  const Glib::RefPtr<const Gnome::Gda::DataModel> data_model =
     Glom::DbUtils::query_execute_select(builder);
   if(!test_model_expected_size(data_model, 1, 1))
   {
-    std::cerr << G_STRFUNC << "Failure: Unexpected data model size with query: " << 
+    std::cerr << G_STRFUNC << "Failure: Unexpected data model size with query: " <<
       Glom::SqlUtils::sqlbuilder_get_full_query(builder) << std::endl;
     return false;
   }
@@ -85,7 +85,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
 
   if(!test_check_numeric_value_type(hosting_mode, value))
   {
-    std::cerr << G_STRFUNC << ": Failure: The value has an unexpected type: " << 
+    std::cerr << G_STRFUNC << ": Failure: The value has an unexpected type: " <<
       g_type_name(value.get_value_type()) << std::endl;
     return false;
   }
@@ -100,13 +100,13 @@ static bool test(Glom::Document::HostingMode hosting_mode)
 
   test_selfhosting_cleanup();
 
-  return true; 
+  return true;
 }
 
 int main()
 {
   Glom::libglom_init();
-  
+
   const auto result = test_all_hosting_modes(sigc::ptr_fun(&test));
 
   Glom::libglom_deinit();
diff --git a/tests/test_selfhosting_new_from_example_operator.cc 
b/tests/test_selfhosting_new_from_example_operator.cc
index c15a2a5..6290f53 100644
--- a/tests/test_selfhosting_new_from_example_operator.cc
+++ b/tests/test_selfhosting_new_from_example_operator.cc
@@ -53,7 +53,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   //Create and self-host the document:
   {
     auto document = std::make_shared<Glom::Document>();
-    const bool recreated = 
+    const bool recreated =
       test_create_and_selfhost_from_example("example_smallbusiness.glom", document, hosting_mode);
     if(!recreated)
     {
@@ -77,7 +77,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
 
     //Add an operator user:
     const Glib::ustring operator_group_name = "personnel_department";
-    const auto group_list = 
+    const auto group_list =
       Glom::Privs::get_database_groups();
     if(!contains(group_list, operator_group_name))
     {
@@ -93,7 +93,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     }
 
     //Check that the developer user has access to database metadata:
-    const auto tables = 
+    const auto tables =
       Glom::DbUtils::get_table_names_from_database(true /* ignore system tables */);
     if(tables.empty())
     {
@@ -103,7 +103,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
 
     test_selfhosting_cleanup(false /* do not delete the file. */);
   }
-  
+
   //Self-host the document again, this time as operator:
   {
     auto document = std::make_shared<Glom::Document>();
@@ -142,7 +142,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
 
     //std::cout << "field_types count=" << field_types->get_types_count() << std::endl;
 
-    const auto tables = 
+    const auto tables =
       Glom::DbUtils::get_table_names_from_database(true /* ignore system tables */);
     if(tables.empty())
     {
@@ -159,8 +159,8 @@ static bool test(Glom::Document::HostingMode hosting_mode)
 
     test_selfhosting_cleanup(); //Delete the file this time.
   }
- 
-  return true; 
+
+  return true;
 }
 
 int main()
diff --git a/tests/test_selfhosting_new_from_example_strangepath.cc 
b/tests/test_selfhosting_new_from_example_strangepath.cc
index 7ed63f1..42efd9e 100644
--- a/tests/test_selfhosting_new_from_example_strangepath.cc
+++ b/tests/test_selfhosting_new_from_example_strangepath.cc
@@ -39,9 +39,9 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   //Note: We avoid using a path that is longer than 107 characters to avoid a PostgreSQL error.
   //(107 == sizeof(struct sockaddr_un.sun_path) at least here). murrayc.
   //See http://lists.debian.org/debian-wb-team/2013/05/msg00015.html
-  //TODO: Fail with long paths meaningfully in the libglom API too, and check for that? 
-  const bool recreated = 
-    test_create_and_selfhost_from_example("example_music_collection.glom", document, 
+  //TODO: Fail with long paths meaningfully in the libglom API too, and check for that?
+  const bool recreated =
+    test_create_and_selfhost_from_example("example_music_collection.glom", document,
       hosting_mode, "path w space and \" and ' and $ and / and \\ ");
       //hosting_mode, "path with space and \" quote and single ' quote and $ dollar sign and / forward slash 
and \\ backwards slash ");
   if(!recreated)
@@ -49,7 +49,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     std::cerr << G_STRFUNC << ": Recreation failed.\n";
     return false;
   }
-  
+
   if(!test_example_musiccollection_data(document))
   {
     std::cerr << G_STRFUNC << ": test_example_musiccollection_data() failed.\n";
@@ -67,8 +67,8 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   }
 
   test_selfhosting_cleanup();
- 
-  return true; 
+
+  return true;
 }
 
 int main()
diff --git a/tests/test_selfhosting_new_from_example_table_name_with_space.cc 
b/tests/test_selfhosting_new_from_example_table_name_with_space.cc
index 08b3179..4656b22 100644
--- a/tests/test_selfhosting_new_from_example_table_name_with_space.cc
+++ b/tests/test_selfhosting_new_from_example_table_name_with_space.cc
@@ -30,14 +30,14 @@
 static bool test(Glom::Document::HostingMode hosting_mode)
 {
   auto document = std::make_shared<Glom::Document>();
-  const bool recreated = 
+  const bool recreated =
     test_create_and_selfhost_from_test_example("test_example_music_collection_table_name_with_space.glom", 
document, hosting_mode);
   if(!recreated)
   {
     std::cerr << G_STRFUNC << ": Recreation failed.\n";
     return false;
   }
-  
+
   if(!test_example_musiccollection_data(document))
   {
     std::cerr << G_STRFUNC << ": test_example_musiccollection_data() failed.\n";
@@ -55,19 +55,19 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   }
 
   test_selfhosting_cleanup();
- 
-  return true; 
+
+  return true;
 }
 
 int main()
 {
   Glom::libglom_init();
 
-  //We run this test in several locales via 
+  //We run this test in several locales via
   //test_selfhosting_new_from_example_in_locales.sh,
   //so we do this so the locale will really be used:
   setlocale(LC_ALL, "");
-  
+
   const auto result = test_all_hosting_modes(sigc::ptr_fun(&test));
 
   Glom::libglom_deinit();
diff --git a/tests/test_selfhosting_new_then_alter_table.cc b/tests/test_selfhosting_new_then_alter_table.cc
index 7fd5343..4e7afdd 100644
--- a/tests/test_selfhosting_new_then_alter_table.cc
+++ b/tests/test_selfhosting_new_then_alter_table.cc
@@ -33,14 +33,14 @@
 static bool do_test(Glom::Document::HostingMode hosting_mode, const Glib::ustring& first_table_name, const 
Glib::ustring& renamed_table_name)
 {
   auto document = std::make_shared<Glom::Document>();
-  const bool recreated = 
+  const bool recreated =
     test_create_and_selfhost_from_example("example_smallbusiness.glom", document, hosting_mode);
   if(!recreated)
   {
     std::cerr << G_STRFUNC << ": Recreation failed.\n";
     return false;
   }
-  
+
   if(!Glom::DbUtils::create_table_with_default_fields(document, first_table_name))
   {
     std::cerr << G_STRFUNC << ": Failure: create_table_with_default_fields() failed.\n";
@@ -66,8 +66,8 @@ static bool do_test(Glom::Document::HostingMode hosting_mode, const Glib::ustrin
   }
 
   test_selfhosting_cleanup();
- 
-  return true; 
+
+  return true;
 }
 
 static bool test(Glom::Document::HostingMode hosting_mode)
@@ -93,7 +93,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
 int main()
 {
   Glom::libglom_init();
-  
+
   const auto result = test_all_hosting_modes(sigc::ptr_fun(&test));
 
   Glom::libglom_deinit();
diff --git a/tests/test_selfhosting_new_then_backup_restore.cc 
b/tests/test_selfhosting_new_then_backup_restore.cc
index d8a8a2e..d96f8eb 100644
--- a/tests/test_selfhosting_new_then_backup_restore.cc
+++ b/tests/test_selfhosting_new_then_backup_restore.cc
@@ -19,7 +19,7 @@
  */
 
 #include "tests/test_selfhosting_utils.h"
-#include <libglom/init.h> 
+#include <libglom/init.h>
 #include <libglom/file_utils.h>
 #include <glib.h> //For g_assert()
 #include <iostream>
@@ -39,7 +39,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   Glib::ustring backup_uri_tarball;
   {
     auto document = std::make_shared<Glom::Document>();
-    const bool recreated = 
+    const bool recreated =
       test_create_and_selfhost_from_example("example_music_collection.glom", document, hosting_mode);
     if(!recreated)
     {
@@ -59,11 +59,11 @@ static bool test(Glom::Document::HostingMode hosting_mode)
 
     test_selfhosting_cleanup();
   }
-  
+
   //Create a new document from the backup:
   {
     std::string backup_data_file_path;
-    const Glib::ustring backup_glom_file_contents = 
+    const Glib::ustring backup_glom_file_contents =
       Glom::Document::extract_backup_file(
         backup_uri_tarball,
         backup_data_file_path,
@@ -73,11 +73,11 @@ static bool test(Glom::Document::HostingMode hosting_mode)
       std::cerr << G_STRFUNC << ": Extraction from the backup file failed.\n";
       return false;
     }
-    
+
     //Create a document from the backup:
     //std::cout << "debug: recreated_uri=" << recreated_uri << std::endl;
     auto document = std::make_shared<Glom::Document>();
-    const bool recreated = 
+    const bool recreated =
       test_create_and_selfhost_from_data(backup_glom_file_contents, document, hosting_mode);
     if(!recreated)
     {
@@ -94,7 +94,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
       return false;
     }
     */
-  
+
     test_selfhosting_cleanup();
   }
 
@@ -111,7 +111,7 @@ int main()
     test_selfhosting_cleanup();
     return EXIT_FAILURE;
   }
-  
+
   /* TODO: Make this work with sqlite too:
   if(!test(Glom::Document::HostingMode::SQLITE))
   {
diff --git a/tests/test_selfhosting_new_then_change_columns.cc 
b/tests/test_selfhosting_new_then_change_columns.cc
index 19eab7e..118ae13 100644
--- a/tests/test_selfhosting_new_then_change_columns.cc
+++ b/tests/test_selfhosting_new_then_change_columns.cc
@@ -35,14 +35,14 @@
 static bool test(Glom::Document::HostingMode hosting_mode)
 {
   auto document = std::make_shared<Glom::Document>();
-  const bool recreated = 
+  const bool recreated =
     test_create_and_selfhost_from_example("example_smallbusiness.glom", document, hosting_mode);
   if(!recreated)
   {
     std::cerr << G_STRFUNC << ": Recreation failed.\n";
     return false;
   }
-  
+
   const Glib::ustring table_name = "contacts";
   const Glib::ustring field_name_original = "date_of_birth";
   auto field_original = document->get_field(table_name, field_name_original);
@@ -80,7 +80,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     }
   }
   catch(const Glib::Error& ex)
-  { 
+  {
     std::cerr << G_STRFUNC << ": Failure: change_column() threw an exception: " << ex.what() << std::endl;
     return false;
   }
@@ -98,7 +98,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     }
   }
   catch(const Glib::Error& ex)
-  { 
+  {
     std::cerr << G_STRFUNC << ": Failure: change_column() threw an exception: " << ex.what() << std::endl;
     return false;
   }
@@ -116,7 +116,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     }
   }
   catch(const Glib::Error& ex)
-  { 
+  {
     std::cerr << G_STRFUNC << ": Failure: change_column() threw an exception: " << ex.what() << std::endl;
     return false;
   }
@@ -134,7 +134,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     }
   }
   catch(const Glib::Error& ex)
-  { 
+  {
     std::cerr << G_STRFUNC << ": Failure: change_column() threw an exception: " << ex.what() << std::endl;
     return false;
   }
@@ -142,7 +142,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   //Check that the auto-increment works:
   //Actually checking for a 0 here is not very useful,
   //but at least we are running some of the relevant code:
-  const Gnome::Gda::Value value_next = 
+  const Gnome::Gda::Value value_next =
     Glom::DbUtils::get_next_auto_increment_value(table_name, field_new->get_name());
   const auto value_next_as_double = Glom::Conversions::get_double_for_gda_value_numeric(value_next);
   if(value_next_as_double != 0)
@@ -151,7 +151,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     return false;
   }
 
-  
+
   //Add a field:
   try
   {
@@ -162,7 +162,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     auto field_info = field_numeric->get_field_info();
     field_info->set_g_type( Glom::Field::get_gda_type_for_glom_type(field_numeric->get_glom_type()) );
     field_numeric->set_field_info(field_info);
-    
+
     Gnome::Gda::Numeric numeric;
     numeric.set_double(123);
     field_numeric->set_default_value( Gnome::Gda::Value(numeric) );
@@ -175,25 +175,25 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     }
   }
   catch(const Glib::Error& ex)
-  { 
+  {
     std::cerr << G_STRFUNC << ": Failure: add_column() threw an exception: " << ex.what() << std::endl;
     return false;
   }
-  
+
 
   //Anything using this code would then update the Glom::Document,
   //for instance by calling Document::set_table_fields(),
   //but we are not testing that here.
 
   test_selfhosting_cleanup();
- 
-  return true; 
+
+  return true;
 }
 
 int main()
 {
   Glom::libglom_init();
-  
+
   const auto result = test_all_hosting_modes(sigc::ptr_fun(&test));
 
   Glom::libglom_deinit();
diff --git a/tests/test_selfhosting_new_then_choices.cc b/tests/test_selfhosting_new_then_choices.cc
index 0ed6f35..5f217b4 100644
--- a/tests/test_selfhosting_new_then_choices.cc
+++ b/tests/test_selfhosting_new_then_choices.cc
@@ -42,9 +42,9 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     std::cerr << G_STRFUNC << ": Recreation failed.\n";
     return false;
   }
-  
+
   const Glib::ustring table_name = "invoice_lines";
- 
+
   const auto field_with_choice =
     get_field_on_layout(document, table_name, table_name, "product_id");
   if(!field_with_choice)
@@ -60,7 +60,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     std::cerr << G_STRFUNC << ": Failure: There were an unexpected number of choices.\n";
     return false;
   }
-  
+
   const auto pair_values
     = *(values_with_second.begin());
   if(pair_values.second.size() != 1)
@@ -70,14 +70,14 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   }
 
   test_selfhosting_cleanup();
- 
-  return true; 
+
+  return true;
 }
 
 int main()
 {
   Glom::libglom_init();
-  
+
   const auto result = test_all_hosting_modes(sigc::ptr_fun(&test));
 
   Glom::libglom_deinit();
diff --git a/tests/test_selfhosting_new_then_get_privs.cc b/tests/test_selfhosting_new_then_get_privs.cc
index bb23d7f..ff5004f 100644
--- a/tests/test_selfhosting_new_then_get_privs.cc
+++ b/tests/test_selfhosting_new_then_get_privs.cc
@@ -27,14 +27,14 @@
 static bool test(Glom::Document::HostingMode hosting_mode)
 {
   auto document = std::make_shared<Glom::Document>();
-  const bool recreated = 
+  const bool recreated =
     test_create_and_selfhost_from_example("example_smallbusiness.glom", document, hosting_mode);
   if(!recreated)
   {
     std::cerr << G_STRFUNC << ": Recreation failed.\n";
     return false;
   }
-  
+
   const auto groups = Glom::Privs::get_database_groups();
   if(groups.empty())
   {
@@ -63,21 +63,21 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   }
 
   test_selfhosting_cleanup();
- 
-  return true; 
+
+  return true;
 }
 
 int main()
 {
   Glom::libglom_init();
-  
+
   if(!test(Glom::Document::HostingMode::POSTGRES_SELF))
   {
     std::cerr << G_STRFUNC << ": Failed with PostgreSQL\n";
     test_selfhosting_cleanup();
     return EXIT_FAILURE;
   }
-  
+
   /* SQLite does not have this feature:
   if(!test(Glom::Document::HostingMode::SQLITE))
   {
diff --git a/tests/test_selfhosting_new_then_image.cc b/tests/test_selfhosting_new_then_image.cc
index d3e9fc3..f70307a 100644
--- a/tests/test_selfhosting_new_then_image.cc
+++ b/tests/test_selfhosting_new_then_image.cc
@@ -35,14 +35,14 @@
 static bool test(Glom::Document::HostingMode hosting_mode)
 {
   auto document = std::make_shared<Glom::Document>();
-  const bool recreated = 
+  const bool recreated =
     test_create_and_selfhost_from_example("example_smallbusiness.glom", document, hosting_mode);
   if(!recreated)
   {
     std::cerr << G_STRFUNC << ": Recreation failed.\n";
     return false;
   }
-  
+
 
   //Where clause:
 
@@ -57,13 +57,13 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     return false;
   }
 
-  const Gnome::Gda::SqlExpr where_clause = 
+  const Gnome::Gda::SqlExpr where_clause =
     Glom::SqlUtils::build_simple_where_expression(table_name, key_field, Gnome::Gda::Value(1));
 
   //Set the value, from an image file:
   const auto value_set = get_value_for_image();
   g_assert(check_value_is_an_image(value_set));
-  const Glib::RefPtr<const Gnome::Gda::SqlBuilder> builder_set = 
+  const Glib::RefPtr<const Gnome::Gda::SqlBuilder> builder_set =
     Glom::SqlUtils::build_sql_update_with_where_clause(table_name,
       field, value_set, where_clause);
   const auto rows_affected = Glom::DbUtils::query_execute(builder_set);
@@ -80,10 +80,10 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   layoutitem->set_full_field_details(field);
   fieldsToGet.emplace_back(layoutitem);
 
-  const Glib::RefPtr<const Gnome::Gda::SqlBuilder> builder_get = 
+  const Glib::RefPtr<const Gnome::Gda::SqlBuilder> builder_get =
     Glom::SqlUtils::build_sql_select_with_where_clause(table_name,
       fieldsToGet, where_clause);
-  auto data_model = 
+  auto data_model =
     Glom::DbUtils::query_execute_select(builder_get);
   if(!test_model_expected_size(data_model, 1, 1))
   {
@@ -97,7 +97,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     std::cerr << G_STRFUNC << ": Failure: The COUNT query returned an unexpected value: " << count << 
std::endl;
     return false;
   }
-  
+
   const auto value_read = data_model->get_value_at(0, 0);
   const auto value_read_type = value_read.get_value_type();
   if( (value_read_type != GDA_TYPE_BINARY) &&
@@ -154,14 +154,14 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   }
 
   test_selfhosting_cleanup();
- 
-  return true; 
+
+  return true;
 }
 
 int main()
 {
   Glom::libglom_init();
-  
+
   const auto result = test_all_hosting_modes(sigc::ptr_fun(&test));
 
   Glom::libglom_deinit();
diff --git a/tests/test_selfhosting_new_then_lookup.cc b/tests/test_selfhosting_new_then_lookup.cc
index a7611be..4bd0b6f 100644
--- a/tests/test_selfhosting_new_then_lookup.cc
+++ b/tests/test_selfhosting_new_then_lookup.cc
@@ -67,14 +67,14 @@ static bool contains_field(const Glom::Document::type_list_lookups& container, c
 static bool test(Glom::Document::HostingMode hosting_mode)
 {
   auto document = std::make_shared<Glom::Document>();
-  const bool recreated = 
+  const bool recreated =
     test_create_and_selfhost_from_example("example_smallbusiness.glom", document, hosting_mode);
   if(!recreated)
   {
     std::cerr << G_STRFUNC << ": Recreation failed.\n";
     return false;
   }
-  
+
   const Glib::ustring table_name = "invoice_lines";
   auto primary_key_field = document->get_field_primary_key(table_name);
   if(!primary_key_field)
@@ -112,14 +112,14 @@ static bool test(Glom::Document::HostingMode hosting_mode)
 
   const Glib::ustring field_name = "product_price";
   std::shared_ptr<const Glom::Relationship> relationship;
-  const auto layout_field = 
+  const auto layout_field =
     get_lookup_field(lookups, table_name, field_name, relationship);
   if(!layout_field)
   {
     std::cerr << G_STRFUNC << ": Failure: The lookup field is empty.\n";
     return false;
   }
- 
+
   if(!relationship)
   {
     std::cerr << G_STRFUNC << ": Failure: The lookup relationship is empty.\n";
@@ -176,14 +176,14 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   }
 
   //Lookup the value from the related record.
-  const auto field_source = 
+  const auto field_source =
     document->get_field(relationship->get_to_table(), field->get_lookup_field());
-  const auto value = Glom::DbUtils::get_lookup_value(document, 
+  const auto value = Glom::DbUtils::get_lookup_value(document,
     table_name, relationship, field_source, Gnome::Gda::Value(2));
 
   if(!test_check_numeric_value_type(hosting_mode, value))
   {
-    std::cerr << G_STRFUNC << ": Failure: The value has an unexpected type: " << 
+    std::cerr << G_STRFUNC << ": Failure: The value has an unexpected type: " <<
       g_type_name(value.get_value_type()) << std::endl;
     return false;
   }
@@ -197,14 +197,14 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   }
 
   test_selfhosting_cleanup();
- 
-  return true; 
+
+  return true;
 }
 
 int main()
 {
   Glom::libglom_init();
-  
+
   const auto result = test_all_hosting_modes(sigc::ptr_fun(&test));
 
   Glom::libglom_deinit();
diff --git a/tests/test_selfhosting_new_then_report.cc b/tests/test_selfhosting_new_then_report.cc
index 8a75003..287d484 100644
--- a/tests/test_selfhosting_new_then_report.cc
+++ b/tests/test_selfhosting_new_then_report.cc
@@ -29,7 +29,7 @@
 static bool test(Glom::Document::HostingMode hosting_mode)
 {
   auto document = std::make_shared<Glom::Document>();
-  const bool recreated = 
+  const bool recreated =
     test_create_and_selfhost_from_example("example_music_collection.glom", document, hosting_mode);
   if(!recreated)
   {
@@ -37,7 +37,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     return false;
   }
 
-  const auto report_temp = 
+  const auto report_temp =
     Glom::ReportBuilder::create_standard_list_report(document, "albums");
 
   Glom::FoundSet found_set; //TODO: Test a where clause.
@@ -46,7 +46,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   const std::locale locale("en_US.UTF-8"); //Instead of just "" (current locale) so we get the same results 
each time.
   Glom::ReportBuilder report_builder(locale);
   report_builder.set_document(document);
-  const Glib::ustring html = 
+  const Glib::ustring html =
     report_builder.report_build(found_set, report_temp);
 
   if(html.empty())
@@ -62,14 +62,14 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   }
 
   test_selfhosting_cleanup();
-    
+
   return true;
 }
 
 int main()
 {
   Glom::libglom_init();
-  
+
   const auto result = test_all_hosting_modes(sigc::ptr_fun(&test));
 
   Glom::libglom_deinit();
diff --git a/tests/test_selfhosting_new_then_report_summary.cc 
b/tests/test_selfhosting_new_then_report_summary.cc
index 55b31ea..1fa94e8 100644
--- a/tests/test_selfhosting_new_then_report_summary.cc
+++ b/tests/test_selfhosting_new_then_report_summary.cc
@@ -29,7 +29,7 @@
 static bool test(Glom::Document::HostingMode hosting_mode)
 {
   auto document = std::make_shared<Glom::Document>();
-  const bool recreated = 
+  const bool recreated =
     test_create_and_selfhost_from_example("example_smallbusiness.glom", document, hosting_mode);
   if(!recreated)
   {
@@ -37,7 +37,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     return false;
   }
 
-  const auto report = 
+  const auto report =
     document->get_report("invoices", "by_customer");
   if(!report)
   {
@@ -51,7 +51,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   const std::locale locale("en_US.UTF-8"); //Instead of just "" (current locale) so we know what numeric 
representations to expect and check for.
   Glom::ReportBuilder report_builder(locale);
   report_builder.set_document(document);
-  const Glib::ustring html = 
+  const Glib::ustring html =
     report_builder.report_build(found_set, report);
 
   if(html.empty())
@@ -73,7 +73,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   }
 
   test_selfhosting_cleanup();
-    
+
   return true;
 }
 
@@ -92,7 +92,7 @@ int main()
     test_selfhosting_cleanup();
     return EXIT_FAILURE;
   }
-  
+
   if(!test(Glom::Document::HostingMode::SQLITE))
   {
     std::cerr << G_STRFUNC << ": Failed with SQLite\n";
diff --git a/tests/test_selfhosting_non_numeric_primary_keys.cc 
b/tests/test_selfhosting_non_numeric_primary_keys.cc
index 5c94ae9..1cb9548 100644
--- a/tests/test_selfhosting_non_numeric_primary_keys.cc
+++ b/tests/test_selfhosting_non_numeric_primary_keys.cc
@@ -29,14 +29,14 @@
 static bool test(Glom::Document::HostingMode hosting_mode)
 {
   auto document = std::make_shared<Glom::Document>();
-  const bool recreated = 
+  const bool recreated =
     test_create_and_selfhost_from_test_example("test_example_music_collection_text_pk_fields.glom", 
document, hosting_mode);
   if(!recreated)
   {
     std::cerr << G_STRFUNC << ": Recreation failed.\n";
     return false;
   }
-  
+
   if(!test_example_musiccollection_data(document))
   {
     std::cerr << G_STRFUNC << ": test_example_musiccollection_data() failed.\n";
@@ -57,7 +57,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   //TODO: We should store this only in the document anyway,
   //and make it translatable:
   /* TODO: This is not stored in the examples. Should it be?
-  const auto prefs = 
+  const auto prefs =
     Glom::DbUtils::get_database_preferences(document);
   g_return_val_if_fail(prefs.m_name == "Music Collection", false);
   g_return_val_if_fail(prefs.m_org_name == "SomeOrganization Incorporated", false);
@@ -70,15 +70,15 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   */
 
   test_selfhosting_cleanup();
- 
-  return true; 
+
+  return true;
 }
 
 int main()
 {
   Glom::libglom_init();
 
-  //We run this test in several locales via 
+  //We run this test in several locales via
   //test_selfhosting_new_from_example_in_locales.sh,
   //so we do this so the locale will really be used:
   setlocale(LC_ALL, "");
diff --git a/tests/test_selfhosting_sqlinjection.cc b/tests/test_selfhosting_sqlinjection.cc
index 8369902..e9d8351 100644
--- a/tests/test_selfhosting_sqlinjection.cc
+++ b/tests/test_selfhosting_sqlinjection.cc
@@ -34,9 +34,9 @@ static bool check_get_extra_rows(const Glib::ustring& quote_char)
   //Try to get more rows than intended:
   const Gnome::Gda::Value value("Born To Run" + quote_char + " OR " + quote_char + "x" + quote_char + "=" + 
quote_char + "x");
   auto where_field = document->get_field("albums", "name");
-  const Gnome::Gda::SqlExpr where_clause = 
+  const Gnome::Gda::SqlExpr where_clause =
     Glom::SqlUtils::build_simple_where_expression("albums", where_field, value);
-  
+
   Glom::SqlUtils::type_vecLayoutFields fieldsToGet;
   auto field = document->get_field("albums", "album_id");
   auto layoutitem = std::make_shared<Glom::LayoutItem_Field>();
@@ -47,10 +47,10 @@ static bool check_get_extra_rows(const Glib::ustring& quote_char)
   layoutitem->set_full_field_details(field);
   fieldsToGet.emplace_back(layoutitem);
 
-  const Glib::RefPtr<const Gnome::Gda::SqlBuilder> builder = 
+  const Glib::RefPtr<const Gnome::Gda::SqlBuilder> builder =
     Glom::SqlUtils::build_sql_select_with_where_clause("albums",
       fieldsToGet, where_clause);
-  auto data_model = 
+  auto data_model =
     Glom::DbUtils::query_execute_select(builder);
   if(!test_model_expected_size(data_model, 2, 0)) //No rows should be returned because the match value was 
stupid, if escaped properly.
   {
@@ -65,11 +65,11 @@ static bool check_drop_table(const Glib::ustring& quote_char)
 {
   //Try to drop the table in a second SQL statement:
   const Gnome::Gda::Value value("True Blue" + quote_char + "; DROP TABLE songs; --");
-  auto where_field = 
+  auto where_field =
     document->get_field("albums", "name");
-  const Gnome::Gda::SqlExpr where_clause = 
+  const Gnome::Gda::SqlExpr where_clause =
     Glom::SqlUtils::build_simple_where_expression("albums", where_field, value);
-  
+
   Glom::SqlUtils::type_vecLayoutFields fieldsToGet;
   auto field = document->get_field("albums", "album_id");
   auto layoutitem = std::make_shared<Glom::LayoutItem_Field>();
@@ -80,10 +80,10 @@ static bool check_drop_table(const Glib::ustring& quote_char)
   layoutitem->set_full_field_details(field);
   fieldsToGet.emplace_back(layoutitem);
 
-  const Glib::RefPtr<const Gnome::Gda::SqlBuilder> builder = 
+  const Glib::RefPtr<const Gnome::Gda::SqlBuilder> builder =
     Glom::SqlUtils::build_sql_select_with_where_clause("albums",
       fieldsToGet, where_clause);
-  auto data_model = 
+  auto data_model =
     Glom::DbUtils::query_execute_select(builder);
   if(!test_model_expected_size(data_model, 2, 0)) //No rows should be returned because the match value was 
stupid, if escaped properly.
   {
@@ -105,11 +105,11 @@ static bool check_avoid_quotes_and_drop_table_with_false_value_type()
   //Try to drop the table in a second SQL statement,
   //by using a text value for a field whose type should not need quoting:
   const Gnome::Gda::Value value("1;DROP TABLE songs");
-  auto where_field = 
+  auto where_field =
     document->get_field("albums", "album_id");
-  const Gnome::Gda::SqlExpr where_clause = 
+  const Gnome::Gda::SqlExpr where_clause =
     Glom::SqlUtils::build_simple_where_expression("albums", where_field, value);
-  
+
   Glom::SqlUtils::type_vecLayoutFields fieldsToGet;
   auto field = document->get_field("albums", "album_id");
   auto layoutitem = std::make_shared<Glom::LayoutItem_Field>();
@@ -120,12 +120,12 @@ static bool check_avoid_quotes_and_drop_table_with_false_value_type()
   layoutitem->set_full_field_details(field);
   fieldsToGet.emplace_back(layoutitem);
 
-  const Glib::RefPtr<const Gnome::Gda::SqlBuilder> builder = 
+  const Glib::RefPtr<const Gnome::Gda::SqlBuilder> builder =
     Glom::SqlUtils::build_sql_select_with_where_clause("albums",
       fieldsToGet, where_clause);
 
   std::cout << "This test expects some std::cerr output about exceptions now:\n";
-  
+
   //Glom::ConnectionPool::get_instance()->set_show_debug_output(true);
 
   bool result = false;
@@ -162,14 +162,14 @@ static bool check_avoid_quotes_and_drop_table_with_false_field_type()
   const Gnome::Gda::Value value("\"Born To Run\";DROP TABLE songs");
 
   //Specify a field with incorrect type information:
-  auto where_field = 
+  auto where_field =
     document->get_field("albums", "name");
   where_field->set_glom_type(Glom::Field::glom_field_type::NUMERIC);
-  //const GType gda_type = Glom::Field::get_gda_type_for_glom_type(Glom::TYPE_NUMERIC); 
+  //const GType gda_type = Glom::Field::get_gda_type_for_glom_type(Glom::TYPE_NUMERIC);
 
-  const Gnome::Gda::SqlExpr where_clause = 
+  const Gnome::Gda::SqlExpr where_clause =
     Glom::SqlUtils::build_simple_where_expression("albums", where_field, value);
- 
+
   Glom::SqlUtils::type_vecLayoutFields fieldsToGet;
   auto field = document->get_field("albums", "album_id");
   auto layoutitem = std::make_shared<Glom::LayoutItem_Field>();
@@ -180,7 +180,7 @@ static bool check_avoid_quotes_and_drop_table_with_false_field_type()
   layoutitem->set_full_field_details(field);
   fieldsToGet.emplace_back(layoutitem);
 
-  const Glib::RefPtr<const Gnome::Gda::SqlBuilder> builder = 
+  const Glib::RefPtr<const Gnome::Gda::SqlBuilder> builder =
     Glom::SqlUtils::build_sql_select_with_where_clause("albums",
       fieldsToGet, where_clause);
 
@@ -203,7 +203,7 @@ static bool check_avoid_quotes_and_drop_table_with_false_field_type()
 
 static bool test(Glom::Document::HostingMode hosting_mode)
 {
-  const bool recreated = 
+  const bool recreated =
     test_create_and_selfhost_from_example("example_music_collection.glom", document, hosting_mode);
   if(!recreated)
   {
@@ -216,7 +216,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     std::cerr << G_STRFUNC << ": Failure: check_get_extra_rows() failed.\n";
     return false;
   }
-  
+
   if(!check_get_extra_rows("'"))
   {
     std::cerr << G_STRFUNC << ": Failure: check_get_extra_rows() failed.\n";
@@ -228,7 +228,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
     std::cerr << G_STRFUNC << ": Failure: check_drop_table() failed.\n";
     return false;
   }
-  
+
   if(!check_drop_table("'"))
   {
     std::cerr << G_STRFUNC << ": Failure: check_drop_table() failed.\n";
diff --git a/tests/test_selfhosting_utils.cc b/tests/test_selfhosting_utils.cc
index 1c20a64..89df33c 100644
--- a/tests/test_selfhosting_utils.cc
+++ b/tests/test_selfhosting_utils.cc
@@ -70,7 +70,7 @@ static bool check_directory_exists()
     std::cerr << G_STRFUNC << ": temp_filepath_dir is empty.\n";
     return false;
   }
-  
+
   auto file = Gio::File::create_for_path(temp_filepath_dir);
   return file->query_exists();
 }
@@ -133,7 +133,7 @@ void test_selfhosting_cleanup(bool delete_file)
   if(!temp_filepath_dir.empty())
   {
     Glib::ustring uri;
-    
+
     try
     {
       uri = Glib::filename_to_uri(temp_filepath_dir);
@@ -146,7 +146,7 @@ void test_selfhosting_cleanup(bool delete_file)
     if(!uri.empty())
       delete_directory(uri);
   }
-  
+
   temp_filepath_dir.clear();
   temp_file_uri.clear(); //Forget this too.
 }
@@ -186,7 +186,7 @@ bool test_create_and_selfhost_new_empty(const std::shared_ptr<Glom::Document>& d
   //Save a copy, specifying the path to file in a directory:
   //For instance, /tmp/testglom/testglom.glom");
   const std::string temp_filename = "testglom";
-  temp_filepath_dir = 
+  temp_filepath_dir =
     Glom::FileUtils::get_temp_directory_path(temp_filename);
   if(!subdirectory_path.empty())
     temp_filepath_dir = Glib::build_filename(temp_filepath_dir, subdirectory_path);
@@ -223,7 +223,7 @@ bool test_create_and_selfhost_new_empty(const std::shared_ptr<Glom::Document>& d
   const auto initialized_errors =
     connection_pool->initialize( sigc::ptr_fun(&on_initialize_progress) );
   g_assert(initialized_errors == Glom::ConnectionPool::Backend::InitErrors::NONE);
-  
+
   if(!check_directory_exists())
   {
     std::cerr << G_STRFUNC << ": Failure: The data directory does not exist after calling initialize().\n";
@@ -245,7 +245,7 @@ bool test_create_and_selfhost_new_database(const std::shared_ptr<Glom::Document>
   {
     std::cerr << G_STRFUNC << ": test_create_and_selfhost_new_empty() failed.\n";
     return false;
-  } 
+  }
 
   const auto db_name = Glom::DbUtils::get_unused_database_name(database_name);
   if(db_name.empty())
@@ -262,7 +262,7 @@ bool test_create_and_selfhost_new_database(const std::shared_ptr<Glom::Document>
     std::cerr << G_STRFUNC << ": DbUtils::create_database() failed.\n";
     return false;
   }
-  
+
   return true;
 }
 
@@ -285,7 +285,7 @@ static bool test_create_and_selfhost_from_example_full_path(const std::string& e
 bool test_create_and_selfhost_from_example(const std::string& example_filename, const 
std::shared_ptr<Glom::Document>& document, Glom::Document::HostingMode hosting_mode, const std::string& 
subdirectory_path)
 {
   Glib::ustring uri;
-  
+
   // Get a URI for the example file:
   std::string path;
   try
@@ -306,7 +306,7 @@ bool test_create_and_selfhost_from_example(const std::string& example_filename,
 bool test_create_and_selfhost_from_test_example(const std::string& example_filename, const 
std::shared_ptr<Glom::Document>& document, Glom::Document::HostingMode hosting_mode)
 {
   Glib::ustring uri;
-  
+
   // Get a URI for the example file:
   std::string path;
   try
@@ -432,10 +432,10 @@ bool test_table_exists(const Glib::ustring& table_name, const std::shared_ptr<Gl
   layoutitem->set_full_field_details(field);
   fieldsToGet.emplace_back(layoutitem);
 
-  const Glib::RefPtr<const Gnome::Gda::SqlBuilder> builder = 
+  const Glib::RefPtr<const Gnome::Gda::SqlBuilder> builder =
     Glom::SqlUtils::build_sql_select_with_where_clause(table_name,
       fieldsToGet);
-  const Glib::RefPtr<const Gnome::Gda::DataModel> data_model = 
+  const Glib::RefPtr<const Gnome::Gda::DataModel> data_model =
     Glom::DbUtils::query_execute_select(builder);
   if(!data_model || !(data_model->get_n_columns()))
   {
@@ -491,15 +491,15 @@ static bool test_example_musiccollection_data_related(const std::shared_ptr<cons
 
   const Glib::RefPtr<const Gnome::Gda::SqlBuilder> builder =
     Glom::SqlUtils::build_sql_select_with_key("albums", fieldsToGet, field_album_id, album_id);
-  const Glib::RefPtr<const Gnome::Gda::DataModel> data_model = 
+  const Glib::RefPtr<const Gnome::Gda::DataModel> data_model =
     Glom::DbUtils::query_execute_select(builder);
   if(!test_model_expected_size(data_model, 3, 1))
   {
-    std::cerr << G_STRFUNC << ": Failure: Unexpected data model size with query: " << 
+    std::cerr << G_STRFUNC << ": Failure: Unexpected data model size with query: " <<
       Glom::SqlUtils::sqlbuilder_get_full_query(builder) << std::endl;
     return false;
   }
-  
+
   return true;
 }
 
@@ -510,12 +510,12 @@ bool test_example_musiccollection_data(const std::shared_ptr<const Glom::Documen
     std::cerr << G_STRFUNC << ": document is null\n";
     return false;
   }
-  
+
   //Check that some data is as expected:
   const Gnome::Gda::Value value("Born To Run");
-  const Gnome::Gda::SqlExpr where_clause = 
+  const Gnome::Gda::SqlExpr where_clause =
     Glom::SqlUtils::get_find_where_clause_quick(document, "albums", value);
-  
+
   Glom::SqlUtils::type_vecLayoutFields fieldsToGet;
   auto field = document->get_field("albums", "album_id");
   auto layoutitem = std::make_shared<Glom::LayoutItem_Field>();
@@ -532,14 +532,14 @@ bool test_example_musiccollection_data(const std::shared_ptr<const Glom::Documen
   layoutitem->set_full_field_details(field);
   fieldsToGet.emplace_back(layoutitem);
 
-  const Glib::RefPtr<const Gnome::Gda::SqlBuilder> builder = 
+  const Glib::RefPtr<const Gnome::Gda::SqlBuilder> builder =
     Glom::SqlUtils::build_sql_select_with_where_clause("albums",
       fieldsToGet, where_clause);
-  const Glib::RefPtr<const Gnome::Gda::DataModel> data_model = 
+  const Glib::RefPtr<const Gnome::Gda::DataModel> data_model =
     Glom::DbUtils::query_execute_select(builder);
   if(!test_model_expected_size(data_model, 2, 1))
   {
-    std::cerr << G_STRFUNC << "Failure: Unexpected data model size with query: " << 
+    std::cerr << G_STRFUNC << "Failure: Unexpected data model size with query: " <<
       Glom::SqlUtils::sqlbuilder_get_full_query(builder) << std::endl;
     return false;
   }
diff --git a/tests/test_utils.cc b/tests/test_utils.cc
index 8f7d04f..e8c33bd 100644
--- a/tests/test_utils.cc
+++ b/tests/test_utils.cc
@@ -29,7 +29,7 @@ std::shared_ptr<const Glom::LayoutItem_Field> get_field_on_layout(const std::sha
   {
     if(!group)
       continue;
-    
+
     for(const auto& layout_item : group->get_items_recursive())
     {
       const auto layout_item_field =
@@ -44,7 +44,7 @@ std::shared_ptr<const Glom::LayoutItem_Field> get_field_on_layout(const std::sha
       }
     }
   }
-  
+
   return std::shared_ptr<const Glom::LayoutItem_Field>();
 }
 
diff --git a/tests/test_utils_images.cc b/tests/test_utils_images.cc
index d5e13d9..126031a 100644
--- a/tests/test_utils_images.cc
+++ b/tests/test_utils_images.cc
@@ -34,7 +34,7 @@ bool check_value_is_an_image(const Gnome::Gda::Value& value)
   //Check that it can be interpreted as an image:
   //Luckily, the use of GdkPixbufLoader here does not seem to require an X display.
   Gdk::wrap_init();
-  Glib::RefPtr<Gdk::PixbufLoader> refPixbufLoader;      
+  Glib::RefPtr<Gdk::PixbufLoader> refPixbufLoader;
   try
   {
     refPixbufLoader = Gdk::PixbufLoader::create();
diff --git a/tests/translations_po/test_document_export_po.cc 
b/tests/translations_po/test_document_export_po.cc
index f225823..ea16ecb 100644
--- a/tests/translations_po/test_document_export_po.cc
+++ b/tests/translations_po/test_document_export_po.cc
@@ -38,7 +38,7 @@ static bool check_po_file(const std::string& filepath)
   if(filepath.empty())
     return false;
 
-  //We could use the gettext-po po_file_check_all() function to check 
+  //We could use the gettext-po po_file_check_all() function to check
   //the file, but the gettext-po error handling is very awkward,
   //so let's keep it simple:
   int return_status = EXIT_FAILURE;
@@ -46,7 +46,7 @@ static bool check_po_file(const std::string& filepath)
   const auto command = Glib::ustring::compose(GLOM_MSGFMT " %1",
     Glib::shell_quote(filepath));
   try
-  {    
+  {
     Glib::spawn_command_line_sync(command, &stdout_output, 0, &return_status);
     //std::cout << " debug: output=" << stdout_output << std::endl;
   }
@@ -110,7 +110,7 @@ int main()
   //std::cout << "po file URI: " << po_file_uri << std::endl;
 
   const Glib::ustring locale = "de";
-  const bool success = 
+  const bool success =
     Glom::write_translations_to_po_file(document, po_file_uri, locale);
   if(!success)
   {
@@ -145,7 +145,7 @@ int main()
   bool text_found =
     (data.find("Stabliste") != std::string::npos);
   g_assert(text_found);
-  
+
   text_found =
     (data.find("\u00DCbersicht") != std::string::npos);
   g_assert(text_found);
diff --git a/tests/translations_po/test_document_import_po.cc 
b/tests/translations_po/test_document_import_po.cc
index ad90a76..dcaa779 100644
--- a/tests/translations_po/test_document_import_po.cc
+++ b/tests/translations_po/test_document_import_po.cc
@@ -28,7 +28,7 @@
 
 #include <iostream>
 
- 
+
 int main()
 {
   Glom::libglom_init();
@@ -66,7 +66,7 @@ int main()
   }
 
   document->set_allow_autosave(false); //Do not save changes back to the example file:
-  
+
   Glib::ustring po_file_uri;
   try
   {
@@ -90,7 +90,7 @@ int main()
   //std::cout << "po file URI: " << po_file_uri << std::endl;
 
   const Glib::ustring locale = "de";
-  const bool success = 
+  const bool success =
     Glom::import_translations_from_po_file(document, po_file_uri, locale);
   if(!success)
   {
diff --git a/tests/ui/glade_toplevels_instantiation.cc b/tests/ui/glade_toplevels_instantiation.cc
index 478c736..3b89c53 100644
--- a/tests/ui/glade_toplevels_instantiation.cc
+++ b/tests/ui/glade_toplevels_instantiation.cc
@@ -90,7 +90,7 @@ static bool attempt_instantiation(const std::string& filepath, const xmlpp::Elem
 
 int main(int argc, char* argv[])
 {
-  auto app = 
+  auto app =
     Gtk::Application::create(argc, argv, "org.glom.test_glade_toplevels_instantiation");
   Gsv::init(); //Our .glade files contain gtksourceview widgets too.
 
diff --git a/tests/ui/test_glade_derived_instantiation.cc b/tests/ui/test_glade_derived_instantiation.cc
index 1062a3a..e690004 100644
--- a/tests/ui/test_glade_derived_instantiation.cc
+++ b/tests/ui/test_glade_derived_instantiation.cc
@@ -17,7 +17,7 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  */
- 
+
 #include <glom/glade_utils.h>
 #include <glom/appwindow.h>
 #include <glom/dialog_existing_or_new.h>
@@ -90,7 +90,7 @@ bool instantiate_widget()
     exit(EXIT_FAILURE); //Make sure that our test case fails.
     return false;
   }
-  
+
   //Also check that it is not too big for our target minimum screen size.
   //Note that this is not testing all .glade files, or all windows (some not using glade),
   //and doesn't even reliably check all uses of .glade files,
@@ -105,20 +105,20 @@ bool instantiate_widget()
     dialog->set_transient_for(*parent_window);
     parent_window->show();
   }
-   
+
   widget->show();
   const auto allocation = widget->get_allocation();
- 
+
   if( (allocation.get_height() > GLOM_MAX_WINDOW_HEIGHT) ||
     (allocation.get_width() > GLOM_MAX_WINDOW_WIDTH))
   {
     std::cerr << G_STRFUNC << ": Test: The window/widget is too big: " << T_Widget::glade_id << std::endl;
-    std::cerr << G_STRFUNC << ":   height=" << allocation.get_height() << std::endl; 
+    std::cerr << G_STRFUNC << ":   height=" << allocation.get_height() << std::endl;
     std::cerr << G_STRFUNC << ":   width=" << allocation.get_width() << std::endl;
-    std::cerr << G_STRFUNC << ":   (Ignored, though it should be fixed.)\n"; 
+    std::cerr << G_STRFUNC << ":   (Ignored, though it should be fixed.)\n";
     //TODO: Uncomment this when all the windows are small enough: exit(EXIT_FAILURE); //Make sure that our 
test case fails.
   }
-  
+
   delete widget;
 
   if(parent_window)
@@ -129,7 +129,7 @@ bool instantiate_widget()
 
 int main(int argc, char *argv[])
 {
-  auto app = 
+  auto app =
     Gtk::Application::create(argc, argv, "org.glom.test_glade_derived_instantiation");
   Gsv::init(); //Our .glade files contain gtksourceview widgets too.
 
diff --git a/tests/ui/test_imageglom_widget.cc b/tests/ui/test_imageglom_widget.cc
index 462c414..1d50ad0 100644
--- a/tests/ui/test_imageglom_widget.cc
+++ b/tests/ui/test_imageglom_widget.cc
@@ -90,17 +90,17 @@ void test_changing_from_jpg_to_pdf_to_jpg()
 
 int main(int argc, char *argv[])
 {
-  auto app = 
+  auto app =
     Gtk::Application::create(argc, argv, "org.glom.test_glade_derived_instantiation");
 
   test_use_jpg();
   test_reset_same_jpg();
   test_changing_jpg();
-  
+
   test_use_pdf();
   test_reset_same_pdf();
   test_changing_pdf();
-  
+
   test_changing_from_jpg_to_pdf_to_jpg();
 
   return EXIT_SUCCESS;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]