diff --git a/src/import-export/csv-imp/gnc-tx-import.cpp b/src/import-export/csv-imp/gnc-tx-import.cpp index 87c788b560..ce9c5ef153 100644 --- a/src/import-export/csv-imp/gnc-tx-import.cpp +++ b/src/import-export/csv-imp/gnc-tx-import.cpp @@ -307,7 +307,8 @@ void GncTxImport::parse (bool guessColTypes) orig_lines.clear(); for (auto tokenized_line : tokenizer->get_tokens()) { - orig_lines.push_back (std::make_tuple (tokenized_line, std::string())); + orig_lines.push_back (std::make_tuple (tokenized_line, std::string(), + std::make_shared(), std::make_shared())); auto length = tokenized_line.size(); if (length > max_cols) max_cols = length; diff --git a/src/import-export/csv-imp/gnc-tx-import.hpp b/src/import-export/csv-imp/gnc-tx-import.hpp index a3d88be679..6f9aed4f29 100644 --- a/src/import-export/csv-imp/gnc-tx-import.hpp +++ b/src/import-export/csv-imp/gnc-tx-import.hpp @@ -39,6 +39,7 @@ extern "C" { #include #include #include +#include #include "gnc-tokenizer.hpp" @@ -93,8 +94,34 @@ extern const gchar* currency_format_user[]; extern const int num_date_formats; extern const gchar* date_format_user[]; -/** Tuple to hold a tokenized line of input and an optional error string */ -using parse_line_t = std::tuple; +struct GncPreTrans +{ + boost::optional m_date; + boost::optional m_num; + boost::optional m_desc; + boost::optional m_notes; +}; + +struct GncPreSplit +{ + boost::optional m_account; + boost::optional m_deposit; + boost::optional m_withdrawal; + boost::optional m_balance; + boost::optional m_memo; + boost::optional m_oaccount; + boost::optional m_omemo; +}; + +/** Tuple to hold + * - a tokenized line of input + * - an optional error string + * - a struct to hold user selected properties for a transaction + * - a struct to hold user selected properties for one or two splits in the above transaction */ +using parse_line_t = std::tuple, + std::shared_ptr>; /** The actual TxImport class * It's intended to use in the following sequence of actions: