Closed Bug 1139965 Opened 9 years ago Closed 9 years ago

Implement function to export addressbook in vCard format

Categories

(MailNews Core :: Address Book, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 39.0

People

(Reporter: neil, Assigned: neil)

Details

Attachments

(1 file)

We can import addressbooks in LDIF, CSV, TXT and VCF format. We can export addressbooks in LDIF, CSV and TXT, but VCF is missing.

This isn't quite the same as bug 924530 because that's for single cards.
Attached patch Proposed patchSplinter Review
Note that translateTo doesn't export all address card fields, only the ones on the main and work tabs as far as I can tell. (Getting it to export more of the card would be a separate bug, and would depend on being able to import too of course.)
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #8573330 - Flags: review?(mconley)
Attachment #8573330 - Flags: review?(mconley) → review?(mkmelin+mozilla)
Comment on attachment 8573330 [details] [diff] [review]
Proposed patch

Review of attachment 8573330 [details] [diff] [review]:
-----------------------------------------------------------------

Yes this seems to work. r=mkmelin

::: mailnews/addrbook/src/nsAbManager.cpp
@@ +649,5 @@
> +
> +       // Add the extension and build a new localFile.
> +       fileName.AppendLiteral(VCF_FILE_EXTENSION);
> +       localFile->SetLeafName(fileName);
> +  }

this brace looks to need a lot of more indention
Attachment #8573330 - Flags: review?(mkmelin+mozilla) → review+
Pushed comm-central changeset 0dbb2dcc87e5 with whitespace fixes.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 39.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: