Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 60087 Details for
Bug 94379
app-office/kmymoney2-0.7.1 - Fixed dependencies and patched csv-export
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to correct csv-export
0.7.1-csv-export.patch (text/plain), 5.90 KB, created by
lefou
on 2005-05-29 04:52:41 UTC
(
hide
)
Description:
patch to correct csv-export
Filename:
MIME Type:
Creator:
lefou
Created:
2005-05-29 04:52:41 UTC
Size:
5.90 KB
patch
obsolete
>--- kmymoney2-0.7.1.backup/kmymoney2/reports/querytable.cpp 2005-03-19 16:21:11.000000000 +0100 >+++ kmymoney2-0.7.1/kmymoney2/reports/querytable.cpp 2005-05-28 17:06:09.000000000 +0200 >@@ -40,6 +40,7 @@ > #include "reportdebug.h" > #include "querytable.h" > >+ > namespace reports { > > // this should be in mymoneysplit.h >@@ -752,6 +753,11 @@ > // MyMoneyMoney::signPosition savesignpos = MyMoneyMoney::negativeMonetarySignPosition(); > unsigned char savethsep = MyMoneyMoney::thousandSeparator(); > >+#ifndef CSV_SEPARATOR >+#define CSV_SEPARATOR "\t"; >+#endif >+ String g_csvSep = CSV_SEPARATOR; >+ > MyMoneyMoney grandtotal; > > result=""; >@@ -829,7 +835,7 @@ > if ( i18nName.isEmpty() ) > i18nName = *it_column; > result += "<th>" + i18nName + "</th>"; >- csv += i18nName + ","; >+ csv += i18nName + g_csvSep; > ++it_column; > } > >@@ -899,7 +905,7 @@ > "colspan=\"" + QString::number(columns.count()-1) + "\">"+ > i18n("Total")+" " + (*it_group).oldName() + "</td>" > "<td>" + subtotal_html + "</td></tr>\n"; >- csv += "\"" + i18n("Total") + " " + (*it_group).oldName() + "\"," + subtotal_csv + "\n"; >+ csv += "\"" + i18n("Total") + " " + (*it_group).oldName() + "\"" + g_csvSep + subtotal_csv + "\n"; > } > --it_group; > } >@@ -936,7 +942,7 @@ > > MyMoneyMoney::setThousandSeparator('\0'); > >- csv += MyMoneyMoney(data).formatMoney() + ","; >+ csv += MyMoneyMoney(data).formatMoney() + g_csvSep; > > MyMoneyMoney::setThousandSeparator(savethsep); > } >@@ -948,7 +954,7 @@ > > MyMoneyMoney::setThousandSeparator('\0'); > >- csv += (*it_row)["currency"] + " " + MyMoneyMoney(data).formatMoney() + ","; >+ csv += (*it_row)["currency"] + " " + MyMoneyMoney(data).formatMoney() + g_csvSep; > > MyMoneyMoney::setThousandSeparator(savethsep); > >@@ -964,7 +970,7 @@ > { > result += QString("<td class=\"left\">%1</td>") > .arg(data); >- csv += "\""+ data + "\","; >+ csv += "\""+ data + "\"" + g_csvSep; > } > ++it_column; > } >@@ -1001,7 +1007,7 @@ > "colspan=\"" + QString::number(columns.count()-1) + "\">"+ > i18n("Total")+" " + (*it_group).oldName() + "</td>" > "<td>" + subtotal_html + "</td></tr>\n"; >- csv += "\"" + i18n("Total") + " " + (*it_group).oldName() + "\"," + subtotal_csv + "\n"; >+ csv += "\"" + i18n("Total") + " " + (*it_group).oldName() + "\"" + g_csvSep + subtotal_csv + "\n"; > --it_group; > } > >@@ -1019,7 +1025,7 @@ > "colspan=\"" + QString::number(columns.count()-1) + "\">"+ > i18n("Grand Total") + "</td>" > "<td>" + grandtotal_html + "</td></tr>\n"; >- csv += "\"" + i18n("Grand Total") + "\"," + grandtotal_csv + "\n"; >+ csv += "\"" + i18n("Grand Total") + "\"" + g_csvSep + grandtotal_csv + "\n"; > } > result += "</table>\n"; > } >--- kmymoney2-0.7.1.backup/kmymoney2/reports/pivottable.cpp 2005-03-19 16:21:11.000000000 +0100 >+++ kmymoney2-0.7.1/kmymoney2/reports/pivottable.cpp 2005-05-28 17:06:08.000000000 +0200 >@@ -739,6 +739,11 @@ > { > DEBUG_ENTER(__PRETTY_FUNCTION__); > >+#ifndef CSV_SEPARATOR >+#define CSV_SEPARATOR "\t"; >+#endif >+ String g_csvSep = CSV_SEPARATOR; >+ > char saveseparator = MyMoneyMoney::thousandSeparator(); > MyMoneyMoney::setThousandSeparator('\0'); > >@@ -760,10 +765,10 @@ > > unsigned column = 1; > while ( column < m_numColumns ) >- result += QString(",%1").arg(QString(m_columnHeadings[column++])); >+ result += g_csvSep + QString("%1").arg(QString(m_columnHeadings[column++])); > > if ( m_config_f.isShowingRowTotals() ) >- result += QString(",%1").arg(i18n("Total")); >+ result += g_csvSep + QString("%1").arg(i18n("Total")); > > result += "\n"; > >@@ -804,10 +809,10 @@ > QString rowdata; > unsigned column = 1; > while ( column < m_numColumns ) >- rowdata += QString(",%1").arg(it_row.data()[column++].formatMoney()); >+ rowdata += g_csvSep + QString("%1").arg(it_row.data()[column++].formatMoney()); > > if ( m_config_f.isShowingRowTotals() ) >- rowdata += QString(",%1").arg((*it_row).m_total.formatMoney()); >+ rowdata += g_csvSep + QString("%1").arg((*it_row).m_total.formatMoney()); > > // > // Row Header >@@ -865,10 +870,10 @@ > { > unsigned column = 1; > while ( column < m_numColumns ) >- result += QString(",%1").arg((*it_innergroup).m_total[column++].formatMoney()); >+ result += g_csvSep + QString("%1").arg((*it_innergroup).m_total[column++].formatMoney()); > > if ( m_config_f.isShowingRowTotals() ) >- result += QString(",%1").arg((*it_innergroup).m_total.m_total.formatMoney()); >+ result += g_csvSep + QString("%1").arg((*it_innergroup).m_total.m_total.formatMoney()); > > result += "\n"; > } >@@ -886,10 +891,10 @@ > result += QString("%1 %2").arg(i18n("Total")).arg(it_outergroup.key()); > unsigned column = 1; > while ( column < m_numColumns ) >- result += QString(",%1").arg((*it_outergroup).m_total[column++].formatMoney()); >+ result += g_csvSep + QString("%1").arg((*it_outergroup).m_total[column++].formatMoney()); > > if ( m_config_f.isShowingRowTotals() ) >- result += QString(",%1").arg((*it_outergroup).m_total.m_total.formatMoney()); >+ result += g_csvSep + QString("%1").arg((*it_outergroup).m_total.m_total.formatMoney()); > > result += "\n"; > } >@@ -905,10 +910,10 @@ > result += i18n("Grand Total"); > unsigned totalcolumn = 1; > while ( totalcolumn < m_numColumns ) >- result += QString(",%1").arg(m_grid.m_total[totalcolumn++].formatMoney()); >+ result += g_csvSep + QString("%1").arg(m_grid.m_total[totalcolumn++].formatMoney()); > > if ( m_config_f.isShowingRowTotals() ) >- result += QString(",%1").arg(m_grid.m_total.m_total.formatMoney()); >+ result += g_csvSep + QString("%1").arg(m_grid.m_total.m_total.formatMoney()); > > result += "\n"; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 94379
:
60086
| 60087