зеркало из https://github.com/mozilla/gecko-dev.git
Bug 180057 CSV export should output field names as first record in the output. Address one of Neil's review comments that I missed on original checkin
This commit is contained in:
Родитель
72d904156f
Коммит
2f4e8c7348
|
@ -552,12 +552,12 @@ nsAddressBook::ExportDirectoryToDelimitedText(nsIAbDirectory *aDirectory, const
|
|||
nsXPIDLString columnName;
|
||||
|
||||
for (i = 0; i < EXPORT_ATTRIBUTES_TABLE_COUNT; i++) {
|
||||
if (EXPORT_ATTRIBUTES_TABLE[i].plainTextStringId != 0) {
|
||||
if (EXPORT_ATTRIBUTES_TABLE[i].plainTextStringID != 0) {
|
||||
|
||||
// We don't need to truncate the string here as getter_Copies will
|
||||
// do that for us.
|
||||
if (NS_FAILED(bundle->GetStringFromID(EXPORT_ATTRIBUTES_TABLE[i].plainTextStringId, getter_Copies(columnName))))
|
||||
columnName.AppendInt(EXPORT_ATTRIBUTES_TABLE[i].plainTextStringId);
|
||||
if (NS_FAILED(bundle->GetStringFromID(EXPORT_ATTRIBUTES_TABLE[i].plainTextStringID, getter_Copies(columnName))))
|
||||
columnName.AppendInt(EXPORT_ATTRIBUTES_TABLE[i].plainTextStringID);
|
||||
|
||||
importService->SystemStringFromUnicode(columnName.get(), revisedName);
|
||||
|
||||
|
@ -607,7 +607,7 @@ nsAddressBook::ExportDirectoryToDelimitedText(nsIAbDirectory *aDirectory, const
|
|||
nsCString valueCStr;
|
||||
|
||||
for (i = 0; i < EXPORT_ATTRIBUTES_TABLE_COUNT; i++) {
|
||||
if (EXPORT_ATTRIBUTES_TABLE[i].plainTextStringId != 0) {
|
||||
if (EXPORT_ATTRIBUTES_TABLE[i].plainTextStringID != 0) {
|
||||
rv = card->GetCardValue(EXPORT_ATTRIBUTES_TABLE[i].abColName, getter_Copies(value));
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ struct ExportAttributesTableStruct
|
|||
{
|
||||
const char* abColName;
|
||||
const char* ldapPropertyName;
|
||||
PRUint32 plainTextStringId;
|
||||
PRUint32 plainTextStringID;
|
||||
};
|
||||
|
||||
const extern ExportAttributesTableStruct EXPORT_ATTRIBUTES_TABLE[EXPORT_ATTRIBUTES_TABLE_COUNT];
|
||||
|
|
Загрузка…
Ссылка в новой задаче