From 3af93741269fef7048907ae81c24bacca5536251 Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Sat, 11 Feb 2023 11:17:44 +0100 Subject: [PATCH] GncTransPropType - use consistent naming A few freshly added values had a superfluous _ in the name --- .../csv-imp/gnc-imp-props-tx.cpp | 20 +++++++++---------- .../csv-imp/gnc-imp-props-tx.hpp | 4 ++-- .../import-export/csv-imp/gnc-import-tx.cpp | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp b/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp index 76cd8cad2a..652a3282d0 100644 --- a/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp +++ b/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp @@ -73,8 +73,8 @@ std::map gnc_csv_col_type_strs = { { GncTransPropType::REC_DATE, N_("Reconcile Date") }, { GncTransPropType::TACTION, N_("Transfer Action") }, { GncTransPropType::TACCOUNT, N_("Transfer Account") }, - { GncTransPropType::T_AMOUNT, N_("Transfer Amount") }, - { GncTransPropType::T_AMOUNT_NEG, N_("Transfer Amount (Negated)") }, + { GncTransPropType::TAMOUNT, N_("Transfer Amount") }, + { GncTransPropType::TAMOUNT_NEG, N_("Transfer Amount (Negated)") }, { GncTransPropType::TMEMO, N_("Transfer Memo") }, { GncTransPropType::TREC_STATE, N_("Transfer Reconciled") }, { GncTransPropType::TREC_DATE, N_("Transfer Reconcile Date") } @@ -89,8 +89,8 @@ std::vector twosplit_blacklist = { std::vector multisplit_blacklist = { GncTransPropType::TACTION, GncTransPropType::TACCOUNT, - GncTransPropType::T_AMOUNT, - GncTransPropType::T_AMOUNT_NEG, + GncTransPropType::TAMOUNT, + GncTransPropType::TAMOUNT_NEG, GncTransPropType::TMEMO, GncTransPropType::TREC_STATE, GncTransPropType::TREC_DATE @@ -99,8 +99,8 @@ std::vector multisplit_blacklist = { std::vector multi_col_props = { GncTransPropType::AMOUNT, GncTransPropType::AMOUNT_NEG, - GncTransPropType::T_AMOUNT, - GncTransPropType::T_AMOUNT_NEG + GncTransPropType::TAMOUNT, + GncTransPropType::TAMOUNT_NEG }; bool is_multi_col_prop (GncTransPropType prop) @@ -473,12 +473,12 @@ void GncPreSplit::set (GncTransPropType prop_type, const std::string& value) m_amount_neg = parse_monetary (value, m_currency_format); // Will throw if parsing fails break; - case GncTransPropType::T_AMOUNT: + case GncTransPropType::TAMOUNT: m_tamount = boost::none; m_tamount = parse_monetary (value, m_currency_format); // Will throw if parsing fails break; - case GncTransPropType::T_AMOUNT_NEG: + case GncTransPropType::TAMOUNT_NEG: m_tamount_neg = boost::none; m_tamount_neg = parse_monetary (value, m_currency_format); // Will throw if parsing fails break; @@ -577,14 +577,14 @@ void GncPreSplit::add (GncTransPropType prop_type, const std::string& value) m_amount_neg = num_val; break; - case GncTransPropType::T_AMOUNT: + case GncTransPropType::TAMOUNT: num_val = parse_monetary (value, m_currency_format); // Will throw if parsing fails if (m_tamount) num_val += *m_tamount; m_tamount = num_val; break; - case GncTransPropType::T_AMOUNT_NEG: + case GncTransPropType::TAMOUNT_NEG: num_val = parse_monetary (value, m_currency_format); // Will throw if parsing fails if (m_tamount_neg) num_val += *m_tamount_neg; diff --git a/gnucash/import-export/csv-imp/gnc-imp-props-tx.hpp b/gnucash/import-export/csv-imp/gnc-imp-props-tx.hpp index 4354a0846e..c916ef4ee3 100644 --- a/gnucash/import-export/csv-imp/gnc-imp-props-tx.hpp +++ b/gnucash/import-export/csv-imp/gnc-imp-props-tx.hpp @@ -67,8 +67,8 @@ enum class GncTransPropType { REC_DATE, TACTION, TACCOUNT, - T_AMOUNT, - T_AMOUNT_NEG, + TAMOUNT, + TAMOUNT_NEG, TMEMO, TREC_STATE, TREC_DATE, diff --git a/gnucash/import-export/csv-imp/gnc-import-tx.cpp b/gnucash/import-export/csv-imp/gnc-import-tx.cpp index 97b6522630..0708dfdc04 100644 --- a/gnucash/import-export/csv-imp/gnc-import-tx.cpp +++ b/gnucash/import-export/csv-imp/gnc-import-tx.cpp @@ -219,8 +219,8 @@ void GncTxImport::currency_format (int currency_format) std::vector commodities = { GncTransPropType::AMOUNT, GncTransPropType::AMOUNT_NEG, - GncTransPropType::T_AMOUNT, - GncTransPropType::T_AMOUNT_NEG, + GncTransPropType::TAMOUNT, + GncTransPropType::TAMOUNT_NEG, GncTransPropType::PRICE}; reset_formatted_column (commodities); }