mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[csv-export-helpers] move account_get_fullname_str to support file
This commit is contained in:
parent
e5349a8b36
commit
229efb52ed
@ -82,3 +82,12 @@ gnc_csv_add_line (std::ostream& ss, const StringVec& str_vec,
|
|||||||
|
|
||||||
return !ss.fail();
|
return !ss.fail();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string
|
||||||
|
account_get_fullname_str (Account *account)
|
||||||
|
{
|
||||||
|
auto name{gnc_account_get_full_name (account)};
|
||||||
|
auto rv{std::string(name)};
|
||||||
|
g_free (name);
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
@ -35,5 +35,7 @@ using StringVec = std::vector<std::string>;
|
|||||||
bool gnc_csv_add_line (std::ostream& ss, const StringVec& charsvec,
|
bool gnc_csv_add_line (std::ostream& ss, const StringVec& charsvec,
|
||||||
bool use_quotes, const char* sep);
|
bool use_quotes, const char* sep);
|
||||||
|
|
||||||
|
std::string account_get_fullname_str (Account*);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -83,15 +83,7 @@ static std::string
|
|||||||
get_account_name (Split *split, bool full)
|
get_account_name (Split *split, bool full)
|
||||||
{
|
{
|
||||||
auto account{xaccSplitGetAccount (split)};
|
auto account{xaccSplitGetAccount (split)};
|
||||||
if (full)
|
return full ? account_get_fullname_str (account) : xaccAccountGetName (account);
|
||||||
{
|
|
||||||
auto name{gnc_account_get_full_name (account)};
|
|
||||||
auto rv{std::string(name)};
|
|
||||||
g_free (name);
|
|
||||||
return rv;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return xaccAccountGetName (account);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number
|
// Number
|
||||||
|
@ -40,15 +40,6 @@
|
|||||||
/* This static indicates the debugging module that this .o belongs to. */
|
/* This static indicates the debugging module that this .o belongs to. */
|
||||||
static QofLogModule log_module = GNC_MOD_ASSISTANT;
|
static QofLogModule log_module = GNC_MOD_ASSISTANT;
|
||||||
|
|
||||||
static std::string
|
|
||||||
account_get_fullname_str (Account *account)
|
|
||||||
{
|
|
||||||
auto name{gnc_account_get_full_name (account)};
|
|
||||||
auto rv{std::string(name)};
|
|
||||||
g_free (name);
|
|
||||||
return rv;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*******************************************************
|
/*******************************************************
|
||||||
* csv_tree_export
|
* csv_tree_export
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user