author | zecke <zecke> | 2004-09-14 22:50:22 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-09-14 22:50:22 (UTC) |
commit | d46a01de16c8ad65b00c76beda547970f7972b62 (patch) (unidiff) | |
tree | 3ce4b630f5cd45c230c0a4f4ff92993a9c4f4f6c /library/backend/vobject.cpp | |
parent | 271a3753d1b71a85e5463b357abbfe46fce51732 (diff) | |
download | opie-d46a01de16c8ad65b00c76beda547970f7972b62.zip opie-d46a01de16c8ad65b00c76beda547970f7972b62.tar.gz opie-d46a01de16c8ad65b00c76beda547970f7972b62.tar.bz2 |
Be able to properly import vCard from Cell Phones
-rw-r--r-- | library/backend/vobject.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/library/backend/vobject.cpp b/library/backend/vobject.cpp index 9263c3a..592d116 100644 --- a/library/backend/vobject.cpp +++ b/library/backend/vobject.cpp | |||
@@ -1104,5 +1104,5 @@ static void writeEncString(OFile *fp, const char *s, bool nosemi) | |||
1104 | } | 1104 | } |
1105 | 1105 | ||
1106 | static bool includesUnprintable(VObject *o) | 1106 | static bool includesUnprintable(VObject *o, bool nosemi) |
1107 | { | 1107 | { |
1108 | if (o) { | 1108 | if (o) { |
@@ -1112,5 +1112,6 @@ static bool includesUnprintable(VObject *o) | |||
1112 | while (*p) { | 1112 | while (*p) { |
1113 | if (*p==' ' && (!p[1] || p[1]=='\n') // RFC 1521: spaces at ends need quoting | 1113 | if (*p==' ' && (!p[1] || p[1]=='\n') // RFC 1521: spaces at ends need quoting |
1114 | || qpReplaceChar(*p) ) | 1114 | || qpReplaceChar(*p) |
1115 | || *p==';' && nosemi ) | ||
1115 | return TRUE; | 1116 | return TRUE; |
1116 | p++; | 1117 | p++; |
@@ -1162,5 +1163,5 @@ static void writeAttrValue(OFile *fp, VObject *o) | |||
1162 | pi = lookupPropInfo(NAME_OF(o)); | 1163 | pi = lookupPropInfo(NAME_OF(o)); |
1163 | if (pi && ((pi->flags & PD_INTERNAL) != 0)) return; | 1164 | if (pi && ((pi->flags & PD_INTERNAL) != 0)) return; |
1164 | if ( includesUnprintable(o) ) | 1165 | if ( includesUnprintable(o,TRUE) ) |
1165 | appendsOFileEncCs(fp); | 1166 | appendsOFileEncCs(fp); |
1166 | appendcOFile(fp,';'); | 1167 | appendcOFile(fp,';'); |
@@ -1230,5 +1231,5 @@ static void writeProp(OFile *fp, VObject *o) | |||
1230 | while (*fields && printable) { | 1231 | while (*fields && printable) { |
1231 | VObject *t = isAPropertyOf(o,*fields); | 1232 | VObject *t = isAPropertyOf(o,*fields); |
1232 | if (includesUnprintable(t)) | 1233 | if (includesUnprintable(t,TRUE)) |
1233 | printable = FALSE; | 1234 | printable = FALSE; |
1234 | fields++; | 1235 | fields++; |
@@ -1255,5 +1256,5 @@ static void writeProp(OFile *fp, VObject *o) | |||
1255 | 1256 | ||
1256 | if (VALUE_TYPE(o)) { | 1257 | if (VALUE_TYPE(o)) { |
1257 | if ( includesUnprintable(o) ) | 1258 | if ( includesUnprintable(o,FALSE) ) |
1258 | appendsOFileEncCs(fp); | 1259 | appendsOFileEncCs(fp); |
1259 | unsigned long size = 0; | 1260 | unsigned long size = 0; |