mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
minor performance optimization
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8520 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
93b925a15c
commit
dc3ccd9e51
@ -1094,27 +1094,29 @@ gnc_book_write_to_xml_filehandle_v2(GNCBook *book, FILE *out)
|
|||||||
gboolean
|
gboolean
|
||||||
gnc_book_write_accounts_to_xml_filehandle_v2(Backend *be, GNCBook *book, FILE *out)
|
gnc_book_write_accounts_to_xml_filehandle_v2(Backend *be, GNCBook *book, FILE *out)
|
||||||
{
|
{
|
||||||
|
gnc_commodity_table *table;
|
||||||
AccountGroup *grp;
|
AccountGroup *grp;
|
||||||
|
int ncom, nacc;
|
||||||
sixtp_gdv2 *gd;
|
sixtp_gdv2 *gd;
|
||||||
|
|
||||||
if (!out) return FALSE;
|
if (!out) return FALSE;
|
||||||
|
|
||||||
grp = gnc_book_get_group(book);
|
grp = gnc_book_get_group(book);
|
||||||
|
nacc = 1 + xaccGroupGetNumSubAccounts(grp);
|
||||||
|
|
||||||
|
table = gnc_book_get_commodity_table(book);
|
||||||
|
ncom = gnc_commodity_table_get_size(table);
|
||||||
|
|
||||||
write_v2_header (out);
|
write_v2_header (out);
|
||||||
|
|
||||||
write_counts(out,
|
write_counts(out,
|
||||||
"commodity",
|
"commodity", ncom,
|
||||||
gnc_commodity_table_get_size(
|
"account", nacc,
|
||||||
gnc_book_get_commodity_table(book)),
|
|
||||||
"account",
|
|
||||||
1 + xaccGroupGetNumSubAccounts(grp),
|
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
gd = gnc_sixtp_gdv2_new(book, TRUE, file_rw_feedback, be->percentage);
|
gd = gnc_sixtp_gdv2_new(book, TRUE, file_rw_feedback, be->percentage);
|
||||||
gd->counter.commodities_total =
|
gd->counter.commodities_total = ncom;
|
||||||
gnc_commodity_table_get_size(gnc_book_get_commodity_table(book));
|
gd->counter.accounts_total = nacc;
|
||||||
gd->counter.accounts_total = 1 +
|
|
||||||
xaccGroupGetNumSubAccounts(grp);
|
|
||||||
|
|
||||||
write_commodities(out, book, gd);
|
write_commodities(out, book, gd);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user